From 66afa3c24982b479a7c13bd8a0fb335435e8ecff Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 27 七月 2023 10:25:37 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS-WEB/src/components/Master/MasterTransfer.vue | 26 ++++++++++++ Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue | 5 ++ Source/UBCS-WEB/src/api/GetItem.js | 9 ++++ Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 5 +- Source/UBCS-WEB/src/components/BatchImport/index.vue | 2 + Source/UBCS-WEB/vue.config.js | 4 ++ Source/UBCS-WEB/src/components/Master/MasterTree.vue | 8 ++- Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 11 ++++- 8 files changed, 60 insertions(+), 10 deletions(-) diff --git a/Source/UBCS-WEB/src/api/GetItem.js b/Source/UBCS-WEB/src/api/GetItem.js index 875a9e8..a1ade96 100644 --- a/Source/UBCS-WEB/src/api/GetItem.js +++ b/Source/UBCS-WEB/src/api/GetItem.js @@ -60,7 +60,14 @@ export function exportCode(data){ return request({ url: 'api/ubcs-code/mdmEngineController/exportCode', - method: 'post', + method: 'excel', + responseType: 'json', // 璁剧疆鍝嶅簲绫诲瀷涓篴rraybuffer + headers: { + 'Content-Type': 'application/vnd.ms-excel', // 璁剧疆璇锋眰澶翠负浜岃繘鍒舵祦绫诲瀷 + // 鍦ㄨ繖閲屽彲浠ヨ缃叾浠栬姹傚ご淇℃伅 + // 渚嬪锛� + // 'Authorization': 'Bearer your-token', + }, params:{ ...data } diff --git a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue index 5268994..6d28988 100644 --- a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue +++ b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue @@ -237,6 +237,7 @@ type: Array, default: () => ({}), }, + resetTable: Function }, computed: { dialogVisible: { @@ -549,11 +550,13 @@ }, ]; } - this.submitLoading = true + this.submitLoading = true submitHistoryimport(params).then((res) => { this.submitLoading = false if (res.data.code === 200) { this.$message.success(res.data.msg); + this.$parent.dialogVisible = false + this.resetTable() } }); }, diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue index 3b347ac..e9fb97f 100644 --- a/Source/UBCS-WEB/src/components/BatchImport/index.vue +++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue @@ -79,6 +79,7 @@ :type="type" :title="title" :secDTOList="secDTOList" + :resetTable="resetTable" ></ShowImportData> </el-dialog> </template> @@ -116,6 +117,7 @@ type: String, default: "", }, + resetTable: Function }, computed: { uploadHeaders() { diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue index d04c8ff..b604ba4 100644 --- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue @@ -101,7 +101,8 @@ </el-pagination> </div> </div> - <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :visible.sync="batchImportData.visible"> + </div> + <BatchImport v-if="batchImportData.visible" v-bind="batchImportData" :visible.sync="batchImportData.visible" :resetTable="CrudRend"> </BatchImport> </div> <div class="bottom"> @@ -562,7 +563,7 @@ this.$message.warning('閫夋嫨鐨勬暟鎹腑鐘舵�佹棤闇�鍐嶆墽琛屽綋鍓嶆搷浣�'); showMessage = false; } else if (this.selectRow.length >=1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) { - //disabledCount 鍜� releasedCount 涓换鎰忎竴涓瓑浜� this.selectRow 鏁扮粍鐨勯暱搴� 鍒欒〃绀哄叏閮ㄦ槸鍚屼竴绉嶇姸鎬侊紝杩斿洖 true 濡傛灉disabledCount 鍜� releasedCount 閮藉ぇ浜�0锛屽垯琛ㄧず鏃㈡湁Disabled涔熸湁Released杩斿洖 true + //disabledCount 鍜� releasedCount 涓换鎰忎竴涓瓑浜� this.selectRow 鏁扮粍鐨勯暱搴﹀垯琛ㄧず鍏ㄩ儴鏄悓涓�绉嶇姸鎬侊紝杩斿洖 true 濡傛灉disabledCount 鍜� releasedCount 閮藉ぇ浜�0锛屽垯琛ㄧず鏃㈡湁Disabled涔熸湁Released杩斿洖 true processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { if (res.data.records != [] && res.data.code != 200) { this.userName = localStorage.getItem("username"); diff --git a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue index ec48494..5af0fcb 100644 --- a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue +++ b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue @@ -132,8 +132,32 @@ exportArr[`attrIdIndexMap[${index}]`] = item }) exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':ids,...exportArr}).then(res=>{ - console.log(res) + console.log('res',res) + const filename = '涓嬭浇.xlsx'; // 涓嬭浇鐨勬枃浠跺悕 + const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }); + const a = document.createElement('a'); + const url = window.URL.createObjectURL(blob); + a.href = url; + a.download = filename; + a.style.display = 'none'; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + window.URL.revokeObjectURL(url); + + // const filename = '涓嬭浇.xlsx'; // 涓嬭浇鐨勬枃浠跺悕 + // const blob = new Blob([response.data], { type: 'application/vnd.ms-excel' }); + // + // const url = window.URL.createObjectURL(blob); + // const link = document.createElement('a'); + // link.href = url; + // link.setAttribute('download', filename); + // document.body.appendChild(link); + // link.click(); + // document.body.removeChild(link); + // URL.revokeObjectURL(url); }) + } }; }, diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue index 12158d7..0aae92f 100644 --- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue +++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue @@ -83,10 +83,12 @@ // console.log(this.$route) console.log(this.idData) getTreeList({'conditionMap[id]':this.idData }).then(res=>{ + console.log(res) this.Treedata=res.data + const [firstProperty] = res.data; this.ModifyProperties(this.Treedata, 'text', 'label'); - this.codeClassifyOid=res.data[0].oid; - this.coderuleoid=res.data[0].attributes.coderuleoid; + this.codeClassifyOid=firstProperty.oid; + this.coderuleoid=firstProperty.attributes.coderuleoid; this.$emit("coderuleoid", this.coderuleoid ) }).catch(res=>{ console.log(res) @@ -137,7 +139,7 @@ } this.tableHeadDataFateher = res.data; this.templateOids = res.data.tableDefineVO.oid; - let List = res.data.tableDefineVO.cols[0]; + const [List] = res.data.tableDefineVO.cols; List.forEach(item => { let columnItem = { label: item.title, diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue index b928062..24b66f7 100644 --- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue +++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue @@ -1588,7 +1588,10 @@ this.isShowformulaEdit = true; }else if(column.property == 'enumString'){ this.enumVisible=true; - this.tableData=JSON.parse(this.CurrentCell.enumString) + if(this.attrSelectList[0].enumString != ""){ + this.tableData=JSON.parse(this.attrSelectList[0].enumString) + return + } }else if(column.property == 'parentCode'){ gridCodeClassifyTemplateAttr({ 'conditionMap[classifyTemplateOid]': this.Formlist[0].oid, @@ -1632,7 +1635,11 @@ this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬�') } else if (this.attrSelectList.length === 1) { this.enumVisible = true; - this.tableData=JSON.parse(this.attrSelectList[0].enumString) + if(this.attrSelectList[0].enumString != ""){ + this.tableData=JSON.parse(this.attrSelectList[0].enumString) + return + } + } }, enumBeforeClose(done){ diff --git a/Source/UBCS-WEB/vue.config.js b/Source/UBCS-WEB/vue.config.js index ad43a75..8ee6cb6 100644 --- a/Source/UBCS-WEB/vue.config.js +++ b/Source/UBCS-WEB/vue.config.js @@ -29,7 +29,11 @@ target: 'http://localhost:37000', // target: 'http://192.168.1.51:37000', // target: 'http://192.168.1.46:37000', +<<<<<<< HEAD + target: 'http://dev.vci-tech.com:37000', +======= // target: 'http://dev.vci-tech.com:37000', +>>>>>>> ddc9d8eabf96d9fa59b37b1734050d72cf7afff8 // target: 'http://192.168.1.51:37000/', // target: 'http://192.168.1.104:37000', // target: 'http://192.168.1.63:37000', -- Gitblit v1.9.3