| | |
| | | <template> |
| | | <basic-container class=""> |
| | | <avue-crud :data="data" :option="option" @refresh-change="gettableList" :table-loading="loading"> |
| | | <avue-crud :data="data" :option="option" @refresh-change="search" :table-loading="loading"> |
| | | <template slot-scope="scope" slot="menuLeft"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import API from '@/api/modeling/cycle' |
| | | import CycleFlow from "@/components/flow-cycle/flowchartEditor.vue"; |
| | | export default { |
| | | name: "cycle.vue", |
| | | components: { CycleFlow }, |
| | | data() { |
| | | return { |
| | | form: { |
| | | page: 1, |
| | | limit: 10 |
| | | }, |
| | | option: { |
| | | border: true, |
| | | align: "center", |
| | |
| | | addBtn: false, |
| | | column: [ |
| | | { |
| | | label: "编号", |
| | | prop: "id", |
| | | }, |
| | | { |
| | | label: "名称", |
| | | prop: "name", |
| | | }, |
| | | { |
| | | label: "标签", |
| | | prop: "label", |
| | | }, |
| | | { |
| | | label: "起始状态", |
| | | prop: "startState", |
| | | prop: "startStatusName", |
| | | }, |
| | | { |
| | | label: "描述", |
| | | prop: "remark", |
| | | prop: "description", |
| | | }, |
| | | ], |
| | | }, |
| | | data: [ |
| | | { |
| | | name: "我是name", |
| | | label: "我是label", |
| | | startState: "我是startState", |
| | | remark: "我是remark", |
| | | data: { |
| | | nodes: [ |
| | | { |
| | | type: "node", |
| | | size: "80*48", |
| | | shape: "flow-rect", |
| | | color: "#1890FF", |
| | | label: "Auditing", |
| | | x: 110.50303650877106, |
| | | y: 59.22389408123915, |
| | | id: "Auditing", |
| | | index: 0, |
| | | }, |
| | | { |
| | | type: "node", |
| | | size: "80*48", |
| | | shape: "flow-rect", |
| | | color: "#1890FF", |
| | | label: "Editing", |
| | | x: 120.87992069414531, |
| | | y: 156.76660542375714, |
| | | id: "Editing", |
| | | index: 1, |
| | | }, |
| | | { |
| | | type: "node", |
| | | size: "80*48", |
| | | shape: "flow-rect", |
| | | color: "#1890FF", |
| | | label: "Released", |
| | | x: 100.12615232339681, |
| | | y: 252.2339399292003, |
| | | id: "Released", |
| | | index: 2, |
| | | }, |
| | | ], |
| | | edges: [ |
| | | { |
| | | source: "Auditing", |
| | | sourceAnchor: 1, |
| | | target: "Released", |
| | | targetAnchor: 1, |
| | | }, |
| | | { |
| | | source: "Editing", |
| | | sourceAnchor: 3, |
| | | target: "Auditing", |
| | | targetAnchor: 3, |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | ], |
| | | // data: [ |
| | | // { |
| | | // name: "我是name", |
| | | // label: "我是label", |
| | | // startState: "我是startState", |
| | | // remark: "我是remark", |
| | | // data: { |
| | | // nodes: [ |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "Auditing", |
| | | // x: 110.50303650877106, |
| | | // y: 59.22389408123915, |
| | | // id: "Auditing", |
| | | // index: 0, |
| | | // }, |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "Editing", |
| | | // x: 120.87992069414531, |
| | | // y: 156.76660542375714, |
| | | // id: "Editing", |
| | | // index: 1, |
| | | // }, |
| | | // { |
| | | // type: "node", |
| | | // size: "80*48", |
| | | // shape: "flow-rect", |
| | | // color: "#1890FF", |
| | | // label: "Released", |
| | | // x: 100.12615232339681, |
| | | // y: 252.2339399292003, |
| | | // id: "Released", |
| | | // index: 2, |
| | | // }, |
| | | // ], |
| | | // edges: [ |
| | | // { |
| | | // source: "Auditing", |
| | | // sourceAnchor: 1, |
| | | // target: "Released", |
| | | // targetAnchor: 1, |
| | | // }, |
| | | // { |
| | | // source: "Editing", |
| | | // sourceAnchor: 3, |
| | | // target: "Auditing", |
| | | // targetAnchor: 3, |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // }, |
| | | // ], |
| | | title: "预览生命周期流程图", |
| | | visible: false, |
| | | flowChartNodeItems: [], |
| | | rowData: {}, |
| | | dialogWidth: "50%", |
| | | type: "detail", |
| | | loading: false |
| | | }; |
| | | }, |
| | | created() { |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | gettableList() { |
| | | search() { |
| | | this.loading = true |
| | | API.getList(this.form).then(res => { |
| | | this.loading = false |
| | | this.data = res.data.data |
| | | }) |
| | | }, |
| | | openDialog(type, row) { |
| | | if (type === "detail") { |