From ddd17a7643ca777f70389ae9eacb75b8dba6beab Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 19 六月 2023 18:07:03 +0800 Subject: [PATCH] 联调物品主数据剩余功能,处理相似项查询 --- Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue | 9 ++-- Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 75 +++++++++++++++++-------------------- Source/UBCS-WEB/src/main.js | 4 +- Source/UBCS-WEB/src/views/MasterData/items.vue | 4 +- Source/UBCS-WEB/vue.config.js | 4 +- 5 files changed, 44 insertions(+), 52 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Crud/Crud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue similarity index 90% rename from Source/UBCS-WEB/src/components/Crud/Crud.vue rename to Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue index 3f5698a..f8ab6cd 100644 --- a/Source/UBCS-WEB/src/components/Crud/Crud.vue +++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue @@ -9,7 +9,7 @@ :codeRuleOid="this.codeRuleOid" :disabledProp="disabledProp" :templateOid="templateOid" - :type="add" + type="add" :visible.sync="addvisible" @submit="AddSumbit" > @@ -22,7 +22,7 @@ :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid" - :type="edit" + type="edit" :title="'淇敼缂栫爜淇℃伅'" :visible.sync="editvisible" @submit="EditSumbit" @@ -35,7 +35,7 @@ <el-button plain size="small" type="primary">鍒犻櫎</el-button> <el-button plain size="small" type="primary" @click="setHandler">鍙戝竷</el-button> <set-personnel :visible.sync="visibleFlow" :parameter="parameter" - type="PUBLIC"></set-personnel> + ></set-personnel> <el-button plain size="small" type="primary" @click="DataChange">鏁版嵁鏇存敼</el-button> <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" @@ -56,7 +56,14 @@ <advanced-query :options="this.options" :visible.sync="findvisible" @echoContion="echoContion"></advanced-query> </el-button> - <el-button plain size="small" type="primary">鐩镐技椤规煡璇�</el-button> + <el-button plain size="small" type="primary" @click="similarHandler">鐩镐技椤规煡璇�</el-button> + <ResembleQueryDialog + :visible.sync="similarVisible" + :templateOid="templateOid" + :codeClassifyOid="codeClassifyOid" + :rowOid="rowOid" + :codeRuleOid="this.codeRuleOid" + ></ResembleQueryDialog> <el-button plain size="small" style="margin-left: 1px;margin-top:10px" type="primary">鍒锋柊</el-button> <el-input placeholder="璇疯緭鍏ュ叧閿瓧鎸夊洖杞︽煡璇�" size="small" style="width: 180px;margin-left: 5px;margin-top:10px"></el-input> @@ -111,11 +118,12 @@ import {listCodeAttributeByClassId} from '@/api/integration/integration.js' import integrationTransfer from '@/views/integration/integrationTransfer' import SetPersonnel from '@/components/template/SetPersonnel' - +import ResembleQueryDialog from "@/components/FormTemplate/ResembleQueryDialog.vue"; export default { components: { integrationTransfer, - SetPersonnel + SetPersonnel, + ResembleQueryDialog }, name: "Crud.vue", props: { @@ -156,12 +164,13 @@ }, data() { return { + //鐩镐技椤规煡璇� + similarVisible:false, //鍙戝竷 parameter:{ ids:['0000','22222222'], - code:'8b5e2017-990f-454a-9c39-4c4eeeb57553', + code:this.templateOid, type:'PUBLIC', - name:'妯℃澘name', template:'妯℃澘template' }, visibleFlow: false, @@ -236,26 +245,10 @@ this.page.total = newval; } }, - // tableHeadDataFateher: { - // handler(newval, oldval) { - // let List = newval.tableDefineVO.cols[0]; - // List.forEach(item => { - // let columnItem = { - // label: item.title, - // prop: item.field, - // type: this.columnType[item.type], - // sortable: item.sort, - // width: item.minWidth - // }; - // this.tableHeadData.push(columnItem); - // console.log('table',this.tableHeadData) - // }) - // } - // } }, methods: { setHandler() { - this.visibleFlow = true + this.visibleFlow = true; }, huishouHandler() { @@ -310,21 +303,6 @@ this.$nextTick(() => { this.$refs.crud.doLayout(); }); - }, - tableHeadHandle() { - this.options = this.tableHeadDataFateher.tableDefineVO.seniorQueryColumns - this.List = this.tableHeadDataFateher.tableDefineVO.cols[0]; - this.List.forEach(item => { - let columnItem = { - label: item.title, - prop: item.field, - type: this.columnType[item.type], - sortable: item.sort, - width: item.minWidth - }; - this.option.column.push(columnItem); - this.option.column = this.tableHeadData; - }) }, //琛ㄦ牸澶存覆鏌� CrudHeaderRend() { @@ -401,7 +379,11 @@ }, //澶氶�� handleSelectionChange(row) { - this.rowOid = row[0].oid; + if(this.row){ + this.rowOid = row[0].oid; + }else { + this.rowOid='' + } this.selectRow = row; console.log(row) }, @@ -435,6 +417,17 @@ console.log(res) }) }, + //鐩镐技椤规煡璇� + similarHandler(){ + if (this.selectRow.length <= 0) { + this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�') + } else if (this.selectRow.length > 1) { + this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�') + } else { + this.similarVisible=true; + } + + }, //鏁版嵁鏇存敼 DataChange(){ if (this.selectRow.length <= 0) { diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue index 42912d0..acb2ed6 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue @@ -517,7 +517,6 @@ collapse: true, column: [], }); - return } if ( formItem.type === "combox" && @@ -597,7 +596,7 @@ this.$set(this.option, "column", column); this.$set(this.option, "group", group); this.formIndex++; - if (this.type === 'add' || this.type === 'preview') { + if (this.type === 'add') { this.loading = false; } this.geDictData(dictKeys); @@ -653,11 +652,11 @@ if (type === "truefalse") { return [ { - key: 'false', + key: false, value: "鍚�", }, { - key: 'true', + key: true, value: "鏄�", }, ]; @@ -701,7 +700,7 @@ }, // 鑾峰彇琛ㄥ崟璇︽儏鏁版嵁 getFormDetail() { - if (this.type === 'add' || this.type === 'preview') return + if (this.type === 'add') return getFormDetail({ templateOid: this.templateOid, oid: this.rowOid }).then( (res) => { this.form = Object.assign(this.form, res.data.data[0]) diff --git a/Source/UBCS-WEB/src/main.js b/Source/UBCS-WEB/src/main.js index 3f3b231..4da7c3d 100644 --- a/Source/UBCS-WEB/src/main.js +++ b/Source/UBCS-WEB/src/main.js @@ -44,7 +44,7 @@ import referSelectBtmAttrDialog from "@/components/code-dialog-page/referSelectBtmAttrDialog" import advancedQuery from "@/components/advanced-query/advancedQuery" import businessAdd from "@/views/modeling/BusinessAdd" -import TableCrud from "@/components/Crud/Crud" +import VciMasterCrud from "@/components/Crud/VciMasterCrud" import originalAdd from "@/views/modeling/originalAdd" import FormTemplateDialog from "@/components/FormTemplate/index" import linkTypeAdd from "@/views/modeling/LinkTypeAdd" @@ -94,7 +94,7 @@ Vue.component('advancedQuery',advancedQuery) Vue.component('businessAdd',businessAdd) Vue.component('attrCrud',attrCrud) -Vue.component('TableCrud',TableCrud) +Vue.component('VciMasterCrud',VciMasterCrud) Vue.component('originalAdd',originalAdd) Vue.component('referBtmTypeCrudDialog',referBtmTypeCrudDialog) Vue.component('referSelectBtmAttrDialog',referSelectBtmAttrDialog) diff --git a/Source/UBCS-WEB/src/views/MasterData/items.vue b/Source/UBCS-WEB/src/views/MasterData/items.vue index 079496f..e6b5d52 100644 --- a/Source/UBCS-WEB/src/views/MasterData/items.vue +++ b/Source/UBCS-WEB/src/views/MasterData/items.vue @@ -17,7 +17,7 @@ </el-aside> <el-main> <!-- 琛ㄦ牸缁勪欢--> - <TableCrud :page="this.page" + <VciMasterCrud :page="this.page" :codeClassifyOid="this.codeClassifyOid" :coderuleoid="this.coderuleoid" @pageSize="pageSizes" @@ -28,7 +28,7 @@ :isLoading="isLoading" :templateOid="templateOid" :tableHeadFindData="tableHeadFindData" - ></TableCrud> + ></VciMasterCrud> </el-main> </el-container> </template> diff --git a/Source/UBCS-WEB/vue.config.js b/Source/UBCS-WEB/vue.config.js index b47d590..26213af 100644 --- a/Source/UBCS-WEB/vue.config.js +++ b/Source/UBCS-WEB/vue.config.js @@ -28,11 +28,11 @@ //鏈湴鏈嶅姟鎺ュ彛鍦板潃 // target: 'http://localhost:37000', // target: 'http://localhost:37000', - target: 'http://192.168.1.51:37000', + // target: 'http://192.168.1.51:37000', // target: 'http://192.168.1.46:37000', // target: 'http://dev.vci-tech.com:37000', // target: 'http://192.168.1.51:37000/', - // target: 'http://192.168.1.104:37000', + target: 'http://192.168.1.104:37000', // target: 'http://192.168.1.63:37000', //target: 'http://192.168.3.7:37000', // target: 'http://dev.vci-tech.com:37000', -- Gitblit v1.9.3