فهرست منبع

update---1.加入模块,修改页面布局

QuietShadow 3 سال پیش
والد
کامیت
6e76ef8a58
30فایلهای تغییر یافته به همراه12804 افزوده شده و 29 حذف شده
  1. 10 3
      cors.js
  2. 2 1
      nginx.conf
  3. 1 1
      package.json
  4. 3 3
      src/views/basicInformation/app.html
  5. 3 3
      src/views/energyAnalysis/app.html
  6. 3 3
      src/views/energyBalance/app.html
  7. 3 3
      src/views/energyOperationSupport/app.html
  8. 3 3
      src/views/energyPerformance/app.html
  9. 3 3
      src/views/energyPlan/app.html
  10. 3 3
      src/views/energyQuality/app.html
  11. 22 0
      src/views/energyScheduling/app.html
  12. 26 0
      src/views/energyScheduling/app.js
  13. 234 0
      src/views/energyScheduling/components/dispatchingLog/electric.vue
  14. 272 0
      src/views/energyScheduling/components/dispatchingLog/energyDispatch.vue
  15. 234 0
      src/views/energyScheduling/components/dispatchingLog/power.vue
  16. 251 0
      src/views/energyScheduling/components/dispatchingLog/squadLeader.vue
  17. 234 0
      src/views/energyScheduling/components/dispatchingLog/water.vue
  18. 903 0
      src/views/energyScheduling/components/investAndProduce/investAndProduceManage.vue
  19. 991 0
      src/views/energyScheduling/components/investAndProduce/productMaterialsInOut.vue
  20. 970 0
      src/views/energyScheduling/components/investAndProduce/productMaterialsInput.vue
  21. 703 0
      src/views/energyScheduling/components/measuringLocationData/AbnormalDataMaintenance.vue
  22. 726 0
      src/views/energyScheduling/components/measuringLocationData/components/measurementPlaceChoose.vue
  23. 1401 0
      src/views/energyScheduling/components/measuringLocationData/manualmeasuringLocationEntry.vue
  24. 2034 0
      src/views/energyScheduling/components/measuringLocationData/measurementStandard.vue
  25. 1627 0
      src/views/energyScheduling/components/measuringLocationData/measuringLocationEntry.vue
  26. 542 0
      src/views/energyScheduling/components/measuringLocationData/measuringLocationQuery.vue
  27. 537 0
      src/views/energyScheduling/components/measuringLocationData/measuringLocationQueryTiming.vue
  28. 934 0
      src/views/energyScheduling/components/meterManage/measuringManualEntry.vue
  29. 126 0
      src/views/energyScheduling/router/index.js
  30. 3 3
      src/views/systemInterface/app.html

+ 10 - 3
cors.js

@@ -103,9 +103,16 @@ module.exports = {
         pathRewrite: {
           '^/icore.icp.web/pass/localhost': '/'
         }
-      }
+      },
+      '/icore.icp.web/pass/websocket': {
+        target: 'http://172.16.90.221:8002',
+        changeOrigin: true,
+        pathRewrite: {
+          '^/icore.icp.web/pass/websocket': '/'
+        }
+      },
   },
   //devModules: ['index','workFlow','ApiManage','apollo','authManage','configManager','devops','dingtalk','serviceManager','microService','monitor','systemConfig','metaData','multEntry','demo']
-  // devModules: ['all'] // 不建议使用,运行速度太慢
-    devModules: ['index','workFlow','systemConfig','multEntry','microService','basicInformation','energyAnalysis','energyBalance','energyOperationSupport','energyPerformance','energyPlan','energyQuality','systemInterface']
+    devModules: ['all'] // 不建议使用,运行速度太慢
+  // devModules: ['index','workFlow','systemConfig','multEntry','microService','basicInformation','energyAnalysis','energyBalance','energyOperationSupport','energyPerformance','energyPlan','energyQuality','systemInterface']
 }

+ 2 - 1
nginx.conf

