From 5c2f48d14c7606405082a35dd9224983c86b74d5 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期四, 05 十二月 2024 18:04:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue | 662 ++++++++++++++++++++++++------------------------------
1 files changed, 292 insertions(+), 370 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
index ff0774e..b041053 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
@@ -35,8 +35,8 @@
</div>
<div style="display: flex;justify-content:left;margin-top: 15px;">
<div class="descBox" style="width: 40%">
- <el-descriptions :column="1" border class="margin-top" size="medium" title="灞炴�т俊鎭�">
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ <el-descriptions :column="2" border class="margin-top" size="medium" title="灞炴�т俊鎭�">
+ <el-descriptions-item :span="12" :contentStyle="descriptionOption.contentStyle"
:labelStyle="descriptionOption.labelStyle">
<template slot="label">
鍚嶇О
@@ -50,7 +50,19 @@
</template>
<el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag>
</el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle+';min-width: 100px;'"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 鍥炬爣
+ </template>
+ <span class="avue-icon avue-icon--small" style="display: block">
+ <svg v-if="nodeRow.imageName && nodeRow.imageName.indexOf('#')==0" aria-hidden="true">
+ <use :xlink:href="nodeRow.imageName"></use>
+ </svg>
+ <i v-else :class="nodeRow.imageName"></i>
+ </span>
+ </el-descriptions-item>
+ <el-descriptions-item :span="12" :contentStyle="descriptionOption.contentStyle"
:labelStyle="descriptionOption.labelStyle">
<template slot="label">
瀹炵幇绫�
@@ -60,7 +72,7 @@
<el-tag style="max-width: 100%;overflow: hidden;display: block">{{ nodeRow.implClass }}</el-tag>
</el-tooltip>
</el-descriptions-item>
- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ <el-descriptions-item :span="12" :contentStyle="descriptionOption.contentStyle"
:labelStyle="descriptionOption.labelStyle">
<template slot="label">
鎻忚堪
@@ -69,7 +81,7 @@
</el-descriptions-item>
</el-descriptions>
</div>
- <div class="descBox" style="width: 25%;">
+ <div class="descBox" style="width: 24%;">
<el-descriptions :column="1" border class="margin-top" size="medium" title="鐗堟湰瑙勫垯">
<el-descriptions-item :contentStyle="descriptionOption.contentStyle"
:labelStyle="descriptionOption.labelStyle">
@@ -121,7 +133,7 @@
</el-descriptions>
</div>
- <div class="descBox" style="width: calc(35% - 40px);margin-right: 0">
+ <div class="descBox" style="width: calc(36% - 40px);margin-right: 0">
<el-descriptions :column="1" border class="margin-top" size="medium" title="鐢熷懡鍛ㄦ湡">
<el-descriptions-item :contentStyle="descriptionOption.contentStyle"
:labelStyle="descriptionOption.labelStyle">
@@ -129,6 +141,16 @@
鐢熷懡鍛ㄦ湡
</template>
<el-tag v-if="nodeRow.lifeCycleId">{{ nodeRow.lifeCycleId }}</el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ 澶囬�夌敓鍛藉懆鏈�
+ </template>
+ <div v-if="nodeRow.lifeCycleIds">
+ <el-tag v-for="item in nodeRow.lifeCycleIds.split(',')" style="margin-right: 5px;">{{ item }}</el-tag>
+ </div>
+
</el-descriptions-item>
</el-descriptions>
</div>
@@ -158,32 +180,40 @@
<el-form-item label="绫诲瀷鍚嶇О锛�" prop="id">
<el-input v-model="form.id" :readOnly="title === 'edit'"></el-input>
</el-form-item>
- <el-form-item label="鏍囩锛�">
- <el-input v-model="form.name"></el-input>
- </el-form-item>
- <el-form-item label="缁ф壙鑷細">
+ <el-row :span="24">
+ <el-col :span="12">
+ <el-form-item label="鏍囩锛�" prop="name">
+ <el-input v-model="form.name"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍥炬爣锛�" prop="imageName">
+ <avue-input-icon v-model="form.imageName" :icon-list="iconList" placeholder="璇烽�夋嫨鍥炬爣">
+ </avue-input-icon>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-form-item label="缁ф壙鑷細" prop="fName">
<avue-input-tree :disabled="title === 'add'"
v-model="form.fName"
placeholder="璇烽�夋嫨涓氬姟绫诲瀷"
:props="{label: 'id', value: 'id',children: 'children'}"
:dic="inheritTreeData"></avue-input-tree>
</el-form-item>
- <el-form-item label="瀹炵幇绫伙細">
+ <el-form-item label="瀹炵幇绫伙細" prop="implClass">
<el-input v-model="form.implClass"></el-input>
</el-form-item>
- <el-form-item label="鎻忚堪">
+ <el-form-item label="鎻忚堪" prop="description">
<el-input v-model="form.description" :rows="2" type="textarea"></el-input>
</el-form-item>
</div>
- <div class="centerForm" style="width: 24%">
- <el-form-item label="鐗堟湰瑙勫垯锛�" label-width="110px" prop="revLevel">
- <el-select v-model="form.revLevel" @change="revLevelChange">
- <el-option label="涓嶅彲淇" value="0"></el-option>
- <el-option label="閲囩敤涓�绾х増鏈鐞�" value="1"></el-option>
- <el-option label="閲囩敤浜岀骇鐗堟湰绠$悊" value="2"></el-option>
- </el-select>
+ <div class="centerForm" style="width: 26%">
+ <el-form-item label="鐗堟湰瑙勫垯锛�" label-width="100px" prop="revLevel" style="margin-bottom: 10px;">
+ <el-radio v-model="form.revLevel" label="0" @input="revLevelChange">涓嶅彲淇</el-radio><br>
+ <el-radio v-model="form.revLevel" label="1" @input="revLevelChange">閲囩敤涓�绾х増鏈鐞�</el-radio><br>
+ <el-radio v-model="form.revLevel" label="2" @input="revLevelChange">閲囩敤浜岀骇鐗堟湰绠$悊</el-radio>
</el-form-item>
- <el-form-item v-if="form.revLevel !== '0'" label="鐗堟湰鍙疯鍒欙細" label-width="110px" prop="revisionRuleId">
+ <el-form-item v-if="form.revLevel !== '0'" label="鐗堟湰鍙疯鍒欙細" label-width="100px" prop="revisionRuleId" style="margin-bottom: 5px;">
<avue-select v-model="form.revisionRuleId"
:disabled="form.inputRevisionFlag"
placeholder="璇烽�夋嫨鐗堟湰鍙疯鍒�"
@@ -197,79 +227,52 @@
@change="form.revisionRuleId = ''">
</el-switch>
</el-form-item>
- <el-form-item v-if="form.revLevel !== '0'" label="鍒嗛殧绗︼細" label-width="110px" prop="delimiter">
- <el-select v-model="form.delimiter" clearable>
- <el-option label="." value="."></el-option>
- <el-option label="-" value="-"></el-option>
- </el-select>
+ <el-form-item v-if="form.revLevel !== '0'" label="鍒嗛殧绗︼細" label-width="100px" prop="delimiter" style="margin-bottom: 5px;">
+ <el-radio v-model="form.delimiter" label=""> </el-radio>
+ <el-radio v-model="form.delimiter" label=".">.</el-radio>
+ <el-radio v-model="form.delimiter" label="-">-</el-radio>
</el-form-item>
- <el-form-item v-if="form.revLevel !== '0' && form.revLevel !== '1'" label="鐗堟鍙疯鍒欙細" label-width="110px"
+ <el-form-item v-if="form.revLevel !== '0' && form.revLevel !== '1'" label="鐗堟鍙疯鍒欙細" label-width="100px"
prop="versionRule">
- <el-select v-model="form.versionRule" clearable>
- <el-option label="1.2.3..." value="0"></el-option>
- <el-option label="a.b.c..." value="1"></el-option>
- <el-option label="0.1.2..." value="2"></el-option>
- </el-select>
+ <el-radio v-model="form.versionRule" label="0">1.2.3...</el-radio>
+ <el-radio v-model="form.versionRule" label="1">a.b.c...</el-radio>
+ <el-radio v-model="form.versionRule" label="2">0.1.2...</el-radio>
</el-form-item>
</div>
- <div class="rightForm" style="width: 26%">
+ <div class="rightForm" style="width: 25%">
<el-form-item label="鐢熷懡鍛ㄦ湡锛�" label-width="138px" prop="lifeCycleId">
<avue-select v-model="form.lifeCycleId"
placeholder="璇烽�夋嫨鐢熷懡鍛ㄦ湡"
:filterable="true"
:props="{label: 'id', value: 'id'}"
- :dic="dialogLifeData"></avue-select>
+ :dic="lifeData"></avue-select>
</el-form-item>
-
- <el-form-item label="澶囬�夌敓鍛藉懆鏈熷垪琛細" label-width="138px">
- <div style="display: flex; align-items: center">
- <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto">
- <!-- 鍐呭 -->
- <el-table
- :data="dialogLifeTable"
- :show-header="false"
- style="width: 100%">
- <el-table-column
- align="center"
- prop="id">
- </el-table-column>
- <el-table-column
- fixed="right"
- label="鎿嶄綔"
- width="60">
- <template slot-scope="scope">
- <el-button
- size="small"
- style="color:#F56C6C;"
- type="text"
- @click.native.prevent="dialogDeleteLifeTable(scope.$index)">
- 绉婚櫎
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <el-button plain size="mini" style="margin-left: 5px" type="success"
- @click="lifeAddHandler('table')">娣诲姞
- </el-button>
-
- </div>
+ <el-form-item label="澶囬�夌敓鍛藉懆鏈熷垪琛細" label-width="138px" prop="subLifeCycleIdList">
+ <avue-select multiple
+ :filterable="true"
+ v-model="form.subLifeCycleIdList"
+ placeholder="璇烽�夋嫨鐢熷懡鍛ㄦ湡"
+ :props="{label: 'id', value: 'id'}"
+ type="tree"
+ :dic="subLifeData"
+ @change="subLifeChange"></avue-select>
</el-form-item>
</div>
</div>
</el-form>
<div class="bottomForm">
- <h3 style="margin-bottom: 10px;">灞炴�ф睜鍒楄〃</h3>
<avue-crud
+ size="mini"
:data="dialogAttrData"
:option="dialogAttrOption"
@row-del="dialogBottomAttrDel">
<template slot="menuLeft">
- <el-button icon="el-icon-plus" size="small" type="primary" @click="addDialogClickHandler">鍒涘缓</el-button>
+ <h3 style="display: inline-block;margin-right: 20px;margin-bottom: 10px;">灞炴�ф睜鍒楄〃</h3>
+ <el-button icon="el-icon-plus" size="mini" type="primary" @click="addDialogClickHandler">鍒涘缓</el-button>
</template>
</avue-crud>
</div>
- <span slot="footer" class="dialog-footer avue-dialog__footer">
+ <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button>
<el-button @click="addDialogClose">鍙� 娑�</el-button>
</span>
@@ -301,35 +304,9 @@
>
</avue-crud>
<span slot="footer" class="dialog-footer">
- <el-button @click="dialogAttrClose">鍙� 娑�</el-button>
<el-button type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button>
+ <el-button @click="dialogAttrClose">鍙� 娑�</el-button>
</span>
- </el-dialog>
-
- <!-- 鐢熷懡鍛ㄦ湡 -->
- <el-dialog
- v-dialogDrag
- :visible.sync="dialogLfeVisible"
- append-to-body="true"
- class="avue-dialog"
- title="鐢熷懡鍛ㄦ湡妯℃澘"
- width="60%"
- >
- <avue-crud
- :key="dialogLifeKey"
- ref="dialogAttrCrud"
- :data="dialogLifeData"
- :option="dialogLifeOption"
- @row-click="dialogLifeRowClick"
- @search-change="lifeHandleSearch"
- @search-reset="lifeHandleReset"
- >
- </avue-crud>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogLfeVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="dialogLifeAddClickHandler">纭� 瀹�</el-button>
- </span>
-
</el-dialog>
<!-- 瀵煎叆 -->
@@ -465,11 +442,13 @@
import func from "@/util/func";
import {getUsedVersionRuleList, getVersionRuleAllList} from "@/api/modeling/version/api";
import {gridLifeCycle} from "@/api/modeling/lifeCycle/api";
+import iconList from "@/config/iconList";
export default {
name: "index",
data() {
return {
+ iconList: iconList,
indexLoading: false,
indexFormRead: false,
indexAttrRow: {},
@@ -552,6 +531,7 @@
index: false,
selection: false,
refreshBtn: false,
+ header:false,
column: [
{
label: '绫诲瀷鍚�',
@@ -609,32 +589,9 @@
createViewLoading: false, // 鍒涘缓瑙嗗浘
versionAddFlag: false,
inheritTreeData: [],
- dialogLifeDefalutData: [], // 鏌ヨ閲嶇疆榛樿鏁版嵁
- lifeType: '',
- dialogLifeTable: [],
- dialogLifeSaveRow: {},
- dialogLifeKey: Math.random(),
- dialogLifeData: [],
- dialogLifeOption: {
- ...basicOption,
- addBtn: false,
- selection: false,
- refreshBtn: false,
- menu: false,
- height: 450,
- searchMenuSpan: 8,
- highlightCurrentRow: true,
- column: [
- {
- label: '鐢熷懡鍛ㄦ湡妯℃澘鍚�',
- prop: 'id',
- searchLabelWidth: 120,
- search: true
- }
- ]
- },
- dialogLifeLoading: false,
- dialogLfeVisible: false,
+ lifeData: [],//鐢熷懡鍛ㄦ湡涓嬫媺鏁版嵁
+ subLifeData:[],//澶囬�夌敓鍛藉懆鏈熶笅鎷夋暟鎹�
+ allLifeData:[],
versionData: [],//鐗堟湰瑙勫垯鏁版嵁
dialogAttrSelectList: [],
searchAttrParams: {},
@@ -656,12 +613,16 @@
height: 450,
searchMenuSpan: 8,
header: false,
+ selectable:function(row){
+ return row.selectable;
+ },
column: [
{
label: '灞炴�у悕',
prop: 'id',
sortable: true,
search: true,
+ width:260
},
{
label: '灞炴�х被鍨�',
@@ -673,6 +634,7 @@
label: '鍒濆鍊�',
prop: 'defaultValue',
sortable: true,
+ width: 200
},
{
label: '璇存槑',
@@ -689,6 +651,9 @@
{required: true, message: '璇疯緭绫诲瀷鍚嶇О', trigger: 'blur'},
{validator: this.validateEnglishOnly, trigger: 'blur'}
],
+ imageName:[
+ {required: true, message: '璇烽�夋嫨鍥炬爣', trigger: 'blur'},
+ ],
revLevel: [
{required: true, message: '璇烽�夋嫨鐗堟湰瑙勫垯', trigger: 'blur'},
],
@@ -702,8 +667,10 @@
editBtn: false,
refreshBtn: false,
selection: false,
- height: 210,
+ height: 220,
addBtn: false,
+ gridBtn:false,
+ columnBtn:false,
menuWidth:100,
// index:false,
column: [
@@ -711,12 +678,14 @@
label: '灞炴�у悕',
prop: 'id',
sortable: true,
+ width:260,
},
{
prop: 'btmTypeId',
label: '涓氬姟绫诲瀷',
- sortable: true
+ sortable: true,
+ width: 200
},
{
label: '灞炴�х被鍨�',
@@ -728,7 +697,7 @@
label: '鍒濆鍊�',
prop: 'defaultValue',
sortable: true,
- width:150,
+ width:200,
},
{
label: '璇存槑',
@@ -752,22 +721,26 @@
{
prop: 'id',
label: '灞炴�у悕',
- sortable: true
+ sortable: true,
+ width:260
},
{
prop: 'btmTypeId',
label: '涓氬姟绫诲瀷',
- sortable: true
+ sortable: true,
+ width:200
},
{
prop: 'attributeDataType',
label: '灞炴�х被鍨�',
- sortable: true
+ sortable: true,
+ width:150
},
{
prop: 'defaultValue',
label: '榛樿鍊�',
- sortable: true
+ sortable: true,
+ width: 200
},
{
prop: 'description',
@@ -782,13 +755,14 @@
fName: '', // 缁ф壙鑷�
implClass: '', // 瀹炵幇绫�
description: '', // 鎻忚堪
- revLevel: '', // 鐗堟湰瑙勫垯
+ revLevel: '2', // 鐗堟湰瑙勫垯
revisionRuleId: '',// 鐗堟湰鍙疯鍒�
inputRevisionFlag: false, // 鎵嬪伐杈撳叆,
delimiter: '', // 鍒嗛殧绗�
versionRule: '0', // 鐗堟鍙疯鍒�
lifeCycleId: '', // 鐢熷懡鍛ㄦ湡
subLifeCycleId: '', // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛�,
+ subLifeCycleIdList:[],
apNameArray: "", // 灞炴�ф睜鍒楄〃鈥欙紝鈥樺垎闅�
},
nodeRow: {},
@@ -812,8 +786,8 @@
}
],
descriptionOption: {
- labelStyle: 'text-align:center;width:100px;',
- contentStyle: 'max-width:200px;text-align:center;word-break;break-all;'
+ labelStyle: 'text-align:center;width:110px;',
+ contentStyle: 'min-width:200px;text-align:center;word-break:break-all;'
},
icons: {
id: 'el-icon-finished',
@@ -829,6 +803,19 @@
this.getLifeCycle();
},
mounted() {
+ },
+ watch:{
+ 'form.lifeCycleId':{
+ handler(newval) {
+ if(this.form.lifeCycleId){
+ this.subLifeData = this.allLifeData.filter(item=>{
+ return item.id!=this.form.lifeCycleId
+ });
+ }else {
+ this.subLifeData = this.allLifeData
+ }
+ },
+ }
},
methods: {
//鏍戣〃鏌ヨ
@@ -871,8 +858,7 @@
//鑾峰彇鐢熷懡鍛ㄦ湡鏁版嵁
getLifeCycle(){
gridLifeCycle().then(res => {
- this.dialogLifeData = res.data.data;
- this.dialogLifeDefalutData = res.data.data;
+ this.allLifeData=res.data.data;
});
},
// 鍒涘缓鎸夐挳
@@ -883,235 +869,10 @@
}
this.title = 'add';
this.form.fName = this.nodeRow.id === 'topNode' ? "" : this.nodeRow.id;
+ this.lifeData = this.allLifeData;
+ this.subLifeData = this.allLifeData;
this.form.inputRevisionFlag = JSON.parse(this.form.inputRevisionFlag); // 瀛楃涓瞗alse杞崲涓哄竷灏斿��
this.visible = true;
- },
-
- // 瀵硅瘽妗� 灞炴�ф睜鍒楄〃澧炲姞鎸夐挳
- addDialogClickHandler() {
- this.dialogAttrLoading = true;
- this.attrPollDialogVisible = true;
- this.dialogAttrReload = Math.random(); // 寮哄埗鍒锋柊琛ㄦ牸 瑙e喅琛ㄦ牸閿欒
- this.getAttrDialogDta();
- },
-
- // 鏌ヨ灞炴�ф睜鍒楄〃鏁版嵁
- getAttrDialogDta() {
- gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => {
- const data = res.data.data;
- this.dialogAttrSaveData = data;
- this.attrPage.total = res.data.total;
- this.dialogAttrLoading = false;
- }).catch(err => {
- this.$message.error(err);
- });
- },
-
- // 鏂板灞炴�ф睜鍒楄〃鍏抽棴瀵硅瘽妗�
- dialogAttrClose() {
- this.attrPollDialogVisible = false;
- this.searchAttrParams = {};
- },
-
- // 娣诲姞灞炴�ф睜琛ㄦ牸閫夋嫨妗�
- dialogAttrSelectChange(row) {
- this.dialogAttrSelectList = row;
- },
-
- // 娣诲姞灞炴�ф睜 琛岀偣鍑�
- dialogAttrRowClickHandler(row) {
-
- func.rowClickHandler(
- row,
- this.$refs.dialogAttrCrud,
- this.attrLastIndex,
- (newIndex) => {
- this.attrLastIndex = newIndex;
- },
- () => {
- this.selectList = [];
- }
- );
- },
-
- //娣诲姞灞炴�ф睜 鏉℃暟
- attrSizeChange(val) {
- this.attrPage.pageSize = val;
- this.getAttrDialogDta()
- },
-
- //娣诲姞灞炴�ф睜 椤电爜
- attrCurrentChange(val) {
- this.attrPage.currentPage = val;
- this.getAttrDialogDta();
- },
-
- //娣诲姞灞炴�ф睜 鎼滅储
- attrHandleSearch(params, done) {
- if (func.isEmptyObject(params)) {
- this.searchAttrParams = {};
- } else {
- this.searchAttrParams = {
- "conditionMap[id]": "*" + params.id + "*"
- };
- }
-
- this.getAttrDialogDta();
- done();
- },
-
- //娣诲姞灞炴�ф睜 娓呯┖鎼滅储
- attrHandleReset() {
- this.searchAttrParams = {};
- this.getAttrDialogDta();
- },
-
- // 娣诲姞灞炴�ф睜 淇濆瓨
- dialogAttrAddClickHandler() {
- let hasDuplicate = false;
-
- // 鍏堝垱寤轰竴涓复鏃舵暟缁勬潵瀛樺偍涓嶉噸澶嶇殑椤�
- const newItems = [];
-
- this.dialogAttrSelectList.forEach(item => {
- const exists = this.dialogAttrData.some(existingItem => existingItem.id === item.id);
-
- if (exists) {
- hasDuplicate = true;
- return;
- }
-
- // 濡傛灉娌℃湁閲嶅椤癸紝鍒欏皢璇ラ」娣诲姞鍒颁复鏃舵暟缁勪腑
- newItems.push({
- id: item.id,
- attributeDataType: item.attributeDataType,
- defaultValue: item.defaultValue,
- description: item.description
- });
- });
-
- if (hasDuplicate) {
- this.$message.error('璇锋鏌ユ槸鍚︽湁娣诲姞閲嶅椤癸紒');
- } else {
- // 濡傛灉娌℃湁閲嶅椤癸紝灏嗘柊椤规坊鍔犲埌 dialogAttrData
- this.dialogAttrData.push(...newItems);
- this.attrPollDialogVisible = false;
- }
- },
-
- // 灞炴�ф睜鍒犻櫎
- dialogBottomAttrDel(form, index) {
- this.dialogAttrData.splice(index, 1);
- },
-
- // 鐢熷懡鍛ㄦ湡鏂板
- lifeAddHandler(val) {
- this.dialogLfeVisible = true;
- this.dialogLifeKey = Math.random(); // 鎵撳紑鏃跺埛鏂拌〃鏍奸伩鍏嶈〃鏍奸敊琛�
- this.dialogLifeLoading = true;
- this.lifeType = val;
- },
-
- // 鐢熷懡鍛ㄦ湡琛岀偣鍑�
- dialogLifeRowClick(row) {
- this.dialogLifeSaveRow = row;
- },
-
- // 鐢熷懡鍛ㄦ湡淇濆瓨
- dialogLifeAddClickHandler() {
- if (func.isEmptyObject(this.dialogLifeSaveRow)) {
- this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
- return;
- }
- if (this.lifeType === 'input') {
- this.form.lifeCycleId = this.dialogLifeSaveRow.id;
- } else {
- const flag = this.dialogLifeTable.some(item => item.id === this.dialogLifeSaveRow.id);
-
- if (flag) {
- this.$message.error('宸插瓨鍦ㄧ浉鍚岀殑鏁版嵁锛岃娣诲姞鍏朵粬鏁版嵁');
- return;
- }
- this.dialogLifeTable.push(this.dialogLifeSaveRow);
- }
- this.dialogLfeVisible = false;
- },
-
- // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛ㄧЩ闄�
- dialogDeleteLifeTable(index) {
- this.dialogLifeTable.splice(index, 1)
- },
-
- // 鐢熷懡鍛ㄦ湡鎼滅储
- lifeHandleSearch(params, done) {
- const {id} = params;
-
- if (!params.id) {
- this.dialogLifeData = this.dialogLifeDefalutData;
- return done();
- }
- ;
-
- this.dialogLifeData = this.dialogLifeDefalutData.filter(item => {
- return item.id && item.id.includes(id);
- });
-
- done();
-
- },
-
- // 鐢熷懡鍛ㄦ湡閲嶇疆
- lifeHandleReset() {
- this.dialogLifeData = this.dialogLifeDefalutData;
- },
-
- // 鍙兘杈撳叆鑻辨枃姝e垯鏍¢獙
- validateEnglishOnly(rule, value, callback) {
- if (!value) {
- return callback(new Error('璇疯緭鍏ョ被鍨嬪悕绉�'));
- }
- if (!/^[A-Za-z]+$/.test(value)) {
- return callback(new Error('鍙兘杈撳叆鑻辨枃瀛楁瘝'));
- }
- callback(); // 楠岃瘉閫氳繃
- },
-
- // 娓呯┖琛ㄥ崟
- resetForm() {
- const form = {
- id: '', // 绫诲瀷鍚嶇О
- name: '', // 鏍囩
- fName: '', // 缁ф壙鑷�
- implClass: '', // 瀹炵幇绫�
- description: '', // 鎻忚堪
- revLevel: '', // 鐗堟湰瑙勫垯
- revisionRuleId: '',// 鐗堟湰鍙疯鍒�
- inputRevisionFlag: 'false', // 鎵嬪伐杈撳叆
- delimiter: '', // 鍒嗛殧绗�
- versionRule: '0', // 鐗堟鍙疯鍒�
- lifeCycleId: '', // 鐢熷懡鍛ㄦ湡
- subLifeCycleId: '', // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛�,
- apNameArray: "", // 灞炴�ф睜鍒楄〃鈥欙紝鈥樺垎闅�
- };
- this.dialogLifeTable = []; // 灏嗙敓鍛藉懆鏈熻〃鏍肩疆绌�
- this.dialogAttrData = []; // 灏嗗睘鎬ф睜琛ㄦ牸缃┖
- this.form = {...form};
- this.$refs.form.clearValidate();
- },
-
- // 鏂板缂栬緫瀵硅瘽妗嗗彇娑�
- addDialogClose() {
- this.resetForm();
- this.visible = false;
- },
-
- // 鐗堟湰瑙勫垯鍒囨崲 缃┖鍏朵粬鏉′欢
- revLevelChange() {
- this.form.versionRule = "";
- this.form.inputRevisionFlag = false;
- this.form.delimiter = "";
- this.form.versionRule = "0";
- this.form.revisionRuleId = "";
},
// 鏂板缂栬緫淇濆瓨
@@ -1120,7 +881,8 @@
this.$message.error('璇锋鏌ョ増鏈彿瑙勫垯涓嶈兘涓虹┖');
return;
}
- this.form.subLifeCycleId = this.dialogLifeTable ? this.dialogLifeTable.map(item => item.id).join(',') : "";
+ this.form.lifeCycleIds=this.form.subLifeCycleIdList.join(',');
+ this.form.subLifeCycleId=this.form.subLifeCycleIdList.join(',');
this.form.apNameArray = this.dialogAttrData ? this.dialogAttrData.map(item => item.id).join(',') : "";
this.$refs.form.validate((valid) => {
const saveFunction = this.title === 'add' ? addLifeCycle : updateLifeCycle;
@@ -1170,9 +932,7 @@
this.form = {...this.nodeRow};
this.form.inputRevisionFlag = JSON.parse(this.form.inputRevisionFlag); // 瀛楃涓瞗alse杞崲涓哄竷灏斿��
// this.form.fName = this.nodeRow.id === 'topNode' ? "" : this.nodeRow.id;
- this.dialogLifeTable = (this.nodeRow.lifeCycleIds && this.nodeRow.lifeCycleIds.trim())
- ? this.nodeRow.lifeCycleIds.split(',').map(item => ({id: item.trim()}))
- : [];
+ this.form.subLifeCycleIdList = this.nodeRow.lifeCycleIds?this.nodeRow.lifeCycleIds.split(','):[];
this.dialogAttrData = this.nodeRow.attributes ? JSON.parse(this.nodeRow.attributes) : [];
function processChildren(item,fName) {
if (item.children && item.children.length > 0) {
@@ -1201,13 +961,173 @@
this.visible = true;
},
+ subLifeChange(data){
+ if (data.value.length == 0) {
+ this.lifeData = this.allLifeData
+ } else {
+ this.lifeData = this.allLifeData.filter(item => {
+ return !data.value.includes(item.id)
+ });
+ }
+ },
+ // 瀵硅瘽妗� 灞炴�ф睜鍒楄〃澧炲姞鎸夐挳
+ addDialogClickHandler() {
+ this.dialogAttrLoading = true;
+ this.attrPollDialogVisible = true;
+ this.dialogAttrReload = Math.random(); // 寮哄埗鍒锋柊琛ㄦ牸 瑙e喅琛ㄦ牸閿欒
+ this.getAttrDialogDta();
+ },
+
+ // 鏌ヨ灞炴�ф睜鍒楄〃鏁版嵁
+ getAttrDialogDta() {
+ gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => {
+ const data = res.data.data.map(item=>{
+ item.selectable=!this.dialogAttrData.some(existingItem => existingItem.id === item.id);
+ return item;
+ });
+ this.dialogAttrSaveData=data;
+ this.attrPage.total = res.data.total;
+ this.dialogAttrLoading = false;
+ }).catch(err => {
+ this.$message.error(err);
+ });
+ },
+
+ // 鏂板灞炴�ф睜鍒楄〃鍏抽棴瀵硅瘽妗�
+ dialogAttrClose() {
+ this.attrPollDialogVisible = false;
+ this.searchAttrParams = {};
+ },
+
+ // 娣诲姞灞炴�ф睜琛ㄦ牸閫夋嫨妗�
+ dialogAttrSelectChange(row) {
+ this.dialogAttrSelectList = row;
+ },
+
+ // 娣诲姞灞炴�ф睜 琛岀偣鍑�
+ dialogAttrRowClickHandler(row) {
+ if(!row.selectable){
+ return;
+ }
+ func.rowClickHandler(
+ row,
+ this.$refs.dialogAttrCrud,
+ this.attrLastIndex,
+ (newIndex) => {
+ this.attrLastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
+ },
+
+ //娣诲姞灞炴�ф睜 鏉℃暟
+ attrSizeChange(val) {
+ this.attrPage.pageSize = val;
+ this.getAttrDialogDta()
+ },
+
+ //娣诲姞灞炴�ф睜 椤电爜
+ attrCurrentChange(val) {
+ this.attrPage.currentPage = val;
+ this.getAttrDialogDta();
+ },
+
+ //娣诲姞灞炴�ф睜 鎼滅储
+ attrHandleSearch(params, done) {
+ if (func.isEmptyObject(params)) {
+ this.searchAttrParams = {};
+ } else {
+ this.searchAttrParams = {
+ "conditionMap[id]": "*" + params.id + "*"
+ };
+ }
+
+ this.getAttrDialogDta();
+ done();
+ },
+
+ //娣诲姞灞炴�ф睜 娓呯┖鎼滅储
+ attrHandleReset() {
+ this.searchAttrParams = {};
+ this.getAttrDialogDta();
+ },
+
+ // 娣诲姞灞炴�ф睜 淇濆瓨
+ dialogAttrAddClickHandler() {
+ this.dialogAttrSelectList.forEach(item => {
+ this.dialogAttrData.push({
+ id: item.id,
+ attributeDataType: item.attributeDataType,
+ defaultValue: item.defaultValue,
+ description: item.description
+ });
+ });
+ this.attrPollDialogVisible = false;
+ },
+
+ // 灞炴�ф睜鍒犻櫎
+ dialogBottomAttrDel(form, index) {
+ this.dialogAttrData.splice(index, 1);
+ },
+
+ // 鍙兘杈撳叆鑻辨枃姝e垯鏍¢獙
+ validateEnglishOnly(rule, value, callback) {
+ if (!value) {
+ return callback(new Error('璇疯緭鍏ョ被鍨嬪悕绉�'));
+ }
+ if (!/^[A-Za-z]+$/.test(value)) {
+ return callback(new Error('鍙兘杈撳叆鑻辨枃瀛楁瘝'));
+ }
+ callback(); // 楠岃瘉閫氳繃
+ },
+
+ // 娓呯┖琛ㄥ崟
+ resetForm() {
+ const form = {
+ id: '', // 绫诲瀷鍚嶇О
+ name: '', // 鏍囩
+ fName: '', // 缁ф壙鑷�
+ implClass: '', // 瀹炵幇绫�
+ description: '', // 鎻忚堪
+ revLevel: '2', // 鐗堟湰瑙勫垯
+ revisionRuleId: '',// 鐗堟湰鍙疯鍒�
+ inputRevisionFlag: 'false', // 鎵嬪伐杈撳叆
+ delimiter: '', // 鍒嗛殧绗�
+ versionRule: '0', // 鐗堟鍙疯鍒�
+ lifeCycleId: '', // 鐢熷懡鍛ㄦ湡
+ subLifeCycleId: '', // 鐢熷懡鍛ㄦ湡澶囬�夊垪琛�,
+ subLifeCycleIdList:[],
+ lifeCycleIds:'',
+ apNameArray: "", // 灞炴�ф睜鍒楄〃鈥欙紝鈥樺垎闅�
+ };
+ this.dialogAttrData = []; // 灏嗗睘鎬ф睜琛ㄦ牸缃┖
+ this.form = {...form};
+ this.$refs.form.clearValidate();
+ },
+
+ // 鏂板缂栬緫瀵硅瘽妗嗗彇娑�
+ addDialogClose() {
+ this.resetForm();
+ this.visible = false;
+ },
+
+ // 鐗堟湰瑙勫垯鍒囨崲 缃┖鍏朵粬鏉′欢
+ revLevelChange() {
+ this.form.inputRevisionFlag = false;
+ this.form.delimiter = "";
+ this.form.versionRule = "0";
+ this.form.revisionRuleId = "";
+ },
+
// 鍒犻櫎鎸夐挳
deleteClickHandler() {
if (func.isEmptyObject(this.nodeRow)) {
this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
return;
}
- ;
+
this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -1291,7 +1211,6 @@
this.checkViewData = this.checkViewDataSearch;
return done();
}
- ;
this.checkViewData = this.checkViewDataSearch.filter(item => {
return item.source && item.source.includes(source);
@@ -1474,7 +1393,6 @@
indexName: this.indexForm.name,
}
addIndex([params]).then(res => {
- console.log(res)
this.$message.success('鍒涘缓鎴愬姛');
this.indexDialogClose();
}).catch(err => {
@@ -1512,6 +1430,10 @@
line-height:22px;
height: 24px;
}
+
+ .el-radio{
+ margin-right: 20px;
+ }
}
.descBox {
@@ -1526,7 +1448,7 @@
.dialogForm > div {
border: 1px solid #EBEEF5;
border-radius: 2px;
- padding: 25px 20px 5px 10px; /* 涓� 鍙� 涓� 宸� */
+ padding: 15px 20px 0 10px; /* 涓� 鍙� 涓� 宸� */
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* 娣诲姞闃村奖鏁堟灉 */
}
--
Gitblit v1.9.3