| | |
| | | :option="option" |
| | | :page="page" |
| | | :table-loading="loading" |
| | | :permission="permissionList" |
| | | selection |
| | | @size-change="search('size', ...arguments)" |
| | | @current-change="search('current', ...arguments)" |
| | |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | v-if="permissionList.addBtn" |
| | | @click="openDialog('add', {})" |
| | | >新增</el-button |
| | | > |
| | |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | v-if="permissionList.editBtn" |
| | | :loading="row.editLoading" |
| | | @click="openDialog('edit', row)" |
| | | >编辑</el-button |
| | |
| | | type="text" |
| | | icon="el-icon-view" |
| | | size="mini" |
| | | v-if="permissionList.openBtn" |
| | | :loading="row.detailLoading" |
| | | @click="openDialog('detail', row)" |
| | | >预览</el-button |
| | |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | v-if="permissionList.delBtn" |
| | | :loading="row.delLoading" |
| | | @click="rowDel(row)" |
| | | >删除</el-button |
| | |
| | | <script> |
| | | import API from "@/api/modeling/cycle"; |
| | | import CycleFlow from "@/components/flow-cycle/flowchartEditor.vue"; |
| | | import {mapGetters} from "vuex"; |
| | | export default { |
| | | name: "cycle.vue", |
| | | components: { CycleFlow }, |
| | |
| | | option: { |
| | | height:'auto', |
| | | calcHeight:20, |
| | | columnBtn:false, |
| | | tip:false, |
| | | selection: true, |
| | | searchMenuSpan: 6, |
| | | searchMenuPosition: "right", |
| | |
| | | submitLoading: false, |
| | | selectedData: [], |
| | | }; |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["permission"]), |
| | | permissionList(){ |
| | | return{ |
| | | addBtn: this.vaildData(this.permission.modeling_cycle.cycle_add,false), |
| | | delBtn: this.vaildData(this.permission.modeling_cycle.cycle_delete,false), |
| | | editBtn: this.vaildData(this.permission.modeling_cycle.cycle_edit,false), |
| | | openBtn: this.vaildData(this.permission.modeling_cycle.cycle_open,false), |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | this.search("search", {}); |
| | |
| | | const nodes = res.data.data.nodes.map((item) => { |
| | | item.label = item.id; |
| | | item.index = item.indexNum; |
| | | item.x = Number(item.x); |
| | | item.y = Number(item.y); |
| | | return item; |
| | | }); |
| | | const edges = res.data.data.edges.map((item) => { |
| | |
| | | }); |
| | | this.nodesEdgesData = { nodes, edges }; |
| | | this.visible = true; |
| | | console.log('nodesEdgesData',this.nodesEdgesData) |
| | | }); |
| | | } else { |
| | | this.nodesEdgesData = {}; |
| | |
| | | }); |
| | | }, |
| | | async submit() { |
| | | // const data = { |
| | | // startStatus: "Auditing", |
| | | // name: "22", |
| | | // id: "asas", |
| | | // nodes: [ |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "Auditing", |
| | | // x: 278.60856031183397, |
| | | // y: 84.12841612613737, |
| | | // id: "Auditing", |
| | | // change: true, |
| | | // index: 0, |
| | | // name: "Auditing", |
| | | // indexNum: 0, |
| | | // }, |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "Editing", |
| | | // x: 294.17388658989535, |
| | | // y: 299.9676071819219, |
| | | // id: "Editing", |
| | | // change: true, |
| | | // index: 1, |
| | | // name: "Editing", |
| | | // indexNum: 1, |
| | | // }, |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "drg", |
| | | // x: 278.60856031183397, |
| | | // y: 463.92237731083515, |
| | | // id: "drg", |
| | | // change: true, |
| | | // index: 3, |
| | | // name: "drg", |
| | | // indexNum: 3, |
| | | // }, |
| | | // ], |
| | | // edges: [ |
| | | // { |
| | | // source: "Auditing", |
| | | // sourceAnchor: 2, |
| | | // target: "Editing", |
| | | // targetAnchor: 0, |
| | | // id: "3083896f", |
| | | // index: 2, |
| | | // indexNum: 2, |
| | | // events: [ |
| | | // { |
| | | // eventFullName: |
| | | // "plm.bs.omd.lifecycle.server.pubimpl.TransationEvente", |
| | | // eventShowName: "TransationEventE", |
| | | // description: "", |
| | | // bizDomain: "mdm", |
| | | // oid: "5", |
| | | // creator: "", |
| | | // createTime: "", |
| | | // lastModifier: "", |
| | | // lastModifyTime: "", |
| | | // ts: "", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // source: "Editing", |
| | | // sourceAnchor: 2, |
| | | // target: "drg", |
| | | // targetAnchor: 0, |
| | | // id: "b941a21d", |
| | | // index: 4, |
| | | // indexNum: 4, |
| | | // events: [ |
| | | // { |
| | | // eventFullName: |
| | | // "plm.bs.omd.lifecycle.server.pubimpl.TransationEventf", |
| | | // eventShowName: "TransationEventF", |
| | | // description: "", |
| | | // bizDomain: "mdm", |
| | | // oid: "6", |
| | | // creator: "", |
| | | // createTime: "", |
| | | // lastModifier: "", |
| | | // lastModifyTime: "", |
| | | // ts: "", |
| | | // }, |
| | | // { |
| | | // eventFullName: |
| | | // "plm.bs.omd.lifecycle.server.pubimpl.TransationEvente", |
| | | // eventShowName: "TransationEventE", |
| | | // description: "", |
| | | // bizDomain: "mdm", |
| | | // oid: "5", |
| | | // creator: "", |
| | | // createTime: "", |
| | | // lastModifier: "", |
| | | // lastModifyTime: "", |
| | | // ts: "", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // ], |
| | | // }; |
| | | // API.add(data) |
| | | // .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; |
| | | // }); |
| | | // return; |
| | | const newRowData = await this.$refs.vueFlowchartEditor.getNewRowData(); |
| | | if (!newRowData) { |
| | | return; |
| | |
| | | ...newRowData, |
| | | ...flowData, |
| | | }; |
| | | debugger; |
| | | |
| | | this.submitLoading = true; |
| | | let APIFun = API.add; |
| | | if (this.type === "edit") { |
| | | APIFun = API.edit; |
| | | this.$delete(params, "id"); |
| | | // this.$delete(params, "id"); |
| | | } |
| | | APIFun(params) |
| | | .then((res) => { |