@@ -92,7 +92,8 @@ http {
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             # proxy_pass http://paas-websocket; # 转发地址
-			proxy_pass http://ems-ems-api/v1;
+			      # proxy_pass http://ems-ems-api/v1;
+            proxy_pass http://ems-ems-websocket/v1;
         }
         location /icore.icp.web/pass/ems {
             rewrite ^/icore.icp.web/pass/ems/(.*)$ /$1 break; # 去除本地接口/api前缀, 否则会出现404

+ 1 - 1
package.json

@@ -15,7 +15,7 @@
     "testc": "cross-env NODE_ENV=test nyc mocha-webpack --webpack-config node_modules/icore-icp/build/webpack.test.conf.js --require node_modules/icore-icp/test/setup.js node_modules/icore-icp/test/**/*.spec.js"
   },
   "dependencies": {
-    "icore-icp": "^1.0.0-at.1.1"
+    "icore-icp": "^1.0.0-at.1.2"
   },
   "devDependencies": {
     "@vue/test-utils": "^1.0.0-beta.24",

+ 3 - 3
src/views/basicInformation/app.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
-    <meta content="工业互联网平台 iCore-ICP" name="keywords">
-    <meta content="工业互联网平台 iCore-ICP" name="description">
-    <title>工业互联网平台 iCore-ICP</title>
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
     <link href="../static/css/common.css" rel="stylesheet"/>
     <link href="../static/img/favicon.ico" rel="shortcut icon"/>
     <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>

+ 3 - 3
src/views/energyAnalysis/app.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
-    <meta content="工业互联网平台 iCore-ICP" name="keywords">
-    <meta content="工业互联网平台 iCore-ICP" name="description">
-    <title>工业互联网平台 iCore-ICP</title>
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
     <link href="../static/css/common.css" rel="stylesheet"/>
     <link href="../static/img/favicon.ico" rel="shortcut icon"/>
     <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>

+ 3 - 3
src/views/energyBalance/app.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
-    <meta content="工业互联网平台 iCore-ICP" name="keywords">
-    <meta content="工业互联网平台 iCore-ICP" name="description">
-    <title>工业互联网平台 iCore-ICP</title>
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
     <link href="../static/css/common.css" rel="stylesheet"/>
     <link href="../static/img/favicon.ico" rel="shortcut icon"/>
     <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>

+ 3 - 3
src/views/energyOperationSupport/app.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
-    <meta content="工业互联网平台 iCore-ICP" name="keywords">
-    <meta content="工业互联网平台 iCore-ICP" name="description">
-    <title>工业互联网平台 iCore-ICP</title>
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
     <link href="../static/css/common.css" rel="stylesheet"/>
     <link href="../static/img/favicon.ico" rel="shortcut icon"/>
     <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>

+ 3 - 3
src/views/energyPerformance/app.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
-    <meta content="工业互联网平台 iCore-ICP" name="keywords">
-    <meta content="工业互联网平台 iCore-ICP" name="description">
-    <title>工业互联网平台 iCore-ICP</title>
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
     <link href="../static/css/common.css" rel="stylesheet"/>
     <link href="../static/img/favicon.ico" rel="shortcut icon"/>
     <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>

+ 3 - 3
src/views/energyPlan/app.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
-    <meta content="工业互联网平台 iCore-ICP" name="keywords">
-    <meta content="工业互联网平台 iCore-ICP" name="description">
-    <title>工业互联网平台 iCore-ICP</title>
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
     <link href="../static/css/common.css" rel="stylesheet"/>
     <link href="../static/img/favicon.ico" rel="shortcut icon"/>
     <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>

+ 3 - 3
src/views/energyQuality/app.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
-    <meta content="工业互联网平台 iCore-ICP" name="keywords">
-    <meta content="工业互联网平台 iCore-ICP" name="description">
-    <title>工业互联网平台 iCore-ICP</title>
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
     <link href="../static/css/common.css" rel="stylesheet"/>
     <link href="../static/img/favicon.ico" rel="shortcut icon"/>
     <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>

+ 22 - 0
src/views/energyScheduling/app.html

@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
+    <link href="../static/css/common.css" rel="stylesheet"/>
+    <link href="../static/img/favicon.ico" rel="shortcut icon"/>
+    <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>
+    <script src="../static/lib/jquery/jquery.PrintArea.js" type="text/javascript"></script>
+    <script src="../static/lib/qrcode.min.js" type="text/javascript"></script>
+    <script src='../static/lib/XLSX/xlsx.core.min.js' type='text/javascript'></script>
+    <!--<script src="../static/lib/swiper/js/swiper.min.js" type="text/javascript"></script>-->
+    <script src="../static/js/common.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="app"></div>
+  </body>
+</html>

+ 26 - 0
src/views/energyScheduling/app.js

@@ -0,0 +1,26 @@
+// The Vue build version to load with the `import` command
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
+import Vue from 'vue';
+import App from '@/components/App.vue';
+// axios
+import '@/config/axios.js';
+// include
+import '@/config/include.js';
+
+// 通用store
+import store from '@/store/store.js';
+
+// router
+import router from './router/index.js';
+
+// 关闭生产模式下给出的提示
+Vue.config.productionTip = false;
+
+/* eslint-disable no-new */
+new Vue({
+  el: '#app',
+  router,
+  store,
+  components: { App },
+  template: '<App/>'
+});

+ 234 - 0
src/views/energyScheduling/components/dispatchingLog/electric.vue

@@ -0,0 +1,234 @@
+<template>
+    <!-- 电力调度日志 -->
+    <div class="electric">
+        <div class="box">
+            <p class="bt">电力调度日志</p>
+            <div class="box-top-gjl">
+                <div style="float:right; text-align: right;">
+                    <el-button size="small" type="primary" @click="dataSave" :loading="loading">保存</el-button>
+                </div>
+            </div>
+            <el-form
+                :model="dialog.form.data"
+                ref="dialog_form"
+                :rules="dialog.form.rules"
+                label-width="90px"
+                size="mini"
+            >
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="日志日期" prop="clock">
+                            <el-date-picker
+                                v-model="dialog.form.data.clock"
+                                style="width: 100%;"
+                                type="date"
+                                @change="getMd"
+                            ></el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="交班人" prop="turnUser">
+                            <el-input v-model.trim="dialog.form.data.turnUser" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="总值班长" prop="leader">
+                            <el-input v-model.trim="dialog.form.data.leader" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="调度类型" prop="dtype">
+                            <el-input v-model.trim="dialog.form.data.dtype" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="接班人" prop="carryUser">
+                            <el-input v-model.trim="dialog.form.data.carryUser" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="班次" prop="inorder">
+                            <el-input v-model.trim="dialog.form.data.inorder" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="编制时间" prop="tim">
+                            <el-date-picker
+                                v-model="dialog.form.data.tim"
+                                style="width: 100%;"
+                                type="datetime"
+                            ></el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <p class="bt">电力调度日志详细信息</p>
+                <el-form-item label-width="0px">
+                    <div class="text-box">
+                        <span class="label">主要作业实绩</span>
+                        <div class="text">
+                            <textarea v-model.trim="dialog.form.data.elog" :maxlength="300" clearable></textarea>
+                        </div>
+                    </div>
+                </el-form-item>
+            </el-form>
+        </div>
+    </div>
+</template>
+
+<script>
+import { getCookie, formatDate } from '@/utils/util.js';
+export default {
+    name: 'electric',
+    data () {
+        return {
+            loading: false,
+            dialog: {
+                form: {
+                    data: {
+                        clock: '',
+                        turnUser: getCookie('loginName'), // 交班人
+                        carryUser: '', // 接班人
+                        tim: new Date(), // 编制时间
+                        dtype: '', // 调度类型
+                        leader: '', // 总值班长
+                        inorder: '', // 班次
+                        elog: '' // 动力日志
+                    },
+                    rules: {
+                        clock: [
+                            { required: true, message: '该项不能为空', trigger: 'change' }
+                        ],
+                        tim: [
+                            { required: true, message: '该项不能为空', trigger: 'change' }
+                        ],
+                        turnUser: [],
+                        dtype: [],
+                        leader: [],
+                        carryUser: [],
+                        inorder: [],
+                        elog: []
+                    }
+                }
+            }
+        }
+    },
+    mounted () {
+        let that = this;
+        that.dialog.form.data.clock = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1);
+        that.getMd(that.dialog.form.data.clock);
+    },
+    methods: {
+        dataSave () {
+            let that = this;
+            let SubmitData = {
+                clock: formatDate(that.dialog.form.data.clock, 'yyyy-MM-dd'),
+                tim: formatDate(that.dialog.form.data.tim, 'yyyy-MM-dd HH:mm:ss'),
+                turnUser: that.dialog.form.data.turnUser,
+                carryUser: that.dialog.form.data.carryUser,
+                dtype: that.dialog.form.data.dtype,
+                leader: that.dialog.form.data.leader,
+                inorder: that.dialog.form.data.inorder,
+                elog: that.dialog.form.data.elog
+            };
+            that.$refs['dialog_form'].validate((valid) => {
+                if (valid) {
+                    that.loading = true;
+                    that.axios.put('pass/ems/v1/dispatchelogs/', SubmitData)
+                        .then(function (res) {
+                            if (res.code === '0') {
+                                that.$message({
+                                    message: '数据保存成功',
+                                    type: 'success'
+                                });
+                            } else {
+                                that.$message.error(res.message);
+                            }
+                            that.loading = false;
+                        }).catch(function () {
+                            that.loading = false;
+                        });
+                }
+            });
+        },
+        // 获取日志信息
+        getMd (val) {
+            if (!val) {
+                return true;
+            }
+            let that = this;
+            that.dialog.form.data.tim = new Date();
+            that.dialog.form.data.turnUser = getCookie('loginName');
+            that.dialog.form.data.carryUser = '';
+            that.dialog.form.data.dtype = '';
+            that.dialog.form.data.leader = '';
+            that.dialog.form.data.inorder = '';
+            that.dialog.form.data.elog = '';
+            let url = 'pass/ems/v1/dispatchelogs/' + formatDate(val, 'yyyy-MM-dd');
+            that.axios.get(url).then(function (res) {
+                if (res.code === '0') {
+                    if (res.data != null) {
+                        let item = res.data;
+                        that.dialog.form.data.tim = new Date(item.tim);
+                        that.dialog.form.data.turnUser = item.turnUser;
+                        that.dialog.form.data.carryUser = item.carryUser;
+                        that.dialog.form.data.dtype = item.dtype;
+                        that.dialog.form.data.leader = item.leader;
+                        that.dialog.form.data.inorder = item.inorder;
+                        that.dialog.form.data.elog = item.elog;
+                    }
+                } else {
+                    that.$message.error(res.message);
+                }
+            }).catch(function () {
+            });
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.electric {
+    min-width: 800px;
+    height: 100%;
+    .box {
+        width: 800px;
+        margin: 0  0 0 1px;
+        .bt {
+            font-size: 16px;
+            font-weight: 600;
+            text-align: center;
+            padding: 20px 10px 2px 10px;
+        }
+        .box-top-gjl {
+            overflow: hidden;
+            padding: 0 0 10px 0;
+        }
+        .text-box {
+            height: 168px;
+            .label {
+                width: 90px;
+                line-height: 168px;
+                padding-right: 8px;
+                display: block;
+                text-align: right;
+                float: left;
+            }
+            .text {
+                height: 100%;
+                margin-left: 90px;
+                textarea {
+                    width: 100%;
+                    height: 100%;
+                    padding: 5px 8px;
+                    border: 1px #c0c4cc solid;
+                    border-radius: 4px;
+                }
+            }
+        }
+    }
+}
+</style>

+ 272 - 0
src/views/energyScheduling/components/dispatchingLog/energyDispatch.vue

@@ -0,0 +1,272 @@
+<template>
+    <!-- 能源调度日志 -->
+    <div class="energyDispatch">
+        <div class="box">
+            <p class="bt">能源调度日志</p>
+            <div class="box-top-gjl">
+            </div>
+            <el-row>
+                <el-col :span="8">
+                    <div class="text-box">
+                        <span class="label">日志日期</span>
+                        <div class="text">
+                            <el-date-picker
+                                size="mini"
+                                v-model="clock"
+                                style="width: 100%;"
+                                type="date"
+                                @change="getMd"
+                            ></el-date-picker>
+                        </div>
+                    </div>
+                </el-col>
+                <el-col :span="16">
+                    <div style="float:right; text-align: right;">
+                        <el-button size="small" type="primary" @click="dataSave" :loading="loading">保存</el-button>
+                    </div>
+                </el-col>
+            </el-row>
+            <el-row>
+                <el-col :span="16">
+                    <el-form
+                            size="mini"
+                            ref="dialog_form_arr"
+                            label-width="0px"
+                        >
+                        <el-table stripe
+                            :data="tableData"
+                            style="width: 100%;"
+                            :height="'500px'"
+                            border
+                            size="mini"
+                        >
+                            <el-table-column
+                                sortable
+                                prop="time"
+                                label="时间"
+                                width="190px"
+                            >
+                                <template slot-scope="scope">
+                                    <el-date-picker
+                                        @change="checkt"
+                                        value-format="yyyy-MM-dd HH:mm:ss"
+                                        type="datetime"
+                                        v-model="scope.row.tim"
+                                        size="mini"
+                                        style="width: 100%;"
+                                    ></el-date-picker>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                sortable
+                                prop="actLog"
+                                label="工作实绩"
+                                min-width="100px"
+                            >
+                                <template slot-scope="scope">
+                                    <el-input clearable
+                                        v-model="scope.row.actLog"
+                                        size="mini"
+                                        style="width: 100%;"
+                                    ></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                sortable
+                                prop="dataLog"
+                                label="数据"
+                                min-width="100px"
+                            >
+                                <template slot-scope="scope">
+                                    <el-input clearable
+                                        v-model="scope.row.dataLog"
+                                        size="mini"
+                                        style="width: 100%;"
+                                    ></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="操作" width="70" align="center">
+                                <template slot-scope="scope">
+                                    <el-button @click.native.prevent="deleteRow(scope.$index, scope.row)" type="text" size="small">移除</el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                    </el-form>
+                </el-col>
+                <el-col :span="8">
+                    <div class="text">
+                        <p class="label">上级命令:</p>
+                        <textarea v-model="orderLog" :maxlength="300" clearable></textarea>
+                    </div>
+                    <div class="text">
+                        <p class="label">重要记事:</p>
+                        <textarea v-model="dLog" :maxlength="300" clearable></textarea>
+                    </div>
+                </el-col>
+            </el-row>
+        </div>
+    </div>
+</template>
+
+<script>
+import { getCookie, formatDate } from '@/utils/util.js';
+export default {
+    name: 'energyDispatch',
+    data () {
+        return {
+            clock: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1),
+            orderLog: '', // 上级命令
+            dLog: '', // 重要记事
+            loading: false,
+            tableData: [
+                // {
+                //     tim: '2019-08-23 18:00:00',
+                //     actLog: 'actLog',
+                //     dataLog: 'dataLog'
+                // }
+            ]
+        }
+    },
+    mounted () {
+        let that = this;
+        that.clock = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1);
+        that.getMd(that.clock);
+    },
+    methods: {
+        dataSave () {
+            let that = this;
+            if (!that.clock) {
+                this.$message.error('请填写日志日期');
+                return true;
+            }
+            let SubmitData = {
+                clock: formatDate(that.clock, 'yyyy-MM-dd'),
+                dLog: that.dLog,
+                orderLog: that.orderLog,
+                data: that.tableData
+            };
+            that.loading = true;
+            that.axios.post('pass/ems/v1/dispatchenergylogs/', SubmitData, {contentType: 'application/json'})
+                .then(function (res) {
+                    if (res.code === '0') {
+                        that.$message({
+                            message: '数据保存成功',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.loading = false;
+                }).catch(function () {
+                    that.loading = false;
+                });
+        },
+        // 获取日志信息
+        getMd (val) {
+            if (!val) {
+                return true;
+            }
+            let that = this;
+            that.tableData = [];
+            that.orderLog = '';
+            that.dLog = '';
+            let url = 'pass/ems/v1/dispatchenergylogs/' + formatDate(val, 'yyyy-MM-dd');
+            that.axios.get(url).then(function (res) {
+                if (res.code === '0') {
+                    if (res.data != null) {
+                        that.orderLog = res.data.orderLog;
+                        that.dLog = res.data.dLog;
+                        let tdata = res.data.list;
+                        if (tdata.length < 1 || tdata.slice(-1)[0].tim) {
+                            tdata.splice(tdata.length, 0, {tim: '', actLog: '', dataLog: ''});
+                        }
+                        that.tableData = tdata;
+                    }
+                } else {
+                    that.$message.error(res.message);
+                }
+            }).catch(function () {
+            });
+        },
+        checkt () {
+            let that = this;
+            // 添加一行
+            if (that.tableData.slice(-1)[0].tim) {
+                that.tableData.splice(that.tableData.length, 0, {tim: '', actLog: '', dataLog: ''});
+            }
+        },
+        deleteRow (index, row) {
+            let that = this;
+            // 最后一行
+            if (that.tableData.length === index + 1) {
+                that.tableData.splice(index, 1, {tim: '', actLog: '', dataLog: ''});
+            } else {
+                that.tableData.splice(index, 1);
+            }
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.energyDispatch {
+    min-width: 1000px;
+    height: 100%;
+    .box {
+        width: 1000px;
+        margin: 0  0 0 10px;
+        .bt {
+            font-size: 16px;
+            font-weight: 600;
+            text-align: center;
+            padding: 20px 10px 2px 10px;
+        }
+        .box-top-gjl {
+            overflow: hidden;
+            padding: 0 0 10px 0;
+        }
+        .text-box {
+            height: 32px;
+            .label {
+                width: 80px;
+                line-height: 32px;
+                padding-right: 8px;
+                display: block;
+                text-align: right;
+                float: left;
+            }
+            .text {
+                height: 100%;
+                margin:0 0 0 80px;
+                padding:0;
+                border: none;
+            }
+        }
+        .text {
+            height: 245px;
+            position: relative;
+            padding-top: 25px;
+            margin: 0 0 10px 20px;
+            border: 1px #c0c4cc solid;
+            // border-radius: 4px;
+            overflow: hidden;
+            .label {
+                position: absolute;
+                top: 0;
+                left: 0;
+                width: 100%;
+                height: 25px;
+                padding: 1px 5px;
+                background-color: #45A4F9;
+                color: #FFF;
+            }
+            textarea {
+                width: 100%;
+                height: 100%;
+                padding: 5px 8px;
+                border: none;
+            }
+        }
+    }
+}
+</style>

+ 234 - 0
src/views/energyScheduling/components/dispatchingLog/power.vue

@@ -0,0 +1,234 @@
+<template>
+    <!-- 动力调度日志 -->
+    <div class="power">
+        <div class="box">
+            <p class="bt">动力调度日志</p>
+            <div class="box-top-gjl">
+                <div style="float:right; text-align: right;">
+                    <el-button size="small" type="primary" @click="dataSave" :loading="loading">保存</el-button>
+                </div>
+            </div>
+            <el-form
+                :model="dialog.form.data"
+                ref="dialog_form"
+                :rules="dialog.form.rules"
+                label-width="90px"
+                size="mini"
+            >
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="日志日期" prop="clock">
+                            <el-date-picker
+                                v-model="dialog.form.data.clock"
+                                style="width: 100%;"
+                                type="date"
+                                @change="getMd"
+                            ></el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="交班人" prop="turnUser">
+                            <el-input v-model.trim="dialog.form.data.turnUser" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="总值班长" prop="leader">
+                            <el-input v-model.trim="dialog.form.data.leader" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="调度类型" prop="dtype">
+                            <el-input v-model.trim="dialog.form.data.dtype" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="接班人" prop="carryUser">
+                            <el-input v-model.trim="dialog.form.data.carryUser" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="班次" prop="inorder">
+                            <el-input v-model.trim="dialog.form.data.inorder" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="编制时间" prop="tim">
+                            <el-date-picker
+                                v-model="dialog.form.data.tim"
+                                style="width: 100%;"
+                                type="datetime"
+                            ></el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <p class="bt">动力调度日志详细信息</p>
+                <el-form-item label-width="0px">
+                    <div class="text-box">
+                        <span class="label">主要作业实绩</span>
+                        <div class="text">
+                            <textarea v-model.trim="dialog.form.data.plog" :maxlength="300" clearable></textarea>
+                        </div>
+                    </div>
+                </el-form-item>
+            </el-form>
+        </div>
+    </div>
+</template>
+
+<script>
+import { getCookie, formatDate } from '@/utils/util.js';
+export default {
+    name: 'power',
+    data () {
+        return {
+            loading: false,
+            dialog: {
+                form: {
+                    data: {
+                        clock: '',
+                        turnUser: getCookie('loginName'), // 交班人
+                        carryUser: '', // 接班人
+                        tim: new Date(), // 编制时间
+                        dtype: '', // 调度类型
+                        leader: '', // 总值班长
+                        inorder: '', // 班次
+                        plog: '' // 动力日志
+                    },
+                    rules: {
+                        clock: [
+                            { required: true, message: '该项不能为空', trigger: 'change' }
+                        ],
+                        tim: [
+                            { required: true, message: '该项不能为空', trigger: 'change' }
+                        ],
+                        turnUser: [],
+                        dtype: [],
+                        leader: [],
+                        carryUser: [],
+                        inorder: [],
+                        plog: []
+                    }
+                }
+            }
+        }
+    },
+    mounted () {
+        let that = this;
+        that.dialog.form.data.clock = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1);
+        that.getMd(that.dialog.form.data.clock);
+    },
+    methods: {
+        dataSave () {
+            let that = this;
+            let SubmitData = {
+                clock: formatDate(that.dialog.form.data.clock, 'yyyy-MM-dd'),
+                tim: formatDate(that.dialog.form.data.tim, 'yyyy-MM-dd HH:mm:ss'),
+                turnUser: that.dialog.form.data.turnUser,
+                carryUser: that.dialog.form.data.carryUser,
+                dtype: that.dialog.form.data.dtype,
+                leader: that.dialog.form.data.leader,
+                inorder: that.dialog.form.data.inorder,
+                plog: that.dialog.form.data.plog
+            };
+            that.$refs['dialog_form'].validate((valid) => {
+                if (valid) {
+                    that.loading = true;
+                    that.axios.put('pass/ems/v1/dispatchplogs/', SubmitData)
+                        .then(function (res) {
+                            if (res.code === '0') {
+                                that.$message({
+                                    message: '数据保存成功',
+                                    type: 'success'
+                                });
+                            } else {
+                                that.$message.error(res.message);
+                            }
+                            that.loading = false;
+                        }).catch(function () {
+                            that.loading = false;
+                        });
+                }
+            });
+        },
+        // 获取日志信息
+        getMd (val) {
+            if (!val) {
+                return true;
+            }
+            let that = this;
+            that.dialog.form.data.tim = new Date();
+            that.dialog.form.data.turnUser = getCookie('loginName');
+            that.dialog.form.data.carryUser = '';
+            that.dialog.form.data.dtype = '';
+            that.dialog.form.data.leader = '';
+            that.dialog.form.data.inorder = '';
+            that.dialog.form.data.plog = '';
+            let url = 'pass/ems/v1/dispatchplogs/' + formatDate(val, 'yyyy-MM-dd');
+            that.axios.get(url).then(function (res) {
+                if (res.code === '0') {
+                    if (res.data != null) {
+                        let item = res.data;
+                        that.dialog.form.data.tim = new Date(item.tim);
+                        that.dialog.form.data.turnUser = item.turnUser;
+                        that.dialog.form.data.carryUser = item.carryUser;
+                        that.dialog.form.data.dtype = item.dtype;
+                        that.dialog.form.data.leader = item.leader;
+                        that.dialog.form.data.inorder = item.inorder;
+                        that.dialog.form.data.plog = item.plog;
+                    }
+                } else {
+                    that.$message.error(res.message);
+                }
+            }).catch(function () {
+            });
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.power {
+    min-width: 800px;
+    height: 100%;
+    .box {
+        width: 800px;
+        margin: 0  0 0 1px;
+        .bt {
+            font-size: 16px;
+            font-weight: 600;
+            text-align: center;
+            padding: 20px 10px 2px 10px;
+        }
+        .box-top-gjl {
+            overflow: hidden;
+            padding: 0 0 10px 0;
+        }
+        .text-box {
+            height: 168px;
+            .label {
+                width: 90px;
+                line-height: 168px;
+                padding-right: 8px;
+                display: block;
+                text-align: right;
+                float: left;
+            }
+            .text {
+                height: 100%;
+                margin-left: 90px;
+                textarea {
+                    width: 100%;
+                    height: 100%;
+                    padding: 5px 8px;
+                    border: 1px #c0c4cc solid;
+                    border-radius: 4px;
+                }
+            }
+        }
+    }
+}
+</style>

+ 251 - 0
src/views/energyScheduling/components/dispatchingLog/squadLeader.vue

@@ -0,0 +1,251 @@
+<template>
+    <!-- 总值班长调度日志 -->
+    <div class="squadLeader">
+        <div class="box">
+            <p class="bt">总值班长调度日志</p>
+            <div class="box-top-gjl">
+                <div style="float:right; text-align: right;">
+                    <el-button size="small" type="primary" @click="dataSave" :loading="loading">保存</el-button>
+                </div>
+            </div>
+            <el-form
+                :model="dialog.form.data"
+                ref="dialog_form"
+                :rules="dialog.form.rules"
+                label-width="90px"
+                size="mini"
+            >
+                <el-row>
+                    <el-col :span="12">
+                        <el-form-item label="日志日期" prop="clock">
+                            <el-date-picker
+                                v-model="dialog.form.data.clock"
+                                style="width: 100%;"
+                                type="date"
+                                @change="getMd"
+                            ></el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="编制时间" prop="tim">
+                            <el-date-picker
+                                v-model="dialog.form.data.tim"
+                                style="width: 100%;"
+                                type="datetime"
+                            ></el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="12">
+                        <el-form-item label="调度类型" prop="dtype">
+                            <el-input v-model.trim="dialog.form.data.dtype" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="交班人" prop="turnUser">
+                            <el-input v-model.trim="dialog.form.data.turnUser" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="12">
+                        <el-form-item label="总值班长" prop="leader">
+                            <el-input v-model.trim="dialog.form.data.leader" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item label="接班人" prop="carryUser">
+                            <el-input v-model.trim="dialog.form.data.carryUser" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <p class="bt">主要作业实绩</p>
+                <el-form-item label-width="0xp" prop="elog">
+                    <div class="text-box">
+                        <span class="label">电力</span>
+                        <div class="text">
+                            <textarea v-model.trim="dialog.form.data.elog" :maxlength="300" clearable></textarea>
+                        </div>
+                    </div>
+                </el-form-item>
+                <el-form-item label-width="0xp" prop="plog">
+                    <div class="text-box">
+                        <span class="label">动力</span>
+                        <div class="text">
+                            <textarea v-model.trim="dialog.form.data.plog" :maxlength="300" clearable></textarea>
+                        </div>
+                    </div>
+                </el-form-item>
+                <el-form-item label-width="0xp" prop="wlog">
+                    <div class="text-box">
+                        <span class="label">水道</span>
+                        <div class="text">
+                            <textarea v-model.trim="dialog.form.data.wlog" :maxlength="300" clearable></textarea>
+                        </div>
+                    </div>
+                </el-form-item>
+            </el-form>
+        </div>
+    </div>
+</template>
+
+<script>
+import { getCookie, formatDate } from '@/utils/util.js';
+export default {
+    name: 'squadLeader',
+    data () {
+        return {
+            loading: false,
+            dialog: {
+                form: {
+                    data: {
+                        clock: '',
+                        turnUser: getCookie('loginName'), // 交班人
+                        carryUser: '', // 接班人
+                        tim: new Date(), // 编制时间
+                        dtype: '', // 调度类型
+                        leader: '', // 总值班长
+                        elog: '', // 电力日志
+                        plog: '', // 动力日志
+                        wlog: '' // 水日志
+                    },
+                    rules: {
+                        clock: [
+                            { required: true, message: '该项不能为空', trigger: 'change' }
+                        ],
+                        tim: [
+                            { required: true, message: '该项不能为空', trigger: 'change' }
+                        ],
+                        turnUser: [],
+                        dtype: [],
+                        leader: [],
+                        carryUser: [],
+                        elog: [],
+                        plog: [],
+                        wlog: []
+                    }
+                }
+            }
+        }
+    },
+    mounted () {
+        let that = this;
+        that.dialog.form.data.clock = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1);
+        that.getMd(that.dialog.form.data.clock);
+    },
+    methods: {
+        dataSave () {
+            let that = this;
+            let SubmitData = {
+                clock: formatDate(that.dialog.form.data.clock, 'yyyy-MM-dd'),
+                tim: formatDate(that.dialog.form.data.tim, 'yyyy-MM-dd HH:mm:ss'),
+                turnUser: that.dialog.form.data.turnUser,
+                carryUser: that.dialog.form.data.carryUser,
+                dtype: that.dialog.form.data.dtype,
+                leader: that.dialog.form.data.leader,
+                elog: that.dialog.form.data.elog,
+                plog: that.dialog.form.data.plog,
+                wlog: that.dialog.form.data.wlog
+            };
+            that.$refs['dialog_form'].validate((valid) => {
+                if (valid) {
+                    that.loading = true;
+                    that.axios.put('pass/ems/v1/dispatchzlogs/', SubmitData)
+                        .then(function (res) {
+                            if (res.code === '0') {
+                                that.$message({
+                                    message: '数据保存成功',
+                                    type: 'success'
+                                });
+                            } else {
+                                that.$message.error(res.message);
+                            }
+                            that.loading = false;
+                        }).catch(function () {
+                            that.loading = false;
+                        });
+                }
+            });
+        },
+        // 获取日志信息
+        getMd (val) {
+            if (!val) {
+                return true;
+            }
+            let that = this;
+            that.dialog.form.data.tim = new Date();
+            that.dialog.form.data.turnUser = getCookie('loginName');
+            that.dialog.form.data.carryUser = '';
+            that.dialog.form.data.dtype = '';
+            that.dialog.form.data.leader = '';
+            that.dialog.form.data.elog = '';
+            that.dialog.form.data.plog = '';
+            that.dialog.form.data.wlog = '';
+            let url = 'pass/ems/v1/dispatchzlogs/' + formatDate(val, 'yyyy-MM-dd');
+            that.axios.get(url).then(function (res) {
+                if (res.code === '0') {
+                    console.log('res.data', res.data);
+                    if (res.data != null) {
+                        let item = res.data;
+                        that.dialog.form.data.tim = new Date(item.tim);
+                        that.dialog.form.data.turnUser = item.turnUser;
+                        that.dialog.form.data.carryUser = item.carryUser;
+                        that.dialog.form.data.dtype = item.dtype;
+                        that.dialog.form.data.leader = item.leader;
+                        that.dialog.form.data.elog = item.elog;
+                        that.dialog.form.data.plog = item.plog;
+                        that.dialog.form.data.wlog = item.wlog;
+                    }
+                } else {
+                    that.$message.error(res.message);
+                }
+            }).catch(function () {
+            });
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.squadLeader {
+    min-width: 800px;
+    height: 100%;
+    .box {
+        width: 800px;
+        margin: 0  0 0 1px;
+        .bt {
+            font-size: 16px;
+            font-weight: 600;
+            text-align: center;
+            padding: 20px 10px 2px 10px;
+        }
+        .box-top-gjl {
+            overflow: hidden;
+            padding: 0 0 10px 0;
+        }
+        .text-box {
+            height: 118px;
+            .label {
+                width: 80px;
+                line-height: 118px;
+                padding-right: 8px;
+                display: block;
+                text-align: right;
+                float: left;
+            }
+            .text {
+                height: 100%;
+                margin-left: 80px;
+                textarea {
+                    width: 100%;
+                    height: 100%;
+                    padding: 5px 8px;
+                    border: 1px #c0c4cc solid;
+                    border-radius: 4px;
+                }
+            }
+        }
+    }
+}
+</style>

+ 234 - 0
src/views/energyScheduling/components/dispatchingLog/water.vue

@@ -0,0 +1,234 @@
+<template>
+    <!-- 水道调度日志 -->
+    <div class="water">
+        <div class="box">
+            <p class="bt">水道调度日志</p>
+            <div class="box-top-gjl">
+                <div style="float:right; text-align: right;">
+                    <el-button size="small" type="primary" @click="dataSave" :loading="loading">保存</el-button>
+                </div>
+            </div>
+            <el-form
+                :model="dialog.form.data"
+                ref="dialog_form"
+                :rules="dialog.form.rules"
+                label-width="90px"
+                size="mini"
+            >
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="日志日期" prop="clock">
+                            <el-date-picker
+                                v-model="dialog.form.data.clock"
+                                style="width: 100%;"
+                                type="date"
+                                @change="getMd"
+                            ></el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="交班人" prop="turnUser">
+                            <el-input v-model.trim="dialog.form.data.turnUser" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="总值班长" prop="leader">
+                            <el-input v-model.trim="dialog.form.data.leader" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="调度类型" prop="dtype">
+                            <el-input v-model.trim="dialog.form.data.dtype" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="接班人" prop="carryUser">
+                            <el-input v-model.trim="dialog.form.data.carryUser" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="班次" prop="inorder">
+                            <el-input v-model.trim="dialog.form.data.inorder" clearable></el-input>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="编制时间" prop="tim">
+                            <el-date-picker
+                                v-model="dialog.form.data.tim"
+                                style="width: 100%;"
+                                type="datetime"
+                            ></el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <p class="bt">水道调度日志详细信息</p>
+                <el-form-item label-width="0px">
+                    <div class="text-box">
+                        <span class="label">主要作业实绩</span>
+                        <div class="text">
+                            <textarea v-model.trim="dialog.form.data.wlog" :maxlength="300" clearable></textarea>
+                        </div>
+                    </div>
+                </el-form-item>
+            </el-form>
+        </div>
+    </div>
+</template>
+
+<script>
+import { getCookie, formatDate } from '@/utils/util.js';
+export default {
+    name: 'water',
+    data () {
+        return {
+            loading: false,
+            dialog: {
+                form: {
+                    data: {
+                        clock: '',
+                        turnUser: getCookie('loginName'), // 交班人
+                        carryUser: '', // 接班人
+                        tim: new Date(), // 编制时间
+                        dtype: '', // 调度类型
+                        leader: '', // 总值班长
+                        inorder: '', // 班次
+                        wlog: '' // 动力日志
+                    },
+                    rules: {
+                        clock: [
+                            { required: true, message: '该项不能为空', trigger: 'change' }
+                        ],
+                        tim: [
+                            { required: true, message: '该项不能为空', trigger: 'change' }
+                        ],
+                        turnUser: [],
+                        dtype: [],
+                        leader: [],
+                        carryUser: [],
+                        inorder: [],
+                        wlog: []
+                    }
+                }
+            }
+        }
+    },
+    mounted () {
+        let that = this;
+        that.dialog.form.data.clock = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1);
+        that.getMd(that.dialog.form.data.clock);
+    },
+    methods: {
+        dataSave () {
+            let that = this;
+            let SubmitData = {
+                clock: formatDate(that.dialog.form.data.clock, 'yyyy-MM-dd'),
+                tim: formatDate(that.dialog.form.data.tim, 'yyyy-MM-dd HH:mm:ss'),
+                turnUser: that.dialog.form.data.turnUser,
+                carryUser: that.dialog.form.data.carryUser,
+                dtype: that.dialog.form.data.dtype,
+                leader: that.dialog.form.data.leader,
+                inorder: that.dialog.form.data.inorder,
+                wlog: that.dialog.form.data.wlog
+            };
+            that.$refs['dialog_form'].validate((valid) => {
+                if (valid) {
+                    that.loading = true;
+                    that.axios.put('pass/ems/v1/dispatchwlogs/', SubmitData)
+                        .then(function (res) {
+                            if (res.code === '0') {
+                                that.$message({
+                                    message: '数据保存成功',
+                                    type: 'success'
+                                });
+                            } else {
+                                that.$message.error(res.message);
+                            }
+                            that.loading = false;
+                        }).catch(function () {
+                            that.loading = false;
+                        });
+                }
+            });
+        },
+        // 获取日志信息
+        getMd (val) {
+            if (!val) {
+                return true;
+            }
+            let that = this;
+            that.dialog.form.data.tim = new Date();
+            that.dialog.form.data.turnUser = getCookie('loginName');
+            that.dialog.form.data.carryUser = '';
+            that.dialog.form.data.dtype = '';
+            that.dialog.form.data.leader = '';
+            that.dialog.form.data.inorder = '';
+            that.dialog.form.data.wlog = '';
+            let url = 'pass/ems/v1/dispatchwlogs/' + formatDate(val, 'yyyy-MM-dd');
+            that.axios.get(url).then(function (res) {
+                if (res.code === '0') {
+                    if (res.data != null) {
+                        let item = res.data;
+                        that.dialog.form.data.tim = new Date(item.tim);
+                        that.dialog.form.data.turnUser = item.turnUser;
+                        that.dialog.form.data.carryUser = item.carryUser;
+                        that.dialog.form.data.dtype = item.dtype;
+                        that.dialog.form.data.leader = item.leader;
+                        that.dialog.form.data.inorder = item.inorder;
+                        that.dialog.form.data.wlog = item.wlog;
+                    }
+                } else {
+                    that.$message.error(res.message);
+                }
+            }).catch(function () {
+            });
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.water {
+    min-width: 800px;
+    height: 100%;
+    .box {
+        width: 800px;
+        margin: 0  0 0 1px;
+        .bt {
+            font-size: 16px;
+            font-weight: 600;
+            text-align: center;
+            padding: 20px 10px 2px 10px;
+        }
+        .box-top-gjl {
+            overflow: hidden;
+            padding: 0 0 10px 0;
+        }
+        .text-box {
+            height: 168px;
+            .label {
+                width: 90px;
+                line-height: 168px;
+                padding-right: 8px;
+                display: block;
+                text-align: right;
+                float: left;
+            }
+            .text {
+                height: 100%;
+                margin-left: 90px;
+                textarea {
+                    width: 100%;
+                    height: 100%;
+                    padding: 5px 8px;
+                    border: 1px #c0c4cc solid;
+                    border-radius: 4px;
+                }
+            }
+        }
+    }
+}
+</style>

+ 903 - 0
src/views/energyScheduling/components/investAndProduce/investAndProduceManage.vue

@@ -0,0 +1,903 @@
+<template>
+    <!-- 实际投入产出人工录入 -->
+    <div class="measuringManualEntry">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="5">
+                            <el-form-item label="日期">
+                                <zj-timegran-date
+                                    v-model="filterForm.data.prodate"
+                                    style="width: 100%;"
+                                    :type="'daterange'"
+                                    :timegranId="'DAY'"
+                                    :oneFoo="getTableData"
+                                    :defaultOffset="-1"
+                                    :custom="custom"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="工序">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.workproc"
+                                    placeholder="工序"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.workproc.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="物料名称">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.materialname"
+                                    placeholder="物料名称"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                         <el-col :span="4">
+                            <el-form-item label="物料编码">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.materialcode"
+                                    placeholder="物料编码"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="数据类型">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.type"
+                                    placeholder="数据类型"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.type.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-edit-outline"
+                        @click="but_edit_plural()"
+                        :loading="loading"
+                    >保存</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <el-form
+                    size="mini"
+                    ref="dialog_form_arr"
+                    label-width="0px"
+                    :model="tableFormDataObj"
+                >
+                    <el-table stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        @selection-change="handleSelectionChange"
+                        show-summary
+                        :summary-method="getSummaries"
+                        :row-class-name="tableRowClassName"
+                        @cell-click="cellClick">
+                        <el-table-column
+                            type="selection"
+                            width="40"
+                            align="center"
+                            :selectable='checkboxT'
+                            fixed="left"
+                            class-name="cnspicuous"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="prodate"
+                            label="时间"
+                            width="90px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="timegranid"
+                            label="粒度"
+                            width="55px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        >日</el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="type"
+                            label="数据类型"
+                            width="80px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                            <span>{{ nameObj.type.obj[scope.row.type] ? nameObj.type.obj[scope.row.type] : scope.row.type }}</span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="unit"
+                            label="计量单位"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.unitid.obj[scope.row.unit] ? nameObj.unitid.obj[scope.row.unit] : scope.row.unit }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="prodline"
+                            label="产线"
+                            width="100px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="workproc"
+                            label="工序"
+                            width="100px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.workproc.obj[scope.row.workproc] ? nameObj.workproc.obj[scope.row.workproc] : scope.row.workproc }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="materialname"
+                            label="物料名称"
+                            width="160px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="materialcode"
+                            label="物料编码"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="qty"
+                            label="最终值"
+                            width="135px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection && (scope.row.index === 1 || loginName === 'admin')"
+                                    :prop="scope.row.id + '-' + scope.row.prodate + '.qty'"
+                                    :rules="tableFormRules.qty"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.id + '-' + scope.row.prodate].qty"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.qty}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="createtime"
+                            label="创建时间"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="status"
+                            label="状态"
+                            width="100px"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                            <span>{{ nameObj.status.obj[scope.row.status] ? nameObj.status.obj[scope.row.status] : scope.row.status }}</span>
+                         </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="sendtime"
+                            label="读取时间"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="memo"
+                            label="备注"
+                            min-width="150px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection && (scope.row.ed === 1 || loginName === 'admin')"
+                                    :prop="scope.row.id + '-' + scope.row.prodate + '.memo'"
+                                    :rules="tableFormRules.memo"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.id + '-' + scope.row.prodate].memo"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.memo}}</span>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-form>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: right;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1, checkInteger } from '~/utils/validator.js'
+import timegranDate from '@/components/zg/timegranDate.vue'
+import {formatDate, commonSummaries, getCookie} from '@/utils/util.js';
+export default {
+    name: 'measuringManualEntry',
+    components: {
+        'zj-timegran-date': timegranDate
+    },
+    data () {
+        return {
+            custom: 1,
+            filterForm: {
+                show: true,
+                data: {
+                    prodate: '',
+                    workproc: '',
+                    workprocid: '',
+                    prodline: '',
+                    state: '',
+                    materialname: '',
+                    materialcode: '',
+                    type: ''
+                },
+                rules: {
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            singleTableHeight: 100,
+            tableData: [],
+            loading: false,
+            tableLoading: false,
+            multipleSelection: [],
+            tableFormDataObj: {},
+            tableFormRules: {
+                mintvalue: [
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                mendvalue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                qty: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                memo: [],
+                xh: [
+                    { validator: checkInteger, trigger: 'change' }
+                ]
+            },
+            nameObj: {
+                status: {
+                    obj: {
+                        '0': '已创建',
+                        '1': '已读取'
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '已创建'
+                        },
+                        {
+                            id: '1',
+                            name: '已读取'
+                        }
+                    ]
+                },
+                type: {
+                    obj: {
+                        '1': '投入',
+                        '2': '产出'
+                    },
+                    arr: [
+                        {
+                            id: '1',
+                            name: '投入'
+                        },
+                        {
+                            id: '2',
+                            name: '产出'
+                        }
+                    ]
+                },
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                location: {
+                    obj: {},
+                    arr: []
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                },
+                timegranid: {
+                    obj: {
+                        'DAY': '日',
+                        'MONTH': '月',
+                        'YEAR': '年'
+                    }
+                },
+                prodline: {
+                    obj: {},
+                    arr: []
+                },
+                workproc: {
+                    obj: {},
+                    arr: []
+                }
+            },
+            rowIndex: '',
+            columnId: '',
+            focusTarget: null,
+            seqArr: [],
+            editSetFlag: '',
+            loginName: 'admin' // getCookie('loginName')
+        }
+    },
+    created () {
+        // 获取按钮权限
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        // 接收路由参数
+        if (that.$route.query.workprocid) {
+            that.filterForm.data.workprocid = that.$route.query.workprocid;
+            let its = that.filterForm.data.workprocid.split(',');
+            if (its && its.length > 10) {
+                that.pageSize = 50;
+                that.custom = 0;
+            }
+        }
+        that.getNodeData();
+        that.getEnergyIdData();
+        that.getLocateIdData();
+        that.getUnitIdData();
+        // that.getTableData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['qty']; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        // 获取能介
+        getEnergyIdData () {
+            let that = this;
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name,
+                                energytypeid: item.energytypeid,
+                                unitid: item.unitid
+                            })
+                            obj[item.id] = {
+                                name: item.name,
+                                unitid: item.unitid
+                            }
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取位置
+        getLocateIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmlocations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.location.arr = arr;
+                        that.nameObj.location.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取工序列表
+        getNodeData () {
+            let that = this
+            let url = 'pass/ems/v1/trmworkprocs/getIdAndName?issettle=1';
+            console.log('工序呢');
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.workproc.arr = arr;
+                        that.nameObj.workproc.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            if (item.name === '吨') {
+                                that.nameObj.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    prodate: that.filterForm.data.prodate[0],
+                    prodate2: that.filterForm.data.prodate[1],
+                    prodline: that.filterForm.data.prodline,
+                    workprocid: that.filterForm.data.workprocid,
+                    workproc: that.filterForm.data.workproc.join(','),
+                    materialcode: that.filterForm.data.materialcode,
+                    materialname: that.filterForm.data.materialname,
+                    type: that.filterForm.data.type.join(',')
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/ifmesemsswapfile/queryList/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let i = 0; i < res.data.list.length; i++) {
+                            let item = res.data.list[i];
+                            item.PRODATE = item.PRODATE.substr(0, 10);
+                            arr.push({
+                                seq: i,
+                                createtime: item.CREATETIME,
+                                id: item.FID,
+                                materialcode: item.MATERIALCODE,
+                                materialname: item.MATERIALNAME,
+                                orderno: item.ORDERNO,
+                                prodate: item.PRODATE,
+                                prodline: item.PRODLINE,
+                                qty: item.QTY,
+                                sendtime: item.SENDTIME,
+                                status: item.STATUS,
+                                type: item.TYPE,
+                                unit: item.UNIT,
+                                works: item.WORKS,
+                                workproc: item.WORKPROCID,
+                                memo: item.MEMO
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.$nextTick(() => {
+                        setTimeout(() => {
+                            that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
+                        }, 1);
+                    });
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (!that.filterForm.disabled || !that.filterForm.disabled[key]) {
+                    if (that.filterForm.data[key] instanceof Array) {
+                        that.filterForm.data[key] = [];
+                    } else {
+                        that.filterForm.data[key] = '';
+                    }
+                }
+            }
+            that.getTableData(1);
+        },
+        keyDown (event1, disabledFlag) {
+            let tdTarget = event1.target;
+            let _this = this;
+            while (tdTarget.tagName !== 'TD') {
+                tdTarget = tdTarget.parentElement;
+            }
+            if (event.keyCode) {
+                _this.codeT = event.keyCode;
+            }
+            // 如果按下键盘下键或者回车键
+            if (event.keyCode === 40 || event.keyCode === 13) {
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[this.seqArr.length - 1]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i + 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 38) { // 键盘上键
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[0]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i - 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 37) { // 键盘左键
+                $(tdTarget).prev().click();
+                $(tdTarget).prev().find('input').select();
+            } else if (event.keyCode === 39) { // 键盘右键
+                $(tdTarget).next().click();
+                $(tdTarget).next().find('input').select();
+            }
+        },
+        tableRowClassName ({row, rowIndex}) {
+            // 把每一行的索引放进row
+            row.index = rowIndex;
+        },
+        cellClick (row, column, cell, event) {
+            let _this = this;
+            this.rowIndex = row.index;
+            this.columnId = column.id;
+            let disabledFlag = false;
+            // if (!row[column.property] && row[column.property] !== null && row[column.property] !== '') {
+            //     _this.keyDown(event, true);
+            // }
+            _this.editSetFlag = row.index + column.id;
+            _this.focusTarget = event.target;
+            while (_this.focusTarget.tagName !== 'TD') {
+                _this.focusTarget = _this.focusTarget.parentElement;
+            }
+            _this.$nextTick(() => {
+                let target = this.focusTarget;
+                $(target).find('input').focus();
+            });
+        },
+        // 只允许对可编辑数据进行操作
+        checkboxT (row, index) {
+            let _this = this;
+            if (row.ed === 1 || _this.loginName === 'admin') {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            let arr = [];
+            for (let item of val) {
+                arr.push(item.seq);
+            }
+            this.seqArr = arr.sort(sortNumber);
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.id + '-' + item.prodate;
+                if (that.tableFormDataObj[xId]) {
+                    // 如果已存在该数据则使用该数据
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    // 负责则从对应行中获取行内原数据
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+        },
+        // 当上月底码发生改变时计算最终值
+        getApportValue (xid, value, rowIndex, event) {
+            let that = this;
+            if (!isNaN(Number(value))) {
+                if (!isNaN(Number(that.tableFormDataObj[xid].MINTVALUE)) && !isNaN(Number(that.tableFormDataObj[xid].MENDVALUE)) && that.tableFormDataObj[xid].MINTVALUE !== null && that.tableFormDataObj[xid].MENDVALUE !== null) {
+                    let poor = that.floatComputed(Number(that.tableFormDataObj[xid].MENDVALUE), Number(that.tableFormDataObj[xid].MINTVALUE), '-');
+                    that.tableFormDataObj[xid].APPORTVALUE = poor;
+                    // that.tableFormDataObj[xid].APPORTVALUE = that.floatComputed(poor, Number(that.tableFormDataObj[xid].mods), '*');
+                    // that.showRealValue(rowIndex, that.tableFormDataObj[xid].APPORTVALUE);
+                }
+            }
+        },
+        // 展示最终值
+        showRealValue (rowIndex, value) {
+            let that = this;
+            for (let i = 0; i < that.tableData.length; i++) {
+                if (i === rowIndex) {
+                    that.tableData[i].APPORTVALUE = value;
+                }
+            }
+        },
+        // 批量修改
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid, msg) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.tableFormDataObj) {
+                            SubmitData.push({
+                                clock: that.tableFormDataObj[key].CLOCK,
+                                itemid: that.tableFormDataObj[key].ITEMID,
+                                itemname: that.tableFormDataObj[key].ITEMNAME,
+                                itemdesc: that.tableFormDataObj[key].ITEMDESC,
+                                locateid: that.tableFormDataObj[key].LOCATEID,
+                                energyid: that.tableFormDataObj[key].ENERGYID,
+                                tagModulus: that.tableFormDataObj[key].TAG_MODULUS,
+                                apportvalue: that.tableFormDataObj[key].APPORTVALUE,
+                                mintvalue: that.tableFormDataObj[key].MINTVALUE,
+                                mendvalue: that.tableFormDataObj[key].MENDVALUE,
+                                bz: that.tableFormDataObj[key].bz,
+                                timegranid: that.tableFormDataObj[key].timegranid,
+                                unitid: that.tableFormDataObj[key].unitid,
+                                xh: that.tableFormDataObj[key].xh
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emscalpointvalues/batchupdate', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '保存成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                        } else {
+                            let col = Object.keys(msg)[0].split('.')[1];
+                            if (col && col === 'MENDVALUE') {
+                                this.$message.error('请填写正确的仪表期末值');
+                            } else if (col && col === 'APPORTVALUE') {
+                                this.$message.error('请填写正确的最终值');
+                            } else if (col && col === 'xh') {
+                                this.$message.error('请填写正确的序号:0以上的整数');
+                            } else {
+                                this.$message.error('数据不完整或者格式错误');
+                            }
+                        }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        }
+    }
+}
+function sortNumber (a, b) {
+  return a - b
+}
+</script>
+
+<style lang="less">
+.measuringManualEntry{
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+            }
+        }
+        .rowDisable td {
+            color: #6bb025 !important;
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+    }
+    .cnspicuous .el-checkbox__input.is-disabled .el-checkbox__inner {
+        background-color: #dcdfe6;
+        border-color: #babbbf;
+    }
+}
+</style>

+ 991 - 0
src/views/energyScheduling/components/investAndProduce/productMaterialsInOut.vue

@@ -0,0 +1,991 @@
+<template>
+    <!-- 实际产出人工录入 -->
+    <div class="measuringManualEntry">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="4">
+                            <el-form-item label="时间粒度">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.timegranid"
+                                    placeholder=""
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.timegranid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="日期">
+                                <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :type="'daterange'"
+                                    :timegranId="filterForm.data.timegranid"
+                                    :oneFoo="getTableData"
+                                    :defaultOffset="-1"
+                                    :custom="custom"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="工序">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.workproc"
+                                    placeholder="工序"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.workproc.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="物料名称">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.materialname"
+                                    placeholder="物料名称"
+                                    style="width: 100%;"
+                                ><template v-if="filterForm.data.type==='1'">
+                                    <el-option
+                                        v-for="item of nameObj.materialid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </template>
+                                <template v-if="filterForm.data.type==='2'">
+                                    <el-option
+                                        v-for="item of nameObj.productid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </template>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                         <el-col :span="4">
+                            <el-form-item label="物料编码">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.materialcode"
+                                    placeholder="物料编码"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row><!-- <el-row>
+                        <el-col :span="4">
+                            <el-form-item label="数据类型">
+                                <el-select
+                                    filterable
+                                    v-model="filterForm.data.type"
+                                    placeholder="数据类型"
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.type.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row> -->
+                </el-form>
+                <div class="box-top-gjl">
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-edit-outline"
+                        v-privilege="activeMenu + 'PUT'"
+                        @click="but_edit_plural()"
+                        :loading="loading"
+                    >保存</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getwaterData();"
+                        >生成</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            @click="but_redata()"
+                            :loading="loading"
+                        >生成数据</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <el-form
+                    size="mini"
+                    ref="dialog_form_arr"
+                    label-width="0px"
+                    :model="tableFormDataObj"
+                >
+                    <el-table stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        @selection-change="handleSelectionChange"
+                        show-summary
+                        :summary-method="getSummaries"
+                        :row-class-name="tableRowClassName"
+                        @cell-click="cellClick">
+                        <el-table-column
+                            type="selection"
+                            width="40"
+                            align="center"
+                            :selectable='checkboxT'
+                            fixed="left"
+                            class-name="cnspicuous"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="clock"
+                            label="时间"
+                            width="90px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="timegranId"
+                            label="时间粒度"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.timegranid.obj[scope.row.timegranId] ? nameObj.timegranid.obj[scope.row.timegranId] : scope.row.timegranId }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="unit"
+                            label="计量单位"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.unitid.obj[scope.row.unit] ? nameObj.unitid.obj[scope.row.unit] : scope.row.unit }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="workproc"
+                            label="工序"
+                            width="100px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.workproc.obj[scope.row.workproc] ? nameObj.workproc.obj[scope.row.workproc] : scope.row.workproc }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="materialname"
+                            label="物料名称"
+                            width="120px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                            <span v-if="filterForm.data.type==='2'">
+                            {{ nameObj.productid.obj[scope.row.materialname] ? nameObj.productid.obj[scope.row.materialname] : scope.row.materialname }}
+                            </span>
+                            <span v-if="filterForm.data.type==='1'">
+                            {{ nameObj.materialid.obj[scope.row.materialname] ? nameObj.materialid.obj[scope.row.materialname] : scope.row.materialname }}
+                            </span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="actualValue"
+                            label="计算值"
+                            width="120px"
+                            v-show="false"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="correctValue"
+                            label="修正值"
+                            width="120px"
+                            v-show="false"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                            <span v-if="scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
+                            <span v-else>{{ scope.row.correctValue }}</span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="apportValue"
+                            label="最终值"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemId + '-' + scope.row.clock + '.apportValue'"
+                                    :rules="tableFormRules.apportValue"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.itemId + '-' + scope.row.clock].apportValue"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.apportValue}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="materialcode"
+                            label="物料编码"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="userId"
+                            label="创建人"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="createtime"
+                            label="创建时间"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="upMan"
+                            label="修改人"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="upTime"
+                            label="修改时间"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="bz"
+                            label="备注"
+                            width="180px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection && (scope.row.ed === 1 || loginName === 'admin')"
+                                    :prop="scope.row.itemId + '-' + scope.row.clock + '.BZ'"
+                                    :rules="tableFormRules.bz"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.itemId + '-' + scope.row.clock].bz"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.bz}}</span>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-form>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: right;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1, checkInteger } from '~/utils/validator.js'
+import timegranDate from '@/components/zg/timegranDate.vue'
+import {formatDate, commonSummaries, getCookie} from '@/utils/util.js';
+export default {
+    name: 'measuringManualEntry',
+    components: {
+        'zj-timegran-date': timegranDate
+    },
+    data () {
+        return {
+            custom: 1,
+            filterForm: {
+                show: true,
+                data: {
+                    clock: '',
+                    workproc: '',
+                    workprocid: '',
+                    prodline: '',
+                    state: '',
+                    materialname: '',
+                    materialcode: '',
+                    type: '2'
+                },
+                rules: {
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            singleTableHeight: 100,
+            tableData: [],
+            loading: false,
+            tableLoading: false,
+            multipleSelection: [],
+            tableFormDataObj: {},
+            tableFormRules: {
+                mintvalue: [
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                mendvalue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                apportValue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                correctValue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                bz: [],
+                xh: [
+                    { validator: checkInteger, trigger: 'change' }
+                ]
+            },
+            nameObj: {
+                type: {
+                    obj: {
+                        '1': '投入',
+                        '2': '产出'
+                    },
+                    arr: [
+                        {
+                            id: '1',
+                            name: '投入'
+                        },
+                        {
+                            id: '2',
+                            name: '产出'
+                        }
+                    ]
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                },
+                timegranid: {
+                    obj: {
+                        'DAY': '日',
+                        'MONTH': '月',
+                        'YEAR': '年'
+                    },
+                    arr: [
+                        {
+                        id: 'DAY',
+                        name: '日'
+                        },
+                        {
+                        id: 'MONTH',
+                        name: '月'
+                        },
+                        {
+                          id: 'YEAR',
+                          name: '年'
+                        }
+                    ]
+                },
+                materialid: {
+                    obj: {},
+                    arr: []
+                },
+                workproc: {
+                    obj: {},
+                    arr: []
+                },
+                materialcode: {
+                    obj: {},
+                    arr: []
+                },
+                productid: {
+                    obj: {},
+                    arr: []
+                }
+            },
+            rowIndex: '',
+            columnId: '',
+            focusTarget: null,
+            seqArr: [],
+            editSetFlag: '',
+            loginName: 'admin' // getCookie('loginName')
+        }
+    },
+    created () {
+        // 获取按钮权限
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        // 接收路由参数
+        if (that.$route.query.workprocid) {
+            that.filterForm.data.workprocid = that.$route.query.workprocid;
+            let its = that.filterForm.data.workprocid.split(',');
+            if (its && its.length > 10) {
+                that.pageSize = 50;
+                that.custom = 0;
+            }
+        }
+        that.getNodeData();
+        that.getUnitIdData();
+        that.getProductIdData();
+        that.getMaterialIdData();
+        // that.getTableData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['actualValue', 'correctValue', 'apportValue']; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        // 获取原材料
+        getMaterialIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmmaterials/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.materialid.arr = arr;
+                        that.nameObj.materialid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取产品
+        getProductIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmproducts/?pageSize=1000000';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data.list) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.productid.arr = arr;
+                        that.nameObj.productid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取工序列表
+        getNodeData () {
+            let that = this
+            let url = 'pass/ems/v1/trmworkprocs/getIdAndName?issettle=1';
+            console.log('工序呢');
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.workproc.arr = arr;
+                        that.nameObj.workproc.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            if (item.name === '吨') {
+                                that.nameObj.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 计算修正值
+        rowSum: function (item, event) {
+            let result = 0;
+            let that = this;
+            result = Number(that.tableFormDataObj[item.itemId + '-' + item.clock].apportValue) - Number(that.tableFormDataObj[item.itemId + '-' + item.clock].actualValue);
+            return result;
+        },
+        // 获取表格中的数据
+        getwaterData () {
+            let that = this;
+            let url = 'pass/ems/v1/emswaterrealtimes/water';
+            that.axios.get(url)
+                .then(function (res) {
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    clock: that.filterForm.data.clock[0],
+                    clock2: that.filterForm.data.clock[1],
+                    prodline: that.filterForm.data.prodline,
+                    workprocid: that.filterForm.data.workprocid,
+                    workproc: that.filterForm.data.workproc.join(','),
+                    materialcode: that.filterForm.data.materialcode,
+                    materialname: that.filterForm.data.materialname,
+                    type: that.filterForm.data.type
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/ifmesemsswapfile/queryProductAndMaterial/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize + '&itemtype=R';
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let i = 0; i < res.data.list.length; i++) {
+                            let item = res.data.list[i];
+                            arr.push({
+                                seq: i,
+                                clock: item.CLOCK,
+                                itemId: item.ITEMID,
+                                actualValue: item.ACTUALVALUE,
+                                correctValue: item.CORRECTVALUE,
+                                apportValue: item.APPORTVALUE,
+                                materialcode: item.MES_MATERIALCODE,
+                                materialname: item.MATERIALNAME,
+                                timegranId: item.TIMEGRANID,
+                                userId: item.USERID,
+                                createtime: item.UPDATETIME,
+                                upMan: item.UPMAN,
+                                upTime: item.UPTIME,
+                                unit: item.UNITID,
+                                workproc: item.WORKPROCID,
+                                bz: item.BZ
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.$nextTick(() => {
+                        setTimeout(() => {
+                            that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
+                        }, 1);
+                    });
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (!that.filterForm.disabled || !that.filterForm.disabled[key]) {
+                    if (that.filterForm.data[key] instanceof Array) {
+                        that.filterForm.data[key] = [];
+                    } else {
+                        that.filterForm.data[key] = '';
+                    }
+                }
+            }
+            // 接收路由参数
+            if (that.$route.query.workprocid) {
+                that.filterForm.data.workprocid = that.$route.query.workprocid;
+                let its = that.filterForm.data.workprocid.split(',');
+                if (its && its.length > 10) {
+                    that.pageSize = 50;
+                    that.custom = 0;
+                }
+            }
+            that.filterForm.data.type = '1';
+            that.getTableData(1);
+        },
+        keyDown (event1, disabledFlag) {
+            let tdTarget = event1.target;
+            let _this = this;
+            while (tdTarget.tagName !== 'TD') {
+                tdTarget = tdTarget.parentElement;
+            }
+            if (event.keyCode) {
+                _this.codeT = event.keyCode;
+            }
+            // 如果按下键盘下键或者回车键
+            if (event.keyCode === 40 || event.keyCode === 13) {
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[this.seqArr.length - 1]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i + 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 38) { // 键盘上键
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[0]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i - 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 37) { // 键盘左键
+                $(tdTarget).prev().click();
+                $(tdTarget).prev().find('input').select();
+            } else if (event.keyCode === 39) { // 键盘右键
+                $(tdTarget).next().click();
+                $(tdTarget).next().find('input').select();
+            }
+        },
+        tableRowClassName ({row, rowIndex}) {
+            // 把每一行的索引放进row
+            row.index = rowIndex;
+        },
+        cellClick (row, column, cell, event) {
+            let _this = this;
+            this.rowIndex = row.index;
+            this.columnId = column.id;
+            let disabledFlag = false;
+            // if (!row[column.property] && row[column.property] !== null && row[column.property] !== '') {
+            //     _this.keyDown(event, true);
+            // }
+            _this.editSetFlag = row.index + column.id;
+            _this.focusTarget = event.target;
+            while (_this.focusTarget.tagName !== 'TD') {
+                _this.focusTarget = _this.focusTarget.parentElement;
+            }
+            _this.$nextTick(() => {
+                let target = this.focusTarget;
+                $(target).find('input').focus();
+            });
+        },
+        // 只允许对可编辑数据进行操作
+        checkboxT (row, index) {
+            let _this = this;
+            if (row.ed === 1 || _this.loginName === 'admin') {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            let arr = [];
+            for (let item of val) {
+                arr.push(item.seq);
+            }
+            this.seqArr = arr.sort(sortNumber);
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.itemId + '-' + item.clock;
+                if (that.tableFormDataObj[xId]) {
+                    // 如果已存在该数据则使用该数据
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    // 负责则从对应行中获取行内原数据
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+        },
+        // 批量修改
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid, msg) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.tableFormDataObj) {
+                            let correctvalue = Number(that.tableFormDataObj[key].apportValue) - Number(that.tableFormDataObj[key].actualValue);
+                            SubmitData.push({
+                                type: that.filterForm.data.type,
+                                itemid: that.tableFormDataObj[key].itemId,
+                                clock: that.tableFormDataObj[key].clock,
+                                timegranid: that.tableFormDataObj[key].timegranId,
+                                actualvalue: that.tableFormDataObj[key].actualValue,
+                                correctvalue: correctvalue,
+                                apportvalue: that.tableFormDataObj[key].apportValue,
+                                bz: that.tableFormDataObj[key].bz
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/ifmesemsswapfile/updateProductAndMaterial', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '保存成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                        } else {
+                           this.$message.error('修改失败');
+                        }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        },
+        // 重新生成数据
+        but_redata () {
+            let that = this;
+            that.$confirm('是否生成数据?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                state: 'warning'
+            }).then(() => {
+                that.loading = true;
+                let url = 'pass/ems/v1/ifmesemsswapfile/generateProductAndMaterial'
+                that.axios.get(url)
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            if (res.message && res.message !== '操作成功') {
+                                that.$message.warning('重新生成数据成功, 其中【' + res.message + '】');
+                            } else {
+                                that.$message({
+                                    message: res.data,
+                                    type: 'success'
+                                });
+                            }
+                            that.getTableData();
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                        that.loading = false;
+                    }).catch(function () {
+                        that.loading = false;
+                    });
+            }).catch(() => {
+            });
+        }
+    }
+}
+function sortNumber (a, b) {
+  return a - b
+}
+</script>
+
+<style lang="less">
+.measuringManualEntry{
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+            }
+        }
+        .rowDisable td {
+            color: #6bb025 !important;
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+    }
+    .cnspicuous .el-checkbox__input.is-disabled .el-checkbox__inner {
+        background-color: #dcdfe6;
+        border-color: #babbbf;
+    }
+}
+</style>

+ 970 - 0
src/views/energyScheduling/components/investAndProduce/productMaterialsInput.vue

@@ -0,0 +1,970 @@
+<template>
+    <!-- 实际投入人工录入 -->
+    <div class="measuringManualEntry">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="4">
+                            <el-form-item label="时间粒度">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.timegranid"
+                                    placeholder=""
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.timegranid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="日期">
+                                <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :type="'daterange'"
+                                    :timegranId="filterForm.data.timegranid"
+                                    :oneFoo="getTableData"
+                                    :defaultOffset="-1"
+                                    :custom="custom"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="工序">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.workproc"
+                                    placeholder="工序"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.workproc.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="物料名称">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.materialname"
+                                    placeholder="物料名称"
+                                    style="width: 100%;"
+                                ><template v-if="filterForm.data.type==='1'">
+                                    <el-option
+                                        v-for="item of nameObj.materialid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </template>
+                                <template v-if="filterForm.data.type==='2'">
+                                    <el-option
+                                        v-for="item of nameObj.productid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </template>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                         <el-col :span="4">
+                            <el-form-item label="物料编码">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.materialcode"
+                                    placeholder="物料编码"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row><el-row>
+                        <el-col :span="4">
+                            <el-form-item label="数据类型">
+                                <el-select
+                                    filterable
+                                    v-model="filterForm.data.type"
+                                    placeholder="数据类型"
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.type.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-edit-outline"
+                        v-privilege="activeMenu + 'PUT'"
+                        @click="but_edit_plural()"
+                        :loading="loading"
+                    >保存</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            @click="but_redata()"
+                            :loading="loading"
+                        >生成数据</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <el-form
+                    size="mini"
+                    ref="dialog_form_arr"
+                    label-width="0px"
+                    :model="tableFormDataObj"
+                >
+                    <el-table stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        @selection-change="handleSelectionChange"
+                        show-summary
+                        :summary-method="getSummaries"
+                        :row-class-name="tableRowClassName"
+                        @cell-click="cellClick">
+                        <el-table-column
+                            type="selection"
+                            width="40"
+                            align="center"
+                            :selectable='checkboxT'
+                            fixed="left"
+                            class-name="cnspicuous"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="clock"
+                            label="时间"
+                            width="90px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="timegranId"
+                            label="时间粒度"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.timegranid.obj[scope.row.timegranId] ? nameObj.timegranid.obj[scope.row.timegranId] : scope.row.timegranId }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="unit"
+                            label="计量单位"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.unitid.obj[scope.row.unit] ? nameObj.unitid.obj[scope.row.unit] : scope.row.unit }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="workproc"
+                            label="工序"
+                            width="100px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.workproc.obj[scope.row.workproc] ? nameObj.workproc.obj[scope.row.workproc] : scope.row.workproc }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="materialname"
+                            label="物料名称"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                            <span v-if="filterForm.data.type==='2'">
+                            {{ nameObj.productid.obj[scope.row.materialname] ? nameObj.productid.obj[scope.row.materialname] : scope.row.materialname }}
+                            </span>
+                            <span v-if="filterForm.data.type==='1'">
+                            {{ nameObj.materialid.obj[scope.row.materialname] ? nameObj.materialid.obj[scope.row.materialname] : scope.row.materialname }}
+                            </span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="actualValue"
+                            label="计算值"
+                            width="120px"
+                            v-show="false"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="correctValue"
+                            label="修正值"
+                            width="120px"
+                            v-show="false"
+                            :show-overflow-tooltip="true"
+                        ><template slot-scope="scope">
+                            <span v-if="scope.row.isSelection && scope.row.state !== '2'">{{ rowSum(scope.row) }}</span>
+                            <span v-else>{{ scope.row.correctValue }}</span>
+                        </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="apportValue"
+                            label="最终值"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemId + '-' + scope.row.clock + '.apportValue'"
+                                    :rules="tableFormRules.apportValue"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.itemId + '-' + scope.row.clock].apportValue"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.apportValue}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="materialcode"
+                            label="物料编码"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="userId"
+                            label="创建人"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="createtime"
+                            label="创建时间"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="upMan"
+                            label="修改人"
+                            width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="upTime"
+                            label="修改时间"
+                            width="160px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="bz"
+                            label="备注"
+                            width="180px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection && (scope.row.ed === 1 || loginName === 'admin')"
+                                    :prop="scope.row.itemId + '-' + scope.row.clock + '.BZ'"
+                                    :rules="tableFormRules.bz"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.itemId + '-' + scope.row.clock].bz"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.bz}}</span>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-form>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: right;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1, checkInteger } from '~/utils/validator.js'
+import timegranDate from '@/components/zg/timegranDate.vue'
+import {formatDate, commonSummaries, getCookie} from '@/utils/util.js';
+export default {
+    name: 'measuringManualEntry',
+    components: {
+        'zj-timegran-date': timegranDate
+    },
+    data () {
+        return {
+            custom: 1,
+            filterForm: {
+                show: true,
+                data: {
+                    clock: '',
+                    workproc: '',
+                    workprocid: '',
+                    prodline: '',
+                    state: '',
+                    materialname: '',
+                    materialcode: '',
+                    type: '1'
+                },
+                rules: {
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            singleTableHeight: 100,
+            tableData: [],
+            loading: false,
+            tableLoading: false,
+            multipleSelection: [],
+            tableFormDataObj: {},
+            tableFormRules: {
+                mintvalue: [
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                mendvalue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                apportValue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                correctValue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                bz: [],
+                xh: [
+                    { validator: checkInteger, trigger: 'change' }
+                ]
+            },
+            nameObj: {
+                type: {
+                    obj: {
+                        '1': '投入',
+                        '2': '产出'
+                    },
+                    arr: [
+                        {
+                            id: '1',
+                            name: '投入'
+                        },
+                        {
+                            id: '2',
+                            name: '产出'
+                        }
+                    ]
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                },
+                timegranid: {
+                    obj: {
+                        'DAY': '日',
+                        'MONTH': '月',
+                        'YEAR': '年'
+                    },
+                    arr: [
+                        {
+                        id: 'DAY',
+                        name: '日'
+                        },
+                        {
+                        id: 'MONTH',
+                        name: '月'
+                        },
+                        {
+                          id: 'YEAR',
+                          name: '年'
+                        }
+                    ]
+                },
+                materialid: {
+                    obj: {},
+                    arr: []
+                },
+                workproc: {
+                    obj: {},
+                    arr: []
+                },
+                materialcode: {
+                    obj: {},
+                    arr: []
+                },
+                productid: {
+                    obj: {},
+                    arr: []
+                }
+            },
+            rowIndex: '',
+            columnId: '',
+            focusTarget: null,
+            seqArr: [],
+            editSetFlag: '',
+            loginName: 'admin' // getCookie('loginName')
+        }
+    },
+    created () {
+        // 获取按钮权限
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        // 接收路由参数
+        if (that.$route.query.workprocid) {
+            that.filterForm.data.workprocid = that.$route.query.workprocid;
+            let its = that.filterForm.data.workprocid.split(',');
+            if (its && its.length > 10) {
+                that.pageSize = 50;
+                that.custom = 0;
+            }
+        }
+        that.getNodeData();
+        that.getUnitIdData();
+        that.getProductIdData();
+        that.getMaterialIdData();
+        // that.getTableData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['actualValue', 'correctValue', 'apportValue']; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        // 获取原材料
+        getMaterialIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmmaterials/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.materialid.arr = arr;
+                        that.nameObj.materialid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取产品
+        getProductIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmproducts/?pageSize=1000000';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data.list) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.productid.arr = arr;
+                        that.nameObj.productid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取工序列表
+        getNodeData () {
+            let that = this
+            let url = 'pass/ems/v1/trmworkprocs/getIdAndName?issettle=1';
+            console.log('工序呢');
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.workproc.arr = arr;
+                        that.nameObj.workproc.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            if (item.name === '吨') {
+                                that.nameObj.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 计算修正值
+        rowSum: function (item, event) {
+            let result = 0;
+            let that = this;
+            result = Number(that.tableFormDataObj[item.itemId + '-' + item.clock].apportValue) - Number(that.tableFormDataObj[item.itemId + '-' + item.clock].actualValue);
+            return result;
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    clock: that.filterForm.data.clock[0],
+                    clock2: that.filterForm.data.clock[1],
+                    prodline: that.filterForm.data.prodline,
+                    workprocid: that.filterForm.data.workprocid,
+                    workproc: that.filterForm.data.workproc.join(','),
+                    materialcode: that.filterForm.data.materialcode,
+                    materialname: that.filterForm.data.materialname,
+                    type: that.filterForm.data.type
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/ifmesemsswapfile/queryProductAndMaterial/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize + '&itemtype=R';
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let i = 0; i < res.data.list.length; i++) {
+                            let item = res.data.list[i];
+                            arr.push({
+                                seq: i,
+                                clock: item.CLOCK,
+                                itemId: item.ITEMID,
+                                actualValue: item.ACTUALVALUE,
+                                correctValue: item.CORRECTVALUE,
+                                apportValue: item.APPORTVALUE,
+                                materialcode: item.MES_MATERIALCODE,
+                                materialname: item.MATERIALNAME,
+                                timegranId: item.TIMEGRANID,
+                                userId: item.USERID,
+                                createtime: item.UPDATETIME,
+                                upMan: item.UPMAN,
+                                upTime: item.UPTIME,
+                                unit: item.UNITID,
+                                workproc: item.WORKPROCID,
+                                bz: item.BZ
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.$nextTick(() => {
+                        setTimeout(() => {
+                            that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
+                        }, 1);
+                    });
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (!that.filterForm.disabled || !that.filterForm.disabled[key]) {
+                    if (that.filterForm.data[key] instanceof Array) {
+                        that.filterForm.data[key] = [];
+                    } else {
+                        that.filterForm.data[key] = '';
+                    }
+                }
+            }
+            // 接收路由参数
+            if (that.$route.query.workprocid) {
+                that.filterForm.data.workprocid = that.$route.query.workprocid;
+                let its = that.filterForm.data.workprocid.split(',');
+                if (its && its.length > 10) {
+                    that.pageSize = 50;
+                    that.custom = 0;
+                }
+            }
+            that.filterForm.data.type = '1';
+            that.getTableData(1);
+        },
+        keyDown (event1, disabledFlag) {
+            let tdTarget = event1.target;
+            let _this = this;
+            while (tdTarget.tagName !== 'TD') {
+                tdTarget = tdTarget.parentElement;
+            }
+            if (event.keyCode) {
+                _this.codeT = event.keyCode;
+            }
+            // 如果按下键盘下键或者回车键
+            if (event.keyCode === 40 || event.keyCode === 13) {
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[this.seqArr.length - 1]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i + 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 38) { // 键盘上键
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[0]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i - 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 37) { // 键盘左键
+                $(tdTarget).prev().click();
+                $(tdTarget).prev().find('input').select();
+            } else if (event.keyCode === 39) { // 键盘右键
+                $(tdTarget).next().click();
+                $(tdTarget).next().find('input').select();
+            }
+        },
+        tableRowClassName ({row, rowIndex}) {
+            // 把每一行的索引放进row
+            row.index = rowIndex;
+        },
+        cellClick (row, column, cell, event) {
+            let _this = this;
+            this.rowIndex = row.index;
+            this.columnId = column.id;
+            let disabledFlag = false;
+            // if (!row[column.property] && row[column.property] !== null && row[column.property] !== '') {
+            //     _this.keyDown(event, true);
+            // }
+            _this.editSetFlag = row.index + column.id;
+            _this.focusTarget = event.target;
+            while (_this.focusTarget.tagName !== 'TD') {
+                _this.focusTarget = _this.focusTarget.parentElement;
+            }
+            _this.$nextTick(() => {
+                let target = this.focusTarget;
+                $(target).find('input').focus();
+            });
+        },
+        // 只允许对可编辑数据进行操作
+        checkboxT (row, index) {
+            let _this = this;
+            if (row.ed === 1 || _this.loginName === 'admin') {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            let arr = [];
+            for (let item of val) {
+                arr.push(item.seq);
+            }
+            this.seqArr = arr.sort(sortNumber);
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.itemId + '-' + item.clock;
+                if (that.tableFormDataObj[xId]) {
+                    // 如果已存在该数据则使用该数据
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    // 负责则从对应行中获取行内原数据
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+        },
+        // 批量修改
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid, msg) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.tableFormDataObj) {
+                            let correctvalue = Number(that.tableFormDataObj[key].apportValue) - Number(that.tableFormDataObj[key].actualValue);
+                            SubmitData.push({
+                                type: that.filterForm.data.type,
+                                itemid: that.tableFormDataObj[key].itemId,
+                                clock: that.tableFormDataObj[key].clock,
+                                timegranid: that.tableFormDataObj[key].timegranId,
+                                actualvalue: that.tableFormDataObj[key].actualValue,
+                                correctvalue: correctvalue,
+                                apportvalue: that.tableFormDataObj[key].apportValue,
+                                bz: that.tableFormDataObj[key].bz
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/ifmesemsswapfile/updateProductAndMaterial', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '保存成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                        } else {
+                           this.$message.error('修改失败');
+                        }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        },
+        // 重新生成数据
+        but_redata () {
+            let that = this;
+            that.$confirm('是否生成数据?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                state: 'warning'
+            }).then(() => {
+                that.loading = true;
+                let url = 'pass/ems/v1/ifmesemsswapfile/generateProductAndMaterial'
+                that.axios.get(url)
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            if (res.message && res.message !== '操作成功') {
+                                that.$message.warning('重新生成数据成功, 其中【' + res.message + '】');
+                            } else {
+                                that.$message({
+                                    message: res.data,
+                                    type: 'success'
+                                });
+                            }
+                            that.getTableData();
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                        that.loading = false;
+                    }).catch(function () {
+                        that.loading = false;
+                    });
+            }).catch(() => {
+            });
+        }
+    }
+}
+function sortNumber (a, b) {
+  return a - b
+}
+</script>
+
+<style lang="less">
+.measuringManualEntry{
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+            }
+        }
+        .rowDisable td {
+            color: #6bb025 !important;
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+    }
+    .cnspicuous .el-checkbox__input.is-disabled .el-checkbox__inner {
+        background-color: #dcdfe6;
+        border-color: #babbbf;
+    }
+}
+</style>

+ 703 - 0
src/views/energyScheduling/components/measuringLocationData/AbnormalDataMaintenance.vue

@@ -0,0 +1,703 @@
+<template>
+    <!-- 异常数据维护 -->
+    <div class="AbnormalDataMaintenance">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="日期">
+                                <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :type="'daterange'"
+                                    :timegranId="filterForm.data.timegranid"
+                                    :oneFoo="getTableData"
+                                    :defaultOffset="-1"
+                                    :custom="1"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                         <el-col :span="6">
+                            <el-form-item label="能介类型">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.energytypeid"
+                                    placeholder="能介类型"
+                                    style="width: 100%;"
+                                >
+                                  <el-option
+                                        v-for="item of energytypeid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                           <el-col :span="6">
+                            <el-form-item label="能介">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.energyid"
+                                    multiple
+                                    collapse-tags
+                                    placeholder="能介"
+                                    style="width: 100%;"
+                                >
+                                  <el-option
+                                        v-for="item of nameObj.energyid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                             <el-form-item label="位置">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.locateid"
+                                    placeholder="位置"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.locateid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="计量点编号">
+                                <el-input
+                                    clearable
+                                    v-model.trim="filterForm.data.itemid"
+                                    placeholder="计量点编号"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点名称">
+                                <el-input
+                                    clearable
+                                    v-model.trim="filterForm.data.itemname"
+                                    placeholder="计量点名称"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <el-form
+                    size="mini"
+                    ref="dialog_form_arr"
+                    label-width="0px"
+                    :model="tableFormDataObj"
+                >
+                    <el-table
+                        stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        show-summary
+                        :summary-method="getSummaries"
+                    >
+                        <!-- <el-table-column
+                            sortable
+                            type="selection"
+                            width="40"
+                            align="center"
+                            fixed="left"
+                        ></el-table-column> -->
+                        <el-table-column
+                            sortable
+                            prop="clock"
+                            label="时间"
+                            width="140px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="itemid"
+                            label="计量点编号"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="itemname"
+                            label="计量点名称"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                           <el-table-column
+                            sortable
+                            prop="energyid"
+                            label="能介"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                           <span>{{nameObj.energyid.obj[scope.row.energyid] ? nameObj.energyid.obj[scope.row.energyid] : scope.row.energyid }}</span>
+                            </template>
+                        </el-table-column>
+                         <el-table-column
+                            sortable
+                            prop="energytypeid"
+                            label="能介类型"
+                            width="80px"
+                            :show-overflow-tooltip="true"
+                        >  <template slot-scope="scope">
+                           <span>{{energytypeid.obj[scope.row.energytypeid] ? energytypeid.obj[scope.row.energytypeid] : scope.row.energytypeid }}</span>
+                            </template>
+                        </el-table-column>
+                              <el-table-column
+                            sortable
+                            prop="extype"
+                            label="异常数据类型"
+                            width="100px"
+                            :show-overflow-tooltip="true"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="locateid"
+                            label="位置"
+                             min-width="80px"
+                            :show-overflow-tooltip="true"
+                            >
+                            <template slot-scope="scope">
+                                <span>{{nameObj.locateid.obj[scope.row.locateid] ? nameObj.locateid.obj[scope.row.locateid] : scope.row.locateid }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="maxvalue"
+                            label="日最大值"
+                            min-width="90px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="minvalue"
+                            label="日最小值"
+                            width="90px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable prop="apportvalue"
+                            label="最终值"
+                            width="90px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="befvalue"
+                            label="仪表变小前值"
+                            min-width="70px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="curvalue"
+                            label="仪表当前值"
+                            min-width="70px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="createtime"
+                            label="创建时间"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                         <el-table-column
+                            sortable
+                            prop="bz"
+                            label="备注"
+                            min-width="140px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                    </el-table>
+                </el-form>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: right;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '~/utils/validator.js'
+import store from '@/store/index.js';
+import timegranDate from '@/components/zg/timegranDate.vue'
+import { formatDate, commonSummaries } from '@/utils/util.js';
+export default {
+    name: 'AbnormalDataMaintenance',
+    components: {
+        'zj-timegran-date': timegranDate
+    },
+    data () {
+        return {
+            multipleSelection: [],
+            tableFormDataObj: {},
+            store,
+            userInfo: {
+                data: null
+            },
+            activeMenu: '',
+            filterForm: {
+                show: true,
+                data: {
+                    id: '',
+                    clock: '',
+                    itemid: '',
+                    extype: '',
+                    maxvalue: '',
+                    minvalue: '',
+                    apportvalue: '',
+                    befvalue: '',
+                    curvalue: '',
+                    createtime: '',
+                    itemname: '',
+                    energyid: '',
+                    energytypeid: '',
+                    locateid: '',
+                    bz: ''
+                },
+                disabled: {
+                    locateid: false,
+                    energyid: false
+                },
+                rules: {
+
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            singleTableHeight: 200,
+            tableData: [],
+            loading: false,
+            tableLoading: false,
+            energytypeid: {
+                obj: {
+                    'W': '水',
+                    'E': '电',
+                    'P': '动力'
+                },
+                arr: [
+                    {
+                        id: 'W',
+                        name: '水'
+                    },
+                    {
+                        id: 'E',
+                        name: '电'
+                    },
+                    {
+                        id: 'P',
+                        name: '动力'
+                    }
+                ]
+            },
+            nameObj: {
+                 locateid: {
+                    obj: {},
+                    arr: []
+                },
+                   energyid: {
+                    obj: {},
+                    arr: []
+                }
+            },
+            dialog: {
+                editorBox: {
+                    show: false,
+                    type: '',
+                    form: {
+                        data: {
+                            locateid: '',
+                            energyid: ''
+                        }
+                    }
+                },
+                trendChart: {
+                    show: false,
+                    size: 7,
+                    form: {
+                        data: {
+                            chartSeriesType: 'bar'
+                        }
+                    },
+                    chart: {
+                        show: true,
+                        option: {
+                            tooltip: {
+                                trigger: 'axis'
+                            },
+                            legend: {
+                                data: []
+                            },
+                            toolbox: {
+                                feature: {
+                                    saveAsImage: {}
+                                }
+                            },
+                            xAxis: {
+                                type: 'category',
+                                data: []
+                            },
+                            yAxis: {
+                                type: 'value'
+                            },
+                            series: [
+
+                            ]
+                        }
+                    }
+                }
+            }
+        }
+    },
+    created () {
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        that.store.dispatch('getUserInfo').then((res) => {
+            that.userInfo.data = res.data;
+        });
+        // 接收路由参数
+        if (that.$route.query.locateid) {
+            that.filterForm.disabled.locateid = true;
+            that.filterForm.data.locateid = that.$route.query.locateid;
+        }
+        if (that.$route.query.energyid) {
+            that.filterForm.disabled.energyid = true;
+            that.filterForm.data.energyid = that.$route.query.energyid;
+        }
+        if (that.$route.query.itemtype) {
+            that.filterForm.data.itemtype = that.$route.query.itemtype;
+        }
+        // that.getTableData();
+        that.getlocateid();
+        that.getenergyid();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = []; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    id: that.filterForm.data.id,
+                    clock: that.filterForm.data.clock[0],
+                    clocke: that.filterForm.data.clock[1],
+                    itemid: that.filterForm.data.itemid,
+                    itemname: that.filterForm.data.itemname,
+                    extype: that.filterForm.data.extype,
+                    maxvalue: that.filterForm.data.maxvalue,
+                    minvalue: that.filterForm.data.minvalue,
+                    apportvalue: that.filterForm.data.apportvalue,
+                    befvalue: that.filterForm.data.befvalue,
+                    curvalue: that.filterForm.data.curvalue,
+                    createtime: that.filterForm.data.createtime,
+                    energytypeid: that.filterForm.data.energytypeid,
+                    energyid: that.filterForm.data.energyid.toString(),
+                    locateid: that.filterForm.data.locateid.toString(),
+                    bz: that.filterForm.data.bz
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/trmcalpointexvalues/getExData?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let item of res.data.list) {
+                            arr.push({
+                                id: item.ID,
+                                clock: item.CLOCK,
+                                itemid: item.ITEMID,
+                                itemname: item.ITEMNAME,
+                                extype: item.EXTYPE,
+                                maxvalue: item.MAXVALUE,
+                                minvalue: item.MINVALUE,
+                                apportvalue: item.APPORTVALUE,
+                                befvalue: item.BEFVALUE,
+                                curvalue: item.CURVALUE,
+                                createtime: item.CREATETIME,
+                                energytypeid: item.ENERGYTYPEID,
+                                energyid: item.ENERGYID,
+                                locateid: item.LOCATEID,
+                                bz: item.BZ
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    that.$nextTick(() => {
+                        setTimeout(() => {
+                            that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
+                        }, 1);
+                    });
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (!that.filterForm.disabled || !that.filterForm.disabled[key]) {
+                    if (that.filterForm.data[key] instanceof Array) {
+                        that.filterForm.data[key] = [];
+                    } else {
+                        that.filterForm.data[key] = '';
+                    }
+                }
+            }
+            that.getTableData(1);
+        },
+           // 获取位置
+         getlocateid () {
+            let that = this
+            let url = 'pass/ems/v1/trmlocations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.locateid.arr = arr;
+                        that.nameObj.locateid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+              // 获取能介
+        getenergyid () {
+            let that = this;
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name,
+                                energytypeid: item.energytypeid,
+                                unitid: item.unitid
+                            })
+                            obj[item.id] = item.name
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 表格中多选按钮的相关方法
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.itemid + '-' + item.clock + '-' + item.timegranid;
+                if (that.tableFormDataObj[xId]) {
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+        },
+        look_trendChart () {
+            let that = this;
+            if (this.multipleSelection && this.multipleSelection.length > 0) {
+                that.getTrendChart();
+                that.dialog.trendChart.show = true;
+            } else {
+                this.$message.error('请选择计量点');
+            }
+        },
+        chartSeriesType () {
+            let that = this;
+            for (let item of that.dialog.trendChart.chart.option.series) {
+                item.type = that.dialog.trendChart.form.data.chartSeriesType;
+            }
+            // that.dialog.trendChart.chart.show = false;
+            // setTimeout(() => {
+            //     that.dialog.trendChart.chart.show = true;
+            // }, 100);
+            that.$refs['graphical'].setGraphical();
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.AbnormalDataMaintenance {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+    }
+    .attribute-box {
+        .item {
+            border: #ccc 1px solid;
+            padding: 5px;
+            margin-bottom: 6px;
+            .bt {
+                font-size: 14px;
+                font-weight: 600;
+                color: #000;
+                padding-left: 10px;
+                border-left: #008fe0 5px solid;
+            }
+        }
+    }
+}
+</style>

+ 726 - 0
src/views/energyScheduling/components/measuringLocationData/components/measurementPlaceChoose.vue

@@ -0,0 +1,726 @@
+<template>
+    <div class="measurementPlaceChoose">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="8">
+                            <el-form-item label="能介类型">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.energytypeid"
+                                    placeholder="能介类型"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.energytypeid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="8">
+                            <el-form-item label="能介">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.energyid"
+                                    placeholder="能介"
+                                    style="width: 100%;"
+                                >
+                                    <template v-for="item of nameObj.energyid.arr">
+                                        <el-option
+                                            v-if="item.energytypeid === filterForm.data.energytypeid || filterForm.data.energytypeid === ''"
+                                            :key="item.id"
+                                            :value="item.id"
+                                            :label="item.name"
+                                        ></el-option>
+                                    </template>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="8">
+                            <el-form-item label="用能属性">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.propertyid"
+                                    placeholder="用能属性"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.propertyid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="8">
+                            <el-form-item label="手抄或自动">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.itemtype"
+                                    placeholder="手抄或自动"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.itemtype.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="8">
+                            <el-form-item label="位置">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.locateid"
+                                    placeholder="位置"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.locateid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="8">
+                            <el-form-item label="计量点编号">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.itemid"
+                                    placeholder="计量点编号"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="8">
+                            <el-form-item label="计量点名称">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.itemname"
+                                    placeholder="计量点名称"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="8">
+                            <el-form-item label="站所">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.networkid"
+                                    placeholder="站所"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.networkid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="8">
+                            <el-form-item label="TAG点别名">
+                                <el-input clearable
+                                    v-model="filterForm.data.tagAlias"
+                                    placeholder="TAG点别名"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div style="text-align: right;margin-bottom: 5px;border-bottom: 1px #ccc solid;padding-bottom: 5px;">
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-search"
+                        @click="getTableData(1)"
+                    >查询</el-button>
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-refresh"
+                        @click="tableDataCancel();"
+                    >重置</el-button>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <div class="box-left">
+                    <el-table stripe
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="'250px'"
+                        border
+                        size="mini"
+                        highlight-current-row
+                    >
+                        <el-table-column
+                            label="查询结果"
+                        >
+                            <el-table-column
+                    sortable
+                                prop="itemid"
+                                label="计量点编号"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                            <el-table-column
+                    sortable
+                                prop="itemname"
+                                label="计量点名称"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                            <el-table-column
+                    sortable
+                                prop="tagAlias"
+                                label="TAG别名"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                            <el-table-column
+                    sortable
+                                prop="itemtype"
+                                label="手抄或者自动"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            >
+                                <template slot-scope="scope">
+                                    <span>{{ nameObj.itemtype.obj[scope.row.itemtype] ? nameObj.itemtype.obj[scope.row.itemtype] : scope.row.itemtype }}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                    sortable
+                                prop="locateid"
+                                label="位置"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            >
+                                <template slot-scope="scope">
+                                    <span>{{ nameObj.locateid.obj[scope.row.locateid] ? nameObj.locateid.obj[scope.row.locateid] : scope.row.locateid }}</span>
+                                </template>
+                            </el-table-column>
+                        </el-table-column>
+                        <el-table-column
+                            label="操作"
+                            align="center"
+                            width="70px"
+                            fixed="right"
+                        >
+                            <template slot-scope="scope">
+                                <div>
+                                    <el-button
+                                        v-if="typeof selectedObj[scope.row.itemid] === 'undefined'"
+                                        type="primary"
+                                        size="mini"
+                                        @click="rowAdd(scope.row)"
+                                    >选择</el-button>
+                                    <el-button
+                                        v-else
+                                        type="danger"
+                                        size="mini"
+                                        @click="rowDel(scope.row)"
+                                    >取消</el-button>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                    <el-pagination
+                        layout="total, sizes, prev, pager, next, jumper"
+                        :total="total"
+                        :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                        :page-size="pageSize"
+                        :current-page.sync="pageNum"
+                        @size-change="tableSizeChange"
+                        :pager-count="5"
+                        @current-change="getTableData()"
+                        style="text-align: right;margin-top: 10px;"
+                    ></el-pagination>
+                </div>
+                <div class="box-right">
+                    <el-table stripe
+                        :data="selectedData"
+                        style="width: 100%"
+                        :height="'288px'"
+                        border
+                        size="mini"
+                        highlight-current-row
+                    >
+                        <el-table-column
+                            label="已选择计量点"
+                        >
+                            <el-table-column
+                    sortable
+                                prop="itemid"
+                                label="计量点编号"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                            <el-table-column
+                    sortable
+                                prop="itemname"
+                                label="计量点名称"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                            <el-table-column
+                    sortable
+                                prop="tagAlias"
+                                label="TAG别名"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                        </el-table-column>
+                        <el-table-column
+                            label="操作"
+                            align="center"
+                            width="70px"
+                            fixed="right"
+                        >
+                            <template slot-scope="scope">
+                                <div>
+                                    <el-button
+                                        type="danger"
+                                        size="mini"
+                                        @click="rowDel(scope.row)"
+                                    >取消</el-button>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'measurementPlaceChoose',
+    props: {
+        z_data: {
+            type: Object,
+            default: function () {
+                return {
+                    codes: '',
+                    names: ''
+                };
+            }
+        }
+    },
+    data () {
+        return {
+            filterForm: {
+                data: {
+                    energytypeid: '',
+                    energyid: '',
+                    propertyid: '',
+                    itemtype: '',
+                    locateid: '',
+                    itemid: '',
+                    itemname: '',
+                    networkid: '',
+                    tagAlias: ''
+                },
+                rules: {
+
+                }
+            },
+            tableData: [
+                // {
+                //     itemid: 'WI190VRS4CJYS501',
+                //     itemname: '长江取水量',
+                //     tagAlias: '',
+                //     itemtype: '自动上传',
+                //     locateid: '公共'
+                // },
+                // {
+                //     itemid: 'WS270Z_____CK501',
+                //     itemname: '中水回用量',
+                //     tagAlias: '',
+                //     itemtype: '自动上传',
+                //     locateid: '公共'
+                // }
+            ],
+            nameObj: {
+                energytypeid: {
+                    obj: {},
+                    arr: []
+                },
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                propertyid: {
+                    obj: {},
+                    arr: []
+                },
+                locateid: {
+                    obj: {},
+                    arr: []
+                },
+                networkid: {
+                    obj: {},
+                    arr: []
+                },
+                itemtype: {
+                    obj: {
+                        'AUTO': '自动上传',
+                        'MANUAL': '手抄',
+                        'VIRTUAL': '虚拟',
+                        'IMMEDIATE': '瞬时点'
+                    },
+                    arr: [
+                        {
+                            id: 'AUTO',
+                            name: '自动上传'
+                        },
+                        {
+                            id: 'MANUAL',
+                            name: '手抄'
+                        },
+                        {
+                            id: 'VIRTUAL',
+                            name: '虚拟'
+                        },
+                        {
+                            id: 'IMMEDIATE',
+                            name: '瞬时点'
+                        }
+                    ]
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            tableLoading: false,
+            selectedData: [
+                // {
+                //     itemid: 'WI190VRS4CJYS501',
+                //     itemname: '长江取水量'
+                // },
+                // {
+                //     itemid: 'WS270Z_____CK501',
+                //     itemname: '中水回用量'
+                // }
+            ],
+            bf_data: [],
+            loading: false
+        }
+    },
+    computed: {
+        selectedObj: function () {
+            let that = this;
+            let obj = {};
+            for (let item of that.selectedData) {
+                obj[item.itemid] = item.itemname;
+            }
+            return obj;
+        }
+    },
+    mounted () {
+        let that = this;
+        that.getEnergyTypeIdData();
+        that.getEnergyIdData();
+        that.getPropertyIdData();
+        that.getLocateIdData();
+        that.getNetworkIdData();
+        that.getTableData();
+    },
+    methods: {
+        // 获取能介类型
+        getEnergyTypeIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergytypes/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.energytypeid.arr = arr;
+                        that.nameObj.energytypeid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取能介
+        getEnergyIdData () {
+            let that = this;
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name,
+                                energytypeid: item.energytypeid,
+                                unitid: item.unitid
+                            })
+                            obj[item.id] = {
+                                name: item.name,
+                                unitid: item.unitid
+                            }
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取属性
+        getPropertyIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergypropertys/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.propertyid.arr = arr;
+                        that.nameObj.propertyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取位置
+        getLocateIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmlocations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.locateid.arr = arr;
+                        that.nameObj.locateid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取站所
+        getNetworkIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmstations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.networkid.arr = arr;
+                        that.nameObj.networkid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    energytypeid: that.filterForm.data.energytypeid,
+                    energyid: that.filterForm.data.energyid,
+                    propertyid: that.filterForm.data.propertyid,
+                    itemtype: that.filterForm.data.itemtype,
+                    locateid: that.filterForm.data.locateid,
+                    itemid: that.filterForm.data.itemid,
+                    itemname: that.filterForm.data.itemname,
+                    networkid: that.filterForm.data.networkid,
+                    tagAlias: that.filterForm.data.tagAlias,
+                    useflag: '1'
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/trmcalpoints/like/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let item of res.data.list) {
+                            arr.push({
+                                itemid: item.itemid,
+                                itemname: item.itemname,
+                                tagAlias: item.tagAlias,
+                                itemtype: item.itemtype,
+                                locateid: item.locateid
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (that.filterForm.data[key] instanceof Array) {
+                    that.filterForm.data[key] = [];
+                } else {
+                    that.filterForm.data[key] = '';
+                }
+            }
+            that.getTableData(1);
+        },
+        rowAdd (row) {
+            let that = this;
+            that.selectedData.push({
+                itemid: row.itemid,
+                itemname: row.itemname,
+                tagAlias: row.tagAlias
+            })
+        },
+        rowDel (row) {
+            let that = this;
+            for (let i = 0; i < that.selectedData.length; i++) {
+                if (row.itemid === that.selectedData[i].itemid) {
+                    that.selectedData.splice(i, 1);
+                    break;
+                }
+            }
+        },
+        // 清除所有选择
+        empty () {
+            let that = this;
+            that.selectedData = [];
+            that.bf_data = [];
+            that.z_data.codes = '';
+            that.z_data.names = '';
+        },
+        // 取消时将数组还原
+        but_cancel () {
+            let that = this;
+            that.selectedData = JSON.parse(JSON.stringify(that.bf_data));
+        },
+        // 确定时修改返回代码串,并将数组保存
+        but_save () {
+            let that = this;
+            let codes = '',
+                names = '';
+            for (let item of that.selectedData) {
+                if (codes !== '') {
+                    codes += ',';
+                    names += ',';
+                }
+                codes += item.itemid;
+                names += item.itemname;
+            }
+            that.z_data.codes = codes;
+            that.z_data.names = names;
+            that.bf_data = JSON.parse(JSON.stringify(that.selectedData));
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.measurementPlaceChoose {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                margin-top: -7px;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .box-bottom {
+            overflow: hidden;
+            .box-left {
+                width: 60%;
+                float: left;
+                padding-right: 3px;
+            }
+            .box-right {
+                width: 40%;
+                float: left;
+                padding-left: 3px;
+            }
+        }
+    }
+}
+</style>

+ 1401 - 0
src/views/energyScheduling/components/measuringLocationData/manualmeasuringLocationEntry.vue

@@ -0,0 +1,1401 @@
+<template>
+    <!-- 计量点数据录入-分厂 -->
+    <div class="manmalmeasuringLocationAdd">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="时间粒度">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.timegranid"
+                                    placeholder="时间粒度"
+                                    style="width: 100%;"
+                                    disabled
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.timegranid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="日期">
+                                <!-- <el-date-picker
+                                    value-format="yyyy-MM-dd"
+                                    type="date"
+                                    v-model="filterForm.data.clock"
+                                    placeholder="时间"
+                                    style="width: 100%;"
+                                ></el-date-picker> -->
+                                <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :timegranId="filterForm.data.timegranid"
+                                    :oneFoo="getTableData"
+                                    :defaultOffset="-1"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="能介类型">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.energytypeid"
+                                    placeholder="能介类型"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.energytypeid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="能介">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.energyid"
+                                    placeholder="能介"
+                                    style="width: 100%;"
+                                >
+                                    <template v-for="item of nameObj.energyid.arr">
+                                        <el-option
+                                            v-if="item.energytypeid === filterForm.data.energytypeid || filterForm.data.energytypeid === ''"
+                                            :key="item.id"
+                                            :value="item.id"
+                                            :label="item.name"
+                                        ></el-option>
+                                    </template>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="手抄或自动">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.itemtype"
+                                    placeholder="手抄或自动"
+                                    style="width: 100%;"
+                                    disabled
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.itemtype.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="位置">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.locateid"
+                                    placeholder="位置"
+                                    style="width: 100%;"
+                                    disabled
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.locateid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点编号">
+                                <el-input
+                                    clearable
+                                    v-model="filterForm.data.itemid"
+                                    placeholder="计量点编号"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点名称">
+                                <el-input
+                                    clearable
+                                    v-model="filterForm.data.itemname"
+                                    placeholder="计量点名称"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="站所">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.networkid"
+                                    placeholder="站所"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.networkid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <!-- <el-col :span="6">
+                            <el-form-item label="计量层级">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.hierarchy"
+                                    placeholder="计量层级"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.hierarchy.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col> -->
+                        <el-col :span="6">
+                            <el-form-item label="TAG点别名">
+                                <el-input
+                                    clearable
+                                    v-model="filterForm.data.tagAlias"
+                                    placeholder="TAG点别名"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <!-- <el-button
+                        type="primary"
+                        size="mini"
+                        @click="look_trendChart()"
+                    >查看趋势</el-button> -->
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-edit-outline"
+                        v-privilege="activeMenu + 'PUT'"
+                        @click="but_edit_plural()"
+                        :loading="loading"
+                    >修改</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <el-form
+                    size="mini"
+                    ref="dialog_form_arr"
+                    label-width="0px"
+                    :model="tableFormDataObj"
+                >
+                    <el-table
+                        stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        @selection-change="handleSelectionChange"
+                        show-summary
+                        :summary-method="getSummaries"
+                    >
+                        <el-table-column
+                            sortable
+                            type="selection"
+                            width="40"
+                            align="center"
+                            fixed="left"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="timegranid"
+                            label="时间粒度"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.timegranid.obj[scope.row.timegranid] ? nameObj.timegranid.obj[scope.row.timegranid] : scope.row.timegranid }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="clock"
+                            label="时间"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="itemid"
+                            label="计量点编号"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="itemname"
+                            label="计量点名称"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="tagAlias"
+                            label="TAG别名"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="tagModulus"
+                            label="倍率"
+                            width="60px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            :sort-by="function(row, index) { return sortFoo(row, index, 'unitid') }"
+                            prop="unitid"
+                            label="计量单位"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.unitid.obj[scope.row.unitid] ? nameObj.unitid.obj[scope.row.unitid] : scope.row.unitid }}</span>
+                            </template>
+                        </el-table-column>
+                        <!-- <el-table-column
+                            sortable
+                            prop="mintvalue"
+                            label="仪表期初值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="mendvalue"
+                            label="仪表期末值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            label="期末-期初"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ isNaN(scope.row.mendvalue - scope.row.mintvalue) ? '' : floatComputed(scope.row.mendvalue, scope.row.mintvalue, '-') }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="actualvalue"
+                            label="计算值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="correctvalue"
+                            label="修正值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.correctvalue'"
+                                    :rules="dialog.editorBox.form.rules.correctvalue"
+                                >
+                                    <el-input
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].correctvalue"
+                                        @change="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].apportvalue = floatComputed(scope.row.actualvalue, tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].correctvalue, '+')"
+                                    ></el-input>
+                                    <template
+                                        slot="error"
+                                        slot-scope="scope"
+                                    >
+                                        <p
+                                            class="error"
+                                            :title="scope.error"
+                                        >{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.correctvalue}}</span>
+                            </template>
+                        </el-table-column> -->
+                        <el-table-column
+                            sortable
+                            prop="apportvalue"
+                            label="最终值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.apportvalue'"
+                                    :rules="dialog.editorBox.form.rules.apportvalue"
+                                >
+                                    <el-input
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].apportvalue"
+                                        @change="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].correctvalue = floatComputed(tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].apportvalue, scope.row.actualvalue, '-')"
+                                    ></el-input>
+                                    <template
+                                        slot="error"
+                                        slot-scope="scope"
+                                    >
+                                        <p
+                                            class="error"
+                                            :title="scope.error"
+                                        >{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.apportvalue}}</span>
+                            </template>
+                        </el-table-column>
+                        <!-- <el-table-column
+                            sortable
+                            prop="sumvalue"
+                            label="累计值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > </el-table-column> -->
+                        <el-table-column
+                            sortable
+                            prop="updatereason"
+                            label="修改原因"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.updatereason'"
+                                    :rules="dialog.editorBox.form.rules.updatereason"
+                                >
+                                    <el-input
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].updatereason"
+                                    ></el-input>
+                                    <template
+                                        slot="error"
+                                        slot-scope="scope"
+                                    >
+                                        <p
+                                            class="error"
+                                            :title="scope.error"
+                                        >{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.updatereason}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="bz"
+                            label="备注"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.bz'"
+                                    :rules="dialog.editorBox.form.rules.bz"
+                                >
+                                    <el-input
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].bz"
+                                    ></el-input>
+                                    <template
+                                        slot="error"
+                                        slot-scope="scope"
+                                    >
+                                        <p
+                                            class="error"
+                                            :title="scope.error"
+                                        >{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.bz}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="rectime"
+                            label="记录创建时间"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="updateUser"
+                            label="修改人"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <!-- <el-table-column
+                        class-name="gn-TableDownloadExcel-none"
+                        label="操作"
+                        align="center"
+                        width="70px"
+                        fixed="right"
+                    >
+                        <template slot-scope="scope">
+                            <div>
+                                <el-button
+                                    type="primary"
+                                    size="mini"
+                                    v-privilege="activeMenu + 'PUT'"
+                                    @click="but_edit(scope.row)"
+                                >修改</el-button>
+                            </div>
+                        </template>
+                    </el-table-column> -->
+                    </el-table>
+                </el-form>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: right;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+        <!-- <el-dialog
+            :title="'计量点数据 - ' + (dialog.editorBox.type === 'add' ? '新增' : '修改')"
+            :visible.sync="dialog.editorBox.show"
+            width="600px"
+            :close-on-click-modal="false"
+            :show-close="!loading"
+        >
+            <div>
+                <el-form
+                    ref="dialog_form"
+                    :model="dialog.editorBox.form.data"
+                    :rules="dialog.editorBox.form.rules"
+                    size="mini"
+                    label-width="70px"
+                >
+                    <el-form-item label="计算值">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.actualvalue"
+                            readonly
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="修正值" prop="correctvalue">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.correctvalue"
+                            @change="dialog.editorBox.form.data.apportvalue = floatComputed(dialog.editorBox.form.data.actualvalue, dialog.editorBox.form.data.correctvalue, '+')"
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="最终值" prop="apportvalue">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.apportvalue"
+                            @change="dialog.editorBox.form.data.correctvalue = floatComputed(dialog.editorBox.form.data.apportvalue, dialog.editorBox.form.data.actualvalue, '-')"
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="备注" prop="bz">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.bz"
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="修改原因" prop="updatereason">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.updatereason"
+                        ></el-input>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+                <el-button @click="dialog.editorBox.show = false" :loading="loading">取 消</el-button>
+                <el-button
+                    type="primary"
+                    @click="dataSave"
+                    :loading="loading"
+                >保 存</el-button>
+            </span>
+        </el-dialog> -->
+        <el-dialog
+            title="趋势图"
+            :visible.sync="dialog.trendChart.show"
+            width="700px"
+            :close-on-click-modal="false"
+            :show-close="!loading"
+        >
+            <div>
+                <el-form
+                    label-width="80px"
+                    size="mini"
+                    inline
+                >
+                    <!-- <el-form-item label="查看连续周期">
+                        <el-checkbox></el-checkbox>
+                    </el-form-item> -->
+                    <el-form-item label="图表类型">
+                        <el-select
+                            filterable
+                            clearable
+                            v-model="dialog.trendChart.form.data.chartSeriesType"
+                            @change="chartSeriesType"
+                        >
+                            <el-option
+                                value="bar"
+                                label="柱状图"
+                            ></el-option>
+                            <el-option
+                                value="line"
+                                label="折线图"
+                            ></el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="业务日期(前)">
+                        <el-input-number
+                            v-model="dialog.trendChart.size"
+                            @change="getTrendChart()"
+                            :min="1"
+                            :max="365"
+                            label=""
+                        >
+                        </el-input-number>
+                    </el-form-item>
+                    <span>天</span>
+                </el-form>
+                <div style="min-height: 400px;">
+                    <icore-graphical
+                        ref="graphical"
+                        v-if="dialog.trendChart.show && dialog.trendChart.chart.show"
+                        :option="dialog.trendChart.chart.option"
+                        :width="'100%'"
+                        :height="'400px'"
+                    >
+                    </icore-graphical>
+                </div>
+            </div>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+                <el-button @click="dialog.trendChart.show = false">取 消</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '~/utils/validator.js'
+import store from '@/store/index.js';
+import timegranDate from '@/components/zg/timegranDate.vue'
+import { formatDate, commonSummaries } from '@/utils/util.js';
+export default {
+    name: 'manmalmeasuringLocationAdd',
+    components: {
+        'zj-timegran-date': timegranDate
+    },
+    data () {
+        return {
+            multipleSelection: [],
+            tableFormDataObj: {},
+            store,
+            userInfo: {
+                data: null
+            },
+            activeMenu: '',
+            filterForm: {
+                show: true,
+                data: {
+                    itemtype: 'MANUAL',
+                    clock: '',
+                    energytypeid: '',
+                    energyid: '',
+                    timegranid: 'MONTH',
+                    locateid: '',
+                    itemid: '',
+                    itemname: '',
+                    networkid: '',
+                    hierarchy: '',
+                    tagAlias: ''
+                },
+                disabled: {
+                    locateid: true,
+                    itemtype: true,
+                    timegranid: true
+                },
+                rules: {
+
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            singleTableHeight: 100,
+            tableData: [
+                // {
+                //     itemid: 'WS270Z_____CK501',
+                //     itemname: '中水回用量',
+                //     tagAlias: '',
+                //     tagModulus: '1',
+                //     unitid: '吨',
+                //     mintvalue: '47418',
+                //     mendvalue: '47418',
+                //     actualvalue: '0',
+                //     correctvalue: '0',
+                //     apportvalue: '0',
+                //     sumvalue: '0',
+                //     bz: '',
+                //     updatereason: '',
+                //     rectime: '',
+                //     updateUser: ''
+                // }
+            ],
+            nameObj: {
+                timegranid: {
+                    obj: {},
+                    arr: []
+                },
+                energytypeid: {
+                    obj: {},
+                    arr: []
+                },
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                itemtype: {
+                    obj: {
+                        'AUTO': '自动上传',
+                        'MANUAL': '手抄',
+                        'VIRTUAL': '虚拟'
+                    },
+                    arr: [
+                        {
+                            id: 'AUTO',
+                            name: '自动上传'
+                        },
+                        {
+                            id: 'MANUAL',
+                            name: '手抄'
+                        },
+                        {
+                            id: 'VIRTUAL',
+                            name: '虚拟'
+                        }
+                    ]
+                },
+                locateid: {
+                    obj: {},
+                    arr: []
+                },
+                networkid: {
+                    obj: {},
+                    arr: []
+                },
+                hierarchy: {
+                    obj: {},
+                    arr: []
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                }
+            },
+            loading: false,
+            tableLoading: false,
+            dialog: {
+                editorBox: {
+                    show: false,
+                    type: '',
+                    form: {
+                        data: {
+                            itemid: '',
+                            correctvalue: '',
+                            apportvalue: '',
+                            bz: '',
+                            updatereason: ''
+                        },
+                        rules: {
+                            correctvalue: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
+                            apportvalue: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
+                            update_reason: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ]
+                        }
+                    }
+                },
+                trendChart: {
+                    show: false,
+                    size: 7,
+                    form: {
+                        data: {
+                            chartSeriesType: 'bar'
+                        }
+                    },
+                    chart: {
+                        show: true,
+                        option: {
+                            tooltip: {
+                                trigger: 'axis'
+                            },
+                            legend: {
+                                data: []
+                            },
+                            toolbox: {
+                                feature: {
+                                    saveAsImage: {}
+                                }
+                            },
+                            xAxis: {
+                                type: 'category',
+                                data: []
+                            },
+                            yAxis: {
+                                type: 'value'
+                            },
+                            series: [
+                                // {
+                                //     name: '计量点1号',
+                                //     type: 'bar',
+                                //     data: [1230, 2234, 3000, 4500, 3120]
+                                // },
+                                // {
+                                //     name: '计量点2号',
+                                //     type: 'bar',
+                                //     data: [1980, 1200, 3200, 2300, 3212]
+                                // }
+                            ]
+                        }
+                    }
+                }
+            }
+        }
+    },
+    created () {
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        that.store.dispatch('getUserInfo').then((res) => {
+            that.userInfo.data = res.data;
+        });
+        // 接收路由参数
+        if (that.$route.query.locateid) {
+            that.filterForm.data.locateid = that.$route.query.locateid;
+        }
+        if (that.$route.query.timegranid) {
+            that.filterForm.data.timegranid = that.$route.query.timegranid;
+        }
+        if (that.$route.query.itemtype) {
+            that.filterForm.data.itemtype = that.$route.query.itemtype;
+        }
+        that.getTimeGranData();
+        that.getEnergyTypeIdData();
+        that.getEnergyIdData();
+        that.getLocateIdData();
+        that.getNetworkIdData();
+        that.getHierarchyData();
+        that.getUnitIdData();
+        // that.getTableData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['actualvalue', 'correctvalue', 'apportvalue', 'sumvalue']; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        // 获取时间粒度(计量点数据录入)
+        getTimeGranData () {
+            let that = this
+            let url = 'pass/ems/v1/tcmdatasourcetimegrans/getTimegranRmCalpointValue';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.TIMEGRANID,
+                                name: item.NAME
+                            })
+                            obj[item.TIMEGRANID] = item.NAME;
+                            that.filterForm.data.timegranid = that.filterForm.data.timegranid ? that.filterForm.data.timegranid : item.TIMEGRANID;
+                        }
+                        that.nameObj.timegranid.arr = arr;
+                        that.nameObj.timegranid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取能介类型
+        getEnergyTypeIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergytypes/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.energytypeid.arr = arr;
+                        that.nameObj.energytypeid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取能介
+        getEnergyIdData () {
+            let that = this;
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name,
+                                energytypeid: item.energytypeid,
+                                unitid: item.unitid
+                            })
+                            obj[item.id] = {
+                                name: item.name,
+                                unitid: item.unitid
+                            }
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取位置
+        getLocateIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmlocations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.locateid.arr = arr;
+                        that.nameObj.locateid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取站所
+        getNetworkIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmstations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.networkid.arr = arr;
+                        that.nameObj.networkid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取计量层级
+        getHierarchyData () {
+            let that = this
+            let url = 'pass/ems/v1/trmcalpoints/getRmCalpoint/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.hierarchy.arr = arr;
+                        that.nameObj.hierarchy.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            if (item.name === '吨') {
+                                that.nameObj.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    itemtype: that.filterForm.data.itemtype,
+                    clock: that.filterForm.data.clock,
+                    energytypeid: that.filterForm.data.energytypeid,
+                    energyid: that.filterForm.data.energyid,
+                    timegranid: that.filterForm.data.timegranid,
+                    locateid: that.filterForm.data.locateid,
+                    itemid: that.filterForm.data.itemid,
+                    itemname: that.filterForm.data.itemname,
+                    networkid: that.filterForm.data.networkid,
+                    hierarchy: that.filterForm.data.hierarchy,
+                    tagAlias: that.filterForm.data.tagAlias
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/trmcalpoints/getDate312ForPage?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let item of res.data.list) {
+                            arr.push({
+                                itemid: item.ITEMID,
+                                clock: item.CLOCK,
+                                itemname: item.ITEMNAME,
+                                tagAlias: item.TAG_ALIAS,
+                                tagModulus: item.TAG_MODULUS,
+                                unitid: item.UNITID,
+                                mintvalue: item.MINTVALUE,
+                                mendvalue: item.MENDVALUE,
+                                actualvalue: item.ACTUALVALUE,
+                                correctvalue: item.CORRECTVALUE,
+                                apportvalue: item.APPORTVALUE,
+                                sumvalue: item.SUMVALUE,
+                                bz: item.BZ,
+                                updatereason: item.UPDATE_REASON,
+                                rectime: item.REC_TIME,
+                                updateUser: item.UPDATE_USER,
+                                // 暂时没显示
+                                itemtype: item.ITEMTYPE,
+                                timegranid: item.TIMEGRANID
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (!that.filterForm.disabled || !that.filterForm.disabled[key]) {
+                    if (that.filterForm.data[key] instanceof Array) {
+                        that.filterForm.data[key] = [];
+                    } else {
+                        that.filterForm.data[key] = '';
+                    }
+                }
+            }
+            that.getTableData(1);
+        },
+        // 批量修改
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.tableFormDataObj) {
+                            SubmitData.push({
+                                clock: that.tableFormDataObj[key].clock,
+                                timegranid: that.tableFormDataObj[key].timegranid,
+                                itemid: that.tableFormDataObj[key].itemid,
+                                actualvalue: that.tableFormDataObj[key].actualvalue,
+                                correctvalue: that.tableFormDataObj[key].correctvalue,
+                                apportvalue: that.tableFormDataObj[key].apportvalue,
+                                updatereason: that.tableFormDataObj[key].updatereason,
+                                bz: that.tableFormDataObj[key].bz
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/trmcalpointvalues/batchupdate', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '修改成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                    }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        },
+        // but_edit (row) {
+        //     let that = this;
+        //     that.dialog.editorBox.form.data.itemid = row.itemid;
+        //     that.dialog.editorBox.form.data.clock = row.clock;
+        //     that.dialog.editorBox.form.data.timegranid = row.timegranid;
+        //     that.dialog.editorBox.form.data.actualvalue = row.actualvalue;
+        //     that.dialog.editorBox.form.data.correctvalue = row.correctvalue;
+        //     that.dialog.editorBox.form.data.apportvalue = row.apportvalue;
+        //     that.dialog.editorBox.form.data.bz = row.bz;
+        //     that.dialog.editorBox.form.data.updatereason = row.updatereason;
+        //     that.dialog.editorBox.type = 'edit';
+        //     that.dialog.editorBox.show = true;
+        // },
+        // dataSave () {
+        //     let that = this;
+        //     let SubmitData = {
+        //         itemid: that.dialog.editorBox.form.data.itemid,
+        //         clock: that.dialog.editorBox.form.data.clock,
+        //         timegranid: that.dialog.editorBox.form.data.timegranid,
+        //         actualvalue: that.dialog.editorBox.form.data.actualvalue,
+        //         correctvalue: that.dialog.editorBox.form.data.correctvalue,
+        //         apportvalue: that.dialog.editorBox.form.data.apportvalue,
+        //         bz: that.dialog.editorBox.form.data.bz,
+        //         update_reason: that.dialog.editorBox.form.data.updatereason,
+        //         update_user: that.userInfo.data.userCode
+        //     };
+        //     that.$refs['dialog_form'].validate((valid) => {
+        //         if (valid) {
+        //             that.loading = true;
+        //             that.axios.put('pass/ems/v1/trmcalpointvalues/update', SubmitData)
+        //                 .then(function (res) {
+        //                     if (res.code === '0') {
+        //                         that.$message({
+        //                             message: '修改成功',
+        //                             type: 'success'
+        //                         });
+        //                         that.getTableData();
+        //                         that.dialog.editorBox.show = false;
+        //                     } else {
+        //                         that.$message.error(res.message);
+        //                     }
+        //                     that.loading = false;
+        //                 }).catch(function () {
+        //                     that.loading = false;
+        //                 });
+        //         }
+        //     });
+        // },
+        // 表格中多选按钮的相关方法
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.itemid + '-' + item.clock + '-' + item.timegranid;
+                if (that.tableFormDataObj[xId]) {
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+        },
+        look_trendChart () {
+            let that = this;
+            if (this.multipleSelection && this.multipleSelection.length > 0) {
+                that.getTrendChart();
+                that.dialog.trendChart.show = true;
+            } else {
+                this.$message.error('请选择计量点');
+            }
+        },
+        getTrendChart () {
+            let that = this;
+            let SubmitData = {
+                size: that.dialog.trendChart.size,
+                list: []
+            };
+            for (let item of that.multipleSelection) {
+                SubmitData.list.push({
+                    itemid: item.itemid,
+                    clock: that.filterForm.data.clock,
+                    timegranid: that.filterForm.data.timegranid
+                });
+            }
+            let url = 'pass/ems/v1/trmcalpoints/getDate312ForChart';
+            that.axios.post(url, SubmitData, {
+                contentType: 'application/json'
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let legendArr = [],
+                            xAxisArr = [],
+                            seriesArr = [];
+                        for (let item of res.data) {
+                            for (let key in item) {
+                                let itemname = /\$.*$/.exec(key)[0].replace(/^\$/, '');
+                                legendArr.push(itemname);
+                                let seriesObj = {
+                                    name: itemname,
+                                    type: that.dialog.trendChart.form.data.chartSeriesType,
+                                    data: []
+                                };
+                                let clocks = [];
+                                for (let item2 of item[key]) {
+                                    seriesObj.data.push(item2.APPORTVALUE);
+                                    clocks.push(item2.CLOCK);
+                                }
+                                seriesArr.push(seriesObj);
+                                if (xAxisArr.length === 0) {
+                                    xAxisArr = clocks;
+                                }
+                            }
+                        }
+                        that.dialog.trendChart.chart.option.legend.data = legendArr;
+                        that.dialog.trendChart.chart.option.xAxis.data = xAxisArr;
+                        that.dialog.trendChart.chart.option.series = seriesArr;
+                        // that.$refs['graphical'].setGraphical();
+                        that.dialog.trendChart.chart.show = false;
+                        setTimeout(() => {
+                            that.dialog.trendChart.chart.show = true;
+                        }, 100);
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                }).catch(function () {
+                });
+        },
+        chartSeriesType () {
+            let that = this;
+            for (let item of that.dialog.trendChart.chart.option.series) {
+                item.type = that.dialog.trendChart.form.data.chartSeriesType;
+            }
+            // that.dialog.trendChart.chart.show = false;
+            // setTimeout(() => {
+            //     that.dialog.trendChart.chart.show = true;
+            // }, 100);
+            that.$refs['graphical'].setGraphical();
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.manmalmeasuringLocationAdd {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+    }
+    .attribute-box {
+        .item {
+            border: #ccc 1px solid;
+            padding: 5px;
+            margin-bottom: 6px;
+            .bt {
+                font-size: 14px;
+                font-weight: 600;
+                color: #000;
+                padding-left: 10px;
+                border-left: #008fe0 5px solid;
+            }
+        }
+    }
+}
+</style>

+ 2034 - 0
src/views/energyScheduling/components/measuringLocationData/measurementStandard.vue

@@ -0,0 +1,2034 @@
+<template>
+<!-- 计量点标准维护 -->
+    <div class="measurementStandard">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="能介类型">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.energytypeid"
+                                    multiple
+                                    collapse-tags
+                                    placeholder="能介类型"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.energytypeid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="能介">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.energyid"
+                                    multiple
+                                    collapse-tags
+                                    placeholder="能介"
+                                    style="width: 100%;"
+                                >
+                                    <template v-for="item of nameObj.energyid.arr">
+                                        <el-option
+                                            v-if="filterForm.data.energytypeid.indexOf(item.energytypeid) !== -1 || Object.keys(filterForm.data.energytypeid).length === 0"
+                                            :key="item.id"
+                                            :value="item.id"
+                                            :label="item.name"
+                                        ></el-option>
+                                    </template>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="用能属性">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.propertyid"
+                                    placeholder="用能属性"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.propertyid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="手抄或自动">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.itemtype"
+                                    placeholder="手抄或自动"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.itemtype.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="位置">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.locateid"
+                                    placeholder="位置"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.locateid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="站所">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.networkid"
+                                    placeholder="站所"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.networkid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点编号">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.itemid"
+                                    placeholder="计量点编号"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点名称">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.itemname"
+                                    placeholder="计量点名称"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-plus"
+                        v-if="butPrivilege.ADD"
+                        @click="but_add"
+                    >新增</el-button>
+                    <!-- <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-upload2"
+                    >导入计量点</el-button>
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-download"
+                    >导出全部计量点</el-button> -->
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-if="butPrivilege.QUERY"
+                            @click="filterForm.useflag='';getTableData(1);"
+                        >查询全部</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            icon="el-icon-search"
+                            size="mini"
+                            v-if="butPrivilege.QUERY"
+                            @click="filterForm.useflag='1';getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            icon="el-icon-refresh"
+                            size="mini"
+                            v-if="butPrivilege.QUERY"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+              <el-form
+                  size="mini"
+                  ref="dialog_form_arr"
+                  label-width="0px"
+                  :model="tableFormDataObj"
+              >
+                <el-table
+                    stripe
+                    id="singleTable"
+                    ref="singleTable"
+                    :data="tableData"
+                    v-loading="tableLoading"
+                    style="width: 100%;"
+                    :height="singleTableHeight"
+                    border
+                    size="mini"
+                    highlight-current-row
+                    @selection-change="handleSelectionChange"
+                    @current-change="handleCurrentChange"
+                    :row-class-name="rowClassName"
+                >
+                <el-table-column
+                    sortable
+                    type="selection"
+                    width="40"
+                    align="center"
+                    fixed="left"
+                ></el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="itemid"
+                        label="计量点编号"
+                        width="120px"
+                        :show-overflow-tooltip="true"
+                    ></el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="itemname"
+                        label="计量点名称"
+                        min-width="150px"
+                        :show-overflow-tooltip="true"
+                    ></el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="itemtype"
+                        label="手抄自动"
+                        width="72px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.itemtype.obj[scope.row.itemtype] ? nameObj.itemtype.obj[scope.row.itemtype] : scope.row.itemtype }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="locateid"
+                        label="位置"
+                        min-width="100px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.locateid.obj[scope.row.locateid] ? nameObj.locateid.obj[scope.row.locateid] : scope.row.locateid }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="networkid"
+                        label="站所"
+                        min-width="100px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.networkid.obj[scope.row.networkid] ? nameObj.networkid.obj[scope.row.networkid] : scope.row.networkid }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="energytypeid"
+                        label="能介类型"
+                        width="75px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.energytypeid.obj[scope.row.energytypeid] ? nameObj.energytypeid.obj[scope.row.energytypeid] : scope.row.energytypeid }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="energyid"
+                        label="能介"
+                        width="85px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.energyid.obj[scope.row.energyid] ? nameObj.energyid.obj[scope.row.energyid].name : scope.row.energyid }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="propertyid"
+                        label="用能属性"
+                        width="80px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.propertyid.obj[scope.row.propertyid] ? nameObj.propertyid.obj[scope.row.propertyid] : scope.row.propertyid }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="unitid"
+                        label="计量单位"
+                        min-width="80px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.unitid.obj[scope.row.unitid] ? nameObj.unitid.obj[scope.row.unitid] : scope.row.unitid }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="mintimegranid"
+                        label="最小时间粒度"
+                        min-width="100px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.mintimegranid.obj[scope.row.mintimegranid] ? nameObj.mintimegranid.obj[scope.row.mintimegranid] : scope.row.mintimegranid }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="useflag"
+                        label="启用"
+                        width="60px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span :class="{color_yes:  scope.row.useflag === '1', color_no:  scope.row.useflag === '0'}">{{ scope.row.useflag === '0' ? '否' : scope.row.useflag === '1' ? '是' : '' }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="maxVal"
+                        label="最大值标志位"
+                        min-width="100px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.mintimegranid.obj[scope.row.maxVal] ? nameObj.mintimegranid.obj[scope.row.maxVal] : scope.row.maxVal }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="minVal"
+                        label="最小值标志位"
+                        min-width="100px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.mintimegranid.obj[scope.row.minVal] ? nameObj.mintimegranid.obj[scope.row.minVal] : scope.row.minVal }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="avgVal"
+                        label="平均值标志位"
+                        min-width="100px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.mintimegranid.obj[scope.row.avgVal] ? nameObj.mintimegranid.obj[scope.row.avgVal] : scope.row.avgVal }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        sortable
+                        prop="sumVal"
+                        label="累计值标志位"
+                        min-width="100px"
+                        :show-overflow-tooltip="true"
+                    >
+                        <template slot-scope="scope">
+                            <span>{{ nameObj.mintimegranid.obj[scope.row.sumVal] ? nameObj.mintimegranid.obj[scope.row.sumVal] : scope.row.sumVal }}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                        class-name="gn-TableDownloadExcel-none"
+                        v-if="butPrivilege.PUT || butPrivilege.DELETE"
+                        label="操作"
+                        align="center"
+                        min-width="236px"
+                        fixed="right"
+                    >
+                        <template slot-scope="scope">
+                            <div>
+                                <el-button
+                                    type="primary"
+                                    size="mini"
+                                    v-if="butPrivilege.PUT"
+                                    @click="but_edit(scope.row)"
+                                >修改</el-button>
+                            </div>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                </el-form>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: right;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+        <el-dialog
+            :title="'计量点信息 - ' + (dialog.editorBox.type === 'add' ? '新增' : '修改')"
+            :visible.sync="dialog.editorBox.show"
+            width="950px"
+            :close-on-click-modal="false"
+            :show-close="!loading"
+        >
+            <el-tabs
+                v-model="dialog.editorBox.activeName"
+                type="border-card"
+            >
+                <el-tab-pane
+                    label="基础信息"
+                    name="1"
+                >
+                    <div>
+                        <el-form
+                            ref="dialog_form"
+                            :model="dialog.editorBox.form.data"
+                            :rules="dialog.editorBox.form.rules"
+                            size="mini"
+                            label-width="90px"
+                        >
+                            <el-row>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="计量点编号"
+                                        prop="itemid"
+                                    >
+                                        <el-input clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.itemid"
+                                            disabled
+                                        ></el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="计量点名称"
+                                        prop="itemname"
+                                    >
+                                        <el-input clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.itemname"
+                                        ></el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="TAG别名"
+                                        prop="tagAlias"
+                                    >
+                                        <el-input clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.tagAlias"
+                                        ></el-input>
+                                    </el-form-item>
+                                </el-col>
+                            </el-row>
+                            <el-row>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="位置"
+                                        prop="locateid"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.locateid"
+                                            @change="autoSetName()"
+                                        >
+                                            <el-option
+                                                v-for="item of nameObj.locateid.arr"
+                                                :key="item.id"
+                                                :value="item.id"
+                                                :label="item.name"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="能介类型"
+                                        prop="energytypeid"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.energytypeid"
+                                            @change="dialog.editorBox.form.data.energyid='';"
+                                        >
+                                            <el-option
+                                                v-for="item of nameObj.energytypeid.arr"
+                                                :key="item.id"
+                                                :value="item.id"
+                                                :label="item.name"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="能介"
+                                        prop="energyid"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.energyid"
+                                            @change="dialog.editorBox.form.data.unitid = nameObj.energyid.obj[dialog.editorBox.form.data.energyid].unitid; autoSetName()"
+                                        >
+                                            <template v-for="item of nameObj.energyid.arr">
+                                                <el-option
+                                                    v-if="item.energytypeid === dialog.editorBox.form.data.energytypeid || dialog.editorBox.form.data.energytypeid === ''"
+                                                    :key="item.id"
+                                                    :value="item.id"
+                                                    :label="item.name"
+                                                ></el-option>
+                                            </template>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                            </el-row>
+                            <el-row>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="用能属性"
+                                        prop="propertyid"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.propertyid"
+                                            @change="autoSetName()"
+                                        >
+                                            <el-option
+                                                v-for="item of nameObj.propertyid.arr"
+                                                :key="item.id"
+                                                :value="item.id"
+                                                :label="item.name"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="手抄或自动"
+                                        prop="itemtype"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.itemtype"
+                                        >
+                                            <el-option
+                                                v-for="item of nameObj.itemtype.arr"
+                                                :key="item.id"
+                                                :value="item.id"
+                                                :label="item.name"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="站所"
+                                        prop="networkid"
+                                        :rules="[{required: dialog.editorBox.form.data.energytypeid ===  'E', message:'该项不能为空'}]"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.networkid"
+                                        >
+                                            <el-option
+                                                v-for="item of nameObj.networkid.arr"
+                                                :key="item.id"
+                                                :value="item.id"
+                                                :label="item.name"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                            </el-row>
+                            <el-row>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="描述信息"
+                                        prop="itemdesc"
+                                    >
+                                        <el-input clearable
+                                            style="width: 100%;"
+                                            v-model.trim="dialog.editorBox.form.data.itemdesc"
+                                        ></el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="计量单位"
+                                        prop="unitid"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.unitid"
+                                        >
+                                            <el-option
+                                                v-for="item of nameObj.unitid.arr"
+                                                :key="item.id"
+                                                :value="item.id"
+                                                :label="item.name"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="最小时间粒度"
+                                        prop="mintimegranid"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.mintimegranid"
+                                        >
+                                            <el-option
+                                                v-for="item of nameObj.mintimegranid.arr"
+                                                :key="item.id"
+                                                :value="item.id"
+                                                :label="item.name"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                            </el-row>
+                            <el-row>
+                                <!-- <el-col :span="8">
+                                    <el-form-item
+                                        label="是否调度项"
+                                        prop="isschedule"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.isschedule"
+                                        >
+                                            <el-option
+                                                label="是"
+                                                value="1"
+                                            ></el-option>
+                                            <el-option
+                                                label="否"
+                                                value="0"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col> -->
+                                <el-col :span="8">
+                                    <el-form-item
+                                        label="工序"
+                                        prop="costid"
+                                    >
+                                        <el-select
+                                            filterable clearable
+                                            style="width: 100%;"
+                                            v-model="dialog.editorBox.form.data.costid"
+                                        >
+                                            <el-option
+                                                v-for="item of nameObj.workprocid.arr"
+                                                :key="item.id"
+                                                :value="item.id"
+                                                :label="item.name"
+                                            ></el-option>
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="16">
+                                    <el-form-item
+                                        label="数据来源"
+                                        prop="sourceType"
+                                    >
+                                        <el-input filterable clearable
+                                            style="width: 100%;"
+                                            v-model.trim="dialog.editorBox.form.data.sourceType"
+                                        >
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                            </el-row>
+                        </el-form>
+                    </div>
+                </el-tab-pane>
+                <el-tab-pane
+                    label="计量点属性"
+                    name="2"
+                >
+                    <div class="attribute-box">
+                        <div class="item">
+                            <p class="bt">基本属性</p>
+                            <el-form
+                                ref="dialog_form1"
+                                :model="dialog.editorBox.form1.data"
+                                :rules="dialog.editorBox.form1.rules"
+                                class="nr"
+                                label-width="90px"
+                                size="mini"
+                            >
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="默认值" prop="defaultvalue">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.defaultvalue"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="精度" prop="digits">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.digits"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="级别" prop="node">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.node"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="顺序号" prop="showno">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.showno"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="父级ID" prop="parentid">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.parentid"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="记录创建时间" prop="recTime">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model="dialog.editorBox.form1.data.recTime"
+                                                disabled
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="启用" prop="useflag">
+                                            <el-select
+                                                filterable clearable
+                                                style="width: 100%;"
+                                                v-model="dialog.editorBox.form1.data.useflag"
+                                            >
+                                                <el-option
+                                                    label="是"
+                                                    value="1"
+                                                ></el-option>
+                                                <el-option
+                                                    label="否"
+                                                    value="0"
+                                                ></el-option>
+                                            </el-select>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="点状态" prop="status">
+                                            <el-select
+                                                filterable clearable
+                                                style="width: 100%;"
+                                                v-model="dialog.editorBox.form1.data.status"
+                                            >
+                                                <el-option
+                                                    label="是"
+                                                    value="1"
+                                                ></el-option>
+                                                <el-option
+                                                    label="否"
+                                                    value="0"
+                                                ></el-option>
+                                            </el-select>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                            </el-form>
+                        </div>
+                        <div class="item">
+                            <p class="bt">扩展属性</p>
+                            <el-form
+                                class="nr"
+                                label-width="90px"
+                                size="mini"
+                            >
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="仪表ID" prop="tagid">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.tagid"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="仪表名称" prop="tagname">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.tagname"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="跳变范围" prop="rangeVal">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.rangeVal"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="异常点标签" prop="tagBadSymbol">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.tagBadSymbol"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="倍率" prop="tagModulus">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.tagModulus"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="瞬时信号ID" prop="tagIdMap">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.tagIdMap"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="计算模式" prop="calcMod">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.calcMod"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="数据类型" prop="dataType">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.dataType"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="仪表类型" prop="meterType">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.meterType"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="准点精度" prop="meterScale">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.meterScale"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="仪表位置" prop="meterLoc">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.meterLoc"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                            </el-form>
+                        </div>
+                        <div class="item">
+                            <p class="bt">特殊属性</p>
+                            <el-form
+                                class="nr"
+                                label-width="90px"
+                                size="mini"
+                            >
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="对应数据表" prop="tagTable">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.tagTable"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="对应数据列" prop="tagCol">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.tagCol"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="最大值标志位" prop="maxVal">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.maxVal"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="最小值标志位" prop="minVal">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.minVal"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="平均值标志位" prop="avgVal">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.avgVal"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="累计值标志位" prop="sumVal">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.sumVal"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="电开关号" prop="bcode">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.bcode"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="das地址" prop="bdesc1">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model="dialog.editorBox.form1.data.bdesc1"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="8">
+                                        <el-form-item label="录入序号" prop="bdesc2">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.bdesc2"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-row>
+                                    <el-col :span="8">
+                                        <el-form-item label="备用描述" prop="btype1">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.btype1"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="16">
+                                        <el-form-item label="十分钟表字段" prop="btype2">
+                                            <el-input clearable
+                                                style="width: 100%;"
+                                                v-model.trim="dialog.editorBox.form1.data.btype2"
+                                            ></el-input>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                            </el-form>
+                        </div>
+                    </div>
+                </el-tab-pane>
+            </el-tabs>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+                <el-button
+                    size="mini"
+                    @click="dialog.editorBox.show = false"
+                    :loading="loading"
+                >取 消</el-button>
+                <el-button
+                    size="mini"
+                    type="primary"
+                    @click="dataSave"
+                    :loading="loading"
+                >保 存</el-button>
+            </span>
+        </el-dialog>
+        <zj-formulaEditor :equationEditing="dialog.equationEditing"></zj-formulaEditor>
+    </div>
+</template>
+
+<script>
+import formulaEditor from '@/components/zg/formulaEditor.vue'
+import { zCheckNumber2 } from '~/utils/validator.js'
+import { formatDate } from '@/utils/util.js';
+export default {
+    name: 'measurementStandard',
+    components: {
+        'zj-formulaEditor': formulaEditor
+    },
+    data () {
+        return {
+            activeMenu: '',
+            filterForm: {
+                show: true,
+                useflag: '1',
+                data: {
+                    energytypeid: '',
+                    energyid: '',
+                    propertyid: '',
+                    itemtype: '',
+                    locateid: '',
+                    itemid: '',
+                    itemname: '',
+                    networkid: '',
+                    hierarchy: '',
+                    tagAlias: '',
+                    version: formatDate(new Date(), 'yyyyMM00'),
+                    tagTable: '',
+                    tagCol: ''
+                },
+                rules: {
+
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            singleTableHeight: 100,
+            tableData: [],
+            nameObj: {
+                workprocid: {
+                    obj: {},
+                    arr: []
+                },
+                energytypeid: {
+                    obj: {},
+                    arr: []
+                },
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                propertyid: {
+                    obj: {},
+                    arr: []
+                },
+                locateid: {
+                    obj: {},
+                    arr: []
+                },
+                networkid: {
+                    obj: {},
+                    arr: []
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                },
+                hierarchy: {
+                    obj: {},
+                    arr: []
+                },
+                itemtype: {
+                    obj: {
+                        'AUTO': '自动上传',
+                        'MANUAL': '手抄',
+                        'VIRTUAL': '虚拟'
+                    },
+                    arr: [
+                        {
+                            id: 'AUTO',
+                            name: '自动上传'
+                        },
+                        {
+                            id: 'MANUAL',
+                            name: '手抄'
+                        },
+                        {
+                            id: 'VIRTUAL',
+                            name: '虚拟'
+                        }
+                    ]
+                },
+                mintimegranid: {
+                    obj: {
+                        'SHIFT': '班',
+                        'DAY': '日',
+                        'MONTH': '月',
+                        'YEAR': '年'
+                    },
+                    arr: [
+                        // {
+                        //     id: 'SHIFT',
+                        //     name: '班'
+                        // },
+                        {
+                            id: 'DAY',
+                            name: '日'
+                        },
+                        {
+                            id: 'MONTH',
+                            name: '月'
+                        },
+                        {
+                            id: 'YEAR',
+                            name: '年'
+                        }
+                    ]
+                }
+            },
+            loading: false,
+            tableLoading: false,
+            dialog: {
+                editorBox: {
+                    show: false,
+                    activeName: '1',
+                    type: '',
+                    addRow: null,
+                    form: {
+                        data: {
+                            itemid: '',
+                            itemname: '',
+                            tagAlias: '',
+                            itemdesc: '',
+                            itemtype: '',
+                            locateid: '',
+                            networkid: '',
+                            energytypeid: '',
+                            energyid: '',
+                            propertyid: '',
+                            unitid: '',
+                            isschedule: '0',
+                            costid: '',
+                            sourceType: '',
+                            mintimegranid: 'DAY'
+                        },
+                        rules: {
+                            // itemid: [
+                            //     { required: true, message: '该项不能为空', trigger: 'change' }
+                            // ],
+                            itemname: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            // tagAlias: [
+                            //      { required: true, message: '该项不能为空', trigger: 'change' }
+                            // ],
+                            locateid: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            networkid: [],
+                            energytypeid: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            energyid: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            propertyid: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            itemtype: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            mintimegranid: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ],
+                            bdesc2: [
+                                { validator: zCheckNumber2, trigger: 'change' }
+                            ]
+                        }
+                    },
+                    form1: {
+                        data: {
+                            // 基础
+                            defaultvalue: '',
+                            digits: '',
+                            node: '',
+                            showno: '',
+                            parentid: '',
+                            recTime: '',
+                            useflag: '',
+                            status: '',
+                            // 扩展
+                            tagid: '',
+                            tagname: '',
+                            rangeVal: '',
+                            tagBadSymbol: '',
+                            tagModulus: '',
+                            tagIdMap: '',
+                            calcMod: '',
+                            dataType: '',
+                            meterType: '',
+                            meterScale: '',
+                            meterLoc: '',
+                            // 特殊
+                            tagTable: '',
+                            tagCol: '',
+                            maxVal: '',
+                            minVal: '',
+                            avgVal: '',
+                            sumVal: '',
+                            bcode: '',
+                            bdesc1: '',
+                            bdesc2: '',
+                            btype1: '',
+                            btype2: ''
+                        },
+                        rules: {
+                            showno: [
+                                { validator: zCheckNumber2, trigger: 'change' }
+                            ]
+                        }
+                    }
+                },
+                equationEditing: {
+                    show: false,
+                    form: {
+                        data: {
+                            clock: '',
+                            code: ''
+                        }
+                    }
+                }
+            },
+            butPrivilege: {
+                QUERY: false,
+                ADD: false,
+                PUT: false,
+                DELETE: false
+            }
+        }
+    },
+    created () {
+        // 获取按钮权限
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+        for (let key in this.butPrivilege) {
+            this.butPrivilege[key] = this.checkPrivilege(this.activeMenu + key);
+        }
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        that.getEnergyTypeIdData();
+        that.getEnergyIdData();
+        that.getPropertyIdData();
+        that.getLocateIdData();
+        that.getNetworkIdData();
+        // that.getSourceTypeData();
+        that.getworkprocidData();
+        that.getUnitIdData();
+        that.getHierarchyData();
+        that.getTableData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 获取工序
+        getworkprocidData () {
+            let that = this
+            let url = 'pass/ems/v1/trmworkprocs/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.workprocid.arr = arr;
+                        that.nameObj.workprocid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取能介类型
+        getEnergyTypeIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergytypes/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.energytypeid.arr = arr;
+                        that.nameObj.energytypeid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        connn () {
+            // this.filterForm.data.energytypeid = this.filterForm.data.energytypeid.join(',')
+            // console.log(this.filterForm.data.energytypeid)
+            // console.log(111)
+            // let that = this;
+            // let set = new Set();
+            // console.log(that.filterForm.data.energytypeid)
+            // if (!that.filterForm.data.energytypeid || that.filterForm.data.energytypeid.length === 0) {
+            //     that.nameObj.energytypeid.showDataArr = that.nameObj.energytypeid.arr;
+            // } else {
+            //     for (let key of that.filterForm.data.energytypeid) {
+            //         if (that.nameObj.energytypeid.obj[key]) {
+            //             for (let name of that.nameObj.energytypeid.obj[key]) {
+            //                 set.add(name);
+            //             }
+            //         }
+            //     }
+            //     that.nameObj.energytypeid.showDataArr = [...set];
+            //     // console.log(that.nameObj.energytypeid.showDataArr)
+            // }
+        },
+        // 获取能介
+        getEnergyIdData () {
+            let that = this;
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name,
+                                energytypeid: item.energytypeid,
+                                unitid: item.unitid
+                            })
+                            obj[item.id] = {
+                                name: item.name,
+                                unitid: item.unitid
+                            }
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取属性
+        getPropertyIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergypropertys/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.propertyid.arr = arr;
+                        that.nameObj.propertyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取位置
+        getLocateIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmlocations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.locateid.arr = arr;
+                        that.nameObj.locateid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取站所
+        getNetworkIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmstations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.networkid.arr = arr;
+                        that.nameObj.networkid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // // 获取数据来源
+        // getSourceTypeData () {
+        //     let that = this
+        //     let url = 'pass/ems/v1/trml1sources/getidandname/';
+        //     that.axios.get(url)
+        //         .then(function (res) {
+        //             if (res.code === '0') {
+        //                 let arr = [];
+        //                 let obj = {};
+        //                 for (let item of res.data) {
+        //                     arr.push({
+        //                         id: item.id,
+        //                         name: item.name
+        //                     })
+        //                     obj[item.id] = item.name;
+        //                 }
+        //                 that.nameObj.sourceType.arr = arr;
+        //                 that.nameObj.sourceType.obj = obj;
+        //             } else {
+        //                 that.$message.error(res.message);
+        //             }
+        //         });
+        // },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            // if (item.name === '吨') {
+                            //     that.nameObj.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
+                            // }
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取计量层级
+        getHierarchyData () {
+            let that = this
+            let url = 'pass/ems/v1/trmcalpoints/getRmCalpoint/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.hierarchy.arr = arr;
+                        that.nameObj.hierarchy.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    energytypeid: that.filterForm.data.energytypeid.join(','),
+                    energyid: that.filterForm.data.energyid.join(','),
+                    propertyid: that.filterForm.data.propertyid.join(','),
+                    itemtype: that.filterForm.data.itemtype,
+                    locateid: that.filterForm.data.locateid.join(','),
+                    itemid: that.filterForm.data.itemid,
+                    itemname: that.filterForm.data.itemname,
+                    networkid: that.filterForm.data.networkid.join(','),
+                    node: that.filterForm.data.hierarchy,
+                    tagAlias: that.filterForm.data.tagAlias,
+                    version: that.filterForm.data.version,
+                    tagTable: that.filterForm.data.tagTable,
+                    tagCol: that.filterForm.data.tagCol,
+                    useflag: that.filterForm.useflag
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/trmcalpoints/like/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let item of res.data.list) {
+                            arr.push({
+                                itemid: item.itemid,
+                                itemname: item.itemname,
+                                tagAlias: item.tagAlias,
+                                itemdesc: item.itemdesc,
+                                itemtype: item.itemtype,
+                                locateid: item.locateid,
+                                networkid: item.networkid,
+                                energytypeid: item.energytypeid,
+                                energyid: item.energyid,
+                                propertyid: item.propertyid,
+                                unitid: item.unitid,
+                                isschedule: item.isschedule,
+                                // issettle: item.issettle,
+                                costid: item.costid,
+                                sourceType: item.sourceType,
+                                mintimegranid: item.mintimegranid,
+                                // 基础
+                                defaultvalue: item.defaultvalue,
+                                digits: item.digits,
+                                node: item.node,
+                                showno: item.showno,
+                                parentid: item.parentid,
+                                recTime: item.recTime,
+                                useflag: item.useflag,
+                                status: item.status,
+                                // 扩展
+                                tagid: item.tagid,
+                                tagname: item.tagname,
+                                rangeVal: item.rangeVal,
+                                tagBadSymbol: item.tagBadSymbol,
+                                tagModulus: item.tagModulus,
+                                tagIdMap: item.tagIdMap,
+                                calcMod: item.calcMod,
+                                dataType: item.dataType,
+                                meterType: item.meterType,
+                                meterScale: item.meterScale,
+                                meterLoc: item.meterLoc,
+                                // 特殊
+                                tagTable: item.tagTable,
+                                tagCol: item.tagCol,
+                                maxVal: item.maxVal,
+                                minVal: item.minVal,
+                                avgVal: item.avgVal,
+                                sumVal: item.sumVal,
+                                bcode: item.bcode,
+                                bdesc1: item.bdesc1,
+                                bdesc2: item.bdesc2,
+                                btype1: item.btype1,
+                                btype2: item.btype2
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (that.filterForm.data[key] instanceof Array) {
+                    that.filterForm.data[key] = [];
+                } else {
+                    that.filterForm.data[key] = '';
+                }
+            }
+            that.getTableData(1);
+        },
+        // 选择添加时的模板
+        handleCurrentChange (row) {
+            let that = this;
+            that.dialog.editorBox.addRow = row;
+        },
+        // 自动生成名称
+        autoSetName () {
+            let that = this;
+            if (that.dialog.editorBox.form.data.itemname === '') {
+                if (that.dialog.editorBox.form.data.locateid && that.dialog.editorBox.form.data.energyid && that.dialog.editorBox.form.data.propertyid) {
+                    that.dialog.editorBox.form.data.itemname += that.nameObj.locateid.obj[that.dialog.editorBox.form.data.locateid];
+                    that.dialog.editorBox.form.data.itemname += that.nameObj.energyid.obj[that.dialog.editorBox.form.data.energyid].name;
+                    that.dialog.editorBox.form.data.itemname += that.nameObj.propertyid.obj[that.dialog.editorBox.form.data.propertyid];
+                }
+            }
+        },
+        but_add () {
+            let that = this;
+            if (that.dialog.editorBox.addRow) {
+                for (let key in that.dialog.editorBox.form.data) {
+                    if (that.dialog.editorBox.addRow[key] || that.dialog.editorBox.addRow[key] === 0) {
+                        that.dialog.editorBox.form.data[key] = that.dialog.editorBox.addRow[key];
+                    } else {
+                        that.dialog.editorBox.form.data[key] = '';
+                    }
+                }
+                for (let key in that.dialog.editorBox.form1.data) {
+                    if (that.dialog.editorBox.addRow[key] || that.dialog.editorBox.addRow[key] === 0) {
+                        that.dialog.editorBox.form1.data[key] = that.dialog.editorBox.addRow[key];
+                    } else {
+                        that.dialog.editorBox.form1.data[key] = '';
+                    }
+                }
+                this.$refs['singleTable'].setCurrentRow();
+            } else {
+                for (let key in that.dialog.editorBox.form.data) {
+                    if (that.filterForm.data[key] || that.filterForm.data[key] === 0) {
+                        that.dialog.editorBox.form.data[key] = that.filterForm.data[key];
+                    } else {
+                        that.dialog.editorBox.form.data[key] = '';
+                    }
+                }
+                for (let key in that.dialog.editorBox.form1.data) {
+                    if (that.filterForm.data[key] || that.filterForm.data[key] === 0) {
+                        that.dialog.editorBox.form1.data[key] = that.filterForm.data[key];
+                    } else {
+                        that.dialog.editorBox.form1.data[key] = '';
+                    }
+                }
+                that.dialog.editorBox.form.data.unitid = that.nameObj.energyid.obj[that.dialog.editorBox.form.data.energyid] ? that.nameObj.energyid.obj[that.dialog.editorBox.form.data.energyid].unitid : '';
+                // that.dialog.editorBox.form.data.unitid = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : '';
+                that.dialog.editorBox.form.data.isschedule = '0';
+                that.dialog.editorBox.form1.data.useflag = '1';
+                that.dialog.editorBox.form1.data.status = '0';
+            }
+            that.dialog.editorBox.form.data.itemid = '';
+            // that.dialog.editorBox.form.data.itemname = '';
+            that.dialog.editorBox.form1.data.recTime = '';
+            that.dialog.editorBox.activeName = '1';
+            that.dialog.editorBox.type = 'add';
+            that.dialog.editorBox.show = true;
+            setTimeout(() => {
+                that.$refs['dialog_form'].clearValidate();
+            }, 100);
+        },
+        but_edit (row) {
+            let that = this;
+            for (let key in that.dialog.editorBox.form.data) {
+                if (typeof row[key] !== 'undefined') {
+                    that.dialog.editorBox.form.data[key] = row[key];
+                }
+            }
+            for (let key in that.dialog.editorBox.form1.data) {
+                if (typeof row[key] !== 'undefined') {
+                    that.dialog.editorBox.form1.data[key] = row[key];
+                }
+            }
+            that.dialog.editorBox.activeName = '1';
+            that.dialog.editorBox.type = 'edit';
+            that.dialog.editorBox.show = true;
+        },
+        but_del (row) {
+            let that = this;
+            that.$confirm('是否删除该条数据?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                state: 'warning'
+            }).then(() => {
+                that.axios.delete('pass/ems/v1/trmcalpoints/' + row.itemid)
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            that.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            });
+                            that.getTableData();
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                    }).catch(function () {
+                    });
+            }).catch(() => {
+            });
+        },
+        dataSave () {
+            let that = this;
+            let SubmitData = {
+                itemid: that.dialog.editorBox.form.data.itemid,
+                itemname: that.dialog.editorBox.form.data.itemname,
+                tagAlias: that.dialog.editorBox.form.data.tagAlias,
+                itemdesc: that.dialog.editorBox.form.data.itemdesc,
+                itemtype: that.dialog.editorBox.form.data.itemtype,
+                locateid: that.dialog.editorBox.form.data.locateid,
+                networkid: that.dialog.editorBox.form.data.networkid,
+                energytypeid: that.dialog.editorBox.form.data.energytypeid,
+                energyid: that.dialog.editorBox.form.data.energyid,
+                propertyid: that.dialog.editorBox.form.data.propertyid,
+                unitid: that.dialog.editorBox.form.data.unitid,
+                isschedule: that.dialog.editorBox.form.data.isschedule,
+                costid: that.dialog.editorBox.form.data.costid,
+                sourceType: that.dialog.editorBox.form.data.sourceType,
+                mintimegranid: that.dialog.editorBox.form.data.mintimegranid,
+                // 基础
+                defaultvalue: that.dialog.editorBox.form1.data.defaultvalue,
+                digits: that.dialog.editorBox.form1.data.digits,
+                node: that.dialog.editorBox.form1.data.node,
+                showno: that.dialog.editorBox.form1.data.showno,
+                parentid: that.dialog.editorBox.form1.data.parentid,
+                recTime: that.dialog.editorBox.form1.data.recTime,
+                useflag: that.dialog.editorBox.form1.data.useflag,
+                status: that.dialog.editorBox.form1.data.status,
+                // 扩展
+                tagid: that.dialog.editorBox.form1.data.tagid,
+                tagname: that.dialog.editorBox.form1.data.tagname,
+                rangeVal: that.dialog.editorBox.form1.data.rangeVal,
+                tagBadSymbol: that.dialog.editorBox.form1.data.tagBadSymbol,
+                tagModulus: that.dialog.editorBox.form1.data.tagModulus,
+                tagIdMap: that.dialog.editorBox.form1.data.tagIdMap,
+                calcMod: that.dialog.editorBox.form1.data.calcMod,
+                dataType: that.dialog.editorBox.form1.data.dataType,
+                meterType: that.dialog.editorBox.form1.data.meterType,
+                meterScale: that.dialog.editorBox.form1.data.meterScale,
+                meterLoc: that.dialog.editorBox.form1.data.meterLoc,
+                // 特殊
+                tagTable: that.dialog.editorBox.form1.data.tagTable,
+                tagCol: that.dialog.editorBox.form1.data.tagCol,
+                maxVal: that.dialog.editorBox.form1.data.maxVal,
+                minVal: that.dialog.editorBox.form1.data.minVal,
+                avgVal: that.dialog.editorBox.form1.data.avgVal,
+                sumVal: that.dialog.editorBox.form1.data.sumVal,
+                bcode: that.dialog.editorBox.form1.data.bcode,
+                bdesc1: that.dialog.editorBox.form1.data.bdesc1,
+                bdesc2: that.dialog.editorBox.form1.data.bdesc2,
+                btype1: that.dialog.editorBox.form1.data.btype1,
+                btype2: that.dialog.editorBox.form1.data.btype2
+            };
+            that.$refs['dialog_form'].validate((valid) => {
+                if (valid) {
+                    that.$refs['dialog_form1'].validate((valid1) => {
+                        if (valid1) {
+                            if (that.dialog.editorBox.type === 'add') {
+                                let foorData = new FormData();
+                                for (let key in SubmitData) {
+                                    foorData.append(key, SubmitData[key]);
+                                }
+                                that.loading = true;
+                                that.axios.post('pass/ems/v1/trmcalpoints/', foorData, {
+                                    headers: {
+                                        'Content-Type': 'multipart/form-data'
+                                    }
+                                })
+                                    .then(function (res) {
+                                        if (res.code === '0') {
+                                            that.$message({
+                                                message: '新增成功',
+                                                type: 'success'
+                                            });
+                                            that.getTableData();
+                                            that.dialog.editorBox.show = false;
+                                        } else {
+                                            that.$message.error(res.message);
+                                        }
+                                        that.loading = false;
+                                    }).catch(function () {
+                                        that.loading = false;
+                                    });
+                            } else {
+                                that.loading = true;
+                                that.axios.put('pass/ems/v1/trmcalpoints/' + SubmitData.itemid, SubmitData)
+                                    .then(function (res) {
+                                        if (res.code === '0') {
+                                            let msg = res.message
+                                            if (!msg || msg === '操作成功') {
+                                                that.$message({
+                                                    message: '修改成功',
+                                                    type: 'success'
+                                                });
+                                            } else {
+                                                that.$message.warning('修改成功,注意:' + msg);
+                                            }
+                                            that.getTableData();
+                                            that.dialog.editorBox.show = false;
+                                        } else {
+                                            that.$message.error(res.message);
+                                        }
+                                        that.loading = false;
+                                    }).catch(function () {
+                                        that.loading = false;
+                                    });
+                            }
+                        } else {
+                            that.dialog.editorBox.activeName = '2';
+                        }
+                    });
+                } else {
+                    that.dialog.editorBox.activeName = '1';
+                }
+            });
+        },
+        but_equationEditing (row) {
+            let that = this;
+            that.dialog.equationEditing.form.data.clock = that.filterForm.data.version;
+            that.dialog.equationEditing.form.data.code = row.itemid;
+            that.dialog.equationEditing.show = true;
+        },
+        rowClassName ({row, rowIndex}) {
+            return row.useflag !== '1' ? 'rowDisable' : ''
+        },
+        upUseflag (row, useflag = 0) {
+            let that = this;
+            let SubmitData = {
+                itemname: row.itemname,
+                tagAlias: row.tagAlias,
+                itemdesc: row.itemdesc,
+                itemtype: row.itemtype,
+                locateid: row.locateid,
+                networkid: row.networkid,
+                energytypeid: row.energytypeid,
+                energyid: row.energyid,
+                propertyid: row.propertyid,
+                unitid: row.unitid,
+                isschedule: row.isschedule,
+                sourceType: row.sourceType,
+                useflag: useflag,
+                mintimegranid: row.mintimegranid
+            };
+            that.$confirm('是否' + (useflag === '1' ? '启用' : '禁用') + '?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                that.axios.put('pass/ems/v1/trmcalpoints/' + row.itemid, SubmitData)
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            that.$message({
+                                message: useflag === '1' ? '启用成功' : '禁用成功',
+                                type: 'success'
+                            });
+                            that.getTableData();
+                            that.dialog.editorBox.show = false;
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                    }).catch(function () {
+                    });
+            }).catch(() => {
+            })
+        },
+        // 表格中多选按钮的相关方法
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.itemid + '-' + item.clock + '-' + item.timegranid;
+                if (that.tableFormDataObj[xId]) {
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.measurementStandard {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                // margin-top: -7px;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .rowDisable td {
+            background-color: #dfdfdf !important;
+        }
+    }
+    .attribute-box {
+        .item {
+            border: #ccc 1px solid;
+            padding: 5px;
+            margin-bottom: 6px;
+            .bt {
+                font-size: 14px;
+                font-weight: 600;
+                color: #000;
+                padding-left: 10px;
+                border-left: #008fe0 5px solid;
+            }
+        }
+    }
+    .color_no {
+        color: #7a7a7a;
+    }
+    .color_yes {
+        color: #1a9f17;
+    }
+    .el-button--mini {
+        padding: 7px 12px;
+    }
+}
+</style>

+ 1627 - 0
src/views/energyScheduling/components/measuringLocationData/measuringLocationEntry.vue

@@ -0,0 +1,1627 @@
+<template>
+    <!-- 计量点数据录入 -->
+    <div class="measuringLocationAdd">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="时间粒度">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.timegranid"
+                                    placeholder="时间粒度"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.timegranid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="日期">
+                                <!-- <el-date-picker
+                                    value-format="yyyy-MM-dd"
+                                    type="date"
+                                    v-model="filterForm.data.clock"
+                                    placeholder="时间"
+                                    style="width: 100%;"
+                                ></el-date-picker> -->
+                                <!-- <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :timegranId="filterForm.data.timegranid"
+                                    :oneFoo="getTableData"
+                                    :defaultOffset="-1"
+                                ></zj-timegran-date> -->
+                                <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :type="'daterange'"
+                                    :timegranId="filterForm.data.timegranid"
+                                    :oneFoo="getTableData"
+                                    :defaultOffset="-1"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="能介类型">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.energytypeid"
+                                    placeholder="能介类型"
+                                    style="width: 100%;"
+                                    @change="filterForm.data.energyid = []"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.energytypeid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="能介">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    multiple
+                                    collapse-tags
+                                    v-model="filterForm.data.energyid"
+                                    placeholder="能介"
+                                    style="width: 100%;"
+                                >
+                                    <template v-for="item of nameObj.energyid.arr">
+                                        <el-option
+                                            v-if="item.energytypeid === filterForm.data.energytypeid || filterForm.data.energytypeid === ''"
+                                            :key="item.id"
+                                            :value="item.id"
+                                            :label="item.name"
+                                        ></el-option>
+                                    </template>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="手抄或自动">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    v-model="filterForm.data.itemtype"
+                                    placeholder="手抄或自动"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.itemtype.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="位置">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    multiple
+                                    collapse-tags
+                                    v-model="filterForm.data.locateid"
+                                    placeholder="位置"
+                                    style="width: 100%;"
+                                    :disabled="filterForm.disabled.locateid"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.locateid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点编号">
+                                <el-input
+                                    clearable
+                                    v-model.trim="filterForm.data.itemid"
+                                    placeholder="计量点编号"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点名称">
+                                <el-input
+                                    clearable
+                                    v-model.trim="filterForm.data.itemname"
+                                    placeholder="计量点名称"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="站所">
+                                <el-select
+                                    filterable
+                                    clearable
+                                    multiple
+                                    collapse-tags
+                                    v-model="filterForm.data.networkid"
+                                    placeholder="站所"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.networkid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <!-- <el-col :span="6">
+                            <el-form-item label="计量层级">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.hierarchy"
+                                    placeholder="计量层级"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.hierarchy.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col> -->
+                        <el-col :span="6">
+                            <el-form-item label="TAG点别名">
+                                <el-input
+                                    clearable
+                                    v-model.trim="filterForm.data.tagAlias"
+                                    placeholder="TAG点别名"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="用能属性">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.propertyid"
+                                    placeholder="用能属性"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.propertyid.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <el-button
+                        type="primary"
+                        size="mini"
+                        @click="look_trendChart()"
+                    >查看趋势</el-button>
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-edit-outline"
+                        v-privilege="activeMenu + 'PUT'"
+                        @click="but_edit_plural()"
+                        :loading="loading"
+                    >修改</el-button>
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        v-privilege="activeMenu + 'PUT'"
+                        @click="but_re_compute()"
+                        :loading="loading"
+                    >重新计算</el-button>
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        v-privilege="activeMenu + 'PUT'"
+                        @click="but_redata()"
+                        :loading="loading"
+                    >重新生成数据</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <el-form
+                    size="mini"
+                    ref="dialog_form_arr"
+                    label-width="0px"
+                    :model="tableFormDataObj"
+                >
+                    <el-table
+                        stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        @selection-change="handleSelectionChange"
+                        show-summary
+                        :summary-method="getSummaries"
+                    >
+                        <el-table-column
+                            sortable
+                            type="selection"
+                            width="40"
+                            align="center"
+                            fixed="left"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="timegranid"
+                            label="时间粒度"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.timegranid.obj[scope.row.timegranid] ? nameObj.timegranid.obj[scope.row.timegranid] : scope.row.timegranid }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="clock"
+                            label="时间"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="itemid"
+                            label="计量点编号"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="itemname"
+                            label="计量点名称"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="tagAlias"
+                            label="TAG别名"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="propertyid"
+                            label="用能属性"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable prop="ename"
+                            label="能介"
+                            width="70px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable prop="lname"
+                            label="位置"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="tagModulus"
+                            label="倍率"
+                            width="60px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            :sort-by="function(row, index) { return sortFoo(row, index, 'unitid') }"
+                            prop="unitid"
+                            label="计量单位"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.unitid.obj[scope.row.unitid] ? nameObj.unitid.obj[scope.row.unitid] : scope.row.unitid }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="mintvalue"
+                            label="仪表期初值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="mendvalue"
+                            label="仪表期末值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            label="期末-期初"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ isNaN(scope.row.mendvalue - scope.row.mintvalue) ? '' : floatComputed(scope.row.mendvalue, scope.row.mintvalue, '-') }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="actualvalue"
+                            label="计算值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="correctvalue"
+                            label="修正值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.correctvalue'"
+                                    :rules="dialog.editorBox.form.rules.correctvalue"
+                                >
+                                    <el-input
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model.trim="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].correctvalue"
+                                        @change="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].apportvalue = floatComputed(scope.row.actualvalue, tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].correctvalue, '+')"
+                                    ></el-input>
+                                    <template
+                                        slot="error"
+                                        slot-scope="scope"
+                                    >
+                                        <p
+                                            class="error"
+                                            :title="scope.error"
+                                        >{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.correctvalue}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="apportvalue"
+                            label="最终值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.apportvalue'"
+                                    :rules="dialog.editorBox.form.rules.apportvalue"
+                                >
+                                    <el-input
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model.trim="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].apportvalue"
+                                        @change="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].correctvalue = floatComputed(tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].apportvalue, scope.row.actualvalue, '-')"
+                                    ></el-input>
+                                    <template
+                                        slot="error"
+                                        slot-scope="scope"
+                                    >
+                                        <p
+                                            class="error"
+                                            :title="scope.error"
+                                        >{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.apportvalue}}</span>
+                            </template>
+                        </el-table-column>
+                        <!-- <el-table-column
+                            sortable
+                            prop="sumvalue"
+                            label="累计值"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > </el-table-column> -->
+                        <el-table-column
+                            sortable
+                            prop="updatereason"
+                            label="修改原因"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.updatereason'"
+                                    :rules="dialog.editorBox.form.rules.updatereason"
+                                >
+                                    <el-input
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model.trim="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].updatereason"
+                                    ></el-input>
+                                    <template
+                                        slot="error"
+                                        slot-scope="scope"
+                                    >
+                                        <p
+                                            class="error"
+                                            :title="scope.error"
+                                        >{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.updatereason}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="bz"
+                            label="备注"
+                            min-width="100px"
+                            :show-overflow-tooltip="true"
+                        > <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid + '.bz'"
+                                    :rules="dialog.editorBox.form.rules.bz"
+                                >
+                                    <el-input
+                                        clearable
+                                        style="width: 100%;"
+                                        v-model.trim="tableFormDataObj[scope.row.itemid + '-' + scope.row.clock + '-' + scope.row.timegranid].bz"
+                                    ></el-input>
+                                    <template
+                                        slot="error"
+                                        slot-scope="scope"
+                                    >
+                                        <p
+                                            class="error"
+                                            :title="scope.error"
+                                        >{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.bz}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="rectime"
+                            label="创建时间"
+                            min-width="120px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="updateUser"
+                            label="创建人"
+                            min-width="80px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="updateman"
+                            label="修改人"
+                            width="65px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="updatetime"
+                            label="修改时间"
+                            width="125px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <!-- <el-table-column
+                        class-name="gn-TableDownloadExcel-none"
+                        label="操作"
+                        align="center"
+                        width="70px"
+                        fixed="right"
+                    >
+                        <template slot-scope="scope">
+                            <div>
+                                <el-button
+                                    type="primary"
+                                    size="mini"
+                                    v-privilege="activeMenu + 'PUT'"
+                                    @click="but_edit(scope.row)"
+                                >修改</el-button>
+                            </div>
+                        </template>
+                    </el-table-column> -->
+                    </el-table>
+                </el-form>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: right;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+        <!-- <el-dialog
+            :title="'计量点数据 - ' + (dialog.editorBox.type === 'add' ? '新增' : '修改')"
+            :visible.sync="dialog.editorBox.show"
+            width="600px"
+            :close-on-click-modal="false"
+            :show-close="!loading"
+        >
+            <div>
+                <el-form
+                    ref="dialog_form"
+                    :model="dialog.editorBox.form.data"
+                    :rules="dialog.editorBox.form.rules"
+                    size="mini"
+                    label-width="70px"
+                >
+                    <el-form-item label="计算值">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.actualvalue"
+                            readonly
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="修正值" prop="correctvalue">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.correctvalue"
+                            @change="dialog.editorBox.form.data.apportvalue = floatComputed(dialog.editorBox.form.data.actualvalue, dialog.editorBox.form.data.correctvalue, '+')"
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="最终值" prop="apportvalue">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.apportvalue"
+                            @change="dialog.editorBox.form.data.correctvalue = floatComputed(dialog.editorBox.form.data.apportvalue, dialog.editorBox.form.data.actualvalue, '-')"
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="备注" prop="bz">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.bz"
+                        ></el-input>
+                    </el-form-item>
+                    <el-form-item label="修改原因" prop="updatereason">
+                        <el-input clearable
+                            style="width: 100%;"
+                            v-model="dialog.editorBox.form.data.updatereason"
+                        ></el-input>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+                <el-button @click="dialog.editorBox.show = false" :loading="loading">取 消</el-button>
+                <el-button
+                    type="primary"
+                    @click="dataSave"
+                    :loading="loading"
+                >保 存</el-button>
+            </span>
+        </el-dialog> -->
+        <el-dialog
+            title="趋势图"
+            :visible.sync="dialog.trendChart.show"
+            width="900px"
+            :close-on-click-modal="false"
+            :show-close="!loading"
+        >
+            <div>
+                <el-form
+                    label-width="83px"
+                    size="mini"
+                    inline
+                >
+                    <!-- <el-form-item label="查看连续周期">
+                        <el-checkbox></el-checkbox>
+                    </el-form-item> -->
+                    <el-form-item label="图表类型">
+                        <el-select
+                            filterable
+                            clearable
+                            v-model="dialog.trendChart.form.data.chartSeriesType"
+                            @change="chartSeriesType"
+                        >
+                            <el-option
+                                value="bar"
+                                label="柱状图"
+                            ></el-option>
+                            <el-option
+                                value="line"
+                                label="折线图"
+                            ></el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="业务日期(前)">
+                        <el-input-number
+                            v-model="dialog.trendChart.size"
+                            @change="getTrendChart()"
+                            :min="1"
+                            :max="365"
+                            label=""
+                        >
+                        </el-input-number>
+                    </el-form-item>
+                    <span>天</span>
+                </el-form>
+                <div style="min-height: 400px;">
+                    <icore-graphical
+                        ref="graphical"
+                        v-if="dialog.trendChart.show && dialog.trendChart.chart.show"
+                        :option="dialog.trendChart.chart.option"
+                        :width="'100%'"
+                        :height="'400px'"
+                    >
+                    </icore-graphical>
+                </div>
+            </div>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+                <el-button @click="dialog.trendChart.show = false">取 消</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '~/utils/validator.js'
+import store from '@/store/index.js';
+import timegranDate from '@/components/zg/timegranDate.vue'
+import { formatDate, commonSummaries } from '@/utils/util.js';
+export default {
+    name: 'measuringLocationAdd',
+    components: {
+        'zj-timegran-date': timegranDate
+    },
+    data () {
+        return {
+            multipleSelection: [],
+            tableFormDataObj: {},
+            store,
+            userInfo: {
+                data: null
+            },
+            activeMenu: '',
+            filterForm: {
+                show: true,
+                data: {
+                    itemtype: '',
+                    clock: '',
+                    energytypeid: '',
+                    energyid: '',
+                    timegranid: '',
+                    locateid: '',
+                    itemid: '',
+                    itemname: '',
+                    networkid: '',
+                    hierarchy: '',
+                    tagAlias: '',
+                    propertyid: ''
+                },
+                disabled: {
+                    locateid: false
+                },
+                rules: {
+
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            singleTableHeight: 200,
+            tableData: [],
+            nameObj: {
+                timegranid: {
+                    obj: {},
+                    arr: []
+                },
+                energytypeid: {
+                    obj: {},
+                    arr: []
+                },
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                propertyid: {
+                    obj: {},
+                    arr: []
+                },
+                itemtype: {
+                    obj: {
+                        'AUTO': '自动上传',
+                        'MANUAL': '手抄',
+                        'VIRTUAL': '虚拟'
+                    },
+                    arr: [
+                        {
+                            id: 'AUTO',
+                            name: '自动上传'
+                        },
+                        {
+                            id: 'MANUAL',
+                            name: '手抄'
+                        },
+                        {
+                            id: 'VIRTUAL',
+                            name: '虚拟'
+                        }
+                    ]
+                },
+                locateid: {
+                    obj: {},
+                    arr: []
+                },
+                networkid: {
+                    obj: {},
+                    arr: []
+                },
+                hierarchy: {
+                    obj: {},
+                    arr: []
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                }
+            },
+            loading: false,
+            tableLoading: false,
+            dialog: {
+                editorBox: {
+                    show: false,
+                    type: '',
+                    form: {
+                        data: {
+                            itemid: '',
+                            correctvalue: '',
+                            apportvalue: '',
+                            bz: '',
+                            updatereason: ''
+                        },
+                        rules: {
+                            correctvalue: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
+                            apportvalue: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber1, trigger: 'change' }
+                            ],
+                            update_reason: [
+                                { required: true, message: '该项不能为空', trigger: 'change' }
+                            ]
+                        }
+                    }
+                },
+                trendChart: {
+                    show: false,
+                    size: 7,
+                    form: {
+                        data: {
+                            chartSeriesType: 'bar'
+                        }
+                    },
+                    chart: {
+                        show: true,
+                        option: {
+                            tooltip: {
+                                trigger: 'axis'
+                            },
+                            legend: {
+                                data: []
+                            },
+                            toolbox: {
+                                feature: {
+                                    saveAsImage: {}
+                                }
+                            },
+                            xAxis: {
+                                type: 'category',
+                                data: []
+                            },
+                            yAxis: {
+                                type: 'value'
+                            },
+                            series: [
+                                // {
+                                //     name: '计量点1号',
+                                //     type: 'bar',
+                                //     data: [1230, 2234, 3000, 4500, 3120]
+                                // },
+                                // {
+                                //     name: '计量点2号',
+                                //     type: 'bar',
+                                //     data: [1980, 1200, 3200, 2300, 3212]
+                                // }
+                            ]
+                        }
+                    }
+                }
+            }
+        }
+    },
+    created () {
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        that.store.dispatch('getUserInfo').then((res) => {
+            that.userInfo.data = res.data;
+        });
+        // 接收路由参数
+        if (that.$route.query.locateid) {
+            that.filterForm.disabled.locateid = true;
+            that.filterForm.data.locateid = that.$route.query.locateid;
+        }
+        if (that.$route.query.timegranid) {
+            that.filterForm.data.timegranid = that.$route.query.timegranid;
+        }
+        if (that.$route.query.itemtype) {
+            that.filterForm.data.itemtype = that.$route.query.itemtype;
+        }
+        that.getTimeGranData();
+        that.getEnergyTypeIdData();
+        that.getEnergyIdData();
+        that.getLocateIdData();
+        that.getNetworkIdData();
+        that.getHierarchyData();
+        that.getUnitIdData();
+        that.getPropertyIdData();
+        // that.getTableData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['actualvalue', 'correctvalue', 'apportvalue', 'sumvalue']; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        // 获取时间粒度(计量点数据录入)
+        getTimeGranData () {
+            let that = this
+            let url = 'pass/ems/v1/tcmdatasourcetimegrans/getTimegranRmCalpointValue';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.TIMEGRANID,
+                                name: item.NAME
+                            })
+                            obj[item.TIMEGRANID] = item.NAME;
+                            that.filterForm.data.timegranid = that.filterForm.data.timegranid ? that.filterForm.data.timegranid : item.TIMEGRANID;
+                        }
+                        that.nameObj.timegranid.arr = arr;
+                        that.nameObj.timegranid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取能介类型
+        getEnergyTypeIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergytypes/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.energytypeid.arr = arr;
+                        that.nameObj.energytypeid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取能介
+        getEnergyIdData () {
+            let that = this;
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name,
+                                energytypeid: item.energytypeid,
+                                unitid: item.unitid
+                            })
+                            obj[item.id] = {
+                                name: item.name,
+                                unitid: item.unitid
+                            }
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取位置
+        getLocateIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmlocations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.locateid.arr = arr;
+                        that.nameObj.locateid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取站所
+        getNetworkIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmstations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.networkid.arr = arr;
+                        that.nameObj.networkid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取计量层级
+        getHierarchyData () {
+            let that = this
+            let url = 'pass/ems/v1/trmcalpoints/getRmCalpoint/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.hierarchy.arr = arr;
+                        that.nameObj.hierarchy.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            if (item.name === '吨') {
+                                that.nameObj.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取属性
+        getPropertyIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmenergypropertys/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.propertyid.arr = arr;
+                        that.nameObj.propertyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    itemtype: that.filterForm.data.itemtype,
+                    clock: that.filterForm.data.clock[0],
+                    clocke: that.filterForm.data.clock[1],
+                    energytypeid: that.filterForm.data.energytypeid,
+                    energyid: that.filterForm.data.energyid.toString(),
+                    timegranid: that.filterForm.data.timegranid,
+                    locateid: that.filterForm.data.locateid.toString(),
+                    itemid: that.filterForm.data.itemid,
+                    itemname: that.filterForm.data.itemname,
+                    networkid: that.filterForm.data.networkid.toString(),
+                    hierarchy: that.filterForm.data.hierarchy,
+                    tagAlias: that.filterForm.data.tagAlias,
+                    propertyid: that.filterForm.data.propertyid.toString()
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/trmcalpoints/getDate312ForPage?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let item of res.data.list) {
+                            arr.push({
+                                itemid: item.ITEMID,
+                                clock: item.CLOCK,
+                                itemname: item.ITEMNAME,
+                                tagAlias: item.TAG_ALIAS,
+                                tagModulus: item.TAG_MODULUS,
+                                unitid: item.UNITID,
+                                mintvalue: item.MINTVALUE,
+                                mendvalue: item.MENDVALUE,
+                                actualvalue: item.ACTUALVALUE,
+                                correctvalue: item.CORRECTVALUE,
+                                apportvalue: item.APPORTVALUE,
+                                sumvalue: item.SUMVALUE,
+                                bz: item.BZ,
+                                updatereason: item.UPDATE_REASON,
+                                rectime: item.REC_TIME,
+                                updateUser: item.UPDATE_USER,
+                                ename: item.ENAME,
+                                lname: item.LNAME,
+                                updateman: item.UPMAN,
+                                updatetime: item.UPTIME,
+                                // 暂时没显示
+                                itemtype: item.ITEMTYPE,
+                                timegranid: item.TIMEGRANID,
+                                propertyid: that.nameObj.propertyid.obj[item.PROPERTYID]
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.tableLoading = false;
+                    that.$nextTick(() => {
+                        setTimeout(() => {
+                            that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
+                        }, 1);
+                    });
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (!that.filterForm.disabled || !that.filterForm.disabled[key]) {
+                    if (that.filterForm.data[key] instanceof Array) {
+                        that.filterForm.data[key] = [];
+                    } else {
+                        that.filterForm.data[key] = '';
+                    }
+                }
+            }
+            that.getTableData(1);
+        },
+        // 批量修改
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid, msg) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.tableFormDataObj) {
+                            SubmitData.push({
+                                clock: that.tableFormDataObj[key].clock,
+                                timegranid: that.tableFormDataObj[key].timegranid,
+                                itemid: that.tableFormDataObj[key].itemid,
+                                actualvalue: that.tableFormDataObj[key].actualvalue,
+                                correctvalue: that.tableFormDataObj[key].correctvalue,
+                                apportvalue: that.tableFormDataObj[key].apportvalue,
+                                updatereason: that.tableFormDataObj[key].updatereason,
+                                bz: that.tableFormDataObj[key].bz
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/trmcalpointvalues/batchupdate', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '修改成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                    } else {
+                        let col = Object.keys(msg)[0].split('.')[1];
+                        if (col && col === 'CORRECTVALUE') {
+                            this.$message.error('请填写正确的修正值');
+                        } else if (col && col === 'APPORTVALUE') {
+                            this.$message.error('请填写正确的最终值');
+                        } else {
+                            this.$message.error('数据不完整或者格式错误');
+                        }
+                    }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        },
+        // 批量重新计算(由小时表数据计算而来)
+        but_re_compute () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid) => {
+                    if (valid) {
+                        let SubmitData = {};
+                        for (let key in that.tableFormDataObj) {
+                            SubmitData = {
+                                clock: that.filterForm.data.clock[0],
+                                clocke: that.filterForm.data.clock[1],
+                                timegranid: that.tableFormDataObj[key].timegranid,
+                                itemid: that.tableFormDataObj[key].itemid,
+                                tb: 'hour',
+                                energytypeid: that.tableFormDataObj[key].energytypeid,
+                                energyid: that.tableFormDataObj[key].energyid,
+                                locateid: that.tableFormDataObj[key].locateid,
+                                itemname: that.tableFormDataObj[key].itemname,
+                                networkid: that.tableFormDataObj[key].networkid,
+                                tagAlias: that.tableFormDataObj[key].tagAlias,
+                                propertyid: that.tableFormDataObj[key].propertyid
+                            }
+                            // SubmitData.push({
+
+                            //     clock: that.tableFormDataObj[key].clock,
+                            //     timegranid: that.tableFormDataObj[key].timegranid,
+                            //     itemid: that.tableFormDataObj[key].itemid
+                            // });
+                        }
+                        that.loading = true;
+                        that.axios.get('pass/ems/v1/trmactvalues/reDatas', {
+                            params: SubmitData
+                        })
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '重新计算成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                    }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        },
+        // but_edit (row) {
+        //     let that = this;
+        //     that.dialog.editorBox.form.data.itemid = row.itemid;
+        //     that.dialog.editorBox.form.data.clock = row.clock;
+        //     that.dialog.editorBox.form.data.timegranid = row.timegranid;
+        //     that.dialog.editorBox.form.data.actualvalue = row.actualvalue;
+        //     that.dialog.editorBox.form.data.correctvalue = row.correctvalue;
+        //     that.dialog.editorBox.form.data.apportvalue = row.apportvalue;
+        //     that.dialog.editorBox.form.data.bz = row.bz;
+        //     that.dialog.editorBox.form.data.updatereason = row.updatereason;
+        //     that.dialog.editorBox.type = 'edit';
+        //     that.dialog.editorBox.show = true;
+        // },
+        // dataSave () {
+        //     let that = this;
+        //     let SubmitData = {
+        //         itemid: that.dialog.editorBox.form.data.itemid,
+        //         clock: that.dialog.editorBox.form.data.clock,
+        //         timegranid: that.dialog.editorBox.form.data.timegranid,
+        //         actualvalue: that.dialog.editorBox.form.data.actualvalue,
+        //         correctvalue: that.dialog.editorBox.form.data.correctvalue,
+        //         apportvalue: that.dialog.editorBox.form.data.apportvalue,
+        //         bz: that.dialog.editorBox.form.data.bz,
+        //         update_reason: that.dialog.editorBox.form.data.updatereason,
+        //         update_user: that.userInfo.data.userCode
+        //     };
+        //     that.$refs['dialog_form'].validate((valid) => {
+        //         if (valid) {
+        //             that.loading = true;
+        //             that.axios.put('pass/ems/v1/trmcalpointvalues/update', SubmitData)
+        //                 .then(function (res) {
+        //                     if (res.code === '0') {
+        //                         that.$message({
+        //                             message: '修改成功',
+        //                             type: 'success'
+        //                         });
+        //                         that.getTableData();
+        //                         that.dialog.editorBox.show = false;
+        //                     } else {
+        //                         that.$message.error(res.message);
+        //                     }
+        //                     that.loading = false;
+        //                 }).catch(function () {
+        //                     that.loading = false;
+        //                 });
+        //         }
+        //     });
+        // },
+        // 表格中多选按钮的相关方法
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.itemid + '-' + item.clock + '-' + item.timegranid;
+                if (that.tableFormDataObj[xId]) {
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+        },
+        look_trendChart () {
+            let that = this;
+            if (this.multipleSelection && this.multipleSelection.length > 0) {
+                that.getTrendChart();
+                that.dialog.trendChart.show = true;
+            } else {
+                this.$message.error('请选择计量点');
+            }
+        },
+        getTrendChart () {
+            let that = this;
+            let SubmitData = {
+                size: that.dialog.trendChart.size,
+                list: []
+            };
+            for (let item of that.multipleSelection) {
+                SubmitData.list.push({
+                    itemid: item.itemid,
+                    clock: that.filterForm.data.clock,
+                    timegranid: that.filterForm.data.timegranid
+                });
+            }
+            let url = 'pass/ems/v1/trmcalpoints/getDate312ForChart';
+            that.axios.post(url, SubmitData, {
+                contentType: 'application/json'
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let legendArr = [],
+                            xAxisArr = [],
+                            seriesArr = [];
+                        for (let item of res.data) {
+                            for (let key in item) {
+                                let itemname = /\$.*$/.exec(key)[0].replace(/^\$/, '');
+                                legendArr.push(itemname);
+                                let seriesObj = {
+                                    name: itemname,
+                                    type: that.dialog.trendChart.form.data.chartSeriesType,
+                                    data: []
+                                };
+                                let clocks = [];
+                                for (let item2 of item[key]) {
+                                    seriesObj.data.push(item2.APPORTVALUE);
+                                    clocks.push(item2.CLOCK);
+                                }
+                                seriesArr.push(seriesObj);
+                                if (xAxisArr.length === 0) {
+                                    xAxisArr = clocks;
+                                }
+                            }
+                        }
+                        that.dialog.trendChart.chart.option.legend.data = legendArr;
+                        that.dialog.trendChart.chart.option.xAxis.data = xAxisArr;
+                        that.dialog.trendChart.chart.option.series = seriesArr;
+                        // that.$refs['graphical'].setGraphical();
+                        that.dialog.trendChart.chart.show = false;
+                        setTimeout(() => {
+                            that.dialog.trendChart.chart.show = true;
+                        }, 100);
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                }).catch(function () {
+                });
+        },
+        chartSeriesType () {
+            let that = this;
+            for (let item of that.dialog.trendChart.chart.option.series) {
+                item.type = that.dialog.trendChart.form.data.chartSeriesType;
+            }
+            // that.dialog.trendChart.chart.show = false;
+            // setTimeout(() => {
+            //     that.dialog.trendChart.chart.show = true;
+            // }, 100);
+            that.$refs['graphical'].setGraphical();
+        },
+        // 重新生成数据
+        but_redata () {
+            let that = this;
+            if (!that.filterForm.data.clock || that.filterForm.data.clock.length === 0) {
+                that.$message.warning('请选择日期范围');
+                return true;
+            }
+            if (!that.filterForm.data.clock[0] || !that.filterForm.data.clock[1]) {
+                that.$message.warning('请选择开始日期与结束日期');
+                return true;
+            }
+            if (!that.filterForm.data.timegranid) {
+                that.$message.warning('请选择时间粒度');
+                return true;
+            }
+            let params = {
+                itemtype: that.filterForm.data.itemtype,
+                clock: that.filterForm.data.clock[0],
+                clocke: that.filterForm.data.clock[1],
+                energytypeid: that.filterForm.data.energytypeid,
+                energyid: that.filterForm.data.energyid.toString(),
+                timegranid: that.filterForm.data.timegranid,
+                locateid: that.filterForm.data.locateid.toString(),
+                itemid: that.filterForm.data.itemid,
+                itemname: that.filterForm.data.itemname,
+                networkid: that.filterForm.data.networkid.toString(),
+                tagAlias: that.filterForm.data.tagAlias,
+                propertyid: that.filterForm.data.propertyid.toString()
+            };
+            that.$confirm('是否重新生成数据?日期跨度不易太长!否则运行时间较长', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                state: 'warning'
+            }).then(() => {
+                that.loading = true;
+                let url = 'pass/ems/v1/trmcalpointvalues/reData'
+                that.axios.get(url, {
+                    params: params
+                })
+                    .then(function (res) {
+                        if (res.code === '0') {
+                            if (res.message && res.message !== '操作成功') {
+                                that.$message.warning('重新生成数据成功, 其中【' + res.message + '】');
+                            } else {
+                                that.$message({
+                                    message: '重新生成数据成功',
+                                    type: 'success'
+                                });
+                            }
+                            that.getTableData();
+                        } else {
+                            that.$message.error(res.message);
+                        }
+                        that.loading = false;
+                    }).catch(function () {
+                        that.loading = false;
+                    });
+            }).catch(() => {
+            });
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.measuringLocationAdd {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+    }
+    .attribute-box {
+        .item {
+            border: #ccc 1px solid;
+            padding: 5px;
+            margin-bottom: 6px;
+            .bt {
+                font-size: 14px;
+                font-weight: 600;
+                color: #000;
+                padding-left: 10px;
+                border-left: #008fe0 5px solid;
+            }
+        }
+    }
+}
+</style>

+ 542 - 0
src/views/energyScheduling/components/measuringLocationData/measuringLocationQuery.vue

@@ -0,0 +1,542 @@
+<template>
+<!-- 准点数据查询 -->
+    <div class="measuringLocationQuery">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    ref="dialog_form"
+                    :model="filterForm.data"
+                    :rules="filterForm.rules"
+                    size="mini"
+                    label-width="70px"
+                >
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="开始时间" prop="timestart">
+                                <el-date-picker
+                                    v-model="filterForm.data.timestart"
+                                    type="datetime"
+                                    placeholder="开始时间"
+                                    style="width: 100%;"
+                                    format="yyyy-MM-dd HH"
+                                    value-format="yyyy-MM-dd HH"
+                                ></el-date-picker>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="结束时间" prop="timeend">
+                                <el-date-picker
+                                    v-model="filterForm.data.timeend"
+                                    type="datetime"
+                                    placeholder="结束时间"
+                                    style="width: 100%;"
+                                    format="yyyy-MM-dd HH"
+                                    value-format="yyyy-MM-dd HH"
+                                ></el-date-picker>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点" prop="codes">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.names"
+                                    placeholder="计量点"
+                                    style="width: 100%;"
+                                    class="input-but"
+                                    readonly
+                                >
+                                    <el-button slot="append" @click="choosePlace()">选择</el-button>
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="数据类型" prop="dataType">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.dataType"
+                                    placeholder="数据类型"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.dataType.arr"
+                                        :key="item.id"
+                                        :label="item.name"
+                                        :value="item.id"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 30;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <div class="box-left">
+                    <el-table stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        show-summary
+                        :summary-method="getSummaries"
+                    >
+                        <el-table-column
+                            sortable
+                            prop="time"
+                            label="时间"
+                            min-width="100px"
+                            align="center"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            v-if="tableMenu.length > 0"
+                            :label="filterForm.dataTypeName"
+                        >
+                            <el-table-column
+                                sortable
+                                v-for="(item, index) of tableMenu"
+                                :key="index"
+                                :prop="item.code"
+                                :label="item.name"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                        </el-table-column>
+                    </el-table>
+                </div>
+                <div class="box-right">
+                    <icore-graphical
+                        ref="graphical"
+                        v-if="chart.show"
+                        :option="chart.option"
+                        :width="'100%'"
+                        :height="singleTableHeight"
+                    >
+                    </icore-graphical>
+                </div>
+            </div>
+        </div>
+        <el-dialog
+            title="选择计量点"
+            :visible.sync="dialog.measuringLocation.show"
+            width="900px"
+            :close-on-click-modal="false"
+            :show-close="!loading"
+        >
+            <div>
+                <measurementPlaceChoose ref="measurementPlaceChoose" :z_data="filterForm.data"></measurementPlaceChoose>
+            </div>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+                <el-button @click="choosePlaceCancel()">取 消</el-button>
+                <el-button
+                    type="primary"
+                    @click="choosePlaceSave()"
+                >确 定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import measurementPlaceChoose from './components/measurementPlaceChoose.vue'
+import {formatDate, commonSummaries} from '@/utils/util.js';
+export default {
+    name: 'measuringLocationQuery',
+    components: {
+        measurementPlaceChoose
+    },
+    data () {
+        let yesterday = new Date();
+        yesterday.setDate(new Date().getDate() - 1);
+        yesterday.setHours(0);
+        let timestart = formatDate(yesterday, 'yyyy-MM-dd HH'),
+            timeend = formatDate(new Date().setHours(new Date().getHours() - 1), 'yyyy-MM-dd HH');
+        return {
+            activeMenu: '',
+            filterForm: {
+                show: true,
+                dataTypeName: '',
+                data: {
+                    timestart: timestart,
+                    timeend: timeend,
+                    dataType: 'Sum',
+                    codes: '',
+                    names: ''
+                },
+                rules: {
+                    timestart: [
+                        { required: true, message: '该项不能为空', trigger: 'change' }
+                    ],
+                    timeend: [
+                        { required: true, message: '该项不能为空', trigger: 'change' }
+                    ],
+                    dataType: [
+                        { required: true, message: '该项不能为空', trigger: 'change' }
+                    ],
+                    codes: [
+                        { required: true, message: '该项不能为空', trigger: 'change' }
+                    ]
+                }
+            },
+            singleTableHeight: 100,
+            // 表列名与数据id的对应关系
+            tableMenu: [
+                // {
+                //     name: '计量点1号',
+                //     code: 'code1'
+                // },
+                // {
+                //     name: '计量点2号',
+                //     code: 'code2'
+                // }
+            ],
+            tableData: [
+                // {
+                //     time: '2019-01-01/00',
+                //     code1: '1230',
+                //     code2: '1980'
+                // },
+                // {
+                //     time: '2019-01-01/03',
+                //     code1: '2234',
+                //     code2: '1200'
+                // },
+                // {
+                //     time: '2019-01-01/06',
+                //     code1: '3000',
+                //     code2: '3200'
+                // },
+                // {
+                //     time: '2019-01-01/09',
+                //     code1: '4500',
+                //     code2: '2300'
+                // },
+                // {
+                //     time: '2019-01-01/12',
+                //     code1: '3120',
+                //     code2: '3212'
+                // }
+            ],
+            nameObj: {
+                dataType: {
+                    obj: {
+                        'OnTime': '仪表值',
+                        'Sum': '用量值'
+                    },
+                    arr: [
+                        {
+                            id: 'OnTime',
+                            name: '仪表值'
+                        },
+                        {
+                            id: 'Sum',
+                            name: '用量值'
+                        }
+                    ]
+                }
+            },
+            chart: {
+                show: false,
+                option: {
+                    title: {
+                        text: '趋势图'
+                    },
+                    tooltip: {
+                        trigger: 'axis'
+                    },
+                    legend: {
+                        data: [] // ['计量点1号', '计量点2号']
+                    },
+                    grid: {
+                        left: '3%',
+                        right: '4%',
+                        bottom: '3%',
+                        containLabel: true
+                    },
+                    toolbox: {
+                        feature: {
+                            saveAsImage: {}
+                        }
+                    },
+                    xAxis: {
+                        type: 'category',
+                        boundaryGap: true,
+                        data: [] // ['2019-01-01/00', '2019-01-01/03', '2019-01-01/06', '2019-01-01/09', '2019-01-01/12']
+                    },
+                    yAxis: {
+                        type: 'value'
+                    },
+                    series: [
+                        // {
+                        //     name: '计量点1号',
+                        //     type: 'line',
+                        //     data: [1230, 2234, 3000, 4500, 3120]
+                        // },
+                        // {
+                        //     name: '计量点2号',
+                        //     type: 'line',
+                        //     data: [1980, 1200, 3200, 2300, 3212]
+                        // }
+                    ]
+                }
+            },
+            loading: false,
+            tableLoading: false,
+            dialog: {
+                measuringLocation: {
+                    show: false
+                }
+            }
+        }
+    },
+    created () {
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 30;
+                that.chart.show = true;
+            }, 1);
+        });
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            let that = this;
+            let prop = [];
+            for (let item of that.tableMenu) {
+                if (item.code !== 'time') {
+                    prop.push(item.code);
+                }
+            }
+            return commonSummaries(param, prop);
+        },
+        // 获取表格中的数据
+        getTableData () {
+            let that = this,
+                params = {
+                    clock: that.filterForm.data.timestart,
+                    clocke: that.filterForm.data.timeend,
+                    itemid: that.filterForm.data.codes,
+                    datatype: that.filterForm.data.dataType
+                };
+            that.$refs['dialog_form'].validate((valid) => {
+                if (valid) {
+                    that.filterForm.dataTypeName = that.nameObj.dataType.obj[that.filterForm.data.dataType];
+                    that.tableLoading = true;
+                    let url = 'pass/ems/v1/trmcalpoints/getRmCalpointVal';
+                    that.axios.get(url, {
+                        params: params
+                    })
+                        .then(function (res) {
+                            if (res.code === '0') {
+                                let tableMenu = []; // 表列名与数据id的对应关系
+                                let tableData = []; // 表数据
+                                let legend = [], // 图表显示项名
+                                    xAxis = [], // 图表x轴名称
+                                    series = []; // 图表具体项目数据
+                                if (res.data[0]) {
+                                    for (let key in res.data[0]) {
+                                        if (key.toString() !== 'tim') {
+                                            // 获取表列名与数据id的对应关系
+                                            tableMenu.push(
+                                                {
+                                                    name: res.data[0][key].name,
+                                                    code: key
+                                                }
+                                            );
+                                            legend.push(res.data[0][key].name);
+                                            // 创建图表显示项
+                                            series.push(
+                                                {
+                                                    id: key,
+                                                    name: res.data[0][key].name,
+                                                    type: 'line',
+                                                    data: []
+                                                }
+                                            );
+                                        }
+                                    }
+                                }
+                                for (let item of res.data) {
+                                    let obj = {
+                                        time: item.tim
+                                    };
+                                    for (let key in item) {
+                                        if (key.toString() !== 'tim') {
+                                            obj[key] = item[key].val;
+                                            for (let i = 0; i < series.length; i++) {
+                                                if (key === series[i].id) {
+                                                    series[i].data.push(item[key].val); // 为图表获取详细数值
+                                                    break;
+                                                }
+                                            }
+                                        }
+                                    }
+                                    tableData.push(obj);
+                                    xAxis.push(item.tim);
+                                }
+                                that.tableMenu = tableMenu;
+                                that.tableData = tableData;
+                                that.chart.option.legend.data = legend;
+                                that.chart.option.xAxis.data = xAxis;
+                                that.chart.option.series = series;
+                                // that.chart.show = false;
+                                // setTimeout(() => {
+                                //     that.chart.show = true;
+                                // }, 100);
+                                // that.$refs['graphical'].setGraphical();
+                                that.chart.show = false;
+                                setTimeout(() => {
+                                    that.chart.show = true;
+                                }, 100);
+                            } else {
+                                that.$message.error(res.message);
+                            }
+                            that.tableLoading = false;
+                        }).catch(function () {
+                            that.tableLoading = false;
+                        });
+                }
+            });
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            that.filterForm.data.timestart = '';
+            that.filterForm.data.timeend = '';
+            that.filterForm.data.dataType = '';
+            that.$refs['measurementPlaceChoose'].empty();
+        },
+        choosePlace () {
+            let that = this;
+            that.dialog.measuringLocation.show = true;
+        },
+        choosePlaceCancel () {
+            let that = this;
+            that.$refs['measurementPlaceChoose'].but_cancel();
+            that.dialog.measuringLocation.show = false;
+        },
+        choosePlaceSave () {
+            let that = this;
+            that.$refs['measurementPlaceChoose'].but_save();
+            that.dialog.measuringLocation.show = false;
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.measuringLocationQuery {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .box-top-gjl {
+                overflow: hidden;
+                // margin-top: -7px;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .box-bottom {
+            overflow: hidden;
+            .box-left {
+                width: 40%;
+                float: left;
+            }
+            .box-right {
+                width: 60%;
+                float: left;
+            }
+        }
+    }
+    .el-table {
+        .el-form-item {
+            margin-bottom: 0;
+        }
+    }
+    .input-but {
+        .el-input-group__append {
+            background-color: #409eff;
+            color: #fff;
+            border-color: #ccc;
+        }
+    }
+    .is-success {
+        .input-but {
+            .el-input-group__append {
+                border-color: #67c23a;
+            }
+        }
+    }
+    .is-error {
+        .input-but {
+            .el-input-group__append {
+                border-color: #f56c6c;
+            }
+        }
+    }
+}
+</style>

