xiejun
2023-11-22 47482f386cefd756e1d1a745a5b13949fd709c77
Source/UBCS-WEB/src/views/wel/Statistic.vue
@@ -53,7 +53,7 @@
        </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>
@@ -66,6 +66,7 @@
  name: "Statistic",
  data() {
    return {
      BtnLoading: false,
      loading: true,
      Crud: {
        form: '',
@@ -120,30 +121,27 @@
      // 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;