瀏覽代碼

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	itdmWeb/src/api/api.js
110 1 年之前
父節點
當前提交
72c5208462
共有 42 個文件被更改,包括 5783 次插入765 次删除
  1. 1 0
      itdmWeb/.env
  2. 4 1
      itdmWeb/.env.development
  3. 2 1
      itdmWeb/.env.production
  4. 2 1
      itdmWeb/.env.test
  5. 4 2
      itdmWeb/package.json
  6. 5 0
      itdmWeb/public/index.html
  7. 3 5
      itdmWeb/src/api/api.js
  8. 二進制
      itdmWeb/src/assets/images/bg.png
  9. 二進制
      itdmWeb/src/assets/images/big.jpg
  10. 二進制
      itdmWeb/src/assets/images/titleBg22.png
  11. 二進制
      itdmWeb/src/assets/images/up.png
  12. 336 322
      itdmWeb/src/components/Gantt.vue
  13. 11 1
      itdmWeb/src/config/router.config.js
  14. 16 1
      itdmWeb/src/views/module-iTDM/baogao/ItdmBaogaoList.vue
  15. 98 0
      itdmWeb/src/views/module-iTDM/baogao/modules/wordEdit.vue
  16. 225 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/ItdmEnvironmentQuyuList.vue
  17. 219 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/ItdmEnvironmentWaterList.vue
  18. 201 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/ItdmEnvironmentYeweiList.vue
  19. 124 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentQuyuForm.vue
  20. 84 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentQuyuModal.Style#Drawer.vue
  21. 60 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentQuyuModal.vue
  22. 119 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentWaterForm.vue
  23. 84 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentWaterModal.Style#Drawer.vue
  24. 60 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentWaterModal.vue
  25. 109 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentYeweiForm.vue
  26. 84 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentYeweiModal.Style#Drawer.vue
  27. 60 0
      itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentYeweiModal.vue
  28. 53 43
      itdmWeb/src/views/module-iTDM/itdmDevice/ItdmDeviceList.vue
  29. 1 1
      itdmWeb/src/views/module-iTDM/itdmDevice/modules/ItdmDeviceForm.vue
  30. 54 0
      itdmWeb/src/views/module-iTDM/itdmEnvironmentData/itdmEnvironmentData.vue
  31. 132 15
      itdmWeb/src/views/module-iTDM/itdmGongdanDetail/ItdmGongdanDetailList.vue
  32. 5 0
      itdmWeb/src/views/module-iTDM/itdmGongdanDetail/modules/ItdmGongdanDetailForm.vue
  33. 416 305
      itdmWeb/src/views/module-iTDM/itdmGongdanMaster/itdmGongdanMasterList.vue
  34. 3 5
      itdmWeb/src/views/module-iTDM/itdmPersonManage/ItdmPersonManageList.vue
  35. 762 0
      itdmWeb/src/views/module-iTDM/itdmScreen/itdmGraph.vue
  36. 1327 0
      itdmWeb/src/views/module-iTDM/itdmScreen/itdmScreenIndex.vue
  37. 1 0
      itdmWeb/src/views/module-iTDM/itdmTestPlan/itdmTestPlanList1.vue
  38. 35 26
      itdmWeb/src/views/module-iTDM/itdmWenxiang/ItdmWenxiangList.vue
  39. 20 7
      itdmWeb/src/views/module-iTDM/itdmWenxiangVoltage/ItdmWenxiangVoltageList.vue
  40. 10 1
      itdmWeb/src/views/module-iTDM/moban/ItdmMobanList.vue
  41. 98 0
      itdmWeb/src/views/module-iTDM/moban/modules/wordEdit.vue
  42. 955 28
      itdmWeb/yarn.lock

+ 1 - 0
itdmWeb/.env

@@ -4,3 +4,4 @@ VUE_APP_PLATFORM_NAME=iTDM试验协同管理平台
 VUE_APP_SSO=false
 # 开启微应用模式
 VUE_APP_QIANKUN=false
+VUE_APP_ONLYOFFICE_URL=http://192.168.1.26

+ 4 - 1
itdmWeb/.env.development

@@ -1,7 +1,10 @@
 NODE_ENV=development
-VUE_APP_API_BASE_URL=http://localhost:8080/itdmServer
+VUE_APP_API_BASE_URL=http://192.168.1.14:8080/itdmServer
 VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
 VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
 
 # 微应用列表必须VUE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
 VUE_APP_SUB_jeecg-app-1 = '//localhost:8092'
+
+
+VUE_APP_ONLYOFFICE_URL=http://192.168.1.26

+ 2 - 1
itdmWeb/.env.production

@@ -1,4 +1,5 @@
 NODE_ENV=production
 VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot
 VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
-VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
+VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
+VUE_APP_ONLYOFFICE_URL=http://192.168.1.26

+ 2 - 1
itdmWeb/.env.test

@@ -1,4 +1,5 @@
 NODE_ENV=production
 VUE_APP_API_BASE_URL=http://boot.jeecg.com:8080/jeecg-boot
 VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
-VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
+VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
+VUE_APP_ONLYOFFICE_URL=http://192.168.1.26

+ 4 - 2
itdmWeb/package.json

@@ -23,14 +23,17 @@
     "dayjs": "^1.8.0",
     "dhtmlx-gantt": "^8.0.1",
     "dom-align": "1.12.0",
+    "echarts": "4.9.0",
     "enquire.js": "^2.1.6",
     "font-awesome": "^4.7.0",
     "js-cookie": "^2.2.0",
     "lodash.get": "^4.4.2",
     "lodash.pick": "^4.4.0",
     "md5": "^2.2.1",
+    "node-sass": "^9.0.0",
     "nprogress": "^0.2.0",
     "qiankun": "^2.5.1",
+    "sass-loader": "7.3.1",
     "tinymce": "5.4.1",
     "viser-vue": "^2.4.8",
     "vue": "^2.6.10",
@@ -51,8 +54,6 @@
     "xss": "^1.0.13"
   },
   "devDependencies": {
-    "sass": "^1.34.1",
-    "sass-loader": "^12.1.0",
     "@babel/polyfill": "^7.2.5",
     "@vue/cli-plugin-babel": "^3.3.0",
     "@vue/cli-plugin-eslint": "^3.3.0",
@@ -65,6 +66,7 @@
     "html-webpack-plugin": "^4.2.0",
     "less": "^3.9.0",
     "less-loader": "^4.1.0",
+    "sass": "^1.34.1",
     "vue-template-compiler": "^2.6.10"
   },
   "eslintConfig": {

+ 5 - 0
itdmWeb/public/index.html

@@ -16,6 +16,8 @@
   <script src="<%= BASE_URL %>cdn/babel-polyfill/chosen.jquery.js"></script> -->
   <!-- <link rel="stylesheet" type="text/css" href="<%= BASE_URL %>cdn/babel-polyfill/chosen.css"> -->
   <!-- <link rel="stylesheet" type="text/css" href="./cdn/babel-polyfill/chosen.css"> -->
+  <script type="text/javascript" src="<%= VUE_APP_ONLYOFFICE_URL %>/web-apps/apps/api/documents/api.js"></script>
+
   <style>
     html,
     body,
@@ -249,6 +251,9 @@
   </style>
   <!-- 全局配置 -->
   <script src="<%= BASE_URL %>static/config.js"></script>
+  <script type="text/javascript">
+    console.log('<%= VUE_APP_ONLYOFFICE_URL %>')
+  </script>
 </head>
 
 <body>

+ 3 - 5
itdmWeb/src/api/api.js

@@ -67,9 +67,8 @@ const saveProject = (params)=>postAction("/sych/JHYAddOrUpdate",params);
 // 项目经理查询计划列表
 const getXmjlList = (params) => getAction('/sych/XMJLList', params);
 // 项目经理拆单后的提交按钮
-const saveProjectJl = (params)=>postAction("/sych/XMJLAddOrUpdate",params)
-//生成
-const generate = (params)=>postAction("/itdmgomgongdanshuju/ItdmGongdanshuju/create",params)
+const saveProjectJl = (params)=>postAction("/sych/XMJLAddOrUpdate",params);
+
 
 //日志管理
 const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
@@ -182,8 +181,7 @@ export {
   getJhList,
   saveProject,
   getXmjlList,
-  saveProjectJl,
-  generate
+  saveProjectJl
 }
 
 

二進制
itdmWeb/src/assets/images/bg.png


二進制
itdmWeb/src/assets/images/big.jpg


二進制
itdmWeb/src/assets/images/titleBg22.png


二進制
itdmWeb/src/assets/images/up.png


+ 336 - 322
itdmWeb/src/components/Gantt.vue

@@ -34,12 +34,342 @@ export default {
   },
   created() {
     // 清空数据
-    gantt.clearAll(); 
+    gantt.clearAll();
     this.getDevicelist();
     this.getCgqlist();
     this.getManagerList();
     console.log(1112,this.tasks)
   },
+  beforeDestroy() {
+    gantt.clearAll();
+  },
+  mounted() {
+      // 启用动态加载
+      gantt.config.branch_loading = true
+      //日期格式化
+      gantt.config.xml_date = "%Y-%m-%d";
+      gantt.config.order_branch = true;
+      gantt.config.order_branch_free = true;
+      //左侧是否自适应
+      gantt.config.autofit = true;
+      gantt.config.drag_links = false;//连线
+      gantt.config.readonly = false;  //只读
+      gantt.config.date_scale = "%m月%d日"; //右侧显示列名
+      gantt.config.layout = {//拖拽布局
+        css: "gantt_container",
+        rows: [
+          {
+            cols: [
+              { view: "grid", id: "grid", scrollX: "scrollHor", scrollY: "scrollVer" },
+              { resizer: true, width: 1 },
+              { view: "timeline", id: "timeline", scrollX: "scrollHor", scrollY: "scrollVer" },
+              { view: "scrollbar", scroll: "y", id: "scrollVer" }
+            ]
+          },
+          { view: "scrollbar", scroll: "x", id: "scrollHor", height: 20 }
+        ],
+        // rows: [
+        //   {
+        //     cols: [
+        //       {
+        //         width:400,
+        //         min_width: 300,
+        //         rows:[
+        //           {view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"},
+        //           {view: "scrollbar", id: "gridScroll", group:"horizontal"}            ]
+        //       },
+        //       {resizer: true, width: 1},
+        //       {
+        //         rows:[
+        //           {view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer"},
+        //           {view: "scrollbar", id: "scrollHor", group:"horizontal"}            ]
+        //       },
+        //       {view: "scrollbar", id: "scrollVer"}
+        //     ]
+        //   },
+        // ],
+        // cols: [
+        //   {
+        //     width:400,
+        //     min_width: 300,
+        //     rows:[
+        //       {view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"},
+        //       {view: "scrollbar", id: "gridScroll", group:"horizontal"}            ]
+        //   },
+        //   {resizer: true, width: 1},
+        //   {
+        //     rows:[
+        //       {view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer"},
+        //       {view: "scrollbar", id: "scrollHor", group:"horizontal"}            ]
+        //   },
+        //   {view: "scrollbar", id: "scrollVer"}
+        // ]
+      };
+      // 重置布局
+      gantt.resetLayout();
+      gantt.config.start_on_monday = true;
+      // 注意取消工作日!!!!(gantt.config.work_time = false;)
+      gantt.config.work_time = false;
+      gantt.config.fit_tasks = true;   //自动调整图表坐标轴区间用于适配task的长度
+      // 甘特图汉化
+      gantt.locale = {
+        date: {
+          month_full: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
+          month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+          day_full: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
+          day_short: ["日", "一", "二", "三", "四", "五", "六"]
+        },
+        labels: {
+          dhx_cal_today_button: "今天",
+          day_tab: "日",
+          week_tab: "周",
+          month_tab: "月",
+          new_event: "新建日程",
+          icon_save: "保存",
+          icon_cancel: "关闭",
+          icon_details: "详细",
+          icon_edit: "编辑",
+          icon_delete: "删除",
+          confirm_closing: "请确认是否撤销修改!", //Your changes will be lost, are your sure?
+          confirm_deleting: "是否删除计划?",
+          section_description: "描述:",
+          section_time: "时间范围:",
+          section_type: "类型:",
+          section_text: "计划名称:",
+          section_test: "测试:",
+          section_projectClass: "项目类型:",
+          taskProjectType_0: "项目任务",
+          taskProjectType_1: "普通任务",
+          section_head: "项目经理:",
+          section_device: "试验设备:",
+          section_sensor: "传感器:",
+          section_reportNo: "报告编号:",
+          section_priority: '优先级:',
+          status: '任务状态',
+          status_0: "未确认",
+          status_1: "已确认",
+          status_2: "完成",
+          status_3: "已延期",
+          status_4: "搁置中",
+          section_template: 'Details',
+          /* grid columns */
+          column_text: "计划名称",
+          column_sampleName: "样品名称",
+          column_testItems: "检测项目",
+          column_start_date: "开始时间",
+          column_duration: "持续时间",
+          column_lastTime: "持续时间",
+          column_add: "",
+          column_priority: "难度",
+          /* link confirmation */
+          link: "关联",
+          confirm_link_deleting: "将被删除",
+          link_start: " (开始)",
+          link_end: " (结束)",
+          type_task: "任务",
+          type_project: "项目",
+          type_milestone: "里程碑",
+
+          minutes: "分钟",
+          hours: "小时",
+          days: "天",
+          weeks: "周",
+          months: "月",
+          years: "年"
+        }
+      };
+
+      //定义各种编辑器及类型(可直接双击左侧进行编辑,不需要弹窗)
+      // var textEditor = {type: "text", map_to: "text"};
+      // var startDateEditor = {type: "date", map_to: "start_date"};
+      // var endDateEditor = {type: "date", map_to: "end_date"};
+      //设置甘特图中各个列相关配置
+      // gantt.config.columns = [
+      //   {
+      //     name: 'text',
+      //     label: '项目名称',
+      //     editor: textEditor,
+      //     resize: true,
+      //     tree: true,
+      //     width: '100',
+      //   },
+      //   {
+      //     name: 'start_date',
+      //     label: '项目开始时间',
+      //     align: "center",
+      //     editor: startDateEditor,
+      //     resize:true,
+      //     tree: false,
+      //     width: '130',
+      //   },
+      //   {
+      //     name: 'end_date',
+      //     label: '项目结束时间',
+      //     width: '130',
+      //     align: 'center',
+      //     editor: endDateEditor,
+      //     resize: true,
+      //   },
+      // ];
+      // 左侧列表内容
+
+      gantt.config.columns = [
+        // { name: "text", min_width:100,max_width:200, label:"任务", align: "left",resize: true, tree: true },
+        { name: "testItems", label: "检测项目", width: 130, resize: true, align: "left",resize: true, tree: true },
+        { name: "sampleName", label: "样品名称", width: 90, resize: true, align: "center" },
+        { name: "start_date", label: "开始时间", width: 90, resize: true, align: "center" },
+        { name: "end_date", label: "结束时间", width: 90, resize: true, align: "center" },
+        { name: "statusC", label: "状态", width: 60, resize: true, align: "center" },
+        // { name: "status", label: "状态", width: 130, resize: true, align: "center",
+        //   // options: [
+        //   //   { key: "0", label: gantt.locale.labels.status_0 },
+        //   //   { key: "1", label: gantt.locale.labels.status_1 },
+        //   //   { key: "2", label: gantt.locale.labels.status_2 },
+        //   // ],
+        //   // template:function(obj){
+        //   //   console.log(obj)
+        //   //   console.log(obj.status)
+        //   //   let re = '';
+        //   //   switch (obj.status) {
+        //   //     case "0":
+        //   //       re = `<b>未开始</b>`
+        //   //       break;
+        //   //     case "1":
+        //   //       re = `<b >进行中</b>`
+        //   //       break;
+        //   //     case "2":
+        //   //       re = `<b>已完成</b>`
+        //   //       break;
+        //   //   }
+        //   //   return re
+        //   // }
+        // },
+        // { name: "add", label:"", width: 30 }
+      ];
+      // 更改左侧显示的结束日期时间
+      gantt.templates.task_end_date = function(date){
+        return gantt.templates.task_date(new Date(date.valueOf() - 1));
+      };
+      var gridDateToStr = gantt.date.date_to_str("%Y-%m-%d");
+      gantt.templates.grid_date_format = function(date, column){
+        if(column === "end_date"){
+          return gridDateToStr(new Date(date.valueOf() - 1));
+        }else{
+          return gridDateToStr(date);
+        }
+      }
+      // 右侧项目展示
+      gantt.templates.task_text = function (start, end, task) {
+        // console.log(task)
+        // return "<b>设备:</b> " + task.shebeiId + ",<b> 项目经理:</b> " + task.pm;
+        return task.pm + ", " + task.deviceName;
+      };
+      // 灯箱多选框
+      gantt.form_blocks["multiselect"] = {
+        render: function (sns) {
+          var height = (sns.height || "23") + "px";
+          var html = "<div class='gantt_cal_ltext gantt_cal_chosen gantt_cal_multiselect'"+
+            "style='height:"+ height + ";'><select data-placeholder='...'"+
+            "class='chosen-select' multiple>";
+          if (sns.options) {
+            for (var i = 0; i < sns.options.length; i++) {
+              if(sns.unassigned_value !== undefined && sns.options[i].key==sns.unassigned_value){
+                continue;
+              }
+              html+="<option value='" +sns.options[i].key+ "'>"+sns.options[i].label+"</option>";
+            }}
+          html += "</select></div>";
+          return html;},
+
+        set_value: function (node, value, ev, sns) {
+          node.style.overflow = "visible";
+          node.parentNode.style.overflow = "visible";
+          node.style.display = "inline-block";
+          var select = $(node.firstChild);
+
+          if (value) {
+            value = (value + "").split(",");
+            select.val(value);
+          }
+          else {
+            select.val([]);
+          }
+
+          select.chosen();
+          if(sns.onchange){
+            select.change(function(){
+              sns.onchange.call(this);
+            })
+          }
+          select.trigger('chosen:updated');
+          select.trigger("change");},
+
+        get_value: function (node, ev) {
+          var value = $(node.firstChild).val();
+          //value = value ? value.join(",") : null
+          return value;},
+        focus: function (node) {
+          $(node.firstChild).focus();
+        }};
+      // 重置灯箱
+      gantt.attachEvent("onBeforeLightbox", function(task_id) {
+        gantt.resetLightbox();
+        gantt.config.lightbox.sections = restricted_lightbox;
+        // 删除灯箱中的删除按钮
+        gantt.config.buttons_right = [];
+        // 保留灯箱的关闭和保存按钮
+        gantt.config.buttons_left = ["gantt_save_btn", "gantt_cancel_btn"];
+        return true;
+      });
+      //弹出层(灯箱)
+      var restricted_lightbox = [
+        // { name: "text", height: 30, map_to: "text", type: "textarea", focus: true, width: "*" },
+        {
+          name: "time", height: 40, map_to: "auto", type: "duration",
+          time_format: ["%Y", "%m", "%d"],
+
+        },
+        {
+          name: "reportNo", height: 30, map_to: "reportNo", type: "textarea",focus: true,
+        },
+        { name: "head", height: 30, map_to: "pm", type: "select", options:gantt.serverList("manager") },
+        {
+          name: "device", height: 30, map_to: "shebeiId", type: "select", options: gantt.serverList('staff',[]),
+        },
+        {
+          name: "sensor", height: 30, map_to: "chuanganqi", type: "multiselect", options: gantt.serverList('chuanganqi',[]),
+        },
+
+      ];
+      gantt.attachEvent("onLightboxSave", function(id, task, is_new){
+        return true;
+      })
+      // 自定义弹框
+      // let that = this
+      // gantt.config.details_on_dblclick = false;
+      // gantt.attachEvent("onTaskDblClick", function (id, e){
+      //   console.log(111,id, e);
+      //   that.id = id
+      //   // gantt.getTask(id);
+      //   // console.log(gantt.getTask(id));
+      //   gantt.getTask(that.id);
+      //   console.log("双击获取当前行信息",gantt.getTask(that.id));
+      //   if (gantt.getTask(that.id).status == 0) {
+      //     gantt.config.details_on_dblclick = true;
+      //   } else {
+      //     that.visible = true;
+      //   }
+      //     // that.visible = true;
+      //     return true;
+      // });
+
+
+
+      gantt.init(this.$refs.gantt);
+      // gantt.parse(this.$props.tasks);
+      // gantt.parse(this.tasks);
+
+  },
   methods: {
     // 获取设备下拉列表
     getDevicelist(){
@@ -50,7 +380,7 @@ export default {
             label: response.deviceName
           }
         })
-        this.initData()
+        //this.initData()
       })
     },
     // 获取项目经理下拉列表