+ 537 - 0
src/views/energyScheduling/components/measuringLocationData/measuringLocationQueryTiming.vue

@@ -0,0 +1,537 @@
+<template>
+<!-- 准点数据查询(十分钟) -->
+    <div class="measuringLocationQuery">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    ref="dialog_form"
+                    :model="filterForm.data"
+                    :rules="filterForm.rules"
+                    size="mini"
+                    label-width="70px"
+                >
+                    <el-row>
+                        <el-col :span="6">
+                            <el-form-item label="开始时间" prop="timestart">
+                                <el-date-picker
+                                    v-model="filterForm.data.timestart"
+                                    type="datetime"
+                                    placeholder="开始时间"
+                                    style="width: 100%;"
+                                    format="yyyy-MM-dd HH"
+                                    value-format="yyyy-MM-dd HH"
+                                ></el-date-picker>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="结束时间" prop="timeend">
+                                <el-date-picker
+                                    v-model="filterForm.data.timeend"
+                                    type="datetime"
+                                    placeholder="结束时间"
+                                    style="width: 100%;"
+                                    format="yyyy-MM-dd HH"
+                                    value-format="yyyy-MM-dd HH"
+                                ></el-date-picker>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="计量点" prop="codes">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.names"
+                                    placeholder="计量点"
+                                    style="width: 100%;"
+                                    class="input-but"
+                                    readonly
+                                >
+                                    <el-button slot="append" @click="choosePlace()">选择</el-button>
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="6">
+                            <el-form-item label="数据类型" prop="dataType">
+                                <el-select
+                                filterable clearable
+                                    v-model="filterForm.data.dataType"
+                                    placeholder="数据类型"
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.dataType.arr"
+                                        :key="item.id"
+                                        :label="item.name"
+                                        :value="item.id"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            v-privilege="activeMenu + 'QUERY'"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 30;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <div class="box-left">
+                    <el-table stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        show-summary
+                        :summary-method="getSummaries"
+                    >
+                        <el-table-column
+                            sortable
+                            prop="time"
+                            label="时间"
+                            min-width="100px"
+                            align="center"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            v-if="tableMenu.length > 0"
+                            :label="filterForm.dataTypeName"
+                        >
+                            <el-table-column
+                                sortable
+                                v-for="(item, index) of tableMenu"
+                                :key="index"
+                                :prop="item.code"
+                                :label="item.name"
+                                min-width="100px"
+                                align="center"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                        </el-table-column>
+                    </el-table>
+                </div>
+                <div class="box-right">
+                    <icore-graphical
+                        ref="graphical"
+                        v-if="chart.show"
+                        :option="chart.option"
+                        :width="'100%'"
+                        :height="singleTableHeight"
+                    >
+                    </icore-graphical>
+                </div>
+            </div>
+        </div>
+        <el-dialog
+            title="选择计量点"
+            :visible.sync="dialog.measuringLocation.show"
+            width="900px"
+            :close-on-click-modal="false"
+            :show-close="!loading"
+        >
+            <div>
+                <measurementPlaceChoose ref="measurementPlaceChoose" :z_data="filterForm.data"></measurementPlaceChoose>
+            </div>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+                <el-button @click="choosePlaceCancel()">取 消</el-button>
+                <el-button
+                    type="primary"
+                    @click="choosePlaceSave()"
+                >确 定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import measurementPlaceChoose from './components/measurementPlaceChoose.vue'
+import {formatDate, commonSummaries} from '@/utils/util.js';
+export default {
+    name: 'measuringLocationQuery',
+    components: {
+        measurementPlaceChoose
+    },
+    data () {
+        let yesterday = new Date();
+        yesterday.setDate(new Date().getDate() - 1);
+        yesterday.setHours(0);
+        let timestart = formatDate(yesterday, 'yyyy-MM-dd HH'),
+            timeend = formatDate(new Date().setHours(new Date().getHours() - 1), 'yyyy-MM-dd HH');
+        return {
+            activeMenu: '',
+            filterForm: {
+                show: true,
+                dataTypeName: '',
+                data: {
+                    timestart: timestart,
+                    timeend: timeend,
+                    dataType: 'OnTime',
+                    codes: '',
+                    names: ''
+                },
+                rules: {
+                    timestart: [
+                        { required: true, message: '该项不能为空', trigger: 'change' }
+                    ],
+                    timeend: [
+                        { required: true, message: '该项不能为空', trigger: 'change' }
+                    ],
+                    dataType: [
+                        { required: true, message: '该项不能为空', trigger: 'change' }
+                    ],
+                    codes: [
+                        { required: true, message: '该项不能为空', trigger: 'change' }
+                    ]
+                }
+            },
+            singleTableHeight: 100,
+            // 表列名与数据id的对应关系
+            tableMenu: [
+                // {
+                //     name: '计量点1号',
+                //     code: 'code1'
+                // },
+                // {
+                //     name: '计量点2号',
+                //     code: 'code2'
+                // }
+            ],
+            tableData: [
+                // {
+                //     time: '2019-01-01/00',
+                //     code1: '1230',
+                //     code2: '1980'
+                // },
+                // {
+                //     time: '2019-01-01/03',
+                //     code1: '2234',
+                //     code2: '1200'
+                // },
+                // {
+                //     time: '2019-01-01/06',
+                //     code1: '3000',
+                //     code2: '3200'
+                // },
+                // {
+                //     time: '2019-01-01/09',
+                //     code1: '4500',
+                //     code2: '2300'
+                // },
+                // {
+                //     time: '2019-01-01/12',
+                //     code1: '3120',
+                //     code2: '3212'
+                // }
+            ],
+            nameObj: {
+                dataType: {
+                    obj: {
+                        'OnTime': '仪表值'
+                    },
+                    arr: [
+                        {
+                            id: 'OnTime',
+                            name: '仪表值'
+                        }
+                    ]
+                }
+            },
+            chart: {
+                show: false,
+                option: {
+                    title: {
+                        text: '趋势图'
+                    },
+                    tooltip: {
+                        trigger: 'axis'
+                    },
+                    legend: {
+                        data: [] // ['计量点1号', '计量点2号']
+                    },
+                    grid: {
+                        left: '3%',
+                        right: '4%',
+                        bottom: '3%',
+                        containLabel: true
+                    },
+                    toolbox: {
+                        feature: {
+                            saveAsImage: {}
+                        }
+                    },
+                    xAxis: {
+                        type: 'category',
+                        boundaryGap: true,
+                        data: [] // ['2019-01-01/00', '2019-01-01/03', '2019-01-01/06', '2019-01-01/09', '2019-01-01/12']
+                    },
+                    yAxis: {
+                        type: 'value'
+                    },
+                    series: [
+                        // {
+                        //     name: '计量点1号',
+                        //     type: 'line',
+                        //     data: [1230, 2234, 3000, 4500, 3120]
+                        // },
+                        // {
+                        //     name: '计量点2号',
+                        //     type: 'line',
+                        //     data: [1980, 1200, 3200, 2300, 3212]
+                        // }
+                    ]
+                }
+            },
+            loading: false,
+            tableLoading: false,
+            dialog: {
+                measuringLocation: {
+                    show: false
+                }
+            }
+        }
+    },
+    created () {
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 30;
+                that.chart.show = true;
+            }, 1);
+        });
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            let that = this;
+            let prop = [];
+            for (let item of that.tableMenu) {
+                if (item.code !== 'time') {
+                    prop.push(item.code);
+                }
+            }
+            return commonSummaries(param, prop);
+        },
+        // 获取表格中的数据
+        getTableData () {
+            let that = this,
+                params = {
+                    clock: that.filterForm.data.timestart,
+                    clocke: that.filterForm.data.timeend,
+                    itemid: that.filterForm.data.codes,
+                    datatype: that.filterForm.data.dataType
+                };
+            that.$refs['dialog_form'].validate((valid) => {
+                if (valid) {
+                    that.filterForm.dataTypeName = that.nameObj.dataType.obj[that.filterForm.data.dataType];
+                    that.tableLoading = true;
+                    let url = 'pass/ems/v1/trmcalpoints/getRmCalpointValTim';
+                    that.axios.get(url, {
+                        params: params
+                    })
+                        .then(function (res) {
+                            if (res.code === '0') {
+                                let tableMenu = []; // 表列名与数据id的对应关系
+                                let tableData = []; // 表数据
+                                let legend = [], // 图表显示项名
+                                    xAxis = [], // 图表x轴名称
+                                    series = []; // 图表具体项目数据
+                                if (res.data[0]) {
+                                    for (let key in res.data[0]) {
+                                        if (key.toString() !== 'tim') {
+                                            // 获取表列名与数据id的对应关系
+                                            tableMenu.push(
+                                                {
+                                                    name: res.data[0][key].name,
+                                                    code: key
+                                                }
+                                            );
+                                            legend.push(res.data[0][key].name);
+                                            // 创建图表显示项
+                                            series.push(
+                                                {
+                                                    id: key,
+                                                    name: res.data[0][key].name,
+                                                    type: 'line',
+                                                    data: []
+                                                }
+                                            );
+                                        }
+                                    }
+                                }
+                                for (let item of res.data) {
+                                    let obj = {
+                                        time: item.tim
+                                    };
+                                    for (let key in item) {
+                                        if (key.toString() !== 'tim') {
+                                            obj[key] = item[key].val;
+                                            for (let i = 0; i < series.length; i++) {
+                                                if (key === series[i].id) {
+                                                    series[i].data.push(item[key].val); // 为图表获取详细数值
+                                                    break;
+                                                }
+                                            }
+                                        }
+                                    }
+                                    tableData.push(obj);
+                                    xAxis.push(item.tim);
+                                }
+                                that.tableMenu = tableMenu;
+                                that.tableData = tableData;
+                                that.chart.option.legend.data = legend;
+                                that.chart.option.xAxis.data = xAxis;
+                                that.chart.option.series = series;
+                                // that.chart.show = false;
+                                // setTimeout(() => {
+                                //     that.chart.show = true;
+                                // }, 100);
+                                // that.$refs['graphical'].setGraphical();
+                                that.chart.show = false;
+                                setTimeout(() => {
+                                    that.chart.show = true;
+                                }, 100);
+                            } else {
+                                that.$message.error(res.message);
+                            }
+                            that.tableLoading = false;
+                        }).catch(function () {
+                            that.tableLoading = false;
+                        });
+                }
+            });
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            that.filterForm.data.timestart = '';
+            that.filterForm.data.timeend = '';
+            that.filterForm.data.dataType = '';
+            that.$refs['measurementPlaceChoose'].empty();
+        },
+        choosePlace () {
+            let that = this;
+            that.dialog.measuringLocation.show = true;
+        },
+        choosePlaceCancel () {
+            let that = this;
+            that.$refs['measurementPlaceChoose'].but_cancel();
+            that.dialog.measuringLocation.show = false;
+        },
+        choosePlaceSave () {
+            let that = this;
+            that.$refs['measurementPlaceChoose'].but_save();
+            that.dialog.measuringLocation.show = false;
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.measuringLocationQuery {
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .box-top-gjl {
+                overflow: hidden;
+                // margin-top: -7px;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+                // border-bottom: 1px solid #ccc;
+                // margin-bottom: 6px;
+            }
+        }
+        .box-bottom {
+            overflow: hidden;
+            .box-left {
+                width: 40%;
+                float: left;
+            }
+            .box-right {
+                width: 60%;
+                float: left;
+            }
+        }
+    }
+    .el-table {
+        .el-form-item {
+            margin-bottom: 0;
+        }
+    }
+    .input-but {
+        .el-input-group__append {
+            background-color: #409eff;
+            color: #fff;
+            border-color: #ccc;
+        }
+    }
+    .is-success {
+        .input-but {
+            .el-input-group__append {
+                border-color: #67c23a;
+            }
+        }
+    }
+    .is-error {
+        .input-but {
+            .el-input-group__append {
+                border-color: #f56c6c;
+            }
+        }
+    }
+}
+</style>

