From abe9f2de85ff402a4c989dbc1427807b4e3a59f4 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 06 七月 2023 13:56:17 +0800 Subject: [PATCH] 代码提交 --- Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 99 +++++++++++++++++++++++++++++++------------------ 1 files changed, 62 insertions(+), 37 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue index 0992b9c..2c7f374 100644 --- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue @@ -3,34 +3,34 @@ <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">鎵归噺瀵煎叆鐢宠</el-button> - <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="openBatchImport('batchImportApply')">鎵归噺瀵煎叆鐢宠</el-button> + <el-button plain size="small" type="primary" @click="openBatchImport('historyImport')">鍘嗗彶鏁版嵁瀵煎叆</el-button> + <el-button plain size="small" type="primary" @click="openBatchImport('batchApplyCode')">鎵归噺鐢宠缂栫爜</el-button> <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">鍒犻櫎</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,19 +59,11 @@ :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" > - <!-- 缂栬緫鍜屽睍绀洪�昏緫 --> - <!-- <template slot-scope="{ row }">--> - <!-- <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input>--> - <!-- <span v-else>{{row[item.prop]}}</span>--> - <!-- <el-switch--> - <!-- v-if="editShow === 'true'"--> - <!-- v-model="row[item.prop]"--> - <!-- active-color="#13ce66"--> - <!-- inactive-color="#ff4949">--> - <!-- </el-switch>--> - <!-- </template>--> </el-table-column> </el-table> </el-row> @@ -141,6 +133,7 @@ > </el-pagination> </div> + <BatchImport v-if="batchImportData.visible" :visible.sync="batchImportData.visible" v-bind="batchImportData"></BatchImport> </basic-container> </template> <script> @@ -149,11 +142,14 @@ import integrationTransfer from "@/views/integration/integrationTransfer"; 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, SetPersonnel, ResembleQueryDialog, + BatchImport }, name: "Crud.vue", props: { @@ -203,6 +199,9 @@ code: "", type: "PUBLIC", template: "", + vars:{ + codeClassifyOid:"" + } }, visibleFlow: false, transferData: [], @@ -240,6 +239,11 @@ seniorQueryColumns: [], selectRow: [], userName: "", + batchImportData: { + visible: false, + type: '', + codeClassifyOid: '' + } }; }, computed: {}, @@ -249,9 +253,15 @@ this.doLayout(); }, watch: { + tableHeadDataFateher:{ + handler(newval,oldval){ + this.options=newval.tableDefineVO.seniorQueryColumns + } + }, codeClassifyOid: { handler(newval, oldval) { this.codeClassifyOid = newval; + this.parameter.vars.codeClassifyOid=newval }, deep: true, }, @@ -262,6 +272,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; }, }, @@ -278,22 +301,8 @@ }, }, 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() { - console.log("1111"); - console.log("鐖�", this.parameter); - if (this.selectRow.length <= 0) { this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�"); } else { @@ -433,9 +442,11 @@ this.rowOid = ""; } this.selectRow = row; + this.parameter.ids = []; row.forEach((item) => { this.parameter.ids.push(item.oid); }); + console.log( ' this.parameter.ids',this.parameter.ids) }, //缂栬緫 editHandler() { @@ -447,6 +458,7 @@ this.$message.warning("缂栫爜鐘舵�佷笉鏄�滅紪杈戜腑鈥�,涓嶅彲缂栬緫"); } else { this.editvisible = true; + this.rowOid = this.selectRow[0]['oid'] } }, //楂樼骇鏌ヨ鎸夐挳 @@ -461,6 +473,8 @@ ...val, }).then((res) => { console.log(res); + this.tableData=res.data.data; + this.page.total=res.data.total }); }, //鐩镐技椤规煡璇� @@ -492,6 +506,11 @@ EditSumbit(val) { this.editvisible = false; }, + openBatchImport(type) { + this.batchImportData.visible = true + this.batchImportData.type = type + this.batchImportData.codeClassifyOid = this.codeClassifyOid + } }, }; </script> @@ -506,4 +525,10 @@ background-color: #f5f7fa !important; } } + +/deep/ .el-button { + margin: 0 10px 10px 0; +} + + </style> -- Gitblit v1.9.3