From 829bfe3e8376f20f90a4b2361c9a8c3ed0e80d45 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期三, 06 十二月 2023 17:21:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue | 55 +++++++------
Source/UBCS-WEB/src/views/system/menu.vue | 3
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 71 ++++++++++-------
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 56 +++++++------
Source/UBCS-WEB/src/util/func.js | 44 +++++-----
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | 9 +
6 files changed, 131 insertions(+), 107 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
index d583d02..8c34f98 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -240,6 +240,7 @@
let slotColumnList = [];
formItemList.forEach((formItem) => {
formItem = this.resetFormConfig(formItem);
+ console.log(formItem)
//灞炴�х爜娈佃鍒�
if (formItem.secType === "codeattrsec") {
this.attrList.push(formItem);
@@ -247,6 +248,7 @@
//绯诲垪鍙疯鍒�
if (formItem.field === "codeStandardEditType") {
if (this.status === "amend") {
+ console.log("formItem-amend",formItem)
formItem.readOnly = true;
}
}
@@ -296,8 +298,8 @@
this.codeattrsecValue = val.value;
return;
}
- //鏄惁绯诲垪-绯诲垪鍙�
- if (val.column.field === "isSeries") {
+ //淇涓�-绯诲垪鍙�
+ if (val.column.field === "reviseSeries") {
if (val.value === "false") {
this.isShow = true;
} else {
@@ -323,7 +325,8 @@
field: formItem.field,
type: this.columnType[formItem.type],
dicData: this.getDataList(formItem.type, formItem.data),
- disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false),
+ disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false) ||
+ (this.status === 'amend' ? (formItem.field === "reviseSeries" ? (formItem.value == 'false' ? true : false) : false) : false),
prepend: this.preOrSufFixShow("text", formItem.prefix),
append: this.preOrSufFixShow("text", formItem.suffix),
prefixIcon: this.preOrSufFixShow("icon", formItem.prefix),
diff --git a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
index 7ddabc7..6c7c8d5 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -120,6 +120,22 @@
mounted() {
},
methods: {
+ handlerFile(res){
+ let reader = new FileReader();
+ reader.readAsText(res.data);
+ reader.onload = (result) =>{
+ try {
+ let resData = JSON.parse(result.target.result); // 瑙f瀽瀵硅薄鎴愬姛
+ if (resData.code != 200) {
+ this.$message.error(resData.msg);
+ }
+ } catch (err) {
+ // console.log("err",err)// 瑙f瀽鎴愬璞″け璐ワ紝璇存槑鏄甯哥殑鏂囦欢娴�
+ func.downloadFileByBlobHandler(res);
+ this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�');
+ }
+ };
+ },
escHandler() {
this.$emit('update:visible', false);
this.value = [];
@@ -157,11 +173,8 @@
'conditionMap[oid]': this.ids, ...this.exportArrTwo,
limit: -1
}).then(res => {
- // console.log('res',res)
- if (res) {
- func.downloadFileByBlobHandler(res);
- this.escHandler()
- }
+ this.handlerFile(res);
+ this.escHandler();
})
} else {
@@ -170,10 +183,9 @@
'conditionMap[oid]': this.ids, ...this.exportArr
}).then(res => {
// console.log('res',res)
- if (res) {
- func.downloadFileByBlobHandler(res);
- this.escHandler()
- }
+ this.handlerFile(res);
+ this.escHandler();
+
})
}
@@ -185,19 +197,15 @@
this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
});
exportCode({codeClassifyOid: this.codeClassifyOid, ...this.exportArrTwo, limit: -1}).then(res => {
- // console.log('res',res)
if (res) {
func.downloadFileByBlobHandler(res);
- this.escHandler()
+ this.escHandler();
}
})
} else {
exportCode({codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: -1}).then(res => {
- // console.log('res',res)
- if (res) {
- func.downloadFileByBlobHandler(res);
- this.escHandler()
- }
+ this.handlerFile(res);
+ this.escHandler();
})
}
} else if (this.radio === 2) {
@@ -233,10 +241,9 @@
endPage: end
}).then((res) => {
// console.log('res',res)
- if (res) {
- func.downloadFileByBlobHandler(res);
- this.escHandler()
- }
+ this.handlerFile(res);
+ this.escHandler();
+
});
} else {
this.tableHeadData.map(item => item.prop)
@@ -249,11 +256,9 @@
page: start,
endPage: end
}).then(res => {
- // console.log('res',res)
- if (res) {
- func.downloadFileByBlobHandler(res);
- this.escHandler()
- }
+ console.log('res',res)
+ this.handlerFile(res);
+ this.escHandler();
})
}
}
diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
index 3d3ea21..80377c8 100644
--- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -99,8 +99,8 @@
</FormTemplateDialog>
<!-- 淇-->
<FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
- :disabledProp="disabledProp" :templateOid="templateOid" :title="'鏁版嵁淇'"
- :visible.sync="amendvisible" status="amend" :selectRow="selectRow"
+ :disabledProp="disabledProp" :selectRow="selectRow" :templateOid="templateOid"
+ :title="'鏁版嵁淇'" :visible.sync="amendvisible" status="amend"
type="add" @submit="amendSumbit"></FormTemplateDialog>
<!-- 鏂板-->
<FormTemplateDialog :TreeValue="TreeValue" :codeClassifyOid="this.codeClassifyOid"
@@ -111,9 +111,9 @@
</FormTemplateDialog>
<!-- 淇敼-->
<FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
- :disabledProp="disabledProp" :templateOid="templateOid" :title="'淇敼缂栫爜淇℃伅'"
+ :disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid"
+ :title="'淇敼缂栫爜淇℃伅'"
:visible.sync="editvisible"
- :rowOid="rowOid"
type="edit" @submit="EditSumbit"></FormTemplateDialog>
<!-- 鎵归噺缂栬緫-->
<!-- <MasterEditBulk :visible.sync="bulkeditvisible" ></MasterEditBulk>-->
@@ -393,9 +393,9 @@
this.doLayout()
},
watch: {
- isLoading:{
- handler(newval){
- console.log(newval)
+ isLoading: {
+ handler(newval) {
+ // console.log(newval)
}
},
tableHeadDataFateher: {
@@ -500,6 +500,7 @@
}
},
cellStatusFind(lcstatus) {
+ this.isLoading = true;
TableData({
templateOid: this.templateOid,
codeClassifyOid: this.codeClassifyOid,
@@ -507,7 +508,10 @@
limit: this.page.pageSize,
'conditionMap[lcstatus]': lcstatus
}).then(res => {
- this.tableData = res.data.data
+ // console.log(res)
+ this.tableData = res.data.data;
+ this.page.total = res.data.total;
+ this.isLoading = false;
})
},
//灞曞紑闄勪欢
@@ -563,27 +567,36 @@
if (uniqueFlag === 'importGroupCode') return this.importGroupCode("groupCode")
});
},
- importGroupCode(type){
+ importGroupCode(type) {
this.batchImportData.visible = true
this.batchImportData.type = type
this.batchImportData.codeClassifyOid = this.codeClassifyOid
},
//闆嗗洟鐮佸鍑�
- excelGroupCode(){
+ excelGroupCode() {
this.isLoading = true;
exportGroupCodeExcel({
codeClassifyOid: this.codeClassifyOid,
}).then(res => {
- console.log(res.data)
- if (res) {
- func.downloadFileByBlobHandler(res);
- this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�');
- this.isLoading = false;
- }
- }).catch(error=>{
- this.$message.error(error);
- this.isLoading = false;
- })
+ let reader = new FileReader();
+ reader.readAsText(res.data)
+ reader.onload = (result) =>{
+ try {
+ let resData = JSON.parse(result.target.result); // 瑙f瀽瀵硅薄鎴愬姛
+ if (!resData.success) {
+ console.log("resData",resData)
+ this.$message.error(resData.msg);
+ this.isLoading = false;
+ }
+ } catch (err) {
+ // console.log("err",err)// 瑙f瀽鎴愬璞″け璐ワ紝璇存槑鏄甯哥殑鏂囦欢娴�
+ func.downloadFileByBlobHandler(res);
+ this.$message.success('涓嬭浇鎴愬姛锛岃鏌ョ湅锛�');
+ this.isLoading = false;
+ }
+ };
+
+ });
},
//鏍囧噯鐢宠
codeApplyHandler() {
@@ -624,7 +637,7 @@
}
});
if (foundItem) {
- if(this.selectRow.length >= 1){
+ if (this.selectRow.length >= 1) {
this.$confirm('宸叉湁鍙傜収鏄惁鍙栨秷鍕鹃�夌户缁墽琛岋紵', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -640,7 +653,7 @@
message: '宸插彇娑堝綋鍓嶆搷浣�'
});
});
- }else {
+ } else {
this.amendvisible = true;
}
} else {
@@ -658,9 +671,9 @@
this.$message.warning('褰撳墠閫夋嫨鐨勫垎绫讳笉鏄彾瀛愯妭鐐癸紝涓嶅厑璁告壒閲忕紪杈戯紒')
return;
}
- this.batchImportData.visible = true
- this.batchImportData.type = type
- this.batchImportData.codeClassifyOid = this.codeClassifyOid
+ this.batchImportData.visible = true
+ this.batchImportData.type = type
+ this.batchImportData.codeClassifyOid = this.codeClassifyOid
},
addSaveHandler() {
this.$nextTick(() => {
@@ -1061,10 +1074,7 @@
},
//杈撳叆鍥炶溅鎼滅储
tableFindInp() {
- /*if (this.WupinFindValue.trim() === '') {
- this.$message.warning('杈撳叆鍊间笉鑳戒负绌�')
- return;
- }*/
+ this.isLoading = true;
TableData({
templateOid: this.templateOid,
codeClassifyOid: this.codeClassifyOid,
@@ -1073,7 +1083,8 @@
['conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*'
}).then(res => {
this.tableData = res.data.data;
- // this.page.total = res.data.data.total;
+ this.page.total = res.data.total;
+ this.isLoading = false;
})
}
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 72f90ae..8cbc96c 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -2,45 +2,44 @@
<template>
<el-container>
<!-- 宸︿晶鑿滃崟-->
- <el-aside>
+ <el-aside style="width: 20%;">
<basic-container>
- <div>
- <div>
- <div style="display: flex; flex-direction: column;">
- <div style="display: flex;justify-content: space-around">
+ <el-collapse accordion>
+ <el-collapse-item style="padding-left: 3px;">
+ <template slot="title">
+ <div style="display: flex;justify-content: space-around;">
<el-button v-if="permissionList.TreeAddStatus" plain size="mini" type="primary" @click="TreeAdd">娣诲姞
</el-button>
<el-button v-if="permissionList.TreeEditStatus" plain size="mini" type="primary" @click="TreeEdit">淇敼
</el-button>
<el-button v-if="permissionList.TreeDelStatus" plain size="mini" type="primary" @click="TreeDel">鍒犻櫎
</el-button>
- </div>
- <div style="display: flex; margin-top: 10px;justify-content: space-around">
<el-button v-if="permissionList.flushedStatus" plain size="mini" type="primary" @click="flushed">鍒锋柊
</el-button>
- <el-button v-if="permissionList.EnableStatus" plain size="mini" type="primary" @click="Enable">鍚敤
- </el-button>
- <el-button v-if="permissionList.DeactivateStatus" plain size="mini" type="primary" @click="Deactivate">
- 鍋滅敤
- </el-button>
</div>
- <div style="display: flex; margin-top: 10px;justify-content: space-around">
- <el-button v-if="permissionList.ImportExcelStatus" plain size="mini" type="primary"
- @click.native="ImportExcel">瀵煎叆
- </el-button>
- <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary"
- @click="ExportExcel">瀵煎嚭
- </el-button>
- <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary"
- @click="testHandler">娴嬭瘯
- </el-button>
- </div>
+ </template>
+ <div>
+ <el-button v-if="permissionList.EnableStatus" plain size="mini" type="primary" @click="Enable">鍚敤
+ </el-button>
+ <el-button v-if="permissionList.DeactivateStatus" plain size="mini" type="primary" @click="Deactivate">
+ 鍋滅敤
+ </el-button>
+ <el-button v-if="permissionList.ImportExcelStatus" plain size="mini" type="primary"
+ @click.native="ImportExcel">瀵煎叆
+ </el-button>
+ <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary"
+ @click="ExportExcel">瀵煎嚭
+ </el-button>
</div>
- <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px">
+ <div style="margin-top: 10px;margin-bottom: 10px">
+ <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" @click="testHandler">娴佹按澶勭悊
+ </el-button>
</div>
- </div>
+ </el-collapse-item>
+ </el-collapse>
+
<!-- 宸︿晶鏍�-->
- <div style="height: calc(100vh - 230px);overflow: auto;">
+ <div style="height: calc(100vh - 194px);overflow: auto;">
<avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata"
:defaultExpandAll="false"
:option="Treeoption"
@@ -107,7 +106,6 @@
:nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed"
@referTreeForm="referTreeForm"></classifyTreeform>
</el-dialog>
- </div>
</basic-container>
</el-aside>
<el-main>
@@ -439,6 +437,7 @@
name: "classifyTrees.vue",
data() {
return {
+ activeName: 'first',
masterRow: null,
AddLoading: false,
// 瀹氫箟涓�涓彉閲忔潵淇濆瓨鏍戣姹傜殑鏁伴噺
@@ -885,6 +884,9 @@
created() {
},
methods: {
+ handleTabClick(){
+
+ },
testHandler(){
if(this.nodeClickList.length <=0 ){
this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒')
diff --git a/Source/UBCS-WEB/src/util/func.js b/Source/UBCS-WEB/src/util/func.js
index 78bd256..9d6d017 100644
--- a/Source/UBCS-WEB/src/util/func.js
+++ b/Source/UBCS-WEB/src/util/func.js
@@ -75,8 +75,8 @@
/**
* ts鏃ユ湡鏍煎紡澶勭悊
- * @param {瑕佸鐞嗙殑鏃ユ湡} thisDate
- * @returns
+ * @param {瑕佸鐞嗙殑鏃ユ湡} thisDate
+ * @returns
*/
static formattedDateTime(thisDate) {
const date = new Date(thisDate);
@@ -133,20 +133,22 @@
* @returns {Boolean}
*/
static downloadFileByBlobHandler(res) {
- const fileNames = res.headers['content-disposition'].split(";");
- let characterSet = fileNames[2].split("filename*=")[1];
- let fileName = decodeURI(fileNames[1].split("filename=")[1],characterSet); // 涓嬭浇鐨勬枃浠跺悕
- let blob = new Blob([res.data], {
- type: res.data.type + ";charset=utf-8",
- });
- const url = URL.createObjectURL(blob); // 鐢熸垚涓嬭浇閾炬帴
- const link = document.createElement("a");
- link.href = url;
- link.download = fileName; // 鎸囧畾鏂囦欢鍚嶅拰鏍煎紡
- document.body.appendChild(link); // 娣诲姞涓嬭浇閾炬帴鍒伴〉闈�
- link.click(); // 瑙﹀彂涓嬭浇
- document.body.removeChild(link); //鍒犻櫎涓嬭浇
- window.URL.revokeObjectURL(url); //閲婃斁鎺塨lob瀵硅薄
+ if(res.headers['content-disposition']){
+ const fileNames = res.headers['content-disposition'].split(";");
+ let characterSet = fileNames[2].split("filename*=")[1];
+ let fileName = decodeURI(fileNames[1].split("filename=")[1],characterSet); // 涓嬭浇鐨勬枃浠跺悕
+ let blob = new Blob([res.data], {
+ type: res.data.type + ";charset=utf-8",
+ });
+ const url = URL.createObjectURL(blob); // 鐢熸垚涓嬭浇閾炬帴
+ const link = document.createElement("a");
+ link.href = url;
+ link.download = fileName; // 鎸囧畾鏂囦欢鍚嶅拰鏍煎紡
+ document.body.appendChild(link); // 娣诲姞涓嬭浇閾炬帴鍒伴〉闈�
+ link.click(); // 瑙﹀彂涓嬭浇
+ document.body.removeChild(link); //鍒犻櫎涓嬭浇
+ window.URL.revokeObjectURL(url); //閲婃斁鎺塨lob瀵硅薄
+ }
}
/**
@@ -166,9 +168,9 @@
/**
* 灏嗘暟缁勪腑鐨勫睘鎬ф嫾鎺ユ垚瀛楃涓�
- * @param {鏁扮粍} array
- * @param {灞炴� attr
- * @returns
+ * @param {鏁扮粍} array
+ * @param {灞炴� attr
+ * @returns
*/
static joinedString(array,attr) {
return array.reduce((accumulator, item) => {
@@ -178,8 +180,8 @@
/**
* 姣斿鏁扮粍涓殑瀵硅薄鐨勬煇涓睘鎬ф槸鍚﹀叏閮ㄤ竴鑷�
- * @param {鏁扮粍} array
- * @param {灞炴� attr
+ * @param {鏁扮粍} array
+ * @param {灞炴� attr
* @returns 涓�鑷磋繑鍥瀎asle,涓嶄竴鑷磋繑鍥瀟rue
*/
static isAttrInconsistent(array,attr) {
diff --git a/Source/UBCS-WEB/src/views/system/menu.vue b/Source/UBCS-WEB/src/views/system/menu.vue
index e30bf08..aa5702d 100644
--- a/Source/UBCS-WEB/src/views/system/menu.vue
+++ b/Source/UBCS-WEB/src/views/system/menu.vue
@@ -55,6 +55,8 @@
</avue-crud>
<!-- 浠庡叾浠栬彍鍗曞厠闅嗘寜閽� -->
<el-dialog :visible.sync="cloneOtherMenuButtons.cloneButtonSettingBox"
+ class="avue-dialog avue-dialog--top"
+ top="0"
append-to-body
style="height: 110vh; margin-top: -10vh;"
title="浠庡叾浠栬彍鍗曞厠闅嗘寜閽�"
@@ -295,7 +297,6 @@
cloneButtonSettingBox: false,
selectCloneButtons: [],
cloneOption: {
- height: "auto",
menu: false,
header: false,
addBtn: false,
--
Gitblit v1.9.3