From 5e55262ee63e6587368ebbdb9386d71da5695386 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 11 七月 2023 19:08:00 +0800
Subject: [PATCH] fjl
---
Source/UBCS-WEB/src/api/modeling/cycle.js | 10 ++++
Source/UBCS-WEB/src/views/modeling/cycle.vue | 59 +++++++++++++++++++----------
Source/UBCS-WEB/src/components/FormTemplate/index.vue | 38 ++++++++++++++-----
Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue | 5 ++
4 files changed, 80 insertions(+), 32 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/modeling/cycle.js b/Source/UBCS-WEB/src/api/modeling/cycle.js
index c350d70..18c4505 100644
--- a/Source/UBCS-WEB/src/api/modeling/cycle.js
+++ b/Source/UBCS-WEB/src/api/modeling/cycle.js
@@ -15,7 +15,15 @@
data
})
}
+export const detail = (params) => {
+ return request({
+ url: '/api/ubcs-omd/lifeCycle/detail',
+ method: 'get',
+ params
+ })
+}
export default {
getList,
- add
+ add,
+ detail
}
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
index 98665ec..c7e2680 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -196,7 +196,7 @@
"copyfromversion",
"secretgrade",
],
- codeRuleOid: ''
+ codeRuleOid: "",
};
},
created() {},
@@ -237,9 +237,9 @@
this.activeName = "resembleQuery";
this.showResembleQuery = true;
} else {
- this.showResembleQuery = false
+ this.showResembleQuery = false;
}
- console.log(this.hasResemble, 'this.hasResemblethis.hasResemble');
+ console.log(this.hasResemble, "this.hasResemblethis.hasResemble");
this.$nextTick(() => {
this.$refs.FormTemplate.templateRender(
res.data.formDefineVO.items
@@ -258,7 +258,7 @@
getCodeRule() {
getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => {
if (res.data && res.data.code === 200) {
- this.codeRuleOid = res.data.data.oid
+ this.codeRuleOid = res.data.data.oid;
const typeList = [
"codefixedsec",
"codeclassifysec",
@@ -320,12 +320,12 @@
return false;
}
}
- let resembleQueryList = []
+ let resembleQueryList = [];
if (this.$refs.resembleQueryRef) {
// 杩涜鐩镐技椤规煡璇�
- resembleQueryList = await this.$refs.resembleQueryRef.resembleQuery(
- this.form
- );
+ resembleQueryList = await this.$refs.resembleQueryRef.resembleQuery(
+ this.form
+ );
}
if (resembleQueryList.length === 0) {
let resForm = {};
@@ -358,20 +358,38 @@
}
)
.then(() => {
+ // 鎺掗櫎涓�浜涘瓧娈�
+ const noData = [
+ "jiliangdwname",
+ "materialtypeText",
+ "morengongysname",
+ "$caigouwl",
+ "$xiaoshouwl",
+ "$shifoupihaoguanli",
+ "lcstatus_text",
+ "hesuanfenleiname",
+ "$kucunwl",
+ ];
let resForm = {};
const { defaultValue, formValue } =
this.getDefaultValueAndFormValues(this.form);
+ noData.forEach(item => {
+ if (formValue[item]) {
+ this.$delete(formValue, item)
+ }
+ })
resForm.data = formValue;
resForm = Object.assign({}, resForm, defaultValue);
- resForm.secDTOList = this.secVOList.map(item => {
+ resForm.secDTOList = this.secVOList.map((item) => {
return {
secOid: item.oid,
secValue: this.codeApplyForm[item.oid],
- }
+ };
});
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/flow-cycle/components/DetailPanel.vue b/Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue
index 534d360..75a9bab 100644
--- a/Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue
+++ b/Source/UBCS-WEB/src/components/flow-cycle/components/DetailPanel.vue
@@ -85,7 +85,10 @@
},
rules: {
name: [{ required: true, message: "鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }],
- id: [{ required: true, message: "鏍囩涓嶈兘涓虹┖", trigger: "blur" }],
+ id: [
+ { required: true, message: "鏍囩涓嶈兘涓虹┖", trigger: "blur" },
+ { pattern: /^[A-z]+$/g, message: "鏍囩鍙兘杈撳叆鑻辨枃", trigger: "blur" }
+ ],
startStatus: [
{ required: true, message: "璧峰鐘舵�佷笉鑳戒负绌�", trigger: "change" },
],
diff --git a/Source/UBCS-WEB/src/views/modeling/cycle.vue b/Source/UBCS-WEB/src/views/modeling/cycle.vue
index 7c171f6..c7a5fd2 100644
--- a/Source/UBCS-WEB/src/views/modeling/cycle.vue
+++ b/Source/UBCS-WEB/src/views/modeling/cycle.vue
@@ -51,7 +51,7 @@
v-if="visible"
class="cycle_flow"
:type="type"
- :chart-data="rowData.data || {}"
+ :chart-data="nodesEdgesData"
:chart-data-node-items="flowChartNodeItems"
:rowData="rowData"
ref="vueFlowchartEditor"
@@ -78,7 +78,7 @@
pageSize: 10,
total: 0,
currentPage: 1,
- layout: "total, sizes, prev, pager, next, jumper"
+ layout: "total, sizes, prev, pager, next, jumper",
},
option: {
searchMenuSpan: 12,
@@ -116,6 +116,7 @@
visible: false,
flowChartNodeItems: [],
rowData: {},
+ nodesEdgesData: {},
dialogWidth: "50%",
type: "detail",
loading: false,
@@ -136,10 +137,6 @@
};
}
this.loading = true;
- console.log(
- Object.assign({}, params, this.page),
- "Object.assign({}, params, this.page)"
- );
const { limit, page } = this.page;
API.getList(Object.assign({}, params, { limit, page })).then((res) => {
this.loading = false;
@@ -150,35 +147,57 @@
});
},
openDialog(type, row) {
- if (type === "detail") {
- this.title = "棰勮鐢熷懡鍛ㄦ湡娴佺▼鍥�";
- this.dialogWidth = "50%";
- } else if (type === "edit") {
+ this.type = type;
+ if (type === "edit") {
+ this.$set(row, "editLoading", true);
this.title = "缂栬緫鐢熷懡鍛ㄦ湡娴佺▼鍥�";
this.dialogWidth = "95%";
- } else if (type === "add") {
+ } else if (type === "detail") {
+ this.$set(row, "detailLoading", true);
+ this.title = "棰勮鐢熷懡鍛ㄦ湡娴佺▼鍥�";
+ this.dialogWidth = "50%";
+ }
+ if (type !== "add") {
+ API.detail({ id: row.id }).then((res) => {
+ this.$set(row, "detailLoading", false);
+ this.$set(row, "editLoading", false);
+ this.rowData = row;
+ this.nodesEdgesData = {nodes: res.nodes, edges: res.edges}
+ });
+ } else {
this.title = "鏂板鐢熷懡鍛ㄦ湡娴佺▼鍥�";
this.dialogWidth = "95%";
+ this.visible = true;
}
- this.type = type;
- this.rowData = row;
- this.visible = true;
},
async submit() {
const newRowData = await this.$refs.vueFlowchartEditor.getNewRowData();
- console.log(newRowData, 'newRowDatanewRowData');
+ console.log(newRowData, "newRowDatanewRowData");
if (!newRowData) {
return;
}
const flowData = this.$refs.vueFlowchartEditor.getFlowData();
+ if (Array.isArray(flowData.nodes)) {
+ flowData.nodes = flowData.nodes.map((item) => {
+ item.name = item.id;
+ return item;
+ });
+ }
+ if (Array.isArray(flowData.edges)) {
+ flowData.edges = flowData.edges.map((item) => {
+ item.name = item.label;
+ return item;
+ });
+ }
+
let params = {
...flowData,
- ...newRowData
- }
+ ...newRowData,
+ };
console.log(flowData, newRowData);
- API.add(params).then(res => {
- console.log(res, 'res');
- })
+ API.add(params).then((res) => {
+ console.log(res, "res");
+ });
},
},
watch: {
--
Gitblit v1.9.3