+ 934 - 0
src/views/energyScheduling/components/meterManage/measuringManualEntry.vue

@@ -0,0 +1,934 @@
+<template>
+    <!-- 计量点人工录入 -->
+    <div class="measuringManualEntry">
+        <div class="box">
+            <div class="box-top">
+                <el-form
+                    style="overflow: hidden;"
+                    :style="filterForm.show ? null : { height: '0px' }"
+                    size="mini"
+                    label-width="80px"
+                >
+                    <el-row>
+                        <el-col :span="5">
+                            <el-form-item label="日期">
+                                <zj-timegran-date
+                                    v-model="filterForm.data.clock"
+                                    style="width: 100%;"
+                                    :type="'daterange'"
+                                    :timegranId="'DAY'"
+                                    :oneFoo="getTableData"
+                                    :defaultOffset="-1"
+                                    :custom="custom"
+                                ></zj-timegran-date>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="位置">
+                                <el-select
+                                    filterable clearable
+                                    v-model="filterForm.data.locateid"
+                                    placeholder="位置"
+                                    multiple
+                                    collapse-tags
+                                    style="width: 100%;"
+                                >
+                                    <el-option
+                                        v-for="item of nameObj.location.arr"
+                                        :key="item.id"
+                                        :value="item.id"
+                                        :label="item.name"
+                                    ></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="计量点名称">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.itemname"
+                                    placeholder="计量点名称"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="5">
+                            <el-form-item label="计量点别名">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.itemdesc"
+                                    placeholder="计量点别名"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                         <el-col :span="4">
+                            <el-form-item label="计量点编号">
+                                <el-input clearable
+                                    v-model.trim="filterForm.data.itemid2"
+                                    placeholder="计量点编号"
+                                    style="width: 100%;"
+                                    @keyup.enter.native="getTableData(1)"
+                                ></el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+                </el-form>
+                <div class="box-top-gjl">
+                    <el-button
+                        class="button"
+                        type="primary"
+                        size="mini"
+                        icon="el-icon-edit-outline"
+                        @click="but_edit_plural()"
+                        :loading="loading"
+                    >保存</el-button>
+                    <div style="float:right; text-align: right;">
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-search"
+                            @click="getTableData(1)"
+                        >查询</el-button>
+                        <el-button
+                            class="button"
+                            type="primary"
+                            size="mini"
+                            icon="el-icon-refresh"
+                            @click="tableDataCancel();"
+                        >重置</el-button>
+                        <el-button
+                            size="mini"
+                            :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                            :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
+                            @click="filterForm.show = !filterForm.show;
+                                $nextTick(() => {
+                                    singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
+                                }
+                            );"
+                        >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+                    </div>
+                </div>
+            </div>
+            <div class="box-bottom">
+                <el-form
+                    size="mini"
+                    ref="dialog_form_arr"
+                    label-width="0px"
+                    :model="tableFormDataObj"
+                >
+                    <el-table stripe
+                        id="singleTable"
+                        ref="singleTable"
+                        :data="tableData"
+                        v-loading="tableLoading"
+                        style="width: 100%;"
+                        :height="singleTableHeight"
+                        border
+                        size="mini"
+                        highlight-current-row
+                        @selection-change="handleSelectionChange"
+                        show-summary
+                        :summary-method="getSummaries"
+                        :row-class-name="tableRowClassName"
+                        @cell-click="cellClick">
+                        <el-table-column
+                            type="selection"
+                            width="40"
+                            align="center"
+                            :selectable='checkboxT'
+                            fixed="left"
+                            class-name="cnspicuous"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="CLOCK"
+                            label="时间"
+                            width="78px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="timegranid"
+                            label="粒度"
+                            width="55px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.timegranid.obj[scope.row.timegranid] ? nameObj.timegranid.obj[scope.row.timegranid] : scope.row.timegranid }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="ITEMNAME"
+                            label="计量点名称"
+                            width="155px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="ITEMDESC"
+                            label="计量点别名"
+                            width="200px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="LOCATEID"
+                            label="位置"
+                            width="72px"
+                            fixed="left"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.location.obj[scope.row.LOCATEID] ? nameObj.location.obj[scope.row.LOCATEID] : scope.row.LOCATEID }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="ENERGYID"
+                            label="能介"
+                            width="72px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.energyid.obj[scope.row.ENERGYID] ? nameObj.energyid.obj[scope.row.ENERGYID].name : scope.row.ENERGYID }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="TAG_MODULUS"
+                            label="倍率"
+                            width="68px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="unitid"
+                            label="计量单位"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <span>{{ nameObj.unitid.obj[scope.row.unitid] ? nameObj.unitid.obj[scope.row.unitid] : scope.row.unitid }}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="MINTVALUE"
+                            label="仪表期初值"
+                            width="100px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="MENDVALUE"
+                            label="仪表期末值"
+                            width="135px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection && (scope.row.ed === 1 || loginName === 'admin')"
+                                    :prop="scope.row.ITEMID + '-' + scope.row.CLOCK + '.MENDVALUE'"
+                                    :rules="tableFormRules.mendvalue"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.ITEMID + '-' + scope.row.CLOCK].MENDVALUE"
+                                        refcous="true"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        @change = "getApportValue(scope.row.ITEMID + '-' + scope.row.CLOCK, tableFormDataObj[scope.row.ITEMID + '-' + scope.row.CLOCK].MENDVALUE, scope.$index, $event)"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.MENDVALUE}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="APPORTVALUE"
+                            label="最终值"
+                            width="135px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection && (scope.row.ed === 1 || loginName === 'admin')"
+                                    :prop="scope.row.ITEMID + '-' + scope.row.CLOCK + '.APPORTVALUE'"
+                                    :rules="tableFormRules.apportvalue"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.ITEMID + '-' + scope.row.CLOCK].APPORTVALUE"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.APPORTVALUE}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="bz"
+                            label="备注"
+                            min-width="150px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection && (scope.row.ed === 1 || loginName === 'admin')"
+                                    :prop="scope.row.ITEMID + '-' + scope.row.CLOCK + '.bz'"
+                                    :rules="tableFormRules.bz"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.ITEMID + '-' + scope.row.CLOCK].bz"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.bz}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="ITEMID"
+                            label="计量点编号"
+                            width="108px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="xh"
+                            label="序号"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                            <template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection && (scope.row.ed === 1 || loginName === 'admin')"
+                                    :prop="scope.row.ITEMID + '-' + scope.row.CLOCK + '.xh'"
+                                    :rules="tableFormRules.xh"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        @keydown.native="keyDown" :id="scope.$index + scope.column.id"
+                                        v-model="tableFormDataObj[scope.row.ITEMID + '-' + scope.row.CLOCK].xh"
+                                        refcous="true"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{scope.row.xh}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="oper_user"
+                            label="创建人"
+                            width="75px"
+                            :show-overflow-tooltip="true"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                            sortable
+                            prop="oper_date"
+                            label="创建时间"
+                            width="130px"
+                            :show-overflow-tooltip="true"
+                        ></el-table-column>
+                    </el-table>
+                </el-form>
+                <el-pagination
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="total"
+                    :page-sizes="[10, 20, 50, 100, 500, 1000]"
+                    :page-size="pageSize"
+                    :current-page.sync="pageNum"
+                    @size-change="tableSizeChange"
+                    @current-change="getTableData()"
+                    style="text-align: right;margin-top: 10px;"
+                ></el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { zCheckNumber1, checkInteger } from '~/utils/validator.js'
+import timegranDate from '@/components/zg/timegranDate.vue'
+import {formatDate, commonSummaries, getCookie} from '@/utils/util.js';
+export default {
+    name: 'measuringManualEntry',
+    components: {
+        'zj-timegran-date': timegranDate
+    },
+    data () {
+        return {
+            custom: 1,
+            filterForm: {
+                show: true,
+                data: {
+                    clock: '',
+                    itemid: '',
+                    itemid2: '',
+                    locateid: '',
+                    state: '',
+                    itemname: '',
+                    itemdesc: ''
+                },
+                rules: {
+                }
+            },
+            pageNum: 1,
+            pageSize: 20,
+            total: 0,
+            singleTableHeight: 100,
+            tableData: [],
+            loading: false,
+            tableLoading: false,
+            multipleSelection: [],
+            tableFormDataObj: {},
+            tableFormRules: {
+                mintvalue: [
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                mendvalue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                apportvalue: [
+                    { required: true, message: '该项不能为空', trigger: 'change' },
+                    { validator: zCheckNumber1, trigger: 'change' }
+                ],
+                bz: [],
+                xh: [
+                    { validator: checkInteger, trigger: 'change' }
+                ]
+            },
+            nameObj: {
+                type: {
+                    obj: {
+                        '0': '否',
+                        '1': '是'
+                    },
+                    arr: [
+                        {
+                            id: '0',
+                            name: '否'
+                        },
+                        {
+                            id: '1',
+                            name: '是'
+                        }
+                    ]
+                },
+                energyid: {
+                    obj: {},
+                    arr: []
+                },
+                workprocid: {
+                    obj: {},
+                    arr: []
+                },
+                location: {
+                    obj: {},
+                    arr: []
+                },
+                unitid: {
+                    obj: {},
+                    arr: []
+                },
+                timegranid: {
+                    obj: {
+                        'DAY': '日',
+                        'MONTH': '月',
+                        'YEAR': '年'
+                    }
+                }
+            },
+            rowIndex: '',
+            columnId: '',
+            focusTarget: null,
+            seqArr: [],
+            editSetFlag: '',
+            loginName: 'admin' // getCookie('loginName')
+        }
+    },
+    created () {
+        // 获取按钮权限
+        this.activeMenu = window.localStorage.getItem('activeMenu');
+    },
+    mounted () {
+        let that = this;
+        window.PEDataObj = {
+            // 将数据绑定到window上,供main页面使用
+            vm: that,
+            // tableArr:用于导出成Excel的表格的信息
+            tableArr: [
+                {
+                    name: '',
+                    id: 'singleTable'
+                }
+            ]
+        };
+        that.$nextTick(() => {
+            // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+            setTimeout(() => {
+                that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+            }, 1);
+        });
+        // 接收路由参数
+        if (that.$route.query.itemid) {
+            that.filterForm.data.itemid = that.$route.query.itemid;
+            let its = that.filterForm.data.itemid.split(',');
+            if (its && its.length > 10) {
+                that.pageSize = 50;
+                that.custom = 0;
+            }
+        }
+        that.getNodeData();
+        that.getEnergyIdData();
+        that.getLocateIdData();
+        that.getUnitIdData();
+        // that.getTableData();
+    },
+    methods: {
+        //  计算树区域高度
+        getRoleHeight (dom) {
+            return window.innerHeight - dom.offsetTop;
+        },
+        // 自定义的表格合计方法:只给指定列进行合计
+        getSummaries (param) {
+            const prop = ['APPORTVALUE']; // 合计列绑定的prop
+            return commonSummaries(param, prop);
+        },
+        // 获取能介
+        getEnergyIdData () {
+            let that = this;
+            let url = 'pass/ems/v1/trmenergys/selectNameAndId/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name,
+                                energytypeid: item.energytypeid,
+                                unitid: item.unitid
+                            })
+                            obj[item.id] = {
+                                name: item.name,
+                                unitid: item.unitid
+                            }
+                        }
+                        that.nameObj.energyid.arr = arr;
+                        that.nameObj.energyid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取位置
+        getLocateIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmlocations/getidandname/';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.location.arr = arr;
+                        that.nameObj.location.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取工序列表
+        getNodeData () {
+            let that = this
+            let url = 'pass/ems/v1/trmworkprocs/getIdAndName?issettle=1';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                        }
+                        that.nameObj.workprocid.arr = arr;
+                        that.nameObj.workprocid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取标准计量单位
+        getUnitIdData () {
+            let that = this
+            let url = 'pass/ems/v1/trmunits/getIdAndName';
+            that.axios.get(url)
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        let obj = {};
+                        for (let item of res.data) {
+                            arr.push({
+                                id: item.id,
+                                name: item.name
+                            })
+                            obj[item.id] = item.name;
+                            if (item.name === '吨') {
+                                that.nameObj.unitid.defaults = that.nameObj.unitid.defaults ? that.nameObj.unitid.defaults : item.id;
+                            }
+                        }
+                        that.nameObj.unitid.arr = arr;
+                        that.nameObj.unitid.obj = obj;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                });
+        },
+        // 获取表格中的数据
+        getTableData (pageNum) {
+            let that = this,
+                params = {
+                    clock: that.filterForm.data.clock[0],
+                    clocke: that.filterForm.data.clock[1],
+                    itemid: that.filterForm.data.itemid,
+                    itemid2: that.filterForm.data.itemid2,
+                    locateid: that.filterForm.data.locateid.join(','),
+                    itemname: that.filterForm.data.itemname,
+                    itemdesc: that.filterForm.data.itemdesc
+                };
+            that.pageNum = pageNum || that.pageNum;
+            that.tableLoading = true;
+            let url = 'pass/ems/v1/emscalpointvalues/getDateEditForPage?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
+            that.axios.get(url, {
+                params: params
+            })
+                .then(function (res) {
+                    if (res.code === '0') {
+                        let arr = [];
+                        for (let i = 0; i < res.data.list.length; i++) {
+                            let item = res.data.list[i];
+                            arr.push({
+                                seq: i,
+                                CLOCK: item.CLOCK,
+                                ITEMID: item.ITEMID,
+                                ITEMID2: item.ITEMID2,
+                                ITEMNAME: item.ITEMNAME,
+                                ITEMDESC: item.ITEMDESC,
+                                LOCATEID: item.LOCATEID,
+                                ENERGYID: item.ENERGYID,
+                                TAG_MODULUS: item.TAG_MODULUS,
+                                MINTVALUE: item.MINTVALUE,
+                                MENDVALUE: item.MENDVALUE,
+                                APPORTVALUE: item.APPORTVALUE,
+                                bz: item.BZ,
+                                oper_user: item.OPER_USER,
+                                oper_date: item.OPER_DATE,
+                                ed: item.ED,
+                                timegranid: item.TIMEGRANID,
+                                unitid: item.UNITID,
+                                xh: item.XH
+                            })
+                        }
+                        that.tableData = arr;
+                        that.total = res.data.total;
+                    } else {
+                        that.$message.error(res.message);
+                    }
+                    that.$nextTick(() => {
+                        setTimeout(() => {
+                            that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 46;
+                        }, 1);
+                    });
+                    that.tableLoading = false;
+                }).catch(function () {
+                    that.tableLoading = false;
+                });
+        },
+        // 改变表格显示条数
+        tableSizeChange (val) {
+            let that = this;
+            that.pageSize = val;
+            that.getTableData(1);
+        },
+        // 重置搜索
+        tableDataCancel () {
+            let that = this;
+            for (let key in that.filterForm.data) {
+                if (!that.filterForm.disabled || !that.filterForm.disabled[key]) {
+                    if (that.filterForm.data[key] instanceof Array) {
+                        that.filterForm.data[key] = [];
+                    } else {
+                        that.filterForm.data[key] = '';
+                    }
+                }
+            }
+            that.getTableData(1);
+        },
+        keyDown (event1, disabledFlag) {
+            let tdTarget = event1.target;
+            let _this = this;
+            while (tdTarget.tagName !== 'TD') {
+                tdTarget = tdTarget.parentElement;
+            }
+            if (event.keyCode) {
+                _this.codeT = event.keyCode;
+            }
+            // 如果按下键盘下键或者回车键
+            if (event.keyCode === 40 || event.keyCode === 13) {
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[this.seqArr.length - 1]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i + 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 38) { // 键盘上键
+                let index = parseInt(this.rowIndex);
+                if (index !== this.seqArr[0]) {
+                    for (let i = 0; i < this.seqArr.length; i++) {
+                        if (index === this.seqArr[i]) {
+                        index = this.seqArr[i - 1];
+                        break;
+                        }
+                    }
+                }
+                this.editSetFlag = index + this.columnId;
+                let id = '#' + this.editSetFlag;
+                this.$nextTick(() => {
+                    $(id).click();
+                });
+            } else if (event.keyCode === 37) { // 键盘左键
+                $(tdTarget).prev().click();
+                $(tdTarget).prev().find('input').select();
+            } else if (event.keyCode === 39) { // 键盘右键
+                $(tdTarget).next().click();
+                $(tdTarget).next().find('input').select();
+            }
+        },
+        tableRowClassName ({row, rowIndex}) {
+            // 把每一行的索引放进row
+            row.index = rowIndex;
+        },
+        cellClick (row, column, cell, event) {
+            let _this = this;
+            this.rowIndex = row.index;
+            this.columnId = column.id;
+            let disabledFlag = false;
+            // if (!row[column.property] && row[column.property] !== null && row[column.property] !== '') {
+            //     _this.keyDown(event, true);
+            // }
+            _this.editSetFlag = row.index + column.id;
+            _this.focusTarget = event.target;
+            while (_this.focusTarget.tagName !== 'TD') {
+                _this.focusTarget = _this.focusTarget.parentElement;
+            }
+            _this.$nextTick(() => {
+                let target = this.focusTarget;
+                $(target).find('input').focus();
+            });
+        },
+        // 只允许对可编辑数据进行操作
+        checkboxT (row, index) {
+            let _this = this;
+            if (row.ed === 1 || _this.loginName === 'admin') {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        handleSelectionChange (val) {
+            let that = this;
+            let tableFormDataObj = {};
+            let arr = [];
+            for (let item of val) {
+                arr.push(item.seq);
+            }
+            this.seqArr = arr.sort(sortNumber);
+            for (let item of that.tableData) {
+                item.isSelection = false;
+            }
+            for (let item of val) {
+                let obj = {};
+                let xId = item.ITEMID + '-' + item.CLOCK;
+                if (that.tableFormDataObj[xId]) {
+                    // 如果已存在该数据则使用该数据
+                    tableFormDataObj[xId] = that.tableFormDataObj[xId];
+                } else {
+                    // 负责则从对应行中获取行内原数据
+                    for (let key in item) {
+                        obj[key] = item[key];
+                    }
+                    tableFormDataObj[xId] = obj;
+                }
+                item.isSelection = true;
+            }
+            that.tableFormDataObj = tableFormDataObj;
+            that.multipleSelection = val;
+        },
+        // 当上月底码发生改变时计算最终值
+        getApportValue (xid, value, rowIndex, event) {
+            let that = this;
+            if (!isNaN(Number(value))) {
+                if (!isNaN(Number(that.tableFormDataObj[xid].MINTVALUE)) && !isNaN(Number(that.tableFormDataObj[xid].MENDVALUE)) && that.tableFormDataObj[xid].MINTVALUE !== null && that.tableFormDataObj[xid].MENDVALUE !== null) {
+                    let poor = that.floatComputed(Number(that.tableFormDataObj[xid].MENDVALUE), Number(that.tableFormDataObj[xid].MINTVALUE), '-');
+                    that.tableFormDataObj[xid].APPORTVALUE = poor;
+                    // that.tableFormDataObj[xid].APPORTVALUE = that.floatComputed(poor, Number(that.tableFormDataObj[xid].mods), '*');
+                    // that.showRealValue(rowIndex, that.tableFormDataObj[xid].APPORTVALUE);
+                }
+            }
+        },
+        // 展示最终值
+        showRealValue (rowIndex, value) {
+            let that = this;
+            for (let i = 0; i < that.tableData.length; i++) {
+                if (i === rowIndex) {
+                    that.tableData[i].APPORTVALUE = value;
+                }
+            }
+        },
+        // 批量修改
+        but_edit_plural () {
+            let that = this;
+            if (that.multipleSelection.length > 0) {
+                that.$refs['dialog_form_arr'].validate((valid, msg) => {
+                    if (valid) {
+                        let SubmitData = [];
+                        for (let key in that.tableFormDataObj) {
+                            SubmitData.push({
+                                clock: that.tableFormDataObj[key].CLOCK,
+                                itemid: that.tableFormDataObj[key].ITEMID,
+                                itemname: that.tableFormDataObj[key].ITEMNAME,
+                                itemdesc: that.tableFormDataObj[key].ITEMDESC,
+                                locateid: that.tableFormDataObj[key].LOCATEID,
+                                energyid: that.tableFormDataObj[key].ENERGYID,
+                                tagModulus: that.tableFormDataObj[key].TAG_MODULUS,
+                                apportvalue: that.tableFormDataObj[key].APPORTVALUE,
+                                mintvalue: that.tableFormDataObj[key].MINTVALUE,
+                                mendvalue: that.tableFormDataObj[key].MENDVALUE,
+                                bz: that.tableFormDataObj[key].bz,
+                                timegranid: that.tableFormDataObj[key].timegranid,
+                                unitid: that.tableFormDataObj[key].unitid,
+                                xh: that.tableFormDataObj[key].xh
+                            });
+                        }
+                        that.loading = true;
+                        that.axios.put('pass/ems/v1/emscalpointvalues/batchupdate', SubmitData)
+                            .then(function (res) {
+                                if (res.code === '0') {
+                                    that.$message({
+                                        message: '保存成功',
+                                        type: 'success'
+                                    });
+                                    that.getTableData();
+                                    that.dialog.editorBox.show = false;
+                                } else {
+                                    that.$message.error(res.message);
+                                }
+                                that.loading = false;
+                            }).catch(function () {
+                                that.loading = false;
+                            });
+                        } else {
+                            let col = Object.keys(msg)[0].split('.')[1];
+                            if (col && col === 'MENDVALUE') {
+                                this.$message.error('请填写正确的仪表期末值');
+                            } else if (col && col === 'APPORTVALUE') {
+                                this.$message.error('请填写正确的最终值');
+                            } else if (col && col === 'xh') {
+                                this.$message.error('请填写正确的序号:0以上的整数');
+                            } else {
+                                this.$message.error('数据不完整或者格式错误');
+                            }
+                        }
+                });
+            } else {
+                this.$message.error('至少要选择一条数据');
+            }
+        }
+    }
+}
+function sortNumber (a, b) {
+  return a - b
+}
+</script>
+
+<style lang="less">
+.measuringManualEntry{
+    min-width: 700px;
+    height: 100%;
+    .box {
+        height: 100%;
+        padding: 15px 15px 0 15px;
+        .box-top {
+            .el-form-item {
+                margin-bottom: 7px;
+            }
+            .box-top-gjl {
+                overflow: hidden;
+                padding: 7px 0;
+                border-top: 1px solid #ccc;
+            }
+        }
+        .rowDisable td {
+            color: #6bb025 !important;
+        }
+        .el-table .el-table__row {
+            height: 35px;
+        }
+        .el-table__body .el-form-item--mini.el-form-item {
+            margin: 0px;
+            .error {
+                overflow: hidden;
+                color: #f56c6c;
+                font-size: 12px;
+                line-height: 1;
+            }
+        }
+    }
+    .cnspicuous .el-checkbox__input.is-disabled .el-checkbox__inner {
+        background-color: #dcdfe6;
+        border-color: #babbbf;
+    }
+}
+</style>

