| | |
| | | top='-40px'> |
| | | <el-table |
| | | ref="TableBox" |
| | | v-loading="TableLoading" |
| | | :data="Crud.data" |
| | | border |
| | | style="width: 100%" |
| | |
| | | name: "Statistic", |
| | | data() { |
| | | return { |
| | | TableLoading: false, |
| | | loading: true, |
| | | Crud: { |
| | | form: '', |
| | |
| | | // console.log(row) |
| | | this.SelectRow = row; |
| | | }, |
| | | SaveHandler() { |
| | | async SaveHandler() { |
| | | if (this.SelectRow.length <= 0) { |
| | | this.$message.warning('请选择一条数据!') |
| | | return |
| | | this.$message.warning('请选择一条数据!'); |
| | | return; |
| | | } |
| | | let mdmNameList = []; |
| | | mdmNameList = this.SelectRow.map(item => { |
| | | return item.code |
| | | }) |
| | | console.log(mdmNameList) |
| | | save(this.userId, mdmNameList).then(res => { |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | this.$message.success('保存成功!') |
| | | //清除已有数组中push数据 |
| | | this.TableLoading = true; |
| | | try { |
| | | const {data: {code}} = await save(this.userId, this.SelectRow.map(item => item.code)); |
| | | if (code === 200) { |
| | | this.$message.success('保存成功!'); |
| | | this.newData = []; |
| | | this.option.data = [] |
| | | this.MasterGetList() |
| | | this.option.data = []; |
| | | this.MasterGetList(); |
| | | this.dialogTableVisible = false; |
| | | //字体和边框重新加载 |
| | | this.TableLoading = false; |
| | | this.loading = true; |
| | | this.FontInfo() |
| | | this.FontInfo(); |
| | | } |
| | | }) |
| | | } catch { |
| | | this.TableLoading = false; |
| | | } |
| | | }, |
| | | MoreHandler() { |
| | | this.dialogTableVisible = true; |