From 039f227d1f2998c0e0e5cd5d73d343ad57b88145 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期三, 31 五月 2023 10:42:14 +0800
Subject: [PATCH] 添加主数据分类及其属性为集团集成用
---
Source/UBCS-WEB/src/views/code/code.vue | 151 +++++++++++++++++++++++++++++++++-----------------
1 files changed, 99 insertions(+), 52 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index b30a4e4..7ca7a33 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 style="height: 350px;">
+ <basic-container style="height: 100%;">
<!-- 缂栫爜瑙勫垯淇℃伅灞曠ず鍖哄煙 -->
<basic-container class="code-rule-container">
@@ -149,8 +149,8 @@
</el-row>
</div>
<div slot="footer" class="dialog-footer" style="height: 50px; margin-top: -4vh;">
- <el-button @click="cloneSettingBox = false">鍙� 娑�</el-button>
<el-button type="primary" @click="saveCloneCodeRule">淇� 瀛�</el-button>
+ <el-button @click="cloneSettingBox = false">鍙� 娑�</el-button>
</div>
</el-dialog>
<!-- 缂栫爜瑙勫垯,浠庡叾浠栬鍒欏厠闅嗗璇濇 -->
@@ -190,8 +190,8 @@
</el-row>
</div>
<div slot="footer" class="dialog-footer" style="height: 50px; margin-top: -4vh;">
- <el-button @click="cloneOtherCodeRuleSettingBox = false">鍙� 娑�</el-button>
<el-button type="primary" @click="saveOtherCodeBasic">淇� 瀛�</el-button>
+ <el-button @click="cloneOtherCodeRuleSettingBox = false">鍙� 娑�</el-button>
</div>
</el-dialog>
@@ -259,7 +259,7 @@
size="small"
icon="el-icon-plus"
:disabled="selectionList.length <= 0"
- @click="addBasicCodeSec">
+ @click="openAddBasicCodeSec">
鏂� 澧�
</el-button>
<el-button type="danger"
@@ -645,10 +645,10 @@
</el-form>
</div>
<!-- 绗竴灞傚璇濇鐨勬寜閽拰锛岀嚎鏉� -->
- <el-divider direction="horizontal"></el-divider>
+ <el-divider class="horizontal-line" direction="horizontal"></el-divider>
<div slot="footer" class="dialog-footer">
- <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">鍙� 娑�</el-button>
<el-button type="primary" @click="saveOrEditBasicCode" v-show="showbtn">淇� 瀛�</el-button>
+ <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">鍙� 娑�</el-button>
</div>
<!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝灞炴�ч�夋嫨瀵硅瘽妗� -->
@@ -664,7 +664,7 @@
<div class="box">
<el-scrollbar style="height: auto; border-bottom-right-radius:8px ">
<basic-container>
- <div class="abox">
+ <div class="treeBox">
<avue-tree :data="attrClassifyTreeData" :option="treeOption" @node-click="nodeClick"/>
</div>
</basic-container>
@@ -680,7 +680,7 @@
:option="attrOption"
:table-loading="selectAttrOptionLoading"
ref="selectionAttrCrud"
- @search-change="selectAttrOptionSearchChange"
+ @search-change="selectAttrSearchChange"
@search-reset="searchAttrReset"
@row-click="selectionAttrRowClick"
@selection-change="selectionChangeAttr">
@@ -691,10 +691,9 @@
</el-row>
</div>
<div slot="footer" class="dialog-footer">
- <el-button @click="isShowSelectAttrOption = false">鍙� 娑�</el-button>
<el-button type="primary" @click="selectedListClassifyLinkAttr">纭� 瀹�</el-button>
+ <el-button @click="isShowSelectAttrOption = false">鍙� 娑�</el-button>
</div>
-
</el-dialog>
<!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗璇濇缁勪欢 -->
@@ -727,8 +726,8 @@
@on-load="parentClassifyOnLoad">
</avue-crud>
<div slot="footer" class="dialog-footer">
- <el-button @click="isShowParentClassifyOption = false">鍙� 娑�</el-button>
<el-button type="primary" @click="saveSelectedParentClassify">淇� 瀛�</el-button>
+ <el-button @click="isShowParentClassifyOption = false">鍙� 娑�</el-button>
</div>
</el-dialog>
@@ -753,16 +752,22 @@
@row-click="referBtmRowClick">
</avue-crud>
<div slot="footer" class="dialog-footer">
- <el-button @click="isShowSelectReferBtmOption = false">鍙� 娑�</el-button>
<el-button type="primary" @click="saveSelectedreferBtm">淇� 瀛�</el-button>
+ <el-button @click="isShowSelectReferBtmOption = false">鍙� 娑�</el-button>
</div>
</el-dialog>
- <!-- 绗簩灞傚璇濇,鍙傜収閰嶇疆缁勪欢 -->
- <refer-config-dialog
- ref="referConfigDialog"
- @echoReferConfig="echoReferConfig" >
- </refer-config-dialog>
+ <!-- 绗簩灞傚璇濇,鑷畾涔夊弬鐓ч厤缃瓼orm缁勪欢 -->
+ <refer-config-form-dialog
+ ref="referConfigFormDialog"
+ @echoReferConfig="echoReferConfig">
+ </refer-config-form-dialog>
+ <!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆crud缁勪欢 -->
+ <refer-config-crud-dialog
+ ref="referConfigCrudDialog"
+ @openReconfigInterFace="openReconfigInterFace"
+ @echoReferConfig="echoReferConfig">
+ </refer-config-crud-dialog>
</el-dialog>
@@ -797,7 +802,7 @@
import referBtmOption from "@/const/code/referBtmDialog";
import fixedValueOption from "@/const/code/fixedValueMgrDialog";
import {mapGetters} from "vuex";
-
+ import func from "@/util/func";
export default {
data() {
return {
@@ -1116,9 +1121,14 @@
this.form.getValueClass = content;
},
- /* 鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */
+ /* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */
echoReferConfig(content){
- this.form.referConfig = content;
+ // console.log(content.referTypeName);
+ this.form.referBtmId = content.referType;
+ this.form.referBtmName = content.referTypeName;
+ //杞崲鎴怞SON瀛楃涓茶繘琛岀埗缁勪欢鍥炴樉
+ let submitFormJson = JSON.stringify(content);
+ this.form.referConfig = submitFormJson;
},
/** 涓哄弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷閫夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
@@ -1267,19 +1277,13 @@
//杩欏効杩橀渶瑕佸畬鍠�
this.selectAttrOptionLoading = true;
listClassifyLinkAttr({"page": 1,"limit": -1,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}).then(res=>{
- //console.log(res.data.data);
- //閫犲亣鏁版嵁
- let dataInfo =[
- {"id":"address","name":"浼氳瀹ゅ湴鍧�","oid":"058D840D-1010-A7DE-7C52-B39C03CE89C1","attrLength":"150","description":"","attributeDataTypeText":"瀛楃涓�"},
- {"id":"businesslicensetype","name":"钀ヤ笟鎵х収绫诲瀷","oid":"BDAC6D3E-1827-35A0-F3CA-0E58A43F6A07","attrLength":"255","description":"钀ヤ笟鎵х収绫诲瀷","attributeDataTypeText":"瀛楃涓�"},
- {"id":"certificatenumber","name":"淇濆瘑璇佺紪鍙�","oid":"E2BC8332-A721-3713-26C3-C9F6340C2C1D","attrLength":"255","description":"淇濆瘑璇佺紪鍙�","attributeDataTypeText":"瀛楃涓�"},
- ]
- this.selectattrData = dataInfo;
- this.selectAttrOptionLoading = false;
+ console.log(res.data.data);
+ this.selectattrData = res.data.data;
+ this.selectAttrOptionLoading = false;
})
},
// 鐐瑰嚮鎼滅储鍚庤Е鍙戣浜嬩欢
- selectAttrOptionSearchChange(params, done) {
+ selectAttrSearchChange(params, done) {
this.query = params;
//console.log(params); //杩欏効闇�瑕佹敼
this.loadlistClassifyLinkAttr(Object.assign(params,{'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}));
@@ -1656,7 +1660,7 @@
// this.changeSectypeFormItems(null);
},
// 鎵撳紑鏂板绐楀彛
- addBasicCodeSec(){
+ openAddBasicCodeSec(){
if(!this.tipsMessage(this.selectionList)){
return;
}
@@ -1702,10 +1706,10 @@
if(this.form.oid == '' || this.form.oid == null){
if(this.checkForm()){
addSave(this.form).then(() => {
- this.$message({
- type: "success",
- message: "鎿嶄綔鎴愬姛!"
- });
+ this.$message({
+ type: "success",
+ message: "鎿嶄綔鎴愬姛!"
+ });
}, error => {
window.console.log(error);
});
@@ -2075,6 +2079,7 @@
},
// 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
codeRuleRowClick (row) {
+ // 杩欏効搴旇鍙互涓嶈锛屽洜涓簍oggleRowSelection涔熶細瑙﹀彂琛岄�夋嫨鏃堕棿
this.selectionList = row;
this.$refs.crud.toggleSelection();
this.$refs.crud.setCurrentRow(row);
@@ -2365,7 +2370,6 @@
});
},
-
/** 绗竴灞傚璇濇鐩稿叧鏂规硶 */
// 鎵撳紑浜屽眰瀵硅瘽妗嗘柟娉�
openAttrSelectOrGetValue(condition){
@@ -2380,11 +2384,52 @@
this.isShowSelectReferBtmOption = true;
this.refreshReferBtmDataChange();
}else if(condition === 'referConfig'){
- this.$refs.referConfigDialog.isShowReferConfig = true;
- //琛ㄦ牸閿欒鐨勯棶棰樻墍
- this.$refs.referConfigDialog.onloadAttrData();
+ if(func.notEmpty(this.form.referConfig) || func.notEmpty(this.form.referBtmName)){
+ this.openReconfigInterFace(this.form);
+ }else{
+ this.openTipsChooseOrCust();
+ }
+ //this.$refs.referConfigFormDialog.onloadAttrData();
}
},
+
+ // 褰撳墠宸插瓨鍦ㄧ紪杈戣繃鐨勫弬灞曢厤缃紝鎵�浠ョ洿鎺ユ墦寮�鍙傜収閰嶇疆鐣岄潰
+ openReconfigInterFace(preReferConfigForm){
+ // console.log(preReferConfigForm);
+ this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
+ let value = {
+ referTypeName: preReferConfigForm.referBtmName,
+ referType: preReferConfigForm.referBtmId,
+ referConfig: preReferConfigForm.referConfig,
+ }
+ this.$refs.referConfigFormDialog.initPageData(value);
+ },
+ // 鎵撳紑鑷畾涔夊弬鐓ч厤缃垨鐩存帴閫夋嫨鍙傜収閰嶇疆鐨勬彁绀烘
+ openTipsChooseOrCust(){
+ this.$confirm('璇烽�夋嫨鍙傜収閰嶇疆鐨勫畾涔夋柟寮忥紵','鍙傜収閰嶇疆鐨勬柟寮�', {
+ distinguishCancelAndClose: true,
+ closeOnClickModal: false,
+ confirmButtonText: '鑷畾涔夊弬鐓ч厤缃�',
+ cancelButtonText: '鐩存帴閫夋嫨鍙傜収閰嶇疆'
+ })
+ .then(() => {
+ // 鎵撳紑鑷畾鍙傜収閰嶇疆瀵硅瘽妗�
+ this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
+ // 琛ㄦ牸閿欒鐨勯棶棰�
+ this.$refs.referConfigFormDialog.onloadAttrData();
+ })
+ .catch(action => {
+ if (action === "cancel") {
+ // 鎵撳紑鐩存帴閫夋嫨鍙傜収閰嶇疆瀵硅瘽妗�
+ this.$refs.referConfigCrudDialog.isShowReferConfigCrud = true;
+ this.$refs.referConfigCrudDialog.referConfigOnload();
+ }
+ //console.log(action);
+ });
+ // 璁╁弬鐓ч厤缃緭鍏ユ澶卞幓鐒︾偣锛屽惁鍒欒鎻愮ず妗嗘棤娉曡鍏抽棴
+ this.$refs.referConfig.$el.querySelector('input').blur();
+ },
+
// 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
clearAttrDataByIcon(condition){
if(condition === 'attr'){
@@ -2398,8 +2443,10 @@
this.form.parentClassifySecOid = '';
}else if(condition === 'referBtmId'){
this.form.referBtmId = '';
+ this.form.referBtmName = '';
+ this.form.referConfig = '';
}else if(condition === 'referConfig'){
- this.form.referBtmId = '';
+ this.form.referConfig = '';
}
},
// 琛ヤ綅鏃剁殑瀛楃锛屽疄鐜板彲杈撳彲閫�
@@ -2466,7 +2513,7 @@
serialStart: row!=null&&row.serialStart != '' ? row.serialStart:1, //娴佹按鍙疯捣濮嬪��
serialStep: row!=null&&row.serialStep != '' ? row.serialStep:1, //娴佹按鐨勬闀�
codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //缂栫爜琛ヤ綅鏂瑰紡
- codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0, //琛ヤ綅鏃剁殑瀛楃锛岄�変腑鐨勪笅鎷夋鐨勪笅鏍�
+ codeFillSeparatorSelect: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparatorSelect:0, //琛ヤ綅鏃剁殑瀛楃锛岄�変腑鐨勪笅鎷夋鐨勪笅鏍�
codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:0, //琛ヤ綅鏃剁殑瀛楃
codeFillLength: row!=null&&row.codeFillLength != '' ? row.codeFillLength:'', //濉厖闀垮害
codeFillLimit: row!=null&&row.codeFillLimit != '' ? row.codeFillLimit:'', //娴佹按涓婇檺
@@ -2525,7 +2572,7 @@
},
//鏋氫妇鍜屽彲杈撳彲閫夊唴瀹规煡璇�
loadCodeSecType(){
- getDictionary({code: "codeBasicSecType"}).then(res=>{
+ getDictionary({code: "codeSecType"}).then(res=>{
this.sectypeList = res.data.data;
})
this.loadCodeSecLength();
@@ -2566,7 +2613,7 @@
</script>
-<style scope>
+<style>
.code-rule-crud > .avue-crud__search ,.code-basic-crud > .avue-crud__search {
margin-bottom: -15px;
@@ -2612,14 +2659,14 @@
padding: 1px 6px;
}
- .el-divider--horizontal {
+ .horizontal-line {
/* margin-top: 19px !important; */
margin-bottom: -20px !important;
width: 100%;
height: 2px;
}
- .el-card__body > .abox {
+ .el-card__body > .treeBox {
height: 50vh;
}
@@ -2631,11 +2678,11 @@
width:60px;
}
- .el-input-number {
+ .left > .el-form-item > .el-form-item__content > .el-input-number {
width: 120px;
}
- .el-input-number >.el-input > .el-input__inner {
+ .left > .el-form-item > .el-form-item__content > .el-input-number > .el-input > .el-input__inner {
width:120px;
}
@@ -2662,16 +2709,16 @@
justify-content: space-around;
}
- .el-divider--vertical {
+ .add-basicsec-form > .el-divider--vertical {
width: 2px;
- height: 72%;
+ height: 100%;
margin: 0 auto;
- position: fixed;
+ /* position: fixed; */
}
.left {
/* float: left; */
- width: 49%;
+ width: 45%;
height: 100%;
}
@@ -2690,6 +2737,6 @@
/* width: 100%; */
border-top: 1px solid #E9E7E7;
padding: 5px 10px 10px;
- }
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3