| | |
| | | <el-form-item class="btn-group"> |
| | | <el-button type="" @click="onSearch">查询</el-button> |
| | | <el-button type="primary" @click="addOrUpdateHandle">新增</el-button> |
| | | <el-button @click="showImportDialog">导入</el-button> |
| | | <el-button type="primary" @click="showImportDialog">导入</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | created() { |
| | | this.loading = true |
| | | this.getData() |
| | | this.getParamType() |
| | | }, |
| | | beforeUpdate() { |
| | | console.log("updated"); |
| | | this.rowSort() |
| | | this.rowCalc() |
| | | this.loading = false |
| | | }, |
| | | watch: {}, |
| | | beforeUpdate() { |
| | | this.rowSort() |
| | | this.rowCalc() |
| | | }, |
| | | methods: { |
| | | //下载模板 |
| | | downloadTemplate() { |
| | |
| | | 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() { |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | .grid-header { |
| | | /* .grid-header { |
| | | display: none; |
| | | } |
| | | } */ |
| | | |
| | | .param-basic { |
| | | margin: 0 10px; |