From 0efcf618f642c4c42315a26e49c0749abc9ebb32 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 08 八月 2023 10:50:54 +0800
Subject: [PATCH] 主题库分类注入 枚举注入等清空
---
Source/UBCS-WEB/src/components/template/FlowPath.vue | 449 ++++----
Source/UBCS-WEB/src/components/template/Stage.vue | 517 +++++-----
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 756 ++++++++-------
Source/UBCS-WEB/src/components/Master/MasterTransfer.vue | 334 +++---
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 44
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 836 ++++++++--------
6 files changed, 1,524 insertions(+), 1,412 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
index 24ea436..0088dc4 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue
@@ -1,53 +1,56 @@
<template>
-<el-dialog :visible.sync="dialogPush" append-to-body :close-on-click-modal="false" @close="escHandler" title="瀵煎嚭" style="width: 1550px; margin: auto">
- <div style="margin-bottom: 20px;">
- <div>
- <span>瀵煎嚭鏂瑰紡锛�</span>
- <el-radio-group v-model="radio">
- <el-radio :label="0">閫夋嫨</el-radio>
- <el-radio :label="1">鍏ㄩ儴</el-radio>
- <el-radio :label="2">椤电爜</el-radio>
- </el-radio-group>
- <span v-if="radio === 2" style="margin-left: 20px;"><el-input style="width: 150px" v-model="pageExport"></el-input> 锛堣緭鍏ラ〉鐮佹垨鑰呴〉闈㈣寖鍥达紝濡傦細1-10)锛�</span>
+ <el-dialog :close-on-click-modal="false" :visible.sync="dialogPush" append-to-body style="width: 1550px; margin: auto" title="瀵煎嚭"
+ @close="escHandler">
+ <div style="margin-bottom: 20px;">
+ <div>
+ <span>瀵煎嚭鏂瑰紡锛�</span>
+ <el-radio-group v-model="radio">
+ <el-radio :label="0">閫夋嫨</el-radio>
+ <el-radio :label="1">鍏ㄩ儴</el-radio>
+ <el-radio :label="2">椤电爜</el-radio>
+ </el-radio-group>
+ <span v-if="radio === 2" style="margin-left: 20px;"><el-input v-model="pageExport"
+ style="width: 150px"></el-input> 锛堣緭鍏ラ〉鐮佹垨鑰呴〉闈㈣寖鍥达紝濡傦細1-10)锛�</span>
+ </div>
</div>
- </div>
- <div style="text-align: center">
- <el-transfer
- style="text-align: left; display: inline-block;height: 400px"
- filterable
- :filter-method="filterMethod"
- filter-placeholder="鍏抽敭璇嶆悳绱�"
- v-model="value"
- :titles="['鏈�夊睘鎬�', '宸查�夊睘鎬�']"
- :data="data">
- </el-transfer>
- </div>
- <div style="display: flex;justify-content: flex-end;">
- <el-button size="small" plain type="success" @click="handleExcel">纭畾</el-button>
- <el-button size="small" plain @click="escHandler">鍙栨秷</el-button>
- </div>
-</el-dialog>
+ <div style="text-align: center">
+ <el-transfer
+ v-model="value"
+ :data="data"
+ :filter-method="filterMethod"
+ :titles="['鏈�夊睘鎬�', '宸查�夊睘鎬�']"
+ filter-placeholder="鍏抽敭璇嶆悳绱�"
+ filterable
+ style="text-align: left; display: inline-block;height: 400px">
+ </el-transfer>
+ </div>
+ <div style="display: flex;justify-content: flex-end;">
+ <el-button plain size="small" type="success" @click="handleExcel">纭畾</el-button>
+ <el-button plain size="small" @click="escHandler">鍙栨秷</el-button>
+ </div>
+ </el-dialog>
</template>
<script>
-import {exportCode,FindData} from '@/api/GetItem'
+import {exportCode, FindData} from '@/api/GetItem'
import func from "@/util/func";
+
export default {
-name: "MasterTransfer",
- props:['visible','tableHeadData','codeClassifyOid','tableData','selectRow','templateOid','limit'],
- data(){
+ name: "MasterTransfer",
+ props: ['visible', 'tableHeadData', 'codeClassifyOid', 'tableData', 'selectRow', 'templateOid', 'limit'],
+ data() {
return {
- pageExport:"",
+ pageExport: "",
data: [],
value: [],
filterMethod(query, item) {
return item.label.indexOf(query) > -1;
},
- dialogPush:this.visible,
- radio:0,
- tableHeadFindData:[],
- tableExportData:[],
- option:{
+ dialogPush: this.visible,
+ radio: 0,
+ tableHeadFindData: [],
+ tableExportData: [],
+ option: {
title: '鏂囨。鏍囬',
column: [{
label: '涓绘暟鎹�',
@@ -56,14 +59,14 @@
}],
data: []
},
- exportArr:{},
- exportArrTwo:{},
- ids:""
+ exportArr: {},
+ exportArrTwo: {},
+ ids: ""
};
},
- watch:{
+ watch: {
//鐩戝惉鍒濆鍖�
- visible (){
+ visible() {
this.dialogPush = this.visible;
},
//琛ㄥご鏁版嵁 鐢ㄦ潵娓叉煋绌挎妗�
@@ -90,160 +93,175 @@
}
}
},
- tableData(){
+ tableData() {
// 灏嗗�奸噷闈㈢殑true鎴杅alse鏀瑰彉涓烘槸鎴栧惁
this.option.data = this.tableData.map(obj => {
- for (let prop in obj) {
- if (obj[prop] === "true") {
- obj[prop] = "鏄�";
- } else if (obj[prop] === "false") {
- obj[prop] = "鍚�";
- }
+ for (let prop in obj) {
+ if (obj[prop] === "true") {
+ obj[prop] = "鏄�";
+ } else if (obj[prop] === "false") {
+ obj[prop] = "鍚�";
}
+ }
return obj;
});
},
- codeClassifyOid:{
- handler(newval,oldval){
+ codeClassifyOid: {
+ handler(newval, oldval) {
}
},
- value:{
- handler(newval,oldval){
- console.log('value',newval)
+ value: {
+ handler(newval, oldval) {
+ console.log('value', newval)
}
}
},
- computed:{
-
- },
+ computed: {},
mounted() {
},
- methods:{
- escHandler(){
+ methods: {
+ escHandler() {
this.$emit('update:visible', false);
- this.value=[];
- this.radio=0
+ this.value = [];
+ this.radio = 0
},
//鍏抽棴椤甸潰
- recoverPage(){
+ recoverPage() {
this.$emit('update:visible', false);
},
- handleExcel(){
- this.value.map(index => this.tableHeadData[index].prop).forEach((item, index) => {
- this.exportArr[`attrIdIndexMap[${index}]`] = item
- })
- if(this.radio === 0){
- if(this.selectRow.length<=0){
- this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑妯℃澘')
- }else {
- //宸查�夋嫨澶氶��
- const selectList=[]
- //宸查�夋嫨灞炴��
- let exportArr={}
- this.ids = this.selectRow.map(item => item.oid).join(',')
- this.selectRow.forEach(item=>{
- selectList.push(
- item.oid
- )
- })
- if(this.value <= 0){
- this.tableHeadData.map(item => item.prop)
- .forEach((prop, index) => {
- this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
- });
- exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArrTwo,limit:-1}).then(res=>{
- // console.log('res',res)
- if(res){
- func.downloadFileByBlobHandler(res);
- this.escHandler()
- }
- })
- }else {
-
- exportCode({codeClassifyOid:this.codeClassifyOid,'conditionMap[oid]':this.ids,...this.exportArr}).then(res=>{
- // console.log('res',res)
- if(res){
- func.downloadFileByBlobHandler(res);
- this.escHandler()
- }
- })
-
- }
- }
- }else if(this.radio === 1){
- if(this.value <= 0){
+ handleExcel() {
+ this.value.map(index => this.tableHeadData[index].prop).forEach((item, index) => {
+ this.exportArr[`attrIdIndexMap[${index}]`] = item
+ })
+ if (this.radio === 0) {
+ if (this.selectRow.length <= 0) {
+ this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑妯℃澘')
+ } else {
+ //宸查�夋嫨澶氶��
+ const selectList = []
+ //宸查�夋嫨灞炴��
+ let exportArr = {}
+ this.ids = this.selectRow.map(item => item.oid).join(',')
+ this.selectRow.forEach(item => {
+ selectList.push(
+ item.oid
+ )
+ })
+ if (this.value <= 0) {
this.tableHeadData.map(item => item.prop)
.forEach((prop, index) => {
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()
- }
- })
- }else {
- exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArr,limit:-1}).then(res=>{
- // console.log('res',res)
- if(res){
- func.downloadFileByBlobHandler(res);
- this.escHandler()
- }
- })
- }
- }else if(this.radio === 2){
- const input = this.pageExport.trim();
- let start, end;
- if (input.includes('-')) {
- if (input.indexOf('-') !== input.lastIndexOf('-')) {
- this.$message.warning('杈撳叆鏍煎紡閿欒锛氬彧鑳借緭鍏ヤ竴涓� - 鍙烽殧寮�');
- return;
- }
- //鍖呭惈-瑙f瀽
- const range = input.split('-');
- start = Number(range[0]);
- end = Number(range[1]);
- if (isNaN(start) || isNaN(end)) {
- this.$message.warning('杈撳叆鏍煎紡閿欒');
- return;
- }
- } else {
- //涓嶅寘鍚�-瑙f瀽
- start = Number(input);
- end = start;
- if (isNaN(start)) {
- this.$message.warning('杈撳叆鏍煎紡閿欒');
- return;
- }
- }
- if(this.value >=1 ){
- exportCode({ codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: this.limit, page: start, endPage: end }).then((res) => {
+ exportCode({
+ codeClassifyOid: this.codeClassifyOid,
+ 'conditionMap[oid]': this.ids, ...this.exportArrTwo,
+ limit: -1
+ }).then(res => {
// console.log('res',res)
if (res) {
func.downloadFileByBlobHandler(res);
this.escHandler()
}
- });
- }else {
- this.tableHeadData.map(item => item.prop)
- .forEach((prop, index) => {
- this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
- });
- exportCode({codeClassifyOid:this.codeClassifyOid,...this.exportArrTwo,limit:this.limit,page: start, endPage: end}).then(res=>{
+ })
+ } else {
+
+ exportCode({
+ codeClassifyOid: this.codeClassifyOid,
+ 'conditionMap[oid]': this.ids, ...this.exportArr
+ }).then(res => {
// console.log('res',res)
- if(res){
+ if (res) {
func.downloadFileByBlobHandler(res);
this.escHandler()
}
})
+
}
}
+ } else if (this.radio === 1) {
+ if (this.value <= 0) {
+ this.tableHeadData.map(item => item.prop)
+ .forEach((prop, index) => {
+ 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()
+ }
+ })
+ } else {
+ exportCode({codeClassifyOid: this.codeClassifyOid, ...this.exportArr, limit: -1}).then(res => {
+ // console.log('res',res)
+ if (res) {
+ func.downloadFileByBlobHandler(res);
+ this.escHandler()
+ }
+ })
+ }
+ } else if (this.radio === 2) {
+ const input = this.pageExport.trim();
+ let start, end;
+ if (input.includes('-')) {
+ if (input.indexOf('-') !== input.lastIndexOf('-')) {
+ this.$message.warning('杈撳叆鏍煎紡閿欒锛氬彧鑳借緭鍏ヤ竴涓� - 鍙烽殧寮�');
+ return;
+ }
+ //鍖呭惈-瑙f瀽
+ const range = input.split('-');
+ start = Number(range[0]);
+ end = Number(range[1]);
+ if (isNaN(start) || isNaN(end)) {
+ this.$message.warning('杈撳叆鏍煎紡閿欒');
+ return;
+ }
+ } else {
+ //涓嶅寘鍚�-瑙f瀽
+ start = Number(input);
+ end = start;
+ if (isNaN(start)) {
+ this.$message.warning('杈撳叆鏍煎紡閿欒');
+ return;
+ }
+ }
+ if (this.value >= 1) {
+ exportCode({
+ codeClassifyOid: this.codeClassifyOid, ...this.exportArr,
+ limit: this.limit,
+ page: start,
+ endPage: end
+ }).then((res) => {
+ // console.log('res',res)
+ if (res) {
+ func.downloadFileByBlobHandler(res);
+ this.escHandler()
+ }
+ });
+ } else {
+ this.tableHeadData.map(item => item.prop)
+ .forEach((prop, index) => {
+ this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop;
+ });
+ exportCode({
+ codeClassifyOid: this.codeClassifyOid, ...this.exportArrTwo,
+ limit: this.limit,
+ page: start,
+ endPage: end
+ }).then(res => {
+ // console.log('res',res)
+ if (res) {
+ func.downloadFileByBlobHandler(res);
+ this.escHandler()
+ }
+ })
+ }
+ }
},
}
}
</script>
-<style scoped lang="scss">
+<style lang="scss" scoped>
</style>
diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
index 6d4c5a1..f7c83ad 100644
--- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -16,7 +16,7 @@
}}
</el-button>
<span v-if="tableHeadFindData.length > 0">
- <el-select v-model="keyWordFind" slot="prepend" placeholder="璇烽�夋嫨" size="small">
+ <el-select slot="prepend" v-model="keyWordFind" placeholder="璇烽�夋嫨" size="small">
<el-option v-for="item in tableHeadFindData" :label="item.label" :value="item.prop"></el-option>
</el-select>
<el-input v-model="WupinFindValue" placeholder="璇疯緭鍏ュ叧閿瓧鎸夊洖杞︽煡璇�"
@@ -66,8 +66,8 @@
<FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid"
:disabledProp="disabledProp" :rowOid="rowOid" :templateOid="templateOid"
:title="'宸插彂甯冩暟鎹洿鏀�'"
- type="edit"
- :visible.sync="DataVisible" @submit="updataSumbit"></FormTemplateDialog>
+ :visible.sync="DataVisible"
+ type="edit" @submit="updataSumbit"></FormTemplateDialog>
<!-- 鍙戝竷-->
<set-personnel :parameter="this.parameter" :title="title" :visible.sync="visibleFlow"
@onLoad="onLoad"></set-personnel>
@@ -175,8 +175,8 @@
tableHeadBtnData: {
type: Array,
},
- Treedata:{
- type:Array
+ Treedata: {
+ type: Array
}
},
data() {
@@ -184,7 +184,7 @@
// 鐘舵�佹悳绱�
statusSelect: "all",
// 鍏抽敭瀛楁煡璇�
- keyWordFind:"",
+ keyWordFind: "",
searchResults: [],
//棣栭〉鍙充晶鎼滅储
WupinFindValue: "",
@@ -193,7 +193,7 @@
//鍙戝竷
parameter: {
ids: [],
- btmtype:'',
+ btmtype: '',
code: "",
type: '',
// this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC'
@@ -272,9 +272,9 @@
created() {
// const index = this.$route.query.id.indexOf('@name=') + '@name='.length;
// this.result = this.$route.query.id.substring(index);
- getUserInfo().then(res=>{
+ getUserInfo().then(res => {
console.log(res.data.data)
- this.result=res.data.data.realName
+ this.result = res.data.data.realName
})
},
mounted() {
@@ -322,12 +322,12 @@
}
}
- if(_index==0){
- this.keyWordFind=record.field
+ if (_index == 0) {
+ this.keyWordFind = record.field
}
})
this.tableHeadFindDatas = newval;
- this.WupinFindValue=''
+ this.WupinFindValue = ''
},
},
total: {
@@ -434,7 +434,7 @@
},
// 鍙戝竷
setHandler() {
- console.log('Treedata',this.Treedata)
+ console.log('Treedata', this.Treedata)
if (this.selectRow.length > 0) {
let hasEditing = this.selectRow.some(item => item.lcstatus !== 'Editing');
let showMessage = true;
@@ -451,7 +451,7 @@
this.parameter.processName = this.result + '-鐢宠[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']';
this.parameter.type = 'PUBLIC';
this.parameter.code = this.templateOid;
- this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
+ this.parameter.btmtype = this.selectRow[0].btmname || this.selectRow[0].btmtype;
this.title = '娴佺▼瀹℃壒'
this.visibleFlow = true;
} else {
@@ -501,7 +501,7 @@
this.parameter.processName = this.result + '-鍋滅敤[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']';
this.parameter.type = 'DISABLE';
this.parameter.code = this.templateOid
- this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
+ this.parameter.btmtype = this.selectRow[0].btmname || this.selectRow[0].btmtype;
this.title = '鍋滅敤锛堝喕缁擄級缂栫爜鏁版嵁'
this.visibleDeactivate = true;
} else {
@@ -528,7 +528,7 @@
}
}
});
- } else if(this.selectRow.length == 1 && !hasEditing && showMessage ) {
+ } else if (this.selectRow.length == 1 && !hasEditing && showMessage) {
this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹负銆愬彂甯冪姸鎬併�戞墠鍙互鍙戣捣娴佺▼')
}
});
@@ -552,7 +552,7 @@
this.parameter.processName = this.result + '-鍚敤[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']';
this.parameter.type = 'Released';
this.parameter.code = this.templateOid
- this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
+ this.parameter.btmtype = this.selectRow[0].btmname || this.selectRow[0].btmtype;
this.title = '鍚敤缂栫爜鏁版嵁'
this.visibleDeactivate = true;
} else {
@@ -609,7 +609,7 @@
this.parameter.processName = this.result + '-鍥炴敹[' + this.selectRow[0].btmname + '-' + this.selectRow[0].name + ']';
this.parameter.type = 'TakeBack';
this.parameter.code = this.templateOid
- this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype;
+ this.parameter.btmtype = this.selectRow[0].btmname || this.selectRow[0].btmtype;
this.title = '鍥炴敹缂栫爜鏁版嵁'
this.visibleDeactivate = true;
} else {
@@ -874,12 +874,12 @@
})
},
//鏁版嵁鏇存敼鍥炶皟
- updataSumbit(val){
+ updataSumbit(val) {
this.DataVisible = false;
val.copyFromVersion = this.rowOid;
- val.oid=''
+ val.oid = '';
console.log(val)
- upSaveCode(val).then(res=>{
+ upSaveCode(val).then(res => {
console.log(res)
this.$nextTick(() => {
this.onLoad()
@@ -902,7 +902,7 @@
codeClassifyOid: this.codeClassifyOid,
page: this.page.currentPage,
limit: this.page.pageSize,
- [ 'conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*'
+ ['conditionMap[' + this.keyWordFind + ']']: '*' + this.WupinFindValue + '*'
}).then(res => {
this.tableData = res.data.data
})
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 3eecc2d..0607560 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -1,53 +1,79 @@
<template>
<div>
- <div style="display: flex;flex-wrap: wrap; display: inline-block" v-if="this.crudArrayFlag" class="app" >
+ <div v-if="this.crudArrayFlag" class="app" style="display: flex;flex-wrap: wrap; display: inline-block">
<el-button-group>
- <!--鏂板-->
- <el-button v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )" size="small" type="primary" icon="el-icon-plus" plain @click="busineHandle">娣诲姞 {{ msg }}</el-button>
- <!-- 鍏ㄥ睆缂栬緫-->
- <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false && editOpenFlag&&(!checkStatus || crudLCStatus=='Editing')" size="small" @click="fullscreenHandle" icon="el-icon-full-screen">鍏ㄥ睆缂栬緫</el-button>
- <!-- 楠岃瘉瑙勫垯-->
- <el-button v-if="(!checkStatus || crudLCStatus=='Editing' )&& editOpenFlag" icon="el-icon-info" size="small" @click="ruleAddHandler">楠岃瘉瑙勫垯</el-button>
- <!-- 灞炴�у垎缁�-->
- <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-menu" size="small" @click="attrVisibleHandle">灞炴�у垎缁�</el-button>
+ <!--鏂板-->
+ <el-button
+ v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )"
+ icon="el-icon-plus" plain size="small" type="primary" @click="busineHandle">娣诲姞 {{ msg }}
+ </el-button>
+ <!-- 鍏ㄥ睆缂栬緫-->
+ <el-button
+ v-if=" attrEditVisible == false && attrFlagChiledren==false && editOpenFlag&&(!checkStatus || crudLCStatus=='Editing')"
+ icon="el-icon-full-screen" size="small" @click="fullscreenHandle">鍏ㄥ睆缂栬緫
+ </el-button>
+ <!-- 楠岃瘉瑙勫垯-->
+ <el-button v-if="(!checkStatus || crudLCStatus=='Editing' )&& editOpenFlag" icon="el-icon-info" size="small"
+ @click="ruleAddHandler">楠岃瘉瑙勫垯
+ </el-button>
+ <!-- 灞炴�у垎缁�-->
+ <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-menu" size="small"
+ @click="attrVisibleHandle">灞炴�у垎缁�
+ </el-button>
</el-button-group>
<el-button-group>
<!-- 淇濆瓨-->
- <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click.prevent="addsHandler" icon="el-icon-check">淇濆瓨</el-button>
+ <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-check" plain size="small"
+ type="success" @click.prevent="addsHandler">淇濆瓨
+ </el-button>
<!-- 棰勮鎺掑簭-->
- <el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">棰勮鎺掑簭</el-button>
+ <el-button icon="el-icon-arrow-down" size="small" @click="orderHandle">棰勮鎺掑簭</el-button>
<!-- 鍒犻櫎-->
- <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" size="small" @click="CrudRemove" icon="el-icon-delete">鍒犻櫎</el-button>
+ <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-delete" size="small"
+ @click="CrudRemove">鍒犻櫎
+ </el-button>
<!-- 閲嶇疆-->
- <el-button size="small" @click="reset" icon="el-icon-refresh-right">閲嶇疆</el-button>
+ <el-button icon="el-icon-refresh-right" size="small" @click="reset">閲嶇疆</el-button>
</el-button-group>
<el-button-group>
<!--鏂板-->
- <!-- 鍒嗙被娉ㄥ叆-->
- <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-magic-stick" size="small" @click="injectBtn">鍒嗙被娉ㄥ叆</el-button>
+ <!-- 鍒嗙被娉ㄥ叆-->
+ <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-magic-stick"
+ size="small" @click="injectBtn">鍒嗙被娉ㄥ叆
+ </el-button>
<!-- 缁勫悎瑙勫垯-->
- <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-film" size="small" @click="isShowHandler">缁勫悎瑙勫垯</el-button>
- <!-- 鏋氫妇娉ㄥ叆-->
- <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-c-scale-to-original" size="small" @click="enmuVisHandle">鏋氫妇娉ㄥ叆</el-button>
- <!-- 绾ц仈灞炴��-->
- <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-coin" size="small" @click="CascadeHandle">绾ц仈灞炴��</el-button>
+ <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-film" size="small"
+ @click="isShowHandler">缁勫悎瑙勫垯
+ </el-button>
+ <!-- 鏋氫妇娉ㄥ叆-->
+ <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-c-scale-to-original"
+ size="small" @click="enmuVisHandle">鏋氫妇娉ㄥ叆
+ </el-button>
+ <!-- 绾ц仈灞炴��-->
+ <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-coin" size="small"
+ @click="CascadeHandle">绾ц仈灞炴��
+ </el-button>
</el-button-group>
<el-button-group>
- <!-- 鍚屾鍒板叾浠栨ā鏉�-->
- <el-button size="small"@click="syncHandle" icon="el-icon-share">鍚屾鍒板叾浠栨ā鏉�</el-button>
+ <!-- 鍚屾鍒板叾浠栨ā鏉�-->
+ <el-button icon="el-icon-share" size="small" @click="syncHandle">鍚屾鍒板叾浠栨ā鏉�</el-button>
</el-button-group>
<el-button-group>
- <!-- 缂栫爜鐢宠棰勮-->
- <el-button size="small" icon="el-icon-view" @click="applicationHandle" style="">缂栫爜鐢宠棰勮</el-button>
+ <!-- 缂栫爜鐢宠棰勮-->
+ <el-button icon="el-icon-view" size="small" style="" @click="applicationHandle">缂栫爜鐢宠棰勮</el-button>
</el-button-group>
<!-- 鏄惁寮�鍚紪杈� -->
- <el-button-group>
- <el-button size="small" plain icon="el-icon-view" v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" @click="editOpen" >寮�鍚紪杈�</el-button>
- </el-button-group>
- <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" size="small" v-model="selectvalue" placeholder="璇烽�夋嫨">
+ <el-button-group>
+ <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" icon="el-icon-view" plain
+ size="small"
+ @click="editOpen">寮�鍚紪杈�
+ </el-button>
+ </el-button-group>
+ <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="selectvalue" placeholder="璇烽�夋嫨"
+ size="small">
<el-option
v-for="item in selectoptions"
:key="item.value"
@@ -55,10 +81,11 @@
:value="item.value">
</el-option>
</el-select>
- <el-switch v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="switchvalue" @change="batchSetFlag" active-value="true" style="margin:6px 0 0 10px">
+ <el-switch v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="switchvalue"
+ active-value="true" style="margin:6px 0 0 10px" @change="batchSetFlag">
</el-switch>
</div>
-<!-- 寮圭獥-->
+ <!-- 寮圭獥-->
<div>
<!-- 缂栫爜鐢宠棰勮-->
<FormTemplateDialog
@@ -85,14 +112,14 @@
</div>
</el-dialog>
<!-- 鏋氫妇娉ㄥ叆-->
- <el-dialog :visible.sync="enumVisible" append-to-body title="鏋氫妇娉ㄥ叆" :before-close="this.enumBeforeClose">
+ <el-dialog :before-close="this.enumBeforeClose" :visible.sync="enumVisible" append-to-body title="鏋氫妇娉ㄥ叆">
<!-- 娓叉煋琛ㄦ牸鍙婃寜閽� -->
<!-- 娓叉煋琛ㄦ牸鍙婃寜閽� -->
<el-alert
- title="璇锋柊澧炲悗鐐瑰嚮鍗曞厓鏍艰緭鍏ユ灇涓炬暟鎹�"
- type="success"
+ :closable="false"
style="margin-bottom: 10px;display: inline-block"
- :closable="false">
+ title="璇锋柊澧炲悗鐐瑰嚮鍗曞厓鏍艰緭鍏ユ灇涓炬暟鎹�"
+ type="success">
</el-alert>
<div>
<el-button icon="el-icon-plus" type="primary" @click="addRow">鏂板</el-button>
@@ -116,7 +143,7 @@
</el-table-column>
<el-table-column fixed="right" label="鎿嶄綔" width="120">
<template slot-scope="scope">
- <el-button size="small" type="text" plain @click="enumDeleteRow">
+ <el-button plain size="small" type="text" @click="enumDeleteRow">
绉婚櫎
</el-button>
</template>
@@ -151,7 +178,8 @@
<el-radio-group v-model="injectOption.classifyInvokeLevel">
<el-radio label="min">鏈�灏忓眰</el-radio>
<el-radio label="max">鎸囧畾灞�</el-radio>
- <el-input-number v-if="this.injectOption.classifyInvokeLevel == 'max'" v-model="injectOption.classifyNumber" :max="10" :min="0"
+ <el-input-number v-if="this.injectOption.classifyInvokeLevel == 'max'"
+ v-model="injectOption.classifyNumber" :max="10" :min="0"
controls-position="right"></el-input-number>
</el-radio-group>
</el-form-item>
@@ -171,7 +199,8 @@
</div>
</el-dialog>
<!-- 灞炴�у垎缁�-->
- <el-dialog :visible.sync="attrVisible" append-to-body :before-close="attrClose" style="width: 800px; left:30vw;top: 10vh ;"
+ <el-dialog :before-close="attrClose" :visible.sync="attrVisible" append-to-body
+ style="width: 800px; left:30vw;top: 10vh ;"
title="杈撳叆鍒嗙粍鐨勫悕绉�">
<el-form ref="form" label-width="70px">
<el-form-item label="灞炴�у垎缁�">
@@ -222,19 +251,22 @@
</el-container>
</el-dialog>
<!-- 鍏ㄥ睆缂栬緫-->
- <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true" :before-close="escEdit" >
- <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" @editCloseChildren="editClose" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
+ <el-dialog :before-close="escEdit" :visible.sync="attrEditVisible" append-to-body fullscreen="true">
+ <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :crudArrayFlag="this.crudArrayFlag"
+ :editOpenFlag="editOpenFlag" :editStyleFlag="editStyleFlag"
+ @editCloseChildren="editClose"></attrCrud>
</el-dialog>
<!-- 缁勫悎瑙勫垯-->
- <formula-editor :systemVariableTableData="systemVariableTableData"
+ <formula-editor :componentRuleText="componentRuleText"
+ :systemVariableTableData="systemVariableTableData"
:thisSceneTableData="thisSceneTableData"
:visible.sync="isShowformulaEdit"
@updateFormulaContent="updataFormlaContent"
- :componentRuleText="componentRuleText"
></formula-editor>
<!-- 鏂板 -->
<el-dialog :visible.sync="addVisible" append-to-body title="浠庝笟鍔$被鍨嬩腑閫夋嫨灞炴��">
- <avue-crud ref="AddOriginPlace" :data="businessData" :option="businessOption" @selection-change="businessSelect">
+ <avue-crud ref="AddOriginPlace" :data="businessData" :option="businessOption"
+ @selection-change="businessSelect">
<template slot="menuLeft">
<div style="display: flex;">
<el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 150px !important;">
@@ -246,7 +278,7 @@
style="width: 150px">
</el-option>
</el-select>
- <el-input style="width: 400px;margin-left: 20px" v-model="SelectFInd"></el-input>
+ <el-input v-model="SelectFInd" style="width: 400px;margin-left: 20px"></el-input>
<el-button size="small" style="margin-left: 10px" @click="AddFindHandler">鏌ヨ</el-button>
</div>
</template>
@@ -258,46 +290,52 @@
</el-dialog>
<!-- 鍙傜収閰嶇疆-->
- <refer-config-dialog
- :display="referConfigVisble"
- @setReferConfigValue="setReferConfigValue"
- :referConfigOption="referConfigOption"
- ></refer-config-dialog>
+ <refer-config-dialog
+ :display="referConfigVisble"
+ :referConfigOption="referConfigOption"
+ @setReferConfigValue="setReferConfigValue"
+ ></refer-config-dialog>
</div>
- <el-table :data="ProData"
- style="width: 100%"
- :height="this.editStyleFlag? 800 : 343"
- @cell-click="handleCellClicks"
- @select="selectHandle"
- @selection-change="selectionChange"
- @row-click="rowClick"
- v-if="this.crudArrayFlag"
+ <el-table v-if="this.crudArrayFlag"
ref="referAttrCrud"
v-loading="loading"
+ :data="ProData"
+ :height="this.editStyleFlag? 800 : 343"
+ style="width: 100%"
+ @select="selectHandle"
+ @cell-click="handleCellClicks"
+ @selection-change="selectionChange"
+ @row-click="rowClick"
>
<el-table-column
- type="selection"
- width="55" fixed>
+ fixed
+ type="selection" width="55">
</el-table-column>
<!--<el-table-column fixed label="搴忓彿" type="index" width="55"></el-table-column>-->
- <el-table-column v-for="(item,index) in this.option.column" :key="item.id"
+ <el-table-column v-for="(item,index) in this.option.column" v-if="item.edit !='referName'"
+ :key="item.id"
+ :fixed="item.fixed"
+ :formatter="formAttr"
:label="item.label"
:prop="item.prop"
- :formatter="formAttr"
- :width="item.width||(item.label.length >=4 ?'160':item.label.length==3 ?'130':'100')"
:show-overflow-tooltip="true"
:sortable="item.sortable"
- :fixed="item.fixed"
+ :width="item.width||(item.label.length >=4 ?'160':item.label.length==3 ?'130':'100')"
align="center"
- v-if="item.edit !='referName'"
>
<template slot-scope="{ row }">
- <el-input ref="inputRef" v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" v-model="row[item.prop]"
- @blur="saveRows" autofocus ></el-input>
- <el-input-number size="small" controls-position="right" v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
- @blur="saveRows" :style="{width:(item.width-10)+'px'}"></el-input-number>
- <el-select v-model="row[item.prop]" filterable allow-create default-first-option slot="prepend" v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " @blur="selectChangeHandler(item.editConfig,index)">
+ <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )"
+ ref="inputRef"
+ v-model="row[item.prop]"
+ autofocus @blur="saveRows"></el-input>
+ <el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
+ :style="{width:(item.width-10)+'px'}"
+ controls-position="right"
+ size="small" @blur="saveRows"></el-input-number>
+ <el-select v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " slot="prepend" v-model="row[item.prop]" allow-create default-first-option
+ filterable
+ @blur="selectChangeHandler(item.editConfig,index)">
<el-option
v-for="optionItem in item.data"
:key="optionItem.dictValue"
@@ -306,7 +344,7 @@
</el-option>
</el-select>
<el-switch
- v-if="item.edit === 'switch'" v-model="row[item.prop]" active-value="true" :disabled="!editOpenFlag"
+ v-if="item.edit === 'switch'" v-model="row[item.prop]" :disabled="!editOpenFlag" active-value="true"
inactive-value="false">
</el-switch>
<span v-else>{{ row[item.prop] }}</span>
@@ -330,7 +368,7 @@
</template>
<script>
-import {AttrByBtm, gridCodeClassifyTemplateAttr, batchAddSave, copyto,listByFlag} from '@/api/template/templateAttr'
+import {AttrByBtm, gridCodeClassifyTemplateAttr, batchAddSave, copyto, listByFlag} from '@/api/template/templateAttr'
import {getList} from "@/api/refer/table";
import func from "@/util/func";
@@ -344,16 +382,16 @@
type: String,
default: ''
},
- checkStatus:{
+ checkStatus: {
type: Boolean,
default: false
},
//鎺у埗鏄惁寮�鍚紪杈�
- editOpenFlag:{
+ editOpenFlag: {
type: Boolean,
default: false
},
- editStyleFlag:{
+ editStyleFlag: {
type: Boolean,
default: false
},
@@ -375,89 +413,89 @@
type: Boolean,
default: false
},
- crudArrayFlag:{
+ crudArrayFlag: {
type: Boolean,
default: false
},
},
- watch:{
- crudOid:{
- handler(newval,oldval){
- if(newval){
- this.editOpenFlag=false
+ watch: {
+ crudOid: {
+ handler(newval, oldval) {
+ if (newval) {
+ this.editOpenFlag = false
}
}
},
- crudArrayFlag:{
- handler(newval,olaval){
- console.log('crudArrayFlag',newval)
+ crudArrayFlag: {
+ handler(newval, olaval) {
+ console.log('crudArrayFlag', newval)
}
},
- crudArray:{
- handler(newval,oldval){
- if(newval != undefined){
- if(newval.length>=1){
- this.crudArrayFlag=true
- }else{
- this.crudArrayFlag=false
+ crudArray: {
+ handler(newval, oldval) {
+ if (newval != undefined) {
+ if (newval.length >= 1) {
+ this.crudArrayFlag = true
+ } else {
+ this.crudArrayFlag = false
}
}
},
- deep:true,
- immediate:true
+ deep: true,
+ immediate: true
},
- Formlist:{
- handler(newval,oldval){
- if(newval.length === 0){
- this.crudArrayFlag=false
+ Formlist: {
+ handler(newval, oldval) {
+ if (newval.length === 0) {
+ this.crudArrayFlag = false
return
}
}
},
- ProData:{
- handler(newval,oldval){
- if(newval){
- this.loading=true;
+ ProData: {
+ handler(newval, oldval) {
+ if (newval) {
+ this.loading = true;
setTimeout(() => {
- this.loading=false
+ this.loading = false
}, 1000);
}
}
},
- 'injectOption.classifyInvokeAttr': function(newVal) {
+ 'injectOption.classifyInvokeAttr': function (newVal) {
if (newVal === "name") {
- this.injectOption.classifyInvokeAttrName='鍒嗙被鍚嶇О'
+ this.injectOption.classifyInvokeAttrName = '鍒嗙被鍚嶇О'
} else if (newVal === "id") {
- this.injectOption.classifyInvokeAttrName='鍒嗙被浠e彿'
+ this.injectOption.classifyInvokeAttrName = '鍒嗙被浠e彿'
}
return '';
},
- editOpenFlag:{
- handler(newval,oldval){
- console.log('editOpenFlag',newval)
+ editOpenFlag: {
+ handler(newval, oldval) {
+ console.log('editOpenFlag', newval)
},
- deep:true,
- immediate:true
+ deep: true,
+ immediate: true
}
},
data() {
return {
//鍏ㄥ睆缂栬緫楂樺害鐘舵��
- editStyleFlag:false,
- loading:false,
- referConfigText:"",
- referConfigVisble:false,
- referConfigOption:{
- referConfig:'',
+ editStyleFlag: false,
+ loading: false,
+ referConfigText: "",
+ referConfigVisble: false,
+ referConfigOption: {
+ referConfig: '',
},
screenWidth: document.documentElement.clientWidth, // 灞忓箷瀹藉害
//褰撳墠鍗曞厓鏍�
- CurrentCell:'',
+ CurrentCell: '',
// 鏂板
- SelectValue:"",
- SelectFInd:"",
- SelectOption:[
+ SelectValue: "",
+ SelectFInd: "",
+ SelectOption: [
{
value: 'name',
label: '灞炴�т腑鏂囧悕绉�'
@@ -468,12 +506,12 @@
}
],
//鍙傜収
- referVisible:false,
- crudArrayFlag:false,
+ referVisible: false,
+ crudArrayFlag: false,
editingRows: null,
- editShows:"",
+ editShows: "",
attrFlag: false,
- referObject:{},
+ referObject: {},
//缂栫爜鐢宠棰勮option
applicationoption: {
column: []
@@ -580,7 +618,7 @@
// 绾ц仈鍗曢��
selectRow: '',
//绾ц仈鍗曢�夋暟缁�
- selectRowArr:[],
+ selectRowArr: [],
// 绾ц仈data
CascadeData: [],
// 绾ц仈option
@@ -875,18 +913,18 @@
addvisible: false,
//鍒嗙被娉ㄥ叆option
injectOption: {
- classifyInvokeAttrName:'鍒嗙被鍚嶇О',
+ classifyInvokeAttrName: '鍒嗙被鍚嶇О',
classifyInvokeAttr: "name",
classifyInvokeEditFlag: "true",
- classifyInvokeLevel:'min',
+ classifyInvokeLevel: 'min',
//鍒嗙被娉ㄥ叆璁℃暟鍣�
- classifyNumber:0,
+ classifyNumber: 0,
},
// 灞炴�ч獙璇佽緭鍏ユ
RulesForm: {
expressionText: "",
TestContent: "",
- ruleRowBds:""
+ ruleRowBds: ""
},
//灞炴�ч獙璇佽鍒欓厤缃�
rulesOption: {
@@ -1050,7 +1088,7 @@
{
label: "鏁版嵁绫诲瀷",
prop: "attrDataType",
- formatter:function(row,column){
+ formatter: function (row, column) {
let vciFieldTypeMap = {
VTBoolean: "甯冨皵鍨�",
VTClob: "闀挎枃鏈�",
@@ -1069,7 +1107,9 @@
{
label: "鍙┖",
prop: "nullableFlag",
- formatter:function(row,column){return row.nullableFlag=='true' || row.nullableFlag=='1'?'鏄�':'鍚�'}
+ formatter: function (row, column) {
+ return row.nullableFlag == 'true' || row.nullableFlag == '1' ? '鏄�' : '鍚�'
+ }
},
{
label: "榛樿鍊�",
@@ -1140,14 +1180,14 @@
width: 90,
fixed: true
}, {
- label: "灞炴�ц嫳鏂囩紪鍙�",
- prop: "id",
- fixed: true,
- cell: false,
- labelWidth: 110,
- width: 125,
- sortable: false,
- },
+ label: "灞炴�ц嫳鏂囩紪鍙�",
+ prop: "id",
+ fixed: true,
+ cell: false,
+ labelWidth: 110,
+ width: 125,
+ sortable: false,
+ },
{
label: "灞炴�т腑鏂囧悕绉�",
prop: "name",
@@ -1407,7 +1447,7 @@
],
List: []
},
- vciFieldTypeMap : {
+ vciFieldTypeMap: {
VTBoolean: "甯冨皵鍨�",
VTClob: "闀挎枃鏈�",
VTDate: "鏃ユ湡",
@@ -1420,9 +1460,9 @@
VTString: "瀛楃涓�"
},
//鏃堕棿鏍煎紡涓嬫媺妗�
- codeDataFlag:false,
- // 缁勫悎瑙勫崟鍏冩牸缂栬緫鍥炲~
- componentRuleText:"",
+ codeDataFlag: false,
+ // 缁勫悎瑙勫崟鍏冩牸缂栬緫鍥炲~
+ componentRuleText: "",
//妯℃澘灞炴�т笅鎷夎缃畇witch
selectoptions: [{
value: 'keyAttrFlag',
@@ -1466,10 +1506,10 @@
}],
//妯℃澘灞炴�т笅鎷夐�変腑鍊�
selectvalue: 'keyAttrFlag',
- switchvalue:'false'
+ switchvalue: 'false'
}
},
- computed:{
+ computed: {
attrOids() {
let oids = [];
this.attrSelectList.forEach(ele => {
@@ -1488,63 +1528,63 @@
mounted() {
},
created() {
- this.option.column.forEach((item,index) => {
+ this.option.column.forEach((item, index) => {
if (item.edit == 'select') {
- this.selectChangeHandler(item.editConfig,index)
+ this.selectChangeHandler(item.editConfig, index)
}
})
},
methods: {
//鏂板鎼滅储
- AddFindHandler(){
- if(this.SelectValue == 'id'){
- const masterParameter={
- 'conditionMap[id]':this.SelectFInd
+ AddFindHandler() {
+ if (this.SelectValue == 'id') {
+ const masterParameter = {
+ 'conditionMap[id]': this.SelectFInd
}
this.BuineAttrByBtm(masterParameter);
- this.SelectValue=""
- this.SelectFInd=""
- }else if(this.SelectValue == 'name'){
- const masterParameter={
- 'conditionMap[name]':this.SelectFInd
+ this.SelectValue = ""
+ this.SelectFInd = ""
+ } else if (this.SelectValue == 'name') {
+ const masterParameter = {
+ 'conditionMap[name]': this.SelectFInd
}
this.BuineAttrByBtm(masterParameter)
- this.SelectValue=""
- this.SelectFInd=""
+ this.SelectValue = ""
+ this.SelectFInd = ""
}
},
//鍙傜収閰嶇疆瀛愮粍浠�
- echoReferConfig(val){
- this.referObject=val
- this.$set(this.CurrentCell,'referConfig',JSON.stringify(val))
+ echoReferConfig(val) {
+ this.referObject = val
+ this.$set(this.CurrentCell, 'referConfig', JSON.stringify(val))
},
//鍙緭鍙�変笅鎷�
- selectChangeHandler(editConfig,index){
- let that=this;
+ selectChangeHandler(editConfig, index) {
+ let that = this;
/*if(that.option.column[index].data && that.option.column[index].data.length>=0){
return;
}*/
- listByFlag(editConfig.extraParams).then(res=>{
- that.option.column[index].data=res.data.data;
+ listByFlag(editConfig.extraParams).then(res => {
+ that.option.column[index].data = res.data.data;
})
},
//灞炴�у垎缁勬寜閽�
attrVisibleHandle() {
- if (this.attrSelectList < 1) {
+ if (this.attrSelectList < 1) {
this.$message.warning('璇烽�夋嫨妯℃澘灞炴��')
- } else {
+ } else {
this.attrVisible = true;
}
},
//灞炴�у垎缁勬彁浜�
attrHandle() {
- this.attrSelectList.forEach(item=>{
- item.attributeGroup=this.attrModel
+ this.attrSelectList.forEach(item => {
+ item.attributeGroup = this.attrModel
})
- if(this.CurrentCell){
+ if (this.CurrentCell) {
this.$set(this.CurrentCell, 'attributeGroup', this.attrModel)
- }else {
+ } else {
this.$set(this.attrSelectList[0], 'attributeGroup', this.attrModel)
}
this.attrClose()
@@ -1553,18 +1593,18 @@
attrRemove() {
this.attrModel = ""
},
- attrClose(){
+ attrClose() {
this.attrModel = "";
- this.attrVisible=false
+ this.attrVisible = false
},
//琛ㄦ牸鏁版嵁
CrudRend() {
if (this.crudOid != '') {
- gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.crudOid,limit:-1}).then(res => {
- this.loading=true
+ gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.crudOid, limit: -1}).then(res => {
+ this.loading = true
setTimeout(() => {
this.ProData = res.data.data;
- this.loading=false
+ this.loading = false
}, 1000);
}).catch(res => {
@@ -1589,7 +1629,7 @@
})
if (!isCopy) {
citem.oid = ''
- this.busineAddList=Object.assign(citem, {
+ this.busineAddList = Object.assign(citem, {
orderNum: ++ordernum,
attributeDataType: citem.attrDataType,
attributeDataTypeText: this.vciFieldTypeMap[citem.attrDataType],
@@ -1608,7 +1648,7 @@
queryAttrFlag: 'true',
seniorQueryAttrFlag: 'true',
attrTableWidth: 120,
- ts:""
+ ts: ""
})
this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList)))
}
@@ -1630,8 +1670,8 @@
})
},
//涓氬姟绫诲瀷鏁版嵁
- BuineAttrByBtm(masterParameter){
- AttrByBtm({'conditionMap[oid]': this.crudOid,...masterParameter}).then(res => {
+ BuineAttrByBtm(masterParameter) {
+ AttrByBtm({'conditionMap[oid]': this.crudOid, ...masterParameter}).then(res => {
this.businessData = res.data.data;
})
},
@@ -1655,24 +1695,27 @@
CascadeAddHandle() {
let CascadeString = "";
CascadeString = this.selectRowArr.id + (this.selectRowArr.name);
- if(this.CurrentCell){
+ if (this.CurrentCell) {
this.$set(this.CurrentCell, 'parentCode', CascadeString)
- }else {
+ } else {
this.$set(this.attrSelectList[0], 'parentCode', CascadeString)
}
this.CascadeVisible = false;
},
//绾ц仈灞炴�ф竻闄�
casRemove() {
- this.selectRow = ""
+ this.selectRow = "";
+ this.$set(this.CurrentCell, 'parentCode', this.selectRow);
+ this.CascadeVisible = false;
+
},
// 绾ц仈灞炴�ц鍗曢��
CascaderowClick(row) {
this.selectRow = row.$index;
- this.selectRowArr=row
+ this.selectRowArr = row
},
// 鎺掑簭棰勮鎸夐挳
- orderHandle(){
+ orderHandle() {
this.$refs.referAttrCrud.sort("orderNum");
},
//琛ㄦ牸鍗曢��
@@ -1684,7 +1727,7 @@
selectionChange(list) {
this.attrSelectList = list;
},
- rowClick(row){
+ rowClick(row) {
this.$refs.referAttrCrud.clearSelection();
this.attrSelectList = [row];
this.$refs.referAttrCrud.setCurrentRow(row);
@@ -1698,62 +1741,62 @@
this.$refs.referAttrCrud.sort("orderNum");
var ischeck = true;
console.log(this.ProData)
- this.ProData.forEach((item,index)=>{
- if((item.requireFlag && item.requireFlag.toString()=='true') && (item.readOnlyFlag && item.readOnlyFlag.toString()=='true')){
- this.$message.warning(item.name+"("+item.id+")蹇呰緭鐨勫睘鎬т笉鑳芥槸鍙");
+ this.ProData.forEach((item, index) => {
+ if ((item.requireFlag && item.requireFlag.toString() == 'true') && (item.readOnlyFlag && item.readOnlyFlag.toString() == 'true')) {
+ this.$message.warning(item.name + "(" + item.id + ")蹇呰緭鐨勫睘鎬т笉鑳芥槸鍙");
console.log(item)
- ischeck=false;
+ ischeck = false;
return;
}
- var num=0;
- if(item.componentRule){
+ var num = 0;
+ if (item.componentRule) {
//缁勫悎瑙勫垯
num++
- console.log('componentRule',num)
+ console.log('componentRule', num)
}
- if(item.enumString || item.enumId){
+ if (item.enumString || item.enumId) {
//鏋氫妇
num++
- console.log('enumString',num)
+ console.log('enumString', num)
}
- if(item.referConfig || item.referBtmId){
+ if (item.referConfig || item.referBtmId) {
//鍙傜収
num++
- console.log('referConfig',num)
+ console.log('referConfig', num)
}
- if(item.codeDateFormat){
+ if (item.codeDateFormat) {
//鏃堕棿鏍煎紡
num++
- console.log('codeDateFormat',num)
+ console.log('codeDateFormat', num)
}
//濡傛灉绌哄悗鍙拌繑鍥瀗one
- if(item.classifyInvokeLevel && item.classifyInvokeLevel != 'none'){
+ if (item.classifyInvokeLevel && item.classifyInvokeLevel != 'none') {
//鍒嗙被娉ㄥ叆
num++
- console.log('classifyInvokeLevel',num)
+ console.log('classifyInvokeLevel', num)
console.log(item.classifyInvokeLevel)
}
- if(num>1 && ischeck){
+ if (num > 1 && ischeck) {
this.$message({
showClose: true,
- message: item.name+"("+item.id+") 灞炴�у彧鑳芥槸缁勫悎瑙勫垯锛屾灇涓撅紝鍙傜収锛屾椂闂存牸寮忥紝鍒嗙被娉ㄥ叆涓殑涓�绉�",
+ message: item.name + "(" + item.id + ") 灞炴�у彧鑳芥槸缁勫悎瑙勫垯锛屾灇涓撅紝鍙傜収锛屾椂闂存牸寮忥紝鍒嗙被娉ㄥ叆涓殑涓�绉�",
type: 'warning'
});
- ischeck=false;
+ ischeck = false;
return;
}
})
- if(!ischeck){
- return ;
+ if (!ischeck) {
+ return;
}
// 鏂板嚱鏁扮敤浜庢墽琛宐atchAddSave鏂规硶
const executeBatchAddSave = () => {
batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
this.$message.success('淇濆瓨鎴愬姛')
- this.editOpenFlag=false;
+ this.editOpenFlag = false;
// 璋冪敤鐖剁粍浠朵慨鏀规寜閽姸鎬�
this.$emit('editCloseChildren')
- }).catch(()=>{
+ }).catch(() => {
this.$message.warning('淇濆瓨澶辫触锛岃鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
});
}
@@ -1762,65 +1805,65 @@
},
//琛ㄦ牸琛岀紪杈�
handleCellClicks(row, column) {
- if(this.editOpenFlag){
- this.editingRows = row;
- this.editShows = column.property;
- this.rowOid = row.oid;
- this.CurrentCell=row;
- if(column.property == 'referConfig' ){
- this.referConfigVisble= true;
- this.referConfigOption = {
- referConfig: this.CurrentCell.referConfig || '',
- }
- if(this.CurrentCell.referConfig == ''){
- this.referConfigOption = {
- referConfig:'',
- }
- }
- // this.$refs.referConfigFormDialog.onloadAttrData();
- }else if(column.property == 'classifyInvokeText'){
- this.injectVisible=true;
- if (this.CurrentCell.classifyInvokeAttr != '') {
- this.injectOption = {
- classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
- classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
- classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
- classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
- classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
- };
- } else {
- this.injectHandleReset();
- }
- }else if(column.property == 'componentRule'){
- if(this.CurrentCell){
- this.CurrentCell.componentRule=this.componentRuleText;
- }
- this.isShowformulaEdit = true;
- }else if(column.property == 'enumString'){
- this.enumVisible=true;
- if(this.attrSelectList[0].enumString != ""){
- this.tableData=JSON.parse(this.attrSelectList[0].enumString)
- return
- }
- }else if(column.property == 'parentCode'){
- gridCodeClassifyTemplateAttr({
- 'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
- 'conditionMap[oid_notequal]': this.CurrentCell.oid,
- limit:-1
- }).then(res => {
- this.CascadeData = res.data.data;
- })
- this.CascadeVisible=true;
- }else if(column.property == 'verifyRule'){
- this.RulesForm.expressionTextt=this.CurrentCell.verifyRule;
- this.rulesVisible=true;
- }else if(column.property == 'attributeGroup'){
- this.attrVisible = true;
- if(this.CurrentCell.attributeGroup !== ''){
- this.attrModel=this.CurrentCell.attributeGroup
- }
- }
- }
+ if (this.editOpenFlag) {
+ this.editingRows = row;
+ this.editShows = column.property;
+ this.rowOid = row.oid;
+ this.CurrentCell = row;
+ if (column.property == 'referConfig') {
+ this.referConfigVisble = true;
+ this.referConfigOption = {
+ referConfig: this.CurrentCell.referConfig || '',
+ }
+ if (this.CurrentCell.referConfig == '') {
+ this.referConfigOption = {
+ referConfig: '',
+ }
+ }
+ // this.$refs.referConfigFormDialog.onloadAttrData();
+ } else if (column.property == 'classifyInvokeText') {
+ this.injectVisible = true;
+ if (this.CurrentCell.classifyInvokeAttr != '') {
+ this.injectOption = {
+ classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
+ classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
+ classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
+ classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
+ classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
+ };
+ } else {
+ // this.injectHandleReset();
+ }
+ } else if (column.property == 'componentRule') {
+ if (this.CurrentCell) {
+ this.CurrentCell.componentRule = this.componentRuleText;
+ }
+ this.isShowformulaEdit = true;
+ } else if (column.property == 'enumString') {
+ this.enumVisible = true;
+ if (this.attrSelectList[0].enumString != "") {
+ this.tableData = JSON.parse(this.attrSelectList[0].enumString)
+ return
+ }
+ } else if (column.property == 'parentCode') {
+ gridCodeClassifyTemplateAttr({
+ 'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
+ 'conditionMap[oid_notequal]': this.CurrentCell.oid,
+ limit: -1
+ }).then(res => {
+ this.CascadeData = res.data.data;
+ })
+ this.CascadeVisible = true;
+ } else if (column.property == 'verifyRule') {
+ this.RulesForm.expressionTextt = this.CurrentCell.verifyRule;
+ this.rulesVisible = true;
+ } else if (column.property == 'attributeGroup') {
+ this.attrVisible = true;
+ if (this.CurrentCell.attributeGroup !== '') {
+ this.attrModel = this.CurrentCell.attributeGroup
+ }
+ }
+ }
},
saveRows() {
this.editingRows = null;
@@ -1849,20 +1892,20 @@
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬�')
} else if (this.attrSelectList.length === 1) {
this.enumVisible = true;
- if(this.attrSelectList[0].enumString != ""){
- this.tableData=JSON.parse(this.attrSelectList[0].enumString)
+ if (this.attrSelectList[0].enumString != "") {
+ this.tableData = JSON.parse(this.attrSelectList[0].enumString)
return
}
}
},
- enumBeforeClose(done){
- this.tableData=[]
+ enumBeforeClose(done) {
+ this.tableData = []
done()
},
- enumCancell(){
- this.tableData=[]
- this.enumVisible=false;
+ enumCancell() {
+ this.tableData = []
+ this.enumVisible = false;
},
//鏋氫妇娉ㄥ叆澶氶�夋
handleSelectionChange(row) {
@@ -1870,73 +1913,75 @@
},
//鏋氫妇娉ㄥ叆淇濆瓨
enumAddHandle() {
- if(this.tableData.length>=1){
- let hasError = false; // 娣诲姞涓�涓彉閲�
- this.tableData.forEach((item, index) => {
- if (item.key === '') {
- this.$message.warning(`绗�${index + 1}琛岀殑閫夐」鍊间笉鑳戒负绌篳);
- hasError = true;
- return;
- } else if (item.value === '') {
- this.$message.warning(`绗�${index + 1}琛岀殑閫夐」涓枃鏍囩涓嶈兘涓虹┖`);
- hasError = true;
- return;
- }
- });
- // 淇濆瓨鎵ц閫昏緫
- if (!hasError) {
- if (this.CurrentCell) {
- this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
- this.enumVisible = false;
- } else {
- this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
- this.tableData=[];
- this.enumVisible = false;
- }
- }
- }else {
- this.$message.warning('璇锋坊鍔犳灇涓炬敞鍏ユ暟鎹紒')
- }
+ if (this.tableData.length >= 1) {
+ let hasError = false; // 娣诲姞涓�涓彉閲�
+ this.tableData.forEach((item, index) => {
+ if (item.key === '') {
+ this.$message.warning(`绗�${index + 1}琛岀殑閫夐」鍊间笉鑳戒负绌篳);
+ hasError = true;
+ return;
+ } else if (item.value === '') {
+ this.$message.warning(`绗�${index + 1}琛岀殑閫夐」涓枃鏍囩涓嶈兘涓虹┖`);
+ hasError = true;
+ return;
+ }
+ });
+ // 淇濆瓨鎵ц閫昏緫
+ if (!hasError) {
+ if (this.CurrentCell) {
+ this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
+ this.enumVisible = false;
+ } else {
+ this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
+ this.tableData = [];
+ this.enumVisible = false;
+ }
+ }
+ } else {
+ this.$message.warning('璇锋坊鍔犳灇涓炬敞鍏ユ暟鎹紒')
+ }
},
// 灏嗘鍦ㄧ紪杈戠殑琛岀殑鐘舵�佸彉涓� null锛屽嵆閫�鍑虹紪杈戠姸鎬�
saveRow() {
this.editingRow = null;
},
//楠岃瘉瑙勫垯鎸夐挳
- ruleAddHandler(){
+ ruleAddHandler() {
if (this.attrSelectList < 1) {
this.$message.warning('璇烽�夋嫨妯℃澘灞炴��')
- } else{
- this.rulesVisible=true
+ } else {
+ this.rulesVisible = true
}
},
//瑙勫垯鏍¢獙锛屽弻鍑昏〃鍗曚簨浠�
handleRulesRowDBLClick(row) {
- this.ruleRowBds=row.bds
+ this.ruleRowBds = row.bds
this.RulesForm.expressionText = row.bds
},
// 楠岃瘉瑙勫垯娓呴櫎鍐呭
rulesremove() {
this.RulesForm.expressionText = ""
this.RulesForm.TestContent = ""
+ this.$set(this.CurrentCell, 'verifyRule', '')
+ this.rulesVisible = false
},
// 楠岃瘉瑙勫垯纭畾
rulesHandle() {
- if(this.CurrentCell){
- this.$set(this.CurrentCell,'verifyRule',this.RulesForm.expressionText)
- }else {
- this.attrSelectList.forEach((item)=>{
- this.$set(item,'verifyRule',this.RulesForm.expressionText)
- })
- this.rulesremove()
- }
+ if (this.CurrentCell) {
+ this.$set(this.CurrentCell, 'verifyRule', this.RulesForm.expressionText)
+ } else {
+ this.attrSelectList.forEach((item) => {
+ this.$set(item, 'verifyRule', this.RulesForm.expressionText)
+ })
+ this.rulesremove()
+ }
this.rulesVisible = false
},
//楠岃瘉瑙勫垯妫�鏌�
rulesExamine() {
const regex = new RegExp(this.rulesData.ruleRowBds);
- if(regex.test(this.RulesForm.TestContent)){
+ if (regex.test(this.RulesForm.TestContent)) {
this.$message.success('鏍¢獙鎴愬姛')
}
},
@@ -1956,37 +2001,39 @@
let data = {
"娉ㄥ叆绫诲瀷": this.injectOption.classifyInvokeAttr,
"娉ㄥ叆绫诲瀷鍚嶇О": this.injectOption.classifyInvokeAttrName,
- "灞傜骇璁剧疆": this.injectOption.classifyInvokeLevel=='max'?this.injectOption.classifyNumber :'min',
+ "灞傜骇璁剧疆": this.injectOption.classifyInvokeLevel == 'max' ? this.injectOption.classifyNumber : 'min',
"鏄惁鍙慨鏀�": this.injectOption.classifyInvokeEditFlag
}
- //鍕鹃�夋搷浣�
- for (const key in this.injectOption) {
- this.attrSelectList[0][key] = this.injectOption[key];
- //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
- if(this.injectOption.classifyInvokeLevel !== 'min'){
- this.attrSelectList[0].classifyInvokeLevel=this.injectOption.classifyNumber
- }else {
- this.attrSelectList[0].classifyInvokeLevel='min'
- }
- this.$set(this.attrSelectList[0],'classifyInvokeText',data)
+ //鍕鹃�夋搷浣�
+ for (const key in this.injectOption) {
+ this.attrSelectList[0][key] = this.injectOption[key];
+ //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
+ if (this.injectOption.classifyInvokeLevel !== 'min') {
+ this.attrSelectList[0].classifyInvokeLevel = this.injectOption.classifyNumber
+ } else {
+ this.attrSelectList[0].classifyInvokeLevel = 'min'
}
- this.injectHandleReset()
+ this.$set(this.attrSelectList[0], 'classifyInvokeText', data)
+ }
+ // this.injectHandleReset()
- if(this.injectOption.classifyInvokeLevel !== 'min'){
- this.injectOption.classifyInvokeLevel=this.injectOption.classifyNumber;
- }else {
- this.injectOption.classifyNumber=0;
+ if (this.injectOption.classifyInvokeLevel !== 'min') {
+ this.injectOption.classifyInvokeLevel = this.injectOption.classifyNumber;
+ } else {
+ this.injectOption.classifyNumber = 0;
}
this.injectVisible = false;
},
//鍒嗙被娉ㄥ叆娓呯┖
injectHandleReset() {
- this.injectOption.classifyInvokeAttrName = "鍒嗙被鍚嶇О";
- this.injectOption.classifyInvokeAttr = "name";
- this.injectOption.classifyInvokeLevel = "min";
- this.injectOption.classifyInvokeEditFlag = "true";
- this.injectOption.classifyNumber = "0";
+ // this.injectOption.classifyInvokeAttrName = "鍒嗙被鍚嶇О";
+ // this.injectOption.classifyInvokeAttr = "name";
+ // this.injectOption.classifyInvokeLevel = "min";
+ // this.injectOption.classifyInvokeEditFlag = "true";
+ // this.injectOption.classifyNumber = "0";
+ this.$set(this.CurrentCell, 'classifyInvokeText', '')
+ this.injectVisible = false;
},
// 鍒嗙被娉ㄥ叆鍙栨秷
injectRemove() {
@@ -2000,7 +2047,7 @@
},
//琛ㄦ牸鍒犻櫎
CrudRemove() {
- this.attrSelectList.forEach((item)=>{
+ this.attrSelectList.forEach((item) => {
const index = this.ProData.indexOf(item);
this.ProData.splice(index, 1)
})
@@ -2032,7 +2079,7 @@
} else if (this.attrSelectList.length < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬ф暟鎹�')
} else if (this.attrSelectList.length === 1) {
- this.isShowformulaEdit=true
+ this.isShowformulaEdit = true
}
},
//鍏ㄥ睆缂栬緫
@@ -2040,7 +2087,7 @@
if (this.crudArray.length < 1) {
this.$message.warning('璇烽�夋嫨涓�涓ā鏉�')
} else {
- this.editStyleFlag=true;
+ this.editStyleFlag = true;
this.attrEditVisible = true;
this.attrFlag = true;
}
@@ -2050,23 +2097,23 @@
escEdit() {
this.attrFlagChiledren = false;
this.attrEditVisible = false;
- this.editStyleFlag=false;
+ this.editStyleFlag = false;
},
//缁勫悎瑙勫垯纭畾
updataFormlaContent(val) {
- if(this.CurrentCell){
+ if (this.CurrentCell) {
this.$set(this.CurrentCell, 'componentRule', val.replace(/"/g, ''))
- }else {
+ } else {
this.$set(this.attrRow, 'componentRule', val.replace(/"/g, ''))
}
},
- setReferConfigValue(content){
+ setReferConfigValue(content) {
let submitFormJson = JSON.stringify(content);
- this.referConfigText=submitFormJson
- if(this.CurrentCell){
+ this.referConfigText = submitFormJson
+ if (this.CurrentCell) {
this.$set(this.CurrentCell, 'referConfig', JSON.stringify(content))
- }else {
+ } else {
this.$set(this.attrRow, 'referConfig', JSON.stringify(content))
}
},
@@ -2075,29 +2122,30 @@
console.log(val)
},
//寮�鍚紪杈�
- editOpen(){
- this.editOpenFlag=true;
+ editOpen() {
+ this.editOpenFlag = true;
},
//瀹氫箟涓�涓叧闂紪杈戠殑鏂规硶渚涘瓙缁勪欢浣跨敤
- editClose(){
- this.editOpenFlag=false;
+ editClose() {
+ this.editOpenFlag = false;
},
//鎵归噺璁剧疆switch
- batchSetFlag(value){
- this.attrSelectList.forEach(item=>{
- item[this.selectvalue]=value;
+ batchSetFlag(value) {
+ this.attrSelectList.forEach(item => {
+ item[this.selectvalue] = value;
})
}
}
}
</script>
-<style scoped lang="scss" >
+<style lang="scss" scoped>
.app {
- /deep/ .el-button {
- //margin: 0 10px 10px 0;
- }
+ /deep/ .el-button {
+ //margin: 0 10px 10px 0;
+ }
}
+
.el-button-group {
margin-right: 10px;
margin-bottom: 10px;
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 2868e1a..08cea12 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -2,71 +2,80 @@
<template>
<el-container>
<!-- 宸︿晶鑿滃崟-->
- <el-aside >
+ <el-aside>
<basic-container style="overflow:hidden;">
<div>
- <div>
- <div style="display: flex; flex-direction: column;">
- <div style="display: flex;">
- <el-button plain size="small" type="primary" @click="TreeAdd">娣诲姞</el-button>
- <el-button plain size="small" type="primary" @click="TreeEdit">淇敼</el-button>
- <el-button plain size="small" type="primary" @click="TreeDel">鍒犻櫎</el-button>
- <el-button plain size="small" type="primary" @click="flushed">鍒锋柊</el-button>
+ <div>
+ <div style="display: flex; flex-direction: column;">
+ <div style="display: flex;">
+ <el-button plain size="small" type="primary" @click="TreeAdd">娣诲姞</el-button>
+ <el-button plain size="small" type="primary" @click="TreeEdit">淇敼</el-button>
+ <el-button plain size="small" type="primary" @click="TreeDel">鍒犻櫎</el-button>
+ <el-button plain size="small" type="primary" @click="flushed">鍒锋柊</el-button>
+ </div>
+ <div style="display: flex; margin-top: 10px">
+ <el-button plain size="small" type="primary" @click="Enable">鍚敤</el-button>
+ <el-button plain size="small" type="primary" @click="Deactivate">鍋滅敤</el-button>
+ <el-button plain size="small" type="primary" @click.native="ImportExcel">瀵煎叆</el-button>
+ <el-button plain size="small" type="primary" @click="ExportExcel">瀵煎嚭</el-button>
+ </div>
</div>
- <div style="display: flex; margin-top: 10px">
- <el-button plain size="small" type="primary" @click="Enable">鍚敤</el-button>
- <el-button plain size="small" type="primary" @click="Deactivate">鍋滅敤</el-button>
- <el-button plain size="small" type="primary" @click.native="ImportExcel">瀵煎叆</el-button>
- <el-button plain size="small" type="primary" @click="ExportExcel">瀵煎嚭</el-button>
+ <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px">
</div>
</div>
- <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px">
- </div>
- </div>
- <!-- 鏍戣妭鐐规坊鍔犲璇濇-->
- <el-dialog :title="this.TreeFlag ? '娣诲姞鍒嗙被' :'娣诲姞涓婚搴�'" :before-close="TreeEscHandler" :visible.sync="TreeAddFormVisible" v-loading="AddLoading" append-to-body
- style="width: 1700px;margin: auto">
- <el-form ref="myForm" :model="TreeAddform" :rules="rules">
- <el-form-item :label="this.TreeFlag ? '鍒嗙被缂栧彿锛�' :'涓婚搴撶紪鍙凤細'" label-width="150px" style="display: inline-block" prop="id">
- <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input>
- </el-form-item>
- <el-form-item :label="this.TreeFlag ? '鍒嗙被鍚嶇О锛�' :'涓婚搴撳悕绉帮細'" label-width="110px" style="display: inline-block" prop="name">
- <el-input v-model="TreeAddform.name" autocomplete="off" style="width: 170px"></el-input>
- </el-form-item>
- <el-form-item label="瀛樺偍鐨勪笟鍔$被鍨嬶細" label-width="150px" v-if="TreeFlagCode" prop="btmTypeName">
- <el-input v-model="TreeAddform.btmTypeName" autocomplete="off" style="width: 585px" @focus="btmFoucus"></el-input>
- </el-form-item>
- <el-form-item label="鎻忚堪锛�" label-width="150px">
- <el-input v-model="TreeAddform.description" autocomplete="off" style="width: 585px"></el-input>
- </el-form-item>
- <el-form-item label="缂栫爜瑙勫垯锛�" label-width="150px">
- <el-input v-model="TreeAddform.codeRuleOidName" autocomplete="off" style="width: 585px" @focus="CodeFoucus"></el-input>
- </el-form-item>
- <el-form-item label="鍏抽敭灞炴�ф煡璇㈣鍒欙細" label-width="150px">
- <el-input v-model="TreeAddform.codeKeyAttrRepeatOidName" autocomplete="off" @focus="Keyfouce"
- style="width: 585px"></el-input>
- </el-form-item>
- <el-form-item label="鐩镐技鏌ヨ瑙勫垯锛�" label-width="150px">
- <el-input v-model="TreeAddform.codeResembleRuleOidName" autocomplete="off" @focus="simFouce"
- style="width: 585px"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="TreeEscHandler">鍙� 娑�</el-button>
- <el-button type="primary" @click="TreeAddHandler">纭� 瀹�</el-button>
- </div>
- </el-dialog>
- <!-- 淇敼瀵硅瘽妗�-->
- <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="淇敼鍒嗙被">
- <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode" :nodeClickList="nodeClickList" @referTreeForm="referTreeForm" @flushed="flushed"></classifyTreeform>
- </el-dialog>
- <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
- :option="Treeoption"
- style="height: calc(100vh - 230px);"
- @node-click="nodeClick"
- class="classifyTree"
- >
- </avue-tree>
+ <!-- 鏍戣妭鐐规坊鍔犲璇濇-->
+ <el-dialog v-loading="AddLoading" :before-close="TreeEscHandler"
+ :title="this.TreeFlag ? '娣诲姞鍒嗙被' :'娣诲姞涓婚搴�'" :visible.sync="TreeAddFormVisible" append-to-body
+ style="width: 1700px;margin: auto">
+ <el-form ref="myForm" :model="TreeAddform" :rules="rules">
+ <el-form-item :label="this.TreeFlag ? '鍒嗙被缂栧彿锛�' :'涓婚搴撶紪鍙凤細'" label-width="150px" prop="id"
+ style="display: inline-block">
+ <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input>
+ </el-form-item>
+ <el-form-item :label="this.TreeFlag ? '鍒嗙被鍚嶇О锛�' :'涓婚搴撳悕绉帮細'" label-width="110px" prop="name"
+ style="display: inline-block">
+ <el-input v-model="TreeAddform.name" autocomplete="off" style="width: 170px"></el-input>
+ </el-form-item>
+ <el-form-item v-if="TreeFlagCode" label="瀛樺偍鐨勪笟鍔$被鍨嬶細" label-width="150px" prop="btmTypeName">
+ <el-input v-model="TreeAddform.btmTypeName" autocomplete="off" style="width: 585px"
+ @focus="btmFoucus"></el-input>
+ </el-form-item>
+ <el-form-item label="鎻忚堪锛�" label-width="150px">
+ <el-input v-model="TreeAddform.description" autocomplete="off" style="width: 585px"></el-input>
+ </el-form-item>
+ <el-form-item label="缂栫爜瑙勫垯锛�" label-width="150px">
+ <el-input v-model="TreeAddform.codeRuleOidName" autocomplete="off" style="width: 585px"
+ @focus="CodeFoucus"></el-input>
+ </el-form-item>
+ <el-form-item label="鍏抽敭灞炴�ф煡璇㈣鍒欙細" label-width="150px">
+ <el-input v-model="TreeAddform.codeKeyAttrRepeatOidName" autocomplete="off" style="width: 585px"
+ @focus="Keyfouce"></el-input>
+ </el-form-item>
+ <el-form-item label="鐩镐技鏌ヨ瑙勫垯锛�" label-width="150px">
+ <el-input v-model="TreeAddform.codeResembleRuleOidName" autocomplete="off" style="width: 585px"
+ @focus="simFouce"></el-input>
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="TreeEscHandler">鍙� 娑�</el-button>
+ <el-button type="primary" @click="TreeAddHandler">纭� 瀹�</el-button>
+ </div>
+ </el-dialog>
+ <!-- 淇敼瀵硅瘽妗�-->
+ <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="淇敼鍒嗙被">
+ <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode" :flag="'edit'"
+ :loneTreeNewForm="TreeList" :nodeClickList="nodeClickList"
+ :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed"
+ @referTreeForm="referTreeForm"></classifyTreeform>
+ </el-dialog>
+ <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata"
+ :defaultExpandAll="false"
+ :option="Treeoption"
+ class="classifyTree"
+ style="height: calc(100vh - 230px);"
+ @node-click="nodeClick"
+ >
+ </avue-tree>
</div>
</basic-container>
</el-aside>
@@ -75,18 +84,21 @@
<!-- 鍙充晶琛ㄦ牸-->
<avue-tabs :option="tabOption" @change="handleChange"></avue-tabs>
<span v-if="type.prop==='tab1'">
- <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'renonly'" ></classifyTreeform>
+ <classifyTreeform ref="childForm" :flag="'renonly'" :loneTreeNewForm="TreeList"
+ :nodeList="nodeList"></classifyTreeform>
</span>
<span v-else-if="type.prop==='tab2'">
<basic-container>
- <avue-crud ref="textCrud" v-model="crudForm" v-loading="FormLoing" :data="this.Formlist" :option="this.crudTreeOption"
+ <avue-crud ref="textCrud" v-model="crudForm" v-loading="FormLoing" :data="this.Formlist"
+ :option="this.crudTreeOption"
@row-save="CrudRowSave"
@row-del="CrudRowDel"
@row-update="CrudRowUpdata"
@row-click="rowHandle"
>
<template slot="radio" slot-scope="{row}">
- <el-radio v-model="selectRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio>
+ <el-radio v-model="selectRow" :label="row.$index"
+ style="padding-left: 10px !important;">{{ '' }}</el-radio>
</template>
<template slot="menuLeft">
@@ -121,16 +133,16 @@
</div>
</el-dialog>
<!-- 妯℃澘鍏嬮殕 -->
- <el-dialog :visible.sync="CloneVisible" append-to-body title="鍏嬮殕妯℃澘" :before-close="cloneClose">
+ <el-dialog :before-close="cloneClose" :visible.sync="CloneVisible" append-to-body title="鍏嬮殕妯℃澘">
<el-container>
<el-aside width="300px">
<div style="margin-bottom: 5px"><el-tag>涓婚搴撳垎绫�</el-tag></div>
<!-- 鍏嬮殕妯℃澘鐨勬爲 娌跨敤棣栭〉鏍戠殑loading鍜宱ption锛屼絾鏄痙ata鍜寁-model缁戝畾鐨勬暟鎹垱寤轰竴涓柊鐨勫彉閲忥紝鍙﹀鐐瑰嚮鏂规硶涔熸槸閲嶆柊鑾峰彇鏉ユ搷浣滃厠闅嗘ā鏉跨殑鏁版嵁-->
<avue-tree ref="cloneTree" v-model="TreeAvueform" v-loading="loading" :data="Treedata"
- :defaultExpandAll="false"
- :option="Treeoption"
- style="height: 50.5vh;margin-right: 10px"
- @node-click="ClonenodeClick"
+ :defaultExpandAll="false"
+ :option="Treeoption"
+ style="height: 50.5vh;margin-right: 10px"
+ @node-click="ClonenodeClick"
>
</avue-tree>
</el-aside>
@@ -146,8 +158,10 @@
:value="item.value">
</el-option>
</el-select>
- <el-input v-model="CloneFind" size="small" style="width: 40%;margin-left: 15px" placeholder="杈撳叆鍊煎悗鎸夊洖杞﹁繘琛屾ā绯婃煡璇�"></el-input>
- <el-button size="small" type="primary" plain style="margin-left: 10px" @click="CloneEnterFind" @keyup.enter.native="CloneEnterFind">鏌ヨ</el-button>
+ <el-input v-model="CloneFind" placeholder="杈撳叆鍊煎悗鎸夊洖杞﹁繘琛屾ā绯婃煡璇�" size="small"
+ style="width: 40%;margin-left: 15px"></el-input>
+ <el-button plain size="small" style="margin-left: 10px" type="primary"
+ @click="CloneEnterFind" @keyup.enter.native="CloneEnterFind">鏌ヨ</el-button>
</div>
<avue-crud v-model="ClonecrudForm" v-loading="FormLoing" :data="this.CloneFormlist"
:option="this.ClonecrudTreeOption"
@@ -157,67 +171,69 @@
</div>
</el-main>
</el-container>
- </el-container >
- <div style="display: flex; justify-content: flex-end; align-items: center;margin-top: 10px" >
+ </el-container>
+ <div style="display: flex; justify-content: flex-end; align-items: center;margin-top: 10px">
<el-button size="small " type="primary" @click="Clonehandler">纭畾</el-button>
- <el-button size="small" @click="cloneClose" >鍙栨秷</el-button>
+ <el-button size="small" @click="cloneClose">鍙栨秷</el-button>
</div>
<el-dialog
- width="30%"
- title="鍏嬮殕妯℃澘"
:visible.sync="CloneinnerVisible"
- append-to-body>
+ append-to-body
+ title="鍏嬮殕妯℃澘"
+ width="30%">
<div>
- <avue-form :option="CloneOption" @submit="Clonesubmit" v-model="CloneModel"></avue-form>
+ <avue-form v-model="CloneModel" :option="CloneOption" @submit="Clonesubmit"></avue-form>
</div>
</el-dialog>
</el-dialog>
</template>
<template #menu="{ size, row ,index}">
- <el-button type="text"
- v-if="row.lcStatus == 'Editing'"
+ <el-button v-if="row.lcStatus == 'Editing'"
+ :size="size"
icon="el-icon-edit-outline "
- :size="size"
+ type="text"
@click="$refs.textCrud.rowEdit(row)">缂栬緫</el-button>
- <el-button type="text"
- v-if="row.lcStatus == 'Editing'"
- icon="el-icon-delete"
+ <el-button v-if="row.lcStatus == 'Editing'"
:size="size"
+ icon="el-icon-delete"
+ type="text"
@click="$refs.textCrud.rowDel(row,index)">鍒犻櫎</el-button>
<el-button
v-show="row.lcStatus === 'Released'"
- @click="upAndStopAndStart(row, 'upVersion')"
:loading="row.upVersionLoad"
+ :size="size"
icon="el-icon-upload2"
type="text"
- :size="size"
+ @click="upAndStopAndStart(row, 'upVersion')"
>鍗囩増</el-button
>
<el-button
v-show="row.lcStatus === 'Released'"
- @click="upAndStopAndStart(row, 'stopLose')"
:loading="row.stopLoseLoad"
+ :size="size"
icon="el-icon-circle-close"
type="text"
- :size="size"
+ @click="upAndStopAndStart(row, 'stopLose')"
>鍋滅敤/澶辨晥</el-button
>
<el-button
v-show="['Disabled', 'Editing'].includes(row.lcStatus)"
- @click="upAndStopAndStart(row, 'startRelease')"
:loading="row.startReleaseLoad"
+ :size="size"
icon="el-icon-circle-check"
type="text"
- :size="size"
+ @click="upAndStopAndStart(row, 'startRelease')"
>鍚敤/鍙戝竷</el-button
>
</template>
</avue-crud>
</basic-container>
- <templatePro :ProData="this.ProData" :rowIndex="this.selectRow" :crudOid="this.crudOid" :crudLCStatus="this.crudLCStatus" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro>
+ <templatePro :Formlist="this.Formlist" :ProData="this.ProData" :codeClassifyOid="this.codeClassifyOid"
+ :crudArray="this.crudArray" :crudLCStatus="this.crudLCStatus" :crudOid="this.crudOid"
+ :rowIndex="this.selectRow"></templatePro>
</span>
<!-- 缂栫爜瑙勫垯-->
- <el-dialog :visible.sync="MasterdialogVisible" title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
+ <el-dialog :visible.sync="MasterdialogVisible" append-to-body title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�">
<template>
<el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
<el-option
@@ -228,24 +244,29 @@
style="width: 150px">
</el-option>
</el-select>
- <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
- <el-button size="small" type="primary" plain @click="SelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
+ <el-input v-model="SelectFInd" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" style="width: 260px;margin-left: 15px"></el-input>
+ <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SelectFindeHandler">鏌ヨ
+ </el-button>
</template>
<avue-crud :data="masterData" :option="masterOption" @row-click="masterSelect">
<template slot="radio" slot-scope="{row}">
- <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio>
+ <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
+ </el-radio>
</template>
</avue-crud>
<div style="height: 30px">
- <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.TreeAddform.coderuleoidName ==''?'鏈缃��':this.TreeAddform.coderuleoidName}}]</div>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
- <el-button type="primary" size="small" @click="MasterHandlerClick">纭畾</el-button>
- <el-button size="small" @click="MasterdialogVisible=false">鍙栨秷</el-button>
+ <div
+ style="display: inline-block;float: left;border: 1px solid #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px ">
+ 宸茶缃殑鍊间负:[{{ this.TreeAddform.coderuleoidName == '' ? '鏈缃��' : this.TreeAddform.coderuleoidName }}]
+ </div>
+ <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
+ <el-button size="small" type="primary" @click="MasterHandlerClick">纭畾</el-button>
+ <el-button size="small" @click="MasterdialogVisible=false">鍙栨秷</el-button>
</div>
</div>
</el-dialog>
<!-- 鍏抽敭灞炴�ф煡璇㈣鍒�-->
- <el-dialog :visible.sync="KeydialogVisible" title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" append-to-body>
+ <el-dialog :visible.sync="KeydialogVisible" append-to-body title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�">
<template>
<el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
<el-option
@@ -256,24 +277,29 @@
style="width: 150px">
</el-option>
</el-select>
- <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
- <el-button size="small" type="primary" plain @click="KeySelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
+ <el-input v-model="SelectFInd" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" style="width: 260px;margin-left: 15px"></el-input>
+ <el-button plain size="small" style="margin-left: 20px" type="primary" @click="KeySelectFindeHandler">鏌ヨ
+ </el-button>
</template>
<avue-crud :data="KeyData" :option="masterOption" @row-click="KeySelect">
<template slot="radio" slot-scope="{row}">
- <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio>
+ <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
+ </el-radio>
</template>
</avue-crud>
<div style="height: 30px">
- <div style="display: inline-block;float: left;border: 1px solid #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.TreeAddform.codeKeyAttrRepeatOidName ==''?'鏈缃��':this.TreeAddform.codekeyattrrepeatoidName}}]</div>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
- <el-button type="primary" size="small" @click="KeyHandlerClick">纭畾</el-button>
- <el-button size="small" @click="KeydialogVisible=false">鍙栨秷</el-button>
+ <div
+ style="display: inline-block;float: left;border: 1px solid #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px ">
+ 宸茶缃殑鍊间负:[{{ this.TreeAddform.codeKeyAttrRepeatOidName == '' ? '鏈缃��' : this.TreeAddform.codekeyattrrepeatoidName }}]
+ </div>
+ <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
+ <el-button size="small" type="primary" @click="KeyHandlerClick">纭畾</el-button>
+ <el-button size="small" @click="KeydialogVisible=false">鍙栨秷</el-button>
</div>
</div>
</el-dialog>
<!-- 鐩镐技椤规煡璇㈣鍒�-->
- <el-dialog :visible.sync="SimidialogVisible" title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" append-to-body>
+ <el-dialog :visible.sync="SimidialogVisible" append-to-body title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�">
<template>
<el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
<el-option
@@ -284,24 +310,29 @@
style="width: 150px">
</el-option>
</el-select>
- <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
- <el-button size="small" type="primary" plain @click="SimSelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
+ <el-input v-model="SelectFInd" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" style="width: 260px;margin-left: 15px"></el-input>
+ <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SimSelectFindeHandler">鏌ヨ
+ </el-button>
</template>
<avue-crud :data="simData" :option="masterOption" @row-click="simSelect">
<template slot="radio" slot-scope="{row}">
- <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio>
+ <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
+ </el-radio>
</template>
</avue-crud>
<div style="height: 30px">
- <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.TreeAddform.codeResembleRuleOidName ==''?'鏈缃��':this.TreeAddform.codeResembleRuleOidName}}]</div>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
- <el-button type="primary" size="small" @click="simHandlerClick">纭畾</el-button>
- <el-button size="small" @click="SimidialogVisible=false">鍙栨秷</el-button>
+ <div
+ style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px ">
+ 宸茶缃殑鍊间负:[{{ this.TreeAddform.codeResembleRuleOidName == '' ? '鏈缃��' : this.TreeAddform.codeResembleRuleOidName }}]
+ </div>
+ <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
+ <el-button size="small" type="primary" @click="simHandlerClick">纭畾</el-button>
+ <el-button size="small" @click="SimidialogVisible=false">鍙栨秷</el-button>
</div>
</div>
</el-dialog>
-<!-- 涓氬姟绫诲瀷-->
- <el-dialog :visible.sync="BtmdialogVisible" title="涓恒�愪笟鍔$被鍨嬭鍒欍�戦�夊彇鍊�" append-to-body>
+ <!-- 涓氬姟绫诲瀷-->
+ <el-dialog :visible.sync="BtmdialogVisible" append-to-body title="涓恒�愪笟鍔$被鍨嬭鍒欍�戦�夊彇鍊�">
<template>
<el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px !important;">
<el-option
@@ -312,24 +343,29 @@
style="width: 130px">
</el-option>
</el-select>
- <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
- <el-button size="small" type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
+ <el-input v-model="SelectFInd" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" style="width: 260px;margin-left: 15px"></el-input>
+ <el-button plain size="small" style="margin-left: 20px" type="primary" @click="BtmSelectFindeHandler">鏌ヨ
+ </el-button>
</template>
<avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect">
<template slot="radio" slot-scope="{row}">
- <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio>
+ <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
+ </el-radio>
</template>
</avue-crud>
<div style="height: 30px">
- <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.TreeAddform.btmTypeName}}]</div>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
- <el-button type="primary" size="small" @click="btmHandlerClick">纭畾</el-button>
- <el-button size="small" @click="BtmdialogVisible=false">鍙栨秷</el-button>
+ <div
+ style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px ">
+ 宸茶缃殑鍊间负:[{{ this.TreeAddform.btmTypeName }}]
+ </div>
+ <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
+ <el-button size="small" type="primary" @click="btmHandlerClick">纭畾</el-button>
+ <el-button size="small" @click="BtmdialogVisible=false">鍙栨秷</el-button>
</div>
</div>
</el-dialog>
-<!-- 瀵煎嚭-->
- <ThemeImport :visible.sync="ThemeImportVisible" :codeClassifyOid="this.codeClassifyOid"></ThemeImport>
+ <!-- 瀵煎嚭-->
+ <ThemeImport :codeClassifyOid="this.codeClassifyOid" :visible.sync="ThemeImportVisible"></ThemeImport>
</basic-container>
</el-main>
</el-container>
@@ -356,8 +392,9 @@
startRelease,
exportClassify
} from "@/api/template/templateAttr";
-import {defaultReferDataGrid,referDataGrid} from '@/api/MasterData/master'
+import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master'
import func from "@/util/func";
+
export default {
name: "classifyTrees.vue",
//浣跨敤inject鎺ユ敹鍙傛暟
@@ -366,49 +403,49 @@
inject: ["crudTreeData"],
data() {
return {
- masterRow:null,
- AddLoading:false,
+ masterRow: null,
+ AddLoading: false,
// 瀹氫箟涓�涓彉閲忔潵淇濆瓨鏍戣姹傜殑鏁伴噺
- requestCount:null,
+ requestCount: null,
//瀵煎叆鐘舵�佹
- ThemeImportVisible:false,
- selectRow:'',
- selectList:[],
+ ThemeImportVisible: false,
+ selectRow: '',
+ selectList: [],
//鏍戣妭鐐规樉绀洪殣钘�
- TreeFlagCode:true,
+ TreeFlagCode: true,
//淇敼鑺傜偣鏄剧ず闅愯棌
- editTreeFLagCode:false,
+ editTreeFLagCode: false,
//缂栫爜瑙勫垯
- MasterdialogVisible:false,
- masterData:[],
- masterSelectList:[],
- masterName:"",
- masterOid:"",
+ MasterdialogVisible: false,
+ masterData: [],
+ masterSelectList: [],
+ masterName: "",
+ masterOid: "",
//鍏抽敭灞炴�tmTypeId
- KeydialogVisible:false,
- KeyName:"",
- KeyOid:"",
- KeyData:[],
- KeySelectLIst:[],
+ KeydialogVisible: false,
+ KeyName: "",
+ KeyOid: "",
+ KeyData: [],
+ KeySelectLIst: [],
//鐩镐技椤�
- simName:"",
- simOid:"",
- simData:[],
- SimidialogVisible:false,
- simSelectList:[],
+ simName: "",
+ simOid: "",
+ simData: [],
+ SimidialogVisible: false,
+ simSelectList: [],
//涓氬姟绫诲瀷
- btmName:"",
- btmOid:"",
- BtmData:[],
- BtmdialogVisible:false,
- btmSelectList:[],
- masterOption:{
- addBtn:false,
- index:true,
- border:true,
- menu:false,
- height:380,
- column:[
+ btmName: "",
+ btmOid: "",
+ BtmData: [],
+ BtmdialogVisible: false,
+ btmSelectList: [],
+ masterOption: {
+ addBtn: false,
+ index: true,
+ border: true,
+ menu: false,
+ height: 380,
+ column: [
{
label: '',
prop: 'radio',
@@ -416,20 +453,20 @@
display: false
},
{
- label:'鑻辨枃鍚嶇О',
- prop:'id'
+ label: '鑻辨枃鍚嶇О',
+ prop: 'id'
},
{
- label:'涓枃鍚嶇О',
- prop:'name'
+ label: '涓枃鍚嶇О',
+ prop: 'name'
},
{
- label:'鎻忚堪',
- prop:'description'
+ label: '鎻忚堪',
+ prop: 'description'
}
]
},
- SelectOption:[
+ SelectOption: [
{
value: 'name',
label: '涓枃鍚嶇О'
@@ -439,15 +476,15 @@
label: '鑻辨枃鍚嶇О'
}
],
- SelectValue:"id",
- SelectFInd:"",
- addFlag:false,
+ SelectValue: "id",
+ SelectFInd: "",
+ addFlag: false,
// 琛ㄦ牸褰撳墠琛宨d
- crudOid:"",
+ crudOid: "",
//褰撳墠閫変腑妯℃澘鐘舵��
- crudLCStatus:'',
+ crudLCStatus: '',
//琛ㄦ牸褰撳墠閫夋嫨鏁扮粍
- crudArray:[],
+ crudArray: [],
//妯℃澘灞炴�у睍绀哄唴瀹�
ProData: [],
//鍥炶溅閿悳绱㈢粦瀹氬��
@@ -455,12 +492,11 @@
searchCondition: 'id',
findText: "",
},
-
//楂樼骇鏌ヨ瀵硅瘽妗�
FindFormVisible: false,
//鍏嬮殕妯℃澘瀵硅瘽妗�
CloneVisible: false,
- CloneinnerVisible:false,
+ CloneinnerVisible: false,
//楂樼骇鏌ヨ涓嬫媺妗�
FindSelect: {
id: "0",
@@ -489,7 +525,7 @@
TreeAddFormVisible: false,
//褰撳墠鐐瑰嚮椤�
nodeClickList: "",
- ClonenodeClickList:"",
+ ClonenodeClickList: "",
//鍒嗙被鍜屼富棰樺簱鐘舵��
TreeFlag: false,
//鏍戝姞杞�
@@ -510,29 +546,27 @@
},
rules: {
id: [
- { required: true, message: '璇疯緭鍏ョ紪鍙�', trigger: 'blur' },
+ {required: true, message: '璇疯緭鍏ョ紪鍙�', trigger: 'blur'},
],
- name:[
- { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur' },
+ name: [
+ {required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'},
],
- btmTypeName:[
- { required: true, message: '璇烽�夋嫨涓氬姟绫诲瀷', trigger: 'blur' },
+ btmTypeName: [
+ {required: true, message: '璇烽�夋嫨涓氬姟绫诲瀷', trigger: 'blur'},
]
},
//avue-tree鏁版嵁锛屾殏鏃舵病鏈変綔鐢紝閲岄潰鍔熻兘鐢╡lement鍐欎簡锛屽彧鐢╝vue鐨勪竴涓爲缁勪欢涓嶇敤鍐呯疆琛ㄥ崟浜嗐��
TreeAvueform: {},
//鍏嬮殕鏍�
- CloneTreeAvueform:{},
+ CloneTreeAvueform: {},
Treedata: [],
- CloneTreedata:[],
+ CloneTreedata: [],
Treeoption: {
addBtn: false,
editBtn: false,
delBtn: false,
defaultExpandAll: false,
menu: false,
- // //杩欎釜鏄閫�
- // multiple: true,
},
//妯℃澘绠$悊form
crudForm: "",
@@ -545,7 +579,7 @@
//鍏嬮殕妯℃澘涓嬫媺妗唙alue
Clonevalue: "0",
//鍏嬮殕妯℃澘鎼滅储杈撳叆妗�
- CloneFind:"",
+ CloneFind: "",
//鍏嬮殕妯℃澘涓嬫媺妗嗘暟鎹�
CloneSelectOptions: [{
value: '0',
@@ -557,19 +591,19 @@
},
],
//鍏嬮殕妯℃澘纭琛ㄥ崟鏁版嵁
- CloneOption:{
- column:[
+ CloneOption: {
+ column: [
{
- label:'妯℃澘缂栧彿',
- prop:'id',
+ label: '妯℃澘缂栧彿',
+ prop: 'id',
rules: [{
required: true,
message: "璇疯緭鍏ユā鏉跨紪鍙�",
trigger: "blur"
}]
}, {
- label:'妯℃澘鍚嶇О',
- prop:'name',
+ label: '妯℃澘鍚嶇О',
+ prop: 'name',
rules: [{
required: true,
message: "璇疯緭鍏ユā鏉垮悕绉�",
@@ -577,16 +611,16 @@
}]
},
{
- label:'鎻忚堪',
- prop:'desc',
- type:'textarea',
- span:24
+ label: '鎻忚堪',
+ prop: 'desc',
+ type: 'textarea',
+ span: 24
}
]
},
//鍏嬮殕妯℃澘鍙屽悜缁戝畾鏁版嵁
- CloneModel:[],
- CloneSelect:[],
+ CloneModel: [],
+ CloneSelect: [],
//鍏嬮殕妯℃澘option
ClonecrudTreeOption: {
index: true,
@@ -680,12 +714,10 @@
}
},
//妯℃澘绠$悊缂栬緫
- showEditBtn:false,
+ showEditBtn: false,
}
},
- watch:{
-
- },
+ watch: {},
//tab鏍忛粯璁ゆ槸琛ㄦ牸
mounted() {
this.type = this.tabOption.column[0];
@@ -695,20 +727,20 @@
if (e.target.nodeName !== 'SPAN') {
this.$refs.tree.setCurrentKey(null)
this.nodeClickList = {}
- this.TreeList=[]
- this.TreeFlagCode=true;
+ this.TreeList = []
+ this.TreeFlagCode = true;
}
}, true)
},
- computed:{
- crudTreeOption(){
- return{
+ computed: {
+ crudTreeOption() {
+ return {
index: true,
border: true,
- height:180,
- addBtn:this.Formlist.length<=0 && this.nodeClickList != "",
- editBtn:false,
- delBtn:false,
+ height: 180,
+ addBtn: this.Formlist.length <= 0 && this.nodeClickList != "",
+ editBtn: false,
+ delBtn: false,
column: [
{
label: '',
@@ -736,17 +768,17 @@
},
{
label: "妯℃澘鎻忚堪",
- prop:"description"
+ prop: "description"
},
{
- label:"鐗堟湰鍙�",
- prop:"revisionSeq",
- display:false
+ label: "鐗堟湰鍙�",
+ prop: "revisionSeq",
+ display: false
},
{
- label:"鐘舵��",
- prop:"lcStatusText",
- display:false
+ label: "鐘舵��",
+ prop: "lcStatusText",
+ display: false
}
],
batchImportData: {
@@ -762,224 +794,215 @@
},
methods: {
// 鍏抽棴寮圭獥
-
/** 瀵煎叆 */
- ImportExcel(){
- this.ThemeImportVisible=true;
+ ImportExcel() {
+ this.ThemeImportVisible = true;
},
/** 瀵煎嚭 */
- ExportExcel(){
- if(this.nodeClickList){
- exportClassify({oid:this.nodeClickList.oid}).then(res=>{
+ ExportExcel() {
+ if (this.nodeClickList) {
+ exportClassify({oid: this.nodeClickList.oid}).then(res => {
func.downloadFileByBlobHandler(res);
})
- }else {
+ } else {
this.$message.warning('璇峰厛閫夋嫨瑕佸鍑虹殑涓婚搴撳垎绫�')
}
},
//缂栫爜瑙勫垯澶辩劍
- CodeFoucus(){
- this.MasterdialogVisible=true;
+ CodeFoucus() {
+ this.MasterdialogVisible = true;
this.MasterdefaultRend()
},
//缂栫爜澶氶��
- masterSelect(row){
- this.masterRow=row.$index;
- this.masterSelectList=row;
- this.masterName=row.name;
- this.masterOid=row.oid;
+ masterSelect(row) {
+ this.masterRow = row.$index;
+ this.masterSelectList = row;
+ this.masterName = row.name;
+ this.masterOid = row.oid;
},
//缂栫爜瑙勫垯鏌ヨ
- SelectFindeHandler(){
- if(this.SelectValue == 'id'){
- const masterParameter={
- 'conditionMap[id]':this.SelectFInd
+ SelectFindeHandler() {
+ if (this.SelectValue == 'id') {
+ const masterParameter = {
+ 'conditionMap[id]': this.SelectFInd
}
this.MasterdefaultRend(masterParameter);
- }else if(this.SelectValue == 'name'){
- const masterParameter={
- 'conditionMap[name]':this.SelectFInd
+ } else if (this.SelectValue == 'name') {
+ const masterParameter = {
+ 'conditionMap[name]': this.SelectFInd
}
this.MasterdefaultRend(masterParameter)
}
},
//缂栫爜瑙勫垯纭畾
- MasterHandlerClick(){
- if(this.masterSelectList.length>1){
+ MasterHandlerClick() {
+ if (this.masterSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- }else if(this.masterSelectList.length<=0){
+ } else if (this.masterSelectList.length <= 0) {
this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- }else {
- this.MasterdialogVisible=false;
- this.masterSelectList=[]
- this.$set(this.TreeAddform,'codeRuleOidName',this.masterName)
- this.$set(this.TreeAddform,'codeRuleOid',this.masterOid)
- this.$emit('MasterHandler',this.loneTreeNewForm)
+ } else {
+ this.MasterdialogVisible = false;
+ this.masterSelectList = []
+ this.$set(this.TreeAddform, 'codeRuleOidName', this.masterName)
+ this.$set(this.TreeAddform, 'codeRuleOid', this.masterOid)
+ this.$emit('MasterHandler', this.loneTreeNewForm)
}
},
//缂栫爜鎺ュ彛
- MasterdefaultRend(){
+ MasterdefaultRend() {
defaultReferDataGrid({
- referType:'coderule',
- isMuti:'false',
- 'conditionMap["lcstatus"]':'Released'
- }).then(res=>{
- this.masterData=res.data.records;
+ referType: 'coderule',
+ isMuti: 'false',
+ 'conditionMap["lcstatus"]': 'Released'
+ }).then(res => {
+ this.masterData = res.data.records;
})
},
- Keyfouce(){
- this.KeydialogVisible=true;
+ Keyfouce() {
+ this.KeydialogVisible = true;
this.KeydefaultRend()
},
//鍏抽敭灞炴�х‘瀹�
- KeyHandlerClick(){
- if(this.KeySelectLIst.length>1){
+ KeyHandlerClick() {
+ if (this.KeySelectLIst.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- }else if(this.KeySelectLIst.length<=0){
+ } else if (this.KeySelectLIst.length <= 0) {
this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- }else {
- this.KeydialogVisible=false;
- this.KeySelectLIst=[]
- this.$set(this.TreeAddform,'codeKeyAttrRepeatOidName',this.KeyName)
- this.$set(this.TreeAddform,'codeKeyAttrRepeatOid',this.KeyOid)
+ } else {
+ this.KeydialogVisible = false;
+ this.KeySelectLIst = []
+ this.$set(this.TreeAddform, 'codeKeyAttrRepeatOidName', this.KeyName)
+ this.$set(this.TreeAddform, 'codeKeyAttrRepeatOid', this.KeyOid)
}
},
//鍏抽敭灞炴�ф煡璇�
- KeySelectFindeHandler(){
- if(this.SelectValue == 'id'){
- const masterParameter={
- 'conditionMap[id]':this.SelectFInd
+ KeySelectFindeHandler() {
+ if (this.SelectValue == 'id') {
+ const masterParameter = {
+ 'conditionMap[id]': this.SelectFInd
}
this.KeydefaultRend(masterParameter);
- }else if(this.SelectValue == 'name'){
- const masterParameter={
- 'conditionMap[name]':this.SelectFInd
+ } else if (this.SelectValue == 'name') {
+ const masterParameter = {
+ 'conditionMap[name]': this.SelectFInd
}
this.KeydefaultRend(masterParameter)
}
},
//鍏抽敭灞炴�ф帴鍙�
- KeydefaultRend(){
+ KeydefaultRend() {
defaultReferDataGrid({
- referType:'codekeyattrrepeat',
- isMuti:'false',
- 'conditionMap["lcstatus"]':'Enabled'
- }).then(res=>{
- this.KeyData=res.data.records;
+ referType: 'codekeyattrrepeat',
+ isMuti: 'false',
+ 'conditionMap["lcstatus"]': 'Enabled'
+ }).then(res => {
+ this.KeyData = res.data.records;
})
},
// 鍏抽敭澶氶��
- KeySelect(row){
- this.masterRow=row.$index;
- this.KeySelectLIst=row;
- this.KeyName=row.name;
- this.KeyOid=row.oid;
+ KeySelect(row) {
+ this.masterRow = row.$index;
+ this.KeySelectLIst = row;
+ this.KeyName = row.name;
+ this.KeyOid = row.oid;
},
//鍏抽敭澶辩劍
- simFouce(){
- this.SimidialogVisible=true;
+ simFouce() {
+ this.SimidialogVisible = true;
this.simdefaultRend()
},
//鐩镐技椤圭‘瀹�
- simHandlerClick(){
- if(this.simSelectList.length>1){
+ simHandlerClick() {
+ if (this.simSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- }else if(this.simSelectList.length<=0){
+ } else if (this.simSelectList.length <= 0) {
this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- }else {
- this.SimidialogVisible=false;
- this.simSelectList=[]
- this.$set(this.TreeAddform,'codeResembleRuleOidName',this.simName)
- this.$set(this.TreeAddform,'codeResembleRuleOid',this.simOid)
- this.$emit('MasterHandler',this.loneTreeNewForm)
+ } else {
+ this.SimidialogVisible = false;
+ this.simSelectList = []
+ this.$set(this.TreeAddform, 'codeResembleRuleOidName', this.simName)
+ this.$set(this.TreeAddform, 'codeResembleRuleOid', this.simOid)
+ this.$emit('MasterHandler', this.loneTreeNewForm)
}
},
//鐩镐技椤规煡璇�
- SimSelectFindeHandler(){
- if(this.SelectValue == 'id'){
- const masterParameter={
- 'conditionMap[id]':this.SelectFInd
+ SimSelectFindeHandler() {
+ if (this.SelectValue == 'id') {
+ const masterParameter = {
+ 'conditionMap[id]': this.SelectFInd
}
this.simdefaultRend(masterParameter);
- }else if(this.SelectValue == 'name'){
- const masterParameter={
- 'conditionMap[name]':this.SelectFInd
+ } else if (this.SelectValue == 'name') {
+ const masterParameter = {
+ 'conditionMap[name]': this.SelectFInd
}
this.simdefaultRend(masterParameter)
}
},
// 鐩镐技椤瑰閫�
- simSelect(row){
- this.masterRow=row.$index;
- this.simSelectList=row;
- this.simName=row.name;
- this.simOid=row.oid;
+ simSelect(row) {
+ this.masterRow = row.$index;
+ this.simSelectList = row;
+ this.simName = row.name;
+ this.simOid = row.oid;
},
//鐩镐技椤归」鎺ュ彛
- simdefaultRend(){
+ simdefaultRend() {
defaultReferDataGrid({
- referType:'coderesemblerule',
- isMuti:'false',
- 'conditionMap["lcstatus"]':'Enabled'
- }).then(res=>{
- this.simData=res.data.records;
+ referType: 'coderesemblerule',
+ isMuti: 'false',
+ 'conditionMap["lcstatus"]': 'Enabled'
+ }).then(res => {
+ this.simData = res.data.records;
})
},
//涓氬姟绫诲瀷澶辩劍
- btmFoucus(){
- this.BtmdialogVisible=true;
+ btmFoucus() {
+ this.BtmdialogVisible = true;
this.btmdefaultRend()
},
//涓氬姟绫诲瀷纭畾
- btmHandlerClick(){
- if(this.btmSelectList.length>1){
+ btmHandlerClick() {
+ if (this.btmSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- }else if(this.btmSelectList.length<=0){
+ } else if (this.btmSelectList.length <= 0) {
this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- }else {
- this.BtmdialogVisible=false;
- this.btmSelectList=[]
- this.$set(this.TreeAddform,'btmTypeName',this.btmName)
- this.$set(this.TreeAddform,'btmTypeId',this.btmOid)
- this.$emit('MasterHandler',this.loneTreeNewForm)
+ } else {
+ this.BtmdialogVisible = false;
+ this.btmSelectList = []
+ this.$set(this.TreeAddform, 'btmTypeName', this.btmName)
+ this.$set(this.TreeAddform, 'btmTypeId', this.btmOid)
+ this.$emit('MasterHandler', this.loneTreeNewForm)
}
},
//涓氬姟绫诲瀷鏌ヨ
- BtmSelectFindeHandler(){
- if(this.SelectValue == 'id'){
- const masterParameter={
- 'conditionMap[id]':this.SelectFInd
- }
+ BtmSelectFindeHandler() {
+ const masterParameter = {};
+ masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`;
this.btmdefaultRend(masterParameter);
- }else if(this.SelectValue == 'name'){
- const masterParameter={
- 'conditionMap[name]':this.SelectFInd
- }
- this.btmdefaultRend(masterParameter);
- }
},
//涓氬姟绫诲瀷澶氶��
- btmSelect(row){
- this.masterRow=row.$index;
- this.btmSelectList=row;
- this.btmName=row.name;
- this.btmOid=row.id;
+ btmSelect(row) {
+ this.masterRow = row.$index;
+ this.btmSelectList = row;
+ this.btmName = row.name;
+ this.btmOid = row.id;
},
//涓氬姟绫诲瀷鎺ュ彛
- btmdefaultRend(masterParameter){
- referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
- this.BtmData=res.data.data.records
+ btmdefaultRend(masterParameter) {
+ referDataGrid({valueField: 'id', isMuti: 'false', ...masterParameter}).then(res => {
+ this.BtmData = res.data.data.records
})
},
//瀛愪紶鐖�
- MasterHandler(val){
- this.TreeList=val;
+ MasterHandler(val) {
+ this.TreeList = val;
},
- rowHandle(row, column){
- this.selectRow=row.$index;
- this.crudOid=row.oid;
- this.crudLCStatus=row.lcStatus;
+ rowHandle(row, column) {
+ this.selectRow = row.$index;
+ this.crudOid = row.oid;
+ this.crudLCStatus = row.lcStatus;
this.crudArray.push(row);
this.gridCode()
},
@@ -1029,7 +1052,7 @@
});
try {
//鏂板琛ㄥご鍚嶇О
- this.TreeFlag=!this.nodeClickList
+ this.TreeFlag = !this.nodeClickList
await new Promise(resolve => setTimeout(resolve, 500));
this.TreeAddFormVisible = true;
loading.close();
@@ -1039,9 +1062,9 @@
}
},
//鏍戣妭鐐瑰彇娑堜簨浠�
- TreeEscHandler(){
- this.TreeAddform={};
- this.TreeAddFormVisible=false;
+ TreeEscHandler() {
+ this.TreeAddform = {};
+ this.TreeAddFormVisible = false;
// 鍏抽棴寮圭獥娓呯┖鏍¢獙
this.$refs.myForm.clearValidate();
},
@@ -1049,7 +1072,7 @@
TreeAddHandler() {
if ((!this.TreeAddform.id || !this.TreeAddform.name) || (this.TreeFlagCode && !this.TreeAddform.btmTypeName)) {
this.$message.warning('璇疯緭鍏ュ唴瀹癸紒');
- }else {
+ } else {
const data = this.TreeAddform;
// data.btmtypename= this.TreeList.btmtypename
this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
@@ -1065,8 +1088,8 @@
this.getAttr();
this.TreeAddFormVisible = false;
//娣诲姞瀹屾垚鍚庡彸渚ф竻绌�
- this.ProData=[];
- this.Formlist=[];
+ this.ProData = [];
+ this.Formlist = [];
})
.catch((res) => {
this.$message({
@@ -1134,7 +1157,7 @@
},
//淇敼鍥炲~
TreeEdit() {
- if ( Object.keys(this.nodeClickList).length<1) {
+ if (Object.keys(this.nodeClickList).length < 1) {
this.$message({
type: 'warning',
message: '璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�!'
@@ -1155,9 +1178,9 @@
//鍚敤鍜屽仠鐢ㄩ兘鍏堝垽鏂姸鎬�
//鍚敤
Enable() {
- if(Object.keys(this.nodeClickList).length<1){
+ if (Object.keys(this.nodeClickList).length < 1) {
this.$message.warning('璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�')
- }else {
+ } else {
if (this.FlagObj.lcStatus == "Enabled") {
this.$message({
type: 'warning',
@@ -1188,9 +1211,9 @@
},
//鍋滅敤
Deactivate() {
- if(Object.keys(this.nodeClickList).length<1){
+ if (Object.keys(this.nodeClickList).length < 1) {
this.$message.warning('璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�')
- }else {
+ } else {
if (this.FlagObj.lcStatus === "Disabled") {
this.$message({
type: 'warning',
@@ -1228,12 +1251,12 @@
this.editTreeFLagCode = !data.parentId;
this.nodeClickList = data;
this.selectRow = 0;
- this.crudArray=[]
+ this.crudArray = []
try {
this.requestCount += 1;
const [res1, res2, res3] = await Promise.all([
TreeObjcet(data.oid),
- gridCodeClassifyTemplate({ 'conditionMap[codeclassifyoid]': data.oid }),
+ gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}),
getObjectByOid(data.oid)
]);
this.FlagObj = res1.data.data;
@@ -1250,7 +1273,7 @@
await this.gridCode();
} else {
this.ProData = [];
- this.crudOid=''
+ this.crudOid = ''
}
this.TreeList = res3.data.data;
} catch (error) {
@@ -1260,7 +1283,10 @@
async gridCode() {
try {
- const res = await gridCodeClassifyTemplateAttr({ 'conditionMap[classifyTemplateOid]': this.Formlist[this.selectRow].oid, limit: -1 });
+ const res = await gridCodeClassifyTemplateAttr({
+ 'conditionMap[classifyTemplateOid]': this.Formlist[this.selectRow].oid,
+ limit: -1
+ });
this.ProData = res.data.data.map(item => {
if (item.classifyInvokeAttr !== '') {
if (!item.hasOwnProperty('classifyInvokeText')) {
@@ -1282,17 +1308,17 @@
console.log(e);
},
//鍩烘湰淇℃伅琛ㄥ崟鍒锋柊
- referTreeForm(){
- getObjectByOid(this.nodeClickList.oid).then(res => {
+ referTreeForm() {
+ getObjectByOid(this.nodeClickList.oid).then(res => {
this.TreeList = res.data.data;
}).catch(res => {
this.$message.error(res)
})
},
//鍏嬮殕妯℃澘鏍戠殑鐐瑰嚮鍒囨崲鏁版嵁
- async ClonenodeClick(data){
- this.ClonenodeClickList=data;
- await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res=>{
+ async ClonenodeClick(data) {
+ this.ClonenodeClickList = data;
+ await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res => {
this.CloneFormlist = res.data.data.filter(item => {
if (item.codeclassifyoid != "") {
this.codeClassifyOid = item.codeclassifyoid
@@ -1334,7 +1360,7 @@
},
//妯℃澘绠$悊琛ㄦ牸娣诲姞
- CrudRowSave(row,done) {
+ CrudRowSave(row, done) {
if (this.nodeClickList.length <= 0) {
this.$message({
type: 'warning',
@@ -1358,7 +1384,7 @@
}
},
//妯℃澘绠$悊淇敼
- CrudRowUpdata(row,index,done) {
+ CrudRowUpdata(row, index, done) {
editSave(row).then(() => {
this.TemRefresh();
this.$message({
@@ -1372,7 +1398,7 @@
},
//妯℃澘绠$悊鍒犻櫎
CrudRowDel(row) {
- deleteData(row).then(()=> {
+ deleteData(row).then(() => {
this.TemRefresh();
}).catch(res => {
this.$message({
@@ -1382,68 +1408,68 @@
})
},
//鍏嬮殕鍙栨秷
- cloneClose(){
+ cloneClose() {
this.$refs.cloneTree.setCurrentKey(null)
this.ClonenodeClickList = {}
- this.CloneFormlist=[]
- this.CloneVisible=false;
+ this.CloneFormlist = []
+ this.CloneVisible = false;
},
//鍏嬮殕妯℃澘鏌ヨ
- CloneEnterFind(){
+ CloneEnterFind() {
gridCodeClassifyTemplate().then(res => {
this.CloneFormlist = res.data.data.filter(item => {
- if(this.Clonevalue == 0){
+ if (this.Clonevalue == 0) {
return item.id.includes(this.CloneFind)
- }else if(this.Clonevalue == 1){
+ } else if (this.Clonevalue == 1) {
return item.name.includes(this.CloneFind)
}
})
})
},
// 鏌ヨ
- FindeHanler(){
- if(this.nodeClickList != ""){
- this.FindFormVisible=true
- }else {
+ FindeHanler() {
+ if (this.nodeClickList != "") {
+ this.FindFormVisible = true
+ } else {
this.$message.warning('璇蜂粠鏍戜笂閫夋嫨涓�鏉℃暟鎹�')
}
},
//鍏嬮殕妯℃澘閫夋嫨纭畾
- Clonehandler(){
- if(this.CloneSelect.length <= 0){
+ Clonehandler() {
+ if (this.CloneSelect.length <= 0) {
this.$message({
type: 'warning',
message: '璇烽�夋嫨瑕佸厠闅嗙殑妯℃澘!'
});
- }else if(this.CloneSelect.length >1){
+ } else if (this.CloneSelect.length > 1) {
this.$message({
type: 'warning',
message: '鍙兘閫夋嫨涓�鏉℃暟鎹�!'
});
} else {
- this.CloneinnerVisible=true;
+ this.CloneinnerVisible = true;
}
},
//鐐瑰嚮浠庡叾瀹冩ā鏉垮厠闅�
- CloneBtn(){
- if(this.nodeClickList.length <= 0){
+ CloneBtn() {
+ if (this.nodeClickList.length <= 0) {
this.$message({
type: 'warning',
message: '璇峰厛浠嶽涓婚搴撳垎绫汇�戞爲涓婇�夋嫨涓�鏉℃暟鎹�!'
});
- }else {
- this.CloneVisible=true;
+ } else {
+ this.CloneVisible = true;
}
},
//鍏嬮殕妯℃澘鍗曢�夋鏀瑰彉
selectionChange(row) {
this.CloneSelect = row;
- const { id, name } = row[0];
- this.CloneModel = { id, name };
+ const {id, name} = row[0];
+ this.CloneModel = {id, name};
this.CloneSelect[0].codeclassifyoid = this.nodeClickList.oid;
- console.log('row',row)
- console.log('CloneSelect',this.CloneSelect)
- console.log('CloneModel',this.CloneModel)
+ console.log('row', row)
+ console.log('CloneSelect', this.CloneSelect)
+ console.log('CloneModel', this.CloneModel)
},
//鍏嬮殕琛ㄥ崟鎻愪氦
Clonesubmit(row, done) {
@@ -1471,14 +1497,17 @@
this.Formlist = res.data.data.filter(item => {
return item.codeclassifyoid == this.nodeClickList.oid
})
- this.crudLCStatus=this.Formlist[this.selectRow].lcStatus;
+ this.crudLCStatus = this.Formlist[this.selectRow].lcStatus;
this.crudArray.push(this.Formlist[this.selectRow]);
- gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': res.data.data[this.selectRow].oid,limit:-1}).then(res => {
+ gridCodeClassifyTemplateAttr({
+ 'conditionMap[classifyTemplateOid]': res.data.data[this.selectRow].oid,
+ limit: -1
+ }).then(res => {
this.ProData = res.data.data;
//鍒嗙被娉ㄥ叆鏁版嵁鏍煎紡
- this.ProData = res.data.data.map((item) => {
+ this.ProData = res.data.data.map((item) => {
//濡傛灉鍒嗙被娉ㄥ叆classifyInvokeAttr涓虹┖璇存槑鏄垵濮嬬姸鎬�
- if(item.classifyInvokeAttr !== ''){
+ if (item.classifyInvokeAttr !== '') {
if (!item.hasOwnProperty('classifyInvokeText')) { // 妫�鏌lassifyInvokeText灞炴�ф槸鍚﹀瓨鍦�
item = {
...item,
@@ -1511,8 +1540,8 @@
type: "warning",
}).then(() => {
this.$set(row, this.upAndStopAndStartData[type]["load"], true)
- const { ts, oid } = row;
- this.upAndStopAndStartData[type]['funAPi']({ ts, oid }).then((res) => {
+ const {ts, oid} = row;
+ this.upAndStopAndStartData[type]['funAPi']({ts, oid}).then((res) => {
if (res.data.code === 200) {
this.$set(row, this.upAndStopAndStartData[type]["load"], false)
this.TemRefresh();
@@ -1530,15 +1559,18 @@
</script>
<style lang="scss" scoped>
-.el-container{
+.el-container {
height: 100%;
}
+
.el-aside {
height: calc(100% - 30px);
}
+
.el-main {
height: calc(100% - 30px);
}
+
.el-form {
display: flex;
flex-wrap: wrap; /* 璁剧疆鍙崲琛岋紝浠ヤ究鍦ㄥ皬灞忓箷璁惧涓婁娇鐢ㄥ琛屽竷灞� */
diff --git a/Source/UBCS-WEB/src/components/template/FlowPath.vue b/Source/UBCS-WEB/src/components/template/FlowPath.vue
index 72d9567..5b24017 100644
--- a/Source/UBCS-WEB/src/components/template/FlowPath.vue
+++ b/Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -1,120 +1,121 @@
<template>
- <avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page"
- :search.sync="search" @on-load="getDataList" @row-save="handleSave" @row-del="handleDelete"
- @row-update="handleEdit" @refresh-change="handleRefresh" @size-change="handleSizePage"
- @current-change="handleCurrentPage" v-if="Formlist.length>0">
- </avue-crud>
+ <avue-crud v-if="Formlist.length>0" ref="crud" v-model="form" :data="data" :option="option" :page.sync="page"
+ :search.sync="search" :table-loading="loading" @on-load="getDataList" @row-save="handleSave"
+ @row-del="handleDelete" @row-update="handleEdit" @refresh-change="handleRefresh"
+ @size-change="handleSizePage" @current-change="handleCurrentPage">
+ </avue-crud>
</template>
<script>
-import { getFlowpathList, getStartList, flowpathSave, flowpathDelete } from '@/api/template/flowpath.js'
+import {getFlowpathList, getStartList, flowpathSave, flowpathDelete} from '@/api/template/flowpath.js'
+
export default {
- name: 'FlowPath',
- props: {
- checkStatus: {
- type: Boolean,
- default: false
- },
- crudLCStatus: {
- type: String,
- default: 'Editing'
- },
- code: {
- typeof: String,
- required: true,
- default: ""
- },
- Formlist:{
- type:Array,
- default:[]
- }
+ name: 'FlowPath',
+ props: {
+ checkStatus: {
+ type: Boolean,
+ default: false
},
- data() {
- return {
- loading: false,
- page: {
- currentPage: 1,
- pageSize: 10,
- total: 0
+ crudLCStatus: {
+ type: String,
+ default: 'Editing'
+ },
+ code: {
+ typeof: String,
+ required: true,
+ default: ""
+ },
+ Formlist: {
+ type: Array,
+ default: []
+ }
+ },
+ data() {
+ return {
+ loading: false,
+ page: {
+ currentPage: 1,
+ pageSize: 10,
+ total: 0
+ },
+ search: {},
+ delIds: [],
+ data: [],
+ startData: [],
+ form: {},
+ option: {
+ height: 340,
+ border: true,
+ align: 'center',
+ menu: !this.checkStatus || this.crudLCStatus == 'Editing',
+ menuAlign: 'center',
+ index: true,
+ searchMenuSpan: 8,
+ searchBtn: false,
+ refreshBtn: false,
+ emptyBtn: false,
+ columnBtn: false,
+ editBtn: !this.checkStatus || this.crudLCStatus == 'Editing',
+ delBtn: !this.checkStatus || this.crudLCStatus == 'Editing',
+ addBtn: !this.checkStatus || this.crudLCStatus == 'Editing',
+ defaultSort: {
+ prop: 'id,name,description,version',
+ order: 'descending'
+ },
+ column: [
+ {
+ label: '妯℃澘key',
+ prop: 'modelKey',
+ width: 120,
+ sortable: true,
+ type: 'tree',
+ dicData: [],
+ props: {
+ label: "key",
+ value: "key"
},
- search: {},
- delIds: [],
- data: [],
- startData: [],
- form: {},
- option: {
- height: 340,
- border: true,
- align: 'center',
- menu:!this.checkStatus || this.crudLCStatus == 'Editing',
- menuAlign: 'center',
- index: true,
- searchMenuSpan: 8,
- searchBtn: false,
- refreshBtn:false,
- emptyBtn: false,
- columnBtn: false,
- editBtn:!this.checkStatus || this.crudLCStatus == 'Editing',
- delBtn:!this.checkStatus || this.crudLCStatus == 'Editing',
- addBtn: !this.checkStatus || this.crudLCStatus == 'Editing',
- defaultSort: {
- prop: 'id,name,description,version',
- order: 'descending'
- },
- column: [
- {
- label: '妯℃澘key',
- prop: 'modelKey',
- width: 120,
- sortable: true,
- type: 'tree',
- dicData: [],
- props: {
- label: "key",
- value: "key"
- },
- rules: [{
- required: true,
- message: '妯℃澘key涓嶈兘涓虹┖',
- trigger: 'blur'
- }],
- nodeClick: (data) => {
- console.log(data)
- // 鑺傜偣鐐瑰嚮鐨勬椂鍊欎細鑾峰彇鍒版暟鎹�
- this.form.modelName = data.name
- }
- }, {
- label: '妯℃澘鍚嶇О',
- prop: 'modelName',
- sortable: true,
- width: 220,
- addDisabled: true,
- editDisabled: true,
- },
- {
- label: '妯℃澘鐢ㄩ��',
- prop: 'buttonTypeKey',
- type: 'tree',
- width: 120,
- dicUrl: '/api/ubcs-flow/processTS/tt',
- dicMethod: 'post',
- props: {
- value: "codee",
- label: "namee",
- },
- },
- {
- label: '妯℃澘鎻忚堪',
- prop: 'description',
- type: 'textarea'
- },
- ]
+ rules: [{
+ required: true,
+ message: '妯℃澘key涓嶈兘涓虹┖',
+ trigger: 'blur'
+ }],
+ nodeClick: (data) => {
+ console.log(data)
+ // 鑺傜偣鐐瑰嚮鐨勬椂鍊欎細鑾峰彇鍒版暟鎹�
+ this.form.modelName = data.name
}
- }
- },
- created() {
- this.getStart()
- },
+ }, {
+ label: '妯℃澘鍚嶇О',
+ prop: 'modelName',
+ sortable: true,
+ width: 220,
+ addDisabled: true,
+ editDisabled: true,
+ },
+ {
+ label: '妯℃澘鐢ㄩ��',
+ prop: 'buttonTypeKey',
+ type: 'tree',
+ width: 120,
+ dicUrl: '/api/ubcs-flow/processTS/tt',
+ dicMethod: 'post',
+ props: {
+ value: "codee",
+ label: "namee",
+ },
+ },
+ {
+ label: '妯℃澘鎻忚堪',
+ prop: 'description',
+ type: 'textarea'
+ },
+ ]
+ }
+ }
+ },
+ created() {
+ this.getStart()
+ },
watch: {
code: {
handler(newval, oldval) {
@@ -123,133 +124,133 @@
},
checkStatus: {
handler(newval, oldval) {
- this.option.delBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
- this.option.editBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
- this.option.addBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.delBtn = !this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.editBtn = !this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.addBtn = !this.checkStatus || this.crudLCStatus == 'Editing';
}
},
crudLCStatus: {
handler(newval, oldval) {
- this.option.delBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
- this.option.editBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
- this.option.addBtn=!this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.delBtn = !this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.editBtn = !this.checkStatus || this.crudLCStatus == 'Editing';
+ this.option.addBtn = !this.checkStatus || this.crudLCStatus == 'Editing';
}
}
},
- methods: {
- async getStart() {
- const response = await getStartList()
- if (response.status === 200) {
- console.log(response.data.data.records)
- const data = response.data.data.records
- let newData = data.map(item => {
- const { key, name, version } = item
- return { key, name, version }
- })
- this.option.column[0].dicData = newData
+ methods: {
+ async getStart() {
+ const response = await getStartList()
+ if (response.status === 200) {
+ console.log(response.data.data.records)
+ const data = response.data.data.records
+ let newData = data.map(item => {
+ const {key, name, version} = item
+ return {key, name, version}
+ })
+ this.option.column[0].dicData = newData
- }
- },
- // 鑾峰彇鍒楄〃
- async getDataList() {
+ }
+ },
+ // 鑾峰彇鍒楄〃
+ async getDataList() {
+ this.loading = false
+ if (this.code) {
+ const {pageSize, currentPage} = this.page
+ let param = {size: pageSize, current: currentPage}
+ const response = await getFlowpathList({...param, ...{templateId: this.code}})
+ if (response.status === 200) {
this.loading = false
- if(this.code){
- const { pageSize, currentPage } = this.page
- let param = { size: pageSize, current: currentPage }
- const response = await getFlowpathList({ ...param, ...{ templateId: this.code } })
- if (response.status === 200) {
- this.loading = false
- const data = response.data.data
- this.data = data.records
- this.page.total = data.total
- } else this.loading = false
- }else {
- this.data=[]
- }
+ const data = response.data.data
+ this.data = data.records
+ this.page.total = data.total
+ } else this.loading = false
+ } else {
+ this.data = []
+ }
- },
- // 鏂板
- async handleSave(row, done, loading) {
- console.log(row)
- await flowpathSave({ ...row, ...{ templateId: this.code } }).then(response=>{
- if (response.status === 200) {
- console.log(response)
- this.$message({
- type: 'success',
- message: '鏂板鏁版嵁鎴愬姛锛�'
- })
- done()
- this.getDataList()
- }
- }).catch(res=>{
- loading()
- })
+ },
+ // 鏂板
+ async handleSave(row, done, loading) {
+ console.log(row)
+ await flowpathSave({...row, ...{templateId: this.code}}).then(response => {
+ if (response.status === 200) {
+ console.log(response)
+ this.$message({
+ type: 'success',
+ message: '鏂板鏁版嵁鎴愬姛锛�'
+ })
+ done()
+ this.getDataList()
+ }
+ }).catch(res => {
+ loading()
+ })
- },
- // 缂栬緫
- async handleEdit(row, index, done, loading) {
- console.log(row)
- const { modelName, modelKey, buttonTypeKey, id ,description} = row
- let param = { modelName, modelKey, buttonTypeKey, id,description }
- await flowpathSave({ ...param, ...{ templateId: this.code } }).then(response=>{
- if (response.status === 200) {
- this.$message({
- type: 'success',
- message: '淇敼鏁版嵁鎴愬姛锛�'
- })
- done()
- this.getDataList()
- }
- }).catch(()=>{
- //loading鎺у埗绂佺敤 榛樿鏄紑鍚�
- loading()
- })
+ },
+ // 缂栬緫
+ async handleEdit(row, index, done, loading) {
+ console.log(row)
+ const {modelName, modelKey, buttonTypeKey, id, description} = row
+ let param = {modelName, modelKey, buttonTypeKey, id, description}
+ await flowpathSave({...param, ...{templateId: this.code}}).then(response => {
+ if (response.status === 200) {
+ this.$message({
+ type: 'success',
+ message: '淇敼鏁版嵁鎴愬姛锛�'
+ })
+ done()
+ this.getDataList()
+ }
+ }).catch(() => {
+ //loading鎺у埗绂佺敤 榛樿鏄紑鍚�
+ loading()
+ })
- },
- // 鍒犻櫎鍗曟潯
- handleDelete(row) {
- console.log(row)
- const { id } = row
- this.deleteSysInfo({ id: id })
- },
- // 鍒犻櫎鎺ュ彛
- deleteSysInfo(param) {
- this.$confirm('鏄惁纭畾鍒犻櫎閫夋嫨鐨勬ā鏉挎祦绋�?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(async () => {
- // 鎺ュ彛
- const response = await flowpathDelete(param)
- if (response.status === 200) {
- console.log(response)
- this.$message({
- type: 'success',
- message: '鍒犻櫎鎴愬姛!'
- });
- this.getDataList()
- }
- })
- },
- // enter鎼滅储
- handleEnter() {
- if (this.search[this.selectValue] === '') return
- else this.getDataList()
- },
- // 杈撳叆妗嗘竻绌�
- handleClear() {
+ },
+ // 鍒犻櫎鍗曟潯
+ handleDelete(row) {
+ console.log(row)
+ const {id} = row
+ this.deleteSysInfo({id: id})
+ },
+ // 鍒犻櫎鎺ュ彛
+ deleteSysInfo(param) {
+ this.$confirm('鏄惁纭畾鍒犻櫎閫夋嫨鐨勬ā鏉挎祦绋�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(async () => {
+ // 鎺ュ彛
+ const response = await flowpathDelete(param)
+ if (response.status === 200) {
+ console.log(response)
+ this.$message({
+ type: 'success',
+ message: '鍒犻櫎鎴愬姛!'
+ });
+ this.getDataList()
+ }
+ })
+ },
+ // enter鎼滅储
+ handleEnter() {
+ if (this.search[this.selectValue] === '') return
+ else this.getDataList()
+ },
+ // 杈撳叆妗嗘竻绌�
+ handleClear() {
- },
- // 鍒锋柊鎸夐挳
- handleRefresh() {
- this.getDataList()
- },
- handleSizePage(event) {
- this.page.pageSize = event
- },
- handleCurrentPage(event) {
- this.page.currentPage = event
- },
- }
+ },
+ // 鍒锋柊鎸夐挳
+ handleRefresh() {
+ this.getDataList()
+ },
+ handleSizePage(event) {
+ this.page.pageSize = event
+ },
+ handleCurrentPage(event) {
+ this.page.currentPage = event
+ },
+ }
}
</script>
diff --git a/Source/UBCS-WEB/src/components/template/Stage.vue b/Source/UBCS-WEB/src/components/template/Stage.vue
index a4bd748..de40033 100644
--- a/Source/UBCS-WEB/src/components/template/Stage.vue
+++ b/Source/UBCS-WEB/src/components/template/Stage.vue
@@ -1,262 +1,275 @@
<template>
- <div v-if="Formlist.length>0">
- <avue-crud ref="crud" :table-loading="loading" :data="data" :option="option" :page.sync="page"
- @on-load="getDataList" @size-change="handleSizePage" @current-change="handleCurrentPage"
- @row-click="handleRowClick">
- <template slot-scope="{type,size,row,index}" slot="menu">
- <el-button icon="el-icon-check" :size="size" :type="type"
- @click="handleMaintenance(row, index)">缁存姢</el-button>
- </template>
- </avue-crud>
- <el-dialog title="妯℃澘闃舵" width="50%" append-to-body="true" :visible.sync="dialogNode">
- <avue-crud ref="crud" :table-loading="loading" :data="stageData" :option="stageOption" @on-load="getStagelist"
- @row-click="handleRowStageClick">
- <template slot-scope="{type,size,row,index}" slot="menu">
- <el-button icon="el-icon-check" :size="size" :type="type"
- @click="handleMaintenanceTransfer(row, index)">缁存姢</el-button>
- </template>
- </avue-crud>
- </el-dialog>
- <table-transfer v-if="flag" :visible.sync="dialogTransfer" v-model="attributeValue" :dataList="attributeData"
- :columns="columns" keyName="oid" @save="handleSave" @close="handelClose"></table-transfer>
- </div>
+ <div v-if="Formlist.length>0">
+ <avue-crud ref="crud" :data="data" :option="option" :page.sync="page" :table-loading="loading"
+ @on-load="getDataList" @size-change="handleSizePage" @current-change="handleCurrentPage"
+ @row-click="handleRowClick">
+ <template slot="menu" slot-scope="{type,size,row,index}">
+ <el-button :size="size" :type="type" icon="el-icon-check"
+ @click="handleMaintenance(row, index)">缁存姢
+ </el-button>
+ </template>
+ </avue-crud>
+ <el-dialog :visible.sync="dialogNode" append-to-body="true" title="妯℃澘闃舵" width="50%">
+ <avue-crud ref="crud" :data="stageData" :option="stageOption" :table-loading="loading" @on-load="getStagelist"
+ @row-click="handleRowStageClick">
+ <template slot="menu" slot-scope="{type,size,row,index}">
+ <el-button :size="size" :type="type" icon="el-icon-check"
+ @click="handleMaintenanceTransfer(row, index)">缁存姢
+ </el-button>
+ </template>
+ </avue-crud>
+ </el-dialog>
+ <table-transfer v-if="flag" v-model="attributeValue" :columns="columns" :dataList="attributeData"
+ :visible.sync="dialogTransfer" keyName="oid" @close="handelClose" @save="handleSave"></table-transfer>
+ </div>
</template>
<script>
-import { getFlowpathList, stagelist, attributeListRight, attributeList, attributeSave } from '@/api/template/flowpath.js'
+import {getFlowpathList, stagelist, attributeListRight, attributeList, attributeSave} from '@/api/template/flowpath.js'
import TableTransfer from '@/components/template/TableTransfer'
+
export default {
- name: 'Stage',
- components: {
- TableTransfer
+ name: 'Stage',
+ components: {
+ TableTransfer
+ },
+ props: {
+ code: {
+ typeof: String,
+ required: true,
+ default: ""
},
- props: {
- code: {
- typeof: String,
- required: true,
- default: ""
- },
- Formlist:{
- type:Array,
- default:[]
- }
- },
- watch: {
- code: {
- handler(newval, oldval) {
- this.getDataList()
- }
- }
- },
- data() {
- const options = {
- height: "auto",
- border: true,
- addBtn: false,
- align: 'center',
- menuAlign: 'center',
- index: true,
- searchMenuSpan: 8,
- searchBtn: false,
- emptyBtn: false,
- columnBtn: false,
- delBtn: false,
- refreshBtn: false,
- header: false,
- editBtn: false,
- }
- return {
- attributeData: [],
- attributeValue: [],
- flag: false,
- dialogTransfer: false,
- dialogNode: false,
- visibleTable: false,
- loading: false,
- page: {
- currentPage: 1,
- pageSize: 10,
- total: 0
- },
- modelKey: '',
- data: [],
- stageData: [],
- saveParam: {},
- columns: [
- {
- key: "oid",
- label: "oid",
- visible: false,
- },
- {
- key: "id",
- label: "灞炴�х紪鍙�",
- visible: true,
- },
- {
- key: "name",
- label: "灞炴�у悕绉�",
- visible: true,
- },
- {
- key: "attributeGroup",
- label: "灞炴�у垎缁�",
- visible: true,
- },
- ],
- option: {
- ...options,
- height: 383,
- column: [
- { label: '妯℃澘缂栧彿', prop: 'modelKey' },
- { label: '妯℃澘鍚嶇О', prop: 'modelName' },
- { label: '鎻忚堪', prop: 'buttonTypeValue' },
- ]
- },
- stageOption: {
- ...options,
- height:620,
- column: [
- { label: '闃舵缂栧彿', prop: 'taskId' },
- { label: '闃舵鍚嶇О', prop: 'taskName' },
- ]
- },
- }
- },
- methods: {
- setTable(data, list) {
- return data.map(item => {
- if (list.length !== 0) {
- list.forEach(element => {
- if (item.id === element.attrId) item.checked = true
- });
- }
- return item
- })
- },
- // 鑾峰彇鍒楄〃
- async getDataList() {
- this.loading = false
- if (this.code) {
- const {pageSize, currentPage} = this.page
- let param = {size: pageSize, current: currentPage}
- const response = await getFlowpathList({...param, ...{templateId: this.code}})
- if (response.status === 200) {
- console.log(response)
- this.loading = false
- const data = response.data.data
- this.data = data.records
- this.page.total = data.total
- } else this.loading = false
- }else {
- this.data=[]
- }
- },
- // 鑾峰彇闃舵鍒楄〃
- async getStagelist() {
- this.loading = false
- console.log(this.modelKey)
- const response = await stagelist({ modelKey: this.modelKey })
- if (response.status === 200) {
- this.loading = false
- console.log(response.data)
- this.stageData = response.data.data
- } else this.loading = false
- },
- // 鑾峰彇鍏ㄩ儴灞炴��
- async getAttributeList() {
- const response = await attributeList({ 'conditionMap[classifyTemplateOid]': this.code })
- const responseRight = await attributeListRight({ templateId: this.code, modelKey: this.modelKey, taskId: this.saveParam.taskId })
- if (response.status === 200 && responseRight.status === 200) {
- let datas = response.data.data.records
- let dataRight = responseRight.data.data
- datas = datas.map(item => {
- const { oid, id, name, attributeGroup } = item
- item = { oid, id, name, attributeGroup, ...{ checked: false } }
- if (dataRight.length !== 0) {
- dataRight.forEach(element => { if (item.id === element.attrId) item.checked = true });
- }
- return item
- })
- console.log(datas)
- let dataValue = datas.map(item => item.checked ? item.oid : undefined)
- this.attributeValue = dataValue.filter(item => item)
- this.attributeData = datas
- this.flag = true
- }
- },
- // 鑾峰彇宸蹭繚瀛樺睘鎬�
- async getAttributeListRight() {
- const response = await attributeListRight({ templateId: this.code, modelKey: this.modelKey, taskId: this.saveParam.taskId })
- if (response.status === 200) {
- let data = response.data.data
- data = data.map(item => {
- const { attrId, attrName, attrGroup } = item
- return { attrId, attrName, attrGroup }
- })
- this.listRight = data
- }
- },
- // 缁存姢
- handleMaintenance(row) {
- console.log(row)
- this.dialogNode = true
- this.modelKey = row.modelKey
- this.saveParam.modelKey = row.modelKey
- this.getStagelist()
- },
- // 缁存姢
- handleMaintenanceTransfer(row) {
- this.saveParam.taskId = row.taskId
- this.saveParam.taskName = row.taskName
- this.getAttributeList()
- this.$nextTick(() => {
- this.dialogTransfer = true
- })
- },
- handleRowClick(row) {
- console.log(row)
- this.modelKey = row.modelKey
- this.saveParam.modelKey = row.modelKey
- this.dialogNode = true
- },
- handleRowStageClick(row) {
- this.saveParam.taskId = row.taskId
- this.saveParam.taskName = row.taskName
- this.getAttributeList()
- this.$nextTick(() => {
- this.dialogTransfer = true
- })
- },
- async handleSave(event) {
- console.log(event)
- const data = event.map(item => {
- const { id, name, attributeGroup } = item
- return { attrId: id, attrName: name, attrGroup: attributeGroup }
- })
- let param = {
- templateId: this.code,
- processStageAttr: data,
- ...this.saveParam
- }
- console.log(this.saveParam)
- console.log(data)
- const response = await attributeSave(param)
- if (response.status === 200) {
- // loading()
- console.log(response)
- this.$message({
- type: 'success',
- message: '鏂板鏁版嵁鎴愬姛锛�'
- })
- this.flag = false
- // done()
- // this.getDataList()
- }
- },
- handelClose() {
- this.flag = false
- }
+ Formlist: {
+ type: Array,
+ default: []
}
+ },
+ watch: {
+ code: {
+ handler(newval, oldval) {
+ this.getDataList()
+ }
+ }
+ },
+ data() {
+ const options = {
+ height: "auto",
+ border: true,
+ addBtn: false,
+ align: 'center',
+ menuAlign: 'center',
+ index: true,
+ searchMenuSpan: 8,
+ searchBtn: false,
+ emptyBtn: false,
+ columnBtn: false,
+ delBtn: false,
+ refreshBtn: false,
+ header: false,
+ editBtn: false,
+ }
+ return {
+ attributeData: [],
+ attributeValue: [],
+ flag: false,
+ dialogTransfer: false,
+ dialogNode: false,
+ visibleTable: false,
+ loading: false,
+ page: {
+ currentPage: 1,
+ pageSize: 10,
+ total: 0
+ },
+ modelKey: '',
+ data: [],
+ stageData: [],
+ saveParam: {},
+ columns: [
+ {
+ key: "oid",
+ label: "oid",
+ visible: false,
+ },
+ {
+ key: "id",
+ label: "灞炴�х紪鍙�",
+ visible: true,
+ },
+ {
+ key: "name",
+ label: "灞炴�у悕绉�",
+ visible: true,
+ },
+ {
+ key: "attributeGroup",
+ label: "灞炴�у垎缁�",
+ visible: true,
+ },
+ ],
+ option: {
+ ...options,
+ height: 383,
+ column: [
+ {label: '妯℃澘缂栧彿', prop: 'modelKey'},
+ {label: '妯℃澘鍚嶇О', prop: 'modelName'},
+ {label: '鎻忚堪', prop: 'buttonTypeValue'},
+ ]
+ },
+ stageOption: {
+ ...options,
+ height: 620,
+ column: [
+ {label: '闃舵缂栧彿', prop: 'taskId'},
+ {label: '闃舵鍚嶇О', prop: 'taskName'},
+ ]
+ },
+ }
+ },
+ methods: {
+ setTable(data, list) {
+ return data.map(item => {
+ if (list.length !== 0) {
+ list.forEach(element => {
+ if (item.id === element.attrId) item.checked = true
+ });
+ }
+ return item
+ })
+ },
+ // 鑾峰彇鍒楄〃
+ async getDataList() {
+ this.loading = false
+ if (this.code) {
+ const {pageSize, currentPage} = this.page
+ let param = {size: pageSize, current: currentPage}
+ const response = await getFlowpathList({...param, ...{templateId: this.code}})
+ if (response.status === 200) {
+ console.log(response)
+ this.loading = false
+ const data = response.data.data
+ this.data = data.records
+ this.page.total = data.total
+ } else this.loading = false
+ } else {
+ this.data = []
+ }
+ },
+ // 鑾峰彇闃舵鍒楄〃
+ async getStagelist() {
+ this.loading = false
+ console.log(this.modelKey)
+ const response = await stagelist({modelKey: this.modelKey})
+ if (response.status === 200) {
+ this.loading = false
+ console.log(response.data)
+ this.stageData = response.data.data
+ } else this.loading = false
+ },
+ // 鑾峰彇鍏ㄩ儴灞炴��
+ async getAttributeList() {
+ const response = await attributeList({'conditionMap[classifyTemplateOid]': this.code})
+ const responseRight = await attributeListRight({
+ templateId: this.code,
+ modelKey: this.modelKey,
+ taskId: this.saveParam.taskId
+ })
+ if (response.status === 200 && responseRight.status === 200) {
+ let datas = response.data.data.records
+ let dataRight = responseRight.data.data
+ datas = datas.map(item => {
+ const {oid, id, name, attributeGroup} = item
+ item = {oid, id, name, attributeGroup, ...{checked: false}}
+ if (dataRight.length !== 0) {
+ dataRight.forEach(element => {
+ if (item.id === element.attrId) item.checked = true
+ });
+ }
+ return item
+ })
+ console.log(datas)
+ let dataValue = datas.map(item => item.checked ? item.oid : undefined)
+ this.attributeValue = dataValue.filter(item => item)
+ this.attributeData = datas
+ this.flag = true
+ }
+ },
+ // 鑾峰彇宸蹭繚瀛樺睘鎬�
+ async getAttributeListRight() {
+ const response = await attributeListRight({
+ templateId: this.code,
+ modelKey: this.modelKey,
+ taskId: this.saveParam.taskId
+ })
+ if (response.status === 200) {
+ let data = response.data.data
+ data = data.map(item => {
+ const {attrId, attrName, attrGroup} = item
+ return {attrId, attrName, attrGroup}
+ })
+ this.listRight = data
+ }
+ },
+ // 缁存姢
+ handleMaintenance(row) {
+ console.log(row)
+ this.dialogNode = true
+ this.modelKey = row.modelKey
+ this.saveParam.modelKey = row.modelKey
+ this.getStagelist()
+ },
+ // 缁存姢
+ handleMaintenanceTransfer(row) {
+ this.saveParam.taskId = row.taskId
+ this.saveParam.taskName = row.taskName
+ this.getAttributeList()
+ this.$nextTick(() => {
+ this.dialogTransfer = true
+ })
+ },
+ handleRowClick(row) {
+ console.log(row)
+ this.modelKey = row.modelKey
+ this.saveParam.modelKey = row.modelKey
+ this.dialogNode = true
+ },
+ handleRowStageClick(row) {
+ this.saveParam.taskId = row.taskId
+ this.saveParam.taskName = row.taskName
+ this.getAttributeList()
+ this.$nextTick(() => {
+ this.dialogTransfer = true
+ })
+ },
+ async handleSave(event) {
+ console.log(event)
+ const data = event.map(item => {
+ const {id, name, attributeGroup} = item
+ return {attrId: id, attrName: name, attrGroup: attributeGroup}
+ })
+ let param = {
+ templateId: this.code,
+ processStageAttr: data,
+ ...this.saveParam
+ }
+ console.log(this.saveParam)
+ console.log(data)
+ const response = await attributeSave(param)
+ if (response.status === 200) {
+ // loading()
+ console.log(response)
+ this.$message({
+ type: 'success',
+ message: '鏂板鏁版嵁鎴愬姛锛�'
+ })
+ this.flag = false
+ // done()
+ // this.getDataList()
+ }
+ },
+ handelClose() {
+ this.flag = false
+ }
+ }
}
</script>
--
Gitblit v1.9.3