From 90bc8df34f290907a3ee01d05a9df5ca62b2cacc Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期三, 05 七月 2023 17:47:39 +0800 Subject: [PATCH] 修改列表展示 --- Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 47 ++++++++++++++++++++++++++--------------------- 1 files changed, 26 insertions(+), 21 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue index 6cafeb2..9e622e0 100644 --- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue @@ -3,10 +3,10 @@ <div class="testbox"> <div> <el-button plain size="small" type="primary" @click="addvisible = true" - >澧炲姞 + >澧炲姞 </el-button> <el-button plain size="small" type="primary" @click="editHandler" - >缂栬緫 + >缂栬緫 </el-button> <el-button plain size="small" type="primary" @click="openBatchImport('batchImportApply')">鎵归噺瀵煎叆鐢宠</el-button> <el-button plain size="small" type="primary" @click="openBatchImport('historyImport')">鍘嗗彶鏁版嵁瀵煎叆</el-button> @@ -15,22 +15,22 @@ <el-button plain size="small" type="primary">鏌ョ湅娴佺▼鍘嗗彶</el-button> <el-button plain size="small" type="primary">鍒犻櫎</el-button> <el-button plain size="small" type="primary" @click="setHandler" - >鍙戝竷</el-button + >鍙戝竷</el-button > <el-button plain size="small" type="primary" @click="DataChange" - >鏁版嵁鏇存敼</el-button + >鏁版嵁鏇存敼</el-button > <el-button plain size="small" type="primary" @click="huishouHandler" - >鍥炴敹</el-button + >鍥炴敹</el-button > <el-button plain size="small" type="primary" @click="openD" - >瀵煎嚭 + >瀵煎嚭 </el-button> <el-button plain size="small" type="primary" @click="findHandler" - >鏌ヨ + >鏌ヨ </el-button> <el-button plain size="small" type="primary" @click="similarHandler" - >鐩镐技椤规煡璇�</el-button + >鐩镐技椤规煡璇�</el-button > <el-button plain size="small" type="primary">鍒锋柊</el-button> <el-input @@ -59,7 +59,7 @@ :label="item.label" :prop="item.prop" :sortable="item.sortable" - :formatter="formatBoolean" + :formatter="item.formatter" :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'" :show-overflow-tooltip="true" align="center" @@ -143,6 +143,7 @@ import SetPersonnel from "@/components/template/SetPersonnel"; import ResembleQueryDialog from "@/components/FormTemplate/ResembleQueryDialog.vue"; import BatchImport from '@/components/BatchImport' +import { validatenull } from "@/util/validate"; export default { components: { integrationTransfer, @@ -198,6 +199,7 @@ code: "", type: "PUBLIC", template: "", + codeClassifyOid:"" }, visibleFlow: false, transferData: [], @@ -249,7 +251,7 @@ this.doLayout(); }, watch: { - tableHeadDataFateher:{ + tableHeadDataFateher:{ handler(newval,oldval){ this.options=newval.tableDefineVO.seniorQueryColumns } @@ -257,6 +259,7 @@ codeClassifyOid: { handler(newval, oldval) { this.codeClassifyOid = newval; + this.parameter.codeClassifyOid=newval }, deep: true, }, @@ -267,6 +270,19 @@ }, tableHeadFindData: { handler(newval, oldval) { + newval.forEach((record,_index) =>{ + if(record.field == 'id' && validatenull(record.templet)){ + //浼佷笟缂栫爜鐨勯粯璁ゆ坊鍔犺秴閾炬帴,鏆傛湭瀹炵幇 + record.formatter = ''; + }else { + if (record.templet && typeof (record.templet) == 'string' && !validatenull(record.templet) && record.templet.indexOf("function(row,column)")>-1) { + record.formatter = eval("(" + record.templet + ")"); + //function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'鏄�':'鍚�'} + }else if(record.fieldType=="truefalse"){ + record.formatter = function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'鏄�':'鍚�'} + } + } + }) this.tableHeadFindDatas = newval; }, }, @@ -283,17 +299,6 @@ }, }, methods: { - // 杞崲鏁版嵁true鍜宖alse - formatBoolean(row, column) { - if (column.property === "xiaoshouwl" - ||column.property === "shifoupihaoguanli" - ||column.property === "caigouwl" - ||column.property === "kucunwl" - ||column.property === "passing") { - return row[column.property] =='true'? "鏄�" : "鍚�"; - } - return row[column.property]; - }, // 鍙戝竷 setHandler() { if (this.selectRow.length <= 0) { -- Gitblit v1.9.3