+ 126 - 0
src/views/energyScheduling/router/index.js

@@ -0,0 +1,126 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+import '@/assets/iconfont/iconfont.css'
+
+// 主要
+import main from '@/components/main.vue'
+// 准点数据查询
+import measuringLocationQuery from '../components/measuringLocationData/measuringLocationQuery.vue'
+// 计量点数据录入
+import measuringLocationEntry from '../components/measuringLocationData/measuringLocationEntry.vue'
+// 异常数据维护
+import AbnormalDataMaintenance from '../components/measuringLocationData/AbnormalDataMaintenance.vue'
+// 计量点标准维护
+import measurementStandard from '../components/measuringLocationData/measurementStandard.vue'
+// 计量点数据录入-分厂
+import manualmeasuringLocationEntry from '../components/measuringLocationData/manualmeasuringLocationEntry.vue'
+// 总值班长调度日志
+import squadLeader from '../components/dispatchingLog/squadLeader.vue'
+// 动力调度交接班日志
+import power from '../components/dispatchingLog/power.vue'
+// 电力调度交接班日志
+import electric from '../components/dispatchingLog/electric.vue'
+// 水道调度交接班日志
+import water from '../components/dispatchingLog/water.vue'
+// 能源调度日志
+import energyDispatch from '../components/dispatchingLog/energyDispatch.vue'
+// 计量点人工录入
+import measuringManualEntry from '../components/meterManage/measuringManualEntry.vue'
+// 计量点数据录入十分钟
+import measuringLocationQueryTiming from '../components/measuringLocationData/measuringLocationQueryTiming.vue'
+// 投入产出实际
+import investAndProduceManage from '../components/investAndProduce/investAndProduceManage.vue'
+// 产出实际
+import productMaterialsInOut from '../components/investAndProduce/productMaterialsInOut.vue'
+// 投入实际
+import productMaterialsInput from '../components/investAndProduce/productMaterialsInput.vue'
+
+Vue.use(Router)
+
+export default new Router({
+    routes: [{
+        path: '/',
+        name: 'main',
+        component: main,
+        redirect: {
+            name: 'measuringLocationQuery'
+        },
+        children: [
+            {
+                path: 'measuringLocationQuery',
+                name: 'measuringLocationQuery',
+                component: measuringLocationQuery
+            },
+            {
+                path: 'measuringLocationEntry',
+                name: 'measuringLocationEntry',
+                component: measuringLocationEntry
+            },
+            {
+                path: 'manualmeasuringLocationEntry',
+                name: 'manualmeasuringLocationEntry',
+                component: manualmeasuringLocationEntry
+            },
+            {
+                path: 'squadLeader',
+                name: 'squadLeader',
+                component: squadLeader
+            },
+            {
+                path: 'power',
+                name: 'power',
+                component: power
+            },
+            {
+                path: 'electric',
+                name: 'electric',
+                component: electric
+            },
+            {
+                path: 'water',
+                name: 'water',
+                component: water
+            },
+            {
+                path: 'energyDispatch',
+                name: 'energyDispatch',
+                component: energyDispatch
+            },
+            {
+                path: 'measuringManualEntry',
+                name: 'measuringManualEntry',
+                component: measuringManualEntry
+            },
+            {
+                path: 'AbnormalDataMaintenance',
+                name: 'AbnormalDataMaintenance',
+                component: AbnormalDataMaintenance
+            },
+            {
+                path: 'measuringLocationQueryTiming',
+                name: 'measuringLocationQueryTiming',
+                component: measuringLocationQueryTiming
+            },
+            {
+                path: 'investAndProduceManage',
+                name: 'investAndProduceManage',
+                component: investAndProduceManage
+            },
+            {
+                path: 'productMaterialsInOut',
+                name: 'productMaterialsInOut',
+                component: productMaterialsInOut
+            },
+            {
+                path: 'productMaterialsInput',
+                name: 'productMaterialsInput',
+                component: productMaterialsInput
+            },
+            {
+                path: 'measurementStandard',
+                name: 'measurementStandard',
+                component: measurementStandard
+            }
+        ]
+    }]
+})

+ 3 - 3
src/views/systemInterface/app.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
-    <meta content="工业互联网平台 iCore-ICP" name="keywords">
-    <meta content="工业互联网平台 iCore-ICP" name="description">
-    <title>工业互联网平台 iCore-ICP</title>
+    <meta content="安泰控股集团智能管控系统" name="keywords">
+    <meta content="安泰控股集团智能管控系统" name="description">
+    <title>安泰控股集团智能管控系统</title>
     <link href="../static/css/common.css" rel="stylesheet"/>
     <link href="../static/img/favicon.ico" rel="shortcut icon"/>
     <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>