whychw
2020-10-17 de4996e849025b78c5ce7753404754f01156f857
U 负载及水冷 添加导出
13个文件已修改
2个文件已删除
896 ■■■■■ 已修改文件
src/assets/css/common.css 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/m-element-ui.css 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/script/draw_general.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/About.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Home.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/chargePower/main.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/loadManager/autoload.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/loadManager/burstload.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/loadManager/mainload.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/loadManager/manualload.vue 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/motor/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rectifier/main.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/waterCooling/index1.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/waterCooling/index2.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/waterCooling/index3.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/common.css
@@ -203,6 +203,10 @@
.w_18em {width: 18em;}
.w_19em {width: 19em;}
.w_20em {width: 20em;}
.pr_o4em {padding-right: .4em;}
.pr_o6em {padding-right: .6em;}
.pr_o8em {padding-right: .8em;}
.pr_1em {padding-right: 1em;}
/* home state */
.home-state {
    color: #47F030;
src/assets/css/m-element-ui.css
@@ -343,6 +343,12 @@
    line-height: 0.32rem;
}
.el-dialog {
    color: #333;
}
.dialog-bg {
    color: #fff;
}
/**
 * 弹窗中表格隔行变色
 */
src/script/draw_general.js
@@ -431,7 +431,7 @@
  can.drawBatt({
    startX: 760
    ,startY: 250
    ,label: '电池组1'
    ,label: '1#蓄电池组'
    ,noDraw: true
    ,cbfn_click: function () {
      window.open('/DyEnvir_system/big_screen/index.html#/?idx=0', '_self');
@@ -440,7 +440,7 @@
  can.drawBatt({
    startX: 760
    ,startY: 380
    ,label: '电池组2'
    ,label: '2#蓄电池组'
    ,noDraw: true
    ,cbfn_click: function () {
      window.open('/DyEnvir_system/big_screen/index.html#/?idx=1', '_self');
@@ -449,7 +449,7 @@
  can.drawBatt({
    startX: 760
    ,startY: 510
    ,label: '电池组3'
    ,label: '3#蓄电池组'
    ,noDraw: true
    ,cbfn_click: function () {
      window.open('/DyEnvir_system/big_screen/index.html#/?idx=2', '_self');
@@ -458,7 +458,7 @@
  can.drawBatt({
    startX: 760
    ,startY: 640
    ,label: '电池组4'
    ,label: '4#蓄电池组'
    ,noDraw: true
    ,cbfn_click: function () {
      window.open('/DyEnvir_system/big_screen/index.html#/?idx=3', '_self');
@@ -853,25 +853,25 @@
  can.drawBatt({
    startX: 760
    ,startY: 250
    ,label: '电池组1'
    ,label: '1#蓄电池组'
    ,noDraw: status.batt1 && flag
  });
  can.drawBatt({
    startX: 760
    ,startY: 380
    ,label: '电池组2'
    ,label: '2#蓄电池组'
    ,noDraw: status.batt2 && flag
  });
  can.drawBatt({
    startX: 760
    ,startY: 510
    ,label: '电池组3'
    ,label: '3#蓄电池组'
    ,noDraw: status.batt3 && flag
  });
  can.drawBatt({
    startX: 760
    ,startY: 640
    ,label: '电池组4'
    ,label: '4#蓄电池组'
    ,noDraw: status.batt4 && flag
  });
}
src/views/About.vue
File was deleted
src/views/Home.vue
File was deleted
src/views/chargePower/main.vue
@@ -833,7 +833,7 @@
    ,getProgress () {
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = Number(res.data[0].toFixed(0));
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
src/views/loadManager/autoload.vue
@@ -3,7 +3,7 @@
    <!-- <div class="title vertical_middle">负载柜自动加载画面</div> -->
    <div class="flex_contain">
      <div class="item" v-for="(item, index) in list" :key="index">
        <div class="item_title vertical_middle">{{item.dev_name}}</div>
        <div class="item_title vertical_middle">{{item.dev_name}}<div class="btn_3d btn_export" @click="exportData(item)">数据导出</div></div>
        <!-- 按钮组 -->
        <div class="item_btn_grp">
          <div class="vertical_middle">
@@ -133,19 +133,58 @@
        <el-button type="primary" @click="callBack">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 导出数据弹窗 -->
    <el-dialog
      title="数据导出"
      :visible.sync="exportDialogVisible"
      width="400px" >
      <label class="pr_o6em">选择日期</label>
      <el-date-picker
        v-model="export_date"
        value-format="yyyy-MM-dd"
        type="date"
        size="small"
        :picker-options="pickerOptions"
        placeholder="选择日期" >
      </el-date-picker>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportDialogVisible = false">关 闭</el-button>
        <el-button type="primary" @click="exportCsv">导 出</el-button>
      </span>
    </el-dialog>
    <progress-load
      :show="progress.show"
      :percentage="progress.value"
      :text="progress.text"></progress-load>
  </div>
</template>
<script>
import FlexLayout from '@/components/FlexLayout'
import ProgressLoad from '@/components/ProgressLoad'
export default {
  name: 'AutoLoad',
  components: {
    FlexLayout
    ,ProgressLoad
  },
  data () {
    return {
      progress: {
        show: false,
        value: 0,
        text: '',
      },
      export_id: 0,
      export_name: '',
      exportDialogVisible: false,
      export_date: new Date().format('yyyy-MM-dd'),
      pickerOptions: {
        disabledDate (data) {
          return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30;
        }
      },
      confirmTxt: '',
      confirmVisible: false,
      cbFn: null,
@@ -446,6 +485,81 @@
        console.warn(error);
      });
    }
    // 数据导出
    ,exportData (obj) {
      console.log('数据导出');
      this.export_id = obj.dev_id;
      this.export_name = obj.dev_name;
      this.exportDialogVisible = true;
    }
    ,getProgress () {
      this.exportDialogVisible = false;
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
          this.progress.text="数据加载中...";
        }else {
          this.progress.text="文件下载中...";
        }
        if(res.data<100 && this.progress.show) {
          setTimeout(this.getProgress, 50);
        }else {
          this.progress.value = 100;
        }
      });
    }
    ,exportCsv () {
      let param = {
        dev_name: this.export_name,
        dev_id: this.export_id,
        export_num: 1,
        table_name: this.export_date.replace(/-/g, '_'),
        record_time: this.export_date + " 00:00:00"
      };
      console.log(param, 'param');
      // 显示进度条
      this.progress.show = true;
      // 请求后台
      this.$api.common.clearProgress().then(() => {
        this.getProgress();
        this.$api.common.download(param).then((res) => {
          res = JSON.parse(res.data.result);
          // console.log(res, 'download res');
          if(res.code == 1) {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            let data = res.data[0];
            const link = document.createElement("a");
            link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName);
            link.download = data.fileName;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
          setTimeout(()=>{
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
          }, 1000);
          }else {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            this.$layer.msg('生成文件失败!');
          }
        }).catch(error=>{
          // 关闭进度条
          this.progress.show = false;
          this.progress.value = 0;
          this.$layer.msg('生成文件失败!');
          console.warn(error);
        });
      });
    }
  },
  mounted () {
    this.getInfo().then(() => {
@@ -726,4 +840,7 @@
      text-decoration: underline;
      font-weight: bolder;
    }
    .btn_3d.btn_export {
      margin-left: 1em;
    }
</style>
src/views/loadManager/burstload.vue
@@ -8,7 +8,7 @@
    <div class="flex_contain">
      <div class="item" v-for="(item, itemIndex) in list" :key="itemIndex">
        <!-- 柜名 -->
        <div class="item_title vertical_middle">{{item.dev_name}}</div>
        <div class="item_title vertical_middle">{{item.dev_name}}<div class="btn_3d btn_export" @click="exportData(item)">数据导出</div></div>
        <!-- 按钮组 -->
        <div class="item_btn_grp">
          <div class="vertical_middle">
@@ -103,19 +103,58 @@
        <el-button type="primary" @click="callBack">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 导出数据弹窗 -->
    <el-dialog
      title="数据导出"
      :visible.sync="exportDialogVisible"
      width="400px" >
      <label class="pr_o6em">选择日期</label>
      <el-date-picker
        v-model="export_date"
        value-format="yyyy-MM-dd"
        type="date"
        size="small"
        :picker-options="pickerOptions"
        placeholder="选择日期" >
      </el-date-picker>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportDialogVisible = false">关 闭</el-button>
        <el-button type="primary" @click="exportCsv">导 出</el-button>
      </span>
    </el-dialog>
    <progress-load
      :show="progress.show"
      :percentage="progress.value"
      :text="progress.text"></progress-load>
  </div>
</template>
<script>
import FlexLayout from '@/components/FlexLayout'
import ProgressLoad from '@/components/ProgressLoad'
export default {
  name: 'BurstLoad',
  components: {
    FlexLayout
    ,ProgressLoad
  },
  data () {
    return {
      progress: {
        show: false,
        value: 0,
        text: '',
      },
      export_id: 0,
      export_name: '',
      exportDialogVisible: false,
      export_date: new Date().format('yyyy-MM-dd'),
      pickerOptions: {
        disabledDate (data) {
          return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30;
        }
      },
      confirmTxt: '',
      confirmVisible: false,
      cbFn: null,
@@ -394,6 +433,81 @@
        console.warn(error);
      });
    }
    // 数据导出
    ,exportData (obj) {
      console.log('数据导出');
      this.export_id = obj.dev_id;
      this.export_name = obj.dev_name;
      this.exportDialogVisible = true;
    }
    ,getProgress () {
      this.exportDialogVisible = false;
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
          this.progress.text="数据加载中...";
        }else {
          this.progress.text="文件下载中...";
        }
        if(res.data<100 && this.progress.show) {
          setTimeout(this.getProgress, 50);
        }else {
          this.progress.value = 100;
        }
      });
    }
    ,exportCsv () {
      let param = {
        dev_name: this.export_name,
        dev_id: this.export_id,
        export_num: 1,
        table_name: this.export_date.replace(/-/g, '_'),
        record_time: this.export_date + " 00:00:00"
      };
      console.log(param, 'param');
      // 显示进度条
      this.progress.show = true;
      // 请求后台
      this.$api.common.clearProgress().then(() => {
        this.getProgress();
        this.$api.common.download(param).then((res) => {
          res = JSON.parse(res.data.result);
          // console.log(res, 'download res');
          if(res.code == 1) {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            let data = res.data[0];
            const link = document.createElement("a");
            link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName);
            link.download = data.fileName;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
            setTimeout(()=>{
              // 关闭进度条
              this.progress.show = false;
              this.progress.value = 0;
            }, 1000);
          }else {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            this.$layer.msg('生成文件失败!');
          }
        }).catch(error=>{
          // 关闭进度条
          this.progress.show = false;
          this.progress.value = 0;
          this.$layer.msg('生成文件失败!');
          console.warn(error);
        });
      });
    }
  },
  mounted () {
    this.getInfo().then(() => {
@@ -641,4 +755,7 @@
    text-decoration: underline;
    font-weight: bolder;
  }
  .btn_3d.btn_export {
    margin-left: 1em;
  }
</style>
src/views/loadManager/mainload.vue
@@ -4,7 +4,7 @@
    <div class="flex_contain">
      <div class="item" v-for="(item, index) in list" :key="index">
        <!-- 柜名 -->
        <div class="name vertical_middle">{{item.dev_name}}</div>
        <div class="name vertical_middle">{{item.dev_name}}<div class="btn_3d btn_export" @click="exportData(item)">数据导出</div></div>
        <!-- 是否允许合闸 -->
        <div class="info_voltage">
          <div class="lay_label vertical_middle">
@@ -124,19 +124,61 @@
        <div class="btn_3d" @click="goTo('/load/burst')">突加突卸</div>
      </div>
    </div>
    <!-- 导出数据弹窗 -->
    <el-dialog
      title="数据导出"
      :visible.sync="exportDialogVisible"
      width="400px" >
      <label class="pr_o6em">选择日期</label>
      <el-date-picker
        v-model="export_date"
        value-format="yyyy-MM-dd"
        type="date"
        size="small"
        :picker-options="pickerOptions"
        placeholder="选择日期" >
      </el-date-picker>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportDialogVisible = false">关 闭</el-button>
        <el-button type="primary" @click="exportCsv">导 出</el-button>
      </span>
    </el-dialog>
    <progress-load
      :show="progress.show"
      :percentage="progress.value"
      :text="progress.text"></progress-load>
    <!-- ROOTEND -->
  </div>
</template>
<script>
import ProgressLoad from '@/components/ProgressLoad'
export default {
  name: 'MainLoad',
  components: {
    ProgressLoad
  },
  data () {
    return {
      timer: new this.$common.Timeout(),
      progress: {
        show: false,
        value: 0,
        text: '',
      },
      export_id: 0,
      export_name: '',
      exportDialogVisible: false,
      export_date: new Date().format('yyyy-MM-dd'),
      info: [],
      list: []
      list: [],
      pickerOptions: {
        disabledDate (data) {
          return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30;
        }
      }
    }
  },
  methods: {
@@ -180,6 +222,81 @@
        this.getStatus();
        this.timer.open();
      }, 1000);
    }
    // 数据导出
    ,exportData (obj) {
      console.log('数据导出');
      this.export_id = obj.dev_id;
      this.export_name = obj.dev_name;
      this.exportDialogVisible = true;
    }
    ,getProgress () {
      this.exportDialogVisible = false;
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
          this.progress.text="数据加载中...";
        }else {
          this.progress.text="文件下载中...";
        }
        if(res.data<100 && this.progress.show) {
          setTimeout(this.getProgress, 50);
        }else {
          this.progress.value = 100;
        }
      });
    }
    ,exportCsv () {
      let param = {
        dev_name: this.export_name,
        dev_id: this.export_id,
        export_num: 1,
        table_name: this.export_date.replace(/-/g, '_'),
        record_time: this.export_date + " 00:00:00"
      };
      console.log(param, 'param');
      // 显示进度条
      this.progress.show = true;
      // 请求后台
      this.$api.common.clearProgress().then(() => {
        this.getProgress();
        this.$api.common.download(param).then((res) => {
          res = JSON.parse(res.data.result);
          // console.log(res, 'download res');
          if(res.code == 1) {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            let data = res.data[0];
            const link = document.createElement("a");
            link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName);
            link.download = data.fileName;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
          setTimeout(()=>{
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
          }, 1000);
          }else {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            this.$layer.msg('生成文件失败!');
          }
        }).catch(error=>{
          // 关闭进度条
          this.progress.show = false;
          this.progress.value = 0;
          this.$layer.msg('生成文件失败!');
          console.warn(error);
        });
      });
    }
  },
  mounted () {
@@ -397,4 +514,7 @@
  .footer .btn-grp .btn_3d {
    padding: 6px 16px;
  }
  .btn_3d.btn_export {
    margin-left: 1em;
  }
</style>
src/views/loadManager/manualload.vue
@@ -8,6 +8,7 @@
          <div class="lay_label vertical_middle">{{item.dev_name}}</div>
          <div class="lay_content vertical_middle">
            <div class="btn_3d" v-btn-confirm="handleConfirm" data-fn="switchOff" data-confirmTxt="全部分闸确认" :param="JSON.stringify(['CONTEXT.list[' + index + ']'])">全部分闸</div>
            <div class="btn_3d btn_export" @click="exportData(item)">数据导出</div>
          </div>
        </div>
       <!-- 是否允许合闸 -->
@@ -107,15 +108,57 @@
        <el-button type="primary" @click="callBack">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 导出数据弹窗 -->
    <el-dialog
      title="数据导出"
      :visible.sync="exportDialogVisible"
      width="400px" >
      <label class="pr_o6em">选择日期</label>
      <el-date-picker
        v-model="export_date"
        value-format="yyyy-MM-dd"
        type="date"
        size="small"
        :picker-options="pickerOptions"
        placeholder="选择日期" >
      </el-date-picker>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportDialogVisible = false">关 闭</el-button>
        <el-button type="primary" @click="exportCsv">导 出</el-button>
      </span>
    </el-dialog>
    <progress-load
      :show="progress.show"
      :percentage="progress.value"
      :text="progress.text"></progress-load>
  </div>
</template>
<script>
import ProgressLoad from '@/components/ProgressLoad'
export default {
  name: 'ManualLoad',
  components: {
    ProgressLoad
  },
  data () {
    return {
      progress: {
        show: false,
        value: 0,
        text: '',
      },
      export_id: 0,
      export_name: '',
      exportDialogVisible: false,
      export_date: new Date().format('yyyy-MM-dd'),
      pickerOptions: {
        disabledDate (data) {
          return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30;
        }
      },
      confirmTxt: '',
      confirmVisible: false,
      cbFn: null,
@@ -371,6 +414,81 @@
            }
        }, 100);
      }
    }
    // 数据导出
    ,exportData (obj) {
      console.log('数据导出');
      this.export_id = obj.dev_id;
      this.export_name = obj.dev_name;
      this.exportDialogVisible = true;
    }
    ,getProgress () {
      this.exportDialogVisible = false;
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
          this.progress.text="数据加载中...";
        }else {
          this.progress.text="文件下载中...";
        }
        if(res.data<100 && this.progress.show) {
          setTimeout(this.getProgress, 50);
        }else {
          this.progress.value = 100;
        }
      });
    }
    ,exportCsv () {
      let param = {
        dev_name: this.export_name,
        dev_id: this.export_id,
        export_num: 1,
        table_name: this.export_date.replace(/-/g, '_'),
        record_time: this.export_date + " 00:00:00"
      };
      console.log(param, 'param');
      // 显示进度条
      this.progress.show = true;
      // 请求后台
      this.$api.common.clearProgress().then(() => {
        this.getProgress();
        this.$api.common.download(param).then((res) => {
          res = JSON.parse(res.data.result);
          // console.log(res, 'download res');
          if(res.code == 1) {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            let data = res.data[0];
            const link = document.createElement("a");
            link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName);
            link.download = data.fileName;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
          setTimeout(()=>{
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
          }, 1000);
          }else {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            this.$layer.msg('生成文件失败!');
          }
        }).catch(error=>{
          // 关闭进度条
          this.progress.show = false;
          this.progress.value = 0;
          this.$layer.msg('生成文件失败!');
          console.warn(error);
        });
      });
    }
  },
  mounted () {
@@ -740,5 +858,7 @@
    clip: rect(0 4px 64px 0);
  }
}
.btn_3d.btn_export {
  margin-left: 1em;
}
</style>
src/views/motor/index.vue
@@ -1144,7 +1144,7 @@
    ,getProgress () {
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = Number(res.data[0].toFixed(0));
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
src/views/rectifier/main.vue
@@ -809,7 +809,7 @@
    ,getProgress () {
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = Number(res.data[0].toFixed(0));
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
src/views/waterCooling/index1.vue
@@ -4,6 +4,7 @@
    <div class="btn-group">
      <div class="btn_3d" @click="toWater(2)">切换到2号水冷装置</div>
      <div class="btn_3d" @click="toWater(3)">切换到3号水冷装置</div>
      <div class="btn_3d" @click="exportData">数据导出</div>
      <div class="btn_3d btn-toggle" @click="changeStatus">{{showTable ? '显示运行图' : '显示表格'}}</div>
    </div>
    <div class="page_content" :class="{'turn_end': showTable}">
@@ -82,7 +83,7 @@
        </div>
      </div>
    </div>
    <rotate-menu class="menu_contain">
    <!-- <rotate-menu class="menu_contain">
      <div class="main posA_full">菜单</div>
      <ul class="menu" slot="sub">
          <li v-if="!flag"><div class="btn" @click="start">就地启动</div></li>
@@ -93,17 +94,41 @@
          <li><div class="btn" @click="go('/watercooling/alarmhis/9')">历史报警</div></li>
          <li><div class="btn" @click="go('/watercooling/systemsettings/9')">系统设定</div></li>
      </ul>
    </rotate-menu>
    </rotate-menu> -->
    <!-- 导出数据弹窗 -->
    <el-dialog
      title="数据导出"
      :visible.sync="exportDialogVisible"
      width="400px" >
      <label class="pr_o6em">选择日期</label>
      <el-date-picker
        v-model="export_date"
        value-format="yyyy-MM-dd"
        type="date"
        size="small"
        :picker-options="pickerOptions"
        placeholder="选择日期" >
      </el-date-picker>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportDialogVisible = false">关 闭</el-button>
        <el-button type="primary" @click="exportCsv">导 出</el-button>
      </span>
    </el-dialog>
    <progress-load
      :show="progress.show"
      :percentage="progress.value"
      :text="progress.text"></progress-load>
  </div>
</template>
<script>
import RotateMenu from '@/components/RotateMenu';
// import RotateMenu from '@/components/RotateMenu';
import ScienceBox from '../../components/ScienceBox'
import EleCircle from '@/script/drawplus'
import draw from '@/script/draw_water_cooling';
import AssembleTable from '@/components/AssembleTable';
import type from '@/script/config_water';
import ProgressLoad from '@/components/ProgressLoad'
let can, can1, resizeHandler;
// 临时存放格式化后的表格数据
@@ -127,12 +152,25 @@
export default {
  name: 'WaterCooling',
  components: {
    RotateMenu,
    // RotateMenu,
    ScienceBox,
    AssembleTable
    ,ProgressLoad
  },
  data () {
    return {
      progress: {
        show: false,
        value: 0,
        text: '',
      },
      exportDialogVisible: false,
      export_date: new Date().format('yyyy-MM-dd'),
      pickerOptions: {
        disabledDate (data) {
          return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30;
        }
      },
      tlist: {
        rtData: [],
        branchData: [],
@@ -678,6 +716,79 @@
          // draw.update1(can1, this.G_status);
      }, 1000);
    }
    // 数据导出
    ,exportData () {
      console.log('数据导出');
      this.exportDialogVisible = true;
    }
    ,getProgress () {
      this.exportDialogVisible = false;
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
          this.progress.text="数据加载中...";
        }else {
          this.progress.text="文件下载中...";
        }
        if(res.data<100 && this.progress.show) {
          setTimeout(this.getProgress, 50);
        }else {
          this.progress.value = 100;
        }
      });
    }
    ,exportCsv () {
      let param = {
        dev_name: '1号水冷装置',
        dev_id: water_id,
        export_num: 5,
        table_name: this.export_date.replace(/-/g, '_'),
        record_time: this.export_date + " 00:00:00"
      };
      console.log(param, 'param');
      // 显示进度条
      this.progress.show = true;
      // 请求后台
      this.$api.common.clearProgress().then(() => {
        this.getProgress();
        this.$api.common.download(param).then((res) => {
          res = JSON.parse(res.data.result);
          // console.log(res, 'download res');
          if(res.code == 1) {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            let data = res.data[0];
            const link = document.createElement("a");
            link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName);
            link.download = data.fileName;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
          setTimeout(()=>{
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
          }, 1000);
          }else {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            this.$layer.msg('生成文件失败!');
          }
        }).catch(error=>{
          // 关闭进度条
          this.progress.show = false;
          this.progress.value = 0;
          this.$layer.msg('生成文件失败!');
          console.warn(error);
        });
      });
    }
  },
  mounted () {
    const $container = this.$refs.container;
src/views/waterCooling/index2.vue
@@ -4,6 +4,7 @@
    <div class="btn-group">
      <div class="btn_3d" @click="toWater(1)">切换到1号水冷装置</div>
      <div class="btn_3d" @click="toWater(3)">切换到3号水冷装置</div>
      <div class="btn_3d" @click="exportData">数据导出</div>
      <div class="btn_3d btn-toggle" @click="changeStatus">{{showTable ? '显示运行图' : '显示表格'}}</div>
    </div>
    <div class="page_content" :class="{'turn_end': showTable}">
@@ -82,7 +83,7 @@
        </div>
      </div>
    </div>
    <rotate-menu class="menu_contain">
    <!-- <rotate-menu class="menu_contain">
      <div class="main posA_full">菜单</div>
      <ul class="menu" slot="sub">
          <li v-if="!flag"><div class="btn" @click="start">就地启动</div></li>
@@ -93,17 +94,41 @@
          <li><div class="btn" @click="go('/watercooling/alarmhis/9')">历史报警</div></li>
          <li><div class="btn" @click="go('/watercooling/systemsettings/9')">系统设定</div></li>
      </ul>
    </rotate-menu>
    </rotate-menu> -->
    <!-- 导出数据弹窗 -->
    <el-dialog
      title="数据导出"
      :visible.sync="exportDialogVisible"
      width="400px" >
      <label class="pr_o6em">选择日期</label>
      <el-date-picker
        v-model="export_date"
        value-format="yyyy-MM-dd"
        type="date"
        size="small"
        :picker-options="pickerOptions"
        placeholder="选择日期" >
      </el-date-picker>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportDialogVisible = false">关 闭</el-button>
        <el-button type="primary" @click="exportCsv">导 出</el-button>
      </span>
    </el-dialog>
    <progress-load
      :show="progress.show"
      :percentage="progress.value"
      :text="progress.text"></progress-load>
  </div>
</template>
<script>
import RotateMenu from '@/components/RotateMenu';
// import RotateMenu from '@/components/RotateMenu';
import ScienceBox from '../../components/ScienceBox'
import EleCircle from '@/script/drawplus'
import draw from '@/script/draw_water_cooling';
import AssembleTable from '@/components/AssembleTable';
import type from '@/script/config_water';
import ProgressLoad from '@/components/ProgressLoad'
let can, can1, resizeHandler;
// 临时存放格式化后的表格数据
@@ -127,12 +152,25 @@
export default {
  name: 'WaterCooling',
  components: {
    RotateMenu,
    // RotateMenu,
    ScienceBox,
    AssembleTable
    ,ProgressLoad
  },
  data () {
    return {
      progress: {
        show: false,
        value: 0,
        text: '',
      },
      exportDialogVisible: false,
      export_date: new Date().format('yyyy-MM-dd'),
      pickerOptions: {
        disabledDate (data) {
          return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30;
        }
      },
      tlist: {
        rtData: [],
        branchData: [],
@@ -626,6 +664,79 @@
        // draw.update2(can1, this.G_status);
      }, 1000);
    }
    // 数据导出
    ,exportData () {
      console.log('数据导出');
      this.exportDialogVisible = true;
    }
    ,getProgress () {
      this.exportDialogVisible = false;
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
          this.progress.text="数据加载中...";
        }else {
          this.progress.text="文件下载中...";
        }
        if(res.data<100 && this.progress.show) {
          setTimeout(this.getProgress, 50);
        }else {
          this.progress.value = 100;
        }
      });
    }
    ,exportCsv () {
      let param = {
        dev_name: '2号水冷装置',
        dev_id: water_id,
        export_num: 5,
        table_name: this.export_date.replace(/-/g, '_'),
        record_time: this.export_date + " 00:00:00"
      };
      console.log(param, 'param');
      // 显示进度条
      this.progress.show = true;
      // 请求后台
      this.$api.common.clearProgress().then(() => {
        this.getProgress();
        this.$api.common.download(param).then((res) => {
          res = JSON.parse(res.data.result);
          // console.log(res, 'download res');
          if(res.code == 1) {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            let data = res.data[0];
            const link = document.createElement("a");
            link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName);
            link.download = data.fileName;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
          setTimeout(()=>{
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
          }, 1000);
          }else {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            this.$layer.msg('生成文件失败!');
          }
        }).catch(error=>{
          // 关闭进度条
          this.progress.show = false;
          this.progress.value = 0;
          this.$layer.msg('生成文件失败!');
          console.warn(error);
        });
      });
    }
  },
  mounted () {
    const $container = this.$refs.container;
src/views/waterCooling/index3.vue
@@ -4,6 +4,7 @@
    <div class="btn-group">
      <div class="btn_3d" @click="toWater(1)">切换到1号水冷装置</div>
      <div class="btn_3d" @click="toWater(2)">切换到2号水冷装置</div>
      <div class="btn_3d" @click="exportData">数据导出</div>
      <div class="btn_3d btn-toggle" @click="changeStatus">{{showTable ? '显示运行图' : '显示表格'}}</div>
    </div>
    <div class="page_content" :class="{'turn_end': showTable}">
@@ -58,7 +59,7 @@
        </div>
      </div>
    </div>
    <rotate-menu class="menu_contain">
    <!-- <rotate-menu class="menu_contain">
      <div class="main posA_full">菜单</div>
      <ul class="menu" slot="sub">
          <li v-if="!flag"><div class="btn" @click="start">就地启动</div></li>
@@ -69,17 +70,41 @@
          <li><div class="btn" @click="go('/watercooling/alarmhis/9')">历史报警</div></li>
          <li><div class="btn" @click="go('/watercooling/systemsettings/9')">系统设定</div></li>
      </ul>
    </rotate-menu>
    </rotate-menu> -->
    <!-- 导出数据弹窗 -->
    <el-dialog
      title="数据导出"
      :visible.sync="exportDialogVisible"
      width="400px" >
      <label class="pr_o6em">选择日期</label>
      <el-date-picker
        v-model="export_date"
        value-format="yyyy-MM-dd"
        type="date"
        size="small"
        :picker-options="pickerOptions"
        placeholder="选择日期" >
      </el-date-picker>
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportDialogVisible = false">关 闭</el-button>
        <el-button type="primary" @click="exportCsv">导 出</el-button>
      </span>
    </el-dialog>
    <progress-load
      :show="progress.show"
      :percentage="progress.value"
      :text="progress.text"></progress-load>
  </div>
</template>
<script>
import RotateMenu from '@/components/RotateMenu';
// import RotateMenu from '@/components/RotateMenu';
import ScienceBox from '../../components/ScienceBox'
import EleCircle from '@/script/drawplus'
import draw from '@/script/draw_water_cooling';
import AssembleTable from '@/components/AssembleTable';
import type from '@/script/config_water';
import ProgressLoad from '@/components/ProgressLoad'
let can, can1, resizeHandler;
// 临时存放格式化后的表格数据
@@ -103,12 +128,25 @@
export default {
  name: 'WaterCooling',
  components: {
    RotateMenu,
    // RotateMenu,
    ScienceBox,
    AssembleTable
    ,ProgressLoad
  },
  data () {
    return {
      progress: {
        show: false,
        value: 0,
        text: '',
      },
      exportDialogVisible: false,
      export_date: new Date().format('yyyy-MM-dd'),
      pickerOptions: {
        disabledDate (data) {
          return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30;
        }
      },
      tlist: {
        rtData: [],
        branchData: [],
@@ -416,6 +454,79 @@
         this.timer.open();
      }, 1000);
    }
    // 数据导出
    ,exportData () {
      console.log('数据导出');
      this.exportDialogVisible = true;
    }
    ,getProgress () {
      this.exportDialogVisible = false;
      this.$api.common.getProgress().then((res) => {
        res = JSON.parse(res.data.result);
        let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0));
        this.progress.value = percentage;
        // console.log(res);
        if(percentage == 0) {
          this.progress.text="数据加载中...";
        }else {
          this.progress.text="文件下载中...";
        }
        if(res.data<100 && this.progress.show) {
          setTimeout(this.getProgress, 50);
        }else {
          this.progress.value = 100;
        }
      });
    }
    ,exportCsv () {
      let param = {
        dev_name: '3号水冷装置',
        dev_id: water_id,
        export_num: 5,
        table_name: this.export_date.replace(/-/g, '_'),
        record_time: this.export_date + " 00:00:00"
      };
      console.log(param, 'param');
      // 显示进度条
      this.progress.show = true;
      // 请求后台
      this.$api.common.clearProgress().then(() => {
        this.getProgress();
        this.$api.common.download(param).then((res) => {
          res = JSON.parse(res.data.result);
          // console.log(res, 'download res');
          if(res.code == 1) {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            let data = res.data[0];
            const link = document.createElement("a");
            link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName);
            link.download = data.fileName;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
          setTimeout(()=>{
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
          }, 1000);
          }else {
            // 关闭进度条
            this.progress.show = false;
            this.progress.value = 0;
            this.$layer.msg('生成文件失败!');
          }
        }).catch(error=>{
          // 关闭进度条
          this.progress.show = false;
          this.progress.value = 0;
          this.$layer.msg('生成文件失败!');
          console.warn(error);
        });
      });
    }
  },
  mounted () {
    const $container = this.$refs.container;