From 617b1344c9788eea6b4260d2251501b1e3e86f7c Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 26 十月 2023 17:17:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/views/code/code.vue | 141 +++++++++++++++++++++++++--------------------- 1 files changed, 77 insertions(+), 64 deletions(-) diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue index 942065e..7c5fa1f 100644 --- a/Source/UBCS-WEB/src/views/code/code.vue +++ b/Source/UBCS-WEB/src/views/code/code.vue @@ -1,5 +1,5 @@ <template> - <basic-container class="code-total" style="height: 100%"> + <basic-container class="code-total" style=" height: 100%"> <!-- 缂栫爜瑙勫垯淇℃伅灞曠ず鍖哄煙 --> <basic-container class="code-rule-container"> <p @@ -36,8 +36,7 @@ > <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� --> <template slot="menu" slot-scope="scope"> - <el-button - v-show="scope.row.lcStatus == 'Editing' ? true : false" + <el-button v-if="permissionList.editBtn && (scope.row.lcStatus == 'Editing' ? true : false)" icon="el-icon-edit" plain size="small" @@ -45,8 +44,7 @@ @click="openEdit(scope.row)" >缂� 杈� </el-button> - <el-button - v-show="scope.row.lcStatus == 'Editing' ? true : false" + <el-button v-if="permissionList.releaseBtn && (scope.row.lcStatus == 'Editing' ? true : false)" :loading="releadDisabled" icon="el-icon-position" plain @@ -55,8 +53,7 @@ @click="enableOrDeactivatse(scope.row.oid, 'release')" >鍙� 甯� </el-button> - <el-button - v-show="scope.row.lcStatus == 'Released' ? true : false" + <el-button v-if="permissionList.deactivateBtn && (scope.row.lcStatus == 'Released' ? true : false)" icon="el-icon-video-pause" plain size="small" @@ -64,8 +61,7 @@ @click="enableOrDeactivatse(scope.row.oid, 'disable')" >鍋� 鐢� </el-button> - <el-button - v-show="scope.row.lcStatus == 'Disabled' ? true : false" + <el-button v-if="permissionList.enableBtn && (scope.row.lcStatus == 'Disabled' ? true : false)" icon="el-icon-video-play" plain size="small" @@ -76,7 +72,7 @@ </template> <!-- 琛ㄦ牸涓婃柟鎸夐挳鍖哄煙 --> <template slot="menuLeft" slot-scope="scope"> - <el-button + <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" @@ -85,16 +81,15 @@ > 鍒� 闄� </el-button> - <el-button + <el-button v-if="permissionList.advancedQueryBtn" icon="el-icon-search" plain size="small" type="primary" - @click="openAdvancedQuery('codeRule')" - > + @click="openAdvancedQuery('codeRule')"> 楂樼骇鏌ヨ </el-button> - <el-button + <el-button v-if="permissionList.cloneBtn" icon="icon-kelong" plain size="small" @@ -102,7 +97,7 @@ > 鍏� 闅� </el-button> - <el-button + <el-button v-if="permissionList.otherCloneBtn" icon="icon-lianjiekelong" plain size="small" @@ -111,7 +106,7 @@ > 浠庡叾浠栬鍒欎腑鍏嬮殕鐮佹 </el-button> - <el-button + <el-button v-if="permissionList.usescopeBtn" icon="el-icon-s-help" plain size="small" @@ -119,7 +114,7 @@ > 浣跨敤鑼冨洿 </el-button> - <el-button + <el-button v-if="permissionList.clearBtn" icon="icon-qingkong" plain size="small" @@ -127,7 +122,7 @@ > 娓呯┖鐮佸�� </el-button> - <el-button + <el-button v-if="permissionList.escapeOwnerBtn" icon="el-icon-guide" plain size="small" @@ -135,7 +130,7 @@ > 杞Щ鎵�鏈夎�� </el-button> - <el-button + <el-button v-if="permissionList.maxSerialnumBtn" icon="el-icon-data-analysis" plain size="small" @@ -223,14 +218,11 @@ <!-- 鍩虹鐮佹灞曠ず鍖哄煙 --> <basic-container class="code-basicsec-container"> <p - style=" - margin-top: -5px; + style="margin-top: -5px; margin-bottom: 4px; font-weight: 570; font-size: 19px; - color: #0e2d5f; - " - > + color: #0e2d5f;"> 鐮佹绠$悊 </p> <avue-crud @@ -248,8 +240,7 @@ > <!-- 鍩虹鐮佹琛ㄦ牸鍐呮搷浣滄寜閽� --> <template slot="menu" slot-scope="scope"> - <el-button - v-show="currentRuleLcStatus != 'Editing'" + <el-button v-if="permissionList.basicViewBtn && (currentRuleLcStatus != 'Editing')" icon="el-icon-view" plain size="small" @@ -257,8 +248,7 @@ @click="openBasicDialog('view', scope.row)" >鏌ョ湅 </el-button> - <el-button - v-show="currentRuleLcStatus === 'Editing'" + <el-button v-if="permissionList.basicEditBtn && (currentRuleLcStatus === 'Editing')" icon="el-icon-edit" plain size="small" @@ -266,11 +256,7 @@ @click="openBasicDialog('edit', scope.row)" >缂栬緫 </el-button> - <el-button - v-show=" - scope.row.secType === 'codeclassifysec' || - scope.row.secType == 'codefixedsec' - " + <el-button v-if="permissionList.basicMgrBtn && (scope.row.secType === 'codeclassifysec' || scope.row.secType == 'codefixedsec')" icon="el-icon-setting" plain size="small" @@ -278,8 +264,7 @@ @click="openBasicSecCodeValueMgr(scope.row)" >鐮佸�肩鐞� </el-button> - <el-button - v-show="scope.row.orderNum > 1" + <el-button v-if="permissionList.basicMoveupBtn && (scope.row.orderNum > 1)" icon="el-icon-arrow-up" plain size="small" @@ -287,7 +272,7 @@ @click="upOrderNum(scope.row)" >涓婄Щ </el-button> - <el-button + <el-button v-if="permissionList.basicDownBtn" icon="el-icon-arrow-down" plain size="small" @@ -299,7 +284,7 @@ <!-- 鍩虹鐮佹琛ㄦ牸宸︿笂鏂规寜閽尯鍩� --> <template slot="menuLeft" slot-scope="scope"> - <el-button + <el-button v-if="permissionList.basicAddBtn" :disabled="selectionList.length <= 0" icon="el-icon-plus" size="small" @@ -308,7 +293,7 @@ > 鏂� 澧� </el-button> - <el-button + <el-button v-if="permissionList.basicDeleteBtn" :disabled="selectionList.length <= 0" icon="el-icon-delete" plain @@ -318,7 +303,7 @@ > 鍒� 闄� </el-button> - <el-button + <el-button v-if="permissionList.basicAdvancedQueryBtn" :disabled="selectionList.length <= 0" icon="el-icon-search" plain @@ -1324,6 +1309,7 @@ export default { data() { return { + crudOption:{...optionRule}, ruleForm: {}, query: {}, loading: true, @@ -1586,10 +1572,30 @@ ...mapGetters(["permission"]), permissionList() { return { - addBtn: this.vaildData(this.permission.codeRule_add, true), - viewBtn: this.vaildData(this.permission.codeRule_view, false), - delBtn: this.vaildData(this.permission.plCodeRule_delete, false), - editBtn: this.vaildData(this.permission.codeRule_edit, true), + // 缂栫爜瑙勫垯鐩稿叧鎸夐挳 + addBtn: this.vaildData(this.permission.code_rule.code_rule_add, false), + viewBtn: this.vaildData(this.permission.code_rule.code_rule_view, false), + delBtn: this.vaildData(this.permission.code_rule.code_rule_delete, false), + editBtn: this.vaildData(this.permission.code_rule.code_rule_edit, false), + deactivateBtn: this.vaildData(this.permission.code_rule.code_rule_deactivate, false), + enableBtn: this.vaildData(this.permission.code_rule.code_rule_enable, false), + releaseBtn: this.vaildData(this.permission.code_rule. code_rule_release, false), + advancedQueryBtn: this.vaildData(this.permission.code_rule.code_rule_advanced_query, false), + cloneBtn: this.vaildData(this.permission.code_rule.code_rule_clone, false), + otherCloneBtn: this.vaildData(this.permission.code_rule.code_rule_other_clone, false), + usescopeBtn: this.vaildData(this.permission.code_rule.code_rule_usescope, false), + clearBtn: this.vaildData(this.permission.code_rule.code_rule_clear, false), + escapeOwnerBtn: this.vaildData(this.permission.code_rule.code_rule_escape_owner, false), + maxSerialnumBtn: this.vaildData(this.permission.code_rule.code_rule_max_serialnum, false), + // 鍩虹鐮佹鐩稿叧鎸夐挳 + basicAddBtn: this.vaildData(this.permission.code_rule.code_basic_add, false), + basicDeleteBtn: this.vaildData(this.permission.code_rule.code_basic_delete, false), + basicAdvancedQueryBtn: this.vaildData(this.permission.code_rule.code_basic_advanced_query, false), + basicMgrBtn: this.vaildData(this.permission.code_rule.code_basic_mgr, false), + basicEditBtn: this.vaildData(this.permission.code_rule.code_basic_edit, false), + basicViewBtn: this.vaildData(this.permission.code_rule. code_basic_view, false), + basicMoveupBtn: this.vaildData(this.permission.code_rule.code_basic_moveup, false), + basicDownBtn: this.vaildData(this.permission.code_rule.code_basic_down, false), }; }, }, @@ -1646,11 +1652,11 @@ if (JSON.stringify(conditionMaps) != "{}") { if (this.advancedQueryParam.currentOpen == "codeRule") { this.query = conditionMaps; + // console.log(this.query); this.onLoad(this.page); } else { this.sendGridCodeBasicSec(conditionMaps, true); } - //console.log(conditionMaps); } }, /* 鍏紡缂栬緫妗嗗唴瀹规敼鍙�,瀛愮粍浠剁紪杈戝畬鍏紡涔嬪悗鍐呭鍥炴樉鏃惰皟鐢� */ @@ -1659,12 +1665,12 @@ }, /* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */ setReferConfigValue(content) { - // console.log(content.referTypeName); this.form.referBtmId = content.referType || ""; this.form.referBtmName = content.referTypeName || content.referType; //杞崲鎴怞SON瀛楃涓茶繘琛岀埗缁勪欢鍥炴樉 let submitFormJson = JSON.stringify(content); this.form.referConfig = submitFormJson || ""; + debugger; }, /** 寮曠敤鐮佹涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊间箣鍚庣殑鍐呭鍥炴樉鏃惰皟鐢� */ echoReferBtmType(content) { @@ -1676,7 +1682,6 @@ /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ /** 淇濆瓨褰撳墠鐖跺垎绫荤爜娈电殑閫変腑琛岋紝骞惰繘琛屽洖鏄� */ saveSelectedParentClassify() { - //console.log(this.parentClsfyParams.parentClassifySelectionList.length); if (this.parentClsfyParams.parentClassifySelectionList.length != 1) { this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�!"); return false; @@ -1744,7 +1749,6 @@ page.pageSize, conditionMaps ).then((res) => { - //console.log(res.data); const data = res.data.data; parentClsParam.parentClassifyDataPage.total = data.total; parentClsParam.parentClassifyData = data.records; @@ -1762,7 +1766,6 @@ /** 鍔犺浇鍒嗙被杩炴帴灞炴�ц〃鏍兼暟鎹� */ loadlistClassifyLinkAttr() { let attrParam = this.selectAttrParams; - //console.log(this.currentSelectTreeData); this.selectAttrParams.selectAttrOptionLoading = true; let conditionMaps = {}; if (attrParam.selectAttrQeury) { @@ -1780,7 +1783,6 @@ this.$nextTick(() => { this.$refs[attrParam.ref].doLayout(); }); - //console.log(data.data); this.selectAttrParams.selectAttrData = data.data; this.selectAttrParams.selectAttrOptionLoading = false; // 灏嗘悳绱㈡鍐呭缃┖ @@ -1850,13 +1852,11 @@ this.fixedValueOptionLoading = true; gridCodeFixedValue(1, -1, { codeFixedSecOid: row.oid }).then((res) => { this.fixedValueData = res.data.data.records; - //console.log(this.fixedValueData); this.fixedValueOptionLoading = false; }); }, /** 鍗曞嚮鍥哄畾鐮佹鐨勭爜鍊艰〃涓鏃惰Е鍙戠殑浜嬩欢*/ selectedCodeValueRow(row) { - //console.log(row); this.selectedFixedOrCodeclassifyValue = row; this.codeFixdForm.id = row.id; this.codeFixdForm.description = row.description; @@ -1892,7 +1892,6 @@ } this.codeClassifyForm.codeClassifySecOid = this.codefixedsecOrCodeclassifysec.oid; - // console.log(this.codeClassifyForm); addSaveCodeClassifyValue(this.codeClassifyForm).then( () => { this.loadClassifyValueData({ @@ -1917,7 +1916,6 @@ clearFixedOrClassifyForm(condition) { //鐐瑰嚮鍙栨秷鏃舵竻绌鸿〃鍗曚笌褰撳墠閫変腑鐨勭爜鍊硷紝骞剁鐢ㄦ寜閽� this.selectedFixedOrCodeclassifyValue = ""; - //console.log(condition); if (condition === "close") { this.codeFixdForm = this.$options.data().codeFixdForm; this.codeClassifyForm = this.$options.data().codeClassifyForm; @@ -2311,6 +2309,12 @@ queryField: "lcStatus", comboxKey: "codeSearchLCStatus", }, + { + data: [], + title: "鎵�鏈夎��", + fieldType: "text", + queryField: "ownerText", + }, ]; } else { this.advancedQueryParam.options = [ @@ -2470,7 +2474,6 @@ }, /** 娣诲姞*/ rowSave(row, done, loading) { - console.log(row); add(row).then( () => { this.onLoad(this.page); @@ -2546,7 +2549,7 @@ this.query = {}; this.onLoad(this.page); }, - // 缂栫爜瑙勫垯蹇�熸煡璇� + // 缂栫爜瑙勫垯蹇�熸煡璇earchChange searchChange(params, done) { this.page.currentPage = 1; // 澶氫釜conditionMap杩欐牱浼犲弬锛屽揩閫熸煡璇㈤粯璁ら噰鐢ㄦā绯婃煡璇� @@ -2559,6 +2562,11 @@ } this.query = requestData; this.onLoad(this.page, this.query); + // console.log( this.findObject(this.optionRule.column,'id')) + // console.log(this.crudOption.column[0]) + // this.crudOption.column && this.crudOption.column.length > 0 + // ? (this.crudOption.column[0].value = '') + // : null; done(); }, /** 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�*/ @@ -2596,7 +2604,11 @@ }, onLoad(page, params = {}) { this.loading = true; - gridCodeRule(page.currentPage, page.pageSize, params).then((res) => { + gridCodeRule( + page.currentPage, + page.pageSize, + Object.assign({},params,this.query), + ).then((res) => { //console.log(res.data); const data = res.data.data; this.page.total = data.total; @@ -2927,6 +2939,10 @@ if (!this.tipsMessage(this.selectionBasicList)) { return; } + if (this.selectionList.at(-1).lcStatus != "Editing") { + this.$message.warning('缂栫爜瑙勫垯鐘舵�佷笉鏄�"缂栬緫涓�"锛屼笉鍏佽鍒犻櫎鐮佹!'); + return; + } let oid = this.selectionBasicList[0].oid; this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", { confirmButtonText: "纭畾", @@ -3145,7 +3161,6 @@ }, /** 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴��*/ changeSectypeFormItems(row) { - //console.log(row); if ( func.isEmpty(this.enumParam.secTypeList) || this.enumParam.secTypeList.length == 0 @@ -3179,7 +3194,6 @@ componentCodeFlag: this.form.componentCodeFlag, //鏄惁鍙備笌缂栫爜 pkCodeRule: this.form.pkCodeRule, //鎵�灞炵紪鐮佽鍒� }; - //console.log(this.form); } if (this.form.secType === "codefixedsec") { //鍥哄畾鐮佹 @@ -3245,8 +3259,6 @@ ? row.customCodeSerialClass : "", //鑷畾涔夋祦姘寸畻娉� }); - console.log(this.form); - console.log(this.enumParam.codeFillType); this.loadCodeFillType(); this.loadCodeFillSeparator(); } else if (this.form.secType === "codelevelsec") { @@ -3292,7 +3304,6 @@ : "", //鏃ユ湡鏍煎紡 }); } else if (this.form.secType === "codeclassifysec") { - //console.log(this.form); //鍒嗙被鐮佹 this.form = Object.assign({}, this.form, { codeSecLengthType: @@ -3335,7 +3346,6 @@ this.loadCodeFillType(); this.loadCodeFillSeparator(); } - // console.log(this.form); }, /** 绗竴娆¤姹傜殑鏋氫妇鏁版嵁鏀剧紦瀛�*/ getLocalStorageEnum(enumKey) { @@ -3392,11 +3402,14 @@ }, // 鏈�澶ф祦姘村彿 maxSerialNum() { - console.log(this.selectionList); - if (this.selectionList.length === 0) { + if (this.selectionList.length <= 0) { this.$message.warning("璇烽�夋嫨涓�鏉$紪鐮佽鍒欙紒"); return; } + if(this.selectionList.length> 1){ + this.$message.warning("鍙兘閫夋嫨涓�鏉$紪鐮佽鍒欙紒"); + return; + } this.maxSerial.visible = true; this.maxSerial.ruleOid = this.selectionList[0]["oid"]; }, -- Gitblit v1.9.3