modified: src/views/basic/param/index.vue
modified: src/views/common/param-mergeTemplate.vue
| | |
| | | this.getParamType() |
| | | this.rowSort() |
| | | this.rowCalc() |
| | | this.loading = false |
| | | }, |
| | | // beforeUpdate() { |
| | | // console.log("updated"); |
| | | // this.rowSort() |
| | | // this.rowCalc() |
| | | // this.loading = false |
| | | // }, |
| | | watch: { |
| | | tableData:{ |
| | | handler(old,newval){ |
| | | this.loading = true |
| | | // this.tableData=JSON.parse(JSON.stringify(this.tableTreeData)) |
| | | this.rowSort() |
| | | this.rowCalc() |
| | | this.loading = false |
| | | }, |
| | | deep: true |
| | | } |
| | | beforeUpdate() { |
| | | this.rowSort() |
| | | this.rowCalc() |
| | | }, |
| | | methods: { |
| | | //下载模板 |
| | |
| | | this.$refs.crud.rowDel(row, index) |
| | | }, |
| | | updateParam(row, index, done, loading) { |
| | | // console.log(row); |
| | | // this.formDisabled = true |
| | | let data = { |
| | | dict: '', |
| | | id: '', |
| | |
| | | })[0] |
| | | data.type=type.value |
| | | } |
| | | // console.log(data); |
| | | // return |
| | | putObj(data).then(res => { |
| | | if (res.data.data.code == 0) { |
| | | this.$message.success("更新成功") |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | addOrUpdateHandle(row) { |
| | | console.log("1111",row); |
| | | this.addOrUpdateVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.addOrUpdate.init(row == null ? null : row.id) |
| | |
| | | this.tableData = res.data.data.records |
| | | this.page.total = res.data.data.total |
| | | this.page.currentPage = res.data.data.records.pages |
| | | this.loading = false |
| | | }) |
| | | |
| | | }, |
| | | //动态合并方法 |
| | | rowCalc() { |
| | |
| | | <avue-crud |
| | | ref="crud" |
| | | class="l-mes" |
| | | rowKey="oneId" |
| | | rowKey="id" |
| | | :data="tableData" |
| | | :option="option" |
| | | :span-method="spanMethod" |
| | |
| | | this.rowCalc() |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },3000) |
| | | },1000) |
| | | }, |
| | | data(){ |
| | | return { |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | .avue-crud_menu{ |
| | | display: none; |
| | | } |
| | | .avue-crud .el-table th { |
| | | word-break: break-word; |
| | | color: rgba(102,102,102,1); |