| | |
| | | </el-table-column> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button plain type="primary" @click="SaveHandler">保存</el-button> |
| | | <el-button plain type="primary" @click="SaveHandler" v-loading="BtnLoading">保存</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | name: "Statistic", |
| | | data() { |
| | | return { |
| | | BtnLoading: 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.BtnLoading = 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.BtnLoading = false; |
| | | this.loading = true; |
| | | this.FontInfo() |
| | | this.FontInfo(); |
| | | } |
| | | }) |
| | | } catch { |
| | | this.BtnLoading = false; |
| | | } |
| | | }, |
| | | MoreHandler() { |
| | | this.dialogTableVisible = true; |