@@ -66,7 +396,7 @@ export default {
             label: response.name
           }
         })
-        this.initData()
+        //this.initData()
       })
     },
     // 获取传感器下拉列表
@@ -80,7 +410,7 @@ export default {
             label: response.xuliehao
           }
         })
-        this.initData()
+        //this.initData()
       })
     },
     // 通过委托编号查询检测项目
@@ -89,7 +419,7 @@ export default {
       getJhList(queryParam).then((res) => {
         console.log(17,res)
         this.tasks.data = []
-        gantt.clearAll(); 
+        gantt.clearAll();
         if (res.result.length > 0 ) {
           this.tasks.data = res.result.map(res => {
             return {
@@ -176,7 +506,7 @@ export default {
     //         start_date: new Date(),
     //         css: "today",
     //         text: "今日",
-    //         title: dateToStr(new Date()) 
+    //         title: dateToStr(new Date())
     //       });
     //       gantt.updateMarker(markerId);
     //     },
@@ -187,323 +517,7 @@ export default {
     //         gantt.scrollTo(ganTT[0].offsetLeft-300, null);
     //       })
     // },
-    initData(){
-        // 启用动态加载
-        gantt.config.branch_loading = true
-        //日期格式化
-        gantt.config.xml_date = "%Y-%m-%d";
-        gantt.config.order_branch = true;
-        gantt.config.order_branch_free = true;
-        //左侧是否自适应
-        gantt.config.autofit = true;
-        gantt.config.drag_links = false;//连线
-        gantt.config.readonly = false;  //只读
-        gantt.config.date_scale = "%m月%d日"; //右侧显示列名
-        gantt.config.layout = {//拖拽布局
-          css: "gantt_container",
-          rows: [
-            {
-              cols: [
-                { view: "grid", id: "grid", scrollX: "scrollHor", scrollY: "scrollVer" },
-                { resizer: true, width: 1 },
-                { view: "timeline", id: "timeline", scrollX: "scrollHor", scrollY: "scrollVer" },
-                { view: "scrollbar", scroll: "y", id: "scrollVer" }
-              ]
-            },
-            { view: "scrollbar", scroll: "x", id: "scrollHor", height: 20 }
-          ],
-          // rows: [
-          //   {
-          //     cols: [
-          //       {
-          //         width:400,
-          //         min_width: 300,
-          //         rows:[
-          //           {view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"},
-          //           {view: "scrollbar", id: "gridScroll", group:"horizontal"}            ]
-          //       },
-          //       {resizer: true, width: 1},
-          //       {
-          //         rows:[
-          //           {view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer"},
-          //           {view: "scrollbar", id: "scrollHor", group:"horizontal"}            ]
-          //       },
-          //       {view: "scrollbar", id: "scrollVer"}
-          //     ]
-          //   },
-          // ],
-          // cols: [
-          //   {
-          //     width:400,
-          //     min_width: 300,
-          //     rows:[
-          //       {view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"},
-          //       {view: "scrollbar", id: "gridScroll", group:"horizontal"}            ]
-          //   },
-          //   {resizer: true, width: 1},
-          //   {
-          //     rows:[
-          //       {view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer"},
-          //       {view: "scrollbar", id: "scrollHor", group:"horizontal"}            ]
-          //   },
-          //   {view: "scrollbar", id: "scrollVer"}
-          // ]
-        };
-        // 重置布局
-        gantt.resetLayout();
-        gantt.config.start_on_monday = true;
-        // 注意取消工作日!!!!(gantt.config.work_time = false;)
-        gantt.config.work_time = false;
-        gantt.config.fit_tasks = true;   //自动调整图表坐标轴区间用于适配task的长度
-        // 甘特图汉化
-        gantt.locale = {
-          date: {
-            month_full: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
-            month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
-            day_full: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
-            day_short: ["日", "一", "二", "三", "四", "五", "六"]
-          },
-          labels: {
-            dhx_cal_today_button: "今天",
-            day_tab: "日",
-            week_tab: "周",
-            month_tab: "月",
-            new_event: "新建日程",
-            icon_save: "保存",
-            icon_cancel: "关闭",
-            icon_details: "详细",
-            icon_edit: "编辑",
-            icon_delete: "删除",
-            confirm_closing: "请确认是否撤销修改!", //Your changes will be lost, are your sure?
-            confirm_deleting: "是否删除计划?",
-            section_description: "描述:",
-            section_time: "时间范围:",
-            section_type: "类型:",
-            section_text: "计划名称:",
-            section_test: "测试:",
-            section_projectClass: "项目类型:",
-            taskProjectType_0: "项目任务",
-            taskProjectType_1: "普通任务",
-            section_head: "项目经理:",
-            section_device: "试验设备:",
-            section_sensor: "传感器:",
-            section_reportNo: "报告编号:",
-            section_priority: '优先级:',
-            status: '任务状态',
-            status_0: "未确认",
-            status_1: "已确认",
-            status_2: "完成",
-            status_3: "已延期",
-            status_4: "搁置中",
-            section_template: 'Details',
-            /* grid columns */
-            column_text: "计划名称",
-            column_sampleName: "样品名称",
-            column_testItems: "检测项目",
-            column_start_date: "开始时间",
-            column_duration: "持续时间",
-            column_lastTime: "持续时间",
-            column_add: "",
-            column_priority: "难度",
-            /* link confirmation */
-            link: "关联",
-            confirm_link_deleting: "将被删除",
-            link_start: " (开始)",
-            link_end: " (结束)",
-            type_task: "任务",
-            type_project: "项目",
-            type_milestone: "里程碑",
-
-            minutes: "分钟",
-            hours: "小时",
-            days: "天",
-            weeks: "周",
-            months: "月",
-            years: "年"
-          }
-        };
 
-        //定义各种编辑器及类型(可直接双击左侧进行编辑,不需要弹窗)
-        // var textEditor = {type: "text", map_to: "text"};
-        // var startDateEditor = {type: "date", map_to: "start_date"};
-        // var endDateEditor = {type: "date", map_to: "end_date"};
-        //设置甘特图中各个列相关配置
-        // gantt.config.columns = [
-        //   {
-        //     name: 'text',
-        //     label: '项目名称',
-        //     editor: textEditor,
-        //     resize: true,
-        //     tree: true,
-        //     width: '100',
-        //   },
-        //   {
-        //     name: 'start_date',
-        //     label: '项目开始时间',
-        //     align: "center",
-        //     editor: startDateEditor,
-        //     resize:true,
-        //     tree: false,
-        //     width: '130',
-        //   },
-        //   {
-        //     name: 'end_date',
-        //     label: '项目结束时间',
-        //     width: '130',
-        //     align: 'center',
-        //     editor: endDateEditor,
-        //     resize: true,
-        //   },
-        // ];
-        // 左侧列表内容
-        
-        gantt.config.columns = [
-          // { name: "text", min_width:100,max_width:200, label:"任务", align: "left",resize: true, tree: true },
-          { name: "testItems", label: "检测项目", width: 130, resize: true, align: "left",resize: true, tree: true },
-          { name: "sampleName", label: "样品名称", width: 90, resize: true, align: "center" },
-          { name: "start_date", label: "开始时间", width: 90, resize: true, align: "center" },
-          { name: "end_date", label: "结束时间", width: 90, resize: true, align: "center" },
-          { name: "statusC", label: "状态", width: 60, resize: true, align: "center" },
-          // { name: "status", label: "状态", width: 130, resize: true, align: "center", 
-          //   // options: [
-          //   //   { key: "0", label: gantt.locale.labels.status_0 },
-          //   //   { key: "1", label: gantt.locale.labels.status_1 },
-          //   //   { key: "2", label: gantt.locale.labels.status_2 },
-          //   // ],
-          //   // template:function(obj){
-          //   //   console.log(obj)
-          //   //   console.log(obj.status)
-          //   //   let re = '';
-          //   //   switch (obj.status) {
-          //   //     case "0":
-          //   //       re = `<b>未开始</b>`
-          //   //       break;
-          //   //     case "1":
-          //   //       re = `<b >进行中</b>`
-          //   //       break;
-          //   //     case "2":
-          //   //       re = `<b>已完成</b>`
-          //   //       break;
-          //   //   }
-          //   //   return re
-          //   // }
-          // },
-          // { name: "add", label:"", width: 30 }
-        ];
-        // 更改左侧显示的结束日期时间
-        gantt.templates.task_end_date = function(date){
-          return gantt.templates.task_date(new Date(date.valueOf() - 1)); 
-          };
-          var gridDateToStr = gantt.date.date_to_str("%Y-%m-%d");
-          gantt.templates.grid_date_format = function(date, column){
-          if(column === "end_date"){
-          return gridDateToStr(new Date(date.valueOf() - 1)); 
-          }else{
-          return gridDateToStr(date); 
-          }
-        }
-        // 右侧项目展示
-        gantt.templates.task_text = function (start, end, task) {
-          // console.log(task)
-          // return "<b>设备:</b> " + task.shebeiId + ",<b> 项目经理:</b> " + task.pm;
-          return task.pm + ", " + task.deviceName;
-        };
-        // 灯箱多选框
-        gantt.form_blocks["multiselect"] = {
-        render: function (sns) {
-          var height = (sns.height || "23") + "px";
-          var html = "<div class='gantt_cal_ltext gantt_cal_chosen gantt_cal_multiselect'"+
-            "style='height:"+ height + ";'><select data-placeholder='...'"+
-                "class='chosen-select' multiple>";
-          if (sns.options) {
-          for (var i = 0; i < sns.options.length; i++) {
-            if(sns.unassigned_value !== undefined && sns.options[i].key==sns.unassigned_value){
-                continue;
-            }
-            html+="<option value='" +sns.options[i].key+ "'>"+sns.options[i].label+"</option>";
-          }}
-          html += "</select></div>";
-          return html;},
-        
-        set_value: function (node, value, ev, sns) {
-            node.style.overflow = "visible";
-            node.parentNode.style.overflow = "visible";
-            node.style.display = "inline-block";
-            var select = $(node.firstChild);
-        
-            if (value) {
-                value = (value + "").split(",");
-                select.val(value);
-            }
-            else {
-                select.val([]);
-            }
-        
-            select.chosen();
-            if(sns.onchange){
-                select.change(function(){
-                    sns.onchange.call(this);
-                })
-            }
-            select.trigger('chosen:updated');
-            select.trigger("change");},
-        
-        get_value: function (node, ev) {
-            var value = $(node.firstChild).val();
-            //value = value ? value.join(",") : null
-            return value;},
-        focus: function (node) {
-            $(node.firstChild).focus();
-        }};
-        //弹出层(灯箱)
-        gantt.config.lightbox.sections = [
-          // { name: "text", height: 30, map_to: "text", type: "textarea", focus: true, width: "*" },
-          {
-            name: "time", height: 40, map_to: "auto", type: "duration",
-            time_format: ["%Y", "%m", "%d"],
-            
-          },
-          {
-            name: "reportNo", height: 30, map_to: "reportNo", type: "text", type: "textarea",focus: true,
-          },
-          { name: "head", height: 30, map_to: "pm", type: "select", options:gantt.serverList("manager") },
-          {
-            name: "device", height: 30, map_to: "shebeiId", type: "select", options: gantt.serverList('staff',[]),
-          },
-          {
-            name: "sensor", height: 30, map_to: "chuanganqi", type: "multiselect", options: gantt.serverList('chuanganqi',[]),
-          },
-          // {
-          //   name: "sensor", height: 30, map_to: "chuanganqi", type: "multiselect", options: gantt.serverList('chuanganqi'), unassigned_value:5 ,
-          // },
-          // { name: "description", height: 70, map_to: "description", type: "textarea" },
-          // {
-          //   name: "priority", height: 40, map_to: "priority", type: "radio", options: gantt.serverList("priority")
-          // },
-
-        ];
-        // 删除灯箱中的删除按钮
-        gantt.config.buttons_right = [];
-        // 自定义弹框
-        // let that = this
-        // gantt.config.details_on_dblclick = false;
-        // gantt.attachEvent("onTaskDblClick", function (id, e){
-        //   console.log(111,id, e);
-        //   that.id = id
-        //   // gantt.getTask(id);
-        //   // console.log(gantt.getTask(id));
-        //   // gantt.getTask(that.id);
-        //   // console.log(gantt.getTask(that.id));
-        //     // that.visible = true;
-        //     return true;
-        // });
-        
-
-
-        gantt.init(this.$refs.gantt);
-        // gantt.parse(this.$props.tasks);
-        gantt.parse(this.tasks);
-    }
   }
 }
 </script>

+ 11 - 1
itdmWeb/src/config/router.config.js

@@ -286,7 +286,7 @@ export const asyncRouterMap = [
   },
   {
     path: '*', redirect: '/404', hidden: true
-  }
+  },
 ]
 
 /**
@@ -322,6 +322,16 @@ export const constantRouterMap = [
       },
     ]
   },
+  {
+    path: '/itdmScreen/itdmScreenIndex',
+    name: 'itdmScreen',
+    component: () => import(/* webpackChunkName: "user" */ '@/views/module-iTDM/itdmScreen/itdmScreenIndex.vue'),
+  },
+  {
+    path: '/itdmScreen/itdmGraph',
+    name: 'itdmGraph',
+    component: () => import(/* webpackChunkName: "user" */ '@/views/module-iTDM/itdmScreen/itdmGraph.vue'),
+  },
 
   // {
   //   path: '/',

+ 16 - 1
itdmWeb/src/views/module-iTDM/baogao/ItdmBaogaoList.vue

@@ -90,6 +90,9 @@
         </template>
 
         <span slot="action" slot-scope="text, record">
+          <a @click="wordedit(record)">编辑</a>
+
+          <a-divider type="vertical" />
            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                   <a>删除</a>
                 </a-popconfirm>
@@ -101,6 +104,8 @@
     </div>
 
     <itdm-baogao-modal ref="modalForm" @ok="modalFormOk"></itdm-baogao-modal>
+    <word-edit ref="wordedit" @ok="modalFormOk"></word-edit>
+
   </a-card>
 </template>
 
@@ -110,13 +115,17 @@ import '@/assets/less/TableExpand.less'
 import { mixinDevice } from '@/utils/mixin'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import ItdmBaogaoModal from './modules/ItdmBaogaoModal'
+import wordEdit from './modules/wordEdit'
+
 import { filterMultiDictText } from '@comp/dict/JDictSelectUtil'
 import { getAction } from '@api/manage'
+import WordEdit from '@views/module-iTDM/baogao/modules/wordEdit'
 
 export default {
   name: 'ItdmBaogaoList',
   mixins: [JeecgListMixin, mixinDevice],
   components: {
+    WordEdit,
     ItdmBaogaoModal
   },
   data() {
@@ -161,7 +170,9 @@ export default {
         {
           title: '报告文件地址',
           align: 'center',
-          dataIndex: 'filePath'
+          dataIndex: 'filePath',
+          scopedSlots: {customRender: 'fileSlot'}
+
         },
         {
           title: '操作',
@@ -194,6 +205,10 @@ export default {
     }
   },
   methods: {
+    wordedit(record){
+      this.$refs.wordedit.edit(record);
+      this.$refs.wordedit.visible=true
+    },
 
     getSuperFieldList() {
       let fieldList = []

+ 98 - 0
itdmWeb/src/views/module-iTDM/baogao/modules/wordEdit.vue

@@ -0,0 +1,98 @@
+<template>
+
+  <a-modal
+    title="Title"
+    width="80%"
+    :visible="visible"
+    @ok="handleOk"
+  @cancel="handleOk"
+  >
+
+
+  <dev v-show="visible" id="monitorOffice" ></dev>
+
+  </a-modal>
+</template>
+
+<script>
+
+
+  import { getAction } from '@api/manage'
+
+  export default {
+    name: 'wordEdit',
+    created () {
+      //备份model原始值
+      this.config.document.key=""
+      this.config.document.fileType=""
+      this.config.document.url=""
+      this.config.document.title=""
+      this.config.editorConfig.callbackUrl=""
+    },
+    data () {
+      return {
+        docEditor: null,
+        visible: false,
+        queryById: '/baogao/itdmBaogao/wordById',
+        config: {
+          document: {
+            fileType: "",
+            key: "",
+            title: "",
+            url: "",
+          },
+          documentType: "word",
+          width: "100%",
+          height: "600px",
+          editorConfig: {
+            lang:'zh',
+            callbackUrl: ""
+          }
+        },
+
+      }
+    },
+    methods: {
+      edit (record) {
+        if (this.docEditor) {
+          this.docEditor.destroyEditor()
+        }
+        console.log(record)
+        const select = { id: record.id }
+        getAction(this.queryById, select).then((res) => {
+          if (res.success) {
+
+
+            this.config.document.key=res.result.key
+            this.config.document.fileType=res.result.fileType
+            this.config.document.url=process.env.VUE_APP_API_BASE_URL+"/"+res.result.url
+            this.config.document.title=res.result.title
+            this.config.editorConfig.callbackUrl=process.env.VUE_APP_API_BASE_URL+"/"+"word/save"
+
+            console.log(this.config)
+            this.docEditor = new DocsAPI.DocEditor("monitorOffice", this.config);
+
+
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+
+      },
+      handleOk(){
+        this.visible=false
+        this.config.document.key=""
+        this.config.document.fileType=""
+        this.config.document.url=""
+        this.config.document.title=""
+        this.config.editorConfig.callbackUrl=""
+        if (this.docEditor) {
+          this.docEditor.destroyEditor()
+        }
+        this.$emit("ok");
+
+      }
+
+    }
+  }
+</script>

+ 225 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/ItdmEnvironmentQuyuList.vue

@@ -0,0 +1,225 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="区域名称">
+              <j-dict-select-tag placeholder="请选择区域" v-model="queryParam.areaName" dictCode="area_name"/>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="10" :lg="11" :md="12" :sm="24">
+            <a-form-item label="采集时间">
+              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date>
+              <span class="query-group-split-cust"></span>
+              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.createTime_end"></j-date>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a> -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <!-- <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('区域历史数据')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <!-- 高级查询区域 -->
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div> -->
+
+    <!-- table区域-begin -->
+    <div>
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <itdm-environment-quyu-modal ref="modalForm" @ok="modalFormOk"></itdm-environment-quyu-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ItdmEnvironmentQuyuModal from './modules/ItdmEnvironmentQuyuModal'
+  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+
+  export default {
+    name: 'ItdmEnvironmentQuyuList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ItdmEnvironmentQuyuModal
+    },
+    data () {
+      return {
+        description: '区域历史数据管理页面',
+        // 表头
+        columns: [
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'区域名称',
+            align:"center",
+            dataIndex: 'areaName_dictText'
+          },
+          {
+            title:'温度',
+            align:"center",
+            dataIndex: 'temperature'
+          },
+          {
+            title:'湿度',
+            align:"center",
+            dataIndex: 'humidity'
+          },
+          {
+            title:'气压',
+            align:"center",
+            dataIndex: 'airPrassure'
+          },
+          {
+            title:'采集时间',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          // {
+          //   title: '操作',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' }
+          // }
+        ],
+        url: {
+          list: "/itdmDataHistory/itdmEnvironmentQuyu/list",
+          delete: "/itdmDataHistory/itdmEnvironmentQuyu/delete",
+          deleteBatch: "/itdmDataHistory/itdmEnvironmentQuyu/deleteBatch",
+          exportXlsUrl: "/itdmDataHistory/itdmEnvironmentQuyu/exportXls",
+          importExcelUrl: "itdmDataHistory/itdmEnvironmentQuyu/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'areaName',text:'区域名称(1温箱区域2力学区域3霉菌区域)',dictCode:'area_name'})
+        fieldList.push({type:'BigDecimal',value:'temperature',text:'温度',dictCode:''})
+        fieldList.push({type:'BigDecimal',value:'humidity',text:'湿度',dictCode:''})
+        fieldList.push({type:'BigDecimal',value:'airPrassure',text:'气压',dictCode:''})
+        fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+  ::v-deep .ant-card-body{
+    padding-top: 0px !important;
+    padding-left: 10px !important;
+    padding-right: 10px !important;
+  }
+  .y {
+    color: red;
+  }
+</style>

+ 219 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/ItdmEnvironmentWaterList.vue

@@ -0,0 +1,219 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="区域名称">
+              <j-dict-select-tag placeholder="请选择区域" v-model="queryParam.areaNameWater" dictCode="area_name_water"/>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="10" :lg="11" :md="12" :sm="24">
+            <a-form-item label="采集时间">
+              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date>
+              <span class="query-group-split-cust"></span>
+              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.createTime_end"></j-date>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a> -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <!-- <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('进出水口历史数据')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <!-- 高级查询区域 -->
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div> -->
+
+    <!-- table区域-begin -->
+    <div>
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <itdm-environment-water-modal ref="modalForm" @ok="modalFormOk"></itdm-environment-water-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ItdmEnvironmentWaterModal from './modules/ItdmEnvironmentWaterModal'
+  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+
+  export default {
+    name: 'ItdmEnvironmentWaterList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ItdmEnvironmentWaterModal
+    },
+    data () {
+      return {
+        description: '进出水口历史数据管理页面',
+        // 表头
+        columns: [
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'区域名称',
+            align:"center",
+            dataIndex: 'areaNameWater_dictText'
+          },
+          {
+            title:'温度',
+            align:"center",
+            dataIndex: 'temperature'
+          },
+          {
+            title:'水压',
+            align:"center",
+            dataIndex: 'waterPressure'
+          },
+          {
+            title:'采集时间',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          // {
+          //   title: '操作',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' }
+          // }
+        ],
+        url: {
+          list: "/itdmDataHistory/itdmEnvironmentWater/list",
+          delete: "/itdmDataHistory/itdmEnvironmentWater/delete",
+          deleteBatch: "/itdmDataHistory/itdmEnvironmentWater/deleteBatch",
+          exportXlsUrl: "/itdmDataHistory/itdmEnvironmentWater/exportXls",
+          importExcelUrl: "itdmDataHistory/itdmEnvironmentWater/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'int',value:'areaNameWater',text:'名称(0进水口,1出水口)',dictCode:'area_name_water'})
+        fieldList.push({type:'BigDecimal',value:'temperature',text:'温度',dictCode:''})
+        fieldList.push({type:'BigDecimal',value:'waterPressure',text:'水压',dictCode:''})
+        fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+  ::v-deep .ant-card-body{
+    padding-top: 0px !important;
+    padding-left: 10px !important;
+    padding-right: 10px !important;
+  }
+  .y {
+    color: red;
+  }
+</style>

+ 201 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/ItdmEnvironmentYeweiList.vue

@@ -0,0 +1,201 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="10" :lg="11" :md="12" :sm="24">
+            <a-form-item label="采集时间">
+              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date>
+              <span class="query-group-split-cust"></span>
+              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" class="query-group-cust" v-model="queryParam.createTime_end"></j-date>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <!-- <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a> -->
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <!-- <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('水液位历史数据')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <!-- 高级查询区域 -->
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div> -->
+
+    <!-- table区域-begin -->
+    <div>
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <itdm-environment-yewei-modal ref="modalForm" @ok="modalFormOk"></itdm-environment-yewei-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ItdmEnvironmentYeweiModal from './modules/ItdmEnvironmentYeweiModal'
+
+  export default {
+    name: 'ItdmEnvironmentYeweiList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ItdmEnvironmentYeweiModal
+    },
+    data () {
+      return {
+        description: '水液位历史数据管理页面',
+        // 表头
+        columns: [
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'水液位',
+            align:"center",
+            dataIndex: 'waterLevel'
+          },
+          {
+            title:'采集时间',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          // {
+          //   title: '操作',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' }
+          // }
+        ],
+        url: {
+          list: "/itdmDataHistory/itdmEnvironmentYewei/list",
+          delete: "/itdmDataHistory/itdmEnvironmentYewei/delete",
+          deleteBatch: "/itdmDataHistory/itdmEnvironmentYewei/deleteBatch",
+          exportXlsUrl: "/itdmDataHistory/itdmEnvironmentYewei/exportXls",
+          importExcelUrl: "itdmDataHistory/itdmEnvironmentYewei/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'BigDecimal',value:'waterLevel',text:'水液位',dictCode:''})
+        fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+  ::v-deep .ant-card-body{
+    padding-top: 0px !important;
+    padding-left: 10px !important;
+    padding-right: 10px !important;
+  }
+  .y {
+    color: red;
+  }
+</style>

+ 124 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentQuyuForm.vue

@@ -0,0 +1,124 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="区域名称(1温箱区域2力学区域3霉菌区域)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="areaName">
+              <j-dict-select-tag type="list" v-model="model.areaName" dictCode="area_name" placeholder="请选择区域名称(1温箱区域2力学区域3霉菌区域)" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="温度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temperature">
+              <a-input-number v-model="model.temperature" placeholder="请输入温度" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="湿度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="humidity">
+              <a-input-number v-model="model.humidity" placeholder="请输入湿度" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="气压" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="airPrassure">
+              <a-input-number v-model="model.airPrassure" placeholder="请输入气压" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="采集时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
+              <j-date placeholder="请选择采集时间"  v-model="model.createTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ItdmEnvironmentQuyuForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/itdmDataHistory/itdmEnvironmentQuyu/add",
+          edit: "/itdmDataHistory/itdmEnvironmentQuyu/edit",
+          queryById: "/itdmDataHistory/itdmEnvironmentQuyu/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentQuyuModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-environment-quyu-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-environment-quyu-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ItdmEnvironmentQuyuForm from './ItdmEnvironmentQuyuForm'
+
+  export default {
+    name: 'ItdmEnvironmentQuyuModal',
+    components: {
+      ItdmEnvironmentQuyuForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentQuyuModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-environment-quyu-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-environment-quyu-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmEnvironmentQuyuForm from './ItdmEnvironmentQuyuForm'
+  export default {
+    name: 'ItdmEnvironmentQuyuModal',
+    components: {
+      ItdmEnvironmentQuyuForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 119 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentWaterForm.vue

@@ -0,0 +1,119 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="名称(0进水口,1出水口)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="areaNameWater">
+              <j-dict-select-tag type="list" v-model="model.areaNameWater" dictCode="area_name_water" placeholder="请选择名称(0进水口,1出水口)" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="温度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temperature">
+              <a-input-number v-model="model.temperature" placeholder="请输入温度" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="水压" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waterPressure">
+              <a-input-number v-model="model.waterPressure" placeholder="请输入水压" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="采集时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
+              <j-date placeholder="请选择采集时间"  v-model="model.createTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ItdmEnvironmentWaterForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/itdmDataHistory/itdmEnvironmentWater/add",
+          edit: "/itdmDataHistory/itdmEnvironmentWater/edit",
+          queryById: "/itdmDataHistory/itdmEnvironmentWater/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentWaterModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-environment-water-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-environment-water-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ItdmEnvironmentWaterForm from './ItdmEnvironmentWaterForm'
+
+  export default {
+    name: 'ItdmEnvironmentWaterModal',
+    components: {
+      ItdmEnvironmentWaterForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentWaterModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-environment-water-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-environment-water-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmEnvironmentWaterForm from './ItdmEnvironmentWaterForm'
+  export default {
+    name: 'ItdmEnvironmentWaterModal',
+    components: {
+      ItdmEnvironmentWaterForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 109 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentYeweiForm.vue

@@ -0,0 +1,109 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="水液位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waterLevel">
+              <a-input-number v-model="model.waterLevel" placeholder="请输入水液位" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="采集时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
+              <j-date placeholder="请选择采集时间"  v-model="model.createTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ItdmEnvironmentYeweiForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/itdmDataHistory/itdmEnvironmentYewei/add",
+          edit: "/itdmDataHistory/itdmEnvironmentYewei/edit",
+          queryById: "/itdmDataHistory/itdmEnvironmentYewei/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentYeweiModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <itdm-environment-yewei-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></itdm-environment-yewei-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import ItdmEnvironmentYeweiForm from './ItdmEnvironmentYeweiForm'
+
+  export default {
+    name: 'ItdmEnvironmentYeweiModal',
+    components: {
+      ItdmEnvironmentYeweiForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
itdmWeb/src/views/module-iTDM/itdmDataHistory/modules/ItdmEnvironmentYeweiModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <itdm-environment-yewei-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></itdm-environment-yewei-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ItdmEnvironmentYeweiForm from './ItdmEnvironmentYeweiForm'
+  export default {
+    name: 'ItdmEnvironmentYeweiModal',
+    components: {
+      ItdmEnvironmentYeweiForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 53 - 43
itdmWeb/src/views/module-iTDM/itdmDevice/ItdmDeviceList.vue

@@ -43,19 +43,19 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+<!--      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
       <a-button type="primary" icon="download" @click="handleExportXls('设备表')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
+<!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--        <a-button type="primary" icon="import">导入</a-button>-->
+<!--      </a-upload>-->
       <!-- 高级查询区域 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
-      </a-dropdown>
+<!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+<!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
+<!--        <a-menu slot="overlay">-->
+<!--          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--        </a-menu>-->
+<!--        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
+<!--      </a-dropdown>-->
     </div>
 
     <!-- table区域-begin -->
@@ -102,20 +102,20 @@
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+<!--          <a-divider type="vertical" />-->
+<!--          <a-dropdown>-->
+<!--            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
+<!--            <a-menu slot="overlay">-->
+<!--              <a-menu-item>-->
+<!--                <a @click="handleDetail(record)">详情</a>-->
+<!--              </a-menu-item>-->
+<!--              <a-menu-item>-->
+<!--                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
+<!--                  <a>删除</a>-->
+<!--                </a-popconfirm>-->
+<!--              </a-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
         </span>
         <span slot="action2" slot-scope="text, item">
           <a-popconfirm :title="item.deviceStatus == 3 ? '确定取消设备故障吗': '确定设备出现故障吗'" @confirm="() => handleGuzhang(item)">
@@ -147,6 +147,11 @@
     },
     data () {
       return {
+        /* 排序参数 */
+        isorter: {
+          column: 'id', // 排序字段
+          order: 'asc' // 正序or倒叙
+        },
         description: '设备表管理页面',
         // 表头
         columns: [
@@ -161,16 +166,6 @@
             }
           },
           {
-            title:'更新人',
-            align:"center",
-            dataIndex: 'updateBy'
-          },
-          {
-            title:'更新日期',
-            align:"center",
-            dataIndex: 'updateTime'
-          },
-          {
             title:'设备名称',
             align:"center",
             dataIndex: 'deviceName'
@@ -186,6 +181,16 @@
             dataIndex: 'deviceNo'
           },
           {
+            title:'设备规格',
+            align:"center",
+            dataIndex: 'deviceSpecification'
+          },
+          {
+            title:'设备型号',
+            align:"center",
+            dataIndex: 'deviceModel'
+          },
+          {
             title:'设备状态',
             align:"center",
             dataIndex: 'deviceStatus_dictText'
@@ -206,11 +211,6 @@
             dataIndex: 'record'
           },
           {
-            title:'设备型号',
-            align:"center",
-            dataIndex: 'deviceModel'
-          },
-          {
             title:'本次运行开始时间',
             align:"center",
             dataIndex: 'runStartTime'
@@ -220,10 +220,20 @@
             align:"center",
             dataIndex: 'biaoshi_dictText'
           },
+          // {
+          //   title:'是否已维护',
+          //   align:"center",
+          //   dataIndex: 'isRepair_dictText'
+          // },
           {
-            title:'是否已维护',
+            title:'更新人',
             align:"center",
-            dataIndex: 'isRepair_dictText'
+            dataIndex: 'updateBy'
+          },
+          {
+            title:'更新日期',
+            align:"center",
+            dataIndex: 'updateTime'
           },
           {
             title: '故障判断',
@@ -237,7 +247,7 @@
             dataIndex: 'action',
             align:"center",
             fixed:"right",
-            width:147,
+            width:70,
             scopedSlots: { customRender: 'action' }
           }
         ],

+ 1 - 1
itdmWeb/src/views/module-iTDM/itdmDevice/modules/ItdmDeviceForm.vue

@@ -10,7 +10,7 @@
           </a-col>
           <a-col :span="24">
             <a-form-model-item label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deviceType">
-              <a-input v-model="model.deviceType" placeholder="请输入设备类型"  ></a-input>
+              <a-input v-model="model.deviceType" placeholder="请输入设备类型" :disabled="editdisabled" ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">

+ 54 - 0
itdmWeb/src/views/module-iTDM/itdmEnvironmentData/itdmEnvironmentData.vue

@@ -0,0 +1,54 @@
+<template>
+        <a-tabs default-active-key="1" @change="callback" class="card-container">
+            <a-tab-pane key="1" tab="区域环境数据">
+                <itdm-environment-quyu-list @ok="submitCallback" :key="timer1"></itdm-environment-quyu-list>
+            </a-tab-pane>
+            <a-tab-pane key="2" tab="进出水口数据" force-render>
+                <itdm-environment-water-list :key="timer2"></itdm-environment-water-list>
+            </a-tab-pane>
+            <a-tab-pane key="3" tab="水液位数据" force-render>
+                <itdm-environment-yewei-list :key="timer3"></itdm-environment-yewei-list>
+            </a-tab-pane>
+        </a-tabs>
+</template>
+
+<script>
+import ItdmEnvironmentQuyuList from '../itdmDataHistory/ItdmEnvironmentQuyuList.vue';
+import ItdmEnvironmentWaterList from '../itdmDataHistory/ItdmEnvironmentWaterList.vue';
+import ItdmEnvironmentYeweiList from '../itdmDataHistory/ItdmEnvironmentYeweiList.vue';
+  export default {
+    name: 'itdmEnvironmentDataList',
+    components: {
+        ItdmEnvironmentQuyuList,
+        ItdmEnvironmentWaterList,
+        ItdmEnvironmentYeweiList
+    },
+    data () {
+      return {
+        timer1: '',
+        timer2: '',
+        timer3: '',
+      }
+    },
+    methods: {
+      submitCallback(){
+        this.$emit('ok');
+      },
+      callback(key) {
+        if (key == 1) {
+          this.timer1 = new Date().getTime()
+        } else if (key == 2) {
+          this.timer2 = new Date().getTime()
+        } else if (key == 3) {
+          this.timer3 = new Date().getTime()
+        }
+      },
+    }
+  }
+</script>
+
+<style scoped>
+.ant-card-body{
+    padding-top: 10px !important;
+}
+</style>

+ 132 - 15
itdmWeb/src/views/module-iTDM/itdmGongdanDetail/ItdmGongdanDetailList.vue

@@ -5,10 +5,29 @@
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="工单id">
-              <a-input placeholder="请输入工单id" v-model="queryParam.woId"></a-input>
+            <a-form-item label="委托单位名称">
+              <a-select
+                v-model="queryParam.weituoClient"
+                label-in-value
+                :options="weituoClientOptions"
+                @change="getWeituoClientOptions"
+              ></a-select>
             </a-form-item>
           </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="委托编号">
+              <a-select
+                v-model="queryParam.weituoId"
+                key-in-value
+                :options="weituoNoOptions"
+              ></a-select>
+            </a-form-item>
+          </a-col>
+<!--          <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
+<!--            <a-form-item label="工单id">-->
+<!--              <a-input placeholder="请输入工单id" v-model="queryParam.woId"></a-input>-->
+<!--            </a-form-item>-->
+<!--          </a-col>-->
 <!--          <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
 <!--            <a-form-item label="实绩设备id">-->
 <!--              <j-search-select-tag placeholder="请选择实绩设备id" v-model="queryParam.shijiShebeiId" dict="itdm_device,device_name,id"/>-->
@@ -141,15 +160,34 @@ import { mixinDevice } from '@/utils/mixin'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import ItdmGongdanDetailModal from './modules/ItdmGongdanDetailModal'
 import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
+import { getWeituoClientList } from '@/api/api'
+import { getWeituoInfoListByClient } from '@/api/api'
+
 
 export default {
   name: 'ItdmGongdanDetailList',
   mixins:[JeecgListMixin, mixinDevice],
   components: {
-    ItdmGongdanDetailModal
+    ItdmGongdanDetailModal,
   },
+
   data () {
     return {
+      weituoClientQuery: {
+        weituoClient: '',
+      },
+      weituoClientOptions : [],
+      weituoNoQuery: {
+        weituoNo: '',
+      },
+      weituoIdQuery: {
+        weituoId: '',
+      },
+      weituoNoOptions:[],
+      isorter: { // 排序参数
+        column: 'woId,workDate', // 排序字段
+        order: 'asc,asc' // 正序asc  or  倒叙desc
+      },
       description: '工单detail管理页面',
       // 表头
       columns: [
@@ -164,19 +202,49 @@ export default {
           }
         },
         {
-          title:'工单id',
+          title:'委托单位',
           align:"center",
-          dataIndex: 'woId'
+          dataIndex: 'weituoClient'
         },
         {
-          title:'实绩设备',
+          title:'委托编号',
           align:"center",
-          dataIndex: 'shijiShebeiId_dictText'
+          dataIndex: 'weituoNo'
         },
         {
-          title:'实绩试验类型',
+          title:'检测项目',
           align:"center",
-          dataIndex: 'shijiShiiyanType_dictText'
+          dataIndex: 'testItemsId_dictText'
+        },
+        {
+          title:'报告编号',
+          align:"center",
+          dataIndex: 'jihuaShiyanId_dictText'
+        },
+        {
+          title:'委托样品',
+          align:"center",
+          dataIndex: 'weituoYangpinId_dictText'
+        },
+        {
+          title:'设备',
+          align:"center",
+          dataIndex: 'shebeiId_dictText'
+        },
+        {
+          title:'试验类型',
+          align:"center",
+          dataIndex: 'shiiyanType_dictText'
+        },
+        {
+          title:'试验员',
+          align:"center",
+          dataIndex: 'worker'
+        },
+        {
+          title:'委托样品数量',
+          align:"center",
+          dataIndex: 'yangpinCount'
         },
         {
           title:'任务日期',
@@ -197,6 +265,22 @@ export default {
           dataIndex: 'endTime'
         },
         {
+          title:'传感器',
+          align:"center",
+          dataIndex: 'chuanganqi_dictText'
+          // dataIndex: 'chuanganqi'
+        },
+        {
+          title:'实绩设备',
+          align:"center",
+          dataIndex: 'shijiShebeiId_dictText'
+        },
+        {
+          title:'实绩试验类型',
+          align:"center",
+          dataIndex: 'shijiShiiyanType_dictText'
+        },
+        {
           title:'实绩任务日期',
           align:"center",
           dataIndex: 'shijiWorkDate',
@@ -215,16 +299,20 @@ export default {
           dataIndex: 'shijiEndTime'
         },
         {
-          title:'备注',
+          title:'工单id',
           align:"center",
-          dataIndex: 'remark'
+          dataIndex: 'woId'
         },
         {
-          title:'传感器',
+          title:'创建时间',
           align:"center",
-          dataIndex: 'chuanganqi_dictText'
-          // dataIndex: 'chuanganqi'
-        }
+          dataIndex: 'createTime'
+        },
+        // {
+        //   title:'备注',F
+        //   align:"center",
+        //   dataIndex: 'remark'
+        // },
         // {
         //   title: '操作',
         //   dataIndex: 'action',
@@ -248,6 +336,7 @@ export default {
   },
   created() {
     this.getSuperFieldList();
+    this.getClientList();
   },
   computed: {
     importExcelUrl: function(){
@@ -255,6 +344,34 @@ export default {
     },
   },
   methods: {
+    // 获得委托单位下拉列表,此方法要在created里,初始化时调用
+    getClientList(){
+      getWeituoClientList().then((res) =>{
+        console.log(res)
+        this.weituoClientOptions = res.result.map( res => {
+          return{
+            value: res,
+            label: res
+          }
+        })
+      })
+    },
+    // 监听触发方法
+    getWeituoClientOptions(value){
+      console.log(value);
+      this.weituoClientQuery.weituoClient = value.key;
+      console.log('this.weituoClientQuery',this.weituoClientQuery);
+      console.log('this.weituoClientQuery.weituoClient',this.weituoClientQuery.weituoClient);
+      getWeituoInfoListByClient(this.weituoClientQuery).then((res) =>{
+        console.log("this.weituoNoOptions",this.weituoNoOptions),
+        this.weituoNoOptions = res.result.map( res => {
+          return{
+            value: res.id,  //传的值
+            label: res.weituoNo,  //展示
+          }
+        })
+      })
+    },
     initDictConfig(){
     },
     getSuperFieldList(){

+ 5 - 0
itdmWeb/src/views/module-iTDM/itdmGongdanDetail/modules/ItdmGongdanDetailForm.vue

@@ -9,6 +9,11 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
+            <a-form-model-item label="报告编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jihuaShiyanId">
+              <j-search-select-tag v-model="model.jihuaShiyanId" dict="itdm_test_plan,report_no,id"  />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
             <a-form-model-item label="实绩设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shijiShebeiId">
               <j-search-select-tag v-model="model.shijiShebeiId" dict="itdm_device,device_name,id"  />
             </a-form-model-item>

+ 416 - 305
itdmWeb/src/views/module-iTDM/itdmGongdanMaster/itdmGongdanMasterList.vue

@@ -23,8 +23,9 @@
 
 <script>
 import {gantt} from 'dhtmlx-gantt';
-import {getDeviceList, getXmjlList, getManagerList, getCgqList, saveProject} from '@/api/api'
-import store from '@/store' 
+import { notification } from 'ant-design-vue';
+import {getDeviceList, getXmjlList, getManagerList, getCgqList, saveProject, ajaxGetDictItems, saveProjectJl, delProjectJl} from '@/api/api'
+import store from '@/store'
 export default {
   name: 'gantt',
   data () {
@@ -34,13 +35,17 @@ export default {
         ],
         collections: {
           staff:[],
-          manager:[],
+          staff2:[],
+          worker:[],
           chuanganqi:[],
+          chuanganqi2:[],
+          testTypeOptions: [],
         },
         queryParam:{
           weituoNo: undefined
-        }
+        },
       },
+      eventIDs : [],
     }
   },
   created() {
@@ -51,7 +56,362 @@ export default {
     this.getDevicelist();
     this.getCgqlist();
     this.getManagerList();
+    this.initDictConfig();
+    // this.initData()
+  },
+  beforeDestroy() {
+    gantt.clearAll();
+    // 一个人操作计划排期和拆解工单
+    // this.eventIDs.forEach(event => gantt.detachEvent(event));
+    // this.eventIDs = [];
   },
+  mounted() {
+      // 启用动态加载
+      gantt.config.branch_loading = true
+      //日期格式化
+      gantt.config.xml_date = "%Y-%m-%d";
+      gantt.config.date_format = "%Y-%m-%d";
+      gantt.config.order_branch = true;
+      gantt.config.order_branch_free = true;
+      //左侧是否自适应
+      gantt.config.autofit = true;
+      gantt.config.drag_links = false;//连线
+      gantt.config.readonly = false;  //只读
+      gantt.config.date_scale = "%m月%d日"; //右侧显示列名
+      gantt.config.layout = {//拖拽布局
+        css: "gantt_container",
+        rows: [
+          {
+            cols: [
+              { view: "grid", id: "grid", scrollX: "scrollHor", scrollY: "scrollVer" },
+              { resizer: true, width: 1 },
+              { view: "timeline", id: "timeline", scrollX: "scrollHor", scrollY: "scrollVer" },
+              { view: "scrollbar", scroll: "y", id: "scrollVer" }
+            ]
+          },
+          { view: "scrollbar", scroll: "x", id: "scrollHor", height: 20 }
+        ],
+      };
+      // 重置布局
+      gantt.resetLayout();
+      gantt.config.start_on_monday = true;
+      gantt.config.work_time = false;
+      gantt.config.fit_tasks = true;   //自动调整图表坐标轴区间用于适配task的长度
+      // 甘特图汉化
+      gantt.locale = {
+        date: {
+          month_full: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
+          month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+          day_full: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
+          day_short: ["日", "一", "二", "三", "四", "五", "六"]
+        },
+        labels: {
+          dhx_cal_today_button: "今天",
+          day_tab: "日",
+          week_tab: "周",
+          month_tab: "月",
+          new_event: "新建日程",
+          icon_save: "保存",
+          icon_cancel: "关闭",
+          icon_details: "详细",
+          icon_edit: "编辑",
+          icon_delete: "删除",
+          confirm_closing: "请确认是否撤销修改!", //Your changes will be lost, are your sure?
+          confirm_deleting: "是否删除计划?",
+          section_description: "描述:",
+          section_time: "时间范围:",
+          section_type: "类型:",
+          section_text: "计划名称:",
+          section_neirong: "内容:",
+          section_test: "测试:",
+          section_projectClass: "项目类型:",
+          taskProjectType_0: "项目任务",
+          taskProjectType_1: "普通任务",
+          section_head: "项目经理:",
+          section_device: "试验设备:",
+          section_sensor: "传感器:",
+          section_reportNo: "报告编号:",
+          section_shiiyanType: "试验类型:",
+          section_worker: "试验员:",
+          section_yangpinCount: "样品数量:",
+          section_priority: '优先级:',
+          status: '任务状态',
+          status_0: "未确认",
+          status_1: "已确认",
+          status_2: "完成",
+          status_3: "已延期",
+          status_4: "搁置中",
+          section_template: 'Details',
+          /* grid columns */
+          column_text: "计划名称",
+          column_sampleName: "样品名称",
+          column_testItems: "检测项目",
+          column_start_date: "开始时间",
+          column_duration: "持续时间",
+          column_lastTime: "持续时间",
+          column_add: "",
+          column_priority: "难度",
+          /* link confirmation */
+          link: "关联",
+          confirm_link_deleting: "将被删除",
+          link_start: " (开始)",
+          link_end: " (结束)",
+          type_task: "任务",
+          type_project: "项目",
+          type_milestone: "里程碑",
+
+          minutes: "分钟",
+          hours: "小时",
+          days: "天",
+          weeks: "周",
+          months: "月",
+          years: "年"
+        }
+      };
+      // 删除左侧列表表头的add按钮
+      gantt.templates.grid_header_class = function(columnName, column){
+        if (columnName == 'add') {
+          return "noShow";
+        }
+      };
+      // 左侧列表内容
+      gantt.config.columns = [
+        // { name: "text", min_width:100,max_width:200, label:"任务", align: "left",resize: true, tree: true },
+        { name: "testItems", label: "检测项目", width: 130, resize: true, align: "left",resize: true, tree: true },
+        { name: "sampleName", label: "样品名称", width: 90, resize: true, align: "center" },
+        { name: "start_date", label: "开始时间", width: 90, resize: true, align: "center" },
+        { name: "end_date", label: "结束时间", width: 90, resize: true, align: "center" },
+        { name: "statusC", label: "状态", width: 60, resize: true, align: "center" },
+        { name: "add", label:"", width: 30 }
+      ];
+      // 更改左侧显示的结束日期时间
+      gantt.templates.task_end_date = function(date){
+        return gantt.templates.task_date(new Date(date.valueOf() - 1));
+      };
+      var gridDateToStr = gantt.date.date_to_str("%Y-%m-%d");
+      gantt.templates.grid_date_format = function(date, column){
+        if(column === "end_date"){
+          return gridDateToStr(new Date(date.valueOf() - 1));
+        }else{
+          return gridDateToStr(date);
+        }
+      }
+      // 右侧项目展示
+      gantt.templates.task_text = function (start, end, task) {
+        console.log("右侧展示",task)
+        if (task.parent == 0) {
+          return task.pm + ", " + task.deviceName;
+        } else {
+          return task.worker + ", " + task.deviceName;
+        }
+        // return task.worker + ", " + task.deviceName;
+      };
+      // 灯箱多选框
+      gantt.form_blocks["multiselect"] = {
+        render: function (sns) {
+          var height = (sns.height || "23") + "px";
+          var html = "<div class='gantt_cal_ltext gantt_cal_chosen gantt_cal_multiselect'"+
+            "style='height:"+ height + ";'><select data-placeholder='...'"+
+            "class='chosen-select' multiple>";
+          if (sns.options) {
+            for (var i = 0; i < sns.options.length; i++) {
+              if(sns.unassigned_value !== undefined && sns.options[i].key==sns.unassigned_value){
+                continue;
+              }
+              html+="<option value='" +sns.options[i].key+ "'>"+sns.options[i].label+"</option>";
+            }}
+          html += "</select></div>";
+          return html;},
+        set_value: function (node, value, ev, sns) {
+          node.style.overflow = "visible";
+          node.parentNode.style.overflow = "visible";
+          node.style.display = "inline-block";
+          var select = $(node.firstChild);
+          if (value) {
+            value = (value + "").split(",");
+            select.val(value);
+          }
+          else {
+            select.val([]);
+          }
+          select.chosen();
+          if(sns.onchange){
+            select.change(function(){
+              sns.onchange.call(this);
+            })
+          }
+          select.trigger('chosen:updated');
+          select.trigger("change");},
+        get_value: function (node, ev) {
+          var value = $(node.firstChild).val();
+          //value = value ? value.join(",") : null
+          return value;},
+        focus: function (node) {
+          $(node.firstChild).focus();
+        }};
+        // 单击获取当前行信息
+        // gantt.attachEvent("onTaskRowClick", function (id, e){
+        //   let that = this
+        //   console.log("单击当前行",id,e)
+        //   gantt.getTask(id);
+        //     //any custom logic here
+        //     return true;
+        // });
+        // 给灯箱赋默认值(将父任务的参数赋给灯箱)
+        gantt.attachEvent("onTaskCreated", function(task){
+          console.log("给灯箱赋默认值",task,gantt.getTask(task.parent))
+          if (task.parent == undefined) {
+            return false;
+          } else {
+            // 灯箱部分
+          task.shebeiId = gantt.getTask(task.parent).shebeiId
+          // task.reportNo = gantt.getTask(task.parent).reportNo
+          task.chuanganqiArray = gantt.getTask(task.parent).chuanganqiArray
+          // 灯箱虽不展示,但也要赋值
+          task.deviceName = gantt.getTask(task.parent).deviceName
+          task.yangpinId = gantt.getTask(task.parent).yangpinId
+          task.sampleName = gantt.getTask(task.parent).sampleName
+          task.shijiStartDate = gantt.getTask(task.parent).shijiStartDate
+          task.testItems = gantt.getTask(task.parent).testItems
+          task.testItemsId = gantt.getTask(task.parent).testItemsId
+          task.testPlanId = gantt.getTask(task.parent).testPlanId
+          task.weituoId = gantt.getTask(task.parent).weituoId
+          task.weituoNo = gantt.getTask(task.parent).weituoNo
+          console.log("第二个",task)
+            return true;
+          }
+        });
+        //弹出层(灯箱)
+        // gantt.config.lightbox.sections = [
+        // ];
+        // 根据判断不同级别任务弹不同的灯框(并展示不同的按钮)
+        var full_lightbox =[
+          {
+            name: "time", height: 40, map_to: "auto", type: "duration",
+            time_format: ["%Y", "%m", "%d"],
+          },
+          // { name: "reportNo", height: 30, map_to: "reportNo", type: "textarea", },
+          { name: "device", height: 30, map_to: "shebeiId", type: "select", options: gantt.serverList('staff2',[]), },
+          { name: "sensor", height: 30, map_to: "chuanganqiArray", type: "multiselect", options: gantt.serverList('chuanganqi2',[]), },
+          { name: "shiiyanType", height: 30, map_to: "shiiyanTypeArray", type: "multiselect", options: gantt.serverList('testTypeOptions',[]), },
+          { name: "worker", height: 30, map_to: "worker", type: "select", options: gantt.serverList('worker',[]), },
+          { name: "yangpinCount", height: 30, map_to: "yangpinCount", type: "textarea", width: 60 },
+          { name: "neirong", height: 45, map_to: "neirong", type: "textarea", focus: true, width: "*", },
+        ];
+        var restricted_lightbox = [
+          {
+            name: "time", height: 40, map_to: "auto", type: "duration",
+            time_format: ["%Y", "%m", "%d"],
+          },
+          { name: "reportNo", height: 30, map_to: "reportNo", type: "textarea" },
+          { name: "device", height: 30, map_to: "shebeiId", type: "select", options: gantt.serverList('staff',[]), },
+          { name: "sensor", height: 30, map_to: "chuanganqiArray", type: "multiselect", options: gantt.serverList('chuanganqi',[]), },
+        ];
+        gantt.attachEvent("onBeforeLightbox", function(task_id) {
+            gantt.resetLightbox();
+            var task = gantt.getTask(task_id);
+            // console.log("重置灯箱",task)
+            if (task.$level == 0){
+                gantt.config.lightbox.sections = restricted_lightbox;
+                gantt.config.buttons_left = ["gantt_cancel_btn"];
+                gantt.config.buttons_right = [];
+            } else {
+                gantt.config.lightbox.sections = full_lightbox;
+                gantt.config.buttons_left = ["gantt_save_btn", "gantt_cancel_btn"];
+                gantt.config.buttons_right = ["gantt_delete_btn"];
+            };
+            return true;
+        });
+        // 展示灯箱里的删除按钮
+        // gantt.config.buttons_right = ["gantt_delete_btn"];
+        // 点击灯箱的保存按钮触发
+        let that = this
+        gantt.attachEvent("onLightboxSave", function(id, task, is_new){
+            console.log(id, task, is_new)
+            let y = task.start_date.getFullYear()
+            let m = task.start_date.getMonth() + 1
+            m = m < 10 ? ('0' + m) : m
+            let d = task.start_date.getDate()
+            d = d < 10 ? ('0' + d) : d
+            task.jihuaStartDate = y + '-' + m + '-' + d ;
+            // task.jihuaStartDate = task.start_date
+            task.lastTime = task.duration
+            console.log("提交",task)
+            saveProjectJl(task).then((res) => {
+              console.log("提交返回",task,res)
+              // gantt.init(that.$refs.gantt);
+              gantt.parse(that.tasks);
+              // that.getHjlist(that.tasks.queryParam)
+            })
+            return true;
+        })
+        // 点击灯箱删除按钮触发
+        gantt.attachEvent("onLightboxDelete", function(id){
+            const task = gantt.getTask(id);
+            console.log(task)
+            if (task.statusC == "不可修改"){
+                // alert("该项已进行,不可修改");
+                notification.open({
+                  message: '注意',
+                  description: "该项已进行,不可修改",
+                });
+                gantt.hideLightbox();
+                return false;
+            }else{
+              return true;
+            }
+        })
+        // 一个人操作计划排期和拆解工单
+        // const onLightboxSave = gantt.attachEvent('onLightboxSave', (id) => {
+        //   console.log(id)
+        //     gantt.message(`onLightboxSave: Task ID: ${id}`);
+        //     return true;
+        // }, '');
+        // console.log(1111111111111,onLightboxSave)
+        // this.eventIDs.push(onLightboxSave);
+        // 在删除任务之前触发
+        gantt.attachEvent("onBeforeTaskDelete", function(id,item){
+          var select={id:id}
+          delProjectJl(select).then((res) => {
+            console.log("删除",res)
+            if (res.success) {
+              return true;
+            } else {
+              return false;
+            }
+          })
+          //any custom logic here
+          // return true;
+        });
+        // 隐藏某行的添加按钮
+        gantt.templates.grid_row_class = function( start, end, task ){
+          // console.log("隐藏",task)
+            if ( task.$level > 0 ){
+                return "nested_task"
+            }
+            return "";
+        };
+        // // 自定义弹框
+        // let that = this
+        // gantt.attachEvent("onTaskDblClick", function (id, e){
+        //   console.log(111,id, e);
+        //   that.id = id
+        //   gantt.getTask(that.id);
+        //   console.log("双击获取当前行信息",gantt.getTask(that.id),gantt.getTask(that.id).parent);
+        //   if (gantt.getTask(that.id).parent  == 0) {
+
+      //   } else {
+
+      //   }
+      //     return true;
+      // });
+
+
+      gantt.init(this.$refs.gantt);
+      // gantt.parse(this.tasks);
+
+  },
+
   methods: {
     // 获取设备下拉列表
     getDevicelist(){
@@ -62,37 +422,54 @@ export default {
             label: response.deviceName
           }
         })
-        this.initData()
+        this.tasks.collections.staff2 = this.tasks.collections.staff
+        //this.initData()
+      })
+    },
+    // 获取传感器下拉列表
+    getCgqlist(){
+      getCgqList().then((res) => {
+        this.tasks.collections.chuanganqi = res.map(response =>{
+          return {
+            key: response.id,
+            value: response.id,
+            label: response.xuliehao
+          }
+        })
+        this.tasks.collections.chuanganqi2 = this.tasks.collections.chuanganqi
+       // this.initData()
       })
     },
     // 获取项目经理下拉列表
     getManagerList(){
       var query ={
-        position: "项目经理"
+        position: "试验员"
       }
       getManagerList(query).then((res) => {
-        console.log(17,res)
-        this.tasks.collections.manager = res.map(response =>{
+        this.tasks.collections.worker = res.map(response =>{
           return {
             key: response.name,
             value: response.id,
             label: response.name
           }
         })
-        this.initData()
+       // this.initData()
       })
     },
-    // 获取传感器下拉列表
-    getCgqlist(){
-      getCgqList().then((res) => {
-        this.tasks.collections.chuanganqi = res.map(response =>{
+    // 字典获取试验类型下拉列表
+    initDictConfig() {
+      //获取字典       你的字典名称 ⬇⬇⬇⬇
+      ajaxGetDictItems('shiiyan_type').then((res) => {
+        console.log('字典',res)
+          this.tasks.collections.testTypeOptions = res.result.map(response =>{
           return {
-            key: response.id,
-            value: response.id,
-            label: response.xuliehao
+            key: response.value,
+            value: response.value,
+            label: response.label
           }
         })
-        this.initData()
+          // this.testTypeOptions = res.result
+        //this.initData()
       })
     },
     // 通过委托编号查询检测项目
@@ -102,12 +479,13 @@ export default {
       console.log(22,queryParam)
       getXmjlList(queryParam).then((res) => {
         console.log(17,res)
-        this.tasks.data = []
-        gantt.clearAll(); 
+        that.tasks.data = []
+        gantt.clearAll();
         if (res.result.length > 0 ) {
-          this.tasks.data = res.result.map(res => {
+          that.tasks.data = res.result.map(res => {
             return {
               id: res.id,
+              parent: res.parent,
 
               weituoId: res.weituoId,
               testItemsId: res.testItemsId,
@@ -115,19 +493,20 @@ export default {
               shebeiId:res.shebeiId,
               pm: res.pm,
               reportNo: res.reportNo,
-              chuanganqi:res.chuanganqiArray,
+              chuanganqiArray:res.chuanganqiArray,
               testPlanId:res.testPlanId,
               status:res.status,
+              pm: res.pm,
 
               weituoNo: res.weituoNo,
               neirong: res.neirong,
               start_date: res.jihuaStartDate,
               // jihuaEndDate: res.jihuaEndDate,
-              shiiyanType: res.shiiyanType,
+              shiiyanTypeArray: res.shiiyanTypeArray,
               shijiStartDate: res.shijiStartDate,
               worker: res.worker,
               yangpinCount:res.yangpinCount,
-              
+
               duration: res.lastTime,
               sampleName: res.sampleName,
               testItems: res.testItems,
@@ -135,6 +514,8 @@ export default {
               statusC: res.statusC
             }
           })
+          gantt.init(this.$refs.gantt);
+          gantt.parse(that.tasks);
 
           // gantt.init(this.$refs.gantt);
           // // gantt.parse(this.$props.tasks);
@@ -145,9 +526,8 @@ export default {
             description: '该委托编号不存在',
           });
         }
-        gantt.init(this.$refs.gantt);
-        // gantt.parse(this.$props.tasks);
-        gantt.parse(this.tasks);
+        // gantt.init(this.$refs.gantt);
+        // gantt.parse(this.tasks);
       })
     },
     // // 提交
@@ -173,285 +553,7 @@ export default {
     //   })
     //   console.log(data.length)
     // },
-    initData(){
-        // 启用动态加载
-        gantt.config.branch_loading = true
-        //日期格式化
-        gantt.config.xml_date = "%Y-%m-%d";
-        gantt.config.order_branch = true;
-        gantt.config.order_branch_free = true;
-        //左侧是否自适应
-        gantt.config.autofit = true;
-        gantt.config.drag_links = false;//连线
-        gantt.config.readonly = false;  //只读
-        gantt.config.date_scale = "%m月%d日"; //右侧显示列名
-        gantt.config.layout = {//拖拽布局
-          css: "gantt_container",
-          rows: [
-            {
-              cols: [
-                { view: "grid", id: "grid", scrollX: "scrollHor", scrollY: "scrollVer" },
-                { resizer: true, width: 1 },
-                { view: "timeline", id: "timeline", scrollX: "scrollHor", scrollY: "scrollVer" },
-                { view: "scrollbar", scroll: "y", id: "scrollVer" }
-              ]
-            },
-            { view: "scrollbar", scroll: "x", id: "scrollHor", height: 20 }
-          ],
-        };
-        // 重置布局
-        gantt.resetLayout();
-        gantt.config.start_on_monday = true;
-        gantt.config.work_time = false;
-        gantt.config.fit_tasks = true;   //自动调整图表坐标轴区间用于适配task的长度
-        // 甘特图汉化
-        gantt.locale = {
-          date: {
-            month_full: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
-            month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
-            day_full: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
-            day_short: ["日", "一", "二", "三", "四", "五", "六"]
-          },
-          labels: {
-            dhx_cal_today_button: "今天",
-            day_tab: "日",
-            week_tab: "周",
-            month_tab: "月",
-            new_event: "新建日程",
-            icon_save: "保存",
-            icon_cancel: "关闭",
-            icon_details: "详细",
-            icon_edit: "编辑",
-            icon_delete: "删除",
-            confirm_closing: "请确认是否撤销修改!", //Your changes will be lost, are your sure?
-            confirm_deleting: "是否删除计划?",
-            section_description: "描述:",
-            section_time: "时间范围:",
-            section_type: "类型:",
-            section_text: "计划名称:",
-            section_test: "测试:",
-            section_projectClass: "项目类型:",
-            taskProjectType_0: "项目任务",
-            taskProjectType_1: "普通任务",
-            section_head: "项目经理:",
-            section_device: "试验设备:",
-            section_sensor: "传感器:",
-            section_priority: '优先级:',
-            taskProgress: '任务状态',
-            taskProgress_0: "未确认",
-            taskProgress_1: "已确认",
-            taskProgress_2: "完成",
-            taskProgress_3: "已延期",
-            taskProgress_4: "搁置中",
-            section_template: 'Details',
-            /* grid columns */
-            column_text: "计划名称",
-            column_sampleName: "样品名称",
-            column_testItems: "检测项目",
-            column_start_date: "开始时间",
-            column_duration: "持续时间",
-            column_add: "",
-            column_priority: "难度",
-            /* link confirmation */
-            link: "关联",
-            confirm_link_deleting: "将被删除",
-            link_start: " (开始)",
-            link_end: " (结束)",
-            type_task: "任务",
-            type_project: "项目",
-            type_milestone: "里程碑",
 
-            minutes: "分钟",
-            hours: "小时",
-            days: "天",
-            weeks: "周",
-            months: "月",
-            years: "年"
-          }
-        };
-        gantt.attachEvent("onTaskClick", function(id, e){
-        var button = e.target.closest("[data-action]")
-        if(button){
-            var action = button.getAttribute("data-action");
-            switch (action) {
-                case "edit":
-                    gantt.showLightbox(id);
-                    break;
-                case "add":
-                    gantt.createTask(null, id);
-                    break;
-                case "delete":
-                    gantt.confirm({
-                        title: gantt.locale.labels.confirm_deleting_title,
-                        text: gantt.locale.labels.confirm_deleting,
-                        callback: function (res) {
-                            if (res)
-                                gantt.deleteTask(id);
-                        }
-                    });
-                    break;
-            }
-            return false;
-
-        }
-        return true;
-    });
-        // 左侧列表内容
-        gantt.config.columns = [
-          // { name: "text", min_width:100,max_width:200, label:"任务", align: "left",resize: true, tree: true },
-          { name: "testItems", label: "检测项目", width: 130, resize: true, align: "left",resize: true, tree: true },
-          { name: "sampleName", label: "样品名称", width: 90, resize: true, align: "center" },
-          { name: "start_date", label: "开始时间", width: 90, resize: true, align: "center" },
-          { name: "end_date", label: "结束时间", width: 90, resize: true, align: "center" },
-          { name: "statusC", label: "状态", width: 60, resize: true, align: "center" },
-          // { name: "add", label:"", width: 30 }
-          {name: "buttons",label: colHeader,width: 75,template: function (task) {
-            return (
-                '<i class="fa fa-pencil" data-action="edit"></i>' +
-                '<i class="fa fa-plus" data-action="add"></i>' +
-                '<i class="fa fa-times" data-action="delete"></i>'
-                );
-        }}
-        ];
-        // 更改左侧显示的结束日期时间
-        gantt.templates.task_end_date = function(date){
-          return gantt.templates.task_date(new Date(date.valueOf() - 1)); 
-          };
-          var gridDateToStr = gantt.date.date_to_str("%Y-%m-%d");
-          gantt.templates.grid_date_format = function(date, column){
-          if(column === "end_date"){
-          return gridDateToStr(new Date(date.valueOf() - 1)); 
-          }else{
-          return gridDateToStr(date); 
-          }
-        }
-        // 右侧项目展示
-        gantt.templates.task_text = function (start, end, task) {
-          // console.log(task)
-          return task.pm + ", " + task.deviceName;
-        };
-        // 灯箱多选框
-        gantt.form_blocks["multiselect"] = {
-        render: function (sns) {
-          var height = (sns.height || "23") + "px";
-          var html = "<div class='gantt_cal_ltext gantt_cal_chosen gantt_cal_multiselect'"+
-            "style='height:"+ height + ";'><select data-placeholder='...'"+
-                "class='chosen-select' multiple>";
-          if (sns.options) {
-          for (var i = 0; i < sns.options.length; i++) {
-            if(sns.unassigned_value !== undefined && sns.options[i].key==sns.unassigned_value){
-                continue;
-            }
-            html+="<option value='" +sns.options[i].key+ "'>"+sns.options[i].label+"</option>";
-          }}
-          html += "</select></div>";
-          return html;},
-        
-        set_value: function (node, value, ev, sns) {
-            node.style.overflow = "visible";
-            node.parentNode.style.overflow = "visible";
-            node.style.display = "inline-block";
-            var select = $(node.firstChild);
-        
-            if (value) {
-                value = (value + "").split(",");
-                select.val(value);
-            }
-            else {
-                select.val([]);
-            }
-        
-            select.chosen();
-            if(sns.onchange){
-                select.change(function(){
-                    sns.onchange.call(this);
-                })
-            }
-            select.trigger('chosen:updated');
-            select.trigger("change");},
-        
-        get_value: function (node, ev) {
-            var value = $(node.firstChild).val();
-            //value = value ? value.join(",") : null
-            return value;},
-        focus: function (node) {
-            $(node.firstChild).focus();
-        }};
-        //弹出层(灯箱)
-        gantt.config.lightbox.sections = [
-          {
-            name: "time", height: 40, map_to: "auto", type: "duration",
-            time_format: ["%Y", "%m", "%d"],
-            
-          },
-          // { name: "head", height: 30, map_to: "pm", type: "select", options:gantt.serverList("manager") },
-          {
-            name: "device", height: 30, map_to: "shebeiId", type: "select", options: gantt.serverList('staff',[]),
-          },
-          {
-            name: "sensor", height: 30, map_to: "chuanganqi", type: "multiselect", options: gantt.serverList('chuanganqi',[]),
-          },
-          // { name: "description", height: 70, map_to: "description", type: "textarea" },
-          // {
-          //   name: "priority", height: 40, map_to: "priority", type: "radio", options: gantt.serverList("priority")
-          // },
-
-        ];
-        // 展示灯箱里的删除按钮
-        gantt.config.buttons_right = ["gantt_delete_btn"];
-        // 点击灯箱的保存按钮触发
-        gantt.attachEvent("onLightboxSave", function(id, task, is_new){
-            //any custom logic here
-            console.log(id, task, is_new)
-            return true;
-        })
-        // 隐藏某行的添加按钮
-        gantt.templates.grid_row_class = function( start, end, task ){
-          // console.log("隐藏",task)
-            if ( task.$level > 0 ){
-                return "nested_task"
-            }
-            return "";
-        };
-        // 单击获取当前行信息
-        gantt.attachEvent("onTaskRowClick", function (id, e){
-          console.log("单击当前行",id,e)
-            //any custom logic here
-            return true;
-        });
-        let that = this
-        gantt.attachEvent("onTaskDblClick", function (id, e){
-          gantt.form_blocks.textarea.set_value=function(node,value,ev){
-          console.log("动态隐藏部分",node,value,ev)
-            node.firstChild.value=value||"";
-            var style = ev.some_property?"":"none";
-            node.style.display=style; // editor area
-            node.previousSibling.style.display=style; //section header
-            gantt.resizeLightbox(); //correct size of lightbox
-        }
-        return true;
-        });
-
-        
-        // // 自定义弹框
-        // let that = this
-        // gantt.attachEvent("onTaskDblClick", function (id, e){
-        //   console.log(111,id, e);
-        //   that.id = id
-        //   gantt.getTask(that.id);
-        //   console.log("双击获取当前行信息",gantt.getTask(that.id),gantt.getTask(that.id).parent);
-        //   if (gantt.getTask(that.id).parent  == 0) {
-            
-        //   } else {
-            
-        //   }
-        //     return true;
-        // });
-
-
-        gantt.init(this.$refs.gantt);
-        gantt.parse(this.tasks);
-    }
   }
 }
 </script>
@@ -461,11 +563,17 @@ export default {
     .gantt_cal_larea{
 			overflow:visible;
 		}
+    .gantt_cal_larea{
+      padding-bottom: 10px;
+    }
     .gantt_cal_chosen,
 		.gantt_cal_chosen select{
 			width: 400px;
-      margin-bottom: 20px;
+      margin-bottom: 10px;
 		}
+    /* ::v-deep .gantt_task_content{
+      font-size: 8px !important;
+    } */
     .taskProgress{
       margin: 0 auto;
       margin-top: 5px;
@@ -489,4 +597,7 @@ export default {
     .nested_task .gantt_add{
         display: none !important;
     }
+    .noShow{
+      display: none !important;
+    }
 </style>

+ 3 - 5
itdmWeb/src/views/module-iTDM/itdmPersonManage/ItdmPersonManageList.vue

@@ -4,11 +4,9 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
-          <a-col :xl="10" :lg="11" :md="12" :sm="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="人员姓名">
-              <a-input placeholder="请输入最小值" class="query-group-cust" v-model="queryParam.name_begin"></a-input>
-              <span class="query-group-split-cust"></span>
-              <a-input placeholder="请输入最大值" class="query-group-cust" v-model="queryParam.name_end"></a-input>
+              <a-input placeholder="请输入人员姓名" v-model="queryParam.name"></a-input>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -211,7 +209,7 @@
           deleteBatch: "/itdmPersonManage/itdmPersonManage/deleteBatch",
           exportXlsUrl: "/itdmPersonManage/itdmPersonManage/exportXls",
           importExcelUrl: "itdmPersonManage/itdmPersonManage/importExcel",
-          
+
         },
         dictOptions:{},
         superFieldList:[],

+ 762 - 0
itdmWeb/src/views/module-iTDM/itdmScreen/itdmGraph.vue

@@ -0,0 +1,762 @@
+<template>
+  <div class="bg">
+    <!-- 头部 -->
+    <div class="header">检测试验监控管理平台</div>
+    <div>
+      <a-button class="fanHui" @click="back">返回</a-button>
+    </div>
+
+
+    <div class="cent">
+      <div class="cenhead">
+        <div class="title">{{deviceName}}</div>
+      </div>
+      <div class="echarts" style="height:90%;width:100%;" ref="zhexian"></div>
+    </div>
+
+    
+    
+  </div>
+</template>
+
+<script>
+import { listGraph } from "@/api/api";
+import echarts from 'echarts'
+require('echarts/theme/macarons') // echarts theme
+export default {
+  data() {
+    return {
+      // websocket
+      path: 'ws://192.168.1.11:8080/itdmServer/itdmWebsocket/itdmSecondServer',
+      // path: 'ws://127.0.0.1:8080/websocket/list',
+      socket: '',
+
+      // 通用数据1(电压、进水口出水口温度、水压)
+      tY1: [],
+      // 通用数据2(三个区域温度、湿度、气压)
+      tY2: [],
+      // 温箱试验数据
+      tableDataW: [],
+      // 力学试验数据
+      tableDataL: [],
+      // 设备维护数据
+      tableDataS: [],
+      // 选择设备
+      deviceOptions: [], // 所有设备
+      allDevOptions: [], // 备用所有设备
+      // 报警数据
+      tableDataB: [],
+      // 语音播报
+      boBaoWZ: [],
+      yuYin: [],
+      // 停止播报按钮状态
+      typeAll: false,
+      // // 历史预警统计
+      getYJ: [],
+      // 单条语音播报id
+      yuYing: {
+        deleteId: null,
+        alarmType: null,
+      },
+      // 折线图初始化
+      query: {
+        id: this.$route.query.id
+      },
+      deviceSelect: [this.$route.query.id], // 选择后传给后端的设备id
+      echartsData: [],
+      deviceName: this.$route.query.deviceName
+    }
+  },
+  mounted () {
+    this.getList()
+    // 设备初始化
+    this.init()
+    // this.drawZhexian() // 绘制折线图
+    // echarts自适应
+    window.addEventListener("resize", () =>{
+      this.zheChart.resize();
+    });
+  },
+  methods:{
+    // 初始化折线图
+    getList() {
+      console.log(this.query)
+      listGraph(this.query.id).then(res => {
+        console.log(res)
+        this.echartsData = res.data.data
+        this.$nextTick(() => {
+          this.drawZhexian()
+        })
+      })
+    },
+    // 返回按钮
+    back(){
+      this.typeAll = false
+      // this.$router.push('/visualization2')
+      this.$router.go(-1);//返回上一层
+    },
+    // 设备状况按钮
+    zhengchang(num){
+      console.log(num)
+      this.deviceOptions = []
+      console.log(this.deviceOptions)
+      var deOption = this.allDevOptions
+      if( !num && num == undefined ){
+        this.deviceOptions = this.allDevOptions
+        return false
+      }
+      for (var i = 0; i < deOption.length; i++) { 
+        console.log(deOption[i].deviceStatus)
+        if(deOption[i].deviceStatus == num){
+          this.deviceOptions.push(deOption[i])
+          console.log(this.deviceOptions)
+        }
+      }
+    },
+    // 语音播报
+    voiceBroadcast(text){
+      this.voiceContent = new SpeechSynthesisUtterance(text);
+      this.voiceContent.volume = 100;
+      this.voiceContent.rate = 1;
+      this.voiceContent.pitch = 1.5;
+      console.log(this.voiceContent);
+      window.speechSynthesis.speak(this.voiceContent)
+    },
+    // 绘制折线图
+    drawZhexian(){
+      var chartDom = this.$refs.zhexian
+      this.zheChart = echarts.init(chartDom);
+
+      var xAxisData = []
+      var seriesData = []
+      var seriesDatas = []
+      console.log(this.echartsData)
+      xAxisData = this.echartsData[0].xAxis
+      seriesData = this.echartsData[0].series[0].data
+      seriesDatas = this.echartsData[1].series[0].data
+      console.log(1234,xAxisData,seriesData,seriesDatas)
+      var startValue1 = xAxisData.length -7
+      var endtValue1 = xAxisData.length -1
+
+      // var setSeries = seriesData ? seriesData.map((res, index) => {
+      //   console.log(res)
+      //   return {
+      //     name: res.name + '数值',
+      //     type: 'line',
+      //     smooth: true,
+      //     symbol: 'none',
+      //     // sampling: 'lttb', // 最大数值在中间
+      //     itemStyle: {
+      //       // color: res.s == '0' ? '#5efcf4' : '#FFC58B'
+      //       color: '#5efcf4'
+      //       // color: res.s == '0' ? '#5efcf4' : '#ffaaaa'
+      //       // color: res.status === '1' ? '#60fcf5' : 'red'
+      //     },
+      //     data: res.data
+      //   }
+      // }) : []
+
+      var option;
+
+      option = {
+        // backgroundColor:'#05799c97',
+        // color: ['#0C65F6', '#00D68A'],
+        color: ['#16D6FF', '#00FED2'],
+        tooltip: {
+          confine: true,
+        },
+        tooltip: {
+          trigger: 'axis',
+          backgroundColor:'#257AA7',
+          // backgroundColor:'transparent',
+          borderColor:'#fff',
+          // extraCssText: "box-shadow: 2px 2px 4px 2px rgba(37,122,167, 0.3);",
+          // color:'#EBC69A',
+          axisPointer: {
+                  lineStyle: {
+                      color: {
+                          type: 'linear',
+                          x: 0,
+                          y: 0,
+                          x2: 0,
+                          y2: 1,
+                          colorStops: [{
+                              offset: 0,
+                              color: 'rgba(126,199,255,0)' // 0% 处的颜色
+                          }, {
+                              offset: 0.5,
+                              color: 'rgba(126,199,255,1)' // 100% 处的颜色
+                              // offset: 0.9,
+                              // color: '#EBC69A' // 100% 处的颜色
+                          }, {
+                              offset: 1,
+                              color: 'rgba(126,199,255,0)' // 100% 处的颜色
+                          }],
+                          global: false // 缺省为 false
+                      }
+                  },
+              },
+        },
+        grid: {
+          left: '2%',
+          right: '4%',
+          bottom: '5%',
+          top: '30px',
+          containLabel: true,
+        },
+        legend: {
+          icon: 'rect',
+          orient: 'horizontal',
+          right: '4%',
+          itemWidth: 12,
+          itemHeight: 12,
+          formatter: ['{a|{name}}'].join('\n'),
+          textStyle: {
+            fontSize: 12,
+            color: '#BCFFFC',
+            height: 8,
+            rich: {
+              a: {
+                verticalAlign: 'bottom',
+              },
+            },
+          },
+          data: ['温度', '湿度'],
+        },
+        xAxis: {
+          type: 'category',
+          axisLine: {
+            lineStyle: {
+              color: '#6A93B9',
+            },
+          },
+          axisLabel: {
+            // 横坐标全部显示interval:0,横坐标自动折叠则不需此语句
+            // interval:0,
+            fontSize: 12,
+            // color: '#6A93B9',
+            margin: 15, // x轴距离文字距离
+            color: '#BCFFFC',
+          },
+          axisTick: {
+            show: false,
+          },
+          data: xAxisData
+        },
+        dataZoom: [
+          {
+            type: 'inside',
+            // show: true,
+            // realtime: true,
+            // start: 75,
+            // end: 100
+            startValue: startValue1,
+            endValue: endtValue1,
+          },
+          {
+            // type: 'inside',
+            // realtime: true,
+            // start: 0,
+            // end: 100
+            show: true,
+              realtime: true,
+              height: 15,//这里可以设置dataZoom的尺寸
+              backgroundColor: 'rgba(12,44,72, 0.3)',
+              textStyle: false,
+              bottom: 6,
+          }
+        ],
+        yAxis: {
+          type: 'value',
+          min: 0,
+          minInterval: 1,
+          nameTextStyle: {
+            fontSize: 12,
+            color: '#BAE7FF',
+            align: 'center',
+          },
+          splitLine: {
+            lineStyle: {
+              // color: 'rgba(255, 255, 255, 0.15)',
+              color: '#6A93B9',
+              type: 'dashed', // dotted 虚线
+            },
+          },
+          splitArea: { show: false },
+          axisLine: {
+            show: false,
+          },
+          axisTick: {
+            show: false,
+          },
+          axisLabel: {
+            fontSize: 12,
+            fontFamily: 'Bebas',
+            color: '#BCFFFC',
+          },
+        },
+        series: [
+          {
+            type: 'line',
+            // showSymbol: false,
+            // smooth: true, // 是否曲线
+            name: '温度', // 图例对应类别
+            // data: [1000, 4000, 5000, 6000, 3000, 8000, 7000], // 纵坐标数据
+            data: seriesData, // 纵坐标数据
+            areaStyle: { // 区域颜色
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                offset: 0,
+                color: 'rgba(22, 214, 255, 0.6)',
+              }, {
+                offset: 1,
+                color: 'rgba(22, 214, 255, 0.1)',
+              }]),
+            },
+          }, {
+            type: 'line',
+            name: '湿度',
+            // data: [5000, 6000, 7000, 2000, 5000, 7000, 9000],
+            data: seriesDatas,
+            areaStyle: {
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                offset: 0,
+                color: 'rgba(36,229,195, 0.6)',
+              }, {
+                offset: 1,
+                color: 'rgba(36,229,195, 0.1)',
+              }]),
+            }
+          }
+        ],
+      };
+      option && this.zheChart.setOption(option);
+    },
+    // websocket
+    init: function () {
+      if(typeof(WebSocket) === "undefined"){
+          alert("您的浏览器不支持socket")
+      }else{
+        // 实例化socket
+        this.socket = new WebSocket(this.path)
+        // 监听socket连接
+        this.socket.onopen = this.open
+        // 监听socket错误信息
+        this.socket.onerror = this.error
+        // 监听socket消息
+        this.socket.onmessage = this.getMessage
+        // 监听销毁
+        this.socket.onclose = this.close
+      }
+    },
+    open: function () {
+        console.log("socket连接成功")
+        this.send()
+    },
+    error: function () {
+        console.log("连接错误")
+    },
+    getMessage: function (msg) {
+      var data = JSON.parse(msg.data)
+      // console.log(data)
+
+      this.echartsData = data.data.data
+      console.log(this.echartsData)
+
+      this.$nextTick(() => {
+        this.drawZhexian()
+      })
+    },
+    send: function () {
+      console.log(this.deviceSelect)
+      this.socket.send(JSON.stringify({deviceIds:this.deviceSelect,day:1}))
+    },
+    close: function () {
+      console.log("socket已经关闭")
+    }
+  },
+  destroyed () {
+    console.log(1111)
+    // 销毁监听
+    // this.close()
+    this.socket.close()
+  },
+}
+</script>
+
+<style lang="less" scoped>
+/* flex布局 */
+.u-flex,.u-flex-ac,.u-flex-jac,.u-flex-jab,.u-flex-jaa,.u-flex-cjac,.u-flex-cjab,.jc-end{ display: flex; }
+.fd-column,.u-flex-cjac,.u-flex-cjab{ flex-direction: column; }
+.jc-center,.u-flex-jac,.u-flex-cjac{ justify-content: center; }
+.jc-sb,.u-flex-jab,.u-flex-cjab{ justify-content: space-between; }
+.jc-sa,.u-flex-jaa{ justify-content: space-around; }
+.jc-start{ justify-content: flex-start; }
+.jc-end{ justify-content: flex-end; }
+.ai-center,.u-flex-ac,.u-flex-jab,.u-flex-jac,.u-flex-jaa,.u-flex-cjac{ align-items: center; }
+.ai-start{ align-items: flex-start; }
+.ai-end{ align-items: flex-end; }
+.ai-stretch{ align-items: stretch; }
+.f1{ flex: 1; }
+.f-auto{ flex: auto; }
+.bg{
+  width: 100%;
+  height: 100%;
+  background: url('../../../assets/images/big.jpg') no-repeat center center;
+  overflow: hidden;
+}
+.header{
+  width: 100%;
+  height: 60px !important;
+  background: url('../../../assets/images/titleBg22.png') no-repeat center center;
+  background-size: cover 100%;
+  line-height: 60px;
+  text-align: center;
+  font-size: 35px;
+  letter-spacing: 5px;
+  color: rgb(188, 255, 252);
+  font-weight: bold;
+}
+.leHeader{
+  padding-left: 10px;
+  width: 100%;
+  height: 22px;
+  // background-color: aquamarine;
+  color: #44bae0;
+  font-size: 20px;
+  letter-spacing: 1px;
+  cursor: pointer;
+  font-weight: 600;
+}
+.ceHeader{
+  padding-left: 10px;
+  width: 50%;
+  height: 22px;
+  // background-color: aquamarine;
+  color: #44bae0;
+  font-size: 20px;
+  letter-spacing: 1px;
+  cursor: pointer;
+  font-weight: 600;
+}
+.ceHeader2{
+  padding-right: 10px;
+  width: 50%;
+  height: 30px;
+  // background-color: aquamarine;
+  color: #44bae0;
+  font-size: 20px;
+  letter-spacing: 1px;
+  cursor: pointer;
+  font-weight: 600;
+  position: absolute;
+  right: 0;
+  top: 3.8%;
+}
+.geXian{
+  margin-top: 3px;
+  background: url('../../../assets/images/up.png') no-repeat center center;
+  background-size: auto 220%;
+  // background-color: rgb(255, 204, 127);
+  width: 100%;
+  height: 3%;
+}
+.cent{
+  height: 88%;
+  width: 98%;
+  // border: 3px solid #148cb1;
+  // background-color: #1880a06a;
+  border: 2px solid rgba(32, 122, 183, .5);
+    // box-shadow: 0 0 2vw #237ad4 inset;
+    background: linear-gradient(#148cb1, #148cb1) left top,
+    linear-gradient(#148cb1, #148cb1) left top,
+    linear-gradient(#148cb1, #148cb1) right top,
+    linear-gradient(#148cb1, #148cb1) right top,
+    linear-gradient(#148cb1, #148cb1) left bottom,
+    linear-gradient(#148cb1, #148cb1) left bottom,
+    linear-gradient(#148cb1, #148cb1) right bottom,
+    linear-gradient(#148cb1, #148cb1) right bottom;
+    background-repeat: no-repeat;
+    background-size: 0.2vw 1vw, 1vw 0.2vw;
+    overflow-y: auto;
+    // 内阴影
+    box-shadow: inset 0px 0px 26px 0px #19ECFF;
+    // 外阴影
+    // box-shadow: 0px 0px 26px 0px rgba(32, 123, 183, 0.726);
+  // border: 3px solid #398ba4;
+  margin: 1% 1% 1% 1%;
+}
+.cenhead{
+  width: 50%;
+  height: 5%;
+  // color: #06C4C4;
+  font-size: 20px;
+  // font-weight: 600;
+  // padding-left: 2%;
+  padding-top: 1%;
+  padding-bottom: 2%;
+  .title{
+    width: 100px;
+    height: 36px;
+    border-radius: 2px;
+    // background-color: #16D6FF;
+    background-image:linear-gradient(90deg, #00bde8, #05799c);
+    color: #d8fff8;
+    margin-left: 4%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+}
+.cen{
+  margin: 0 10px 18px 10px;
+  padding: 1.6% 0 0 0;
+  width: 40%;
+  height: 90%;
+  // background-color: #168dc073 !important;
+  background: url('../../../assets/images/bg.png') no-repeat center center;
+  background-size: auto 111.3%;
+  // background: url('../../../assets/images/2/center2.png') no-repeat center center;
+  // background-size: contain;
+  position: absolute;
+  left: 29.4%;
+  bottom: 0%;
+    // // 滚动条
+    // overflow-y: auto;
+    // 设备布局
+    .device-data{
+      flex-wrap: wrap;
+      // 每一个设备
+      .item-container{
+        width: calc(23.5% - 6px);
+        height: 96px;
+        margin-bottom: 8px;
+        margin-left: 6px;
+        margin-right: 6px;
+        font-size: 15px;
+        padding-top: 3px;
+        // border: 3px solid #148cb1;
+        // border-width: 140px 40px 90px 40px;
+        background-image:linear-gradient(0deg, #05799c, #05799c38);
+        box-shadow: 0 10px 10px 0 rgba(0,0,0,.1);
+        // border-image: url('../../assets/images/bgs.png') 60 100 50 90 fill;
+        border-image-width: 26px 40px 18px 32px;
+        border-image-repeat: stretch;
+        position: relative;
+      }
+    }
+}
+/* 设置滚动条的样式 */
+::-webkit-scrollbar {
+  width: 10px;
+}
+/* 滚动槽 */
+::-webkit-scrollbar-track {
+  -webkit-box-shadow: inset006pxrgba(0,0,0,0.3);
+  border-radius: 8px;
+}
+/* 滚动条滑块 */
+::-webkit-scrollbar-thumb {
+  border-radius: 10px;
+  background:rgba(30, 179, 206, 0.459);
+  -webkit-box-shadow: inset006pxrgba(0,0,0,0.5);
+}
+// ::-webkit-scrollbar-thumb:window-inactive {
+//   background:rgba(25,189,242, 0.9);
+//   // background:rgba(37, 173, 214, 0.788);
+// }
+//每个设备字体
+.font{
+  color: rgba(243, 243, 243, 0.918);
+  display: flex;
+  justify-content: center;
+}
+// 预警字体
+  ::v-deep.font2{
+  color: rgba(243, 243, 243, 0.918);
+  font-size: 16px;
+}
+// 正常异常按钮显示
+.font-bu{
+  color: rgba(243, 243, 243, 0.918);
+  display: flex;
+  justify-content: center;
+  margin: 10px;
+}
+// 报警文字
+.yc{
+  color: brown;
+}
+.shuiyewei{
+  height: 82%;
+  width: 96%;
+  // margin: 10px;
+  // background-color: aquamarine;
+}
+.shuiyewei2{
+  height: 80%;
+  width: 96%;
+  margin: 10px;
+}
+// 返回按钮
+.fanHui{
+  background: #116B8D;
+  color: rgb(206, 255, 239);
+  border-color: rgba(47, 117, 129, 0.74);
+  position: absolute;
+  top: 1%;
+  right: 1.5%;
+}
+// 点击按钮后按钮的颜色
+.el-button.is-plain:hover, .el-button.is-plain:focus{
+  background: #116B8D;
+  color: rgb(206, 255, 239);
+  border-color: rgba(47, 117, 129, 0.74);
+}
+.pause{
+  // margin: 0 0 0 3%;
+  background: #116B8D;
+  color: rgb(206, 255, 239);
+  border-color: rgba(47, 117, 129, 0.74);
+  position: absolute;
+  right: 2%;
+}
+.boB{
+  color: rgb(206, 255, 239);
+}
+.all{
+  background: #116B8D;
+  color: rgb(206, 255, 239);
+  border-color: rgba(47, 117, 129, 0.74);
+}
+// 表格
+  ::v-deep .el-table{
+    background-color: #114a688f !important;
+    color: #c6f7ff;
+    font-size: 14px;
+  }
+  ::v-deep .el-table th{
+    background-color: #0A5D89 !important;
+    color: #c6f7ff;
+    font-size: 15px;
+    border-bottom: 0;
+  }
+  ::v-deep .el-table--medium th{
+    padding: 6.2px 0 !important;
+  }
+  ::v-deep .el-table--medium td{
+    padding: 6.2px 0 !important;
+  }
+  ::v-deep .el-table tr{
+    background-color: #114a6817;
+    padding: 5px 0 !important;
+  }
+  ::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td{
+    background-color: #446185 !important;
+  }
+  ::v-deep .el-table td{
+    border-bottom: 0px;
+  }
+  ::v-deep .el-table th.is-leaf{
+    border-bottom: 0px;
+  }
+  ::v-deep .el-table::before{
+    height: 0px !important;
+  }
+  ::-webkit-th{
+    width: 16px;
+  }
+  // 表格鼠标悬停背景颜色
+  // ::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td{
+  //   background-color: #546b94 !important;
+  // }
+  // ::v-deep .el-table--enable-row-transition .el-table__body td{
+  //   background-color: #103E5F !important;
+  // }
+  // 上面的方法或者下面的都可以
+  ::v-deep .el-table__body tr:hover>td{
+    background-color: #103E5F !important;
+  }
+  ::v-deep .el-table__body tr.current-row>td{
+    background-color: #103E5F !important;
+  }
+  // 表格滚动条
+  /* 修改表格的滚动条(滚动条的宽度)*/
+    ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
+        width: 10px; // 横向滚动条
+        height: 10px; // 纵向滚动条 必写
+    }
+    /* 表格滚动条的滑块*/
+    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
+        background-color: rgba(30, 179, 206, 0.459);
+        border-radius: 3px; //滚动条圆弧
+    }
+    /* 表格的表头与内容不对齐 */
+    ::v-deep .el-table th.gutter {
+        display: table-cell !important;
+    }
+  // 按钮样式
+  .el-button--success {
+    // background-image:linear-gradient(140deg, #517973, #10e9b3);
+    // box-shadow: 0 10px 10px 0 rgba(0,0,0,.1);
+    background-color: #06C4C4;
+    border-color:#5bb486bd;
+  }
+  .el-button--danger {
+    // background-image:linear-gradient(120deg, #df5858, #ffaeae);
+    // box-shadow: 0 10px 10px 0 rgba(0,0,0,.1);
+    background-color: #f0a182;
+    border-color: #e49f84;
+  }
+  .el-button--info {
+    // background-image:linear-gradient(120deg, #707070, #d3d2d2);
+    // box-shadow: 0 10px 10px 0 rgba(0,0,0,.1);
+    background-color: #b4b4b4de;
+    border-color: #8d8d8d;
+  }
+  .butDanger {
+    background-color: #f08282;
+    border-color: #e48484;
+    color: #ffffff;
+  }
+
+  // 自定义表格
+  .row-top{
+    margin: 5px 5px 5px 5px;
+  }
+  .bt-top{
+    border-top: 1px solid #1797AD;
+  }
+  .bt-h100{
+    height: 100px;
+  }
+  .bt-h60{
+    height: 60px;
+  }
+  .bt-h250{
+    height: 222px;
+  }
+
+  .bg-purple {
+   text-align: center;
+    color: rgba(243, 243, 243, 0.918);
+    font-size: 13px;
+    // font-weight: 800;
+    border-left: 1px solid #1797AD;
+  }
+  .bg-purple-light {
+  text-align: center;
+    color: rgba(243, 243, 243, 0.918);
+    font-size: 13px;
+    // font-weight: 800;
+
+    border-left: 1px solid #1797AD;
+    border-right: 1px solid #1797AD;
+  }
+  .grid-content {
+    padding-top: 5px;
+    padding-left: 5px;
+    padding-right: 5px;
+    border-bottom: 1px solid #1797AD;
+    min-height: 30px;
+  }
+</style>

File diff suppressed because it is too large
+ 1327 - 0
itdmWeb/src/views/module-iTDM/itdmScreen/itdmScreenIndex.vue


+ 1 - 0
itdmWeb/src/views/module-iTDM/itdmTestPlan/itdmTestPlanList1.vue

@@ -47,6 +47,7 @@ export default {
       },
     }
   },
+
   methods: {
     getHjlist(){
       let that = this

+ 35 - 26
itdmWeb/src/views/module-iTDM/itdmWenxiang/ItdmWenxiangList.vue

@@ -50,10 +50,10 @@
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert" style="margin-bottom: 9px;">
-        <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a> -->
-      </div>
+      <!-- <div class="ant-alert" style="margin-bottom: 9px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
 
       <a-table
         ref="table"
@@ -67,23 +67,24 @@
         :loading="loading"
         class="j-table-force-nowrap"
         @change="handleTableChange">
-
-        <!-- <template #headerCell="{ column }">
-          <template v-if="column.key === 'name'">
-            <span>
-              <smile-outlined />
-              Name
-            </span>
-          </template>
-        </template> -->
-
-        <!-- <template #bodyCell="{ column, record }">
-          <template v-if="column.key === 'temperature'">
-            <a>
-              {{ record.temperature }}
-            </a>
-          </template>
-        </template> -->
+        
+        <!-- 通过判断temperatureAlarm的值,动态渲染temperature这一列单元格的样式 -->
+        <div slot="temperature" slot-scope="text, record">
+          <span v-if="record.temperatureAlarm ==1" class="y">{{text}}</span>
+          <span v-else>{{text}}</span>
+        </div>
+        <div slot="humidity" slot-scope="text, record">
+          <span :class="record.humidityAlarm == 1?'y':''">{{text}}</span>
+        </div>
+        <div slot="currentA" slot-scope="text, record">
+          <span :class="record.currentAAlarm == 1?'y':''">{{text}}</span>
+        </div>
+        <div slot="currentB" slot-scope="text, record">
+          <span :class="record.currentBAlarm == 1?'y':''">{{text}}</span>
+        </div>
+        <div slot="currentC" slot-scope="text, record">
+          <span :class="record.currentCAlarm == 1?'y':''">{{text}}</span>
+        </div>
 
         <template slot="htmlSlot" slot-scope="text">
           <div v-html="text"></div>
@@ -178,7 +179,8 @@
           {
             title:'温度',
             align:"center",
-            dataIndex: 'temperature'
+            dataIndex: 'temperature',
+            scopedSlots: { customRender: 'temperature' }
           },
           {
             title:'温度Max',
@@ -198,7 +200,8 @@
           {
             title:'湿度',
             align:"center",
-            dataIndex: 'humidity'
+            dataIndex: 'humidity',
+            scopedSlots: { customRender: 'humidity' }
           },
           {
             title:'湿度Max',
@@ -218,7 +221,8 @@
           {
             title:'A相电流',
             align:"center",
-            dataIndex: 'currentA'
+            dataIndex: 'currentA',
+            scopedSlots: { customRender: 'currentA' }
           },
           {
             title:'A相电流Max',
@@ -238,7 +242,8 @@
           {
             title:'B相电流',
             align:"center",
-            dataIndex: 'currentB'
+            dataIndex: 'currentB',
+            scopedSlots: { customRender: 'currentB' }
           },
           {
             title:'B相电流Max',
@@ -258,7 +263,8 @@
           {
             title:'C相电流',
             align:"center",
-            dataIndex: 'currentC'
+            dataIndex: 'currentC',
+            scopedSlots: { customRender: 'currentC' }
           },
           {
             title:'C相电流Max',
@@ -309,6 +315,9 @@
       },
     },
     methods: {
+      abc(record){
+        console.log(record)
+      },
       initDictConfig(){
       },
       getSuperFieldList(){

+ 20 - 7
itdmWeb/src/views/module-iTDM/itdmWenxiangVoltage/ItdmWenxiangVoltageList.vue

@@ -45,10 +45,10 @@
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert" style="margin-bottom: 19px;">
-        <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a> -->
-      </div>
+      <!-- <div class="ant-alert" style="margin-bottom: 19px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
 
       <a-table
         ref="table"
@@ -63,6 +63,16 @@
         class="j-table-force-nowrap"
         @change="handleTableChange">
 
+        <div slot="voltageA" slot-scope="text, record">
+          <span :class="record.voltageAAlarm == 1?'y':''">{{text}}</span>
+        </div>
+        <div slot="voltageB" slot-scope="text, record">
+          <span :class="record.voltageBAlarm == 1?'y':''">{{text}}</span>
+        </div>
+        <div slot="voltageC" slot-scope="text, record">
+          <span :class="record.voltageCAlarm == 1?'y':''">{{text}}</span>
+        </div>
+
         <template slot="htmlSlot" slot-scope="text">
           <div v-html="text"></div>
         </template>
@@ -140,7 +150,8 @@
           {
             title:'A线电压',
             align:"center",
-            dataIndex: 'voltageA'
+            dataIndex: 'voltageA',
+            scopedSlots: { customRender: 'voltageA' }
           },
           {
             title:'A线电压Max',
@@ -160,7 +171,8 @@
           {
             title:'B线电压',
             align:"center",
-            dataIndex: 'voltageB'
+            dataIndex: 'voltageB',
+            scopedSlots: { customRender: 'voltageB' }
           },
           {
             title:'B线电压Max',
@@ -180,7 +192,8 @@
           {
             title:'C线电压',
             align:"center",
-            dataIndex: 'voltageC'
+            dataIndex: 'voltageC',
+            scopedSlots: { customRender: 'voltageC' }
           },
           {
             title:'C线电压Max',

+ 10 - 1
itdmWeb/src/views/module-iTDM/moban/ItdmMobanList.vue

@@ -91,6 +91,8 @@
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" />
+          <a @click="wordedit(record)">word编辑</a>
+          <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
             <a-menu slot="overlay">
@@ -110,6 +112,8 @@
     </div>
 
     <itdm-moban-modal ref="modalForm" @ok="modalFormOk"></itdm-moban-modal>
+    <word-edit ref="wordedit" @ok="modalFormOk"></word-edit>
+
   </a-card>
 </template>
 
@@ -121,12 +125,13 @@
   import ItdmMobanModal from './modules/ItdmMobanModal'
   import { filterMultiDictText } from '@comp/dict/JDictSelectUtil'
   import { ajaxGetDictItems } from '@api/api'
+  import wordEdit from './modules/wordEdit'
 
   export default {
     name: 'ItdmMobanList',
     mixins:[JeecgListMixin, mixinDevice],
     components: {
-      ItdmMobanModal
+      ItdmMobanModal,wordEdit
     },
     data () {
       return {
@@ -192,6 +197,10 @@
     },
 
     methods: {
+      wordedit(record){
+        this.$refs.wordedit.edit(record);
+        this.$refs.wordedit.visible=true
+      },
       initDictConfig(){
         ajaxGetDictItems('muban.type').then((res) => {
           if (res.success) {

+ 98 - 0
itdmWeb/src/views/module-iTDM/moban/modules/wordEdit.vue

@@ -0,0 +1,98 @@
+<template>
+
+  <a-modal
+    title="Title"
+    width="80%"
+    :visible="visible"
+    @ok="handleOk"
+  @cancel="handleOk"
+  >
+
+
+  <dev v-show="visible" id="monitorOffice" ></dev>
+
+  </a-modal>
+</template>
+
+<script>
+
+
+  import { getAction } from '@api/manage'
+
+  export default {
+    name: 'wordEdit',
+    created () {
+      //备份model原始值
+      this.config.document.key=""
+      this.config.document.fileType=""
+      this.config.document.url=""
+      this.config.document.title=""
+      this.config.editorConfig.callbackUrl=""
+    },
+    data () {
+      return {
+        docEditor: null,
+        visible: false,
+        queryById: '/moban/itdmMoban/wordById',
+        config: {
+          document: {
+            fileType: "",
+            key: "",
+            title: "",
+            url: "",
+          },
+          documentType: "word",
+          width: "100%",
+          height: "600px",
+          editorConfig: {
+            lang:'zh',
+            callbackUrl: ""
+          }
+        },
+
+      }
+    },
+    methods: {
+      edit (record) {
+        if (this.docEditor) {
+          this.docEditor.destroyEditor()
+        }
+        console.log(record)
+        const select = { id: record.id }
+        getAction(this.queryById, select).then((res) => {
+          if (res.success) {
+
+
+            this.config.document.key=res.result.key
+            this.config.document.fileType=res.result.fileType
+            this.config.document.url=process.env.VUE_APP_API_BASE_URL+"/"+res.result.url
+            this.config.document.title=res.result.title
+            this.config.editorConfig.callbackUrl=process.env.VUE_APP_API_BASE_URL+"/"+"word/save"
+
+            console.log(this.config)
+            this.docEditor = new DocsAPI.DocEditor("monitorOffice", this.config);
+
+
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+
+      },
+      handleOk(){
+        this.visible=false
+        this.config.document.key=""
+        this.config.document.fileType=""
+        this.config.document.url=""
+        this.config.document.title=""
+        this.config.editorConfig.callbackUrl=""
+        if (this.docEditor) {
+          this.docEditor.destroyEditor()
+        }
+        this.$emit("ok");
+
+      }
+
+    }
+  }
+</script>

File diff suppressed because it is too large
+ 955 - 28
itdmWeb/yarn.lock