From 2f28c90930c4535c6549e84653668a4e5dfc1474 Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期三, 24 五月 2023 10:05:19 +0800
Subject: [PATCH] 业务类型feign修正
---
Source/UBCS-WEB/src/views/code/code.vue | 424 ++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 288 insertions(+), 136 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 5cb66a3..723d656 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>
<!-- 缂栫爜瑙勫垯,浠庡叾浠栬鍒欏厠闅嗗璇濇 -->
@@ -184,13 +184,14 @@
ref="crudCloneCodeBasicOther"
:table-loading="loadingBasic"
:data="basicData"
+ @row-click="codeOtherCloneBasicRowClick"
@selection-change="selectionOtherCloneCodeBasicChange">
</avue-crud>
</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>
@@ -202,6 +203,9 @@
ref="crudBasic"
:table-loading="loadingBasic"
:data="basicData"
+ @row-click="codeBasicSecRowClick"
+ @search-change="basicSearchChange"
+ @search-reset="basicSearchReset"
:permission="permissionList"
@selection-change="selectionBasicChange"
@refresh-change="refreshChangeBasicSec">
@@ -252,15 +256,19 @@
<!-- 鍩虹鐮佹琛ㄦ牸宸︿笂鏂规寜閽尯鍩� -->
<template slot="menuLeft" slot-scope="scope">
<el-button type="primary"
- size="small"
- icon="el-icon-plus"
- @click="addBasicCodeSec">鏂� 澧�
+ size="small"
+ icon="el-icon-plus"
+ :disabled="selectionList.length <= 0"
+ @click="addBasicCodeSec">
+ 鏂� 澧�
</el-button>
<el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- @click="deleteBasicCode(scope.row)">鍒� 闄�
+ size="small"
+ icon="el-icon-delete"
+ :disabled="selectionList.length <= 0"
+ plain
+ @click="deleteBasicCode(scope.row)">
+ 鍒� 闄�
</el-button>
</template>
@@ -360,7 +368,7 @@
</div>
<div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
<el-button :disabled="selectedFixedOrCodeclassifyValue!=''" size="mini" type="primary" icon="el-icon-circle-plus" class="button" @click="addCodeSecValue('codefixedsec')">娣诲姞</el-button>
- <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="success" plain plain icon="el-icon-edit-outline" class="button" @click="editCodeSecValue('codefixedsec')">淇敼</el-button>
+ <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="success" plain icon="el-icon-edit-outline" class="button" @click="editCodeSecValue('codefixedsec')">淇敼</el-button>
<el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="danger" icon="el-icon-close" class="button" @click="delCodeSecValue('codefixedsec')">鍒犻櫎</el-button>
<el-button size="mini" type="warning" plain icon="el-icon-close" class="button" @click = "clearFixedOrClassifyForm('codefixedsec')">鍙栨秷</el-button>
</div>
@@ -379,8 +387,8 @@
@close="clearBasicAddForm">
<!-- 绗竴灞傚璇濇,娣诲姞鐮佹淇℃伅瀵硅瘽妗嗕腑鐨勫唴瀹� -->
- <div class="total" style="overflow-y: auto; height: 70vh">
- <el-form :model="form">
+ <div class="add-basicsec-total" style="overflow-y: auto; height: 70vh">
+ <el-form :model="form" class="add-basicsec-form">
<span class="left">
<el-form-item label="鐮佹缂栧彿:" :label-width="leftFormLabelWidth" required>
<el-input v-model="form.id" :readonly="basicSecOnlyRead" ref="id"></el-input>
@@ -394,9 +402,9 @@
<el-select v-model="form.secType" placeholder="璇烽�夋嫨" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead">
<el-option
v-for="item in sectypeList"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -422,9 +430,9 @@
<el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in codeSecLengthType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -479,9 +487,9 @@
<el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option label="宸﹁ˉ浣�" value="codeattrsec"
v-for="item in codeFillType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -489,9 +497,9 @@
<el-select v-model="form.codeFillSeparatorSelect" @blur="inputSelectBlur" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in codeFillSeparator"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -514,9 +522,9 @@
<el-select v-model="form.codeLevelType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in codeLevelType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -527,9 +535,9 @@
<el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in codeCutType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -537,9 +545,9 @@
<el-select v-model="form.codeGetValueType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in codeGetValueType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -583,9 +591,9 @@
<el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in codeSecLengthType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -600,7 +608,7 @@
placeholder="璇烽�夋嫨"
prefix-icon="el-icon-search"
readonly="true"
- v-model="form.parentClassifySecOid"
+ v-model="form.parentClassifySecText"
@focus="openAttrSelectOrGetValue('parentClassifySecOid')"
:disabled="basicSecOnlyRead">
<i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('parentClassifySecOid')" style="margin-right: 5px;cursor: pointer;"></i>
@@ -616,9 +624,9 @@
<el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in codeFillType"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -626,9 +634,9 @@
<el-select v-model="form.codeFillSeparatorSelect" filterable @blur="inputSelectBlur" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
<el-option
v-for="item in codeFillSeparator"
- :key="item.dictValue"
- :label="item.dictValue"
- :value="item.dictKey">
+ :key="item.itemValue"
+ :label="item.itemName"
+ :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
@@ -637,13 +645,13 @@
</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>
- <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝灞炴�ч�夋嫨寮圭獥 -->
+ <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝灞炴�ч�夋嫨瀵硅瘽妗� -->
<el-dialog title="涓恒�愬睘鎬с�戦�夊彇鍊�"
append-to-body
:visible.sync="isShowSelectAttrOption"
@@ -656,14 +664,13 @@
<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>
</el-scrollbar>
</div>
</el-col>
-
<!-- 鍙充晶琛ㄦ牸鏄剧ず鍖哄煙 -->
<el-col span="19">
<basic-container>
@@ -672,39 +679,37 @@
:data="selectattrData"
:option="attrOption"
:table-loading="selectAttrOptionLoading"
+ ref="selectionAttrCrud"
@search-change="selectAttrOptionSearchChange"
@search-reset="searchAttrReset"
+ @row-click="selectionAttrRowClick"
@selection-change="selectionChangeAttr">
</avue-crud>
</div>
</basic-container>
</el-col>
-
</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>
- <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗脊绐楃粍浠� -->
+ <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗璇濇缁勪欢 -->
<formula-editor ref="formulaEditor"
@updateFormulaContent="updateFormulaContent"
:thisSceneTableData="thisSceneTableData"
:systemVariableTableData="systemVariableTableData">
</formula-editor>
- <!-- 绗簩灞傚璇濇,涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊煎脊绐� -->
+ <!-- 绗簩灞傚璇濇,涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊煎璇濇 -->
<el-dialog title="涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊�"
append-to-body
:visible.sync="isShowParentClassifyOption"
width="65%"
style="height: 150vh; margin-top: -13vh;"
destroy-on-close>
-
<avue-crud
:page.sync="parentClassifyDataPage"
ref="crudParentClassify"
@@ -714,26 +719,24 @@
@refresh-change="refreshParentClassifyDataChange"
@search-change="parentClassifySearchChange"
@search-reset="parentClassifySearchReset"
+ @row-click="parentClassifyRowClick"
@selection-change="parentClassifySelectionChange"
@current-change="parentClassifyCurrentChange"
@size-change="parentClassifySizeChange"
@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>
- <!-- 绗簩灞傚璇濇,涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊煎脊绐� -->
+ <!-- 绗簩灞傚璇濇,涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊煎脊瀵硅瘽妗� -->
<el-dialog title="涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊�"
append-to-body
:visible.sync="isShowSelectReferBtmOption"
width="65%"
- style="height: 150vh; margin-top: -13vh;"
- destroy-on-close>
-
+ style="height: 150vh; margin-top: -13vh;">
<avue-crud
:page.sync="referBtmDataPage"
ref="crudReferBtm"
@@ -746,19 +749,27 @@
@selection-change="referBtmSelectionChange"
@current-change="referBtmCurrentChange"
@size-change="referBtmSizeChange"
- @on-load="referBtmOnLoad">
+ @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>
+
+ <!-- 绗簩灞傚璇濇,鑷畾涔夊弬鐓ч厤缃瓼orm缁勪欢 -->
+ <refer-config-form-dialog
+ ref="referConfigFormDialog"
+ @echoReferConfig="echoReferConfig" >
+ </refer-config-form-dialog>
+ <!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆curd缁勪欢 -->
+ <refer-config-crud-dialog
+ ref="referConfigCrudDialog">
+ </refer-config-crud-dialog>
</el-dialog>
</basic-container>
-
</template>
<script>
@@ -776,7 +787,7 @@
import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify";
import { gridCodeFixedValue,addSaveCodeFixedValue,deleteCodeFixedValue,editCodeFixedValue,saveOrder } from "@/api/code/codeFixedValue";
import { treeCodeClassifyValue,addSaveCodeClassifyValue,editCodeClassifyValue,deleteCodeClassifyValue,saveCodeClassifyValueOrder } from "@/api/code/codeClassifyValue";
- import { getDictionary } from "@/api/omd/dict";
+ import { getDictionary } from "@/api/omd/enum";
import optionBasic from "@/const/code/codebasic";
import cloneOption from "@/const/code/cloneOption";
import cloneBasicOption from "@/const/code/cloneBasicDialogOption";
@@ -789,7 +800,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 {
@@ -894,7 +905,7 @@
},
classisyValueTreeOption: classisyValueTreeOption, //鍒嗙被鐮佹鏍戠浉鍏抽厤缃」
classifyValueTreeData: [],
- currentSelectTreeData: '', //褰撳墠閫変腑鐨勫垎绫荤爜鍊兼爲鑺傜偣
+ //currentSelectClsValueTreeData: '', //褰撳墠閫変腑鐨勫垎绫荤爜鍊兼爲鑺傜偣
/* 涓哄睘鎬ч�夊彇鍊肩獥鍙f樉绀烘墦寮�鎺у埗鍙橀噺 */
isShowSelectAttrOption: false,
@@ -1107,8 +1118,21 @@
updateFormulaContent(content){
this.form.getValueClass = content;
},
+
+ /* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */
+ echoReferConfig(content){
+ this.form.referBtmId = content.referType;
+ this.form.referBtmName = content.referTypeName;
+ //杞崲鎴怞SON瀛楃涓茶繘琛岀埗缁勪欢鍥炴樉
+ let submitFormJson = JSON.stringify(content);
+ this.form.referConfig = submitFormJson;
+ },
- /** 閫変腑鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
+ /** 涓哄弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷閫夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
+ // 琛ㄦ牸鏁版嵁鍒锋柊鎸夐挳
+ referBtmDataChange(){
+ this.referBtmOnLoad(this.referBtmDataPage, this.referBtmQuery);
+ },
saveSelectedreferBtm(){
if(this.referBtmSelectionList.length != 1){
this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
@@ -1131,9 +1155,16 @@
this.referBtmOnLoad(this.page, params);
done();
},
+ // 鍗曞嚮閫変腑琛ㄦ牸琛屾椂瑙﹀彂
+ referBtmRowClick(row){
+ this.$refs.crudReferBtm.toggleSelection();
+ this.referBtmSelectionList = row;
+ this.$refs.crudReferBtm.setCurrentRow(row);
+ this.$refs.crudReferBtm.toggleRowSelection(row); //閫変腑褰撳墠琛�
+ },
referBtmSelectionChange(list) {
- //console.log(list);
this.referBtmSelectionList = list;
+ this.$refs.crudReferBtm.setCurrentRow(this.referBtmSelectionList[list.length-1]);
},
referBtmSelectionClear() {
this.referBtmSelectionList = [];
@@ -1150,6 +1181,10 @@
},
//鍔犺浇涓弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷鐨勬暟鎹�
referBtmOnLoad(page, params = {}) {
+ //琛ㄦ牸琛岄敊浣嶉棶棰�
+ this.$nextTick(() => {
+ this.$refs.crudReferBtm.doLayout();
+ })
this.referBtmDialogLoading = true;
let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid;
Object.assign(params,{pkCodeRule:oid})
@@ -1170,10 +1205,10 @@
saveSelectedParentClassify(){
//console.log(this.parentClassifySelectionList.length);
if(this.parentClassifySelectionList.length != 1){
- this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+ this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�!");
return false;
}
- //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
+ //鍙傛暟鍊硷紝瀹炵幇鍥炴樉
this.form.parentClassifySecOid = this.parentClassifySelectionList[0].oid;
this.form.parentClassifySecText = this.parentClassifySelectionList[0].name;
//娓呯┖褰撳墠閫変腑鐨勮
@@ -1190,9 +1225,15 @@
this.parentClassifyOnLoad(this.page, params);
done();
},
+ parentClassifyRowClick(row){
+ this.$refs.crudParentClassify.toggleSelection();
+ this.parentClassifySelectionList = row;
+ this.$refs.crudParentClassify.setCurrentRow(row);
+ this.$refs.crudParentClassify.toggleRowSelection(row); //閫変腑褰撳墠琛�
+ },
parentClassifySelectionChange(list) {
- //console.log(this.parentClassifyCurrentChange);
this.parentClassifySelectionList = list;
+ this.$refs.crudParentClassify.setCurrentRow(this.parentClassifySelectionList[list.length-1]);
},
parentClassifySelectionClear() {
this.parentClassifySelectionList = [];
@@ -1229,7 +1270,8 @@
this.loadlistClassifyLinkAttr()
},
// 鍔犺浇鍒嗙被杩炴帴灞炴�ц〃鏍兼暟鎹�
- loadlistClassifyLinkAttr(){
+ loadlistClassifyLinkAttr(condition) {
+ //杩欏効杩橀渶瑕佸畬鍠�
this.selectAttrOptionLoading = true;
listClassifyLinkAttr({"page": 1,"limit": -1,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}).then(res=>{
//console.log(res.data.data);
@@ -1246,13 +1288,21 @@
// 鐐瑰嚮鎼滅储鍚庤Е鍙戣浜嬩欢
selectAttrOptionSearchChange(params, done) {
this.query = params;
- console.log(params); //杩欏効闇�瑕佹敼
- this.loadlistClassifyLinkAttr({"page":1,"limit":-1 ,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid});
+ //console.log(params); //杩欏効闇�瑕佹敼
+ this.loadlistClassifyLinkAttr(Object.assign(params,{'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}));
done();
+ },
+ // 涓哄睘鎬ч�夊�肩晫闈紝鍗曞嚮琛ㄦ牸琛屾椂瑙﹀彂璇ヤ簨浠�
+ selectionAttrRowClick(row){
+ this.$refs.selectionAttrCrud.toggleSelection();
+ this.selectionChangeAttrList = row;
+ this.$refs.selectionAttrCrud.setCurrentRow(row);
+ this.$refs.selectionAttrCrud.toggleRowSelection(row); //閫変腑褰撳墠琛�
},
// 灞炴�у彇鍊煎綋鍓嶉�変腑琛屽彂鐢熷彉鍖栨椂瑙﹀彂
selectionChangeAttr(list){
this.selectionChangeAttrList = list;
+ this.$refs.selectionAttrCrud.setCurrentRow(this.selectionChangeAttrList[list.length-1]);
},
// 閲嶇疆浣嶅睘鎬ч�夊彇鍊艰〃鏍肩殑鎼滅储妗嗕箣鍚庣殑鍥炶皟
searchAttrReset() {
@@ -1261,7 +1311,7 @@
// 涓哄睘鎬ч�夊彇鍊间箣鍚庣殑鍥炴樉
selectedListClassifyLinkAttr(){
if(this.selectionChangeAttrList.length != 1){
- this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+ this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�!");
return false;
}
//璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
@@ -1609,7 +1659,7 @@
/** 鍩虹鐮佹鐩稿叧鏂规硶 */
//闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌�,骞跺垵濮嬪寲form琛ㄥ崟灞炴��
clearBasicAddForm(){
- this.form = this.$options.data().form;;
+ this.form = this.$options.data().form;
// this.changeSectypeFormItems(null);
},
// 鎵撳紑鏂板绐楀彛
@@ -1624,7 +1674,7 @@
this.openBasicDialog('add',null);
this.loadCodeSecType();
},
- //鎵撳紑鏂板鎴栫紪杈戝熀纭�鐮佹瀵硅瘽妗�
+ // 鎵撳紑鏂板鎴栫紪杈戝熀纭�鐮佹瀵硅瘽妗�
openBasicDialog(condition,row){
//console.log(row);
if(condition == 'add') {
@@ -1903,9 +1953,16 @@
//瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
this.currentCodeRuleOid = row.oid;
this.currentRuleLcStatus = row.lcStatus;
- gridCodeBasicSec(1, -1, {"pkCodeRule":row.oid}).then(res => {
+ this.sendGridCodeBasicSec({"pkCodeRule":row.oid});
+ },
+ // 鍙戦�佸姞杞藉熀纭�鐮佹鐨勮姹�
+ sendGridCodeBasicSec(condition){
+ // 濡傛灉褰撳墠鍩虹鐮佹琛ㄤ腑鐨勬悳绱㈡寜閽闅愯棌锛屽氨闇�瑕佸湪姝ゅ紑鍚�
+ if(this.selectionList.length>=0 && !this.$refs.crudBasic.option.column[0].search){
+ this.hideBasicTable(true);
+ }
+ gridCodeBasicSec(1, -1, condition).then(res => {
const data = res.data.data;
- // console.log(data);
if(this.cloneSettingBox){
this.cloneData = data.records;
// console.log(tihs.cloneData);
@@ -1920,7 +1977,23 @@
// 鍩虹鐮佹閫変腑鏃惰Е鍙�
selectionBasicChange(list) {
this.selectionBasicList = list;
+ this.$refs.crudBasic.setCurrentRow(this.selectionBasicList[list.length-1]);
//console.log(this.selectionBasicList);
+ },
+ // 鍩虹鐮佹琚崟鍑昏〃鏍艰鏃惰Е鍙�
+ codeBasicSecRowClick(row){
+ this.$refs.crudBasic.toggleSelection();
+ this.selectionBasicList = row;
+ this.$refs.crudBasic.setCurrentRow(row);
+ this.$refs.crudBasic.toggleRowSelection(row); //閫変腑褰撳墠琛�
+ },
+ basicSearchChange(params, done){
+ //console.log(this.$refs.crudBasic);
+ this.sendGridCodeBasicSec(Object.assign(params,{"pkCodeRule":this.selectionList[this.selectionList.length-1].oid}));
+ done();
+ },
+ basicSearchReset(){
+ this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid});
},
// 涓婄Щ涓嬬Щ鍩虹鐮佹
upOrderNum(row){
@@ -1968,12 +2041,19 @@
});
})
},
- //鍩虹鐮佹鏌ヨ
+ // 鍩虹鐮佹鍒锋柊鏃舵煡璇�
refreshChangeBasicSec(){
this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
},
+ // 鎿嶄綔鍩虹鐮佹涓悳绱㈡竻绌虹瓑鎸夐挳鐨勬樉绀�/闅愯棌
+ hideBasicTable(hideBoolean){
+ this.$refs.crudBasic.option.refreshBtn = hideBoolean;
+ this.$refs.crudBasic.option.columnBtn = hideBoolean;
+ this.$refs.crudBasic.option.column[0].search = hideBoolean;
+ this.$refs.crudBasic.option.column[1].search = hideBoolean;
+ },
-
+
/** 缂栫爜瑙勫垯鐩稿叧鏂规硶 */
// 鏌ヨ浣跨敤鑼冨洿
handleRange(){
@@ -1983,7 +2063,7 @@
this.codeRangeSettingBox = true;
this.getRangeCodeList()
},
- //鍔犺浇浣跨敤鑼冨洿鍒楄〃
+ // 鍔犺浇浣跨敤鑼冨洿鍒楄〃
getRangeCodeList(){
this.dialogLoading = true;
if(this.selectionList[0].oid==null){
@@ -1996,17 +2076,20 @@
this.dialogLoading = false;
});
},
- //鍒锋柊浣跨敤鑼冨洿鍒楄〃
+ // 鍒锋柊浣跨敤鑼冨洿鍒楄〃
refreshUseRangeChange(){
this.getRangeCodeList();
},
- //鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
+ // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
codeRuleRowClick (row) {
- this.$refs.crud.toggleSelection();
+ // 杩欏効搴旇鍙互涓嶈锛屽洜涓簍oggleRowSelection涔熶細瑙﹀彂琛岄�夋嫨鏃堕棿
this.selectionList = row;
+ this.$refs.crud.toggleSelection();
this.$refs.crud.setCurrentRow(row);
- //this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
- this.loadBasic(row);
+ this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
+ if(row!=''){
+ this.loadBasic(row);
+ }
},
// 鍚敤涓庡仠鐢�
enableOrDeactivatse(oId,update){
@@ -2073,26 +2156,42 @@
}
this.cloneOtherCodeRuleSettingBox = true;
},
- //鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
- codeOtherCloneRuleRowClick (row) {
+ // 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�-鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
+ codeOtherCloneRuleRowClick(row) {
+ this.$refs.crudCloneCodeRuleOther.toggleSelection();
+ this.selectionOtherCloneCodeRuleList = row;
+ this.$refs.crudCloneCodeRuleOther.setCurrentRow(row);
+ this.$refs.crudCloneCodeRuleOther.toggleRowSelection(row); //閫変腑褰撳墠琛�
this.loadBasic(row);
},
- // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
+ // 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�-鍗曞嚮鍩虹鐮佹瀹炵幇琛岄�夋嫨
+ codeOtherCloneBasicRowClick(row){
+ this.$refs.crudCloneCodeBasicOther.toggleSelection();
+ this.selectionOtherCloneCodeBasicList = row;
+ this.$refs.crudCloneCodeBasicOther.setCurrentRow(row);
+ this.$refs.crudCloneCodeBasicOther.toggleRowSelection(row); //閫変腑褰撳墠琛�
+ },
+ // 浠庡叾浠栬鍒欏厠闅嗙爜娈电晫闈腑缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
selectionOtherCloneCodeRuleChange(list) {
//console.log(list);
this.selectionOtherCloneCodeRuleList = list;
+ this.$refs.crudBasic.setCurrentRow(this.selectionBasicList[list.length-1]);
+ if(list == ''){
+ this.basicData = [];
+ }
if(this.selectionOtherCloneCodeRuleList.length > 0){
this.loadBasic(this.selectionOtherCloneCodeRuleList[list.length-1]);
}
},
selectionOtherCloneCodeBasicChange(list){
- this.selectionOtherCloneCodeBasicList = list;
+ this.selectionOtherCloneCodeBasicList = list;
+ this.$refs.crudCloneCodeBasicOther.setCurrentRow(this.selectionOtherCloneCodeBasicList[list.length-1]);
},
// 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅
saveOtherCodeBasic(){
let oid = this.selectionList[0].oid;
let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
- if(fromDialogPkCodebasic.length < 0){
+ if(fromDialogPkCodebasic.length <= 0){
this.$message.warning("璇烽�夋嫨鐮佹鏁版嵁!");
return;
}
@@ -2104,13 +2203,13 @@
return;
}
//console.log(res);
- let oidArr = '';
- fromDialogPkCodebasic.forEach((item) =>{
- oidArr = oidArr+","+item.oid;
- })
+ let oidArr = [];
+ fromDialogPkCodebasic.forEach(ele => {
+ oidArr.push(ele.id);
+ });
let data = {
"pkCodeRule": oid,
- "oidArr": oidArr,
+ "oidArr": oidArr.join(","),
}
//console.log(data);
cloneCodeBasic(data).then(() => {
@@ -2136,9 +2235,9 @@
}
let currentData = this.selectionList[0];
this.$confirm("纭畾瑕佹竻绌虹爜鍊硷紵濡傛灉娓呯┖灏嗕笉鑳借鎭㈠锛岃璋ㄦ厧锛�", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
})
.then(() => {
let ts = new Date(currentData.ts).getTime();
@@ -2152,7 +2251,6 @@
});
});
},
-
// 娣诲姞
rowSave(row, done, loading) {
add(row).then(() => {
@@ -2232,12 +2330,15 @@
// 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
selectionChange(list) {
this.selectionList = list;
- //console.log("selectionChange====="+list);
this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
+ //褰撳墠閫変腑琛屼负绌虹殑鏃跺�欏氨灏嗙爜娈电鐞嗚〃鏍兼暟鎹疆绌�
+ if(list == ''){
+ this.basicData = [];
+ this.hideBasicTable(false);
+ }
if(this.selectionList.length > 0){
this.currentCodeRuleOid = this.selectionList[list.length-1].oid;
this.currentRuleLcStatus = this.selectionList[list.length-1].lcStatus;
- //console.log(this.currentRuleLcStatus);
this.loadBasic(this.selectionList[list.length-1]);
}
},
@@ -2264,7 +2365,7 @@
this.loading = false;
this.loadBasic(this.data[0])
this.$nextTick(() => {
- //this.$refs.crud.toggleRowSelection(this.data[0]);
+ this.$refs.crud.toggleRowSelection(this.data[0]);
this.$refs.crud.setCurrentRow(this.data[0]);
})
this.selectionList = data.records[0];
@@ -2274,7 +2375,7 @@
/** 绗竴灞傚璇濇鐩稿叧鏂规硶 */
- // 鎵撳紑浜屽眰寮圭獥鏂规硶
+ // 鎵撳紑浜屽眰瀵硅瘽妗嗘柟娉�
openAttrSelectOrGetValue(condition){
if(condition === 'attr'){
this.isShowSelectAttrOption = true;
@@ -2285,9 +2386,46 @@
this.isShowParentClassifyOption = true;
}else if(condition === 'referBtmId'){
this.isShowSelectReferBtmOption = true;
+ this.refreshReferBtmDataChange();
}else if(condition === 'referConfig'){
- //this.$emit('openSelectreferConfig')
+ if(func.notEmpty(this.form.referConfig) || func.notEmpty(this.form.referBtmName)){
+ this.$refs.referConfigFormDialog.isShowReferConfig = true;
+ let value = {
+ referTypeName: this.form.referBtmName,
+ referType: this.form.referBtmId,
+ referConfig: this.form.referConfig,
+ }
+ this.$refs.referConfigFormDialog.initPageData(value);
+ }else{
+ this.openTipsChooseOrCust();
+ }
+ //this.$refs.referConfigFormDialog.onloadAttrData();
}
+ },
+ // 鎵撳紑鑷畾涔夊弬鐓ч厤缃垨鐩存帴閫夋嫨鍙傜収閰嶇疆鐣岄潰
+ 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();
},
// 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
@@ -2303,8 +2441,9 @@
this.form.parentClassifySecOid = '';
}else if(condition === 'referBtmId'){
this.form.referBtmId = '';
+ this.form.referConfig = '';
}else if(condition === 'referConfig'){
- this.form.referBtmId = '';
+ this.form.referConfig = '';
}
},
// 琛ヤ綅鏃剁殑瀛楃锛屽疄鐜板彲杈撳彲閫�
@@ -2434,7 +2573,6 @@
this.sectypeList = res.data.data;
})
this.loadCodeSecLength();
- //console.log(this.sectypeList);
},
loadCodeSecLength(){
getDictionary({code: "codeSecLength"}).then(res=>{
@@ -2464,7 +2602,6 @@
loadCodeGetValueType(){
getDictionary({code: "codeGetValueType"}).then(res=>{
this.codeGetValueType = res.data.data;
- //console.log(this.codeGetValueType);
})
},
@@ -2473,7 +2610,7 @@
</script>
-<style scope>
+<style>
.code-rule-crud > .avue-crud__search ,.code-basic-crud > .avue-crud__search {
margin-bottom: -15px;
@@ -2483,12 +2620,11 @@
padding: 14px 0 2px 20px;
}
-
.clone-input-textarea > .el-form-item__content {
width: 495px;
}
- .clone-avue-crud > .el-card> .el-card__body > .avue-crud__menu {
+ .clone-avue-crud > .el-card > .el-card__body > .avue-crud__menu {
display: none!important;
}
@@ -2515,20 +2651,19 @@
.basic-container > .el-card > .el-card__body {
margin: -10px 0;
}
+
.code-basicsec-container{
padding: 1px 6px;
}
- .el-divider--horizontal {
- margin-top: 19px !important;
+ .horizontal-line {
+ /* margin-top: 19px !important; */
margin-bottom: -20px !important;
+ width: 100%;
height: 2px;
- margin: 0;
- position: fixed;
- width: 57.5vw;
}
- .el-card__body > .abox {
+ .el-card__body > .treeBox {
height: 50vh;
}
@@ -2540,11 +2675,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;
}
@@ -2554,34 +2689,51 @@
}
/** 鏂板鐮佹 */
- .total{
- height: 500px;
+ .add-basicsec-total {
width: 100%;
}
- .total .el-input__inner,.total .el-textarea__inner {
+ .add-basicsec-total .el-input__inner,.add-basicsec-total .el-textarea__inner {
width: 220px;
}
- .el-divider--vertical {
+ .add-basicsec-total > .add-basicsec-form {
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ height: 100%;
+ align-items: center;
+ justify-content: space-around;
+ }
+
+ .add-basicsec-form > .el-divider--vertical {
width: 2px;
- height: 72vh;
- margin: 0 5px;
- position: fixed;
+ height: 100%;
+ margin: 0 auto;
+ /* position: fixed; */
}
.left {
- float: left;
- width: 49%;
+ /* float: left; */
+ width: 45%;
+ height: 100%;
}
+
.right {
- float: right;
- margin-right: 2.5vw;
- /* width: 40%; */
+ /* float: right; */
+ margin-right: 2vw;
+ height: 100%;
+ width: auto;
}
+
.right > .el-form > .el-form-item{
margin-bottom: 8px;
}
-
+ /* 瀵硅瘽妗嗗簳閮ㄦ寜閽竟妗嗘牱寮� */
+ .el-dialog__footer{
+ /* width: 100%; */
+ border-top: 1px solid #E9E7E7;
+ padding: 5px 10px 10px;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3