| | |
| | | <template> |
| | | <div> |
| | | <div v-if="Formlist.length>0"> |
| | | <avue-crud ref="crud" :table-loading="loading" :data="data" :option="option" :page.sync="page" |
| | | @on-load="getDataList" @size-change="handleSizePage" @current-change="handleCurrentPage" |
| | | @row-click="handleRowClick"> |
| | |
| | | typeof: String, |
| | | required: true, |
| | | default: "" |
| | | } |
| | | }, |
| | | Formlist:{ |
| | | type:Array, |
| | | default:[] |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | code: { |
| | | handler(newval, oldval) { |
| | | this.getDataList() |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | const options = { |
| | |
| | | ], |
| | | option: { |
| | | ...options, |
| | | height: 383, |
| | | column: [ |
| | | { label: '模板编号', prop: 'modelKey' }, |
| | | { label: '模板名称', prop: 'modelName' }, |
| | |
| | | }, |
| | | // 获取列表 |
| | | 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 |
| | | }else { |
| | | this.data=[] |
| | | } |
| | | }, |
| | | // 获取阶段列表 |
| | | async getStagelist() { |