From 41f11d5fd764a2bc7e8463a70bb340467d99a3ca Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 14 七月 2023 09:42:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/const/omd/enum.js | 10
Source/UBCS-WEB/src/views/modeling/cycle.vue | 175 ++++++++++++++++++---
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java | 7
Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue | 32 ++-
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue | 16 +
Source/UBCS-WEB/vue.config.js | 4
Source/UBCS-WEB/src/api/modeling/cycle.js | 24 ++
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue | 37 ++-
Source/UBCS-WEB/src/components/FormTemplate/index.vue | 23 ++
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 19 +
Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue | 58 ++++++
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java | 2
Source/UBCS-WEB/src/views/modeling/Business.vue | 13 +
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java | 2
Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue | 5
Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeMapper.xml | 4
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java | 7
17 files changed, 342 insertions(+), 96 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/modeling/cycle.js b/Source/UBCS-WEB/src/api/modeling/cycle.js
index 18c4505..765575c 100644
--- a/Source/UBCS-WEB/src/api/modeling/cycle.js
+++ b/Source/UBCS-WEB/src/api/modeling/cycle.js
@@ -15,6 +15,14 @@
data
})
}
+// 淇敼
+export const edit = (data) => {
+ return request({
+ url: '/api/ubcs-omd/lifeCycle/edit-save',
+ method: 'put',
+ data
+ })
+}
export const detail = (params) => {
return request({
url: '/api/ubcs-omd/lifeCycle/detail',
@@ -22,8 +30,22 @@
params
})
}
+// 鍒犻櫎
+export const del = (data, isBatch) => {
+ let url = '/api/ubcs-omd/lifeCycle/remove'
+ if (isBatch) {
+ url = '/api/ubcs-omd/lifeCycle/batch-remove'
+ }
+ return request({
+ url,
+ method: 'post',
+ data
+ })
+}
export default {
getList,
add,
- detail
+ detail,
+ del,
+ edit
}
diff --git a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
index 2b2f7de..e888918 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
@@ -57,11 +57,12 @@
border
:data="tab1Table"
style="width: 100%"
- height="400px"
+ height="40vh"
highlight-current-row
@current-change="resembleRowChange"
@selection-change="tab1TableSelectChange"
v-if="cloNamesList.length > 1"
+ v-loading="tab1Loading"
>
<el-table-column
v-if="type !== 'batchApplyCode'"
@@ -103,7 +104,8 @@
border
:data="currentSelectedResemble"
style="width: 100%"
- height="200px"
+ height="20vh"
+ v-loading="tab1BottomTableLoading"
>
<el-table-column
v-for="item in resembleColumList"
@@ -138,12 +140,9 @@
<el-tab-pane :label="tab2Name" name="tab2">
<el-table
border
+ v-loading="tab2Loading"
:data="tab2Table"
- :height="
- type === 'batchApplyCode' && tab2Table.length > 0
- ? '400px'
- : '700px'
- "
+ height="60vh"
>
<el-table-column
v-for="item in successTableColumns"
@@ -179,7 +178,7 @@
</div>
<template #footer>
<div>
- <el-button size="small" type="primary" @click="submit"
+ <el-button size="small" type="primary" @click="submit" :loading="submitLoading"
>纭畾瀵煎叆</el-button
>
<el-button size="small" @click="dialogVisible = false">鍙栨秷</el-button>
@@ -284,6 +283,10 @@
},
batchApplyCodeTableData: {},
savedList: [],
+ tab1Loading: false,
+ tab2Loading: false,
+ tab1BottomTableLoading: false,
+ submitLoading: false
};
},
@@ -338,11 +341,13 @@
this.localCodeClassifyOid = data.codeClassifyOid;
this.cloNamesList = data.cloNamesList;
this.templateOid = data.oid;
+ this.tab1Loading = true
getResembleTable({
codeClassifyOid:
this.type === "batchApplyCode" ? data.codeRuleOid : this.templateOid,
redisOid: this.redisOid + "-resemble",
}).then((res) => {
+ this.tab1Loading = false
this.tab1Table = res.data.data.filter(
(item) => !this.savedList.includes(item.oid)
);
@@ -351,12 +356,14 @@
this.tab1Table;
}
});
+ this.tab2Loading = true
// 鑾峰彇姝g‘鏁版嵁
getSuccessTable({
codeClassifyOid:
this.type === "batchApplyCode" ? data.codeRuleOid : this.templateOid,
redisOid: this.redisOid + "-ok",
}).then((res) => {
+ this.tab2Loading = false
this.tab2Table = res.data.data;
if (this.tab2Table.length > 0 && this.type === "batchApplyCode") {
this.batchApplyCodeTableData[data.codeRuleOid]["codeApply"] = {};
@@ -382,10 +389,12 @@
if (!row || !row.oid) {
return;
}
+ this.tab1BottomTableLoading = true
getCurretnSelectedRowResemble({
redisOid: this.redisOid + "-resemble-data",
dataOid: row.oid,
}).then((res) => {
+ this.tab1BottomTableLoading = false
this.currentSelectedResemble = res.data.data;
});
},
@@ -483,12 +492,12 @@
},
];
}
+ this.submitLoading = true
submitHistoryimport(params).then((res) => {
- console.log(res);
+ this.submitLoading = false
+ console.log(res);
if (res.data.code === 200) {
this.$message.success(res.data.msg);
- } else {
- this.$message.error(res.data.msg);
}
});
},
@@ -572,6 +581,7 @@
}
}
.right {
+ transition: all 0.5s;
margin-left: 20px;
margin-top: 30px;
}
diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
index 1ecf668..1f91490 100644
--- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -311,6 +311,7 @@
if (uniqueFlag === 'CODEEDIT') return this.editHandler()
if (uniqueFlag === 'CODEBATCHADD') return this.openBatchImport('batchImportApply')
if (uniqueFlag === 'CODEIMPORTHISTORY') return this.openBatchImport('historyImport')
+ if (uniqueFlag === 'batchApplyCode') return this.openBatchImport('batchApplyCode')
// 鎵归噺鐢宠缂栫爜
// if(uniqueFlag === 'CODEEDIT') return this.openBatchImport('batchApplyCode')
if (uniqueFlag === 'CODESTARTPROCESS') return this.setHandler()
@@ -444,10 +445,10 @@
await TableData({
templateOid: this.templateOid,
codeClassifyOid: this.codeClassifyOid,
- page: val.currentPage,
- limit: val.pageSize,
+ page: this.page.currentPage,
+ limit: this.page.pageSize,
}).then((res) => {
- this.data = res.data.data;
+ this.tableData = res.data.data;
});
},
//澶氶��
@@ -521,15 +522,19 @@
console.log(val)
addSaveCode(val).then(res=>{
console.log(res)
- this.onLoad()
+ this.$nextTick(() => {
+ this.onLoad()
+ })
})
},
EditSumbit(val) {
this.editvisible = false;
console.log(val)
- editSaveCode(val).then(res=>{
- console.log(res)
- this.onLoad()
+ editSaveCode(val).then(res=>{
+ console.log(res)
+ this.$nextTick(() => {
+ this.onLoad()
+ })
})
},
openBatchImport(type) {
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
index c7e2680..bd8484d 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -332,6 +332,20 @@
const { defaultValue, formValue } = this.getDefaultValueAndFormValues(
this.form
);
+ const noData = [
+ "jiliangdwname",
+ "materialtypeText",
+ "morengongysname",
+ "$caigouwl",
+ "$xiaoshouwl",
+ "$shifoupihaoguanli",
+ "lcstatus_text",
+ "hesuanfenleiname",
+ "$kucunwl",
+ ];
+ noData.forEach((item) => {
+ this.$delete(formValue, item);
+ });
resForm.data = formValue;
resForm = Object.assign({}, resForm, defaultValue);
resForm.secDTOList = [];
@@ -373,11 +387,9 @@
let resForm = {};
const { defaultValue, formValue } =
this.getDefaultValueAndFormValues(this.form);
- noData.forEach(item => {
- if (formValue[item]) {
- this.$delete(formValue, item)
- }
- })
+ noData.forEach((item) => {
+ this.$delete(formValue, item);
+ });
resForm.data = formValue;
resForm = Object.assign({}, resForm, defaultValue);
resForm.secDTOList = this.secVOList.map((item) => {
@@ -389,7 +401,6 @@
resForm.codeClassifyOid = this.codeClassifyOid;
resForm.codeRuleOid = this.codeRuleOid;
resForm.templateOid = this.templateOid;
- console.log(resForm, 'ddd');
this.$emit("submit", resForm);
})
.catch(() => {});
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
index 9b1469a..87bf1ca 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -122,6 +122,7 @@
simOid:"",
btmName:"",
btmOid:"",
+ btmId:"",
masterInput:'',
MasterSearchSelects:"",
masterData:[],
@@ -237,7 +238,7 @@
},
{
label:"缂栫爜瑙勫垯",
- prop:"coderuleoidName",
+ prop:"codeRuleOidName",
labelWidth:128,
disabled: true,
},
@@ -307,7 +308,7 @@
},
{
label:"缂栫爜瑙勫垯",
- prop:"coderuleoidName",
+ prop:"codeRuleOidName",
labelWidth:128,
focus:this.CodeFoucus,
readonly: true,
@@ -393,8 +394,8 @@
}else {
this.MasterdialogVisible=false;
this.masterSelectList=[]
- this.$set(this.loneTreeNewForm,'coderuleoidName',this.masterName)
- this.$set(this.loneTreeNewForm,'coderuleoid',this.masterOid)
+ this.$set(this.loneTreeNewForm,'codeRuleOidName',this.masterName)
+ this.$set(this.loneTreeNewForm,'codeRuleOid',this.masterOid)
this.$emit('MasterHandler',this.loneTreeNewForm)
}
},
@@ -448,8 +449,8 @@
'conditionMap[name]':this.SelectFInd
}
this.KeydefaultRend(masterParameter)
- this.SelectValue=""
- this.SelectFInd=""
+ this.SelectValue="";
+ this.SelectFInd="";
}
},
//鍏抽敭灞炴�ф帴鍙�
@@ -536,7 +537,7 @@
this.BtmdialogVisible=false;
this.btmSelectList=[]
this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmOid)
- this.$set(this.loneTreeNewForm,'btmTypeid',this.btmOid)
+ this.$set(this.loneTreeNewForm,'btmTypeId',this.btmId)
this.$emit('MasterHandler',this.loneTreeNewForm)
}
},
@@ -563,6 +564,7 @@
this.btmSelectList=row;
this.btmName=row[0].name;
this.btmOid=row[0].oid;
+ this.btmId=row[0].id;
},
//涓氬姟绫诲瀷鎺ュ彛
btmdefaultRend(masterParameter){
diff --git a/Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue b/Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue
index 75a9bab..78c2af5 100644
--- a/Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue
+++ b/Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue
@@ -11,13 +11,14 @@
<el-form-item label="鍚嶇О" prop="name">
<el-input v-model.trim="newRowData.name" :maxLength="20" clearable />
</el-form-item>
- <el-form-item label="鏍囩" prop="id">
+ <el-form-item label="缂栧彿" prop="id">
<el-input v-model.trim="newRowData.id" clearable />
</el-form-item>
<el-form-item label="璧峰鐘舵��" prop="startStatus">
<el-select
v-model="newRowData.startStatus"
placeholder="璇烽�夋嫨璧峰鐘舵��"
+ :disabled="type === 'edit'"
style="width: 100%"
>
<el-option
@@ -45,8 +46,27 @@
<group-panel :status="status">
<detail-form type="group" />
</group-panel>
- <multi-panel :status="status" />
- <canvas-panel :status="status" />
+ <node-panel :status="status">
+ <div class="event">
+ <hr />
+ <div class="btn_box">
+ <el-button type="primary" size="mini">鏂板</el-button>
+ <el-button type="danger" size="mini">鍒犻櫎</el-button>
+ <el-button type="primary" size="mini">淇濆瓨</el-button>
+ </div>
+ <div class="flex" v-for="(item, index) in eventList" :key="index" :class="{active: index === currentActive}">
+ <el-select size="mini" style="width: 70%" v-if="item.isEdit">
+ <el-option></el-option>
+ </el-select>
+ <span v-else style="width: 70%">{{item.evenName}}</span>
+ <el-button size="mini" type="text" class="red">鍒犻櫎</el-button>
+ <el-button size="mini" type="text" @click="editChange(item)">{{item.isEdit ? '鏆傚瓨' : '缂栬緫'}}</el-button>
+ </div>
+ </div>
+ </node-panel>
+
+ <!-- <multi-panel :status="status" /> -->
+ <!-- <canvas-panel :status="status" /> -->
</template>
</detail-panel>
</div>
@@ -74,25 +94,31 @@
DetailPanel,
DetailForm,
},
- props: ["rowData", "existNodes"],
+ props: ["rowData", "existNodes", "type"],
data() {
return {
newRowData: {
startStatus: undefined,
name: undefined,
id: undefined,
- remark: undefined
+ remark: undefined,
},
rules: {
name: [{ required: true, message: "鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }],
id: [
{ required: true, message: "鏍囩涓嶈兘涓虹┖", trigger: "blur" },
- { pattern: /^[A-z]+$/g, message: "鏍囩鍙兘杈撳叆鑻辨枃", trigger: "blur" }
+ {
+ pattern: /^[A-z]+$/g,
+ message: "鏍囩鍙兘杈撳叆鑻辨枃",
+ trigger: "blur",
+ },
],
startStatus: [
{ required: true, message: "璧峰鐘舵�佷笉鑳戒负绌�", trigger: "change" },
],
},
+ eventList: [{evenName: '123123'}],
+ currentActive: 0
};
},
methods: {
@@ -107,6 +133,9 @@
});
});
},
+ editChange(row) {
+ this.$set(row, 'isEdit', !row.isEdit)
+ }
},
watch: {
rowData: {
@@ -131,3 +160,20 @@
},
};
</script>
+<style lang="scss" scoped>
+.event {
+ margin-top: 20px;
+ text-align: center;
+}
+.flex {
+ margin-top: 10px;
+ display: flex;
+ justify-content: space-between;
+}
+.red {
+ color: red;
+}
+.active {
+ box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4)
+}
+</style>
diff --git a/Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue b/Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue
index aaac12b..78b4dd5 100644
--- a/Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue
+++ b/Source/UBCS-WEB/src/components/flow-cycle/flowchartEditor.vue
@@ -23,7 +23,7 @@
</div>
<div class="vfe-chart-panel" v-if="type !== 'detail'">
<div class="vfe-chart-panel-detail">
- <editor-detail-panel :rowData="rowData" ref="EditorDetailPanel" :existNodes="existNodes"/>
+ <editor-detail-panel :rowData="rowData" ref="EditorDetailPanel" :existNodes="existNodes" :type="type"/>
</div>
</div>
</div>
@@ -83,7 +83,7 @@
},
tooltipShow: true,
tooltipData: [],
- existNodes: []
+ existNodes: this.chartData.nodes || []
};
},
@@ -207,6 +207,7 @@
width: 300px;
background-color: #fafafa;
border-left: 1px solid #e6e9ed;
+ overflow-y: scroll;
.vfe-chart-panel-detail {
box-sizing: border-box;
diff --git a/Source/UBCS-WEB/src/const/omd/enum.js b/Source/UBCS-WEB/src/const/omd/enum.js
index 43d3b69..20d2e6b 100644
--- a/Source/UBCS-WEB/src/const/omd/enum.js
+++ b/Source/UBCS-WEB/src/const/omd/enum.js
@@ -17,7 +17,7 @@
prop: "name",
search: true,
slot: true,
- span: 24,
+ span: 16,
rules: [
{
required: true,
@@ -30,7 +30,8 @@
label: "鍚嶇О",
prop: "label",
search: true,
- align: "center",
+ // align: "center",
+ span: 16,
rules: [
{
required: true,
@@ -82,8 +83,9 @@
// },
{
label: "鎻忚堪",
- width: 150,
- align: "center",
+ span: 16,
+ // width: 150,
+ // align: "center",
prop: "remark",
// hide: true
}
diff --git a/Source/UBCS-WEB/src/views/modeling/Business.vue b/Source/UBCS-WEB/src/views/modeling/Business.vue
index 12bf821..6dd1b28 100644
--- a/Source/UBCS-WEB/src/views/modeling/Business.vue
+++ b/Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -15,7 +15,7 @@
<avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick" class="businessTree">
<span class="el-tree-node__label" slot-scope="{ node, data }">
<span>
- <i class="el-icon-star-on"></i>
+ <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i>
{{ (node || {}).label }}
</span>
</span>
@@ -82,7 +82,7 @@
<i :class="icons.revisionRule"></i>
鐗堟湰瑙勫垯
</template>
- {{ obj.revisionRuleName + '(' + obj.revisionRuleId + ')' }}
+ {{ obj.revisionRuleName ? obj.revisionRuleName+ '(' + obj.revisionRuleId + ')' : ''}}
</el-descriptions-item>
<el-descriptions-item :labelStyle="descriptionOption.labelStyle"
:contentStyle="descriptionOption.contentStyle">
@@ -90,7 +90,7 @@
<i :class="icons.lifeCycle"></i>
鐢熷懡鍛ㄦ湡
</template>
- {{ obj.lifeCycleName + '(' + obj.lifeCycleId + ')' }}
+ {{ obj.lifeCycleName ? obj.lifeCycleName + '(' + obj.lifeCycleId + ')' : ''}}
</el-descriptions-item>
<el-descriptions-item :labelStyle="descriptionOption.labelStyle"
:contentStyle="descriptionOption.contentStyle">
@@ -176,6 +176,7 @@
defaultExpandAll: true,
title: '涓氬姟绫诲瀷鏍�',
addBtn: false,
+ menu:false,
props: {
labelText: '',
label: 'label',
@@ -237,7 +238,8 @@
revisionRule: 'el-icon-s-check',
lifeCycle: 'el-icon-refresh-right',
view: 'el-icon-view',
- desc: 'el-icon-chat-line-square'
+ desc: 'el-icon-chat-line-square',
+ referType: 'el-icon-search'
},
ref: {
// 浠庤〃涓�夋嫨dialog鐘舵��
@@ -278,7 +280,7 @@
this.initDomainOption();
},
methods: {
- nodeClick(data) {
+ nodeClick(data,node,leaf) {
if (data.oid) {
getDetail(data.oid).then(res => {
this.obj = res.data.data;
@@ -347,6 +349,7 @@
},
businessAdd() {
this.$refs.btmAdd.showSubmitDialog = true;
+ this.$refs.btmAdd.btmType = {};
this.ifRefreshBtmAddRefresh();
},
businessEdit() {
diff --git a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
index 6c390a7..651e7cc 100644
--- a/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -19,21 +19,32 @@
<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 v-model="btmType.bizDomain" :prefix-icon="icons.domain">
+ <el-select placeholder="璇烽�夋嫨棰嗗煙" v-model="btmType.bizDomain" :prefix-icon="icons.domain">
<el-option v-for="item in domainOption"
:label="item.label" :value="item.value" :key="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">
- <i slot="suffix" class="el-input__icon el-icon-search"></i>
+ <el-input v-model="btmType.revisionRuleName"
+ :prefix-icon="icons.revisionRule"
+ class="revisionRule"
+ @focus="openRevision"
+ clearable
+ @clear="clearRevision"
+ :suffix-icon="icons.referType"
+ placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�">
</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">
- <i slot="suffix" class="el-input__icon el-icon-search"></i>
+ <el-input v-model="btmType.lifeCycleName"
+ :prefix-icon="icons.lifeCycle"
+ class="lifeCycle"
+ @focus="openLifeCycle"
+ clearable
+ @clear="clearLifeCycle"
+ :suffix-icon="icons.referType"
+ placeholder="璇烽�夋嫨锛岀暀绌哄垯涓嶈繘琛岀鐞�">
</el-input>
</el-form-item>
<div>
@@ -787,26 +798,22 @@
}
.btmTypeForm > .el-form-item > .el-form-item__content > .el-input > .el-input__inner {
- width: 200px;
+ width: 260px;
}
.domainSelect > .el-form-item__content > .el-select > .el-input > .el-input__inner {
- width: 200px;
+ width: 260px;
}
.viewFlag {
- width: 305px;
+ width: 360px;
}
.viewInput > .el-form-item__content > .el-input > .el-input__inner {
- width: 200px;
+ width: 630px;
}
.descClass > .el-input__inner {
- width: 57vw
-}
-
-#descId {
- width: 57vw;
+ width: 1000px;
}
</style>
diff --git a/Source/UBCS-WEB/src/views/modeling/cycle.vue b/Source/UBCS-WEB/src/views/modeling/cycle.vue
index c7a5fd2..5df55c7 100644
--- a/Source/UBCS-WEB/src/views/modeling/cycle.vue
+++ b/Source/UBCS-WEB/src/views/modeling/cycle.vue
@@ -5,9 +5,13 @@
:option="option"
:page="page"
:table-loading="loading"
+ selection
+ @size-change="search('size', ...arguments)"
+ @current-change="search('current', ...arguments)"
@refresh-change="search"
@search-change="search('search', ...arguments)"
@search-reset="search('reset', ...arguments)"
+ @selection-change="selectionChange"
>
<template slot-scope="scope" slot="menuLeft">
<el-button
@@ -17,12 +21,22 @@
@click="openDialog('add', {})"
>鏂板</el-button
>
+ <el-button
+ type="danger"
+ icon="el-icon-delete"
+ size="small"
+ @click="batchDel()"
+ v-if="selectedData.length > 0"
+ :loading="delLoading"
+ >鍒犻櫎</el-button
+ >
</template>
<template slot-scope="{ row, index }" slot="menu">
<el-button
type="text"
icon="el-icon-edit"
size="mini"
+ :loading="row.editLoading"
@click="openDialog('edit', row)"
>缂栬緫</el-button
>
@@ -30,8 +44,18 @@
type="text"
icon="el-icon-view"
size="mini"
+ :loading="row.detailLoading"
@click="openDialog('detail', row)"
>棰勮</el-button
+ >
+ <el-button
+ class="btn_link_del"
+ type="text"
+ icon="el-icon-delete"
+ size="mini"
+ :loading="row.delLoading"
+ @click="rowDel(row)"
+ >鍒犻櫎</el-button
>
</template></avue-crud
>
@@ -58,7 +82,13 @@
@save-data="save"
/>
<template #footer v-if="type !== 'detail'">
- <el-button type="primary" size="mini" @click="submit">淇濆瓨</el-button>
+ <el-button
+ type="primary"
+ size="mini"
+ @click="submit"
+ :loading="submitLoading"
+ >淇濆瓨</el-button
+ >
<el-button type="" size="mini" @click="visible = false">鍙栨秷</el-button>
</template>
</el-dialog>
@@ -73,7 +103,12 @@
components: { CycleFlow },
data() {
return {
- form: {},
+ form: {
+ // 'contionMap[id]': 'qwe'
+ // contionMap: [
+ // {id: 'qwe'}
+ // ]
+ },
page: {
pageSize: 10,
total: 0,
@@ -81,7 +116,8 @@
layout: "total, sizes, prev, pager, next, jumper",
},
option: {
- searchMenuSpan: 12,
+ selection: true,
+ searchMenuSpan: 6,
searchMenuPosition: "right",
border: true,
align: "center",
@@ -94,6 +130,7 @@
{
label: "缂栧彿",
prop: "id",
+ search: true,
},
{
label: "鍚嶇О",
@@ -102,7 +139,7 @@
},
{
label: "璧峰鐘舵��",
- prop: "startStatusName",
+ prop: "startStatus",
search: true,
},
{
@@ -120,6 +157,9 @@
dialogWidth: "50%",
type: "detail",
loading: false,
+ delLoading: false,
+ submitLoading: false,
+ selectedData: [],
};
},
created() {
@@ -135,10 +175,18 @@
total: 0,
currentPage: 1,
};
+ } else if (type === "size") {
+ this.page.pageSize = params;
+ } else if (type === "current") {
+ this.page.currentPage = params;
}
this.loading = true;
- const { limit, page } = this.page;
- API.getList(Object.assign({}, params, { limit, page })).then((res) => {
+ API.getList(
+ Object.assign({}, params, {
+ size: this.page.pageSize,
+ current: this.page.currentPage,
+ })
+ ).then((res) => {
this.loading = false;
this.data = res.data.data.records;
this.page.total = res.data.data.total;
@@ -162,52 +210,126 @@
this.$set(row, "detailLoading", false);
this.$set(row, "editLoading", false);
this.rowData = row;
- this.nodesEdgesData = {nodes: res.nodes, edges: res.edges}
+ const nodes = res.data.data.nodes.map((item) => {
+ item.label = item.id;
+ item.index = item.indexNum;
+ return item;
+ });
+ const edges = res.data.data.edges.map((item) => {
+ item.label = item.name;
+ item.width = 80;
+ item.height = 48;
+ item.index = 1;
+ item.index = item.indexNum;
+ return item;
+ });
+ this.nodesEdgesData = { nodes, edges };
+ this.visible = true;
});
} else {
+ this.nodesEdgesData = {};
+ this.rowData = {};
this.title = "鏂板鐢熷懡鍛ㄦ湡娴佺▼鍥�";
this.dialogWidth = "95%";
this.visible = true;
}
},
+ // 閫変腑鏁版嵁
+ selectionChange(selectedData) {
+ this.selectedData = selectedData;
+ },
+ // 鍒犻櫎
+ rowDel(row) {
+ this.$confirm("纭鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }).then(() => {
+ this.$set(row, "delLoading", true);
+ API.del({ oid: row.oid, id: row.id })
+ .then((res) => {
+ this.$set(row, "delLoading", false);
+ if (res.data.code === 200) {
+ this.$message.success("鍒犻櫎鎴愬姛锛�");
+ this.search();
+ }
+ })
+ .catch(() => {
+ this.$set(row, "delLoading", false);
+ });
+ });
+ },
+ batchDel() {
+ this.$confirm("纭鍒犻櫎鎵�閫夋暟鎹�?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }).then(() => {
+ const data = this.selectedData.map((item) => {
+ return {
+ id: item.id,
+ oid: item.oid,
+ };
+ });
+ this.delLoading = true;
+ API.del(data, true)
+ .then((res) => {
+ this.delLoading = false;
+ if (res.data.code === 200) {
+ this.$message.success("鍒犻櫎鎴愬姛锛�");
+ this.search();
+ }
+ })
+ .catch(() => {
+ this.delLoading = false;
+ });
+ });
+ },
async submit() {
const newRowData = await this.$refs.vueFlowchartEditor.getNewRowData();
- console.log(newRowData, "newRowDatanewRowData");
if (!newRowData) {
return;
}
- const flowData = this.$refs.vueFlowchartEditor.getFlowData();
+ const flowData = await this.$refs.vueFlowchartEditor.getFlowData();
if (Array.isArray(flowData.nodes)) {
flowData.nodes = flowData.nodes.map((item) => {
item.name = item.id;
+ item.indexNum = item.index;
return item;
});
}
if (Array.isArray(flowData.edges)) {
flowData.edges = flowData.edges.map((item) => {
item.name = item.label;
+ item.indexNum = item.index;
return item;
});
}
-
let params = {
- ...flowData,
...newRowData,
+ ...flowData,
};
- console.log(flowData, newRowData);
- API.add(params).then((res) => {
- console.log(res, "res");
- });
- },
- },
- watch: {
- page: {
- deep: true,
- immediate: true,
- handler(newV) {
- this.page.page = newV.currentPage;
- this.page.limit = newV.pageSize;
- },
+
+ this.submitLoading = true;
+ let APIFun = API.add;
+ if (this.type === "edit") {
+ APIFun = API.edit;
+ this.$delete(params, "id");
+ }
+ APIFun(params)
+ .then((res) => {
+ this.submitLoading = false;
+ if (res.data.code === 200) {
+ this.$message.success(
+ this.type === "edit" ? "淇敼鎴愬姛锛�" : "鏂板鎴愬姛锛�"
+ );
+ this.visible = false;
+ this.search();
+ }
+ })
+ .catch(() => {
+ this.submitLoading = false;
+ });
},
},
};
@@ -224,4 +346,7 @@
margin: 0;
padding: 0;
}
+.btn_link_del {
+ color: red;
+}
</style>
diff --git a/Source/UBCS-WEB/vue.config.js b/Source/UBCS-WEB/vue.config.js
index ad43a75..63a88c9 100644
--- a/Source/UBCS-WEB/vue.config.js
+++ b/Source/UBCS-WEB/vue.config.js
@@ -26,9 +26,9 @@
proxy: {
'/api': {
//鏈湴鏈嶅姟鎺ュ彛鍦板潃
- target: 'http://localhost:37000',
+ // target: 'http://localhost:37000',
// target: 'http://192.168.1.51:37000',
- // target: 'http://192.168.1.46:37000',
+ target: 'http://192.168.1.46:37000',
// target: 'http://dev.vci-tech.com:37000',
// target: 'http://192.168.1.51:37000/',
// target: 'http://192.168.1.104:37000',
diff --git a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java
index ec137bf..cd2b427 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTreeVO.java
@@ -29,5 +29,7 @@
private String type;
+ private Integer level;
+
private List<BtmTreeVO> childList;
}
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
index bac65bb..23d8bde 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
@@ -659,7 +659,10 @@
try {
Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel));
List<BtmTypeVO> vos = BtmTypeWrapper.build().listEntityVO(baseMapper.selectAll());
- Map<String, List<BtmTypeVO>> domainMap = vos.stream().sorted(Comparator.comparing(BtmTypeVO::getId)).collect(Collectors.groupingBy(BtmTypeVO::getBizDomain));
+ if (CollectionUtils.isEmpty(vos)){
+ return new ArrayList<>();
+ }
+ Map<String, List<BtmTypeVO>> domainMap = Optional.ofNullable(vos).orElseGet(ArrayList::new).stream().sorted(Comparator.comparing(BtmTypeVO::getId)).collect(Collectors.groupingBy(BtmTypeVO::getBizDomain));
List<BtmTreeVO> treeList = new ArrayList<>();
domainMap.forEach((k,v)-> {
if (domain.containsKey(k)){
@@ -668,11 +671,13 @@
parent.setName(label);
parent.setLabel(label);
parent.setId(k);
+ parent.setLevel(1);
parent.setChildList(v.stream().map(s -> {
BtmTreeVO child = new BtmTreeVO();
child.setOid(s.getOid());
child.setName(s.getName());
child.setId(s.getId());
+ child.setLevel(2);
child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")"));
return child;
}).collect(Collectors.toList()));
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java
index e2aa9f1..77ee224 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LinkTypeServiceImpl.java
@@ -877,7 +877,10 @@
try {
Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel));
List<LinkTypeVO> vos = LinkTypeWrapper.build().listEntityVO(baseMapper.selectAll(), null);
- Map<String, List<LinkTypeVO>> domainMap = vos.stream().collect(Collectors.groupingBy(LinkTypeVO::getBizDomain));
+ if (CollectionUtils.isEmpty(vos)){
+ return new ArrayList<>();
+ }
+ Map<String, List<LinkTypeVO>> domainMap = Optional.ofNullable(vos).orElseGet(ArrayList::new).stream().collect(Collectors.groupingBy(LinkTypeVO::getBizDomain));
List<BtmTreeVO> treeList = new ArrayList<>();
domainMap.forEach((k,v)-> {
if (domain.containsKey(k)){
@@ -885,6 +888,7 @@
BtmTreeVO parent = new BtmTreeVO();
parent.setName(label);
parent.setId(k);
+ parent.setLevel(1);
parent.setLabel(label);
parent.setChildList(v.stream().map(s -> {
BtmTreeVO child = new BtmTreeVO();
@@ -892,6 +896,7 @@
child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")"));
child.setId(s.getId());
child.setName(s.getName());
+ child.setLevel(2);
return child;
}).collect(Collectors.toList()));
treeList.add(parent);
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java
index 1acd514..efef233 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/LinkTypeWrapper.java
@@ -49,7 +49,7 @@
});
vo.setFromBtmTypes(fromBtm);
vo.setToBtmTypes(toBtm);
- vo.setTableName(vo.getTableName().toUpperCase(Locale.ROOT));
+ vo.setTableName(Optional.ofNullable(vo.getTableName()).orElseGet(String::new).toUpperCase(Locale.ROOT));
// 鏋氫妇澶勭悊
vo.setDomainText(NewAppConstantEnum.getTextByName(vo.getBizDomain()));
return vo;
diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeMapper.xml b/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeMapper.xml
index 5dd7cba..661da9b 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/LinkTypeMapper.xml
@@ -19,13 +19,13 @@
<result column="last_modifier" jdbcType="VARCHAR" property="lastModifier" />
<result column="last_modify_time" jdbcType="TIMESTAMP" property="lastModifyTime" />
<result column="ts" jdbcType="TIMESTAMP" property="ts" />
- <result column="biz-domain" jdbcType="VARCHAR" property="bizDomain" />
+ <result column="biz_domain" jdbcType="VARCHAR" property="bizDomain" />
</resultMap>
<sql id="base_query_column">
oid, id, name, description, shape, impl_class, from_btm_type, from_btm_type_name,
to_btm_type, to_btm_type_name, btm_name, owner, creator, create_time, last_modifier, last_modify_time,
- ts, biz-domain
+ ts, biz_domain
</sql>
<sql id="tableName">
--
Gitblit v1.9.3