田源
2023-10-18 774fcb60353630456f851f45bb33f7e0592e376e
整合代码
已修改1个文件
26 ■■■■ 文件已修改
Source/UBCS-WEB/src/views/wel/Statistic.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/wel/Statistic.vue
@@ -1,22 +1,20 @@
<template>
  <div>
      <div style="display: flex; justify-content: flex-end;margin-bottom: 10px">
        <el-button icon="el-icon-more" type="primary" plain size="small" @click="MoreHandler">更多</el-button>
      <el-button icon="el-icon-more" plain size="small" type="primary" @click="MoreHandler">更多</el-button>
    </div>
    <avue-data-box :option="option" :animation="true">
      <template>
        <el-switch></el-switch>
      </template>
    </avue-data-box>
    <el-dialog title="主数据配置" :visible.sync="dialogTableVisible" append-to-body class="avue-dialog avue-dialog--top" top="0">
    <avue-data-box :animation="true" :option="option"></avue-data-box>
<!--      <avue-data-panel :animation="true":option="option"></avue-data-panel>-->
    <el-dialog :visible.sync="dialogTableVisible" append-to-body class="avue-dialog avue-dialog--top" title="主数据配置"
               top="0">
      <avue-crud ref="crud"
                 v-model="Crud.form"
                 :data="Crud.data"
                 @selection-change="selectionChange"
                 :option="Crud.option">
                 :option="Crud.option"
                 @selection-change="selectionChange">
      </avue-crud>
      <div slot="footer" class="dialog-footer">
        <el-button  type="primary" plain @click="SaveHandler">保存</el-button>
        <el-button plain type="primary" @click="SaveHandler">保存</el-button>
      </div>
    </el-dialog>
  </div>
@@ -102,20 +100,23 @@
        return
      }
      let mdmNameList=[];
      mdmNameList=this.SelectRow.map(item=>{return item.code})
      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('保存成功!')
          this.option.data=[];
          this.newData=[];
          this.MasterGetList()
          this.dialogTableVisible=false;
        }
      })
    },
    MoreHandler(){
      this.dialogTableVisible=true
      this.dialogTableVisible = true;
    },
    // 随机色
    randomColor() {
@@ -130,6 +131,7 @@
      this.userId = localStorage.getItem('userId');
      getList({ userId: this.userId }).then(res => {
        res.data.data.filter(item => {
          // console.log(item.icon)
          if (item.isDefault === 1) {
            this.hexColor = this.randomColor();
            this.option.data.push({