zhaobao 2 жил өмнө
parent
commit
1eea11dca6
40 өөрчлөгдсөн 2066 нэмэгдсэн , 396 устгасан
  1. 4 0
      README.md
  2. 19 7
      src/api/goaf/dangerApi.js
  3. BIN
      src/assets/images/goaf/default.png
  4. BIN
      src/assets/images/goaf/warn.png
  5. 5 1
      src/components/WorkFlow/index.vue
  6. 2 2
      src/layout/components/Navbar.vue
  7. 19 49
      src/router/modules/aqpt.js
  8. 211 0
      src/views/goaf/alert/activity/Handle.vue
  9. 298 0
      src/views/goaf/alert/activity/Submit.vue
  10. 208 0
      src/views/goaf/alert/components/AlertList.vue
  11. 371 0
      src/views/goaf/alert/components/Details.vue
  12. 174 0
      src/views/goaf/alert/components/LeftCounter.vue
  13. 123 0
      src/views/goaf/alert/index.vue
  14. 6 24
      src/views/goaf/checkTask/manage/CheckTaskList.vue
  15. 2 2
      src/views/goaf/checkTask/manage/LeftCounter.vue
  16. 18 10
      src/views/goaf/checkTask/plan/components/CheckDef.vue
  17. 9 4
      src/views/goaf/checkTask/plan/components/CheckDefList.vue
  18. 3 3
      src/views/goaf/checklist/components/Checklist.vue
  19. 4 4
      src/views/goaf/checklist/components/ChecklistEdit.vue
  20. 23 23
      src/views/goaf/checklist/components/ChecklistItem.vue
  21. 99 0
      src/views/goaf/checklist/components/checkListBind.vue
  22. 26 0
      src/views/goaf/checklist/components/icon/iconfont.css
  23. BIN
      src/views/goaf/checklist/components/icon/iconfont.ttf
  24. 271 0
      src/views/goaf/checklist/config.vue
  25. 26 0
      src/views/goaf/checklist/icon/iconfont.css
  26. BIN
      src/views/goaf/checklist/icon/iconfont.ttf
  27. 4 4
      src/views/goaf/checklist/index.vue
  28. 13 12
      src/views/goaf/danger/activity/Rectify.vue
  29. 11 11
      src/views/goaf/danger/activity/Review.vue
  30. 7 5
      src/views/goaf/danger/activity/Submit.vue
  31. 17 79
      src/views/goaf/danger/components/DangerList.vue
  32. 13 87
      src/views/goaf/danger/components/LeftCounter.vue
  33. 0 2
      src/views/goaf/danger/index.vue
  34. 29 7
      src/views/goaf/info/components/GoafInfo.vue
  35. 9 9
      src/views/goaf/info/components/detail.vue
  36. 17 17
      src/views/goaf/map/components/VisualEditor.vue
  37. 14 25
      src/views/goaf/sensor/Model.vue
  38. 4 2
      src/views/goaf/sensor/index.vue
  39. 5 5
      src/views/goaf/sensorCat/index.vue
  40. 2 2
      src/views/goaf/sensorCat/sensorCat.vue

+ 4 - 0
README.md

