From 3cc2b58dcb169f147bc5bdccfd782514d736531d Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 30 一月 2024 11:23:09 +0800
Subject: [PATCH] 主题库定义编码规则 规则基础配置 业务类型
---
Source/UBCS-WEB/src/views/ruleBasic/delimiterConfig.vue | 5
Source/UBCS-WEB/src/views/ruleBasic/paddingCharacter.vue | 9
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue | 323 ++++++++++++++----------
Source/UBCS-WEB/src/components/FormTemplate/ThemeChildren.vue | 4
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 6
Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue | 8
Source/UBCS-WEB/src/views/ruleBasic/prefixConfig.vue | 6
Source/UBCS-WEB/src/views/modeling/Business.vue | 48 ++-
Source/UBCS-WEB/src/api/omd/btmType.js | 13
Source/UBCS-WEB/src/views/modeling/BusinessEdit.vue | 326 ++++++++++++++++---------
Source/UBCS-WEB/src/api/template/templateAttr.js | 10
11 files changed, 468 insertions(+), 290 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/omd/btmType.js b/Source/UBCS-WEB/src/api/omd/btmType.js
index d0e827d..a082511 100644
--- a/Source/UBCS-WEB/src/api/omd/btmType.js
+++ b/Source/UBCS-WEB/src/api/omd/btmType.js
@@ -52,7 +52,7 @@
export const update = (btmType) => {
return request({
- url: '/api/ubcs-omd/btm-type/submit/' + auto,
+ url: '/api/ubcs-omd/btm-type/submit/',
method: 'post',
data: btmType
})
@@ -69,3 +69,14 @@
}
})
}
+
+//榛樿璇锋眰
+export const defaultRequestHandler =(defaultAttrType) => {
+ return request({
+ url:'/api/ubcs-omd/btm-type/getDefaultAttr',
+ method:'get',
+ params:{
+ defaultAttrType
+ }
+ })
+}
diff --git a/Source/UBCS-WEB/src/api/template/templateAttr.js b/Source/UBCS-WEB/src/api/template/templateAttr.js
index bef95ca..95fcb69 100644
--- a/Source/UBCS-WEB/src/api/template/templateAttr.js
+++ b/Source/UBCS-WEB/src/api/template/templateAttr.js
@@ -34,16 +34,6 @@
data:data
})
}
-//鏆傛椂鏈夐棶棰�
-export const TreeObjcet = (oid) =>{
- return request({
- url:'/api/ubcs-code/codeClassify/getObjectByOid',
- method: 'get',
- params:{
- oid
- }
- })
-}
//鍚敤
export const TreeEnable = (data) =>{
return request({
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/ThemeChildren.vue b/Source/UBCS-WEB/src/components/FormTemplate/ThemeChildren.vue
index 02bd9e2..b2ada2b 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/ThemeChildren.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/ThemeChildren.vue
@@ -172,11 +172,13 @@
return;
}
const Parameter = {};
+ const DefaultParameter = {};
Parameter[`conditionMap['${this.SelectValue}']`] = this.SelectSearchValue;
+ DefaultParameter[`conditionMap['${this.SelectValue}_like']`] = this.SelectSearchValue;
if(this.codeType === "btmCode"){
this.btmDefaultRend(Parameter)
}else {
- this.defaultSearchRend(Parameter);
+ this.defaultSearchRend(DefaultParameter);
}
},
//琛ㄦ牸琛屽崟閫�
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index c11e7a3..992178f 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -350,7 +350,6 @@
TreeSave,
TreeDel,
TreeCheckDel,
- TreeObjcet,
TreeEnable,
TreeDeactivate,
gridCodeClassifyTemplate,
@@ -1172,9 +1171,8 @@
try {
this.requestCount += 1;
const [res1, res2, res3] = await Promise.all([
- TreeObjcet(data.oid),
+ getObjectByOid(data.oid),
gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}),
- getObjectByOid(data.oid)
]);
this.FlagObj = res1.data.data;
this.Formlist = res2.data.data.filter(item => {
@@ -1192,7 +1190,7 @@
this.ProData = [];
this.crudOid = ''
}
- this.TreeEditObj = res3.data.data;
+ this.TreeEditObj = res1.data.data;
if (this.TreeEditObj.isParticipateCheck === null || this.TreeEditObj.isParticipateCheck === undefined || this.TreeEditObj.isParticipateCheck === "") {
this.$set(this.TreeEditObj, "isParticipateCheck", 1)
return
diff --git a/Source/UBCS-WEB/src/views/modeling/Business.vue b/Source/UBCS-WEB/src/views/modeling/Business.vue
index 433d618..5e8f486 100644
--- a/Source/UBCS-WEB/src/views/modeling/Business.vue
+++ b/Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -6,7 +6,7 @@
<el-container>
<el-aside style="width: 300px">
<basic-container class="businessTreeContainer">
- <div class="app"style="overflow: auto;height: 84.3vh;">
+ <div class="app"style="height: calc(100vh - 145px);">
<div style="display: flex;margin-bottom: 10px;justify-content: space-around;">
<el-button v-if="permissionList.addBtn" plain size="mini" type="primary"
@click="businessAdd">
@@ -20,19 +20,21 @@
type="primary" @click="selectFromTable"> 浠庡凡鏈変腑鑾峰彇
</el-button>
</div>
- <avue-tree :data="treeData" :option="treeOption" class="businessTree" style="height: 74.3vh"
- @node-click="nodeClick">
- <template slot-scope="{ node, data }" class="el-tree-node__label">
- <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
- open-delay="250"
- placement="top-start">
- <span>
+ <div style="height: calc(100vh - 220px);overflow: auto">
+ <avue-tree :data="treeData" :option="treeOption" class="businessTree"
+ @node-click="nodeClick">
+ <template slot-scope="{ node, data }" class="el-tree-node__label">
+ <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
+ open-delay="250"
+ placement="top-start">
+ <span style="font-size: 15px;">
<i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i>
{{ (node || {}).label }}
</span>
- </el-tooltip>
- </template>
- </avue-tree>
+ </el-tooltip>
+ </template>
+ </avue-tree>
+ </div>
</div>
</basic-container>
@@ -107,7 +109,8 @@
<!-- 灞炴�у垪琛�-->
<basic-container>
<p style="margin-top: 10px;font-weight: 570;font-size: 19px">灞炴�у垪琛�</p>
- <avue-crud v-model="obj" :data="obj.attributes" :option="loadOption" class="attributeCrud">
+<!-- style="height: calc(100vh - 435px)"-->
+ <avue-crud v-model="obj" :data="obj.attributes" :option="loadOption" class="attributeCrud">
<template slot="attrDataTypeText" slot-scope="{row}">
<el-tag>{{ row.attrDataTypeText }}</el-tag>
</template>
@@ -166,6 +169,7 @@
selectionList: [],
treeData: [],
treeOption: {
+ height:'auto',
defaultExpandAll: false,
title: '涓氬姟绫诲瀷鏍�',
addBtn: false,
@@ -178,11 +182,16 @@
}
},
addOption: {
- btmType: {},
- btmEditType:{}
+ btmType: {
+ attributes:[]
+ },
+ btmEditType:{
+ attributes:[]
+ }
},
loadOption: {
height: 'auto',
+ calcHeight: 0,
border: true,
editBtn: false,
addBtn: false,
@@ -290,6 +299,17 @@
getDetail(data.oid).then(res => {
this.obj = res.data.data;
this.addOption.btmEditType = res.data.data;
+ // if(this.addOption.btmEditType.domainText){
+ // this.$refs.btmEdit.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection');
+ // }
+ // //鐗堟湰瑙勫垯
+ // if(this.addOption.btmEditType.revisionRuleName && this.addOption.btmEditType.revisionRuleId){
+ // this.$refs.btmEdit.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection');
+ // }
+ // //鐢熷懡鍛ㄦ湡
+ // if(this.addOption.btmEditType.lifeCycleId && this.addOption.btmEditType.lifeCycleName){
+ // this.$refs.btmEdit.getDefaultData('lifeCycle', 'lifeData', 'lifeCycleSelection')
+ // }
})
} else {
this.$message.warning('璇风偣鍑诲瓙鑺傜偣');
diff --git a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
index 4009cbb..45f1e48 100644
--- a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -1,18 +1,18 @@
- <template>
+<template>
<el-dialog
- title="涓氬姟绫诲瀷"
- :visible.sync="showSubmitDialog"
v-loading="loading"
+ :visible.sync="showSubmitDialog"
append-to-body
- @close="closeSubmitDialog"
- width="70%"
- top="6vh"
style="height: 115vh;"
+ title="涓氬姟绫诲瀷"
+ top="6vh"
+ width="70%"
+ @close="closeSubmitDialog"
>
- <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm"
- :rules="rules" @resetFields="resetForm" status-icon="true">
- <el-form-item label="鑻辨枃鍚嶇О" label-width="100px" required="true" prop="id">
- <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="false"></el-input>
+ <el-form ref="form" :model="btmType" :rules="rules" class="btmTypeForm" inline label-suffix=":" show-message="true"
+ size="medium" status-icon="true" @resetFields="resetForm">
+ <el-form-item label="鑻辨枃鍚嶇О" label-width="100px" prop="id" required="true">
+ <el-input v-model="btmType.id" :disabled="false" :prefix-icon="icons.key"></el-input>
</el-form-item>
<el-form-item label="涓枃鍚嶇О" label-width="100px">
<el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input>
@@ -20,72 +20,78 @@
<!-- <el-form-item label="鏁版嵁搴撹〃鍚�" label-width="100px">
<el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input>
</el-form-item> -->
- <el-form-item label="鎵�灞為鍩�" label-width="100px" prop="domain" class="domainSelect">
- <el-select placeholder="璇烽�夋嫨棰嗗煙" v-model="btmType.bizDomain" :prefix-icon="icons.domain">
+ <el-form-item class="domainSelect" label="鎵�灞為鍩�" label-width="100px" prop="domain">
+ <el-select v-model="btmType.bizDomain" :prefix-icon="icons.domain" placeholder="璇烽�夋嫨棰嗗煙" @change="domainChange">
<el-option v-for="item in domainOption"
- :label="item.label" :value="item.value" :key="item.value">
+ :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="鐗堟湰瑙勫垯" label-width="100px">
<el-input v-model="btmType.revisionRuleName"
:prefix-icon="icons.revisionRule"
- class="revisionRule"
- @focus="openRevision"
- clearable
- @clear="clearRevision"
:suffix-icon="icons.referType"
- placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�">
+ class="revisionRule"
+ clearable
+ placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�"
+ @change="ruleChange"
+ @clear="clearRevision"
+ @focus="openRevision">
</el-input>
</el-form-item>
<el-form-item label="鐢熷懡鍛ㄦ湡" label-width="100px">
<el-input v-model="btmType.lifeCycleName"
:prefix-icon="icons.lifeCycle"
- class="lifeCycle"
- @focus="openLifeCycle"
- clearable
- @clear="clearLifeCycle"
:suffix-icon="icons.referType"
- placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�">
+ class="lifeCycle"
+ clearable
+ placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�"
+ @clear="clearLifeCycle"
+ @focus="openLifeCycle">
</el-input>
</el-form-item>
-<!-- <div>-->
-<!-- <el-form-item label="寮�鍚鍥�" label-width="100px" class="viewFlag">-->
-<!-- <el-switch v-model="btmType.viewFlag" active-color="#13ce66" @change="viewChange"></el-switch>-->
-<!-- </el-form-item>-->
-<!-- <el-form-item label="瑙嗗浘璇彞" label-width="100px" class="viewInput">-->
-<!-- <el-input v-model="btmType.view" :prefix-icon="icons.view" :disabled="!btmType.viewFlag"></el-input>-->
-<!-- </el-form-item>-->
-<!-- </div>-->
- <el-form-item label="鎻忚堪" label-width="100px" class="description">
- <el-input v-model="btmType.description"
+ <!-- <div>-->
+ <!-- <el-form-item label="寮�鍚鍥�" label-width="100px" class="viewFlag">-->
+ <!-- <el-switch v-model="btmType.viewFlag" active-color="#13ce66" @change="viewChange"></el-switch>-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item label="瑙嗗浘璇彞" label-width="100px" class="viewInput">-->
+ <!-- <el-input v-model="btmType.view" :prefix-icon="icons.view" :disabled="!btmType.viewFlag"></el-input>-->
+ <!-- </el-form-item>-->
+ <!-- </div>-->
+ <el-form-item class="description" label="鎻忚堪" label-width="100px">
+ <el-input id="descId"
+ v-model="btmType.description"
:prefix-icon="icons.desc"
class="descClass"
- id="descId"
></el-input>
</el-form-item>
</el-form>
- <avue-crud :option="option"
+ <avue-crud ref="attrTable"
:data="btmType.attributes"
- :page.sync="page"
- ref="attrTable">
- <template slot-scope="scope" slot="menuLeft">
- <el-button type="danger"
- icon="el-icon-plus"
+ :option="option"
+ :page.sync="page">
+ <template slot="menuLeft" slot-scope="scope">
+ <el-button icon="el-icon-plus"
size="small"
+ type="danger"
@click="rowAdd()">灞炴�ч�夋嫨
</el-button>
</template>
<template slot="attrDataTypeText" slot-scope="{row}">
- <el-tag>{{ row.attrDataTypeText }}</el-tag>
+ <el-tag v-if=" row.attrDataTypeText">{{ row.attrDataTypeText }}</el-tag>
+ </template>
+ <template slot="isDefaultAttr" slot-scope="{row}">
+ <el-tag v-if="row.isDefaultAttr" type="success">鏄�</el-tag>
+ <el-tag v-else type="danger">鍚�</el-tag>
</template>
<template slot="menu" slot-scope="{row,index}">
- <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row,index)">缂栬緫
+ <el-button v-if="!row.$cellEdit" icon="el-icon-edit" size="small" type="text" @click="cellEditClick(row,index)">
+ 缂栬緫
</el-button>
- <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit"
+ <el-button v-if="!row.$cellEdit" icon="el-icon-delete" size="small" type="text"
@click="removeFormAttrTable(row,index)">绉婚櫎
</el-button>
- <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="cellEditSave(row,index)">
+ <el-button v-if="row.$cellEdit" icon="el-icon-check" size="small" type="text" @click="cellEditSave(row,index)">
淇濆瓨
</el-button>
</template>
@@ -96,23 +102,23 @@
</div>
<!-- 灞炴�ф睜鐨勯�夋嫨 -->
- <el-dialog title="灞炴�ф睜"
- :visible="attrRef.visible"
+ <el-dialog :visible="attrRef.visible"
append-to-body
- @close="closeAttrDialog"
+ title="灞炴�ф睜"
width="80%"
+ @close="closeAttrDialog"
>
- <avue-crud class="attrRef"
- :option="attrRef.option"
+ <avue-crud ref="attrRef"
+ v-loading="attrRef.loading"
:data="attrRef.data"
+ :option="attrRef.option"
:page.sync="attrRef.page"
- ref="attrRef"
+ class="attrRef"
@on-load="attrRefOnLoad"
@search-change="attrRefSearch"
- @selection-change="selectionChange"
- v-loading="attrRef.loading">
+ @selection-change="selectionChange">
<template slot="typeValue" slot-scope="scope">
- <el-tag>{{ scope.row.typeValue }}</el-tag>
+ <el-tag v-if="scope.row.typeValue">{{ scope.row.typeValue }}</el-tag>
</template>
</avue-crud>
<div slot="footer" class="dialog-footer">
@@ -121,19 +127,19 @@
</div>
</el-dialog>
<!-- 鐗堟湰瑙勫垯鐨勫弬鐓� -->
- <el-dialog title="璇烽�夋嫨鐗堟湰瑙勫垯"
- :visible.sync="revisionRef.visible"
+ <el-dialog :visible.sync="revisionRef.visible"
append-to-body
+ title="璇烽�夋嫨鐗堟湰瑙勫垯"
width="80%">
- <avue-crud class="revisionRef"
- :option="revisionRef.option"
- :data="revisionRef.data"
- :page.sync="revisionRef.page"
- ref="revisionRef"
- @row-click="revisionClick"
+ <avue-crud ref="revisionRef"
v-loading="revisionRef.loading"
- @search-change="searchRevisionRule"
+ :data="revisionRef.data"
+ :option="revisionRef.option"
+ :page.sync="revisionRef.page"
+ class="revisionRef"
+ @row-click="revisionClick"
+ @search-change="searchRevisionRule"
@search-reset="clearSearchRevisionRule">
<template slot="radio"
slot-scope="{row}">
@@ -149,19 +155,19 @@
</el-dialog>
<!-- 鐢熷懡鍛ㄦ湡鐨勫弬鐓� -->
- <el-dialog title="璇烽�夋嫨鐢熷懡鍛ㄦ湡"
- :visible.sync="lifeCycleRef.visible"
+ <el-dialog :visible.sync="lifeCycleRef.visible"
append-to-body
+ title="璇烽�夋嫨鐢熷懡鍛ㄦ湡"
width="80%">
- <avue-crud class="lifeCycleRef"
- :option="lifeCycleRef.option"
- :data="lifeCycleRef.data"
- :page.sync="lifeCycleRef.page"
- ref="lifeCycleRef"
- @row-click="lifeCycleClick"
+ <avue-crud ref="lifeCycleRef"
v-loading="lifeCycleRef.loading"
- @search-change="searchLifeCycle"
+ :data="lifeCycleRef.data"
+ :option="lifeCycleRef.option"
+ :page.sync="lifeCycleRef.page"
+ class="lifeCycleRef"
+ @row-click="lifeCycleClick"
+ @search-change="searchLifeCycle"
@search-reset="clearSearchLifeCycle">
<template slot="radio"
slot-scope="{row}">
@@ -183,7 +189,7 @@
<script>
-import {add, update} from '@/api/omd/btmType';
+import {add, update, defaultRequestHandler} from '@/api/omd/btmType';
import {queryPage} from '@/api/omd/OmdAttribute';
import {getPage} from '@/api/omd/revisionRule';
import {getList} from '@/api/modeling/cycle';
@@ -193,7 +199,7 @@
props: {
btmType: {
type: Object,
- default:{}
+ default: {}
},
domainOption: {
type: Array
@@ -202,19 +208,14 @@
type: Array
},
type: {
- type:String,
+ type: String,
},
- btmEditType:{
- type:Object,
- default: {}
- }
},
- watch: {
- },
+ watch: {},
data() {
return {
form: {},
- loading:false,
+ loading: false,
showSubmitDialog: false,
option: {
height: "330px",
@@ -228,6 +229,7 @@
editBtn: false,
delBtn: false,
columnBtn: false,
+ refreshBtn: false,
menuWidth: 150,
addBtn: false,
highlightCurrentRow: true,
@@ -236,13 +238,13 @@
label: '鑻辨枃鍚嶇О',
prop: 'id',
align: 'center',
- disabled:true
+ disabled: true
}, {
label: '涓枃鍚嶇О',
prop: 'name',
align: 'center',
cell: true
- },{
+ }, {
label: "绫诲瀷",
prop: "attrDataTypeText",
align: 'center',
@@ -259,6 +261,13 @@
prop: "description",
align: 'center',
cell: true
+ },
+ {
+ label: '榛樿瀛楁',
+ prop: 'isDefaultAttr',
+ align: 'center',
+ cell: true,
+ slot: true
}
]
},
@@ -288,7 +297,7 @@
prop: 'id',
align: 'left',
search: true,
- disabled:true,
+ disabled: true,
width: 230
}, {
label: '涓枃鍚嶇О',
@@ -361,7 +370,7 @@
{
label: '鑻辨枃鍚嶇О',
prop: 'id',
- disabled:true,
+ disabled: true,
search: true
},
{
@@ -426,7 +435,7 @@
{
label: '鑻辨枃鍚嶇О',
prop: 'id',
- disabled:true,
+ disabled: true,
search: true
},
{
@@ -475,20 +484,73 @@
{required: true, message: '璇烽�夋嫨鎵�灞為鍩�', trigger: 'blur'}
]
},
+ domainData: [],
+ ruleData: [],
+ lifeData: [],
+ domainFirstSelection: true,
+ ruleFirstSelection: true,
+ lifeCycleSelection: true,
}
},
created() {
},
methods: {
+ getDefaultData(requestType, dataName, selectionName) {
+ if (this[selectionName]) {
+ defaultRequestHandler(requestType).then(res => {
+ this[dataName] = res.data.data;
+ res.data.data.forEach(item => {
+ let data = {
+ id: item.id,
+ name: item.name,
+ attrDataType: item.attrDataType,
+ attrDataTypeText: item.attrDataTypeText,
+ defaultValue: item.defaultValue,
+ description: item.description,
+ attributeLength: item.attributeLength,
+ referBtmTypeId: item.referTypeCode,
+ referBtmTypeName: item.referToName,
+ enumId: item.dictCode,
+ isDefaultAttr: item.isDefaultAttr
+ }
+ if (!this.btmType.attributes) {
+ this.btmType.attributes = [];
+ }
+ this.btmType.attributes.push(data);
+ })
+ this.attrRefOnLoad()
+ this[selectionName] = false;
+ });
+ }
+ },
+ //鎵�灞為鍩焎hange
+ domainChange() {
+ this.getDefaultData('defaultAttr', 'domainData', 'domainFirstSelection');
+ },
+ //鐗堟湰瑙勫垯change
+ ruleHandler() {
+ this.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection');
+ },
+ //鐢熷懡鍛ㄦ湡change
+ lifeCycleHandler() {
+ this.getDefaultData('lifeCycle', 'lifeData', 'lifeCycleSelection');
+ },
+ //榛樿鍊艰姹�
+ defaultValueRequest() {
+
+ },
// 鍏抽棴缁勪欢寮圭獥
closeSubmitDialog() {
this.showSubmitDialog = false;
- // this.btmType.attributes = [];
- // this.btmType = {};
- // this.attrRef.selectData = [];
- // this.attrRef.queryNotIn = null;
- // this.resetForm();
+ //鎵�灞為鍩熺姸鎬侀噸鏂拌祴鍊�
+ this.domainFirstSelection = true;
+ //鐗堟湰瑙勫垯鐘舵�侀噸鏂拌祴鍊�
+ this.ruleFirstSelection = true;
+ //鐢熷懡鍛ㄦ湡鐘舵�侀噸鏂拌祴鍊�
+ this.lifeCycleSelection = true;
+ //閲嶇疆鏍¢獙瑙勫垯
+ this.$refs.form.resetFields();
},
// 鍏抽棴灞炴�ф睜鏌ヨ寮圭獥
closeAttrDialog() {
@@ -512,12 +574,7 @@
const data = res.data.data;
this.attrRef.page.total = data.total;
this.attrRef.data = data.records;
- });
- setTimeout(() => {
this.attrRef.loading = false;
- }, 600)
- this.$nextTick(() => {
- this.$refs.attrRef.refreshTable();
});
},
// 灞炴�ф睜妫�绱�
@@ -571,23 +628,23 @@
// 娣诲姞涓氬姟绫诲瀷
submitBtmType() {
// console.log(this.btmType);
- if (!this.btmType.attributes){
- this.$message.warning("杩樻病鏈変负涓氬姟绫诲瀷閫夋嫨灞炴��");
- return;
- }else{
+ if (!this.btmType.attributes) {
+ this.$message.warning("杩樻病鏈変负涓氬姟绫诲瀷閫夋嫨灞炴��");
+ return;
+ } else {
let nullFlag = false;
- this.btmType.attributes.forEach(item => {
- if (!item.name){
- this.$message.warning("绗�" + (item.$index+1) + "琛岀殑涓枃鍚嶇О涓嶈兘涓虹┖");
- nullFlag = true;
- return;
- }
- })
- if (nullFlag){
+ this.btmType.attributes.forEach(item => {
+ if (!item.name) {
+ this.$message.warning("绗�" + (item.$index + 1) + "琛岀殑涓枃鍚嶇О涓嶈兘涓虹┖");
+ nullFlag = true;
+ return;
+ }
+ })
+ if (nullFlag) {
return;
}
-
}
+ this.btmType.attributes = this.btmType.attributes.filter(item => !item.isDefaultAttr);
add(this.btmType, true).then(res => {
// 娣诲姞瀹屾垚锛屽洖璋冪埗缁勪欢鐨勫埛鏂�
this.$message.success('淇濆瓨鎴愬姛');
@@ -617,7 +674,7 @@
cell.$cellEdit = true;
},
// 鍒楄〃缂栬緫淇濆瓨
- cellEditSave(row,index) {
+ cellEditSave(row, index) {
this.btmType.attributes[index].name = row.name
this.btmType.attributes[index].defaultValue = row.defaultValue;
this.btmType.attributes[index].description = row.description;
@@ -626,22 +683,21 @@
this.$refs.attrTable.refreshTable();
},
// 鎵撳紑鐗堟湰瑙勫垯鍙傜収
- openRevision() {
+ openRevision() {
this.revisionRef.visible = true;
this.revisionRuleOnLoad();
},
// 鐗堟湰鍙傜収鍒楄〃鐨勯粯璁ゆ煡璇㈡柟娉�
- revisionRuleOnLoad(){
+ revisionRuleOnLoad() {
this.revisionRef.loading = true;
getPage().then(res => {
this.revisionRef.data = res.data.data.records;
- });
- setTimeout(() => {
this.revisionRef.loading = false;
- }, 600)
- this.$nextTick(() => {
- this.$refs.revisionRef.refreshTable();
});
+
+ // this.$nextTick(() => {
+ // this.$refs.revisionRef.refreshTable();
+ // });
},
// 鎵撳紑鐗堟湰瑙勫垯鍙傜収
openLifeCycle() {
@@ -649,14 +705,12 @@
this.lifeCycleOnLoad();
},
// 鐢熷懡鍛ㄦ湡鍒楄〃鐨勯粯璁ゆ煡璇㈡柟娉�
- lifeCycleOnLoad(){
+ lifeCycleOnLoad() {
this.lifeCycleRef.loading = true;
getList().then(res => {
this.lifeCycleRef.data = res.data.data.records;
- });
- setTimeout(() => {
this.lifeCycleRef.loading = false;
- }, 600)
+ });
this.$nextTick(() => {
this.$refs.lifeCycleRef.refreshTable();
});
@@ -675,7 +729,9 @@
this.btmType.revisionRuleId = this.revisionRef.selectData.id;
this.btmType.revisionRuleName = this.revisionRef.selectData.name;
this.btmType.inputRevisionFlag = false;
+ this.ruleHandler()
this.cancelRevision();
+
},
// 纭閫変腑鐢熷懡鍛ㄦ湡
confirmLifeCycle() {
@@ -683,6 +739,7 @@
this.btmType.lifeCycleId = this.lifeCycleRef.selectData.id;
this.btmType.lifeCycleName = this.lifeCycleRef.selectData.name;
this.cancelLifeCycle();
+ this.lifeCycleHandler()
},
// 鍙栨秷閫変腑鐗堟湰瑙勫垯
cancelRevision() {
@@ -735,16 +792,16 @@
* @param params 鎼滅储妗嗚緭鍏ュ�� {id: '',name: ''} 鐩存帴鑾峰彇灏辫
* @param done 鎵ц瀹屾垚鍚庣殑鍥炶皟
*/
- searchRevisionRule(params,done){
+ searchRevisionRule(params, done) {
let condition = {};
- if (params.id){
- condition['id_like'] = params.id;
+ if (params.id) {
+ condition['id_like'] = params.id;
}
- if (params.name){
- condition['name_like'] = params.name;
+ if (params.name) {
+ condition['name_like'] = params.name;
}
this.revisionRef.loading = true;
- getPage(this.revisionRef.page.currentPage,this.revisionRef.page.pageSize,condition).then(res => {
+ getPage(this.revisionRef.page.currentPage, this.revisionRef.page.pageSize, condition).then(res => {
this.revisionRef.data = res.data.data.records;
});
setTimeout(() => {
@@ -760,16 +817,16 @@
* @param params 鎼滅储妗嗚緭鍏ュ��
* @param done 鎵ц瀹屾垚鍚庣殑鍥炶皟
*/
- searchLifeCycle(params,done){
+ searchLifeCycle(params, done) {
let condition = {};
- if (params.id){
+ if (params.id) {
condition['id_like'] = params.id;
}
- if (params.name){
+ if (params.name) {
condition['name_like'] = params.name;
}
this.lifeCycleRef.loading = true;
- getList(this.lifeCycleRef.page.currentPage,this.lifeCycleRef.page.pageSize,condition).then(res => {
+ getList(this.lifeCycleRef.page.currentPage, this.lifeCycleRef.page.pageSize, condition).then(res => {
this.lifeCycleRef.data = res.data.data.records;
});
setTimeout(() => {
@@ -781,11 +838,11 @@
});
},
// 鍙栨秷鐗堟湰瑙勫垯鎼滅储
- clearSearchRevisionRule(item){
+ clearSearchRevisionRule(item) {
this.revisionRuleOnLoad();
},
// 鍙栨秷鐢熷懡鍛ㄦ湡鎼滅储
- clearSearchLifeCycle(item){
+ clearSearchLifeCycle(item) {
this.lifeCycleOnLoad();
console.log(item);
}
diff --git a/Source/UBCS-WEB/src/views/modeling/BusinessEdit.vue b/Source/UBCS-WEB/src/views/modeling/BusinessEdit.vue
index d60c8cb..6153267 100644
--- a/Source/UBCS-WEB/src/views/modeling/BusinessEdit.vue
+++ b/Source/UBCS-WEB/src/views/modeling/BusinessEdit.vue
@@ -1,18 +1,19 @@
<template>
<el-dialog
- title="涓氬姟绫诲瀷"
- :visible.sync="showSubmitDialog"
v-loading="loading"
+ :visible.sync="showSubmitDialog"
append-to-body
- @close="closeSubmitDialog"
- width="70%"
- top="6vh"
style="height: 115vh;"
+ title="涓氬姟绫诲瀷"
+ top="6vh"
+ width="70%"
+ @close="closeSubmitDialog"
>
- <el-form ref="form" :model="btmEditType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm"
- :rules="rules" @resetFields="resetForm" status-icon="true">
- <el-form-item label="鑻辨枃鍚嶇О" label-width="100px" prop="id">
- <el-input v-model="btmType.id" :prefix-icon="icons.key" :disabled="true"></el-input>
+ <el-form ref="form" :model="btmType" :rules="rules" class="btmTypeForm" inline label-suffix=":"
+ show-message="true"
+ size="medium" status-icon="true" @resetFields="resetForm">
+ <el-form-item label="鑻辨枃鍚嶇О" label-width="100px" prop="id">
+ <el-input v-model="btmType.id" :disabled="true" :prefix-icon="icons.key"></el-input>
</el-form-item>
<el-form-item label="涓枃鍚嶇О" label-width="100px">
<el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input>
@@ -20,33 +21,33 @@
<!-- <el-form-item label="鏁版嵁搴撹〃鍚�" label-width="100px">
<el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input>
</el-form-item> -->
- <el-form-item label="鎵�灞為鍩�" label-width="100px" prop="domain" class="domainSelect">
- <el-select placeholder="璇烽�夋嫨棰嗗煙" v-model="btmType.bizDomain" :prefix-icon="icons.domain">
+ <el-form-item class="domainSelect" label="鎵�灞為鍩�" label-width="100px" prop="domain">
+ <el-select v-model="btmType.bizDomain" :prefix-icon="icons.domain" placeholder="璇烽�夋嫨棰嗗煙" @change="domainChange">
<el-option v-for="item in domainOption"
- :label="item.label" :value="item.value" :key="item.value">
+ :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="鐗堟湰瑙勫垯" label-width="100px">
<el-input v-model="btmType.revisionRuleName"
:prefix-icon="icons.revisionRule"
- class="revisionRule"
- @focus="openRevision"
- clearable
- @clear="clearRevision"
:suffix-icon="icons.referType"
- placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�">
+ class="revisionRule"
+ clearable
+ placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�"
+ @clear="clearRevision"
+ @focus="openRevision">
</el-input>
</el-form-item>
<el-form-item label="鐢熷懡鍛ㄦ湡" label-width="100px">
<el-input v-model="btmType.lifeCycleName"
:prefix-icon="icons.lifeCycle"
- class="lifeCycle"
- @focus="openLifeCycle"
- clearable
- @clear="clearLifeCycle"
:suffix-icon="icons.referType"
- placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�">
+ class="lifeCycle"
+ clearable
+ placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�"
+ @clear="clearLifeCycle"
+ @focus="openLifeCycle">
</el-input>
</el-form-item>
<!-- <div>-->
@@ -57,35 +58,40 @@
<!-- <el-input v-model="btmType.view" :prefix-icon="icons.view" :disabled="!btmType.viewFlag"></el-input>-->
<!-- </el-form-item>-->
<!-- </div>-->
- <el-form-item label="鎻忚堪" label-width="100px" class="description">
- <el-input v-model="btmType.description"
+ <el-form-item class="description" label="鎻忚堪" label-width="100px">
+ <el-input id="descId"
+ v-model="btmType.description"
:prefix-icon="icons.desc"
class="descClass"
- id="descId"
></el-input>
</el-form-item>
</el-form>
- <avue-crud :option="option"
+ <avue-crud ref="attrTable"
:data="btmType.attributes"
- :page.sync="page"
- ref="attrTable">
- <template slot-scope="scope" slot="menuLeft">
- <el-button type="danger"
- icon="el-icon-plus"
+ :option="option"
+ :page.sync="page">
+ <template slot="menuLeft" slot-scope="scope">
+ <el-button icon="el-icon-plus"
size="small"
+ type="danger"
@click="rowAdd()">灞炴�ч�夋嫨
</el-button>
</template>
<template slot="attrDataTypeText" slot-scope="{row}">
- <el-tag>{{ row.attrDataTypeText }}</el-tag>
+ <el-tag v-if="row.attrDataTypeText">{{ row.attrDataTypeText }}</el-tag>
+ </template>
+ <template slot="isDefaultAttr" slot-scope="{row}">
+ <el-tag v-if="row.isDefaultAttr" type="success">鏄�</el-tag>
+ <el-tag v-else type="danger">鍚�</el-tag>
</template>
<template slot="menu" slot-scope="{row,index}">
- <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row,index)">缂栬緫
+ <el-button v-if="!row.$cellEdit" icon="el-icon-edit" size="small" type="text" @click="cellEditClick(row,index)">
+ 缂栬緫
</el-button>
- <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit"
+ <el-button v-if="!row.$cellEdit" icon="el-icon-delete" size="small" type="text"
@click="removeFormAttrTable(row,index)">绉婚櫎
</el-button>
- <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="cellEditSave(row,index)">
+ <el-button v-if="row.$cellEdit" icon="el-icon-check" size="small" type="text" @click="cellEditSave(row,index)">
淇濆瓨
</el-button>
</template>
@@ -96,23 +102,23 @@
</div>
<!-- 灞炴�ф睜鐨勯�夋嫨 -->
- <el-dialog title="灞炴�ф睜"
- :visible="attrRef.visible"
+ <el-dialog :visible="attrRef.visible"
append-to-body
- @close="closeAttrDialog"
+ title="灞炴�ф睜"
width="80%"
+ @close="closeAttrDialog"
>
- <avue-crud class="attrRef"
- :option="attrRef.option"
+ <avue-crud ref="attrRef"
+ v-loading="attrRef.loading"
:data="attrRef.data"
+ :option="attrRef.option"
:page.sync="attrRef.page"
- ref="attrRef"
+ class="attrRef"
@on-load="attrRefOnLoad"
@search-change="attrRefSearch"
- @selection-change="selectionChange"
- v-loading="attrRef.loading">
+ @selection-change="selectionChange">
<template slot="typeValue" slot-scope="scope">
- <el-tag>{{ scope.row.typeValue }}</el-tag>
+ <el-tag v-if="scope.row.typeValue">{{ scope.row.typeValue }}</el-tag>
</template>
</avue-crud>
<div slot="footer" class="dialog-footer">
@@ -121,18 +127,18 @@
</div>
</el-dialog>
<!-- 鐗堟湰瑙勫垯鐨勫弬鐓� -->
- <el-dialog title="璇烽�夋嫨鐗堟湰瑙勫垯"
- :visible.sync="revisionRef.visible"
+ <el-dialog :visible.sync="revisionRef.visible"
append-to-body
+ title="璇烽�夋嫨鐗堟湰瑙勫垯"
width="80%">
- <avue-crud class="revisionRef"
- :option="revisionRef.option"
- :data="revisionRef.data"
- :page.sync="revisionRef.page"
- ref="revisionRef"
- @row-click="revisionClick"
+ <avue-crud ref="revisionRef"
v-loading="revisionRef.loading"
+ :data="revisionRef.data"
+ :option="revisionRef.option"
+ :page.sync="revisionRef.page"
+ class="revisionRef"
+ @row-click="revisionClick"
@search-change="searchRevisionRule"
@search-reset="clearSearchRevisionRule">
<template slot="radio"
@@ -149,18 +155,18 @@
</el-dialog>
<!-- 鐢熷懡鍛ㄦ湡鐨勫弬鐓� -->
- <el-dialog title="璇烽�夋嫨鐢熷懡鍛ㄦ湡"
- :visible.sync="lifeCycleRef.visible"
+ <el-dialog :visible.sync="lifeCycleRef.visible"
append-to-body
+ title="璇烽�夋嫨鐢熷懡鍛ㄦ湡"
width="80%">
- <avue-crud class="lifeCycleRef"
- :option="lifeCycleRef.option"
- :data="lifeCycleRef.data"
- :page.sync="lifeCycleRef.page"
- ref="lifeCycleRef"
- @row-click="lifeCycleClick"
+ <avue-crud ref="lifeCycleRef"
v-loading="lifeCycleRef.loading"
+ :data="lifeCycleRef.data"
+ :option="lifeCycleRef.option"
+ :page.sync="lifeCycleRef.page"
+ class="lifeCycleRef"
+ @row-click="lifeCycleClick"
@search-change="searchLifeCycle"
@search-reset="clearSearchLifeCycle">
<template slot="radio"
@@ -183,7 +189,7 @@
<script>
-import {add, update} from '@/api/omd/btmType';
+import {add, defaultRequestHandler, update} from '@/api/omd/btmType';
import {queryPage} from '@/api/omd/OmdAttribute';
import {getPage} from '@/api/omd/revisionRule';
import {getList} from '@/api/modeling/cycle';
@@ -193,7 +199,7 @@
props: {
btmType: {
type: Object,
- default:{}
+ default: {}
},
domainOption: {
type: Array
@@ -202,19 +208,37 @@
type: Array
},
type: {
- type:String,
+ type: String,
},
- btmEditType:{
- type:Object,
- default: {}
- }
},
watch: {
+ btmType(newval) {
+ if (newval) {
+ //鎵�灞為鍩�
+ if (newval.domainText) {
+ this.getDefaultData('defaultAttr', 'domainData', 'domainFirstSelection', 'get');
+ }else {
+ this.domainFirstValue = false;
+ }
+ //鐗堟湰瑙勫垯
+ if (newval.revisionRuleName && newval.revisionRuleId) {
+ this.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection', 'get');
+ }else {
+ this.ruleFirstValue = false;
+ }
+ //鐢熷懡鍛ㄦ湡
+ if (newval.lifeCycleId && newval.lifeCycleName) {
+ this.getDefaultData('lifeCycle', 'lifeData', 'lifeCycleSelection', 'get');
+ }else {
+ this.lifeCycleValue = false;
+ }
+ }
+ }
},
data() {
return {
form: {},
- loading:false,
+ loading: false,
showSubmitDialog: false,
option: {
height: "330px",
@@ -229,7 +253,7 @@
delBtn: false,
columnBtn: false,
menuWidth: 150,
- refreshBtn:false,
+ refreshBtn: false,
addBtn: false,
highlightCurrentRow: true,
column: [
@@ -237,13 +261,13 @@
label: '鑻辨枃鍚嶇О',
prop: 'id',
align: 'center',
- disabled:true
+ disabled: true
}, {
label: '涓枃鍚嶇О',
prop: 'name',
align: 'center',
cell: true
- },{
+ }, {
label: "绫诲瀷",
prop: "attrDataTypeText",
align: 'center',
@@ -260,6 +284,13 @@
prop: "description",
align: 'center',
cell: true
+ },
+ {
+ label: '榛樿瀛楁',
+ prop: 'isDefaultAttr',
+ align: 'center',
+ cell: true,
+ slot: true
}
]
},
@@ -289,7 +320,7 @@
prop: 'id',
align: 'left',
search: true,
- disabled:true,
+ disabled: true,
width: 230
}, {
label: '涓枃鍚嶇О',
@@ -362,7 +393,7 @@
{
label: '鑻辨枃鍚嶇О',
prop: 'id',
- disabled:true,
+ disabled: true,
search: true
},
{
@@ -427,7 +458,7 @@
{
label: '鑻辨枃鍚嶇О',
prop: 'id',
- disabled:true,
+ disabled: true,
search: true
},
{
@@ -476,12 +507,85 @@
{required: true, message: '璇烽�夋嫨鎵�灞為鍩�', trigger: 'blur'}
]
},
+ domainData: [],
+ ruleData: [],
+ lifeData: [],
+ domainFirstSelection: true,
+ domainFirstValue: true,
+ ruleFirstSelection: true,
+ ruleFirstValue: true,
+ lifeCycleSelection: true,
+ lifeCycleValue: true,
}
},
created() {
-
},
methods: {
+ //鎵�灞為鍩焎hange
+ domainChange(){
+ if(!this.domainFirstValue){
+ this.getDefaultData('defaultAttr', 'domainData', 'domainFirstSelection', 'detail');
+ this.domainFirstValue = true;
+ }
+ },
+ getDefaultData(requestType, dataName, selectionName, type) {
+ if (type === 'get') {
+ defaultRequestHandler(requestType).then(res => {
+ this[dataName] = res.data.data;
+ res.data.data.forEach(item => {
+ let data = {
+ id: item.id,
+ name: item.name,
+ attrDataType: item.attrDataType,
+ attrDataTypeText: item.attrDataTypeText,
+ defaultValue: item.defaultValue,
+ description: item.description,
+ attributeLength: item.attributeLength,
+ referBtmTypeId: item.referTypeCode,
+ referBtmTypeName: item.referToName,
+ enumId: item.dictCode,
+ isDefaultAttr: item.isDefaultAttr
+ }
+ if (!this.btmType.attributes) {
+ this.btmType.attributes = [];
+ }
+ // 鑾峰彇閲嶅鐨刬d
+ let isIds = this.btmType.attributes.filter(attr => attr.id === data.id);
+ if (isIds.length === 0) {
+ this.btmType.attributes.push(data);
+ }
+ })
+ this.attrRefOnLoad()
+ });
+ } else {
+ if (this[selectionName]) {
+ defaultRequestHandler(requestType).then(res => {
+ this[dataName] = res.data.data;
+ res.data.data.forEach(item => {
+ let data = {
+ id: item.id,
+ name: item.name,
+ attrDataType: item.attrDataType,
+ attrDataTypeText: item.attrDataTypeText,
+ defaultValue: item.defaultValue,
+ description: item.description,
+ attributeLength: item.attributeLength,
+ referBtmTypeId: item.referTypeCode,
+ referBtmTypeName: item.referToName,
+ enumId: item.dictCode,
+ isDefaultAttr: item.isDefaultAttr
+ }
+ if (!this.btmType.attributes) {
+ this.btmType.attributes = [];
+ }
+ this.btmType.attributes.push(data);
+ })
+ this.attrRefOnLoad()
+ this[selectionName] = false;
+ });
+ }
+ }
+ },
// 鍏抽棴缁勪欢寮圭獥
closeSubmitDialog() {
this.showSubmitDialog = false;
@@ -513,12 +617,7 @@
const data = res.data.data;
this.attrRef.page.total = data.total;
this.attrRef.data = data.records;
- });
- setTimeout(() => {
this.attrRef.loading = false;
- }, 600)
- this.$nextTick(() => {
- this.$refs.attrRef.refreshTable();
});
},
// 灞炴�ф睜妫�绱�
@@ -572,24 +671,17 @@
// 娣诲姞涓氬姟绫诲瀷
submitBtmType() {
// console.log(this.btmType);
- if (!this.btmType.attributes){
+ if (!this.btmType || !this.btmType.attributes) {
this.$message.warning("杩樻病鏈変负涓氬姟绫诲瀷閫夋嫨灞炴��");
return;
- }else{
- let nullFlag = false;
- this.btmType.attributes.forEach(item => {
- if (!item.name){
- this.$message.warning("绗�" + (item.$index+1) + "琛岀殑涓枃鍚嶇О涓嶈兘涓虹┖");
- nullFlag = true;
- return;
- }
- })
- if (nullFlag){
- return;
- }
-
}
- add(this.btmType, true).then(res => {
+ const hasEmptyName = this.btmType.attributes.some(item => !item.name);
+ if (hasEmptyName) {
+ this.$message.warning('璇锋鏌ヨ〃鏍间腑鏄惁瀛樺湪涓枃鍚嶇О涓虹┖锛�')
+ return;
+ }
+ this.btmType.attributes = this.btmType.attributes.filter(item => !item.isDefaultAttr);
+ add(this.btmType,true).then(res => {
// 娣诲姞瀹屾垚锛屽洖璋冪埗缁勪欢鐨勫埛鏂�
this.$message.success('淇濆瓨鎴愬姛');
this.cancleSubmitBtmType();
@@ -618,7 +710,7 @@
cell.$cellEdit = true;
},
// 鍒楄〃缂栬緫淇濆瓨
- cellEditSave(row,index) {
+ cellEditSave(row, index) {
this.btmType.attributes[index].name = row.name
this.btmType.attributes[index].defaultValue = row.defaultValue;
this.btmType.attributes[index].description = row.description;
@@ -632,7 +724,7 @@
this.revisionRuleOnLoad();
},
// 鐗堟湰鍙傜収鍒楄〃鐨勯粯璁ゆ煡璇㈡柟娉�
- revisionRuleOnLoad(){
+ revisionRuleOnLoad() {
this.revisionRef.loading = true;
getPage().then(res => {
this.revisionRef.data = res.data.data.records;
@@ -650,14 +742,12 @@
this.lifeCycleOnLoad();
},
// 鐢熷懡鍛ㄦ湡鍒楄〃鐨勯粯璁ゆ煡璇㈡柟娉�
- lifeCycleOnLoad(){
+ lifeCycleOnLoad() {
this.lifeCycleRef.loading = true;
getList().then(res => {
this.lifeCycleRef.data = res.data.data.records;
- });
- setTimeout(() => {
this.lifeCycleRef.loading = false;
- }, 600)
+ });
this.$nextTick(() => {
this.$refs.lifeCycleRef.refreshTable();
});
@@ -676,6 +766,10 @@
this.btmType.revisionRuleId = this.revisionRef.selectData.id;
this.btmType.revisionRuleName = this.revisionRef.selectData.name;
this.btmType.inputRevisionFlag = false;
+ if(!this.ruleFirstValue){
+ this.getDefaultData('reVersionRule', 'ruleData', 'ruleFirstSelection', 'detail');
+ this.ruleFirstValue = true;
+ }
this.cancelRevision();
},
// 纭閫変腑鐢熷懡鍛ㄦ湡
@@ -683,6 +777,10 @@
this.btmType.lifeCycleFlag = true;
this.btmType.lifeCycleId = this.lifeCycleRef.selectData.id;
this.btmType.lifeCycleName = this.lifeCycleRef.selectData.name;
+ if(!this.lifeCycleValue){
+ this.getDefaultData('lifeCycle', 'lifeData', 'lifeCycleSelection', 'detail');
+ this.lifeCycleValue = true;
+ }
this.cancelLifeCycle();
},
// 鍙栨秷閫変腑鐗堟湰瑙勫垯
@@ -736,16 +834,16 @@
* @param params 鎼滅储妗嗚緭鍏ュ�� {id: '',name: ''} 鐩存帴鑾峰彇灏辫
* @param done 鎵ц瀹屾垚鍚庣殑鍥炶皟
*/
- searchRevisionRule(params,done){
+ searchRevisionRule(params, done) {
let condition = {};
- if (params.id){
+ if (params.id) {
condition['id_like'] = params.id;
}
- if (params.name){
+ if (params.name) {
condition['name_like'] = params.name;
}
this.revisionRef.loading = true;
- getPage(this.revisionRef.page.currentPage,this.revisionRef.page.pageSize,condition).then(res => {
+ getPage(this.revisionRef.page.currentPage, this.revisionRef.page.pageSize, condition).then(res => {
this.revisionRef.data = res.data.data.records;
});
setTimeout(() => {
@@ -761,32 +859,26 @@
* @param params 鎼滅储妗嗚緭鍏ュ��
* @param done 鎵ц瀹屾垚鍚庣殑鍥炶皟
*/
- searchLifeCycle(params,done){
+ searchLifeCycle(params, done) {
let condition = {};
- if (params.id){
+ if (params.id) {
condition['id_like'] = params.id;
}
- if (params.name){
+ if (params.name) {
condition['name_like'] = params.name;
}
this.lifeCycleRef.loading = true;
- getList(this.lifeCycleRef.page.currentPage,this.lifeCycleRef.page.pageSize,condition).then(res => {
+ getList(this.lifeCycleRef.page.currentPage, this.lifeCycleRef.page.pageSize, condition).then(res => {
this.lifeCycleRef.data = res.data.data.records;
- });
- setTimeout(() => {
- done();
this.lifeCycleRef.loading = false;
- }, 600);
- this.$nextTick(() => {
- this.$refs.lifeCycleRef.refreshTable();
});
},
// 鍙栨秷鐗堟湰瑙勫垯鎼滅储
- clearSearchRevisionRule(item){
+ clearSearchRevisionRule(item) {
this.revisionRuleOnLoad();
},
// 鍙栨秷鐢熷懡鍛ㄦ湡鎼滅储
- clearSearchLifeCycle(item){
+ clearSearchLifeCycle(item) {
this.lifeCycleOnLoad();
console.log(item);
}
diff --git a/Source/UBCS-WEB/src/views/ruleBasic/delimiterConfig.vue b/Source/UBCS-WEB/src/views/ruleBasic/delimiterConfig.vue
index 0e5fb46..68b71eb 100644
--- a/Source/UBCS-WEB/src/views/ruleBasic/delimiterConfig.vue
+++ b/Source/UBCS-WEB/src/views/ruleBasic/delimiterConfig.vue
@@ -4,7 +4,7 @@
<el-header>
<div style="margin-bottom: 15px">
缂栫爜瑙勫垯锛�
- <el-select v-model="select" :filter-method="filterValue" filterable placeholder="璇烽�夋嫨" size="small"
+ <el-select v-model="select" :filter-method="filterValue" filterable placeholder="璇烽�夋嫨" size="small" v-loading="selectLoading"
@change="selectHandler">
<el-option v-for="(item,index) in queryReleasedList"
:key="item.oid"
@@ -149,7 +149,8 @@
tableData: [],
select: "",
selectValue: "",
- editVisble: false
+ editVisble: false,
+ selectLoading:false,
}
},
watch: {
diff --git a/Source/UBCS-WEB/src/views/ruleBasic/paddingCharacter.vue b/Source/UBCS-WEB/src/views/ruleBasic/paddingCharacter.vue
index 74897c3..5b1f8ff 100644
--- a/Source/UBCS-WEB/src/views/ruleBasic/paddingCharacter.vue
+++ b/Source/UBCS-WEB/src/views/ruleBasic/paddingCharacter.vue
@@ -4,11 +4,11 @@
<el-header>
<div style="margin-bottom: 15px">
缂栫爜瑙勫垯锛�
- <el-select v-model="select" :filter-method="filterValue" filterable placeholder="璇烽�夋嫨" size="small"
+ <el-select v-model="select" :filter-method="filterValue" filterable placeholder="璇烽�夋嫨" size="small" v-loading="selectLoading"
@change="selectHandler">
<el-option v-for="(item,index) in queryReleasedList"
:key="item.oid"
- :label="item.name"
+ :label="item.name + ' (' + item.id + ')'"
:value="item.oid"></el-option>
</el-select>
</div>
@@ -149,7 +149,8 @@
tableData: [],
select: "",
selectValue: "",
- editVisble: false
+ editVisble: false,
+ selectLoading:false,
}
},
watch: {
@@ -161,6 +162,7 @@
},
created() {
this.getCodeRule();
+ this.selectLoading = true;
},
methods: {
editDialog(){
@@ -203,6 +205,7 @@
const res2 = await getList({codeRuleId: this.select, chartType: "fillerChar", chartValue: this.characterValue});
this.tableData = res2.data.data;
this.loading = false;
+ this.selectLoading = false;
} catch (error) {
this.$message.warning(error)
}
diff --git a/Source/UBCS-WEB/src/views/ruleBasic/prefixConfig.vue b/Source/UBCS-WEB/src/views/ruleBasic/prefixConfig.vue
index 9d83440..943226b 100644
--- a/Source/UBCS-WEB/src/views/ruleBasic/prefixConfig.vue
+++ b/Source/UBCS-WEB/src/views/ruleBasic/prefixConfig.vue
@@ -4,7 +4,7 @@
<el-header>
<div style="margin-bottom: 15px">
缂栫爜瑙勫垯锛�
- <el-select v-model="select" :filter-method="filterValue" filterable placeholder="璇烽�夋嫨" size="small"
+ <el-select v-model="select" :filter-method="filterValue" filterable placeholder="璇烽�夋嫨" size="small" v-loading="selectLoading"
@change="selectHandler">
<el-option v-for="(item,index) in queryReleasedList"
:key="item.oid"
@@ -149,7 +149,8 @@
tableData: [],
select: "",
selectValue: "",
- editVisble: false
+ editVisble: false,
+ selectLoading:false,
}
},
watch: {
@@ -203,6 +204,7 @@
const res2 = await getList({codeRuleId: this.select, chartType: "prefix", chartValue: this.characterValue});
this.tableData = res2.data.data;
this.loading = false;
+ this.selectLoading = false;
} catch (error) {
this.$message.warning(error)
}
diff --git a/Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue b/Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue
index 5be2861..a575a7a 100644
--- a/Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue
+++ b/Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue
@@ -4,11 +4,11 @@
<el-header>
<div style="margin-bottom: 15px">
缂栫爜瑙勫垯锛�
- <el-select v-model="select" :filter-method="filterValue" filterable placeholder="璇烽�夋嫨" size="small"
+ <el-select v-model="select" :filter-method="filterValue" filterable placeholder="璇烽�夋嫨" size="small" v-loading="selectLoading"
@change="selectHandler">
<el-option v-for="(item,index) in queryReleasedList"
:key="item.oid"
- :label="item.name"
+ :label="item.name + ' (' + item.id + ')'"
:value="item.oid"></el-option>
</el-select>
</div>
@@ -87,7 +87,8 @@
tableData: [],
select: "",
selectValue: "",
- editVisble: false
+ editVisble: false,
+ selectLoading:false,
}
},
watch: {
@@ -144,6 +145,7 @@
const res2 = await getList({codeRuleId: this.select, chartType: "charset", chartValue: this.characterValue});
this.tableData = res2.data.data;
this.loading = false;
+ this.selectLoading = false;
} catch (error) {
this.$message.warning(error)
}
--
Gitblit v1.9.3