From 08038c5e370af58687e69cda44af1b99f177f5ef Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 03 八月 2023 10:51:13 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 83 ++++++++++++++++++++++++++++------------- 1 files changed, 56 insertions(+), 27 deletions(-) diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue index 21d4327..1e6c015 100644 --- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue @@ -17,7 +17,16 @@ </el-button> <el-input v-model="WupinFindValue" placeholder="璇疯緭鍏ュ叧閿瓧鎸夊洖杞︽煡璇�" size="small" style="width: 180px; margin-left: 5px; margin-top: 10px" - @keyup.enter.native="tableFindInp" v-if="tableData.length != 0"></el-input> + @keyup.enter.native="tableFindInp" v-if="tableHeadFindData.length > 0"></el-input> + <span style="margin-left: 10px" v-if="tableHeadFindData.length > 0"> + <p style="font-size: 13px;display: inline-block;"> 鐘舵�侊細</p> + <el-select v-model="statusSelect" slot="prepend" placeholder="璇烽�夋嫨" size="small" @change="cellSelectHandler"> + <el-option label="鍏ㄩ儴" value="all"></el-option> + <el-option label="宸插彂甯�" value="Released"></el-option> + <el-option label="缂栬緫涓�" value="Editing"></el-option> + <el-option label="宸插仠鐢�" value="Disabled"></el-option> + <el-option label="瀹℃牳涓�" value="Auditing"></el-option> + </el-select></span> </div> <el-table ref="dataTable" v-loading="isLoading" :data="tableData" :height="tableHeight" @@ -54,13 +63,13 @@ :type="edit" :visible.sync="DataVisible"></FormTemplateDialog> <!-- 鍙戝竷--> - <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow"></set-personnel> + <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow" @onLoad="onLoad"></set-personnel> <!-- 鍋滅敤--> - <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleDeactivate"></set-personnel> + <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleDeactivate" @onLoad="onLoad"></set-personnel> <!-- 鍚敤--> - <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleEnable"></set-personnel> + <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleEnable" @onLoad="onLoad"></set-personnel> <!-- 鍥炴敹--> - <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleRecovery"></set-personnel> + <set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleRecovery" @onLoad="onLoad"></set-personnel> <!-- 楂樼骇鏌ヨ--> <advanced-query :options="this.options" :visible.sync="findvisible" @echoContion="echoContion"></advanced-query> @@ -156,6 +165,7 @@ }, data() { return { + statusSelect:"all", searchResults: [], //棣栭〉鍙充晶鎼滅储 WupinFindValue: "", @@ -234,11 +244,14 @@ hasDownload: true, hasUpload: true, height: 100 - } + }, + result:'' }; }, computed: {}, created() { + const index = this.$route.query.id.indexOf('@name=') + '@name='.length; + this.result = this.$route.query.id.substring(index); }, mounted() { }, @@ -311,6 +324,26 @@ } }, methods: { + //鐘舵�佹悳绱� + cellSelectHandler(row){ + if(row === 'all'){ + this.cellStatusFind() + }else { + this.cellStatusFind(row) + } + }, + cellStatusFind(lcstatus){ + TableData({ + templateOid: this.templateOid, + codeClassifyOid: this.codeClassifyOid, + page: this.page.currentPage, + limit: this.page.pageSize, + 'conditionMap[lcstatus]':lcstatus + }).then(res=>{ + console.log(res) + this.tableData=res.data.data + }) + }, //灞曞紑闄勪欢 handleCollapse(activeNames) { if (activeNames.length > 0) { @@ -386,24 +419,24 @@ processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { if (res.data.data.records && res.data.data.records.length!=0) { this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; + this.parameter.template = this.userName + '-鐢宠['+this.result+'-' + this.selectRow[0].name + ']'; this.parameter.type = 'PUBLIC'; this.parameter.code=this.templateOid this.title = '娴佺▼瀹℃壒' this.visibleFlow = true; - this.onLoad() } else { this.$confirm('褰撳墠鍒嗙被娌℃湁娣诲姞娴佺▼妯℃澘锛屾槸鍚︿笉鐢ㄦ祦绋嬪鎵圭洿鎺ユ墽琛�?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; - this.parameter.type = 'PUBLIC' - this.title = '娴佺▼瀹℃壒' - this.visibleFlow = true; - this.onLoad() + const oid = this.selectRow.map(obj => obj.oid).join(","); + changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Released' }).then(res => { + if(res.data.code == 200 ){ + this.$message.success('鍙戝竷鎴愬姛') + this.onLoad() + } + }); }).catch(() => { this.$message({ type: 'info', @@ -436,7 +469,7 @@ processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { if (res.data.records != [] && res.data.data.records.length!=0) { this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + "鍋滅敤" + "[鐗╁搧]"; + this.parameter.template = this.userName + '-鍋滅敤['+this.result+'-' + this.selectRow[0].name + ']'; this.parameter.type = 'DISABLE'; this.parameter.code=this.templateOid this.title = '鍋滅敤锛堝喕缁擄級缂栫爜鏁版嵁' @@ -449,10 +482,8 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - const index = this.$route.query.id.indexOf('@'); - const result = this.$route.query.id.substring(0, index); const oid = this.selectRow.map(obj => obj.oid).join(","); - changeStatus({ oid: oid, btmname: result, lcStatus: 'Disabled' }).then(res => { + changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Disabled' }).then(res => { if(res.data.code == 200 ){ this.$message.success('鍋滅敤鎴愬姛') this.onLoad() @@ -489,7 +520,7 @@ if (res.data.data.records && res.data.data.records.length!=0) { this.parameter=res.data.data.records[0] this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + "鍚敤" + "[鐗╁搧]"; + this.parameter.template = this.userName + '-鍚敤['+this.result+'-' + this.selectRow[0].name + ']'; this.parameter.type = 'Released'; this.parameter.code=this.templateOid this.title = '鍚敤缂栫爜鏁版嵁' @@ -502,10 +533,8 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - const index = this.$route.query.id.indexOf('@'); - const result = this.$route.query.id.substring(0, index); const oid = this.selectRow.map(obj => obj.oid).join(","); - changeStatus({ oid: oid, btmname: result, lcStatus: 'Released' }).then(res => { + changeStatus({ oid: oid, btmname: this.result, lcStatus: 'Released' }).then(res => { if(res.data.code == 200 ){ this.$message.success('鍚敤鎴愬姛') this.onLoad() @@ -548,7 +577,7 @@ processTS({ templateId: this.templateOid, buttonTypeKey: 'PUBLIC' }).then(res => { if (res.data.records != [] && res.data.data.records.length!=0) { this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + "鍥炴敹" + "[鐗╁搧]"; + this.parameter.template = this.userName + '-鍥炴敹['+this.result+'-' + this.selectRow[0].name + ']'; this.parameter.type = 'TakeBack'; this.parameter.code=this.templateOid this.title = '鍥炴敹缂栫爜鏁版嵁' @@ -561,10 +590,8 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - const index = this.$route.query.id.indexOf('@'); - const result = this.$route.query.id.substring(0, index); const oid = this.selectRow.map(obj => obj.oid).join(","); - changeStatus({ oid: oid, btmname: result, lcStatus: 'TakeBack' }).then(res => { + changeStatus({ oid: oid, btmname: this.result, lcStatus: 'TakeBack' }).then(res => { if(res.data.code == 200 ){ this.$message.success('鍥炴敹鎴愬姛') this.onLoad() @@ -579,9 +606,11 @@ } } }); - } else if (this.selectRow.length >=1 && !(disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) { + } else if (showMessage && this.selectRow.length >1 && !(disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0)) { this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹叏閮ㄤ负銆愬仠鐢ㄧ姸鎬佹垨鍙戝竷鐘舵�併�戞墠鍙互鍙戣捣娴佺▼'); showMessage = false; + }else if(showMessage){ + this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹负銆愬仠鐢ㄧ姸鎬佹垨鍙戝竷鐘舵�併�戞墠鍙互鍙戣捣娴佺▼') } }); } -- Gitblit v1.9.3