diff --git a/src/api/DesignForm/requestapi.ts b/src/api/DesignForm/requestapi.ts index 8d6043d15..74713c0a8 100644 --- a/src/api/DesignForm/requestapi.ts +++ b/src/api/DesignForm/requestapi.ts @@ -545,6 +545,7 @@ export function afreshAppSubmit(data: any) { }); } + //动态获取关联的系统字段数据作为单选下拉多选的选项 export function getFieldRecord(param1: any) { return request({ @@ -553,5 +554,22 @@ export function getFieldRecord(param1: any) { data: { optionsValue3Field:param1 }, + }) +} +//获取数据库表字段 +export function gainTableField(data: any) { + return request({ + url: '/systemapi/customer_form/gainTableField', + method: 'post', + data: data + }); +} +//获取数据库表字段 +export function gainListTableField(data: any) { + return request({ + url: '/systemapi/customer_form/gainListTableField', + method: 'post', + data: data + }); } diff --git a/src/api/DesignForm/tableButton.ts b/src/api/DesignForm/tableButton.ts index ad6e533cc..c88af5050 100644 --- a/src/api/DesignForm/tableButton.ts +++ b/src/api/DesignForm/tableButton.ts @@ -289,3 +289,56 @@ export const weekForDay = [ label: '周日', } ] + +export interface viewPageType { + + list:{ + status:boolean, + isClick:boolean, + form:{ + sortWord:string, + sortClass:number + } + }, + date:{ + status:boolean, + isClick:boolean, + form:{ + startTime:string, + endTime:string, + dayType:number + } + } + , + time:{ + status:boolean, + isClick:boolean, + form:{ + sortWord:string, + sort:number + } + } + , + gantt:{ + status:boolean, + isClick:boolean, + form:{ + startTime:string, + endTime:string, + dayType:number, + sortWord:string, + sort:number + } + } + , + map:{ + status:boolean, + isClick:boolean, + form:{ + mapWord:string, + sortWord:string, + sort:number + } + } + +} diff --git a/src/components/DesignForm/app/index.vue b/src/components/DesignForm/app/index.vue index e9871969a..da8a1fcdd 100644 --- a/src/components/DesignForm/app/index.vue +++ b/src/components/DesignForm/app/index.vue @@ -7,7 +7,7 @@ import { json2string,objToStringify,string2json,stringToObj } from '@/utils/DesignForm/form' import { onBeforeRouteLeave, useRoute, useRouter } from 'vue-router' import { useDesignFormStore } from '@/store/DesignForm/designForm' -import { attrButton,FormPageList,FormPageConfig } from '@/api/DesignForm/tableButton' +import { attrButton,FormPageList,FormPageConfig,viewPageType } from '@/api/DesignForm/tableButton' import { inputUnit,timeUnit,choiceUnit,switchUnit,orgUnit,checkboxUnit } from '@/api/DesignForm/fieldUnit' import type { FormInstance, FormRules,ElNotification } from 'element-plus' import { gainFormPageListCont } from '@/api/DesignForm/requestapi' @@ -21,6 +21,7 @@ import { softDeletion,retractRunWorkFlow } from '@/api/taskapi/management' //引入组件 import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue' import TableFlow from '@/views/sysworkflow/lowcodepage/pageFlow/appTableFlow.vue' +import TimeAxisPage from '@/components/DesignForm/app/timeAxis.vue' const props = withDefaults( defineProps<{ @@ -44,6 +45,7 @@ const props = withDefaults( signCode?:string, pickAppMenu?:any versiontitle?:string, + viewPage?:viewPageType }>(), { showPage: true, @@ -79,6 +81,9 @@ const props = withDefaults( }, lookPageIsShow:() => { return false + }, + viewPage: () => { + return [] } } ) @@ -287,13 +292,17 @@ watch(()=>props.formId,(val:any)=>{ },{ deep: true, }) + +const timeAxisRef = ref(null) + + /** @ 作者: 秦东 @ 时间: 2024-04-01 15:51:32 @ 功能: 获取数据 */ const getPageData = () => { - state.loading = true; + let sendData = { formId:props.formId, page:state.currentPage, @@ -301,16 +310,35 @@ const getPageData = () => { searchData:json2string(props.searchData) } console.log("获取列表详细信息",sendData) - gainFormPageListCont(sendData) - .then((data)=>{ - console.log("获取列表详细信息----------------->",data) - tableDataList.value = data.data.list - state.total = data.data.total - state.loading = false; - }) - .finally(()=>{ - state.loading = false; - }) + + + switch(viewType.value){ + case 2: + break; + case 3: + nextTick(()=>{ + console.log("获取列表详细信息-------222---------->",timeAxisRef.value) + timeAxisRef.value.searchTimeList(sendData) + }) + + break; + case 4: + break; + case 5: + break; + default: + state.loading = true; + gainFormPageListCont(sendData) + .then((data)=>{ + console.log("获取列表详细信息----------------->",data) + tableDataList.value = data.data.list + state.total = data.data.total + state.loading = false; + }) + .finally(()=>{ + state.loading = false; + }) + } } onMounted(()=>{ getPageData() @@ -325,7 +353,7 @@ const judjeRadio = (val: any, options: any[]) => { if(options && options.length > 0){ options.forEach((item)=>{ if(item.value == val){ - console.log("判断单选值",val, item.value,item.label) + // console.log("判断单选值",val, item.value,item.label) val = item.label } }) @@ -455,6 +483,53 @@ const editFormSendFlow = (val:any) => { drawerWith.value = container.value?.clientWidth lookPageInfoIsShow.value = true; } +const viewType = ref(1) +const viewLayout = ref() +/** +@ 作者: 秦东 +@ 时间: 2024-07-08 09:39:52 +@ 功能: 切换视图展示方式 +*/ +const tabsView = (val:any,types:number) => { + viewType.value = types + val.isClick = true + viewLayout.value = val + console.log("切换视图展示方式",val) + switch(types){ + case 2: + props.viewPage.list.isClick = false + props.viewPage.time.isClick = false + props.viewPage.gantt.isClick = false + props.viewPage.map.isClick = false + break; + case 3: + props.viewPage.list.isClick = false + props.viewPage.date.isClick = false + props.viewPage.gantt.isClick = false + props.viewPage.map.isClick = false + getPageData() + break; + case 4: + props.viewPage.list.isClick = false + props.viewPage.date.isClick = false + props.viewPage.time.isClick = false + props.viewPage.map.isClick = false + break; + case 5: + props.viewPage.list.isClick = false + props.viewPage.date.isClick = false + props.viewPage.time.isClick = false + props.viewPage.gantt.isClick = false + break; + default: + props.viewPage.date.isClick = false + props.viewPage.time.isClick = false + props.viewPage.gantt.isClick = false + props.viewPage.map.isClick = false + break; + } +} + - +
{ />
+ + + + + + {{ props.data}} @@ -867,4 +997,5 @@ const editFormSendFlow = (val:any) => { .demo-image__error .image-slot .el-icon { font-size: 30px; } + diff --git a/src/components/DesignForm/app/timeAxis.vue b/src/components/DesignForm/app/timeAxis.vue new file mode 100644 index 000000000..c9900a18d --- /dev/null +++ b/src/components/DesignForm/app/timeAxis.vue @@ -0,0 +1,122 @@ + + + + diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue index bf8de2ec5..40e276aa7 100644 --- a/src/components/DesignForm/tableListPage/index.vue +++ b/src/components/DesignForm/tableListPage/index.vue @@ -7,7 +7,7 @@ import { json2string,objToStringify,string2json,stringToObj } from '@/utils/DesignForm/form' import { onBeforeRouteLeave, useRoute, useRouter } from 'vue-router' import { useDesignFormStore } from '@/store/DesignForm/designForm' -import { attrButton,FormPageList,FormPageConfig } from '@/api/DesignForm/tableButton' +import { attrButton,FormPageList,FormPageConfig,viewPageType } from '@/api/DesignForm/tableButton' import { inputUnit,timeUnit,choiceUnit,switchUnit,orgUnit,checkboxUnit } from '@/api/DesignForm/fieldUnit' import type { FormInstance, FormRules,ElNotification } from 'element-plus' import { gainFormPageListCont } from '@/api/DesignForm/requestapi' @@ -40,6 +40,7 @@ const props = withDefaults( lookPageIsShow?:boolean, versionid?:string, versiontitle?:string, + viewPage?:viewPageType }>(), { showPage: true, @@ -72,6 +73,9 @@ const props = withDefaults( }, lookPageIsShow:() => { return false + }, + viewPage: () => { + return [] } } ) @@ -538,19 +542,67 @@ const editFormSendFlow = (val:any) => { :key="item.type" @click="setUpClick(item)" > - {{ item.label }} + {{ item.label }}123
- - - + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/types/components.d.ts b/src/types/components.d.ts index e0a41835a..a07ef5f7e 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -174,6 +174,7 @@ declare module '@vue/runtime-core' { TableListPage: typeof import('./../components/DesignForm/tableListPage/index.vue')['default'] Template: typeof import('./../components/DesignForm/template.vue')['default'] TextPage: typeof import('./../components/DesignForm/designLayout/textPage.vue')['default'] + TimeAxis: typeof import('./../components/DesignForm/app/timeAxis.vue')['default'] Tinymce: typeof import('./../components/DesignForm/public/form/tinymce.vue')['default'] Tinymce_1: typeof import('./../components/DesignForm/public/form/tinymce_1.vue')['default'] Tooltip: typeof import('./../components/DesignForm/tooltip.vue')['default'] @@ -185,6 +186,7 @@ declare module '@vue/runtime-core' { Yuanjao: typeof import('./../components/DesignForm/designLayout/yuanjao.vue')['default'] } export interface ComponentCustomProperties { + vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] vLoading: typeof import('element-plus/es')['ElLoadingDirective'] } } diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue index 8e7be6a2e..14e8844d4 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/openAppFormPage.vue @@ -206,6 +206,7 @@ const gainAppFormPageInit = () =>{ stateList.formApi = stateData.formApi stateList.dict = stateData.dict stateList.refreshTable = stateData.refreshTable + stateList.view = stateData.view } if(data.data.page){ console.log("data.data.mastesform", data.data) @@ -269,6 +270,7 @@ defineExpose({ :versionid="versionId" :versiontitle="versionTitle" v-model:look-page-is-show="lookPageIsShow" + :viewPage="stateList.view" /> { }) } } + /** @ 作者: 秦东 @ 时间: 2024-05-21 15:41:53 @@ -212,8 +266,31 @@ onMounted(()=>{ nextTick(() => { columnDrop() getListInfo(); + + + gainFormTableKeyWord(props.appPageKey.toString()) }) }) + +const allKeyWords = ref([]) +const timeKeyWords = ref([]) +const mapKeyWords = ref([]) +const isMapTrue = ref(true) +/** +@ 作者: 秦东 +@ 时间: 2024-07-06 10:44:54 +@ 功能: 获取数据表字段数据 +*/ +const gainFormTableKeyWord = (val:string) => { + gainListTableField({id:val.toString()}) + .then((data) =>{ + console.log("获取数据表字段数据",data) + allKeyWords.value = data.data.allKeyWords + timeKeyWords.value = data.data.timeKeyWords + mapKeyWords.value = data.data.mapKeyWords + isMapTrue.value = !data.data.isMap + }) +} /** @ 作者: 秦东 @ 时间: 2024-05-21 15:42:18 @@ -271,6 +348,7 @@ const getListInfo = () => { state.formApi = stateData.formApi state.dict = stateData.dict state.refreshTable = stateData.refreshTable + state.view = stateData.view } @@ -612,6 +690,37 @@ const dialogOpen = (obj: any, params: any = {}) => { } drawer.content = editData } + +const activeName = ref(["list"]) +const listOnOrOff = ref(true) + +const viewList1 = ref() + +/** +@ 作者: 秦东 +@ 时间: 2024-07-05 16:11:05 +@ 功能: 折叠组件变动事件 +*/ +const handleChange = (val: string[]) => { + console.log("折叠组件变动事件--->",val,activeName) + + + + // judjeIsTrue +} + +const judjeIsTrue = (val:string) => { + if (activeName.value.includes(val)){ + return true + }else{ + false + } +} + +const tabsView = (val:any) => { + val.isClick = !val.isClick +} +