@@ -2,3 +2,7 @@
 
 开发文档[曲总本地服务器搭建](http://192.168.3.5:1866)
 大屏设计图地址[作者:黄皖【微信同名】](https://www.figma.com/file/Mdx5rjDsOLZnpEXmZ1MfKA/%E5%9B%9B%E8%89%B2%E9%A3%8E%E9%99%A9%E5%9B%BE?node-id=0-1&t=s4DDH1rHaijXZzjF-0)
+
+### 启动吗命令
+
+#### yarn dev

+ 19 - 7
src/api/goaf/dangerApi.js

@@ -31,18 +31,18 @@ export function getDangerByPage(data) {
  * @param dangerId
  * @returns
  */
-// export function getDangerById(dangerId) {
-//   return request({
-//     url: `/goaf/goafhdanger/${dangerId}`,
-//     method: 'GET'
-//   })
-// }
 export function getDangerById(dangerId) {
   return request({
-    url: `/ent/danger/${dangerId}`,
+    url: `/goaf/goafhdanger/${dangerId}`,
     method: 'GET'
   })
 }
+// export function getDangerById(dangerId) {
+//   return request({
+//     url: `/ent/danger/${dangerId}`,
+//     method: 'GET'
+//   })
+// }
 /**
  * 删除Danger
  * @param dangerId
@@ -67,3 +67,15 @@ export function handleDanger(data) {
     data
   })
 }
+/**
+ * 修改Danger
+ * @param dangerId
+ * @returns
+ */
+export function updateDanger(data) {
+  return request({
+    url: `/goaf/goafhdanger/update`,
+    method: 'PUT',
+    data
+  })
+}

BIN
src/assets/images/goaf/default.png


BIN
src/assets/images/goaf/warn.png


+ 5 - 1
src/components/WorkFlow/index.vue

@@ -12,7 +12,7 @@
         <el-input v-model="formData.actionRemark" type="textarea" :rows="5" placeholder="说明" />
       </el-form-item>
 
-      <el-form-item v-if="handlerVisible" label="执行人" prop="accountIdTo">
+      <el-form-item v-if="handlerVisible" :label="handleUser" prop="accountIdTo">
         <UserSelector :default-val="formData.accountIdTo" @setUserInfo="handleSelectUser" />
       </el-form-item>
 
@@ -37,6 +37,10 @@ export default {
       type: [Function],
       default: undefined
     },
+    handleUser: {
+      type: [String],
+      default: '执行人'
+    },
     cancelAct: {
       type: [Function],
       default: undefined

+ 2 - 2
src/layout/components/Navbar.vue

@@ -86,8 +86,8 @@ export default {
         /** ckq */
         { name: '采空区信息', icon: require('@/assets/images/Navbar/goaf.png'), iconSelectEd: require('@/assets/images/Navbar/goaf_selected.png'), path: '/goaf/info', permit: 'aqpt_workflow', id: 0 },
         { name: '人员巡检', icon: require('@/assets/images/Navbar/check.png'), iconSelectEd: require('@/assets/images/Navbar/check_selected.png'), path: '/goaf/check/plan', permit: 'aqpt_alert_center', id: 5 },
-        { name: '传感器', icon: require('@/assets/images/Navbar/sensor.png'), iconSelectEd: require('@/assets/images/Navbar/sensor_selected.png'), path: '/aqpt/equipment', permit: 'aqpt_equipment', id: 4 },
-        { name: '预警', icon: require('@/assets/images/Navbar/warn.png'), iconSelectEd: require('@/assets/images/Navbar/warn_selected.png'), path: '/alert', permit: 'aqpt_alert_center', id: 1 },
+        { name: '传感器', icon: require('@/assets/images/Navbar/sensor.png'), iconSelectEd: require('@/assets/images/Navbar/sensor_selected.png'), path: '/goaf/equipment', permit: 'aqpt_equipment', id: 4 },
+        { name: '预警', icon: require('@/assets/images/Navbar/warn.png'), iconSelectEd: require('@/assets/images/Navbar/warn_selected.png'), path: '/goaf/alert', permit: 'aqpt_alert_center', id: 1 },
         { name: '文档中心', icon: require('@/assets/images/Navbar/doc.png'), iconSelectEd: require('@/assets/images/Navbar/doc_selected.png'), path: '/aqpt/doc', permit: 'aqpt_doc_center', id: 8 },
         { name: '系统管理', icon: require('@/assets/images/Navbar/sys.png'), iconSelectEd: require('@/assets/images/Navbar/sys_selected.png'), path: '/aqpt/account', permit: 'aqpt_system', id: 9 },
         { name: '数字全景', icon: require('@/assets/images/Navbar/bigscreen.png'), iconSelectEd: require('@/assets/images/Navbar/bigscreen_selected.png'), href: 'http://192.168.3.250:8080/#/', permit: 'aqpt_panorama', id: 10 }

+ 19 - 49
src/router/modules/aqpt.js

@@ -9,34 +9,19 @@ const aqptRouter = [
     // meta: { permit: 'aqpt_panorama' },
     groupId: [0],
     hidden: true
-    // children: [
-    //   {
-    //     path: 'panorama',
-    //     component: () => import('@/views/aqpt/panorama'),
-    //     name: 'aqpt_panorama',
-    //     meta: { title: '数字总览', icon: 'icon-common_digitization', affix: true, permit: 'aqpt_panorama' }
-    //   }
-    // ]
   },
-  /** 不能跟路由1重复出现 */
   {
-    path: '/',
-    component: () => import('@/views/aqpt/visualEditor/index'),
-    name: 'VisualEditor',
-    meta: { title: '作业活动可视化配置', noCache: true, permit: 'jyprj_setting' }
-  },
-  {
-    path: '/alert',
+    path: '/goaf/alert',
     component: Layout,
     name: 'AlertCenter',
-    redirect: '/alert/index',
+    redirect: '/goaf/alert/index',
     meta: { permit: 'aqpt_alert_center' },
     groupId: [1],
     hidden: true,
     children: [
       {
         path: 'index',
-        component: () => import('@/views/aqpt/alert/index'),
+        component: () => import('@/views/goaf/alert/index'),
         name: 'aqpt_alert_center',
         meta: { title: '预警中心', icon: 'icon-common_digitization', affix: true, permit: 'aqpt_alert_center' }
       }
@@ -143,7 +128,18 @@ const aqptRouter = [
         component: () => import('@/views/goaf/checklist'),
         name: 'goaf-checklist-index',
         meta: {
-          title: '检查表',
+          title: '检查表定义',
+          noCache: true,
+          icon: 'el-icon-document',
+          permit: 'aqpt_danger'
+        }
+      },
+      {
+        path: 'config',
+        component: () => import('@/views/goaf/checklist/config.vue'),
+        name: 'goaf-checklist-config',
+        meta: {
+          title: '检查表配置',
           noCache: true,
           icon: 'el-icon-document',
           permit: 'aqpt_danger'
@@ -173,7 +169,7 @@ const aqptRouter = [
         path: 'index',
         component: () => import('@/views/goaf/checkTask/manage/index'),
         name: 'aqpt_check_manage',
-        meta: { title: '任务', noCache: true, permit: 'aqpt_check_task' }
+        meta: { title: '任务列表', noCache: true, permit: 'aqpt_check_task' }
       },
       {
         path: 'record',
@@ -203,30 +199,10 @@ const aqptRouter = [
     ]
   },
   {
-    path: '/aqpt/danger',
-    component: Layout,
-    name: 'GoafDanger',
-    redirect: '/aqpt/danger/index',
-    meta: {
-      title: '隐患管理',
-      permit: 'aqpt_danger'
-    },
-    groupId: [5],
-    children: [
-      {
-        path: 'index',
-        component: () => import('@/views/aqpt/danger/index'),
-        name: 'aqpt_danger_index',
-        meta: { title: '隐患管理', noCache: true, icon: 'icon-common_riskmanagement', permit: 'aqpt_danger' }
-      }
-    ]
-  },
-
-  {
-    path: '/aqpt/equipment',
+    path: '/goaf/equipment',
     component: Layout,
-    name: 'AqptEquipment',
-    redirect: '/aqpt/equipment/sensor',
+    name: 'GoafEquipment',
+    redirect: '/goaf/equipment/sensor',
     meta: {
       title: '设备管理',
       icon: 'icon-common_equipment',
@@ -234,12 +210,6 @@ const aqptRouter = [
     },
     groupId: [4],
     children: [
-      // {
-      //   path: 'index',
-      //   component: () => import('@/views/aqpt/equipment/index'),
-      //   name: 'aqpt_equipment_index',
-      //   meta: { title: '设备管理', noCache: true, permit: 'aqpt_equipment' }
-      // },
       {
         path: 'sensor',
         component: () => import('@/views/goaf/sensor/index'),

+ 211 - 0
src/views/goaf/alert/activity/Handle.vue

@@ -0,0 +1,211 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    :wrapper-closable="false"
+    size="60%"
+    :visible.sync="dialogVisible"
+  >
+    <template slot="title">
+      <div class="el-drawer-title">
+        <span class="name">{{ title }}</span>
+        <el-tabs v-model="tabType">
+          <el-tab-pane label="基本信息" name="form" />
+          <el-tab-pane label="历史记录" name="history" />
+        </el-tabs>
+      </div>
+    </template>
+    <div class="content-container">
+      <el-row class="content-body">
+        <div v-show="tabType==='form'">
+          <VueScroll :ops="ops" style="height: calc(100vh - 400px)">
+            <div class="text-block">
+              <div class="text-title">{{ viewData.alertTitle }}</div>
+              <div class="text-row">
+                <div class="text-item">
+                  <span class="text-label right">说明:</span>
+                  <span>{{ viewData.alertDesc }}</span>
+                </div>
+              </div>
+
+              <div class="text-row">
+                <div class="text-item">
+                  <span class="text-label right">状态:</span>
+                  <span>{{ viewData.status | alertStatusFilter }}</span>
+                </div>
+              </div>
+            </div>
+
+            <el-form ref="ruleForm" :model="formData" :rules="rules" label-width="130px">
+              <el-form-item label="原因分析" prop="alertReason">
+                <el-input v-model="formData.alertReason" type="textarea" :rows="10" placeholder="请填写原因分析" />
+              </el-form-item>
+              <el-form-item label="整改类型" prop="handleAct">
+                <el-select v-model="formData.handleAct" style="width: 100%" filterable placeholder="选择整改类型">
+                  <el-option label="自行整改" :value="1" />
+                  <el-option label="外协整改" :value="2" />
+                </el-select>
+              </el-form-item>
+            </el-form>
+            <work-flow ref="WFlow" />
+          </VueScroll>
+
+          <div class="btn-group">
+            <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
+            <el-button @click="dialogVisible = false">取消</el-button>
+          </div>
+        </div>
+
+        <div v-show="tabType==='history'">
+          <ActivityHandleRecord ref="ActivityHandleRecord" :wf-def-id="viewData.todoId" :wf-ins-id="viewData.todoId" />
+        </div>
+      </el-row>
+    </div>
+
+  </el-drawer>
+</template>
+
+<script>
+import { getAlertById, handleAlert } from '@/api/aqpt/alertApi'
+import { WorkFlow, ActivityHandleRecord } from '@/components'
+import VueScroll from 'vuescroll'
+import { alertStatus } from '@/utils'
+
+export default {
+  name: 'TodoHandleTask',
+  components: { VueScroll, WorkFlow, ActivityHandleRecord },
+  filters: {
+    alertStatusFilter(val) {
+      return alertStatus(val)
+    }
+  },
+  props: {
+    title: {
+      type: [String],
+      default: ''
+    }
+  },
+  data() {
+    return {
+      ops: {
+        bar: {
+          keepShow: false,
+          background: 'rgba(144, 147, 153, 0.4)',
+          onlyShowBarOnScroll: false
+        }
+      },
+      dialogVisible: false,
+      tabType: 'form',
+      viewData: {
+        alertId: undefined,
+        alertIdTitle: '',
+        alertIdDesc: '',
+        alertLevel: 2,
+        alertSource: 1,
+        alertTypeId: 2,
+        status: 0,
+        alertTime: undefined,
+        riskPointId: undefined,
+        riskPointTitle: undefined
+      },
+      formData: {
+        formCode: 'handle',
+        alertId: undefined,
+        alertReason: '',
+        handleAct: 1,
+        handleMeasure: undefined
+      },
+      rules: {}
+    }
+  },
+  methods: {
+
+    // 显示窗口
+    showModel(alertId) {
+      this.resetFormData()
+      this.dialogVisible = true
+      getAlertById(alertId).then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.viewData = data
+          this.$refs.WFlow.get(alertId)
+          this.$refs.ActivityHandleRecord.getData(alertId)
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // 重置
+    resetFormData() {
+      this.formData = {
+        formCode: 'handle',
+        alertId: undefined,
+        alertReason: '',
+        handleAct: 1,
+        handleMeasure: undefined
+      }
+    },
+
+    // 保存
+    submitForm(formName) {
+      this.$nextTick(() => {
+        this.$refs.WFlow.handle({}).then((res) => {
+          if (res === false) {
+            this.$message.error('请检查填写信息')
+            return false
+          }
+          this.handleCommand(res)
+        }).catch((error) => {
+          console.log(error)
+        })
+      })
+    },
+
+    // 处理
+    handleCommand(flow) {
+      console.log(flow)
+      this.formData.todoId = this.viewData.todoId
+      this.formData.handleMeasure = flow.data.actionRemark
+      this.formData.status = flow.status
+      handleAlert(this.formData).then((resp) => {
+        const { code, msg } = resp
+        if (code === 0) {
+          this.dialogVisible = false
+          this.$message.success(msg)
+          this.$emit('formSuccess')
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.content-container {
+  margin: 0 10px;
+  position: relative;
+  height: calc(100% - 15px);
+}
+
+.el-form-item-desc{
+  background: #3A71A8;
+  color: #fff;
+  padding:10px;
+  p{
+    margin: 0;
+    line-height: 1.8;
+  }
+}
+.assess-attachList{
+  overflow: hidden;
+  text-overflow:ellipsis;
+  white-space: nowrap;
+}
+</style>

+ 298 - 0
src/views/goaf/alert/activity/Submit.vue

@@ -0,0 +1,298 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    :wrapper-closable="false"
+    size="30%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <vuescroll :ops="ops" style="height: calc(100vh - 200px)">
+        <el-form ref="ruleForm" :model="formData" :rules="rules" label-width="120px">
+          <el-form-item label="告警位置" prop="riskPointId">
+            <risk-point-selector v-model="formData.riskPointId" />
+          </el-form-item>
+
+          <el-form-item label="告警标题" prop="alertTitle">
+            <el-input v-model="formData.alertTitle" />
+          </el-form-item>
+
+          <el-form-item label="等级" prop="alertLevel">
+            <el-select v-model="formData.alertLevel">
+              <el-option-group>
+                <el-option
+                  v-for="item in alertLevelList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-option-group>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="简要描述" prop="alertDesc">
+            <el-input v-model="formData.alertDesc" type="textarea" :rows="4" placeholder="描述" />
+          </el-form-item>
+
+          <el-form-item label="附件" prop="attachList">
+            <card-upload v-model="formData.attachList" />
+          </el-form-item>
+
+          <el-form-item label="处理人员" prop="accountIdTo">
+            <user-selector :default-val="formData.accountIdTo" @setUserInfo="handleSelectUser" />
+          </el-form-item>
+
+          <el-form-item label="说明" prop="actionRemark">
+            <el-input v-model="formData.actionRemark" type="textarea" :rows="5" placeholder="说明" />
+          </el-form-item>
+        </el-form>
+      </vuescroll>
+
+      <div class="btn-group">
+        <el-button
+          v-for="(item,index) in flowData.activityIns.actionList"
+          :key="index"
+          type="primary"
+          @click="submitForm('ruleForm', item.actionId, item.actionCode)"
+        >{{ item.actionTitle }} </el-button>
+        <el-button class="cancel-btn" @click="dialogVisible = false">取 消</el-button>
+      </div>
+    </div>
+
+  </el-drawer>
+</template>
+
+<script>
+import { startAlert, handleAlert, getAlertById } from '@/api/aqpt/alertApi'
+import { UserSelector, CardUpload } from '@/components'
+import { RiskPointSelector } from '@/views/aqpt/components'
+import Vuescroll from 'vuescroll'
+
+export default {
+  name: 'SubmitTask',
+  components: { Vuescroll, CardUpload, UserSelector, RiskPointSelector },
+  props: {
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      ops: {
+        bar: {
+          keepShow: false,
+          background: 'rgba(144, 147, 153, 0.4)',
+          onlyShowBarOnScroll: false
+        }
+      },
+      dialogVisible: false,
+
+      formData: {
+        alertId: undefined,
+        riskPointId: undefined,
+        alertLevel: 6,
+        alertTitle: '', // 预警标题
+        alertDesc: '', // 描述
+
+        wfDefId: undefined,
+        wfInsId: undefined,
+        activityDefId: undefined,
+        activityInsId: undefined,
+        activityCode: '',
+        actionId: undefined,
+        actionCode: '',
+
+        groupIdTo: undefined,
+        positionIdTo: undefined,
+        accountIdTo: undefined, // 执行人
+
+        actionRemark: '', // 说明
+        attachList: []
+      },
+
+      flowData: {
+        activityIns: {
+          actionList: []
+        }
+      },
+
+      alertLevelList: [
+        { value: 0, label: '未知' },
+        { value: 1, label: '1级' },
+        { value: 2, label: '2级' },
+        { value: 3, label: '3级' },
+        { value: 4, label: '4级' },
+        { value: 5, label: '5级' },
+        { value: 6, label: '6级' }
+      ],
+
+      rules: {
+        riskPointId: [
+          { required: true, message: '请选择风险点', trigger: 'blur' }
+        ],
+        alertTitle: [
+          { required: true, message: '请输入标题', trigger: 'blur' }
+        ],
+        alertLevel: [
+          { required: true, message: '请选择等级', trigger: 'blur' }
+        ],
+        accountIdTo: [
+          { required: true, message: '请选择执行人', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  mounted() {},
+  methods: {
+
+    // 附件
+    attachListChange(dataList) {
+      this.formData.attachList = dataList
+    },
+
+    // Task Start View
+    start() {
+      this.resetFormData()
+      this.dialogVisible = true
+
+      startAlert().then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.flowData = data
+          this.formData.wfDefId = data.wfDefId
+          this.formData.wfInsId = data.wfInsId
+          this.formData.activityDefId = data.activityIns.activityDefId
+          this.formData.activityInsId = data.activityIns.activityInsId
+          this.formData.activityCode = data.activityIns.activityCode
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // Task Handling View
+    handle(alertId) {
+      this.resetFormData()
+      this.dialogVisible = true
+      getAlertById(alertId).then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.formData = data.data
+          const flow = data.flow
+          this.flowData = flow
+          this.formData.wfDefId = flow.wfDefId
+          this.formData.wfInsId = flow.wfInsId
+          this.formData.activityDefId = flow.activityIns.activityDefId
+          this.formData.activityInsId = flow.activityIns.activityInsId
+          this.formData.activityCode = flow.activityIns.activityCode
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // Select User
+    handleSelectUser(item) {
+      this.formData.accountIdTo = item.accountId
+      this.formData.groupIdTo = item.groupId
+      this.formData.positionIdTo = item.positionId
+    },
+
+    // Reset Form Data
+    resetFormData() {
+      this.formData = {
+        alertId: undefined,
+        riskPointId: undefined,
+        alertLevel: 6,
+        alertTitle: '', // 预警标题
+        alertDesc: '', // 描述
+
+        wfDefId: undefined,
+        wfInsId: undefined,
+        activityDefId: undefined,
+        activityInsId: undefined,
+        activityCode: '',
+        actionId: undefined,
+        actionCode: '',
+
+        groupIdTo: undefined,
+        positionIdTo: undefined,
+        accountIdTo: undefined, // 执行人
+
+        actionRemark: '', // 说明
+        attachList: []
+      }
+    },
+
+    // Submit Flow
+    submitForm(formName, actionId, actionCode) {
+      this.formData.actionId = actionId
+      this.formData.actionCode = actionCode
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          handleAlert(this.formData).then((resp) => {
+            const { code, msg } = resp
+            if (code === 0) {
+              this.dialogVisible = false
+              this.formSuccess()
+              this.$message.success(msg)
+            } else {
+              this.$message.error(msg)
+            }
+          }).catch((error) => {
+            console.log(error)
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+
+    formSuccess() {
+      this.$emit('formSuccess')
+    },
+
+    resetForm(formName) {
+      this.$refs[formName].resetFields()
+    }
+
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.content-container {
+  position: relative;
+  height: calc(100% - 15px);
+  .btn-group {
+    width: 100%;
+    text-align: center;
+
+    .el-button {
+      margin: 0 15px;
+    }
+
+    .cancel-btn {
+      background: #004F7B;
+      border-color: #004F7B;
+      color: #FFF;
+
+      &:hover {
+        background: #026197;
+        border-color: #026197;
+      }
+    }
+  }
+
+}
+
+</style>

+ 208 - 0
src/views/goaf/alert/components/AlertList.vue

@@ -0,0 +1,208 @@
+<template>
+  <div class="content-container">
+    <el-row class="tool-bar">
+      <el-col :span="12" class="left">
+        <div class="content-title">
+          预警中心
+        </div>
+      </el-col>
+
+      <el-col :span="12" class="button-group">
+        <div class="select-search right">
+          <el-input v-model="conditions.hdangerTitle" class="search-input" placeholder="请输入内容">
+            <el-button slot="append" icon="el-icon-search" @click="getData()" />
+          </el-input>
+        </div>
+      </el-col>
+    </el-row>
+
+    <el-row class="content-body">
+      <el-table v-loading="listLoading" class="page-table" border :data="dataList" height="calc(100vh - 230px)">
+
+        <el-table-column type="index" label="序号" header-align="center" align="center" width="60" />>
+        <el-table-column prop="hdangerTitle" label="隐患名称" header-align="left" align="left">
+          <template v-slot="{row}">
+            <span>{{ row.hdangerTitle }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="hdangerLevel" label="级别" header-align="center" align="center" width="80">
+          <template v-slot="{row}">
+            <span><el-tag type="success" effect="plain" color="rgb(38 69 90)">{{ row.hdangerLevel | dangerLevelFilter }}</el-tag></span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="status" label="状态" header-align="center" align="center" width="80">
+          <template v-slot="{row}">
+            <span><el-tag type="warning" effect="plain" color="rgb(38 69 90)">{{ row.status | dangerStatusFilter }}</el-tag></span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="curActivityTitle" label="当前关卡" header-align="center" align="center" width="80">
+          <template v-slot="{row}">
+            <span><el-tag type="danger" effect="plain" color="rgb(38 69 90)">{{ row.status===2?'完成': row.curActivityTitle }}</el-tag></span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="curAccountName" label="当前处理人" header-align="center" align="center" width="160">
+          <template v-slot="{row}">
+            <span v-if="row.status===2">--</span>
+            <span v-else><i class="el-icon-user-solid" />{{ row.curAccountName }}( {{ row.curPositionName }} )</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="dangerDeadline" label="整改期限" header-align="center" align="center" width="165">
+          <template v-slot="{row}">
+            <span><i class="el-icon-timer" />{{ row.dangerDeadline }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="操作" header-align="center" align="center" width="180">
+          <template v-slot="{row}">
+            <el-button v-if="row.status !== 0 && row.curAccountId===userData.userId" type="primary" size="mini" @click="handleDanger(row)">处理</el-button>
+            <el-button size="mini" type="info" @click="handleDetail(row)">详情</el-button>
+            <el-button v-if="row.submitAccountId===userData.userId" size="mini" type="danger" @click="handleDelete(row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination-container">
+        <pagination v-show="total>0" :total="total" :page.sync="conditions.page" :limit.sync="conditions.limit" @pagination="getData" />
+      </div>
+    </el-row>
+    <danger-details ref="DangerDetails" title="隐患详情" />
+  </div>
+</template>
+
+<script>
+import Pagination from '@/components/Pagination'
+import { deleteDangerById, getDangerByPage } from '@/api/goaf/dangerApi'
+import DangerDetails from '@/views/goaf/danger/components/Details.vue'
+import { mapGetters } from 'vuex'
+
+export default {
+  name: 'DangerList',
+  components: { Pagination, DangerDetails },
+  filters: {
+    dangerLevelFilter(val) {
+      const status = ['较低', '一般', '较大', '重大']
+      return status[val]
+    },
+    dangerStatusFilter(val) {
+      const status = ['未提交', '处理中', '完成']
+      return val === -1 ? '撤销' : status[val]
+    }
+  },
+  data() {
+    return {
+      dataList: [],
+      total: 0,
+      listLoading: false,
+      conditions: {
+        page: 1,
+        limit: 10
+      }
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'userData'
+    ])
+  },
+  created() {
+    this.getData()
+  },
+  methods: {
+
+    // 重置查询条件
+    resetConditions() {
+      this.conditions.keywords = ''
+      this.conditions.status = undefined
+      this.conditions.submitAccountId = undefined
+      this.conditions.handleAccountId = undefined
+      this.conditions.curAccountId = undefined
+      this.conditions.groupId = undefined
+    },
+
+    // 加载数据
+    loadData(action) {
+      this.conditions = { ...this.conditions, ...action }
+      this.getData()
+    },
+
+    // Fetch Data
+    getData() {
+      this.listLoading = true
+      getDangerByPage(this.conditions).then((resp) => {
+        const { code, data, total, msg } = resp
+        this.listLoading = false
+        if (code === 0) {
+          this.total = total
+          this.dataList = data
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // 流程处理
+    handleDanger(data) {
+      const { hdangerId, curActivityCode } = data
+      this.$refs[curActivityCode].showModel(hdangerId, data)
+    },
+
+    // Delete Handler
+    handleDelete(data) {
+      const { hdangerId, hdangerTitle } = data
+      this.$confirm(`此操作将删除该数据${hdangerTitle}, 是否继续?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        deleteDangerById(hdangerId).then((resp) => {
+          const { code, msg } = resp
+          if (code === 0) {
+            this.$message.success(msg)
+            this.getData()
+          } else {
+            this.$message.error(msg)
+          }
+        }).catch((error) => {
+          console.log(error)
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消删除' })
+      })
+    },
+
+    // Show Details
+    handleDetail(data) {
+      const { hdangerId } = data
+      this.$refs['DangerDetails'].showView(hdangerId, JSON.parse(JSON.stringify(data)))
+    },
+
+    // Update View
+    formSuccess() {
+      this.getData()
+      this.$emit('actionUpdate')
+    },
+
+    // Preview Photo
+    previewList(photos) {
+      if (Array.isArray(photos)) {
+        const list = photos.map((item) => {
+          return item
+        })
+        return list
+      }
+      return [photos]
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.content-container {
+  margin: 10px 10px 10px 0;
+  height: calc(100vh - 95px);
+}
+</style>

+ 371 - 0
src/views/goaf/alert/components/Details.vue

@@ -0,0 +1,371 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    size="70%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <vuescroll :ops="ops" style="height: calc(100vh - 400px)">
+
+        <div class="text-block">
+          <div class="text-title">{{ viewData.alertTitle }}</div>
+
+          <div v-if="viewData.alertDesc" class="text-row">
+            <div class="text-item">
+              <span>{{ viewData.alertDesc }}</span>
+            </div>
+          </div>
+
+          <div class="text-row">
+            <div class="text-item">
+              <span class="text-label right">等级:</span>
+              <span>{{ viewData.alertLevel | alertLevelFilter }}</span>
+            </div>
+            <div class="text-item">
+              <span class="text-label right">状态:</span>
+              <span>{{ viewData.status | alertStatusFilter }}</span>
+            </div>
+          </div>
+
+          <div v-if="viewData.riskPointTitle" class="text-row">
+            <div v-if="viewData.riskPointTitle" class="text-item">
+              <span class="text-label right">发生位置:</span>
+              <span><i class="el-icon-user-solid" /> {{ viewData.riskPointTitle }}</span>
+            </div>
+            <div v-if="viewData.alertTime" class="text-item">
+              <span class="text-label right">发生时间:</span>
+              <span><i class="el-icon-time" /> {{ viewData.alertTime }}</span>
+            </div>
+          </div>
+
+          <div v-if="viewData.handleAccountName" class="text-row">
+            <div v-if="viewData.handleAccountName" class="text-item">
+              <span class="text-label right">处理人员:</span>
+              <span><i class="el-icon-user-solid" /> {{ viewData.handleAccountName }}</span>
+            </div>
+            <div v-if="viewData.handleTime" class="text-item">
+              <span class="text-label right">处理时间:</span>
+              <span><i class="el-icon-time" /> {{ viewData.handleTime }}</span>
+            </div>
+          </div>
+
+          <div v-if="viewData.handleMeasure" class="text-row">
+            <div class="text-item">
+              <span class="text-label right">处理说明:</span>
+              <span>{{ viewData.handleMeasure }} </span>
+            </div>
+          </div>
+        </div>
+
+        <div v-if="viewData.attachList" class="explain">
+          <template>
+            <h4 class="hd-details">附件</h4>
+            <div class="demo-image__placeholder">
+              <div class="block">
+                <el-card :body-style="{ padding: '0px',border:0 }">
+                  <div class="card-box">
+                    <div v-for="(item,index) in viewData.attachList" :key="index">
+                      <el-link :href="item.fileUrl" target="_blank">{{ item.fileTitle }}</el-link>
+                      <p v-if="item.actionCode" class="desc" :class="item.actionCode"><span>{{ formatActionCode(item.actionCode) }}</span></p>
+                    </div>
+                  </div>
+                </el-card>
+              </div>
+            </div>
+          </template>
+        </div>
+
+        <div class="history">
+          <h3 class="hd-details">历史记录  <span style="font-size: 12px; font-weight: normal; color:#A9BDC9;">排序默认按时间由近到远</span></h3>
+          <ActivityHandleRecord ref="ActivityHandleRecord" />
+        </div>
+      </vuescroll>
+      <div class="btn-group">
+        <el-button class="cancel-btn" @click="dialogVisible = false">关闭</el-button>
+      </div>
+      <div v-if="previewVisible" class="custom-dialog" @click="previewVisible=false">
+        <img :src="previewsrc" alt="预览图片" @click.stop="previewVisible=true">
+      </div>
+    </div>
+  </el-drawer>
+</template>
+
+<script>
+
+import { getAlertById } from '@/api/aqpt/alertApi'
+import { mapGetters } from 'vuex'
+import ActivityHandleRecord from '@/components/WorkFlow/ActivityHandleRecord'
+import { alertLevel, alertStatus } from '@/utils'
+import Vuescroll from 'vuescroll'
+
+export default {
+  name: 'AlertDetail',
+  components: { Vuescroll, ActivityHandleRecord },
+  filters: {
+    alertLevelFilter(val) {
+      return alertLevel(val)
+    },
+    alertStatusFilter(val) {
+      return alertStatus(val)
+    }
+  },
+  props: {},
+  data() {
+    return {
+      title: '告警详情',
+      previewVisible: false,
+      previewsrc: '',
+      ops: {
+        bar: {
+          keepShow: false,
+          background: 'rgba(144, 147, 153, 0.4)',
+          onlyShowBarOnScroll: false
+        }
+      },
+      dialogVisible: false,
+      viewData: {
+        alertId: undefined,
+        alertTitle: '',
+        alertLevel: 0,
+        alertDesc: '',
+        status: 1,
+        groupId: undefined, // 所属部门
+        positionId: undefined,
+        accountId: undefined
+      },
+      rules: {},
+      alertLevelList: [
+        { label: '未知', value: 0 },
+        { label: '1级', value: 1 },
+        { label: '2级', value: 2 },
+        { label: '3级', value: 3 },
+        { label: '4级', value: 4 },
+        { label: '5级', value: 5 },
+        { label: '6级', value: 6 }
+      ],
+      actionType: ''
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'userData'
+    ])
+  },
+  mounted() {
+  },
+  methods: {
+
+    // Show View
+    showView(alertId) {
+      this.dialogVisible = true
+      this.getData(alertId)
+    },
+
+    // 预览图片
+    previewPic(targetSrc) {
+      if (!targetSrc) {
+        this.$message({
+          type: 'info',
+          message: '未获取到图片地址!'
+        })
+        return
+      }
+      this.previewVisible = true
+      this.previewsrc = targetSrc
+    },
+
+    // Show View Model
+    getData(alertId) {
+      this.resetFormData()
+      getAlertById(alertId).then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.viewData = data
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // Reset Form Data
+    resetFormData() {
+      this.viewData = {
+        alertId: undefined,
+        alertTitle: '',
+        alertLevel: 0,
+        alertDesc: '',
+        status: 1,
+        groupId: this.userData.groupId, // 所属部门
+        positionId: undefined,
+        accountId: undefined
+      }
+    },
+
+    formSuccess() {
+      this.$emit('formSuccess')
+    }
+  }
+}
+</script>
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.content-container {
+  position: relative;
+  height: calc(100% - 30px);
+
+  &{
+    padding: 10px;
+    font-size: 12px;
+    font-weight: 400;
+    color: #FFFFFF;
+  }
+  .el-timeline {
+    width: 360px;
+    margin: 15px auto 0;
+    padding: 0 0 0 90px;
+  }
+  .record-item {
+    position: relative;
+    top:0;
+    .time {
+      font-size: 12px;
+      font-weight: 400;
+      color: #A9BDC9;
+      position: absolute;
+      margin-top:25px;
+      left: -165px;
+      top: 17px;
+    }
+    .title {
+      margin-top:85px;
+      font-size: 12px;
+      font-weight: 400;
+      color: #A9BDC9;
+      margin:0px;
+    }
+    .desc {
+      font-size: 11px;
+      font-weight: 400;
+      color: #FFFFFF;
+      line-height: 2em;
+      margin: 0;
+    }
+  }
+  .hd-details {
+    color: #FFFFFF;
+  }
+  p {
+    color: #FFFFFF;
+    font-size: 12px;
+    margin: 0;
+    padding: 0;
+    line-height: 1.8;
+    &.desc{
+      font-size: 14px;
+    }
+    &.row{
+      span{
+        width: 33.3%;
+        display: inline-block;
+        text-align: left;
+      }
+    }
+  }
+  .cut-off-line{
+    height: 2px;
+    background: linear-gradient(90deg, #233E4F 0%, #233E4F 100%);
+    margin: 38px auto;
+  }
+  .demo-image__placeholder{
+    display: flex;
+    justify-content: flex-start;
+    flex-wrap: wrap;
+    .block{
+      margin-right: 10px;
+      cursor: pointer;
+      .el-image{
+        display: block;
+      }
+      .el-card{
+        border: 0;
+      }
+      .card-box{
+        position: relative;
+        .desc{
+          width: 100%;
+          height: 24px;
+          line-height: 24px;
+          position: absolute;
+          top: 22px;
+          background-color: rgba(25, 49, 82);
+          color: #fff;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          text-align: center;
+          transform: rotate(45deg);
+          right: -28px;
+          font-size: 14px;
+          letter-spacing: 2px;
+          &.submit{
+            background-color: #1890FF;
+          }
+          &.accept{
+            background-color: #346B98;
+          }
+          &.rectify{
+            background-color: #F97647;
+          }
+        }
+      }
+    }
+  }
+  .history{
+    margin-top: 20px;
+  }
+  .btn-group {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    text-align: center;
+    .el-button {
+      margin: 0 15px;
+    }
+
+    .cancel-btn {
+      background: #004F7B;
+      border-color: #004F7B;
+      color: #FFF;
+
+      &:hover {
+        background: #026197;
+        border-color: #026197;
+      }
+    }
+  }
+
+}
+.custom-dialog{
+  &{
+    position:fixed;
+    left: 0;
+    right:0;
+    top: 0;
+    bottom: 0;
+    background-color:rgba(0,0,0,0.75);
+  }
+  img{
+    display: block;
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%,-50%)
+  }
+}
+
+</style>

+ 174 - 0
src/views/goaf/alert/components/LeftCounter.vue

@@ -0,0 +1,174 @@
+<template>
+  <div class="content-container">
+    <el-row class="list-group">
+      <div>
+        <el-row class="sub-title-bar">
+          <p class="sub-title">按状态</p>
+        </el-row>
+
+        <div :class="curSel === 'status0' ? 'list-item active' : 'list-item'" @click="selectItem('status',0)">
+          <el-col :span="18">
+            <p class="title">未提交</p>
+          </el-col>
+        </div>
+
+        <div :class="curSel === 'status1' ? 'list-item active' : 'list-item'" @click="selectItem('status',1)">
+          <el-col :span="18">
+            <p class="title">处理中</p>
+          </el-col>
+        </div>
+
+        <div :class="curSel === 'status2' ? 'list-item active' : 'list-item'" @click="selectItem('status',2)">
+          <el-col :span="18">
+            <p class="title">完成</p>
+          </el-col>
+        </div>
+        <div :class="curSel === 'status-1' ? 'list-item active' : 'list-item'" @click="selectItem('status',-1)">
+          <el-col :span="18">
+            <p class="title">撤销</p>
+          </el-col>
+        </div>
+      </div>
+
+      <div>
+        <el-row class="sub-title-bar">
+          <p class="sub-title">按等级</p>
+        </el-row>
+        <div :class="curSel === 'hdangerLevel0' ? 'list-item active' : 'list-item'" @click="selectItem('hdangerLevel',0)">
+          <el-col :span="18">
+            <p class="title">较低</p>
+          </el-col>
+        </div>
+        <div :class="curSel === 'hdangerLevel1' ? 'list-item active' : 'list-item'" @click="selectItem('hdangerLevel',1)">
+          <el-col :span="18">
+            <p class="title">一般</p>
+          </el-col>
+        </div>
+
+        <div :class="curSel === 'hdangerLevel2' ? 'list-item active' : 'list-item'" @click="selectItem('hdangerLevel',2)">
+          <el-col :span="18">
+            <p class="title">较大</p>
+          </el-col>
+        </div>
+
+        <div :class="curSel === 'hdangerLevel3' ? 'list-item active' : 'list-item'" @click="selectItem('hdangerLevel',3)">
+          <el-col :span="18">
+            <p class="title">重大</p>
+          </el-col>
+        </div>
+      </div>
+    </el-row>
+  </div>
+</template>
+<script>
+export default {
+  name: 'AlertCounter',
+  components: { },
+  data() {
+    return {
+      title: '预警中心',
+      listLoading: false,
+      curSel: ''
+    }
+  },
+  methods: {
+    // 选中事件
+    selectItem(type, val) {
+      this.curSel = `${type}${val}`
+      this.$emit('selectItem', {
+        type, val
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.content-container {
+  height: calc(100vh - 145px);
+  padding-bottom: 0;
+  margin: 10px 10px 0 0;
+
+  .sub-title-bar {
+    height: 40px;
+    line-height: 40px;
+    text-indent: 15px;
+    background: #113849;
+    margin-bottom: 10px;
+
+    .sub-title {
+      font-size: 16px;
+      color: #FFF;
+      margin: 0;
+    }
+  }
+
+  .btn-group {
+    margin-top: 25px;
+    margin-bottom: 10px;
+    .send-menu {
+      width: 90%;
+      background: #3D5F76;
+      color: #FFF;
+      border-color: #3D5F76;
+
+      &:hover {
+        background: #283c4c;
+        color: #FFF;
+        border-color: #283c4c;
+      }
+    }
+  }
+
+  .list-group {
+    margin-top: 0;
+    padding-top: 0;
+    background: #193142;
+
+    p {
+      margin: 0;
+      padding: 0;
+    }
+
+    .count {
+      text-align: right;
+    }
+
+    .list-item {
+      height: 40px;
+      line-height: 40px;
+      color: #FFF;
+      padding: 0 10px;
+      font-size: 14px;
+
+      &.active {
+        color: #08A6DC;
+        position: relative;
+
+        &::after {
+          position: absolute;
+          content: "";
+          width: 0;
+          height: 0;
+          top: calc(50% - 3.5px);
+          right: -3px;
+          border-left: 7px solid transparent;
+          border-right: 7px solid transparent;
+          border-bottom: 7px solid #08A6DC;
+          transform: rotate(270deg);
+        }
+      }
+    }
+  }
+}
+</style>
+<style lang="scss">
+  .vue-treeselect{
+    .vue-treeselect__control{
+      background-color: inherit;
+      border: 1px solid rgba(255, 255, 255, 0.1);
+      .vue-treeselect__single-value{
+        color: #fff;
+      }
+    }
+  }
+</style>

+ 123 - 0
src/views/goaf/alert/index.vue

@@ -0,0 +1,123 @@
+<template>
+  <div class="page-container">
+    <el-row class="content-body">
+      <el-col :span="4">
+        <left-counter ref="LeftCounter" @selectItem="selectItem" />
+      </el-col>
+      <el-col :span="20">
+        <alert-list ref="AlertList" @actionUpdate="actionUpdate" />
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import LeftCounter from './components/LeftCounter'
+import AlertList from './components/AlertList'
+
+export default {
+  name: 'AlertCenter',
+  components: { LeftCounter, AlertList },
+  data() {
+    return {
+      title: '预警中心',
+      conditions: {
+        status: undefined,
+        hdangerLevel: undefined
+      }
+    }
+  },
+  methods: {
+
+    // 加载数据
+    selectItem({ type, val }) {
+      this.resetConditions()
+      if (type) {
+        this.conditions[type] = val
+      }
+      this.loadData()
+    },
+
+    // 重置查询条件
+    resetConditions() {
+      this.conditions.status = undefined
+      this.conditions.hdangerLevel = undefined
+    },
+
+    // 操作更新
+    actionUpdate() {
+      this.$refs['LeftCounter'].loadData()
+    },
+
+    //
+    loadData() {
+      if (this.conditions.status === undefined) {
+        delete this.conditions.status
+      }
+      if (this.conditions.hdangerLevel === undefined) {
+        delete this.conditions.hdangerLevel
+      }
+      this.$refs['AlertList'].loadData(this.conditions)
+    },
+
+    // 导出
+    handleExport() {
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.page-container {
+  margin: 10px;
+  height: calc(100vh - 145px);
+  p {
+    margin: 0;
+    line-height: 2em;
+    padding: 0;
+  }
+  .tool-bar {
+    .page-title {
+      margin-top: 10px;
+      margin-left: 10px;
+      font-weight: bold;
+      font-size: 18px;
+      color: #fff;
+    }
+  }
+  .tool-bar .button-group {
+    overflow: unset;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    flex-wrap: wrap;
+
+    .select-search{
+      margin-left: 20px;
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+    }
+
+    .search-label {
+      text-align: right;
+      font-size: 12px;
+      font-weight: 400;
+      color: #FFFFFF;
+      line-height: 1;
+      span {
+        font-size: 20px;
+        font-weight: 400;
+        color: #FFFFFF;
+      }
+    }
+  }
+
+  .content-body {
+    padding-top: 0;
+    margin-top: 0;
+  }
+}
+
+</style>

+ 6 - 24
src/views/goaf/checkTask/manage/CheckTaskList.vue

@@ -50,30 +50,12 @@
           </template>
         </el-table-column>
 
-        <el-table-column label="操作" header-align="center" align="center" width="280">
+        <!-- <el-table-column label="操作" header-align="center" align="center" width="280">
           <template v-slot="{row}">
-            <template v-if="row.status===0">
-              <!-- <el-button size="mini" type="text" style="color:#1B81FF" @click="handleViewDetails(row)">详情</el-button> -->
-              <el-button size="mini" type="text" style="color:#1B81FF" @click="handleUpdate(row)">修改</el-button>
-              <el-button size="mini" type="text" style="color:#E44E2D" @click="handleDelete(row)">删除</el-button>
-            </template>
-            <!-- <el-button size="mini" type="info" icon="el-icon-view" @click="handleViewDetails(row)">查看</el-button>
-            <template v-if="row.status===0">
-              <el-button size="mini" type="primary" icon="el-icon-mobile" @click="handleTask(row)">处理</el-button>
-            </template>
-            <template v-if="row.status===0">
-              <el-dropdown @command="(command)=>handlerCommand(command, row)">
-                <el-button size="mini" type="warning" style="background-color: #F97647">
-                  更多<i class="el-icon-arrow-down el-icon--right" />
-                </el-button>
-                <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item command="editTask"><i class="el-icon-edit" />编辑</el-dropdown-item>
-                  <el-dropdown-item command="delTask"><i class="el-icon-delete" />删除</el-dropdown-item>
-                </el-dropdown-menu>
-              </el-dropdown>
-            </template> -->
+            <el-button size="mini" type="text" style="color:#1B81FF" @click="handleUpdate(row)">修改</el-button>
+            <el-button size="mini" type="text" style="color:#E44E2D" @click="handleDelete(row)">删除</el-button>
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
 
       <div class="pagination-wrap">
@@ -107,9 +89,9 @@ export default {
       if (val === 0) {
         return '待处理'
       } else if (val === 1) {
-        return '处理完成'
+        return '处理'
       } else if (val === 2) {
-        return '逾期'
+        return '逾期'
       } else {
         return '--'
       }

+ 2 - 2
src/views/goaf/checkTask/manage/LeftCounter.vue

@@ -4,9 +4,9 @@
       <p class="page-title">巡检任务</p>
     </el-row>
 
-    <el-row class="btn-group">
+    <!-- <el-row class="btn-group">
       <el-button class="send-menu" @click="handleAdd">创建任务</el-button>
-    </el-row>
+    </el-row> -->
 
     <el-row class="list-group">
       <div>

+ 18 - 10
src/views/goaf/checkTask/plan/components/CheckDef.vue

@@ -44,7 +44,7 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="采空区" prop="goafId">
+        <!-- <el-form-item label="采空区" prop="goafId">
           <el-select v-model="formData.goafId" style="width: 100%" filterable placeholder="采空区">
             <el-option
               v-for="item in goafList"
@@ -53,7 +53,7 @@
               :value="item.goafId"
             />
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="检查任务类型" prop="checkTypeId">
           <el-select v-model="formData.checkTypeId" style="width:260px" filterable clearable>
             <el-option :value="0" label="常规任务" />
@@ -76,7 +76,7 @@
             style="width: 100%"
           />
         </el-form-item>
-        <el-form-item label="调度任务" prop="timeSpan">
+        <el-form-item v-if="0" label="调度任务" prop="timeSpan">
           <JobSelector v-model="formData.jobId" :job-class-id="jobClassId" />
         </el-form-item>
         <el-form-item label="检查频率">
@@ -138,7 +138,7 @@ export default {
         'ocId': undefined,
         'goafId': undefined,
         'checkTitle': '',
-        'checkTypeId': undefined,
+        'checkTypeId': 0,
         'groupId': undefined,
         'positionId': undefined,
         'accountId': '',
@@ -148,8 +148,8 @@ export default {
         'checklistId': ' ',
         'defStartDate': '',
         'defEndDate': '',
-        'checkCount': 0,
-        'checkCycleUnit': 0,
+        'checkCount': 1,
+        'checkCycleUnit': 3,
         'jobId': 0,
         'checkDesc': '',
         'status': 0
@@ -218,6 +218,13 @@ export default {
     getGoafBaseInfo().then((res) => {
       this.goafList = res.data
     })
+    getUserByPage({
+      page: 1,
+      limit: 999999
+    }).then((resp) => {
+      const { data } = resp
+      this.userList = data
+    })
   },
   methods: {
     formatGoafName(item, type) {
@@ -250,12 +257,13 @@ export default {
       this.formData.positionName = user.positionName
     },
     // 新增窗口
-    showAddModel() {
+    showAddModel(goafId) {
       this.resetFormData()
       this.title = '新增任务计划'
       this.actionType = ACTION_ADD
       this.dialogVisible = true
       this.formData.groupId = this.userData.groupId
+      this.formData.goafId = goafId
     },
 
     // 编辑窗口
@@ -274,7 +282,7 @@ export default {
         'ocId': undefined,
         'goafId': undefined,
         'checkTitle': '',
-        'checkTypeId': undefined,
+        'checkTypeId': 0,
         'groupId': undefined,
         'positionId': undefined,
         'accountId': '',
@@ -284,8 +292,8 @@ export default {
         'checklistId': '',
         'defStartDate': '',
         'defEndDate': '',
-        'checkCount': 0,
-        'checkCycleUnit': 0,
+        'checkCount': 1,
+        'checkCycleUnit': 3,
         'jobId': 0,
         'checkDesc': '',
         'status': 0

+ 9 - 4
src/views/goaf/checkTask/plan/components/CheckDefList.vue

@@ -58,7 +58,7 @@
         <el-table-column prop="status" label="状态" header-align="center" align="center" width="180">
           <template v-slot="{row}">
             <div>
-              <!-- <el-switch
+              <el-switch
                 v-model="row.status"
                 active-text="执行中"
                 inactive-text="已停止"
@@ -67,8 +67,7 @@
                 :active-value="1"
                 :inactive-value="0"
                 @change="(status)=>handlerChangeStatus(status, row)"
-              /> -->
-              {{ row.status===1?'执行中':"已停止" }}
+              />
             </div>
           </template>
         </el-table-column>
@@ -129,6 +128,8 @@ export default {
     // Get Data From Server
     getData() {
       this.listLoading = true
+      if (this.conditions.checkTitle === '') delete this.conditions.checkTitle
+      if (this.conditions.goafId === '') delete this.conditions.goafId
       getCheckDefByPage(this.conditions).then((resp) => {
         this.listLoading = false
         const { code, data, count } = resp
@@ -141,7 +142,11 @@ export default {
 
     // 添加
     handleAdd() {
-      this.$refs['AddCheckDef'].showAddModel()
+      if (!this.conditions.goafId) {
+        this.$message.error('请选择采空区')
+        return
+      }
+      this.$refs['AddCheckDef'].showAddModel(this.conditions.goafId)
     },
 
     // 编辑

+ 3 - 3
src/views/goaf/checklist/components/Checklist.vue

@@ -14,7 +14,7 @@
             <el-input v-model="formData.checklistTitle" placeholder="输入检查表名称" />
           </el-form-item>
           <el-form-item label="说明" prop="checklistDesc">
-            <el-input v-model="formData.checklistDesccs" type="textarea" rows="10" placeholder="输入说明" />
+            <el-input v-model="formData.checklistDesc" type="textarea" rows="10" placeholder="输入说明" />
           </el-form-item>
         </el-form>
         <div class="btn-group">
@@ -57,7 +57,7 @@ export default {
         'checklistId': undefined,
         'ocId': '',
         'checklistTitle': '',
-        'checklistDesccs': '',
+        'checklistDesc': '',
         'checklistItemId': undefined,
         'checklistItemContent': ''
       },
@@ -105,7 +105,7 @@ export default {
         'checklistId': undefined,
         'ocId': '',
         'checklistTitle': '',
-        'checklistDesccs': '',
+        'checklistDesc': '',
         'checklistItemId': undefined,
         'checklistItemContent': ''
       }

+ 4 - 4
src/views/goaf/checklist/components/ChecklistEdit.vue

@@ -94,6 +94,9 @@ export default {
     }
   },
   methods: {
+    getData() {
+
+    },
     // Show Edit Dialog
     showEditModel(data) {
       this.resetFormData()
@@ -120,11 +123,8 @@ export default {
         'checklistItemContent': ''
       }
     },
-    getData() {
-
-    },
     handleAdd() {
-      this.$refs['checklist-item'].showAddModel()
+      this.$refs['checklist-item'].showAddModel(JSON.parse(JSON.stringify(this.viewData)))
     },
     handleUpdate(data) {
       this.$refs['checklist-item'].showEditModel(JSON.parse(JSON.stringify(data)))

+ 23 - 23
src/views/goaf/checklist/components/ChecklistItem.vue

@@ -7,12 +7,12 @@
   >
     <div>
       <el-form ref="ruleForm" :model="formData" :rules="rules" label-width="100px" label-position="right">
-        <el-form-item label="检查项名称" prop="sensorTypeName">
-          <el-input v-model="formData.sensorTypeName" placeholder="输入检查项名称" />
-        </el-form-item>
-        <el-form-item label="说明">
-          <el-input v-model="formData.sensorCatDesc" type="textarea" rows="5" placeholder="输入说明" />
+        <el-form-item label="检查项名称" prop="checklistItemContent">
+          <el-input v-model="formData.checklistItemContent" placeholder="输入检查项名称" />
         </el-form-item>
+        <!-- <el-form-item label="说明">
+          <el-input v-model="formData.checklistItemContent" type="textarea" rows="5" placeholder="输入说明" />
+        </el-form-item> -->
       </el-form>
     </div>
     <span slot="footer" class="dialog-footer">
@@ -24,7 +24,7 @@
 
 <script>
 import { ACTION_ADD, ACTION_UPDATE } from '@/utils/actionType'
-import { createChecklistItem, updateChecklistItem } from '@/api/goaf/check'
+import { createChecklistItem, updateChecklistItem, updateChecklist } from '@/api/goaf/check'
 import { mapGetters } from 'vuex'
 export default {
   name: 'ChecklistItem',
@@ -34,12 +34,14 @@ export default {
       dialogVisible: false,
       actionType: '',
       formData: {
-        sensorTypeId: undefined,
-        sensorTypeName: '',
-        sensorCatDesc: ''
+        'checklistId': undefined,
+        'ocId': undefined,
+        'checklistTitle': '',
+        'checklistDesc': '',
+        'checklistItemContent': ''
       },
       rules: {
-        sensorTypeName: [
+        checklistItemContent: [
           { required: true, message: '请填写名称', trigger: 'blur' }
         ]
       }
@@ -55,33 +57,31 @@ export default {
       this.$emit('formSuccess')
     },
     // Show Add Model
-    showAddModel() {
+    showAddModel(data) {
       this.actionType = ACTION_ADD
-      this.resetFormData()
       this.title = '新增检查项'
       this.dialogVisible = true
+      this.formData.checklistId = data.checklistId
+      this.formData.ocId = data.ocId
+      this.formData.checklistTitle = data.checklistTitle
     },
     // Show Edit Model
     showEditModel(data) {
       this.actionType = ACTION_UPDATE
-      this.resetFormData()
       this.title = '编辑检查项'
       this.dialogVisible = true
-      this.formData = data
-    },
-    // Reset Form Data
-    resetFormData() {
-      this.formData = {
-        sensorTypeId: undefined,
-        sensorTypeName: '',
-        sensorCatDesc: ''
-      }
+      this.formData.checklistId = data.checklistId
+      this.formData.ocId = data.ocId
+      this.formData.checklistTitle = data.checklistTitle
     },
     // Submit
     submitForm(formName) {
       this.$refs[formName].validate((valid) => {
         if (valid) {
-          this.handleActionCommand()
+          // this.handleActionCommand()
+          updateChecklist(this.formData).then(() => {
+            this.dialogVisible = false
+          })
         } else {
           console.log('error submit!!')
           return false

+ 99 - 0
src/views/goaf/checklist/components/checkListBind.vue

@@ -0,0 +1,99 @@
+<template>
+  <el-dialog
+    title="提示"
+    :visible.sync="dialogVisible"
+    width="30%"
+    :before-close="handleClose"
+  >
+    <el-form ref="ruleForm" :model="formData" :rules="rules" label-position="top" class="goaf-form">
+      <el-form-item label="检查表" prop="goafChecklistId">
+        <el-select v-model="formData.goafChecklistId" style="width: 100%" filterable placeholder="检查表">
+          <el-option
+            v-for="item in checklist"
+            :key="item.checklistId"
+            :label="item.checklistTitle"
+            :value="item.checklistId"
+            @change="changeCheckList(item.checklistTitle)"
+          />
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button type="primary" @click="submitForm">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { getChecklist } from '@/api/goaf/check'
+import { updateGoaf } from '@/api/goaf/info'
+export default {
+  data() {
+    return {
+      dialogVisible: false,
+      checklist: [],
+      rules: {
+        goafChecklistId: [{ required: true, message: '请选择检查表', trigger: 'blur' }]
+      },
+      formData: {
+        'ocId': '',
+        'goafOrebelt': 0,
+        'goafOrebody': 0,
+        'goafOreheight': 0,
+        'goafName': '',
+        'goafAvexArea': 0,
+        'goafAvinWidth': 0,
+        'goafAvexHeight': 0,
+        'goafVoidVolume': 0,
+        'goafKeyTrend': 0,
+        'goafKeyDipangle': 0,
+        'goafRoofpillarThickness': 0,
+        'goafIncoavThickness': 0,
+        'goafExpLocation': '',
+        'goafRockLithology': '',
+        'goafRockStability': '',
+        'goafFormationTime': '',
+        'goafCanfillVolume': 0,
+        'goafRemainVolume': 0,
+        'goafFillMethod': 0,
+        'goafIsFill': 0,
+        'goafInfoRemak': '',
+        'goafChecklistId': '',
+        'goafChecklistTitle': ''
+      }
+    }
+  },
+  created() {
+    this.init()
+  },
+  methods: {
+    init() {
+      getChecklist().then((res) => {
+        this.checklist = res.data
+      })
+    },
+    showEditModel(data) {
+      this.formData = data
+    },
+    submitForm() {
+      this.$refs['ruleForm'].validate((valid) => {
+        if (valid) {
+          updateGoaf(this.formData).then((resp) => {
+            const { msg } = resp
+            this.dialogVisible = false
+            this.$message.success(msg)
+            this.formSuccess()
+          })
+        } else {
+          this.$message.error('error submit!!')
+          return false
+        }
+      })
+    },
+    changeCheckList(checklistTitle) {
+      this.formData.goafChecklistTitle = checklistTitle
+    }
+  }
+}
+</script>

+ 26 - 0
src/views/goaf/checklist/components/icon/iconfont.css

@@ -0,0 +1,26 @@
+@font-face {
+  font-family: "iconfont"; /* Project id  */
+  src: url('iconfont.ttf?t=1632901626051') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  color: #3D5F76;
+}
+
+.icon-erweima:before {
+  content: "\e605";
+}
+
+.icon-weizhi:before {
+  content: "\e8ff";
+}
+
+.icon-gonggaopai:before {
+  content: "\e61f";
+}
+

BIN
src/views/goaf/checklist/components/icon/iconfont.ttf


+ 271 - 0
src/views/goaf/checklist/config.vue

@@ -0,0 +1,271 @@
+<template>
+  <div class="content-container goaf">
+    <el-row class="tool-bar">
+      <el-col :span="12" class="left">
+        <div class="content-title">
+          采空区
+        </div>
+      </el-col>
+      <el-col :span="12" class="right">
+        <el-input v-model="conditions.goafName" class="search-input m-right-15" placeholder="请输入采空区名称">
+          <el-button slot="append" icon="el-icon-search" @click="getData()" />
+        </el-input>
+        <!-- <el-button type="primary" @click="batchDown">批量下载二维码</el-button> -->
+      </el-col>
+    </el-row>
+
+    <el-row class="m-top-15">
+      <el-table v-loading="listLoading" class="page-table" border fit :data="dataList">
+        <el-table-column type="index" label="序号" header-align="center" align="center" width="60" />
+        <el-table-column prop="goafOrebelt" label="矿带">
+          <template v-slot="{row}">
+            <span>{{ convertNum(row.goafOrebelt) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="goafOrebody" label="矿体" />
+        <el-table-column prop="goafOreheight" label="中段" />
+        <el-table-column prop="goafName" label="采空区名称" />
+        <el-table-column prop="positionName" label="检查表" header-align="center" align="center" width="70">
+          <template v-slot="{row}">
+            <!-- <span v-if="!isNull(row.goafChecklistId)" class="icon iconfont icon-erweima" style="color:#fff" @click="showQrcode(row)" /> -->
+            <span v-if="!isNull(row.goafChecklistId)">{{ row.goafChecklistTitle }}</span>
+            <span v-else>未绑定</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="goafInfoRemak" label="备注" align="right">
+          <template v-slot="{row}">
+            <span>{{ row.goafInfoRemak||'--' }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" header-align="center" align="center" width="180">
+          <template v-slot="{row}">
+            <el-button size="mini" type="text" style="color:#1B81FF" @click="showDetail(row)">详情</el-button>
+            <el-button v-if="isNull(row.goafChecklistId)" size="mini" type="text" style="color:#1B81FF" @click="handleUpdate(row)">绑定</el-button>
+            <el-button v-if="!isNull(row.goafChecklistId)" size="mini" type="text" style="color:#E44E2D" @click="handleDelete(row)">解绑</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="pagination-container" style="float:right;margin-right:40px;">
+        <pagination v-show="total>0" :total="total" :page.sync="conditions.page" :limit.sync="conditions.limit" @pagination="getData" />
+      </div>
+    </el-row>
+    <check-list-bind ref="bind" @formSuccess="getData" />
+    <detail ref="detail" />
+    <QrCode ref="qrcode" />
+    <div id="qrcode" ref="qrcodeModal" style="position:fixed;top:-9999px;" />
+  </div>
+</template>
+
+<script>
+import html2canvas from 'html2canvas'
+import JSZip from 'jszip'
+import saveAs from 'file-saver'
+import QRCode from 'qrcodejs2'
+import { getGoafBaseInfoByPage, updateGoaf } from '@/api/goaf/info'
+import { Pagination } from '@/components'
+import { NumConvertLM } from '@/utils'
+import { QrCode } from '@/components'
+import checkListBind from '@/views/goaf/info/components/Goaf'
+// import checkListBind from './components/checkListBind.vue'
+import Detail from '@/views/goaf/info/components/detail'
+var zip = new JSZip()
+export default {
+  components: { Pagination, QrCode, checkListBind, Detail },
+  data() {
+    return {
+      dataList: [],
+      total: 0,
+      listLoading: false,
+      conditions: {
+        page: 1,
+        limit: 10,
+        goafName: ''
+      }
+    }
+  },
+  created() {
+    this.getData()
+  },
+  methods: {
+    convertNum(num) {
+      return num ? NumConvertLM(num) : '--'
+    },
+    getData() {
+      this.listLoading = true
+      getGoafBaseInfoByPage(this.conditions).then((resp) => {
+        this.listLoading = false
+        const { code, msg, data, total } = resp
+        if (code === 0) {
+          this.dataList = data
+          this.total = total
+        } else {
+          this.$message.error(msg)
+        }
+      })
+    },
+    isNull(val) {
+      if (val !== undefined && val !== 'undefined' && val !== null && val !== '' && val !== ' ') {
+        return false
+      }
+      return true
+    },
+    showQrcode(row) {
+      this.$refs.qrcode.draw(row.goafChecklistId)
+    },
+    batchDown() { /* 点击按钮获取制作二维码素材*/
+      const content = JSON.parse(JSON.stringify(this.dataList))
+      this.downloadMaterial(content)
+    },
+
+    downloadMaterial(content) { // 下载物料
+      this.batch(content, '检查表')
+    },
+
+    async batch(arr, fileName) {
+      const self = this
+      window.loading = this.$loading({
+        lock: true,
+        text: '制作二维码中!',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+
+      zip = new JSZip()
+      for (let i = 0; i < arr.length; i++) {
+        const item = arr[i]
+        await self.drawQrcode(item.type, item.goafChecklistId).catch(() => {
+          window.loading.close()
+          this.$message.error('导出失败')
+        })
+        await self.packMaterial(`${item.goafOrebelt}-${item.goafOrebody}-${item.goafOreheight}-${new Date().getTime()}`).catch(() => {
+          window.loading.close()
+          this.$message.error('导出失败')
+        })
+      }
+      zip.generateAsync({
+        type: 'blob'
+      }).then((blob) => {
+        saveAs(blob, fileName + '二维码物料.zip')
+        window.loading.close()
+      })
+    },
+    drawQrcode(url, sleep) { // 绘制二维码
+      this.$refs.qrcodeModal.innerHTML = ''
+      return new Promise((resolve) => {
+        new QRCode('qrcode', {
+          width: 400,
+          height: 400,
+          text: url.toString()
+        })
+        setTimeout(function() {
+          resolve()
+        }, sleep || 300)
+      })
+    },
+
+    packMaterial(name) { // 打包处理
+      if (!name) name = 'xxx'
+      return new Promise((resolve, reject) => {
+        html2canvas(document.getElementById('qrcode'), {
+          backgroundColor: null,
+          useCORS: true,
+          dpi: 500,
+          scale: 5
+        }).then((canvas) => {
+          let dataURL = canvas.toDataURL('photo/png')
+          dataURL = dataURL.replace(/^data:image\/(png|jpg);base64,/, '')
+          zip.file(name + '.jpg', dataURL, { base64: true })
+          resolve()
+        }).catch((e) => {
+          reject(e)
+        })
+      })
+    },
+    showDetail(data) {
+      this.$refs['detail'].showDetailModel(JSON.parse(JSON.stringify(data)))
+    },
+    // "Edit Risk" Model
+    handleUpdate(data) {
+      this.$refs['bind'].showEditModel(JSON.parse(JSON.stringify(data)))
+    },
+    // Delete Action
+    handleDelete(data) {
+      const { goafName } = data
+      const formData = JSON.parse(JSON.stringify(data))
+      formData.goafChecklistId = ''
+      formData.goafChecklistTitle = ''
+      this.$confirm(`此操作将解绑该数据${goafName}, 是否继续?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        updateGoaf(formData).then((resp) => {
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
+        })
+      }).catch(() => {
+        this.$message.info('已取消删除')
+      })
+    }
+  }
+}
+</script>
+  <style lang="scss" scoped>
+      @import "icon/iconfont.css";
+      .content-container {
+          background: #193142FF;
+          margin: 10px 10px 10px 0;
+          padding: 15px;
+          height: calc(100vh - 90px);
+          box-sizing: border-box;
+          .content-title {
+              font-size: 18px;
+              font-weight: bold;
+              color: #FFFFFF;
+
+              font-weight: bold;
+              background: linear-gradient(0deg, #FFFFFF 0%, #98A8B7 100%);
+              background-clip: text;
+              -webkit-background-clip: text;
+              -webkit-text-fill-color: transparent;
+          }
+
+          .tool-bar {
+
+              .left {
+                  float: left;
+              }
+
+              .right {
+                  float: right;
+                  text-align: right;
+              }
+
+              .title {
+                  line-height: 36px;
+                  font-size: 26px;
+              }
+
+              .search-input {
+                  width: 300px;
+              }
+          }
+
+          .el-dropdown {
+              margin: 0 10px;
+          }
+      }
+  </style>
+  <style lang="scss">
+  .goaf .el-table__body tr.hover-row>td {
+    background-color: #306379;
+  }
+  .goaf{
+        .page-table{
+          height: calc(100vh - 260px);
+          overflow-y: auto;
+        }
+      }
+  </style>
+

+ 26 - 0
src/views/goaf/checklist/icon/iconfont.css

@@ -0,0 +1,26 @@
+@font-face {
+  font-family: "iconfont"; /* Project id  */
+  src: url('iconfont.ttf?t=1632901626051') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  color: #3D5F76;
+}
+
+.icon-erweima:before {
+  content: "\e605";
+}
+
+.icon-weizhi:before {
+  content: "\e8ff";
+}
+
+.icon-gonggaopai:before {
+  content: "\e61f";
+}
+

BIN
src/views/goaf/checklist/icon/iconfont.ttf


+ 4 - 4
src/views/goaf/checklist/index.vue

@@ -9,7 +9,7 @@
 
       <el-col :span="12" class="right">
         <el-input v-model="conditions.keywords" class="search-input m-right-15" placeholder="请输入内容">
-          <el-button slot="append" icon="el-icon-search" @click="getData()" />
+          <el-button slot="append" icon="el-icon-search" @click="getData" />
         </el-input>
         <el-button type="primary" @click="handleAdd">添加</el-button>
       </el-col>
@@ -51,7 +51,7 @@
 import Checklist from './components/Checklist'
 import ChecklistEdit from './components/ChecklistEdit'
 
-import { deleteChecklistById, getChecklistByPage } from '@/api/goaf/check'
+import { deleteChecklistById, getChecklistByPage, getChecklistById } from '@/api/goaf/check'
 import { Pagination } from '@/components'
 
 export default {
@@ -90,14 +90,14 @@ export default {
         }
       })
     },
-    formSuccess(data) {
+    formSuccess() {
       this.getData()
-      this.handleDetails(data)
     },
     handleAdd() {
       this.$refs['checklist'].showAddModel()
     },
     handleUpdate(data) {
+      getChecklistById(data.checklistId)
       this.$refs['checklist-edit'].showEditModel(JSON.parse(JSON.stringify(data)))
     },
     handleDelete(data) {

+ 13 - 12
src/views/goaf/danger/activity/Rectify.vue

@@ -23,21 +23,21 @@
           <Vuescroll :ops="ops" style="height: calc(100vh - 300px)">
             <DangerInfo :view-data="viewData" class="form" />
             <el-form ref="ruleForm" :model="formData" :rules="rules" label-width="130px">
-              <el-form-item label="原因分析" prop="dangerReason">
-                <el-input v-model="formData.dangerReason" type="textarea" :rows="10" placeholder="请填写原因分析" />
+              <el-form-item label="隐患描述" prop="s">
+                <el-input v-model="formData.hdangerDesc" type="textarea" :rows="10" placeholder="隐患描述" />
               </el-form-item>
-              <el-form-item label="整改类型" prop="rectifyCat">
+              <!-- <el-form-item label="整改类型" prop="rectifyCat">
                 <el-select v-model="formData.rectifyCat" style="width: 100%" filterable placeholder="选择整改类型">
                   <el-option label="自行整改" :value="1" />
                   <el-option label="外协整改" :value="2" />
                 </el-select>
-              </el-form-item>
+              </el-form-item> -->
 
               <el-form-item label="整改措施" prop="rectifyMeasure">
                 <el-input v-model="formData.rectifyMeasure" type="textarea" :rows="10" placeholder="请填写整改措施" />
               </el-form-item>
             </el-form>
-            <work-flow ref="WFlow" />
+            <work-flow ref="WFlow" handle-user="验收人" />
           </Vuescroll>
           <div class="btn-group">
             <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
@@ -46,7 +46,7 @@
         </div>
 
         <div v-show="tabType==='history'">
-          <ActivityHandleRecord ref="ActivityHandleRecord" :wf-ins-id="viewData.dangerId" />
+          <ActivityHandleRecord ref="ActivityHandleRecord" />
         </div>
       </el-row>
     </div>
@@ -54,7 +54,7 @@
 </template>
 
 <script>
-import { getDangerById, handleDanger } from '@/api/goaf/dangerApi'
+import { getDangerById, updateDanger } from '@/api/goaf/dangerApi'
 import Vuescroll from 'vuescroll'
 import { WorkFlow, ActivityHandleRecord } from '@/components'
 import DangerInfo from '../components/DangerInfo'
@@ -119,7 +119,7 @@ export default {
         rectifyAccountId: undefined,
         rectifyAccountName: '',
 
-        dangerReason: '',
+        hdangerDesc: '',
         rectifyCat: 1,
         rectifyMeasure: '',
         rectifyRemark: '',
@@ -142,7 +142,7 @@ export default {
         attachList: []
       },
       rules: {
-        dangerReason: [
+        hdangerDesc: [
           { required: true, message: '请输入隐患发生原因', trigger: 'blur' }
         ],
         rectifyMeasure: [
@@ -184,7 +184,7 @@ export default {
       this.formData = {
         formCode: 'rectify',
         dangerId: undefined,
-        dangerReason: '',
+        hdangerDesc: '',
         rectifyCat: 1,
         rectifyMeasure: '',
         rectifyRemark: '',
@@ -210,11 +210,12 @@ export default {
 
     // 处理
     handleCommand(flow) {
-      this.formData.dangerId = this.viewData.dangerId
+      this.formData.hdangerId = this.viewData.hdangerId
       this.formData.status = flow.status
       this.formData.rectifyRemark = flow.data.actionRemark
       this.formData.attachList = flow.data.attachList
-      handleDanger(this.formData).then((resp) => {
+      debugger
+      updateDanger(this.formData).then((resp) => {
         const { code, msg } = resp
         if (code === 0) {
           this.dialogVisible = false

+ 11 - 11
src/views/goaf/danger/activity/Review.vue

@@ -21,7 +21,7 @@
         <div v-show="tabType==='form'">
           <Vuescroll :ops="ops" style="height: calc(100vh - 400px)">
             <DangerInfo :view-data="viewData" class="form" />
-            <work-flow ref="WFlow" />
+            <work-flow ref="WFlow" handle-user="整改人" />
           </Vuescroll>
 
           <div class="btn-group">
@@ -39,7 +39,7 @@
 </template>
 
 <script>
-import { handleDanger, getDangerById } from '@/api/goaf/dangerApi'
+import { updateDanger, getDangerById } from '@/api/goaf/dangerApi'
 import Vuescroll from 'vuescroll'
 import { WorkFlow, ActivityHandleRecord } from '@/components'
 import DangerInfo from '../components/DangerInfo'
@@ -68,7 +68,7 @@ export default {
       tabType: 'form',
       rules: { },
       viewData: {
-        dangerId: undefined,
+        hdangerId: undefined,
         dangerCode: '',
         dangerTitle: '',
         dangerSource: undefined,
@@ -121,7 +121,7 @@ export default {
       },
       formData: {
         formCode: 'review',
-        dangerId: undefined,
+        hdangerId: undefined,
         status: 0,
         attachList: []
       }
@@ -142,15 +142,15 @@ export default {
     },
 
     // 显示窗口
-    showModel(dangerId, info) {
+    showModel(hdangerId, info) {
       this.resetFormData()
       this.dialogVisible = true
-      getDangerById(dangerId).then((resp) => {
+      getDangerById(hdangerId).then((resp) => {
         const { code, data, msg } = resp
         if (code === 0) {
           this.viewData = info || data
-          this.$refs.WFlow.get(dangerId)
-          this.$refs.ActivityHandleRecord.getData(dangerId)
+          this.$refs.WFlow.get(hdangerId)
+          this.$refs.ActivityHandleRecord.getData(hdangerId)
         } else {
           this.$message.error(msg)
         }
@@ -163,7 +163,7 @@ export default {
     resetFormData() {
       this.formData = {
         formCode: 'review',
-        dangerId: undefined,
+        hdangerId: undefined,
         status: 0,
         attachList: []
       }
@@ -186,11 +186,11 @@ export default {
 
     // 处理
     handleCommand(flow) {
-      this.formData.dangerId = this.viewData.dangerId
+      this.formData.hdangerId = this.viewData.hdangerId
       this.formData.status = flow.status
       this.formData.reviewRemark = flow.data.actionRemark
       this.formData.attachList = flow.data.attachList
-      handleDanger(this.formData).then((resp) => {
+      updateDanger(this.formData).then((resp) => {
         const { code, msg } = resp
         if (code === 0) {
           this.dialogVisible = false

+ 7 - 5
src/views/goaf/danger/activity/Submit.vue

@@ -38,8 +38,10 @@
               </el-form-item>
               <el-form-item label="隐患等级" prop="hdangerLevel">
                 <el-radio-group v-model="formData.hdangerLevel">
-                  <el-radio :label="1">一般事故隐患</el-radio>
-                  <el-radio :label="2">重大事故隐患</el-radio>
+                  <el-radio :label="0">较低</el-radio>
+                  <el-radio :label="1">一般</el-radio>
+                  <el-radio :label="2">较大</el-radio>
+                  <el-radio :label="3">重大</el-radio>
                 </el-radio-group>
               </el-form-item>
               <el-form-item label="发生时间" prop="submitTime">
@@ -68,7 +70,7 @@
                 <el-input v-model="formData.hdangerDesc" type="textarea" :rows="5" placeholder="隐患描述" />
               </el-form-item>
             </el-form>
-            <work-flow ref="WFlow" />
+            <work-flow ref="WFlow" handle-user="评审人" />
             <div class="btn-group">
               <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
               <el-button @click="dialogVisible = false">取消</el-button>
@@ -118,7 +120,7 @@ export default {
         'dangerCatId': undefined, // 隐患类别ID
         'hdangerLevel': 1, // 隐患等级
         'hdangerDesc': '', // 描述
-        'submitTime': '',
+        'submitTime': new Date(),
         'dangerDeadline': '', // 截止时间
         'goafId': undefined,
         'submitGroupId': '',
@@ -213,7 +215,7 @@ export default {
         'dangerCatId': undefined, // 隐患类别ID
         'hdangerLevel': 1, // 隐患等级
         'hdangerDesc': '', // 描述
-        'submitTime': '',
+        'submitTime': new Date(),
         'dangerDeadline': '', // 截止时间
         'goafId': undefined,
         'submitGroupId': '',

+ 17 - 79
src/views/goaf/danger/components/DangerList.vue

@@ -9,7 +9,7 @@
 
       <el-col :span="12" class="button-group">
         <div class="select-search right">
-          <el-input v-model="conditions.keywords" class="search-input" placeholder="请输入内容">
+          <el-input v-model="conditions.hdangerTitle" class="search-input" placeholder="请输入内容">
             <el-button slot="append" icon="el-icon-search" @click="getData()" />
           </el-input>
         </div>
@@ -37,9 +37,14 @@
             <span><el-tag type="warning" effect="plain" color="rgb(38 69 90)">{{ row.status | dangerStatusFilter }}</el-tag></span>
           </template>
         </el-table-column>
+        <el-table-column prop="curActivityTitle" label="当前关卡" header-align="center" align="center" width="80">
+          <template v-slot="{row}">
+            <span><el-tag type="danger" effect="plain" color="rgb(38 69 90)">{{ row.status===2?'完成': row.curActivityTitle }}</el-tag></span>
+          </template>
+        </el-table-column>
         <el-table-column prop="curAccountName" label="当前处理人" header-align="center" align="center" width="160">
           <template v-slot="{row}">
-            <span v-if="row.status!==0">-</span>
+            <span v-if="row.status===2">--</span>
             <span v-else><i class="el-icon-user-solid" />{{ row.curAccountName }}( {{ row.curPositionName }} )</span>
           </template>
         </el-table-column>
@@ -52,7 +57,7 @@
 
         <el-table-column label="操作" header-align="center" align="center" width="180">
           <template v-slot="{row}">
-            <el-button v-if="row.status === 0 && row.curAccountId===userData.userId" type="primary" size="mini" @click="handleDanger(row)">处理</el-button>
+            <el-button v-if="row.status !== 0 && row.curAccountId===userData.userId" type="primary" size="mini" @click="handleDanger(row)">处理</el-button>
             <el-button size="mini" type="info" @click="handleDetail(row)">详情</el-button>
             <el-button v-if="row.submitAccountId===userData.userId" size="mini" type="danger" @click="handleDelete(row)">删除</el-button>
           </template>
@@ -79,7 +84,6 @@ import ReviewActivity from '../activity/Review'
 import RectifyActivity from '../activity/Rectify'
 import AcceptActivity from '../activity/Accept'
 import DangerDetails from './Details'
-import { dangerLevel, dangerStatus } from '@/utils'
 import { mapGetters } from 'vuex'
 
 export default {
@@ -87,10 +91,12 @@ export default {
   components: { Pagination, SubmitActivity, ReviewActivity, RectifyActivity, AcceptActivity, DangerDetails },
   filters: {
     dangerLevelFilter(val) {
-      return dangerLevel(val)
+      const status = ['较低', '一般', '较大', '重大']
+      return status[val]
     },
     dangerStatusFilter(val) {
-      return dangerStatus(val)
+      const status = ['未提交', '处理中', '完成']
+      return val === -1 ? '撤销' : status[val]
     },
     dangerDeadlineFilter(val) {
 
@@ -98,22 +104,16 @@ export default {
   },
   data() {
     return {
-      title: '',
+      title: '隐患',
       dataList: [],
       total: 0,
       listLoading: false,
       conditions: {
         page: 1,
         limit: 10,
-        keywords: '',
         status: undefined,
         day: undefined,
-        submitAccountId: undefined,
-        handleAccountId: undefined,
-        curAccountId: undefined,
-        startDate: undefined,
-        endDate: undefined,
-        groupId: undefined
+        hdangerTitle: undefined
       },
       action: ''
     }
@@ -123,8 +123,8 @@ export default {
       'userData'
     ])
   },
-  mounted() {
-    // this.getData()
+  created() {
+    this.getData()
   },
   methods: {
 
@@ -140,69 +140,7 @@ export default {
 
     // 加载数据
     loadData(action) {
-      this.action = action
-      const groupId = this.userData.groupId
-      const userId = this.userData.userId
-
-      switch (action) {
-        case 'MyCreated':
-          this.title = '我提交的隐患'
-          this.resetConditions()
-          this.conditions.submitAccountId = userId
-          break
-
-        case 'MyHandling':
-          this.title = '我的待处理隐患'
-          this.resetConditions()
-          this.conditions.status = 0
-          this.conditions.curAccountId = userId
-          break
-
-        case 'MyHandled':
-          this.title = '我处理完的隐患'
-          this.resetConditions()
-          this.conditions.handleAccountId = userId
-          break
-
-        case 'MyCanceled':
-          this.title = '我撤消的隐患'
-          this.resetConditions()
-          this.conditions.submitAccountId = userId
-          this.conditions.status = -1
-          break
-
-        case 'GroupHandling':
-          this.title = '部门待处理的隐患'
-          this.resetConditions()
-          this.conditions.curGroupId = groupId
-          this.conditions.status = 0
-          break
-
-        case 'GroupSubmit':
-          this.title = '部门提交的隐患'
-          this.resetConditions()
-          this.conditions.submitGroupId = groupId
-          break
-
-        case 'GroupReview':
-          this.title = '部门参与评审的隐患'
-          this.resetConditions()
-          this.conditions.reviewGroupId = groupId
-          break
-
-        case 'GroupRectify':
-          this.title = '部门整改的隐患'
-          this.resetConditions()
-          this.conditions.rectifyGroupId = groupId
-          break
-
-        case 'GroupAccept':
-          this.title = '部门参与验收的隐患'
-          this.resetConditions()
-          this.conditions.acceptGroupId = groupId
-          break
-      }
-
+      this.conditions.status = action
       this.getData()
     },
 

+ 13 - 87
src/views/goaf/danger/components/LeftCounter.vue

@@ -8,104 +8,30 @@
       <el-button class="send-menu" @click="handleSubmitTask">登记隐患</el-button>
     </el-row>
 
-    <el-row class="list-group">
+    <!-- <el-row class="list-group">
       <div>
-        <div :class="curSel === 'MyCreated' ? 'list-item active' : 'list-item'" @click="selectItem('MyCreated')">
+        <div :class="curSel === 1 ? 'list-item active' : 'list-item'" @click="selectItem(1)">
           <el-col :span="18">
-            <p class="title">我提交的</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.myCreatedCount }}</p>
+            <p class="title">处理中</p>
           </el-col>
         </div>
-
-        <div :class="curSel === 'MyCanceled' ? 'list-item active' : 'list-item'" @click="selectItem('MyCanceled')">
+        <div :class="curSel === 2 ? 'list-item active' : 'list-item'" @click="selectItem(2)">
           <el-col :span="18">
-            <p class="title">我撤消的</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.myCanceledCount }}</p>
+            <p class="title">完成</p>
           </el-col>
         </div>
-      </div>
-
-      <div>
-        <el-row class="sub-title-bar">
-          <p class="sub-title">我参与的</p>
-        </el-row>
-
-        <div :class="curSel === 'MyHandling' ? 'list-item active' : 'list-item'" @click="selectItem('MyHandling')">
+        <div :class="curSel === -1 ? 'list-item active' : 'list-item'" @click="selectItem(-1)">
           <el-col :span="18">
-            <p class="title">待处理</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.myHandlingCount }}</p>
+            <p class="title">撤销</p>
           </el-col>
         </div>
-
-        <div :class="curSel === 'MyHandled' ? 'list-item active' : 'list-item'" @click="selectItem('MyHandled')">
+        <div :class="curSel === 0 ? 'list-item active' : 'list-item'" @click="selectItem(0)">
           <el-col :span="18">
-            <p class="title">已处理</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.myHandledCount }}</p>
+            <p class="title">未提交</p>
           </el-col>
         </div>
-
       </div>
-
-      <div>
-        <el-row class="sub-title-bar">
-          <p class="sub-title">部门的</p>
-        </el-row>
-
-        <div :class="curSel === 'GroupHandling' ? 'list-item active' : 'list-item'" @click="selectItem('GroupHandling')">
-          <el-col :span="18">
-            <p class="title">待处理</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.groupHandlingCount }}</p>
-          </el-col>
-        </div>
-
-        <div :class="curSel === 'GroupSubmit' ? 'list-item active' : 'list-item'" @click="selectItem('GroupSubmit')">
-          <el-col :span="18">
-            <p class="title">提交</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.groupSubmitCount }}</p>
-          </el-col>
-        </div>
-
-        <div :class="curSel === 'GroupReview' ? 'list-item active' : 'list-item'" @click="selectItem('GroupReview')">
-          <el-col :span="18">
-            <p class="title">评审</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.groupReviewCount }}</p>
-          </el-col>
-        </div>
-
-        <div :class="curSel === 'GroupRectify' ? 'list-item active' : 'list-item'" @click="selectItem('GroupRectify')">
-          <el-col :span="18">
-            <p class="title">整改</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.groupRectifyCount }}</p>
-          </el-col>
-        </div>
-
-        <div :class="curSel === 'GroupAccept' ? 'list-item active' : 'list-item'" @click="selectItem('GroupAccept')">
-          <el-col :span="18">
-            <p class="title">验收</p>
-          </el-col>
-          <el-col :span="6">
-            <p class="count">{{ dangerCounter.groupAcceptCount }}</p>
-          </el-col>
-        </div>
-
-      </div>
-    </el-row>
+    </el-row> -->
     <submit-task ref="SubmitTask" title="隐患登记" @formSuccess="selectItem(curSel)" />
   </div>
 </template>
@@ -138,13 +64,13 @@ export default {
         groupRectifyCount: 0,
         groupAcceptCount: 0
       },
-      curSel: 'MyHandling'
+      curSel: 1
     }
   },
 
   mounted() {
-    this.loadData()
-    this.selectItem(this.curSel)
+    // this.loadData()
+    // this.selectItem(this.curSel)
   },
   methods: {
     // 加载数据

+ 0 - 2
src/views/goaf/danger/index.vue

@@ -26,8 +26,6 @@ export default {
       viewCode: 'MyHandling'
     }
   },
-  mounted() {
-  },
   methods: {
 
     // Action Update

+ 29 - 7
src/views/goaf/info/components/GoafInfo.vue

@@ -1,18 +1,26 @@
 <template>
   <div class="content-container goaf">
     <el-row class="tool-bar">
-      <el-col :span="12" class="left">
+      <el-col :span="3" class="left">
         <div class="content-title">
           采空区
         </div>
       </el-col>
-      <el-col :span="12" class="right">
-        <el-input v-model="conditions.goafName" class="search-input m-right-15" placeholder="请输入采空区名称">
+      <el-col :span="21" class="right">
+        <el-select v-model="conditions.goafOrebelt" class="search-input m-right-15" filterable placeholder="矿带" clearable>
+          <el-option v-for="(item,index) in goafOrebelts" :key="index" :value="item" :label="item" />
+        </el-select>
+        <el-select v-model="conditions.goafOrebody" class="search-input m-right-15" filterable placeholder="矿体" clearable>
+          <el-option v-for="(item,index) in goafList" :key="index" :value="item.goafOrebody" :label="item.goafOrebody" />
+        </el-select>
+        <el-select v-model="conditions.goafOreheight" class="search-input m-right-15" filterable placeholder="中段" clearable>
+          <el-option v-for="(item,index) in goafList" :key="index" :value="item.goafOreheight" :label="item.goafOreheight" />
+        </el-select>
+        <el-input v-model="conditions.goafName" class="search-input m-right-15" placeholder="请输入采空区编号">
           <el-button slot="append" icon="el-icon-search" @click="getData()" />
         </el-input>
         <el-button type="primary" style="margin-right: 10px;" @click="handleAdd">新增</el-button>
         <el-button type="primary" :disabled="downloadLoading" @click="handleExport">导出Excel</el-button>
-        {{ downloadLoading }}
       </el-col>
     </el-row>
     <el-row class="m-top-15">
@@ -55,7 +63,7 @@
 </template>
 
 <script>
-import { getGoafBaseInfoByPage, delGoaf } from '@/api/goaf/info'
+import { getGoafBaseInfoByPage, delGoaf, getGoafBaseInfo } from '@/api/goaf/info'
 import { Pagination } from '@/components'
 import Goaf from './Goaf'
 import Detail from './detail'
@@ -68,15 +76,25 @@ export default {
       total: 0,
       listLoading: false,
       downloadLoading: false,
+      goafList: [],
+      goafOrebelts: [],
       conditions: {
         page: 1,
         limit: 10,
-        goafName: ''
+        goafName: '',
+        goafOrebelt: '',
+        goafOrebody: '',
+        goafOreheight: ''
       }
     }
   },
   created() {
     this.getData()
+    getGoafBaseInfo().then((res) => {
+      const goafOrebelts = res.data.map(item => item.goafOrebelt)
+      this.goafOrebelts = [...new Set(goafOrebelts)]
+      this.goafList = res.data
+    })
   },
   methods: {
     convertNum(num) {
@@ -85,6 +103,10 @@ export default {
     // fetch data
     getData() {
       this.listLoading = true
+      if (this.conditions.goafOrebelt === '') delete this.conditions.goafOrebelt
+      if (this.conditions.goafOrebody === '') delete this.conditions.goafOrebody
+      if (this.conditions.goafOreheight === '') delete this.conditions.goafOreheight
+      if (this.conditions.goafName === '') delete this.conditions.goafName
       getGoafBaseInfoByPage(this.conditions).then((resp) => {
         this.listLoading = false
         const { code, msg, data, total } = resp
@@ -221,7 +243,7 @@ export default {
             }
 
             .search-input {
-                width: 300px;
+                width: 200px !important;
             }
         }
 

+ 9 - 9
src/views/goaf/info/components/detail.vue

@@ -11,38 +11,38 @@
       <table class="descriptions">
         <tr>
           <td class="lable">矿带</td>
-          <td class="cont">{{ viewData.goafOrebelt | isEmpty }}</td>
+          <td class="cont">{{ NumConvertLM(viewData.goafOrebelt) | isEmpty }}</td>
           <td class="lable">矿体</td>
-          <td class="cont">{{ viewData.goafOrebody | isEmpty }}</td>
+          <td class="cont">{{ NumConvertLM(viewData.goafOrebody) | isEmpty }}</td>
         </tr>
         <tr>
           <td class="lable">中段</td>
           <td class="cont">{{ viewData.goafOreheight | isEmpty }}</td>
-          <td class="lable">采空区名称</td>
+          <td class="lable">采空区编号</td>
           <td class="cont">{{ viewData.goafName | isEmpty }}</td>
         </tr>
         <tr>
-          <td class="lable">水平断面均暴露面积</td>
+          <td class="lable">水平断面均暴露面积(㎡)</td>
           <td class="cont">{{ viewData.goafAvexArea | isEmpty }}</td>
           <td class="lable">平均倾向宽度</td>
           <td class="cont">{{ viewData.goafAvinWidth | isEmpty }}</td>
         </tr>
         <tr>
-          <td class="lable">平均暴露高度</td>
+          <td class="lable">平均暴露高度(m)</td>
           <td class="cont">{{ viewData.goafAvexHeight==0?'已填充':viewData.goafAvexHeight | isEmpty }}</td>
-          <td class="lable">goafVoidVolume</td>
+          <td class="lable">体积(m³)</td>
           <td class="cont">{{ viewData.goafVoidVolume==0?'已填充':viewData.goafVoidVolume | isEmpty }}</td>
         </tr>
         <tr>
-          <td class="lable">倾向</td>
+          <td class="lable">倾向(度)</td>
           <td class="cont">{{ viewData.goafKeyTrend | isEmpty }}</td>
           <td class="lable">倾角(度)</td>
           <td class="cont">{{ viewData.goafKeyDipangle | isEmpty }}</td>
         </tr>
         <tr>
-          <td class="lable">顶板矿柱厚度</td>
+          <td class="lable">顶板矿柱厚度(m)</td>
           <td class="cont">{{ viewData.goafRoofpillarThickness | isEmpty }}</td>
-          <td class="lable">保安间柱平均厚度</td>
+          <td class="lable">保安间柱平均厚度(m)</td>
           <td class="cont">{{ viewData.goafIncoavThickness | isEmpty }}</td>
         </tr>
         <tr>

+ 17 - 17
src/views/goaf/map/components/VisualEditor.vue

@@ -9,7 +9,7 @@
     </nav>
     <div class="layout-map">
       <div class="left-side">
-        <div class="title">作业项目</div>
+        <div class="title">采空区</div>
         <div v-for="(item,index) in markerItems" :key="index" :class="checkItemIndex===index?'item active':'item'" @click="checkItem(item,index)">
           <img :src="item.icon" alt="" class="icon">
           <div class="name">{{ item.name }}</div>
@@ -105,9 +105,9 @@ import MapSelector from '@/components/MapSelector'
 import { getGoafBaseInfo } from '@/api/goaf/info'
 import { getMapLayerById, createMapLayer, delMapLayer, updateMapLayer, getMapLayer } from '@/api/goaf/layer'
 const markerIcon = L.icon({
-  iconUrl: require('@/assets/images/icon/4.png'),
-  shadowUrl: require('@/assets/images/icon/4hover.png'),
-  iconSize: [60, 70],
+  iconUrl: require('@/assets/images/goaf/default.png'),
+  shadowUrl: require('@/assets/images/goaf/default.png'),
+  iconSize: [37.2, 57.6],
   shadowSize: [0, 0],
   iconAnchor: [16, 52],
   popupAnchor: [1, -38]
@@ -132,7 +132,7 @@ export default {
       markerId: undefined,
       dragstartMarker: undefined,
       markerItems: [
-        { icon: require('@/assets/images/icon/4.png'), name: '' }
+        { icon: require('@/assets/images/goaf/default.png'), name: '' }
       ],
       map: undefined,
       geoLayer: undefined,
@@ -289,8 +289,8 @@ export default {
           var icon = L.icon({
             iconUrl,
             shadowUrl: iconUrl,
-            shadowSize: [60, 70],
-            iconSize: [60, 70]
+            shadowSize: [37.2, 57.6],
+            iconSize: [37.2, 57.6]
           })
           layer.setIcon(icon)
         }
@@ -307,8 +307,8 @@ export default {
             shadowUrl: iconUrl,
             name,
             typeId,
-            shadowSize: [60, 70],
-            iconSize: [60, 70]
+            shadowSize: [37.2, 57.6],
+            iconSize: [37.2, 57.6]
           })
           layer.setIcon(icon)
           self.layer = layer
@@ -436,7 +436,7 @@ export default {
       this.state = 1
       this.saveForm.icon = item.icon
       this.saveForm.name = item.name
-      this.RtHadnTitle = '新增标记点'
+      this.RtHadnTitle = '新增采空区'
       this.map.pm.enableDraw('Marker', { snappable: false, tooltips: false })// tooltips: { 'placeMarker': '点击放置标记' },
     },
     changeAreaByFilter() {
@@ -462,13 +462,13 @@ export default {
       }
     },
     changeArea(type) {
-      const goafOrebelts = this.deeepClone(this.goafOrebelts)
+      const goafs = this.deeepClone(this.goaf)
       let goafOrebodys = this.deeepClone(this.goafOrebodys)
       let goafOreheights = this.deeepClone(this.goafOreheights)
       let goafNames = this.deeepClone(this.goafNames)
       if (type === 1) {
-        goafOrebodys = goafOrebelts.filter(item => item.goafOrebelt === this.saveForm.goafOrebelt)
-        goafOrebodys = this.unique(goafOrebodys, 'goafOrebelt')
+        goafOrebodys = goafs.filter(item => item.goafOrebelt === this.saveForm.goafOrebelt)
+        // goafOrebodys = this.unique(goafOrebodys, 'goafOrebelt')
         this.goafOrebodys = goafOrebodys
         this.goafOreheights = []
         this.goafNames = []
@@ -476,15 +476,15 @@ export default {
         this.saveForm.goafOreheight = ''
         this.saveForm.goafName = ''
       } else if (type === 2) {
-        goafOreheights = goafOrebodys.filter(item => item.goafOrebody === this.saveForm.goafOrebody)
-        goafOreheights = this.unique(goafOreheights, 'goafOreheight')
+        goafOreheights = goafs.filter(item => (item.goafOrebody === this.saveForm.goafOrebody) && (item.goafOrebelt === this.saveForm.goafOrebelt))
+        // goafOreheights = this.unique(goafOreheights, 'goafOreheight')
         this.goafOreheights = goafOreheights
         this.goafNames = []
         this.saveForm.goafOreheights = ''
         this.saveForm.goafName = ''
       } else if (type === 3) {
-        goafNames = goafOreheights.filter(item => item.goafOreheight === this.saveForm.goafOreheight)
-        goafNames = this.unique(goafNames, 'goafName')
+        goafNames = goafs.filter(item => (item.goafOreheight === this.saveForm.goafOreheight) && (item.goafOrebody === this.saveForm.goafOrebody) && (item.goafOrebelt === this.saveForm.goafOrebelt))
+        // goafNames = this.unique(goafNames, 'goafName')
         this.goafNames = goafNames
         this.saveForm.goafName = ''
       } else {

+ 14 - 25
src/views/goaf/sensor/Model.vue

@@ -86,8 +86,8 @@
         </div>
       </el-form-item>
       <el-form-item label="安装地点" required>
-        <!-- <el-input v-model="formData.goafDevLocation" placeholder="请输入安装地点" style="width:260px" /> -->
-        <el-select
+        <el-input v-model="formData.goafDevLocation" placeholder="请输入安装地点" style="width:260px" />
+        <!-- <el-select
           v-model="formData.goafDevLocation"
           class="safe-area-item"
           filterable
@@ -100,7 +100,7 @@
             :value="item.goafId"
             :label="item.goafName"
           />
-        </el-select>
+        </el-select> -->
       </el-form-item>
       <el-form-item label="设备类型" required>
         <el-select
@@ -125,7 +125,7 @@
           value-format="yyyy-MM-dd"
         />
       </el-form-item>
-      <!-- <el-form-item label="组织部门">
+      <el-form-item label="组织部门">
         <el-cascader
           :options="treeData"
           :props="{ checkStrictly: true, emitPath: false }"
@@ -139,23 +139,10 @@
             <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
           </template>
         </el-cascader>
-      </el-form-item> -->
+      </el-form-item>
       <el-form-item label="责任人员" prop="executeAccountId">
-        <el-select
-          v-model="formData.goafDevAccountId"
-          style="width: 100%"
-          filterable
-          placeholder="请选择人员"
-          @change="handleSelectUser"
-        >
-          <el-option-group v-for="(user, idx) in userList" :key="idx" :label="user.name">
-            <el-option
-              v-for="item in user.children"
-              :key="item.accountId"
-              :label="item.name"
-              :value="item.accountId"
-            />
-          </el-option-group>
+        <el-select v-model="formData.goafDevAccountId" style="width:260px" filterable clearable @change="handleUserSelect">
+          <el-option v-for="item in userList" :key="item.accountId" :value="item.accountId" :label="item.accountName" />
         </el-select>
       </el-form-item>
     </el-form>
@@ -173,7 +160,6 @@ import { getUserByPage } from '@/api/system/userApi'
 import { getSensorCat } from '@/api/goaf/sensorCatApi'
 import { getGoafBaseInfo } from '@/api/goaf/info'
 import { createSensor, updateSensor } from '@/api/goaf/sensor'
-import { getUserList } from '@/api/system/userApi'
 export default {
   name: 'SensorModel',
   data() {
@@ -248,7 +234,10 @@ export default {
           this.treeData = temp
         }
       })
-      getUserList().then((resp) => {
+      getUserByPage({
+        page: 1,
+        limit: 999999
+      }).then((resp) => {
         const { data } = resp
         this.userList = data
       })
@@ -273,7 +262,7 @@ export default {
         goafOrebodys = goafOrebelts.filter(
           (item) => item.goafOrebelt === this.formData.goafOrebelt
         )
-        goafOrebodys = this.unique(goafOrebodys, 'goafOrebelt')
+        // goafOrebodys = this.unique(goafOrebodys, 'goafOrebelt')
         this.goafOrebodys = goafOrebodys
         this.goafOreheights = []
         this.goafNames = []
@@ -284,7 +273,7 @@ export default {
         goafOreheights = goafOrebodys.filter(
           (item) => item.goafOrebody === this.formData.goafOrebody
         )
-        goafOreheights = this.unique(goafOreheights, 'goafOreheight')
+        // goafOreheights = this.unique(goafOreheights, 'goafOreheight')
         this.goafOreheights = goafOreheights
         this.goafNames = []
         this.formData.goafOreheights = ''
@@ -293,7 +282,7 @@ export default {
         goafNames = goafOreheights.filter(
           (item) => item.goafOreheight === this.formData.goafOreheight
         )
-        goafNames = this.unique(goafNames, 'goafName')
+        // goafNames = this.unique(goafNames, 'goafName')
         this.goafNames = goafNames
         this.formData.goafId = ''
       } else {

+ 4 - 2
src/views/goaf/sensor/index.vue

@@ -20,10 +20,10 @@
         <el-table-column prop="goafDevName" label="设备名称" />
         <el-table-column label="安装区域">
           <template v-slot="{row}">
-            <span>{{ row.goafOrebelt }}/{{ row.goafOrebody }}/{{ row.goafOrebody }}/{{ row.goafNames }}</span>
+            <span>{{ NumConvertLM(row.goafOrebelt) }}-{{ row.goafOrebody }}-{{ row.goafOreheight }}-{{ row.goafName }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="goafName" label="安装地点" />
+        <el-table-column prop="goafDevLocation" label="安装地点" />
         <el-table-column prop="goafDevTypename" label="设备类型名称" />
         <el-table-column prop="goafDevAccountName" label="设备责任人" />
         <el-table-column prop="goafInstallTime" label="安装时间" />
@@ -45,6 +45,7 @@
 <script>
 import { getSensorByPage, delSensor } from '@/api/goaf/sensor'
 import { Pagination } from '@/components'
+import { NumConvertLM } from '@/utils'
 import sensorModel from './Model'
 export default {
   components: { Pagination, sensorModel },
@@ -65,6 +66,7 @@ export default {
   },
   methods: {
     // fetch data
+    NumConvertLM,
     getData() {
       this.listLoading = true
       getSensorByPage(this.conditions).then((resp) => {

+ 5 - 5
src/views/goaf/sensorCat/index.vue

@@ -17,19 +17,19 @@
       <el-table v-loading="listLoading" :data="dataList" fit style="width: 100%">
         <el-table-column type="index" align="center" label="序号" width="80" />
 
-        <el-table-column label="类别名称" align="center" width="250">
+        <el-table-column label="类别名称" align="center" minw-wdth="250">
           <template v-slot="{row}">
-            <span>{{ row.equipCatTitle }}</span>
+            <span>{{ row.sensorTypeName }}</span>
           </template>
         </el-table-column>
 
-        <el-table-column label="说明">
+        <!-- <el-table-column label="说明">
           <template v-slot="{row}">
             <span>{{ row.equipCatDesc }}</span>
           </template>
-        </el-table-column>
+        </el-table-column> -->
 
-        <el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width">
+        <el-table-column label="操作" align="center" minw-wdth="230" class-name="small-padding fixed-width">
           <template v-slot="{row}">
             <el-button size="mini" @click="handleEdit(row)">修改</el-button>
             <el-button v-if="row.isFixed !== 1" size="mini" type="danger" @click="handleDelete(row)">删除</el-button>

+ 2 - 2
src/views/goaf/sensorCat/sensorCat.vue

@@ -9,9 +9,9 @@
         <el-form-item label="类别名称" prop="sensorTypeName">
           <el-input v-model="formData.sensorTypeName" placeholder="输入设备类别名称" />
         </el-form-item>
-        <el-form-item label="说明">
+        <!-- <el-form-item label="说明">
           <el-input v-model="formData.sensorCatDesc" type="textarea" rows="5" placeholder="输入说明" />
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
     </div>
     <span slot="footer" class="dialog-footer">