田源
2023-12-13 eb935ac81cfa4992629efb8494acbe02701e616a
Source/UBCS-WEB/src/views/statistic/statisticPage.vue
@@ -2,14 +2,14 @@
  <!--  新增右侧按钮-->
  <div>
    <div style=" display: flex; justify-content: flex-end;">
      <el-button plain type="primary" @click="addHandler">新增</el-button>
      <el-button plain type="primary" @click="addHandler">配置</el-button>
    </div>
    <!--  新增对话框-->
    <el-dialog
      :visible.sync="addVisible"
      append-to-body
      class="avue-dialog avue-dialog--top"
      title="新增数据统计分析"
      title="配置数据统计分析"
      top="-50px"
    >
      <el-table
@@ -37,7 +37,7 @@
              <el-option label="折线图" value="0"></el-option>
              <el-option label="饼状图" value="1"></el-option>
              <el-option label="柱状图" value="2"></el-option>
              <el-option label="柱状折线图" value="3"></el-option>
              <el-option label="堆叠折线图" value="3"></el-option>
            </el-select>
          </template>
        </el-table-column>
@@ -79,7 +79,7 @@
  name: "statisticPage",
  data() {
    return {
      menuList:[],
      menuList: [],
      dataKeyList: [],
      addVisible: false,
      chartName: "",
@@ -124,37 +124,12 @@
      this.dataKeyList = this.selectData.map(obj => obj.code)
      const btmName = this.dataKeyList.join(",");
      if (btmName) {
        // this.menuList=[
        //   {
        //     menuData: [
        //       [0, 0, 0, 0, 0, 0, 4, 9, 12, 12, 12, 12],
        //       [0, 0, 0, 0, 0, 0, 4, 5, 3, 0, 0, 0]
        //     ],
        //     code:1
        //   },
        //   {
        //     menuData: [
        //       [0, 0, 0, 1, 1, 1, 1, 1, 1, 29, 5315, 5315],
        //       [0, 0, 0, 1, 0, 0, 0, 0, 0, 28, 5286, 0]
        //     ],
        //     code:2
        //   },
        //   {
        //     menuData: [
        //       [0, 58, 60, 61, 75, 84, 145, 162, 166, 177, 186, 186],
        //       [0, 58, 2, 1, 14, 9, 61, 17, 4, 11, 9, 0]
        //     ],
        //     code:3
        //   }
        // ]
        // this.nextSave();
        // this.$message.success('保存成功')
        getStatisticAnalysis({btmNames: btmName}).then(res => {
          this.menuList = res.data.data;
          this.nextSave();
          this.$message.success('保存成功')
        });
      }else {
      } else {
        this.$message.warning('请选择数据!')
      }
    },
@@ -173,6 +148,10 @@
        const dataKey = typeList[item.codeType];
        if (dataKey) {
          this[dataKey].push(item);
          this[dataKey].forEach(res=>{
            console.log('this[dataKey]',this[dataKey])
            console.log('res',res)
          })
          hasValidData = true;
        }
      });