|
|
|
@ -13,7 +13,7 @@ import { inputUnit,timeUnit,choiceUnit,switchUnit,orgUnit,checkboxUnit } from '@ |
|
|
|
import { useDesignFormStore } from '@/utils/pinia/stores/lowCode/designForm' |
|
|
|
import{ json2string,string2json,stringToObj } from '@/utils/lowCode/form' |
|
|
|
import{ submitButton,submitFlowButton } from '@/utils/lowCode/const' |
|
|
|
import { appWorkFlow } from '@/api/workFlow/type' |
|
|
|
import { appWorkFlow,nodePoweInfo,powerAryInfo } from '@/api/workFlow/type' |
|
|
|
import { softDeletion } from '@/api/lowCode/taskapi/management' |
|
|
|
|
|
|
|
import SvgIcon from '@/components/svgIcon/index.vue' |
|
|
|
@ -26,20 +26,25 @@ import TimeAxis from '@/views/formTable/page/timeAxis.vue' |
|
|
|
import Calendar from '@/views/formTable/page/calendar.vue' |
|
|
|
import MapPage from '@/views/formTable/page/mapPage.vue' |
|
|
|
import AppPageInfo from '@/views/formTable/pageInfo.vue' |
|
|
|
import { tableButton } from '@/api/common/tableButton' |
|
|
|
import { FormInstance } from 'element-plus' |
|
|
|
|
|
|
|
const route = useRoute() |
|
|
|
const router = useRouter() |
|
|
|
const appKey = ref<string>(route.query.key) |
|
|
|
const appId = ref<string>(route.query.id) |
|
|
|
const taskTitle = ref<string>(route.query.title) |
|
|
|
const taskId = ref<string>(route.query.formid) |
|
|
|
const taskKey = ref<string>(route.query.formKey) |
|
|
|
const appKey = ref<any>(route.query.key) |
|
|
|
const appId = ref<any>(route.query.id) |
|
|
|
const taskTitle = ref<any>(route.query.title) |
|
|
|
const taskId = ref<any>(route.query.formid) |
|
|
|
const taskKey = ref<any>(route.query.formKey) |
|
|
|
const activeName = ref('1') |
|
|
|
const pageIdAry = ref<string[]>([]) |
|
|
|
const formTableStr = ref<string>('') |
|
|
|
|
|
|
|
const cardPageRef = ref(null) //卡片视图 |
|
|
|
const appFlowInfo = ref<appWorkFlow>(""); //流程 |
|
|
|
const cardPageRef = ref() //卡片视图 |
|
|
|
const appFlowInfo = ref<appWorkFlow>(); //流程 |
|
|
|
|
|
|
|
const currterNodePower = ref<nodePoweInfo[]>([]) |
|
|
|
const nodeKey = ref<string>(""); |
|
|
|
|
|
|
|
const appContent = reactive<any>({ |
|
|
|
appKey:route.query.key, |
|
|
|
@ -190,11 +195,16 @@ const initLoadData = () => { |
|
|
|
// console.log("获取初始化表单数据:",taskId) |
|
|
|
gainAppPageInfo({id:taskKey.value}) |
|
|
|
.then((data) => { |
|
|
|
// console.log("获取初始化表单数据:",data) |
|
|
|
console.log("获取初始化表单数据:",data) |
|
|
|
// appInitData.value = data.data |
|
|
|
// console.log("获取初始化表单数据---!",appInitData.value) |
|
|
|
formTableStr.value = data.data.appForm.mastesformjson |
|
|
|
|
|
|
|
if(data.data.powerAry && Array.isArray(data.data.powerAry) && data.data.powerAry.length > 0){ |
|
|
|
currterNodePower.value = data.data.powerAry |
|
|
|
} |
|
|
|
nodeKey.value = data.data.nodeKey?data.data.nodeKey:""; |
|
|
|
|
|
|
|
if(data.data.appForm.listjson!=null && data.data.appForm.listjson != ''){ |
|
|
|
let stateData = string2json(data.data.appForm.listjson) |
|
|
|
let holeControlAndConfigStateData = string2json(data.data.appForm.mastesformjson) |
|
|
|
@ -278,7 +288,7 @@ const initLoadData = () => { |
|
|
|
if(stateData.view&&stateData.view.card){ |
|
|
|
stateData.view.card.status=true |
|
|
|
stateData.view.card.isClick = true |
|
|
|
activeName.value = 2 |
|
|
|
activeName.value = "2" |
|
|
|
} |
|
|
|
// console.log("数据展开--------------<",stateData.view) |
|
|
|
stateList.view = stateData.view |
|
|
|
@ -396,6 +406,13 @@ const unitIsShow = (val:tableButton,unitName:string) => { |
|
|
|
const getNewAppForm = () => { |
|
|
|
gainAppPageInfo({id:taskKey.value}) |
|
|
|
.then((data) => { |
|
|
|
console.log("获取初始化表单数据:==========>",data) |
|
|
|
|
|
|
|
if(data.data.powerAry && Array.isArray(data.data.powerAry) && data.data.powerAry.length > 0){ |
|
|
|
currterNodePower.value = data.data.powerAry |
|
|
|
} |
|
|
|
nodeKey.value = data.data.nodeKey?data.data.nodeKey:""; |
|
|
|
|
|
|
|
stateForm.formData = stringToObj(data.data.appForm.mastesform); |
|
|
|
stateForm.dict = string2json(data.data.appForm.dict); |
|
|
|
stateForm.formData.powerstr = string2json(data.data.appForm.powerstr); |
|
|
|
@ -428,7 +445,7 @@ const getNewAppForm = () => { |
|
|
|
@ 时间: 2024-11-04 13:59:42 |
|
|
|
@ 功能: 功能按钮动作 |
|
|
|
*/ |
|
|
|
const setUpClick = (val:string,id:string) => { |
|
|
|
const setUpClick = (val:any,id?:string) => { |
|
|
|
// console.log("功能按钮动作",val,"----id----->",id,"-----formId---->",pageIdAry.value) |
|
|
|
if(val.key == "newAdd"){ |
|
|
|
getNewAppForm() |
|
|
|
@ -445,7 +462,7 @@ const setUpClick = (val:string,id:string) => { |
|
|
|
id: pageIdAry.value, |
|
|
|
isTrue: 2, |
|
|
|
}; |
|
|
|
softDeletion(sendData).then((data) => { |
|
|
|
softDeletion(sendData).then((data: { mag: any }) => { |
|
|
|
// console.log('cancel!',data) |
|
|
|
ElNotification({ |
|
|
|
title: "温馨提示!", |
|
|
|
@ -492,7 +509,7 @@ const resetFields = (formEl: FormInstance | undefined) => { |
|
|
|
@ 时间: 2024-11-06 14:45:29 |
|
|
|
@ 功能: 切换视图 |
|
|
|
*/ |
|
|
|
const switchTabs = (val:string) => { |
|
|
|
const switchTabs = (val:string|number) => { |
|
|
|
activeName.value = val.toString() |
|
|
|
} |
|
|
|
|
|
|
|
@ -501,12 +518,16 @@ const switchTabs = (val:string) => { |
|
|
|
@ 时间: 2024-11-21 13:33:52 |
|
|
|
@ 功能: 执行操作 |
|
|
|
*/ |
|
|
|
const performAction = (val) => {} |
|
|
|
const performAction = () => {} |
|
|
|
const transformOption = (val:any,dataVal:any) => {} |
|
|
|
|
|
|
|
//授权情况 |
|
|
|
provide('flowNodePower', currterNodePower) |
|
|
|
provide('currentNodeKey', nodeKey) |
|
|
|
</script> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<Header :header-title="taskTitle" :app-key="appKey" menu-tree="" :call-back-click="true" /> |
|
|
|
<Header :header-title="taskTitle" :app-key="appKey" :call-back-click="true" /> |
|
|
|
<div ref="container" class="table-list-comm"> |
|
|
|
<div class="contentBetween"> |
|
|
|
<div v-if="stateList.tableData.controlBtn.length > 0"> |
|
|
|
@ -521,31 +542,31 @@ const performAction = (val) => {} |
|
|
|
</div> |
|
|
|
<div class="listStely"> |
|
|
|
<el-space wrap> |
|
|
|
<SvgIcon icon-class="search" :size="20" @click="openSearch" /> |
|
|
|
<SvgIcon icon-class="search" :size="'20'" @click="openSearch" /> |
|
|
|
<el-dropdown> |
|
|
|
<span class="el-dropdown-link"> |
|
|
|
视图<SvgIcon icon-class="arrow-down" :size="15" /> |
|
|
|
视图<SvgIcon icon-class="arrow-down" :size="'15'" /> |
|
|
|
</span> |
|
|
|
<template #dropdown> |
|
|
|
<el-dropdown-menu> |
|
|
|
|
|
|
|
<el-dropdown-item v-if="stateList.view.list.status" @click="switchTabs(1)"> |
|
|
|
<div :class="activeName=='1' ? 'pickMenu' : ''"><SvgIcon icon-class="liebiao" :size="15" />列表</div> |
|
|
|
<div :class="activeName=='1' ? 'pickMenu' : ''"><SvgIcon icon-class="liebiao" :size="'15'" />列表</div> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item v-if="stateList.view.card.status" @click="switchTabs(2)"> |
|
|
|
<div :class="activeName=='2' ? 'pickMenu' : ''"><SvgIcon icon-class="kapian" :size="15" />卡片</div> |
|
|
|
<div :class="activeName=='2' ? 'pickMenu' : ''"><SvgIcon icon-class="kapian" :size="'15'" />卡片</div> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item v-if="stateList.view.date.status" @click="switchTabs(3)"> |
|
|
|
<div :class="activeName=='3' ? 'pickMenu' : ''"><SvgIcon icon-class="rili" :size="15" />日历</div> |
|
|
|
<div :class="activeName=='3' ? 'pickMenu' : ''"><SvgIcon icon-class="rili" :size="'15'" />日历</div> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item v-if="stateList.view.time.status" @click="switchTabs(4)"> |
|
|
|
<div :class="activeName=='4' ? 'pickMenu' : ''"><SvgIcon icon-class="shijianzhou" :size="15" />时间轴</div> |
|
|
|
<div :class="activeName=='4' ? 'pickMenu' : ''"><SvgIcon icon-class="shijianzhou" :size="'15'" />时间轴</div> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item v-if="stateList.view.gantt.status" @click="switchTabs(5)"> |
|
|
|
<div :class="activeName=='5' ? 'pickMenu' : ''"><SvgIcon icon-class="gantetu" :size="15" />甘特图</div> |
|
|
|
<div :class="activeName=='5' ? 'pickMenu' : ''"><SvgIcon icon-class="gantetu" :size="'15'" />甘特图</div> |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item v-if="stateList.view.map.status" @click="switchTabs(6)"> |
|
|
|
<div :class="activeName=='6' ? 'pickMenu' : ''"><SvgIcon icon-class="ditu" :size="15" />地图</div> |
|
|
|
<div :class="activeName=='6' ? 'pickMenu' : ''"><SvgIcon icon-class="ditu" :size="'15'" />地图</div> |
|
|
|
</el-dropdown-item> |
|
|
|
|
|
|
|
</el-dropdown-menu> |
|
|
|
@ -584,7 +605,7 @@ const performAction = (val) => {} |
|
|
|
v-model="item.value" |
|
|
|
type="datetime" |
|
|
|
:placeholder="'请选择'+item.label" |
|
|
|
:shortcuts="shortcuts" |
|
|
|
|
|
|
|
v-if="unitIsShow(item,'time')" |
|
|
|
/> |
|
|
|
<SearchSelect |
|
|
|
|