| | |
| | | @click="handleMaintenance(row, index)">维护</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="模板阶段" width="50%" append-to-body="true" :visible.sync="dialogNode"> |
| | | <el-dialog title="模板阶段" width="50%" append-to-body="true" :visible.sync="dialogNode"> |
| | | <avue-crud ref="crud" :table-loading="loading" :data="stageData" :option="stageOption" @on-load="getStagelist" |
| | | @row-click="handleRowStageClick"> |
| | | <template slot-scope="{type,size,row,index}" slot="menu"> |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | code: { |
| | | handler(newval, oldval) { |
| | | this.getDataList() |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | const options = { |
| | |
| | | }, |
| | | stageOption: { |
| | | ...options, |
| | | height:620, |
| | | column: [ |
| | | { label: '阶段编号', prop: 'taskId' }, |
| | | { label: '阶段名称', prop: 'taskName' }, |
| | |
| | | }, |
| | | // 获取列表 |
| | | async getDataList() { |
| | | this.loading = false |
| | | const { pageSize, currentPage } = this.page |
| | | let param = { size: pageSize, current: currentPage } |
| | | const response = await getFlowpathList({ ...param, ...{ templateId: this.code } }) |
| | | this.loading = false |
| | | if (this.code) { |
| | | const {pageSize, currentPage} = this.page |
| | | let param = {size: pageSize, current: currentPage} |
| | | const response = await getFlowpathList({...param, ...{templateId: this.code}}) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.loading = false |
| | | const data = response.data.data |
| | | this.data = data.records |
| | | this.page.total = data.total |
| | | console.log(response) |
| | | this.loading = false |
| | | const data = response.data.data |
| | | this.data = data.records |
| | | this.page.total = data.total |
| | | } else this.loading = false |
| | | } |
| | | }, |
| | | // 获取阶段列表 |
| | | async getStagelist() { |
| | |
| | | item = { oid, id, name, attributeGroup, ...{ checked: false } } |
| | | if (dataRight.length !== 0) { |
| | | dataRight.forEach(element => { if (item.id === element.attrId) item.checked = true }); |
| | | return item |
| | | } |
| | | return item |
| | | }) |
| | | console.log(datas) |
| | | let dataValue = datas.map(item => item.checked ? item.oid : undefined) |
| | | this.attributeValue = dataValue.filter(item => item) |
| | | this.attributeData = datas |
| | |
| | | handleMaintenance(row) { |
| | | console.log(row) |
| | | this.dialogNode = true |
| | | this.modelKey = row.modelKey |
| | | this.saveParam.modelKey = row.modelKey |
| | | this.getStagelist() |
| | | }, |
| | | // 维护 |
| | | handleMaintenanceTransfer(row) { |
| | | this.saveParam.taskId = row.taskId |
| | | this.saveParam.taskName = row.taskName |