bulusiLuo 1 year ago
parent
commit
fbe268ca1f

+ 43 - 20
src/layout/components/AppMain.vue

@@ -1,49 +1,60 @@
 <template>
-  <section class="app-main" :style="{paddingTop: appMainPaddingTop}">
+  <section class="app-main" :style="{ paddingTop: appMainPaddingTop }">
     <!-- <el-button type="success" style="width:16%;margin-left: 0" @click="uploadRouteTable">上传路由表</el-button> -->
     <transition name="fade-transform" mode="out-in">
       <keep-alive include="Monitor">
         <router-view :key="key" />
       </keep-alive>
     </transition>
+    <el-card v-if="shuo" class="box-card">
+      <div class="text item">1234567890-</div>
+      <el-button type="primary" class="btn" @click="shuo = false"
+        >确 定</el-button
+      >
+    </el-card>
   </section>
 </template>
 
 <script>
 // import { asyncRoutes } from '@/router/router.config'
-import { uploadRoute } from '@/api/user'
+import { uploadRoute } from "@/api/user";
 
 export default {
-  name: 'AppMain',
+  name: "AppMain",
   computed: {
     key() {
-      return this.$route.path
+      return this.$route.path;
     },
     appMainPaddingTop() {
       // const path = this.$route.path
       // if (path.indexOf('dashboard') === 1 || path.indexOf('map') === 1) return '0px'
       // else return '43px'
-      const tagsViewShow = this.$store.state.settings.tagsView
-      if (tagsViewShow) return '43px'
-      else return '0px'
-    }
+      const tagsViewShow = this.$store.state.settings.tagsView;
+      if (tagsViewShow) return "43px";
+      else return "0px";
+    },
+  },
+  data() {
+    return {
+      shuo: true,
+    };
   },
   methods: {
     uploadRouteTable() {
       const data = {
-        '1': JSON.stringify({
-          name: 'sys',
+        1: JSON.stringify({
+          name: "sys",
           // value: asyncRoutes,
-          type: 'tofly-master',
-          notes: '使用与当前系统。'
-        })
-      }
-      uploadRoute(JSON.stringify(data)).then(res => {
-        this.$message.success('上传成功')
-      })
-    }
-  }
-}
+          type: "tofly-master",
+          notes: "使用与当前系统。",
+        }),
+      };
+      uploadRoute(JSON.stringify(data)).then((res) => {
+        this.$message.success("上传成功");
+      });
+    },
+  },
+};
 </script>
 
 <style scoped>
@@ -55,6 +66,18 @@ export default {
   overflow: hidden;
   background: #fff;
 }
+.box-card {
+  width: 300px;
+  height: 300px;
+  position: absolute;
+  right: 0;
+  bottom: 0;
+}
+.btn {
+  position: absolute;
+  bottom: 10px;
+  right: 10px;
+}
 .fixed-header + .app-main {
   padding-top: 43px;
 }

+ 1 - 0
src/views/mbsys/collaborative/meetingmanage/meetingapplication/index.vue

@@ -693,6 +693,7 @@ export default {
       //文件
       if (data.hasOwnProperty("files")) {
         let files = [];
+        console.log("附件", data.files);
         data.files.forEach((file, index) => {
           formData.append("fileList", file.file);
         });

BIN
src/views/mbsys/flowManage.rar


+ 59 - 14
src/views/zhpt/scada/dayUseWater/widget.vue

@@ -117,8 +117,10 @@
         class="mapTable"
         :data="dayUseWaterData"
         :total="tableTotal"
+        :summary-method="getSummaries"
+        show-summary
         border
-        height="calc(100% - 40px)"
+        height="calc(100% - 65px)"
       >
         <el-table-column type="index" align="center" width="50" label="序号" />
         <el-table-column
@@ -210,12 +212,8 @@ export default {
         times: [],
       },
       rules: {
-        site: [
-          { required: true, message: "", trigger: "change" },
-        ],
-        times: [
-          { required: true, message: "", trigger: "change" },
-        ],
+        site: [{ required: true, message: "", trigger: "change" }],
+        times: [{ required: true, message: "", trigger: "change" }],
       },
       sites: [], // 测站名称
       types: [], // 指标类型
@@ -227,6 +225,7 @@ export default {
       isSeletcSite: [],
       linkageEchart: null,
       deviceTypeCode: [],
+      num: "",
     };
   },
 
@@ -237,6 +236,7 @@ export default {
       },
     },
   },
+  created() {},
 
   mounted() {
     const date = new Date();
@@ -247,13 +247,13 @@ export default {
       year + "-" + month + "-1",
       year + "-" + month + "-" + day,
     ];
-    this.elements["mainDiv"].parentElement.style.height = "100%";
-    this.elements["mainDiv"].parentElement.parentElement.style.height =
-      "calc(100% - 56px)";
-    this.elements[
-      "mainDiv"
-    ].parentElement.parentElement.parentElement.style.height = "100%";
-    this.showUnitIndex = {};
+    // this.elements["mainDiv"].parentElement.style.height = "100%";
+    // this.elements["mainDiv"].parentElement.parentElement.style.height =
+    //   "calc(100% - 56px)";
+    // this.elements[
+    //   "mainDiv"
+    // ].parentElement.parentElement.parentElement.style.height = "100%";
+    // this.showUnitIndex = {};
 
     getSysCommonCode({ pCid: "53400" }).then((res) => {
       let deviceTypes = res.result[0].codeList;
@@ -264,6 +264,26 @@ export default {
     });
   },
   methods: {
+    /**
+     * 合计
+     *
+     */
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "合计";
+          return;
+        }
+        const values = data.map((item) => Number(item[column.property]));
+        if (!values.every((value) => isNaN(value))) {
+          sums[index] = this.num;
+        } else {
+        }
+      });
+      return sums;
+    },
     /**
      * 根据设备类型查询设备
      */
@@ -346,6 +366,7 @@ export default {
     getData(data) {
       this.dayUseWaterData = [];
       this.loading = true;
+
       statisticsScadaPage(data)
         .then((res) => {
           if (res.code == 1) {
@@ -357,6 +378,25 @@ export default {
         .catch((err) => {
           console.log(err);
         });
+
+      const indexName1 = this.ruleForm.indexName.replace(/\#/g, "%23");
+      const data1 = {
+        code: indexName1 + "", // 指标名称
+        startTime: this.ruleForm.times[0] + " 00:00:00",
+        endTime: this.ruleForm.times[1] + " 23:59:59",
+        size: this.pageInfo.size,
+        current: this.pageInfo.current,
+        totalAll: 1,
+      };
+      statisticsScadaPage(data1)
+        .then((res) => {
+          if (res.code == 1) {
+            this.num = res.result.difference;
+          }
+        })
+        .catch((err) => {
+          console.log(err);
+        });
     },
     // 点击查询,获取表格数据
     monitorHisToryQuery(formName) {
@@ -435,3 +475,8 @@ export default {
   },
 };
 </script>
+<style scoped="less">
+.el-table__footer-wrapper {
+  margin-bottom: 32px;
+}
+</style>