| | |
| | | data
|
| | | })
|
| | | }
|
| | | export const detail = (params) => {
|
| | | return request({
|
| | | url: '/api/ubcs-omd/lifeCycle/detail',
|
| | | method: 'get',
|
| | | params
|
| | | })
|
| | | }
|
| | | export default {
|
| | | getList,
|
| | | add
|
| | | add,
|
| | | detail
|
| | | }
|
| | |
| | | "copyfromversion", |
| | | "secretgrade", |
| | | ], |
| | | codeRuleOid: '' |
| | | codeRuleOid: "", |
| | | }; |
| | | }, |
| | | created() {}, |
| | |
| | | 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 |
| | |
| | | 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", |
| | |
| | | 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 = {}; |
| | |
| | | } |
| | | ) |
| | | .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(() => {}); |
| | |
| | | }, |
| | | 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" }, |
| | | ], |
| | |
| | | v-if="visible" |
| | | class="cycle_flow" |
| | | :type="type" |
| | | :chart-data="rowData.data || {}" |
| | | :chart-data="nodesEdgesData" |
| | | :chart-data-node-items="flowChartNodeItems" |
| | | :rowData="rowData" |
| | | ref="vueFlowchartEditor" |
| | |
| | | pageSize: 10, |
| | | total: 0, |
| | | currentPage: 1, |
| | | layout: "total, sizes, prev, pager, next, jumper" |
| | | layout: "total, sizes, prev, pager, next, jumper", |
| | | }, |
| | | option: { |
| | | searchMenuSpan: 12, |
| | |
| | | visible: false, |
| | | flowChartNodeItems: [], |
| | | rowData: {}, |
| | | nodesEdgesData: {}, |
| | | dialogWidth: "50%", |
| | | type: "detail", |
| | | loading: false, |
| | |
| | | }; |
| | | } |
| | | 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; |
| | |
| | | }); |
| | | }, |
| | | 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: { |