|
|
@ -5,7 +5,7 @@ |
|
|
--> |
|
|
--> |
|
|
<script lang='ts' setup> |
|
|
<script lang='ts' setup> |
|
|
import { json2string,objToStringify,string2json,stringToObj } from '@/utils/DesignForm/form' |
|
|
import { json2string,objToStringify,string2json,stringToObj } from '@/utils/DesignForm/form' |
|
|
import { gainAppPageInfo } from '@/api/DesignForm/requestapi' |
|
|
import { gainAppPageInfo,getFieldRecord } from '@/api/DesignForm/requestapi' |
|
|
import { Edit,Picture as IconPicture } from '@element-plus/icons-vue' |
|
|
import { Edit,Picture as IconPicture } from '@element-plus/icons-vue' |
|
|
import { appPageDataInit,appWorkFlow } from "@/api/date/type" |
|
|
import { appPageDataInit,appWorkFlow } from "@/api/date/type" |
|
|
|
|
|
|
|
|
@ -134,6 +134,7 @@ const handleAppPageClick = () =>{ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ 作者: 秦东 |
|
|
@ 作者: 秦东 |
|
|
@ 时间: 2024-05-20 16:15:54 |
|
|
@ 时间: 2024-05-20 16:15:54 |
|
|
@ -164,6 +165,32 @@ const gainAppFormPageInit = () =>{ |
|
|
versionTitle.value = data.data.appForm.name |
|
|
versionTitle.value = data.data.appForm.name |
|
|
if(data.data.pageList){ |
|
|
if(data.data.pageList){ |
|
|
let stateData = string2json(data.data.appForm.listjson) |
|
|
let stateData = string2json(data.data.appForm.listjson) |
|
|
|
|
|
|
|
|
|
|
|
if(stateData.tableData.columns.length>0){ |
|
|
|
|
|
for(let i = 0;i<stateData.tableData.columns.length;i++){ |
|
|
|
|
|
if(stateData.tableData.columns[i].config!=undefined && stateData.tableData.columns[i].control!=undefined){ |
|
|
|
|
|
console.log(stateData.tableData.columns[i]) |
|
|
|
|
|
let paramx:string = ""+stateData.tableData.columns[i].control.optionsValue3Field |
|
|
|
|
|
/* |
|
|
|
|
|
在这里请求后台获取字段 |
|
|
|
|
|
*/ |
|
|
|
|
|
getFieldRecord(paramx).then(({ data }) => { |
|
|
|
|
|
stateData.tableData.columns[i].options = data |
|
|
|
|
|
if(stateData.searchData.length>0){ |
|
|
|
|
|
for(let j = 0;j<stateData.searchData.length;j++){ |
|
|
|
|
|
console.log(stateData.searchData[j]) |
|
|
|
|
|
if(stateData.searchData[j].id==stateData.tableData.columns[i].id){ |
|
|
|
|
|
stateData.searchData[j].options = data |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stateList.tableData = stateData.tableData |
|
|
stateList.tableData = stateData.tableData |
|
|
stateList.searchData = stateData.searchData |
|
|
stateList.searchData = stateData.searchData |
|
|
stateList.loading = stateData.loading |
|
|
stateList.loading = stateData.loading |
|
|
@ -199,6 +226,7 @@ const gainAppFormPageInit = () =>{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function optionsValue3Get3(data: any,fieldName: string){ |
|
|
function optionsValue3Get3(data: any,fieldName: string){ |
|
|
|
|
|
|
|
|
for(let i = 0; i < stateForm.formData.list.length; i++){ |
|
|
for(let i = 0; i < stateForm.formData.list.length; i++){ |
|
|
if(stateForm.formData.list[i].name==fieldName){ |
|
|
if(stateForm.formData.list[i].name==fieldName){ |
|
|
stateForm.formData.list[i].options = [] |
|
|
stateForm.formData.list[i].options = [] |
|
|
|