zhaobao 2 vuotta sitten
vanhempi
commit
621046d6aa

+ 92 - 0
src/api/goaf/task.js

@@ -0,0 +1,92 @@
+
+import request from '@/utils/request'
+
+// 获取所有任务定义
+export function getCheckDefByList(params) {
+  return request({
+    url: '/goaf/goafcheckdef/list',
+    params
+  })
+}
+// 分页获取所有任务定义
+export function getCheckDefByPage(params) {
+  return request({
+    url: '/goaf/goafcheckdef/page',
+    params
+  })
+}
+
+// 获取指定的任务定义
+export function getGoafcheckdefById(goafGoafcheckdefId) {
+  return request({
+    url: `/goaf/goafcheckdef/${goafGoafcheckdefId}`
+  })
+}
+// 增加任务定义
+export function createGoafcheckdef(data) {
+  return request({
+    url: '/goaf/goafcheckdef/add',
+    method: 'POST',
+    data
+  })
+}
+// 更新
+export function updateGoafcheckdef(data) {
+  return request({
+    url: '/goaf/goafcheckdef/update',
+    method: 'PUT',
+    data
+  })
+}
+
+// 删除
+export function deleteCheckDefById(goafId) {
+  return request({
+    url: `/goaf/goafcheckdef/delete/${goafId}`,
+    method: 'DELETE'
+  })
+}
+
+/** 任务 */
+
+// 获取任务列表
+export function goaftaskList(params) {
+  return request({
+    url: `/goaf/goaftask/list`,
+    method: 'GET',
+    params
+  })
+}
+
+// 分页获取任务列表
+export function getCheckTaskByPage(params) {
+  return request({
+    url: '/goaf/goaftask/page',
+    method: 'GET',
+    params
+  })
+}
+
+// 新增
+export function createCheckTask(data) {
+  return request({
+    url: '/goaf/goaftask/add',
+    method: 'POST',
+    data
+  })
+}
+// 更新
+export function updateCheckTask(data) {
+  return request({
+    url: '/goaf/goafGoafcheckdef/update',
+    method: 'PUT',
+    data
+  })
+}
+// 删除
+export function deleteCheckTaskById(taskId) {
+  return request({
+    url: `/goaf/goaftask/delete/${taskId}`,
+    method: 'DELETE'
+  })
+}

+ 5 - 4
src/layout/components/Navbar.vue

@@ -45,7 +45,7 @@
         <div class="avatar-wrapper">
           <!-- <el-avatar v-if="userData" :src="userData.userAvatar" /> -->
           <img class="icon" src="@/assets/images/Navbar/user.png" alt="">
-          <span class="name">{{ userData.userName|'***' }}</span>
+          <span class="name">{{ userData&&userData.userName||'--' }}</span>
           <i class="el-icon-caret-bottom" />
         </div>
         <el-dropdown-menu slot="dropdown">
@@ -67,6 +67,7 @@
 import { mapGetters } from 'vuex'
 import { Breadcrumb, Hamburger, ErrorLog, Screenfull, SizeSelect, Search } from '@/components'
 import { getUnReadCounter } from '@/api/system/msgApi'
+import { getToken } from '@/utils/auth'
 export default {
   name: 'NaveBarComponent',
   components: {
@@ -84,12 +85,12 @@ export default {
       sideMenuTabList: [
         /** 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/checklist/index', permit: 'aqpt_alert_center', id: 5 },
+        { 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/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://localhost:8080/', permit: 'aqpt_panorama', id: 10 }
+        { 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 }
       ]
     }
   },
@@ -154,7 +155,7 @@ export default {
     },
     sideTabChange(index, item) {
       if (item.href) {
-        window.open(item.href)
+        window.open(`${item.href}?token=${getToken()}`)
         return
       }
       this.sideMenuTabIndex = index

+ 47 - 95
src/router/modules/aqpt.js

@@ -107,6 +107,26 @@ const aqptRouter = [
     ]
   },
   {
+    path: '/aqpt/scene',
+    component: Layout,
+    name: 'AqptScene',
+    redirect: '/aqpt/scene/riskPoint',
+    groupId: [0],
+    meta: {
+      title: '现场管理',
+      icon: 'icon-common_overview',
+      permit: 'aqpt_scene'
+    },
+    children: [
+      {
+        path: 'map',
+        component: () => import('@/views/aqpt/map/index'),
+        name: 'entMap',
+        meta: { title: '地图', noCache: true, permit: 'aqpt_scene_map' }
+      }
+    ]
+  },
+  {
     path: '/goaf/checklist',
     component: Layout,
     name: 'goaf-checklist',
@@ -116,7 +136,7 @@ const aqptRouter = [
       permit: 'aqpt_danger',
       icon: 'icon-common_file'
     },
-    groupId: [5],
+    groupId: [0],
     children: [
       {
         path: 'index',
@@ -132,97 +152,50 @@ const aqptRouter = [
     ]
   },
   {
-    path: '/aqpt/scene',
+    path: '/goaf/check',
     component: Layout,
-    name: 'AqptScene',
-    redirect: '/aqpt/scene/riskPoint',
-    groupId: [0],
-    meta: {
-      title: '现场管理',
-      icon: 'icon-common_overview',
-      permit: 'aqpt_scene'
-    },
-    children: [
-      {
-        path: 'map',
-        component: () => import('@/views/aqpt/map/index'),
-        name: 'entMap',
-        meta: { title: '地图', noCache: true, permit: 'aqpt_scene_map' }
-      },
-      {
-        path: 'manage',
-        component: () => import('@/views/system/grid/index'),
-        name: 'entGrid',
-        meta: { title: '网格', noCache: true, permit: 'aqpt_scene_grid' }
-      },
-      {
-        path: 'riskPoint',
-        component: () => import('@/views/aqpt/riskpoint/index'),
-        name: 'entRiskPoint',
-        meta: { title: '风险点', noCache: true, permit: 'aqpt_scene_riskpoint' }
-      },
-
-      {
-        path: 'projectWork',
-        component: () => import('@/views/aqpt/projectWork/index'),
-        name: 'projectWork',
-        meta: { title: '工作项目管理', noCache: true, permit: 'aqpt_scene_riskpoint' }
-      }
-    ]
-  },
-  {
-    path: '/aqpt/check',
-    component: Layout,
-    name: 'AqptCheck',
+    name: 'goafCheck',
     redirect: '/aqpt/check/index',
     meta: {
       title: '人员巡检',
-      icon: 'icon-common_task',
-      permit: 'aqpt_check_manage'
+      icon: 'icon-common_task'
     },
     groupId: [5],
     children: [
       {
         path: 'plan',
-        component: () => import('@/views/aqpt/checkTask/plan/index'),
+        component: () => import('@/views/goaf/checkTask/plan/index'),
         name: 'aqpt_check_plan',
-        meta: { title: '巡检计划', noCache: true, permit: 'aqpt_check_plan' }
+        meta: { title: '任务定义', noCache: true, permit: 'aqpt_check_plan' }
       },
 
       {
         path: 'index',
-        component: () => import('@/views/aqpt/checkTask/manage/index'),
+        component: () => import('@/views/goaf/checkTask/manage/index'),
         name: 'aqpt_check_manage',
-        meta: { title: '巡检任务', noCache: true, permit: 'aqpt_check_task' }
-      },
-
-      {
-        path: 'record',
-        component: () => import('@/views/aqpt/checkTask/record/index'),
-        name: 'aqpt_check_record',
-        meta: { title: '巡检记录', noCache: true, permit: 'aqpt_check_record' }
-      }
-    ]
-  },
-  {
-    path: '/aqpt/danger',
-    component: Layout,
-    name: 'AqptDanger',
-    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' }
+        meta: { title: '任务', noCache: true, permit: 'aqpt_check_task' }
       }
     ]
   },
+  // {
+  //   path: '/aqpt/danger',
+  //   component: Layout,
+  //   name: 'AqptDanger',
+  //   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/report',
@@ -368,27 +341,6 @@ const aqptRouter = [
       }
     ]
   },
-
-  // {
-  //   path: '/aqpt/art',
-  //   component: Layout,
-  //   name: 'AqptArtCenter',
-  //   redirect: '/aqpt/art/index',
-  //   groupId: [7],
-  //   hidden: true,
-  //   meta: {
-  //     title: '安全智库',
-  //     permit: 'aqpt_art_center'
-  //   },
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       component: () => import('@/views/system/art/index'),
-  //       name: 'aqpt_art_center',
-  //       meta: { title: '安全智库', noCache: true, icon: 'icon-common_knowledge', permit: 'aqpt_art_center' }
-  //     }
-  //   ]
-  // },
   {
     path: '/aqpt/doc',
     component: Layout,

+ 2 - 2
src/settings.js

@@ -38,8 +38,8 @@ module.exports = {
   */
   serverUrl: 'http://192.168.1.214:8080/', // 正式环境
   // devServerUrl: 'http://1.15.92.205:8080/', // 开发环境
-  // devServerUrl: 'http://192.168.3.5:8080/', // 开发环境 qu
-  devServerUrl: 'http://192.168.3.201:8080/', // 开发环境  test
+  devServerUrl: 'http://192.168.3.5:8080/', // 开发环境 qu
+  // devServerUrl: 'http://192.168.3.201:8080/', // 开发环境  test
   mqttUrl: 'ws://1.15.92.205:8083/mqtt', // 水泥厂mqtt地址
   /**
   * websocket 地址

+ 260 - 0
src/views/goaf/checkTask/manage/CheckTask.vue

@@ -0,0 +1,260 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    :wrapper-closable="false"
+    size="35%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <el-form ref="ruleForm" :model="formData" :rules="rules" label-position="right" label-width="120px">
+        <el-form-item label="任务名称" prop="taskTitle">
+          <el-input v-model="formData.taskTitle" />
+        </el-form-item>
+        <el-form-item label="执行人员">
+          <user-selector :default-val="formData.handleAccountId" @setUserInfo="handleUserSelect" />
+        </el-form-item>
+        <el-form-item label="检查表" prop="checklistId">
+          <el-select v-model="formData.checklistId" style="width: 100%" filterable placeholder="检查表">
+            <el-option
+              v-for="item in checklist"
+              :key="item.checklistId"
+              :label="item.checklistTitle"
+              :value="item.checklistId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="开始时间" prop="expectedStartDate">
+          <el-date-picker
+            v-model="formData.expectedStartDate"
+            type="date"
+            placeholder="开始时间"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            style="width: 100%"
+          />
+        </el-form-item>
+
+        <el-form-item label="结束时间" prop="expectedEndDate">
+          <el-date-picker
+            v-model="formData.expectedEndDate"
+            type="date"
+            placeholder="结束时间"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd"
+            style="width: 100%"
+          />
+        </el-form-item>
+
+        <el-form-item label="任务说明" prop="taskDesc">
+          <el-input v-model="formData.taskDesc" type="textarea" :rows="10" />
+        </el-form-item>
+      </el-form>
+
+      <div class="btn-group">
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
+        <el-button class="cancel-btn" @click="dialogVisible = false">取 消</el-button>
+      </div>
+    </div>
+
+  </el-drawer>
+</template>
+
+<script>
+import { ACTION_ADD, ACTION_UPDATE } from '@/utils/actionType'
+import { createCheckTask, updateCheckTask } from '@/api/goaf/task'
+import UserSelector from '@/components/UserSelector/index'
+import { getChecklist } from '@/api/goaf/check'
+export default {
+  components: { UserSelector },
+  props: {
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      checklist: [],
+      formData: {
+        'taskId': undefined,
+        'ocId': undefined,
+        'goafId': undefined,
+        'jobId': undefined,
+        'checkDefId': undefined,
+        'checklistId': undefined,
+        'taskTitle': '',
+        'taskDesc': '',
+        'expectedStartDate': '',
+        'expectedEndDate': '',
+        'handleAccountId': undefined,
+        'handleAccountName': '',
+        'handlePositionId': undefined,
+        'handlePositionName': '',
+        'handleGroupId': undefined,
+        'handleGroupName': '',
+        'status': 0
+      },
+      rules: {
+        taskTitle: [
+          { required: true, message: '请输入任务名称', trigger: 'blur' }
+        ],
+        checklistId: [
+          { required: true, message: '请选择清单', trigger: 'blur' }
+        ],
+        handleAccountId: [
+          { required: true, message: '请选择执行人', trigger: 'blur' }
+        ],
+        expectedStartDate: [
+          { required: true, message: '请选择开始时间', trigger: 'change' }
+        ],
+        expectedEndDate: [
+          { required: true, message: '请选择结束时间', trigger: 'change' }
+        ]
+      },
+      viewData: {},
+      actionType: '',
+      taskCatList: [],
+      userList: [],
+      checkList: [],
+      userSelObj: undefined
+    }
+  },
+  mounted() {
+    getChecklist().then((res) => {
+      this.checklist = res.data
+    })
+  },
+  methods: {
+    // 选择执行人员
+    handleUserSelect(obj) {
+      this.formData.handleAccountId = obj.accountId
+      this.formData.handleAccountName = obj.accountName
+      this.formData.handlePositionId = obj.positionId
+      this.formData.handlePositionName = obj.positionName
+      this.formData.handleGroupId = obj.groupId
+      this.formData.handleGroupName = obj.groupName
+    },
+
+    // Show Add Dialog
+    showAddModel() {
+      this.resetFormData()
+      this.actionType = ACTION_ADD
+      this.dialogVisible = true
+    },
+
+    // Show Edit Dialog
+    showEditModel(data) {
+      this.resetFormData()
+      this.actionType = ACTION_UPDATE
+      this.dialogVisible = true
+      this.formData = data
+      this.formData.handleAccountId = parseFloat(data.handleAccountId)
+    },
+
+    // Reset Form Data
+    resetFormData() {
+      this.formData = {
+        'taskId': undefined,
+        'ocId': undefined,
+        'goafId': undefined,
+        'jobId': undefined,
+        'checkDefId': undefined,
+        'checklistId': undefined,
+        'taskTitle': '',
+        'taskDesc': '',
+        'expectedStartDate': '',
+        'expectedEndDate': '',
+        'handleAccountId': undefined,
+        'handleAccountName': '',
+        'handlePositionId': undefined,
+        'handlePositionName': '',
+        'handleGroupId': undefined,
+        'handleGroupName': '',
+        'status': 0
+      }
+    },
+    // 提交
+    submitForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          switch (this.actionType) {
+            case ACTION_ADD:
+              // this.formData.goafId = 439020
+              // this.formData.jobId = 116
+              // this.formData.checkDefId = 682
+              createCheckTask(this.formData).then((resp) => {
+                const { msg } = resp
+                this.dialogVisible = false
+                this.$message.success(msg)
+                this.formSuccess()
+              })
+              break
+            case ACTION_UPDATE:
+              updateCheckTask(this.formData).then((resp) => {
+                const { code, msg } = resp
+                if (code === 0) {
+                  this.dialogVisible = false
+                  this.$message.success(msg)
+                  this.formSuccess()
+                } else {
+                  this.$message.error(msg)
+                }
+              }).catch((error) => {
+                console.log(error)
+              })
+              break
+          }
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    formSuccess() {
+      this.$emit('formSuccess')
+    },
+    resetFormField(formName) {
+      this.$refs[formName].resetFields()
+    }
+
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+  .task-info-component {
+      margin: 15px;
+      position: relative;
+      height: calc(100% - 15px);
+
+      .btn-group {
+          position: absolute;
+          bottom: 0;
+          left: 0;
+          width: 100%;
+
+          .el-button {
+              width: 100%;
+              margin: 0 0 15px;
+          }
+
+          .cancel-btn {
+              background: #004F7B;
+              border-color: #004F7B;
+              color: #FFF;
+
+              &:hover {
+                  background: #026197;
+                  border-color: #026197;
+              }
+          }
+      }
+
+  }
+
+</style>

+ 255 - 0
src/views/goaf/checkTask/manage/CheckTaskList.vue

@@ -0,0 +1,255 @@
+<template>
+  <div class="content-container">
+    <el-row class="tool-bar">
+      <el-col :span="12" class="left">
+        <div class="content-title">
+          {{ title }}
+        </div>
+      </el-col>
+
+      <el-col :span="12" class="right">
+        <el-input v-model.trim="conditions.taskTitle" class="search-input m-right-15" placeholder="请输入任务名称">
+          <el-button slot="append" icon="el-icon-search" @click="getData" />
+        </el-input>
+      </el-col>
+    </el-row>
+
+    <el-row class="content-body">
+      <el-table v-loading="listLoading" class="page-table" border :data="dataList" height="calc(100vh - 210px)">
+        <el-table-column type="index" label="序号" width="60" header-align="center" align="center" />
+
+        <el-table-column prop="taskTitle" label="任务名称" header-align="left" align="left">
+          <template v-slot="{row}">
+            <span>{{ row.taskTitle }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="handleAccountName" label="执行人员" header-align="center" align="center" width="100">
+          <template v-slot="{row}">
+            <el-popover v-if="row.handleAccountName" trigger="hover" placement="top">
+              <p>部门: {{ row.handleGroupName }}</p>
+              <p>岗位: {{ row.handlePositionName }}</p>
+              <div slot="reference" class="name-wrapper">
+                <i class="el-icon-user" />
+                {{ row.handleAccountName }}
+              </div>
+            </el-popover>
+            <span v-else>-</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="expectedEndDate" label="截止时间" header-align="center" align="center" width="180">
+          <template v-slot="{row}">
+            <span v-if="row.expectedEndDate" style="margin-left: 10px"><i class="el-icon-time" />{{ row.expectedEndDate }}</span>
+            <span v-else>-</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="status" label="状态" header-align="center" align="center" width="120">
+          <template v-slot="{row}">
+            <span><el-tag type="info" effect="plain" color="rgb(38 69 90)">{{ row.status | checkStatusFilter }}</el-tag></span>
+          </template>
+        </el-table-column>
+
+        <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> -->
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination-wrap">
+        <pagination v-show="total>0" :total="total" :page.sync="conditions.page" :limit.sync="conditions.limit" @pagination="getData" />
+      </div>
+    </el-row>
+    <task-event ref="TaskEvent" title="任务动态" />
+    <task-details ref="TaskDetails" title="任务详情" />
+    <handling-view ref="HandlingView" title="处理任务" @formSuccess="getData" />
+    <check-task ref="checkTask" @formSuccess="getData" />
+  </div>
+</template>
+
+<script>
+import CheckTask from './CheckTask.vue'
+import TaskEvent from './TaskEvent.vue'
+import HandlingView from './check/Handle.vue'
+import TaskDetails from './Details.vue'
+import { getCheckTaskByPage, deleteCheckTaskById } from '@/api/goaf/task'
+import { mapGetters } from 'vuex'
+import Pagination from '@/components/Pagination'
+import { checkType } from '@/utils'
+
+export default {
+  name: 'MyWaiting',
+  filters: {
+    checkTypeFilter(val) {
+      return checkType(val)
+    },
+    checkStatusFilter(val) {
+      if (val === 0) {
+        return '待处理'
+      } else if (val === 1) {
+        return '处理完成'
+      } else if (val === 2) {
+        return '逾期'
+      } else {
+        return '--'
+      }
+    }
+  },
+  components: { Pagination, CheckTask, TaskEvent, HandlingView, TaskDetails },
+  data() {
+    return {
+      title: '',
+      dataList: [],
+      total: 0,
+      listLoading: false,
+      conditions: {
+        page: 1,
+        limit: 10,
+        taskTitle: '',
+        status: 0
+      },
+      isGroup: false
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'userData'
+    ])
+  },
+  mounted() {
+    this.loadData(this.conditions.status)
+  },
+  methods: {
+    // 加载数据
+    loadData(status) {
+      this.conditions.status = status
+      switch (status) {
+        case 0:
+          this.title = '待处理'
+          break
+        case 1:
+          this.title = '处理完成'
+          break
+
+        case 2:
+          this.title = '逾期'
+          break
+      }
+      this.getData()
+    },
+
+    // 加载数据
+    getData() {
+      this.listLoading = true
+      getCheckTaskByPage(this.conditions).then((resp) => {
+        this.listLoading = false
+        const { code, data, total, msg } = resp
+        if (code === 0) {
+          this.total = total
+          this.dataList = data
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // 指令处理
+    handlerCommand(command, data) {
+      switch (command) {
+        case 'editTask':
+          this.handleUpdate(data)
+          break
+
+        case 'delTask':
+          this.handleDelete(data)
+          break
+      }
+    },
+    handleUpdate(data) {
+      this.$refs['checkTask'].showEditModel(JSON.parse(JSON.stringify(data)))
+    },
+    // 任务动态
+    handleTaskEvent(data) {
+      const taskId = data.taskId
+      this.$refs['TaskEvent'].showTaskEvent(taskId)
+    },
+
+    // 处理
+    handleTask(data) {
+      const { taskId } = data
+      this.$refs['HandlingView'].showView(taskId)
+    },
+
+    // 添加
+    handleAdd() {
+      this.$refs['checkTask'].showAddModel()
+    },
+
+    // 查看详情
+    handleViewDetails(data) {
+      const { taskId } = data
+      this.$refs['TaskDetails'].showView(taskId)
+    },
+
+    // 删除
+    handleDelete(data) {
+      const { taskId } = data
+      this.$confirm('删除任务?是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        deleteCheckTaskById(taskId).then((resp) => {
+          const { code, msg } = resp
+          if (code === 0) {
+            this.getData()
+            this.$message.success(msg)
+          } else {
+            this.$message.error(msg)
+          }
+        }).catch((error) => {
+          console.log(error)
+        })
+      }).catch(() => {
+        this.$message.info('已取消删除')
+      })
+    },
+
+    // 操作更新
+    operationalUpdate() {
+      this.$emit('operationalUpdate')
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.content-container{
+  height: calc(100%- 80px);
+  margin: 10px 10px 10px 0;
+}
+</style>

+ 429 - 0
src/views/goaf/checkTask/manage/Details.vue

@@ -0,0 +1,429 @@
+
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    :wrapper-closable="false"
+    size="100%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <el-row class="counter-wrap">
+        <el-col :span="4" class="left-counter-wrap">
+          <div class="list-group">
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">执行部门:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.handleGroupName }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">执行人:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count"><i class="el-icon-user" /> {{ viewData.handleAccountName }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">优先级:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count"><el-tag type="info" effect="plain" color="rgb(38 69 90)">{{ viewData.taskPriority | taskPriorityFilter }}</el-tag></p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">处理状态:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.checkStatus | checkStatusFilter }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">风险点:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.riskPointTitle }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">检查类型:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.checkCatTitle }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">清单:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.checklistTitle }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">预计开始时间:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.expectedStartTime }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">预计结束时间:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.expectedEndTime }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">实际开始时间:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.actualStartTime }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">实际结束时间:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.actualEndTime }}</p>
+              </el-col>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="20" class="right-counter-wrap">
+          <table class="ck-table">
+            <tr class="tr-head">
+              <td class="td-sno">序号</td>
+              <td class="td-riskCode">风险编码</td>
+              <td class="td-riskSource">场所/步骤/部位</td>
+              <td class="td-riskType">类别</td>
+              <td class="td-riskReason">危险因素</td>
+              <td class="td-riskConsequence">事故后果</td>
+              <td class="td-riskLevel">等级</td>
+              <td class="td-measure">管控措施</td>
+              <td class="td-reference">依据</td>
+              <td class="td-checkResult">检查结果</td>
+              <td class="td-action">操作</td>
+            </tr>
+            <template v-for="(hazard, hdx) in viewData.hazardList">
+              <tr :key="hazard.hazardId" class="tr-hazard">
+                <td colspan="11">{{ hdx+1 }}. {{ hazard.hazardTitle }}</td>
+              </tr>
+              <template v-for="(risk, rdx) in hazard.riskList">
+                <template v-for="(measure, mdx) in risk.measureList">
+                  <tr v-if="mdx===0" :key="measure.measureId">
+                    <td class="text-center" :rowspan="risk.measureCount">{{ rdx+1 }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskCode }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskSource }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskTypeId | riskTypeFilter }}</td>
+                    <td class="text-left" :rowspan="risk.measureCount">{{ risk.riskReason }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskConsequence }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskLevel | riskLevelFilter }}</td>
+                    <td class="text-left">
+                      <span>
+                        {{ mdx+1 }}.{{ measure.measureContent }}<br>
+                      </span>
+                    </td>
+                    <td class="text-left">
+                      <span>
+                        {{ mdx+1 }}.{{ measure.measureReference }}<br>
+                      </span>
+                    </td>
+                    <td>
+                      <span>{{ measure.checkResult | checkResultFilter }}</span>
+                    </td>
+                    <td>
+                      <i class="el-icon-tickets" />
+                    </td>
+                  </tr>
+                  <tr v-else :key="measure.measureId">
+                    <td class="text-left">
+                      <span>
+                        {{ mdx+1 }}.{{ measure.measureContent }}<br>
+                      </span>
+                    </td>
+                    <td class="text-left">
+                      <span>
+                        {{ mdx+1 }}.{{ measure.measureReference }}<br>
+                      </span>
+                    </td>
+                    <td>
+                      <span>{{ measure.checkResult | checkResultFilter }}</span>
+                    </td>
+                    <td>
+                      <i class="el-icon-tickets" />
+                    </td>
+                  </tr>
+                </template>
+              </template>
+            </template>
+          </table>
+        </el-col>
+      </el-row>
+    </div>
+  </el-drawer>
+</template>
+
+<script>
+import { getCheckTaskViewById } from '@/api/aqpt/checkTaskApi'
+import { taskPriority, riskType, riskLevel, checkResult, checkStatus } from '@/utils'
+export default {
+  components: {},
+  filters: {
+    riskTypeFilter(val) {
+      return riskType(val)
+    },
+    riskLevelFilter(val) {
+      return riskLevel(val)
+    },
+    taskPriorityFilter(val) {
+      return taskPriority(val)
+    },
+    checkStatusFilter(val) {
+      return checkStatus(val)
+    },
+    checkResultFilter(val) {
+      return checkResult(val)
+    }
+  },
+  data() {
+    return {
+      ops: {
+        bar: {
+          keepShow: false,
+          background: 'rgba(144, 147, 153, 0.4)',
+          onlyShowBarOnScroll: false
+        }
+      },
+      title: '',
+      dialogVisible: false,
+      viewData: {
+        taskId: undefined,
+        taskTitle: '',
+        taskCatId: undefined,
+        taskCatTitle: '',
+        launchGroupId: undefined,
+        launchGroupName: '',
+        launchPositionId: undefined,
+        launchPositionName: '',
+        launchAccountId: undefined,
+        launchAccountName: '',
+        handleGroupId: undefined,
+        handleGroupName: '',
+        handlePositionId: undefined,
+        handlePositionName: '',
+        handleAccountId: undefined,
+        handleAccountName: '',
+        status: undefined,
+        taskDesc: '',
+        expectedStartTime: undefined,
+        expectedEndTime: undefined,
+        actualStartTime: undefined,
+        actualEndTime: undefined,
+        riskPointId: undefined,
+        riskPointTitle: '',
+        checklistId: undefined,
+        checklistTitle: '',
+        checklistCatId: undefined,
+        checklistCatTitle: '',
+        checklistDesc: '',
+        checklistVersion: '',
+        hazardCount: 0,
+        hazardList: []
+      },
+      conditions: {
+        checklistId: undefined
+      },
+      total: 0
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    showView(checklistId) {
+      this.conditions.checklistId = checklistId
+      this.dialogVisible = true
+      getCheckTaskViewById(checklistId).then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.title = data.taskTitle
+          this.viewData = data
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.content-container {
+  margin: 0 0 15px 15px;
+  height: calc(100vh - 100px);
+
+  .title-bar {
+    border-left: 6px solid #36556B;
+    height: 40px;
+    line-height: 40px;
+    text-indent: 15px;
+    background: #113849;
+    margin-bottom: 15px;
+
+    .page-title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #FFF;
+      margin: 0;
+    }
+  }
+
+  .btn-group {
+    width: 100%;
+    margin-bottom: 15px;
+
+    .send-menu {
+      width: 100%;
+      background: #3D5F76;
+      color: #FFF;
+      border-color: #3D5F76;
+
+      &:hover {
+        background: #283c4c;
+        color: #FFF;
+        border-color: #283c4c;
+      }
+    }
+  }
+
+  .list-group {
+    height: calc(100vh - 85px);
+    background: #193142;
+
+    .sub-title-bar {
+      font-size: 16px;
+      color: #FFF;
+      margin: 0;
+    }
+
+    p {
+      text-align:right;
+      margin: 0;
+      padding: 0;
+    }
+
+    .count {
+      padding: 0;
+      text-align:left;
+      color: #20a0ff;
+    }
+
+    .ck-desc {
+      text-align: left;
+      text-indent: 24px;
+      color: #20a0ff;
+    }
+
+    .list-item {
+      height: 40px;
+      line-height: 40px;
+      color: #FFF;
+      padding: 0 5px;
+      font-size: 13px;
+
+      &.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);
+        }
+      }
+    }
+  }
+
+  .ck-table {
+    color: #FFF;
+    background-color: #0C3444;
+    font-size: 12px;
+    text-indent: initial;
+    border-spacing: 1px;
+    border: #606367 1px solid;
+    border-collapse: collapse;
+    padding: 10px 20px;
+    flex: 1;
+    width: 100%;
+    max-width: 100%;
+    .tr-head{
+      padding: 10px 5px;
+    }
+
+    .tr-hazard {
+      font-size: 13px;
+      font-weight: bold;
+      text-indent: 12px;
+      background: #164153;
+      padding: 10px 20px;
+    }
+    .tr-risk {
+      font-size: 10px;
+    }
+    td {
+      box-sizing: border-box;
+      text-overflow: ellipsis;
+      vertical-align: middle;
+      position: relative;
+      padding: 2px 5px;
+      transition: background-color 0.25s ease;
+    }
+
+    .td-sno{ width: 5%; text-align:center; }
+    .td-riskCode{width: 5%; text-align: center; }
+    .td-riskSource{width: 15%; text-align: center; }
+    .td-riskType{width: 5%; text-align: center; }
+    .td-riskLevel{width: 5%; text-align: center; }
+    .td-riskReason{width: 15%; text-align: left; }
+    .td-riskConsequence{width: 10%; text-align: center; }
+    .td-measure{width: 20%; text-align: left; }
+    .td-reference{width: 10%; text-align: left; }
+    .td-checkResult{width: 5%; text-align: left; }
+    .td-action{width: 5%; text-align: left;}
+  }
+}
+
+</style>

+ 177 - 0
src/views/goaf/checkTask/manage/LeftCounter.vue

@@ -0,0 +1,177 @@
+<template>
+  <div class="content-container">
+    <el-row class="title-bar">
+      <p class="page-title">巡检任务</p>
+    </el-row>
+
+    <el-row class="btn-group">
+      <el-button class="send-menu" @click="handleAdd">创建任务</el-button>
+    </el-row>
+
+    <el-row class="list-group">
+      <div>
+        <div :class="currentSelect === 0 ? 'list-item active' : 'list-item'" @click="selectItem(0)">
+          <el-col :span="18">
+            <p class="title">待处理</p>
+          </el-col>
+        </div>
+        <div :class="currentSelect === 1 ? 'list-item active' : 'list-item'" @click="selectItem(1)">
+          <el-col :span="18">
+            <p class="title">处理完成</p>
+          </el-col>
+        </div>
+
+        <div :class="currentSelect === 2 ? 'list-item active' : 'list-item'" @click="selectItem(2)">
+          <el-col :span="18">
+            <p class="title">逾期</p>
+          </el-col>
+        </div>
+      </div>
+    </el-row>
+    <task ref="AddCheckTask" title="新增检查任务" @formSuccess="loadData" />
+  </div>
+</template>
+<script>
+
+import Task from './CheckTask.vue'
+import { getCheckTaskCounter } from '@/api/aqpt/checkTaskStatisApi'
+
+export default {
+  name: 'CheckTaskCounter',
+  components: {
+    Task
+  },
+  data() {
+    return {
+      currentSelect: 0
+    }
+  },
+  mounted() {
+    this.getData()
+  },
+  methods: {
+
+    // Load Data
+    loadData() {
+      this.getData()
+      this.setItem(this.currentSelect)
+    },
+
+    // Add Action
+    handleAdd() {
+      this.$refs['AddCheckTask'].showAddModel()
+    },
+
+    // fetch data
+    getData() {
+      getCheckTaskCounter().then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.counter = data
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // 选中事件
+    selectItem(ival) {
+      this.currentSelect = ival
+      this.$emit('selectItem', ival)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.content-container {
+  margin: 10px;
+  height: calc(100vh - 90px);
+
+  .title-bar {
+    height: 40px;
+    line-height: 40px;
+    text-indent: 15px;
+    background: #113849;
+    margin-bottom: 15px;
+
+    .page-title {
+      font-size: 16px;
+      color: #FFF;
+      margin: 0;
+      font-weight: bold;
+    }
+  }
+
+  .sub-title-bar {
+    height: 40px;
+    line-height: 40px;
+    text-indent: 15px;
+    background: #113849;
+    margin-bottom: 15px;
+
+    .sub-title {
+      font-size: 16px;
+      color: #FFF;
+      margin: 0;
+    }
+  }
+
+  .btn-group {
+    margin-bottom: 10px;
+    padding-right: 15px;
+    .send-menu {
+      width: 100%;
+      background: #3D5F76;
+      color: #FFF;
+      border-color: #3D5F76;
+
+      &:hover {
+        background: #283c4c;
+        color: #FFF;
+        border-color: #283c4c;
+      }
+    }
+  }
+
+  .list-group {
+    background: #193142;
+
+    p {
+      margin: 0;
+      padding: 0;
+    }
+
+    .count {
+      text-align: right;
+    }
+
+    .list-item {
+      height: 40px;
+      line-height: 40px;
+      color: #FFF;
+      padding: 0 30px;
+      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>

+ 164 - 0
src/views/goaf/checkTask/manage/TaskEvent.vue

@@ -0,0 +1,164 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    size="35%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <!-- <vuescroll :ops="ops" style="height: calc(100vh - 310px)">
+        <el-timeline>
+          <el-timeline-item v-for="item in eventList" :key="item.eventId" :hide-timestamp="false">
+            <div class="record-item">
+              <p class="time">{{ item.eventTime }}</p>
+              <p class="title">{{ item.accountNameFr }}</p>
+              <p class="desc">
+                {{ item.eventDesc }}
+              </p>
+            </div>
+          </el-timeline-item>
+        </el-timeline>
+      </vuescroll> -->
+      <el-timeline>
+        <el-timeline-item v-for="item in eventList" :key="item.eventId" :hide-timestamp="false">
+          <div class="record-item">
+            <p class="time">{{ item.eventTime }}</p>
+            <p class="title">{{ item.accountNameFr }}</p>
+            <p class="desc">
+              {{ item.eventDesc }}
+            </p>
+          </div>
+        </el-timeline-item>
+      </el-timeline>
+      <div class="btn-group">
+        <el-button class="cancel-btn" @click="dialogVisible = false">关闭</el-button>
+      </div>
+    </div>
+  </el-drawer>
+</template>
+
+<script>
+import { getTaskEventByTaskId } from '@/api/system/taskEventApi'
+import vuescroll from 'vuescroll'
+
+export default {
+  name: 'AppListComponent',
+  components: {
+    // eslint-disable-next-line vue/no-unused-components
+    vuescroll
+  },
+  props: {
+    title: {
+      type: String,
+      default: '操作记录'
+    }
+  },
+  data() {
+    return {
+      ops: {
+        bar: {
+          keepShow: false,
+          background: 'rgba(144, 147, 153, 0.4)',
+          onlyShowBarOnScroll: false
+        }
+      },
+      rules: {},
+      dialogVisible: false,
+      eventList: []
+    }
+  },
+  mounted() {
+  },
+  methods: {
+
+    // Fetch Event Data
+    getEventList(data) {
+      getTaskEventByTaskId(data).then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.eventList = data
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // Show Event Dialog
+    showTaskEvent(taskId) {
+      this.eventList = []
+      this.dialogVisible = true
+      this.getEventList(taskId)
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.content-container {
+  margin: 15px;
+  position: relative;
+  height: calc(100% - 15px);
+
+  .el-timeline {
+    width: 360px;
+    margin: 15px auto 0;
+    padding: 0 0 0 90px;
+  }
+
+  .record-item {
+    position: relative;
+    top: -44px;
+
+    .time {
+      font-size: 12px;
+      font-weight: 400;
+      color: #A9BDC9;
+      position: absolute;
+      left: -165px;
+      top: 7px;
+    }
+
+    .title {
+      font-size: 16px;
+      font-weight: 400;
+      color: #A9BDC9;
+      line-height: 54px;
+    }
+
+    .desc {
+      font-size: 16px;
+      font-weight: 400;
+      color: #FFFFFF;
+      line-height: 2em;
+      margin: 0;
+    }
+
+  }
+
+  .btn-group {
+    margin-left: 30px;
+
+    .el-button {
+      margin: 0 0 15px;
+    }
+
+    .cancel-btn {
+      background: #004F7B;
+      border-color: #004F7B;
+      color: #FFF;
+
+      &:hover {
+        background: #026197;
+        border-color: #026197;
+      }
+    }
+  }
+
+}
+
+</style>

+ 147 - 0
src/views/goaf/checkTask/manage/check/CheckResult.vue

@@ -0,0 +1,147 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :append-to-body="true"
+    :modal="false"
+    :wrapper-closable="false"
+    size="30%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <el-form ref="ruleForm" :model="formData" :rules="rules" label-width="100px">
+
+        <el-form-item>
+          <el-radio v-model="formData.checkResult" :label="1">通过</el-radio>
+          <el-radio v-model="formData.checkResult" :label="0">不涉及</el-radio>
+          <el-radio v-model="formData.checkResult" :label="-1">不通过</el-radio>
+        </el-form-item>
+
+        <el-form-item label="说明" prop="taskDesc">
+          <el-input v-model="formData.checkDesc" type="textarea" :rows="5" />
+        </el-form-item>
+      </el-form>
+
+      <div class="btn-group">
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
+        <el-button class="cancel-btn" @click="dialogVisible = false">取 消</el-button>
+      </div>
+    </div>
+
+  </el-drawer>
+</template>
+<script>
+import { updateCheckTaskDoingItem } from '@/api/aqpt/checkTaskDoingApi'
+export default {
+  name: 'CheckResult',
+  props: {
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      formData: {
+        taskId: undefined,
+        checkRecordId: undefined,
+        checkResult: 1,
+        checkDesc: '',
+        dangerId: undefined,
+        attachList: []
+      },
+      rules: {
+        accountId: [
+          { required: true, message: '请输入执行人', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  mounted() { },
+  methods: {
+
+    // Show CheckResult Dialog
+    showView(taskId, checkRecordId) {
+      this.resetFormData()
+      this.formData.taskId = taskId
+      this.formData.checkRecordId = checkRecordId
+      this.dialogVisible = true
+    },
+
+    // Reset Form Data
+    resetFormData() {
+      this.formData = {
+        taskId: undefined,
+        checkRecordId: undefined,
+        checkResult: 1,
+        checkDesc: '',
+        dangerId: undefined,
+        attachList: []
+      }
+    },
+
+    // 提交
+    submitForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          updateCheckTaskDoingItem(this.formData).then((resp) => {
+            const { code, msg } = resp
+            if (code === 0) {
+              this.dialogVisible = false
+              this.$message.success(msg)
+              this.formSuccess()
+            } else {
+              this.$message.error(msg)
+            }
+          }).catch((error) => {
+            console.log(error)
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+
+    // 发送成功事件
+    formSuccess() {
+      this.$emit('formSuccess')
+    },
+
+    // Reset Form Fields
+    resetFormField(formName) {
+      this.$refs[formName].resetFields()
+    }
+
+  }
+}
+</script>
+<style lang="scss" scoped>
+.content-container {
+  margin: 15px;
+  position: relative;
+  height: calc(100% - 15px);
+
+  .btn-group {
+    margin-left: 90px;
+
+    .el-button {
+      margin: 0 15px;
+    }
+
+    .cancel-btn {
+      background: #004F7B;
+      border-color: #004F7B;
+      color: #FFF;
+
+      &:hover {
+        background: #026197;
+        border-color: #026197;
+      }
+    }
+  }
+
+}
+
+</style>

+ 548 - 0
src/views/goaf/checkTask/manage/check/Handle.vue

@@ -0,0 +1,548 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    :wrapper-closable="false"
+    size="100%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <el-row class="counter-wrap">
+        <el-col :span="4" class="left-counter-wrap">
+          <div class="list-group">
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">执行部门:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.handleGroupName }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">执行人员:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count"><i class="el-icon-user" />{{ viewData.handleAccountName }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">优先级:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count"><el-tag type="info" effect="plain" color="rgb(38 69 90)">{{ viewData.taskPriority | taskPriorityFilter }}</el-tag></p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">状态:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.status | taskStatusFilter }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">检查分类:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.checkCatTitle }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">风险点:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.riskPointTitle }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">检查清单:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.checklistTitle }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">预计开始时间:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.expectedStartTime }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">预计结束时间:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.expectedEndTime }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">实际开始时间:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.actualStartTime }}</p>
+              </el-col>
+            </div>
+
+            <div class="list-item">
+              <el-col :span="10">
+                <p class="title">实际结束时间:</p>
+              </el-col>
+              <el-col :span="14">
+                <p class="count">{{ viewData.actualEndTime }}</p>
+              </el-col>
+            </div>
+            <el-row class="btn-group">
+              <el-button class="send-menu" @click="handleTransfer">转交任务</el-button>
+              <el-button class="send-menu" @click="handleComplete">完成任务</el-button>
+              <el-button class="send-menu" @click="handleCancel">撤消任务</el-button>
+            </el-row>
+            <el-row class="btn-group">
+              <el-button class="send-menu" @click="handleBatchPass">全部通过</el-button>
+            </el-row>
+          </div>
+        </el-col>
+        <el-col :span="20" class="right-counter-wrap">
+          <table class="ck-table">
+            <tr class="tr-head">
+              <td class="td-sno">序号</td>
+              <td class="td-riskCode">风险编码</td>
+              <td class="td-riskSource">场所/步骤/部位</td>
+              <td class="td-riskType">类别</td>
+              <td class="td-riskReason">危险因素</td>
+              <td class="td-riskConsequence">事故后果</td>
+              <td class="td-riskLevel">等级</td>
+              <td class="td-measure">管控措施</td>
+              <td class="td-reference">依据</td>
+              <td class="td-checkResult">巡检结果</td>
+              <td class="td-action">操作</td>
+
+            </tr>
+            <template v-for="(hazard, hdx) in viewData.hazardList">
+              <tr :key="hazard.hazardId" class="tr-hazard">
+                <td colspan="11">{{ hdx+1 }}. {{ hazard.hazardTitle }}</td>
+              </tr>
+              <template v-for="(risk, rdx) in hazard.riskList">
+                <template v-for="(measure, mdx) in risk.measureList">
+                  <tr v-if="mdx==0" :key="measure.measureId">
+                    <td class="text-center" :rowspan="risk.measureCount">{{ rdx+1 }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskCode }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskSource }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskTypeId | riskTypeFilter }}</td>
+                    <td class="text-left" :rowspan="risk.measureCount">{{ risk.riskReason }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskConsequence }}</td>
+                    <td class="text-center" :rowspan="risk.measureCount">{{ risk.riskLevel | riskLevelFilter }}</td>
+                    <td class="text-left">
+                      <span>
+                        {{ mdx+1 }}.{{ measure.measureContent }}<br>
+                      </span>
+                    </td>
+                    <td class="text-left">
+                      <span>
+                        {{ mdx+1 }}.{{ measure.measureReference }}<br>
+                      </span>
+                    </td>
+                    <td>
+                      <span>{{ measure.checkResult | checkResultFilter }}</span>
+                    </td>
+                    <td>
+                      <el-link @click="handleCheckResult(measure.checkRecordId)">检查</el-link>
+                    </td>
+                  </tr>
+                  <tr v-else :key="measure.measureId">
+                    <td class="text-left">
+                      <span>
+                        {{ mdx+1 }}.{{ measure.measureContent }}<br>
+                      </span>
+                    </td>
+                    <td class="text-left">
+                      <span>
+                        {{ mdx+1 }}.{{ measure.measureReference }}<br>
+                      </span>
+                    </td>
+                    <td>
+                      <span>{{ measure.checkResult | checkResultFilter }}</span>
+                    </td>
+                    <td>
+                      <el-link @click="handleCheckResult(measure.checkRecordId)">检查</el-link>
+                    </td>
+                  </tr>
+                </template>
+              </template>
+            </template>
+          </table>
+        </el-col>
+      </el-row>
+      <transfer-task ref="TransferTask" title="转交任务" />
+      <check-result ref="CheckResult" title="巡检" @formSuccess="getData" />
+    </div>
+  </el-drawer>
+</template>
+
+<script>
+import { handleCheckTask, completeCheckTask, cancelCheckTask } from '@/api/aqpt/checkTaskApi'
+import { batchUpdateCheckTaskDoingItem } from '@/api/aqpt/checkTaskDoingApi'
+import { riskType, riskLevel, taskPriority, taskStatus, checkResult } from '@/utils'
+import TransferTask from './Transfer.vue'
+import CheckResult from './CheckResult.vue'
+export default {
+  components: {
+    TransferTask,
+    CheckResult
+  },
+  filters: {
+    riskTypeFilter(val) {
+      return riskType(val)
+    },
+    riskLevelFilter(val) {
+      return riskLevel(val)
+    },
+    taskPriorityFilter(val) {
+      return taskPriority(val)
+    },
+    taskStatusFilter(val) {
+      return taskStatus(val)
+    },
+    checkResultFilter(val) {
+      return checkResult(val)
+    }
+  },
+  data() {
+    return {
+      ops: {
+        bar: {
+          keepShow: false,
+          background: 'rgba(144, 147, 153, 0.4)',
+          onlyShowBarOnScroll: false
+        }
+      },
+      title: '',
+      dialogVisible: false,
+      viewData: {
+        taskId: undefined,
+        taskTitle: '',
+        taskCatId: undefined,
+        taskCatTitle: '',
+        launchGroupId: undefined,
+        launchGroupName: '',
+        launchPositionId: undefined,
+        launchPositionName: '',
+        launchAccountId: undefined,
+        launchAccountName: '',
+        executeGroupId: undefined,
+        executeGroupName: '',
+        executePositionId: undefined,
+        executePositionName: '',
+        executeAccountId: undefined,
+        executeAccountName: '',
+        status: undefined,
+        taskDesc: '',
+        expectedStartTime: undefined,
+        expectedEndTime: undefined,
+        actualStartTime: undefined,
+        actualEndTime: undefined,
+        riskPointId: undefined,
+        riskPointTitle: '',
+        checklistId: undefined,
+        checklistTitle: '',
+        checklistCatId: undefined,
+        checklistCatTitle: '',
+        checklistDesc: '',
+        checklistVersion: '',
+        hazardCount: 0,
+        hazardList: []
+      },
+      conditions: {
+        checklistId: undefined
+      },
+      total: 0
+    }
+  },
+  mounted() {},
+  methods: {
+
+    // 显示视图
+    showView(checklistId) {
+      this.conditions.checklistId = checklistId
+      this.dialogVisible = true
+      this.getData()
+    },
+
+    // 初始化数据
+    getData() {
+      const checklistId = this.conditions.checklistId
+      handleCheckTask(checklistId).then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.title = data.taskTitle
+          this.viewData = data
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // 转交任务
+    handleTransfer() {
+      const taskId = this.viewData.taskId
+      this.$refs['TransferTask'].showView(taskId)
+    },
+
+    // 转交任务
+    handleCheckResult(checkRecordId) {
+      const taskId = this.viewData.taskId
+      this.$refs['CheckResult'].showView(taskId, checkRecordId)
+    },
+
+    // 批量通过
+    handleBatchPass() {
+      const taskId = this.viewData.taskId
+      const checkResult = 1
+      this.$confirm('确定批量通过?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        batchUpdateCheckTaskDoingItem(taskId, checkResult).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.info('已取消操作')
+      })
+    },
+
+    // 取消任务
+    handleCancel() {
+      const taskId = this.viewData.taskId
+      this.$confirm('此操作将取消任务, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        cancelCheckTask(taskId).then((resp) => {
+          const { code, msg } = resp
+          if (code === 0) {
+            this.$message.success(msg)
+            this.formSuccess()
+          } else {
+            this.$message.error(msg)
+          }
+        }).catch((error) => {
+          console.log(error)
+        })
+      }).catch(() => {
+        this.$message.info('已取消操作')
+      })
+    },
+
+    // 完成任务
+    handleComplete() {
+      const taskId = this.viewData.taskId
+      this.$confirm('此操作将完成任务, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        completeCheckTask(taskId).then((resp) => {
+          const { code, msg } = resp
+          if (code === 0) {
+            this.$message.success((msg))
+            this.formSuccess()
+          } else {
+            this.$message.error(msg)
+          }
+        }).catch((error) => {
+          console.log(error)
+        })
+      }).catch(() => {
+        this.$message.info('已取消操作')
+      })
+    },
+    formSuccess() {
+      this.$emit('formSuccess')
+    },
+    resetFormField(formName) {
+      this.$refs[formName].resetFields()
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.content-container {
+  margin: 0 0 15px 15px;
+  height: calc(100vh - 100px);
+
+  .title-bar {
+    border-left: 6px solid #36556B;
+    height: 40px;
+    line-height: 40px;
+    text-indent: 15px;
+    background: #113849;
+    margin-bottom: 15px;
+
+    .page-title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #FFF;
+      margin: 0;
+    }
+  }
+
+  .btn-group {
+    width: 100%;
+    padding-right: 15px;
+    text-align: center;
+
+    .send-menu {
+      width: 60%;
+      background: #3D5F76;
+      color: #FFF;
+      border-color: #3D5F76;
+
+      &:hover {
+        background: #283c4c;
+        color: #FFF;
+        border-color: #283c4c;
+      }
+    }
+  }
+
+  .list-group {
+    height: calc(100vh - 85px);
+    background: #193142;
+
+    .sub-title-bar {
+      font-size: 16px;
+      color: #FFF;
+      margin: 0;
+    }
+
+    p {
+      text-align:right;
+      margin: 0;
+      padding: 0;
+    }
+
+    .count {
+      padding: 0;
+      text-align:left;
+      color: #8b8b8b;
+    }
+
+    .ck-desc {
+      text-align: left;
+      text-indent: 24px;
+      color: #8b8b8b;
+    }
+
+    .list-item {
+      height: 40px;
+      line-height: 40px;
+      color: #FFF;
+      padding: 0 5px;
+      font-size: 13px;
+
+      &.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);
+        }
+      }
+    }
+  }
+
+  .ck-table {
+    color: #FFF;
+    background-color: #0C3444;
+    font-size: 14px;
+    text-indent: initial;
+    border-spacing: 1px;
+    border: #1F3C51 1px solid;
+    padding: 10px 20px;
+    flex: 1;
+    width: 100%;
+    max-width: 100%;
+    .tr-head{
+      padding: 10px 5px;
+    }
+
+    .tr-hazard {
+      font-size: 13px;
+      font-weight: bold;
+      text-indent: 12px;
+      background: #164153;
+      padding: 10px 20px;
+    }
+    .tr-risk {
+      font-size: 12px;
+    }
+    td {
+      box-sizing: border-box;
+      text-overflow: ellipsis;
+      vertical-align: middle;
+      position: relative;
+      padding: 2px 5px;
+      transition: background-color 0.25s ease;
+    }
+
+    .td-sno{ width: 5%; text-align:center; }
+    .td-riskCode{width: 5%; text-align: center; }
+    .td-riskSource{width: 15%; text-align: center; }
+    .td-riskType{width: 5%; text-align: center; }
+    .td-riskLevel{width: 5%; text-align: center; }
+    .td-riskReason{width: 15%; text-align: left; }
+    .td-riskConsequence{width: 10%; text-align: center; }
+    .td-measure{width: 20%; text-align: left; }
+    .td-reference{width: 10%; text-align: left; }
+    .td-checkResult{width: 5%; text-align: left; }
+    .td-action{width: 5%; text-align: left;
+    }
+  }
+  .el-link--inner{
+    color: #08A6DC!important;
+    font-size: 12px!important;
+  }
+}
+
+</style>

+ 156 - 0
src/views/goaf/checkTask/manage/check/Transfer.vue

@@ -0,0 +1,156 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    :wrapper-closable="false"
+    size="35%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <el-form ref="ruleForm" :model="formData" :rules="rules" label-width="100px">
+
+        <el-form-item label="执行人" prop="accountId">
+          <user-selector :default-val="formData.executeAccountId" @setUserInfo="handleSelectUser" />
+        </el-form-item>
+
+        <el-form-item label="任务说明" prop="taskDesc">
+          <el-input v-model="formData.taskDesc" type="textarea" :rows="4" />
+        </el-form-item>
+      </el-form>
+
+      <div class="btn-group">
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
+        <el-button class="cancel-btn" @click="dialogVisible = false">取 消</el-button>
+      </div>
+    </div>
+
+  </el-drawer>
+</template>
+
+<script>
+import { transferCheckTask } from '@/api/aqpt/checkTaskApi'
+import UserSelector from '@/components/UserSelector/index'
+
+export default {
+  components: { UserSelector },
+  props: {
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      formData: {
+        taskId: undefined,
+        riskPointId: undefined,
+        executeGroupId: undefined,
+        executePositionId: undefined,
+        executeAccountId: undefined
+      },
+      rules: {
+        executeAccountId: [
+          { required: true, message: '请输入执行人', trigger: 'blur' }
+        ]
+      },
+      viewData: {},
+      actionType: '',
+      userSelObj: undefined
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+    handleSelectUser(obj) {
+      this.formData.executeAccountId = obj.accountId
+      this.formData.executeGroupId = obj.groupId
+      this.formData.executePosition = obj.positionId
+    },
+
+    // Show Transfer Dialog
+    showView(taskId) {
+      this.resetFormData()
+      this.formData.taskId = taskId
+      this.dialogVisible = true
+    },
+
+    // Reset Form Data
+    resetFormData() {
+      this.formData = {
+        taskId: undefined,
+        riskPointId: undefined,
+        executeGroupId: undefined,
+        executePositionId: undefined,
+        executeAccountId: undefined
+      }
+    },
+    // 提交
+    submitForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          transferCheckTask(this.formData).then((resp) => {
+            const { code, msg } = resp
+            if (code === 0) {
+              this.dialogVisible = false
+              this.$message.success(msg)
+              this.formSuccess()
+            } else {
+              this.$message.error(msg)
+            }
+          }).catch((error) => {
+            console.log(error)
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    formSuccess() {
+      this.$emit('formSuccess')
+    },
+    resetFormField(formName) {
+      this.$refs[formName].resetFields()
+    }
+
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.task-info-component {
+  margin: 15px;
+  position: relative;
+  height: calc(100% - 15px);
+
+  .btn-group {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+
+    .el-button {
+      width: 100%;
+      margin: 0 0 15px;
+    }
+
+    .cancel-btn {
+      background: #004F7B;
+      border-color: #004F7B;
+      color: #FFF;
+
+      &:hover {
+        background: #026197;
+        border-color: #026197;
+      }
+    }
+  }
+
+}
+
+</style>

+ 45 - 0
src/views/goaf/checkTask/manage/index.vue

@@ -0,0 +1,45 @@
+<template>
+  <div class="page-container">
+    <el-row class="counter-wrap">
+      <el-col :span="4" class="left-counter-wrap">
+        <left-counter ref="LeftCounter" :current-select="viewCode" @selectItem="selectItem" />
+      </el-col>
+      <el-col :span="20" class="right-counter-wrap">
+        <check-task-list ref="TaskList" @operationalUpdate="actionUpdate" />
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script>
+import LeftCounter from './LeftCounter.vue'
+import CheckTaskList from './CheckTaskList.vue'
+
+export default {
+  name: 'CheckTaskIndex',
+  components: {
+    LeftCounter,
+    CheckTaskList
+  },
+  data() {
+    return {
+      viewCode: 'MyCreated'
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    // 选择变化
+    selectItem(action) {
+      this.$refs['TaskList'].loadData(action)
+    },
+
+    // 操作更新
+    actionUpdate() {
+      this.$refs['LeftCounter'].loadData()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 312 - 0
src/views/goaf/checkTask/plan/components/CheckDef.vue

@@ -0,0 +1,312 @@
+<template>
+  <el-drawer
+    :title="title"
+    :modal-append-to-body="false"
+    :modal="false"
+    :wrapper-closable="false"
+    size="30%"
+    :visible.sync="dialogVisible"
+  >
+    <div class="content-container">
+      <el-form ref="ruleForm" :model="formData" :rules="rules" label-position="right" label-width="100px">
+        <el-form-item label="检查名称" prop="checkTitle">
+          <el-input v-model="formData.checkTitle" />
+        </el-form-item>
+
+        <el-form-item label="检查类别" prop="checkCatId">
+          <check-cat-selector v-model="formData.checkCatId" />
+        </el-form-item>
+        <el-form-item label="组织部门">
+          <el-cascader
+            :options="groupData"
+            :props="{ checkStrictly: true ,emitPath:false}"
+            style="min-width:260px"
+            filterable
+            clearable
+            @change="handleChange"
+          >
+            <template slot-scope="{ node, data }">
+              <span>{{ data.label }}</span>
+              <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
+            </template>
+          </el-cascader>
+        </el-form-item>
+        <el-form-item label="执行人员" prop="executeAccountId">
+          <el-select v-model="formData.accountId" 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-item label="检查清单" prop="checklistId">
+          <checklist-selector v-model="formData.checklistId" />
+        </el-form-item>
+
+        <el-form-item label="开始时间" prop="startDate">
+          <el-date-picker
+            v-model="formData.defStartDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            style="width: 100%"
+          />
+        </el-form-item>
+        <el-form-item label="结束时间" prop="endDate">
+          <el-date-picker
+            v-model="formData.defEndDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            style="width: 100%"
+          />
+        </el-form-item>
+        <el-form-item label="频率" prop="timeSpan">
+          <JobSelector v-model="formData.jobId" :job-class-id="jobClassId" />
+        </el-form-item>
+        <el-form-item label="说明" prop="checkDesc">
+          <el-input v-model="formData.checkDesc" type="textarea" :rows="4" />
+        </el-form-item>
+      </el-form>
+      <div class="btn-group">
+        <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
+        <el-button class="cancel-btn" @click="dialogVisible = false">取 消</el-button>
+      </div>
+    </div>
+  </el-drawer>
+</template>
+
+<script>
+import { ACTION_ADD, ACTION_UPDATE } from '@/utils/actionType'
+import { createCheckDef, updateCheckDef } from '@/api/aqpt/checkDefApi'
+import { mapGetters } from 'vuex'
+import { ChecklistSelector, JobSelector } from '@/components'
+import CheckCatSelector from '@/views/aqpt/components/CheckCatSelector/index.vue'
+import { toTree } from '@/utils/build-tree'
+import { getGroupByList } from '@/api/system/groupApi'
+import { getUserByPage } from '@/api/system/userApi'
+export default {
+  name: 'CheckDef',
+  components: { ChecklistSelector, JobSelector, CheckCatSelector },
+  data() {
+    return {
+      title: '',
+      dialogVisible: false,
+      jobClassId: 2, // 分发JOB ID
+      formData: {
+        'checkDefId': undefined,
+        'ocId': undefined,
+        'goafId': undefined,
+        'checkTitle': '',
+        'checkTypeId': undefined,
+        'groupId': undefined,
+        'positionId': undefined,
+        'accountId': '',
+        'accountName': '',
+        'positionName': '',
+        'groupName': '',
+        'checklistId': 639,
+        'defStartDate': '',
+        'defEndDate': '',
+        'checkCount': 0,
+        'checkCycleUnit': 0,
+        'jobId': undefined,
+        'checkDesc': ''
+      },
+      viewData: {},
+      rules: {
+        accountId: [
+          { required: true, message: '请选择执行人员', trigger: 'blur' }
+        ],
+        groupId: [
+          { required: true, message: '请选择执行部门', trigger: 'blur' }
+        ],
+        checkTitle: [
+          { required: true, message: '请填写检查任务名称', trigger: 'blur' }
+        ],
+        checklistId: [
+          { required: true, message: '请选择检查清单', trigger: 'blur' }
+        ],
+        checkCatId: [
+          { required: true, message: '请选择检查类别', trigger: 'blur' }
+        ],
+        jobId: [
+          { required: true, message: '请选择频率周期', trigger: 'blur' }
+        ]
+      },
+      userSelObj: {},
+      checkList: [],
+      groupData: [],
+      userList: [],
+      actionType: ''
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'userData'
+    ])
+  },
+  mounted() {
+    getGroupByList().then((resp) => {
+      const { code, data } = resp
+      if (code === 0) {
+        const temp = toTree(data, {
+          value: 'value',
+          name: 'label',
+          pValue: 'parentId'
+        }, {
+          value: 'groupId',
+          name: 'groupName',
+          pValue: 'parentId'
+        })
+        this.groupData = temp
+      }
+    })
+  },
+  methods: {
+    handleChange(groupId) {
+      getUserByPage({
+        page: 1,
+        limit: 999999,
+        keyword: '',
+        groupId
+
+      }).then((resp) => {
+        const { data } = resp
+        this.userList = data
+      })
+    },
+    // 选择执行人员
+    handleUserSelect(accountId) {
+      const item = this.userList.filter(item => item.accountId === accountId)
+      const user = item[0]
+      this.formData.groupId = user.groupId
+      this.formData.groupName = user.groupName
+      this.formData.accountName = user.accountName
+      this.formData.positionId = user.positionId
+      this.formData.positionName = user.positionName
+    },
+    // 新增窗口
+    showAddModel(riskPointId, riskPointTitle) {
+      this.resetFormData()
+      this.title = '新增任务计划'
+      this.actionType = ACTION_ADD
+      this.dialogVisible = true
+      this.formData.groupId = this.userData.groupId
+      this.formData.riskPointId = riskPointId
+    },
+
+    // 编辑窗口
+    showEditModel(data) {
+      this.resetFormData()
+      this.title = '编辑任务计划'
+      this.actionType = ACTION_UPDATE
+      this.dialogVisible = true
+      this.formData.accountId = parseFloat(data.accountId)
+    },
+
+    // 重置数据
+    resetFormData() {
+      this.formData = {
+        'checkDefId': undefined,
+        'ocId': undefined,
+        'goafId': undefined,
+        'checkTitle': '',
+        'checkTypeId': undefined,
+        'groupId': undefined,
+        'positionId': undefined,
+        'accountId': '',
+        'accountName': '',
+        'positionName': '',
+        'groupName': '',
+        'checklistId': 639,
+        'defStartDate': '',
+        'defEndDate': '',
+        'checkCount': 0,
+        'checkCycleUnit': 0,
+        'jobId': undefined,
+        'checkDesc': ''
+      }
+    },
+
+    // 提交
+    submitForm(formName) {
+      const { startDate, endDate } = this.formData
+      if (startDate === null) this.formData.startDate = ''
+      if (endDate === null) this.formData.endDate = ''
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          switch (this.actionType) {
+            case ACTION_ADD:
+              this.formData.ocId = this.userData.ocId
+              createCheckDef(this.formData).then((resp) => {
+                const { code, msg } = resp
+                if (code === 0) {
+                  this.dialogVisible = false
+                  this.$message.success(msg)
+                  this.formSuccess()
+                } else {
+                  this.$message.error(msg)
+                }
+              }).catch((error) => {
+                console.log(error)
+              })
+              break
+
+            case ACTION_UPDATE:
+              updateCheckDef(this.formData).then((resp) => {
+                const { code, msg } = resp
+                if (code === 0) {
+                  this.dialogVisible = false
+                  this.$message.success(msg)
+                  this.formSuccess()
+                } else {
+                  this.$message.error(msg)
+                }
+              }).catch((error) => {
+                console.log(error)
+              })
+              break
+          }
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    formSuccess() {
+      this.$emit('formSuccess')
+    },
+    resetFormField(formName) {
+      this.$refs[formName].resetFields()
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.content-container {
+  margin: 15px;
+  position: relative;
+  height: calc(100% - 15px);
+
+  .btn-group {
+    margin-left: 110px;
+    width: 100%;
+
+    .el-button {
+      margin: 0 15px;
+    }
+
+    .cancel-btn {
+      background: #004F7B;
+      border-color: #004F7B;
+      color: #FFF;
+
+      &:hover {
+        background: #026197;
+        border-color: #026197;
+      }
+    }
+  }
+
+}
+
+</style>

+ 224 - 0
src/views/goaf/checkTask/plan/components/CheckDefList.vue

@@ -0,0 +1,224 @@
+<template>
+  <div class="content-container">
+    <el-row class="tool-bar">
+      <el-col :span="12" class="left">
+        <div class="page-title">
+          <i class="el-icon el-icon-location" />任务计划
+        </div>
+      </el-col>
+      <el-col :span="12" class="right">
+        <el-input v-model="conditions.checkTitle" class="search-input m-right-15" placeholder="请输入内容">
+          <el-button slot="append" icon="el-icon-search" @click="getData()" />
+        </el-input>
+        <el-button type="primary" @click="handleAdd">添加</el-button>
+      </el-col>
+    </el-row>
+
+    <el-row class="content-body m-top-15">
+      <el-table v-loading="listLoading" class="page-table" border :data="dataList" height="calc(100vh - 220px)">
+        <el-table-column type="index" label="序号" header-align="center" align="center" width="60" />
+
+        <el-table-column prop="checkTitle" label="检查" header-align="center" align="center">
+          <template v-slot="{row}">
+            <span>{{ row.checkTitle }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="timeSpan" label="频率" header-align="center" align="center" width="120">
+          <template v-slot="{row}">
+            <span style="color: #20f704">{{ row.cycleTitle }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="groupName" label="部门" header-align="center" align="center">
+          <template v-slot="{row}">
+            <span>{{ row.groupName }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="accountName" label="执行人" header-align="center" align="center" width="100">
+          <template v-slot="{row}">
+            <el-popover v-if="row.accountName" trigger="hover" placement="top">
+              <p>部门: {{ row.groupName }}</p>
+              <p>岗位: {{ row.positionName }}</p>
+              <div slot="reference" class="name-wrapper">
+                <i class="el-icon-user" />
+                {{ row.accountName }}
+              </div>
+            </el-popover>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="defStartDate" label="起效时间" header-align="center" align="center" width="210">
+          <template v-slot="{row}">
+            <span v-if="row.defStartDate"><i class="el-icon-timer" /> {{ row.defStartDate }} -- {{ row.defEndDate }}</span>
+            <span v-else> - </span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="status" label="状态" header-align="center" align="center" width="180">
+          <template v-slot="{row}">
+            <div>
+              <el-switch
+                v-model="row.status"
+                active-text="执行中"
+                inactive-text="已停止"
+                active-color="#13ce66"
+                inactive-color="#C0CCDA"
+                :active-value="1"
+                :inactive-value="0"
+                @change="(status)=>handlerChangeStatus(status, row)"
+              />
+            </div>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="操作" header-align="center" align="center" width="130">
+          <template v-slot="{row}">
+            <el-button size="mini" type="info" @click="handleUpdate(row)">修改</el-button>
+            <el-button size="mini" type="danger" @click="handleDelete(row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination-wrap">
+        <pagination v-show="total>0" :total="total" :page.sync="conditions.page" :limit.sync="conditions.limit" @pagination="getData" />
+      </div>
+    </el-row>
+    <check-def ref="AddCheckDef" title="新增检查计划" @formSuccess="getData" />
+    <check-def ref="EditCheckDef" title="修改检查计划" @formSuccess="getData" />
+  </div>
+</template>
+
+<script>
+import CheckDef from './CheckDef'
+import { deleteCheckDefById, getCheckDefByPage, updateGoafcheckdef } from '@/api/goaf/task'
+import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+
+export default {
+  components: {
+    Pagination,
+    CheckDef
+  },
+
+  data() {
+    return {
+      dataList: [],
+      total: 0,
+      listLoading: false,
+      conditions: {
+        page: 1,
+        limit: 10,
+        checkTitle: ''
+      }
+    }
+  },
+  created() {
+    this.getData()
+  },
+  methods: {
+    // Get Data From Server
+    getData() {
+      this.listLoading = true
+      getCheckDefByPage(this.conditions).then((resp) => {
+        this.listLoading = false
+        const { code, data, count } = resp
+        if (code === 0) {
+          this.conditions.total = count
+          this.dataList = data
+        }
+      })
+    },
+
+    // 添加
+    handleAdd() {
+      this.$refs['AddCheckDef'].showAddModel()
+    },
+
+    // 编辑
+    handleUpdate(data) {
+      this.$refs['EditCheckDef'].showEditModel(data)
+    },
+
+    // 删除
+    handleDelete(data) {
+      const { riskPointId, checkTitle, checkDefId } = data
+      this.$confirm(`此操作将删除该数据${checkTitle}, 是否继续?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        deleteCheckDefById(riskPointId, checkDefId).then((resp) => {
+          const { code, msg } = resp
+          if (code === 0) {
+            this.getData()
+            this.$message.success(msg)
+          } else {
+            this.$message.error(msg)
+          }
+        }).catch((error) => {
+          console.log(error)
+        })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消删除' })
+      })
+    },
+
+    // Change Status
+    handlerChangeStatus(status, data) {
+      updateGoafcheckdef({ ...data, status }).then((resp) => {
+        const { code, msg } = resp
+        if (code === 0) {
+          this.getData()
+          this.$message.success(msg)
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.content-container {
+  background: #193142FF;
+  height: calc(100vh - 86px);
+  margin: 10px 10px 10px 0;
+
+  .page-title {
+    font-size: 18px;
+    font-weight: bold;
+    color: #FFFFFF;
+  }
+
+  .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;
+  }
+
+  .el-link {
+    color: #FFFFFF;
+  }
+}
+</style>

+ 20 - 0
src/views/goaf/checkTask/plan/index.vue

@@ -0,0 +1,20 @@
+<template>
+  <div class="check-def-list-container">
+    <check-def-list ref="CheckDefList" />
+  </div>
+</template>
+
+<script>
+import CheckDefList from './components/CheckDefList'
+export default {
+  name: 'CheckDefIndex',
+  components: {
+    CheckDefList
+  }
+}
+</script>
+<style lang="scss">
+.check-def-list-container{
+  margin-left: 10px;
+}
+</style>

+ 270 - 0
src/views/goaf/checkTask/record/LeftCounter.vue

@@ -0,0 +1,270 @@
+<template>
+  <div class="content-container">
+    <div class="list-group">
+      <el-row class="title-bar">
+        <p class="page-title">巡检记录</p>
+      </el-row>
+      <el-row class="sub-title-bar">
+        <p class="page-title">我的</p>
+      </el-row>
+      <div class="list-item" :class="curSel === 'MyTotal' ? 'active' : ''" @click="selectItem('MyTotal')">
+        <el-col :span="18">
+          <p class="title">总数:</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.myTotal }}</p>
+        </el-col>
+      </div>
+
+      <div class="list-item" :class="curSel === 'MyPassed' ? 'active' : ''" @click="selectItem('MyPassed')">
+        <el-col :span="18">
+          <p class="title">正常通过</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.myPassed }}</p>
+        </el-col>
+      </div>
+
+      <div class="list-item" :class="curSel === 'MyFailed' ? 'active' : ''" @click="selectItem('MyFailed')">
+        <el-col :span="18">
+          <p class="title">未通过</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.myFailed }}</p>
+        </el-col>
+      </div>
+
+      <div class="list-item" :class="curSel === 'MyToday' ? 'active' : ''" @click="selectItem('MyToday')">
+        <el-col :span="18">
+          <p class="title">今天</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.myToday }}</p>
+        </el-col>
+      </div>
+      <div class="list-item" :class="curSel === 'MyThisWeek' ? 'active' : ''" @click="selectItem('MyThisWeek')">
+        <el-col :span="18">
+          <p class="title">本周</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.myThisWeek }}</p>
+        </el-col>
+      </div>
+      <div class="list-item" :class="curSel === 'MyThisMonth' ? 'active' : ''" @click="selectItem('MyThisMonth')">
+        <el-col :span="18">
+          <p class="title">本月</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.myThisMonth }}</p>
+        </el-col>
+      </div>
+      <div class="list-item" :class="curSel === 'MyThisYear' ? 'active' : ''" @click="selectItem('MyThisYear')">
+        <el-col :span="18">
+          <p class="title">本年度</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.myThisYear }}</p>
+        </el-col>
+      </div>
+
+      <el-row class="sub-title-bar">
+        <p class="page-title">所有的</p>
+      </el-row>
+      <div class="list-item" :class="curSel === 'GroupTotal' ? 'active' : ''" @click="selectItem('GroupTotal')">
+        <el-col :span="18">
+          <p class="title">总记录数目:</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.groupTotal }}</p>
+        </el-col>
+      </div>
+
+      <div class="list-item" :class="curSel === 'GroupPassed' ? 'active' : ''" @click="selectItem('GroupPassed')">
+        <el-col :span="18">
+          <p class="title">正常通过</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.groupPassed }}</p>
+        </el-col>
+      </div>
+      <div class="list-item" :class="curSel === 'GroupFailed' ? 'active' : ''" @click="selectItem('GroupFailed')">
+        <el-col :span="18">
+          <p class="title">未通过</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.groupFailed }}</p>
+        </el-col>
+      </div>
+      <div class="list-item" :class="curSel === 'GroupTody' ? 'active' : ''" @click="selectItem('GroupTody')">
+        <el-col :span="18">
+          <p class="title">今天</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.groupToday }}</p>
+        </el-col>
+      </div>
+      <div class="list-item" :class="curSel === 'GroupThisWeek' ? 'active' : ''" @click="selectItem('GroupThisWeek')">
+        <el-col :span="18">
+          <p class="title">本周</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.groupThisWeek }}</p>
+        </el-col>
+      </div>
+      <div class="list-item" :class="curSel === 'GroupThisMonth' ? 'active' : ''" @click="selectItem('GroupThisMonth')">
+        <el-col :span="18">
+          <p class="title">本月</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.groupThisMonth }}</p>
+        </el-col>
+      </div>
+      <div class="list-item" :class="curSel === 'GroupThisYear' ? 'active' : ''" @click="selectItem('GroupThisYear')">
+        <el-col :span="18">
+          <p class="title">本年度</p>
+        </el-col>
+        <el-col :span="6">
+          <p class="count">{{ checkRecordCounter.groupThisYear }}</p>
+        </el-col>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+
+import { getCheckRecordCounter } from '@/api/aqpt/checkRecordStatisApi'
+export default {
+  components: {
+  },
+  data() {
+    return {
+      checkRecordCounter: {
+        myTotal: 0,
+        myPassed: 0,
+        myFailed: 0,
+        myToday: 0,
+        myThisWeek: 0,
+        myThisMonth: 0,
+        myThisYear: 0,
+        groupTotal: 0,
+        groupPassed: 0,
+        groupFailed: 0,
+        groupToday: 0,
+        groupThisWeek: 0,
+        groupThisMonth: 0,
+        groupThisYear: 0
+      },
+      curSel: 'MyTotal'
+    }
+  },
+  mounted() {
+    this.getData()
+  },
+  methods: {
+    // 初始化数据
+    getData() {
+      getCheckRecordCounter().then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.checkRecordCounter = data
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // 发送命令
+    selectItem(action) {
+      this.curSel = action
+      this.$emit('selectItem', action)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.content-container {
+  margin: 0 0 15px 15px;
+  height: calc(100vh - 100px);
+
+  .title-bar {
+    height: 40px;
+    line-height: 40px;
+    text-indent: 15px;
+    background: #113849;
+    margin-bottom: 15px;
+
+    .page-title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #FFF;
+      margin: 0;
+    }
+  }
+
+  .btn-group {
+    width: 100%;
+    margin-bottom: 15px;
+
+    .send-menu {
+      width: 100%;
+      background: #3D5F76;
+      color: #FFF;
+      border-color: #3D5F76;
+
+      &:hover {
+        background: #283c4c;
+        color: #FFF;
+        border-color: #283c4c;
+      }
+    }
+  }
+
+  .list-group {
+    height: calc(100vh - 85px);
+    background: #193142;
+
+    .sub-title-bar {
+      font-size: 16px;
+      color: #FFF;
+      margin: 0;
+    }
+
+    p {
+      margin: 0;
+      padding: 0;
+    }
+
+    .count {
+      text-align: right;
+    }
+
+    .list-item {
+      height: 40px;
+      line-height: 40px;
+      color: #FFF;
+      padding: 0 30px;
+      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>

+ 388 - 0
src/views/goaf/checkTask/record/RecordList.vue

@@ -0,0 +1,388 @@
+<template>
+  <div class="content-container">
+    <el-row class="tool-bar">
+      <el-col :span="12" class="left">
+        <div class="content-title">
+          {{ title }}
+        </div>
+      </el-col>
+      <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-input>
+        <el-button type="primary" @click="handleExport">导出Excel</el-button>
+      </el-col>
+    </el-row>
+    <el-row class="m-top-15">
+      <el-table v-loading="listLoading" class="page-table" border :data="dataList" height="calc(100vh - 240px)">
+        <el-table-column type="index" label="序号" header-align="center" align="center" width="80" />
+
+        <el-table-column prop="riskPointTitle" label="风险点" header-align="center" align="center" width="120">
+          <template v-slot="{row}">
+            <span>{{ row.riskPointTitle }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="accountName" label="检查人员" header-align="center" align="center" width="100">
+          <template v-slot="{row}">
+            <el-popover trigger="hover" placement="top">
+              <p>部门: {{ row.groupName }}</p>
+              <p>岗位: {{ row.positionName }}</p>
+              <div slot="reference" class="name-wrapper">
+                <i class="el-icon-user" /> {{ row.accountName }}
+              </div>
+            </el-popover>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="checkTime" label="检查时间" header-align="center" align="center" width="160">
+          <template v-slot="{row}">
+            <span><i class="el-icon-time" /> {{ row.checkTime }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="taskTitle" label="任务名称" header-align="center" align="center" width="150">
+          <template v-slot="{row}">
+            <span>{{ row.taskTitle }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="taskCatTitle" label="任务类型" header-align="center" align="center" width="100">
+          <template v-slot="{row}">
+            <span>{{ row.taskCatTitle }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="hazardTitle" label="风险单元" header-align="center" align="center" width="120">
+          <template v-slot="{row}">
+            <span>{{ row.hazardTitle }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="riskTitle" label="场所/环节/部位" header-align="center" align="center" width="120">
+          <template v-slot="{row}">
+            <span>{{ row.riskTitle }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="measureContent" label="检查内容" header-align="left" align="left">
+          <template v-slot="{row}">
+            <span>{{ row.measureContent }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="checkResult" label="检查结果" header-align="center" align="center" width="90">
+          <template v-slot="{row}">
+            <span v-if="row.checkResult===0" style="color: #20f704">未检查</span>
+            <span v-if="row.checkResult===1" style="color: #20f704">通过</span>
+            <span v-if="row.checkResult===-1" style="color: #fc5c04">不通过</span>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination-wrap">
+        <pagination v-show="total>0" :total="total" :page.sync="conditions.page" :limit.sync="conditions.limit" @pagination="getData" />
+      </div>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { getCheckRecordByPage, getCheckRecordByList } from '@/api/aqpt/checkRecordApi'
+import { formatDate, getWeekStartDate, getWeekEndDate, getMonthStartDate, getMonthEndDate, getYearStartDate, getYearEndDate, checkResult } from '@/utils'
+import Pagination from '@/components/Pagination'
+import { mapGetters } from 'vuex'
+
+export default {
+  name: 'RecordList',
+  components: { Pagination },
+  data() {
+    return {
+      dataList: [],
+      total: 0,
+      listLoading: false,
+      downloadLoading: false,
+      title: '',
+      action: 'MyTotal',
+      conditions: {
+        page: 1,
+        limit: 10,
+        keywords: '',
+        day: undefined,
+        accountId: undefined,
+        startDate: undefined,
+        endDate: undefined,
+        groupId: undefined,
+        checkResult: 0
+      },
+      exportList: [],
+      filename: '',
+      autoWidth: true,
+      bookType: 'xlsx'
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'userData'
+    ])
+  },
+  mounted() {
+    this.accountId = this.userData.userId
+    this.loadData('MyTotal')
+  },
+  methods: {
+
+    // 重置查询条件
+    resetConditionsData() {
+      this.conditions.accountId = undefined
+      this.conditions.groupId = undefined
+      this.conditions.day = undefined
+      this.conditions.startDate = undefined
+      this.conditions.endDate = undefined
+      this.conditions.checkResult = undefined
+    },
+
+    // 加载数据
+    loadData(action) {
+      this.action = action
+      const groupId = this.userData.groupId
+      const userId = this.userData.userId
+
+      switch (action) {
+        case 'MyTotal':
+          this.title = '我检查的所有记录'
+          this.resetConditionsData()
+          this.conditions.accountId = userId
+          break
+        case 'MyPassed':
+          this.title = '我检查通过的记录'
+          this.resetConditionsData()
+          this.conditions.accountId = userId
+          this.conditions.checkResult = 1
+          break
+        case 'MyFailed':
+          this.title = '我检查未通过的记录'
+          this.resetConditionsData()
+          this.conditions.accountId = userId
+          this.conditions.checkResult = -1
+          break
+        case 'MyToday':
+          this.title = '我今天的记录'
+          this.resetConditionsData()
+          this.conditions.accountId = userId
+          this.conditions.day = formatDate(new Date())
+          break
+        case 'MyThisWeek':
+          this.title = '我本周的记录'
+          this.resetConditionsData()
+          this.conditions.accountId = userId
+          this.conditions.startDate = getWeekStartDate()
+          this.conditions.endDate = getWeekEndDate()
+          break
+        case 'MyThisMonth':
+          this.title = '我本月的记录'
+          this.resetConditionsData()
+          this.conditions.accountId = userId
+          this.conditions.startDate = getMonthStartDate()
+          this.conditions.endDate = getMonthEndDate()
+          break
+        case 'MyThisYear':
+          this.title = '我本年度的记录'
+          this.resetConditionsData()
+          this.conditions.accountId = userId
+          this.conditions.startDate = getYearStartDate()
+          this.conditions.endDate = getYearEndDate()
+          break
+
+        case 'GroupTotal':
+          this.title = '部门记录'
+          this.resetConditionsData()
+          this.conditions.groupId = groupId
+          break
+        case 'GroupPassed':
+          this.title = '部门检查通过的'
+          this.resetConditionsData()
+          this.conditions.groupId = groupId
+          this.conditions.checkResult = 1
+          break
+        case 'GroupFailed':
+          this.title = '部门检查未通过的'
+          this.resetConditionsData()
+          this.conditions.groupId = groupId
+          this.conditions.checkResult = -1
+          break
+        case 'GroupToday':
+          this.title = '部门今天的'
+          this.resetConditionsData()
+          this.conditions.groupId = groupId
+          this.conditions.day = formatDate(new Date())
+          break
+        case 'GroupThisWeek':
+          this.title = '部门本周的'
+          this.resetConditionsData()
+          this.conditions.groupId = groupId
+          this.conditions.startDate = getWeekStartDate()
+          this.conditions.endDate = getWeekEndDate()
+          break
+        case 'GroupThisMonth':
+          this.title = '部门本月的'
+          this.resetConditionsData()
+          this.conditions.groupId = groupId
+          this.conditions.startDate = getMonthStartDate()
+          this.conditions.endDate = getMonthEndDate()
+          break
+        case 'GroupThisYear':
+          this.title = '部门本年度的'
+          this.resetConditionsData()
+          this.conditions.groupId = groupId
+          this.conditions.startDate = getYearStartDate()
+          this.conditions.endDate = getYearEndDate()
+          break
+      }
+      this.getData()
+    },
+    // 加载数据
+    getData() {
+      this.listLoading = true
+      getCheckRecordByPage(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)
+      })
+    },
+
+    handleExport() {
+      this.downloadLoading = true
+      getCheckRecordByList(this.conditions).then((resp) => {
+        const { code, data, msg } = resp
+        if (code === 0) {
+          this.exportList = data
+          this.exportExcel()
+        } else {
+          this.$message.error(msg)
+        }
+      }).catch((error) => {
+        console.log(error)
+      })
+    },
+
+    // 导出EXCEL
+    exportExcel() {
+      import('@/vendor/Export2Excel').then(excel => {
+        const tHeader = ['任务名称', '任务类别', '检查时间', '风险点', '风险单元', '危险因素', '检查内容', '检查结果']
+        const filterVal = ['taskTitle', 'taskCatTitle', 'checkTime', 'riskPointTitle', 'hazardTitle', 'riskTitle', 'measureContent', 'checkResult']
+        const list = this.exportList
+        const data = this.formatJson(filterVal, list)
+        excel.export_json_to_excel({
+          header: tHeader,
+          data,
+          filename: this.filename,
+          autoWidth: this.autoWidth,
+          bookType: this.bookType
+        })
+        this.downloadLoading = false
+      })
+    },
+
+    formatJson(filterVal, jsonData) {
+      return jsonData.map(v => filterVal.map(j => {
+        if (j === 'checkResult') {
+          return checkResult(v[j])
+        } else {
+          return v[j]
+        }
+      }))
+    }
+  }
+}
+</script>
+<style lang="scss">
+</style>
+<style lang="scss" scoped>
+.content-container {
+  background: #193142FF;
+  margin-left: 15px;
+  padding: 15px;
+  height: calc(100vh - 100px);
+
+  .page-title {
+    font-size: 16px;
+    font-weight: normal;
+    color: #FFFFFF;
+  }
+
+  .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;
+  }
+}
+
+.custom-switch-tag {
+  width: 76px;
+  height: 26px;
+  background: #5EB777;
+  border-radius: 13px;
+  position: relative;
+  font-size: 12px;
+  line-height: 26px;
+  text-align: left;
+  text-indent: 10px;
+  cursor: default;
+
+  &::after {
+    display: block;
+    content: "";
+    width: 14px;
+    height: 14px;
+    background: #FFFFFF;
+    border-radius: 50%;
+    right: 5px;
+    top: 6px;
+    position: absolute;
+  }
+
+  &.wait {
+    background: none;
+    border: 1px solid #3B5D73;
+    color: #3B5D73;
+    text-align: right;
+    box-sizing: border-box;
+    text-indent: 0;
+    padding-right: 10px;
+    line-height: 24px;
+
+    &::after {
+      top: 5px;
+      background: #3B5D73;
+      left: 5px;
+      right: inherit;
+    }
+  }
+}
+</style>

+ 39 - 0
src/views/goaf/checkTask/record/index.vue

@@ -0,0 +1,39 @@
+<template>
+  <div class="page-container">
+    <el-row class="counter-wrap">
+      <el-col :span="4" class="left-counter-wrap">
+        <record-counter ref="LeftCounter" @selectItem="selectItem" />
+      </el-col>
+      <el-col :span="20" class="right-counter-wrap">
+        <record-list ref="RecordList" />
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import RecordCounter from './LeftCounter.vue'
+import RecordList from './RecordList.vue'
+
+export default {
+  name: 'CheckRecord',
+  components: {
+    RecordCounter,
+    RecordList
+  },
+  data() {
+    return {}
+  },
+  mounted() {
+  },
+  methods: {
+    // 用户选择
+    selectItem(action) {
+      this.$refs['RecordList'].loadData(action)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 9 - 12
src/views/goaf/checklist/components/Checklist.vue

@@ -13,15 +13,8 @@
           <el-form-item label="名称" prop="checklistTitle">
             <el-input v-model="formData.checklistTitle" placeholder="输入检查表名称" />
           </el-form-item>
-
-          <!-- <el-form-item label="类别" prop="checklistCatId">
-            <checklist-cat-selector v-model="formData.checklistCatId" />
-          </el-form-item> -->
-          <!-- <el-form-item label="检查项目内容">
-            <el-input v-model="formData.checklistItemContent" type="textarea" rows="10" placeholder="输入描述" />
-          </el-form-item> -->
           <el-form-item label="说明" prop="checklistDesc">
-            <el-input v-model="formData.checklistDesc" type="textarea" rows="10" placeholder="输入说明" />
+            <el-input v-model="formData.checklistDesccs" type="textarea" rows="10" placeholder="输入说明" />
           </el-form-item>
         </el-form>
         <div class="btn-group">
@@ -38,7 +31,7 @@ import { ACTION_ADD, ACTION_UPDATE } from '@/utils/actionType'
 import { getChecklistById, createChecklist, updateChecklist } from '@/api/goaf/check'
 // import ChecklistCatSelector from '@/components/ChecklistCatSelector'
 import Vuescroll from 'vuescroll'
-
+import { mapGetters } from 'vuex'
 export default {
   components: {
     Vuescroll
@@ -64,7 +57,7 @@ export default {
         'checklistId': undefined,
         'ocId': '',
         'checklistTitle': '',
-        'checklistDesc': '',
+        'checklistDesccs': '',
         'checklistItemId': undefined,
         'checklistItemContent': ''
       },
@@ -76,7 +69,10 @@ export default {
       }
     }
   },
-  mounted() {
+  computed: {
+    ...mapGetters([
+      'userData'
+    ])
   },
   methods: {
 
@@ -85,6 +81,7 @@ export default {
       this.resetFormData()
       this.actionType = ACTION_ADD
       this.dialogVisible = true
+      this.formData.ocId = this.userData.ocId
     },
 
     // Show Edit Dialog
@@ -108,7 +105,7 @@ export default {
         'checklistId': undefined,
         'ocId': '',
         'checklistTitle': '',
-        'checklistDesc': '',
+        'checklistDesccs': '',
         'checklistItemId': undefined,
         'checklistItemContent': ''
       }

+ 6 - 1
src/views/goaf/checklist/components/ChecklistItem.vue

@@ -25,7 +25,7 @@
 <script>
 import { ACTION_ADD, ACTION_UPDATE } from '@/utils/actionType'
 import { createChecklistItem, updateChecklistItem } from '@/api/goaf/check'
-
+import { mapGetters } from 'vuex'
 export default {
   name: 'ChecklistItem',
   data() {
@@ -45,6 +45,11 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters([
+      'userData'
+    ])
+  },
   methods: {
     formSuccess() {
       this.$emit('formSuccess')

+ 0 - 1
src/views/goaf/checklist/index.vue

@@ -105,7 +105,6 @@ export default {
           'checklistItemContent': 'mrxs6p'
         })
       }
-      console.log({ items })
       this.dataList = items
       getChecklistByPage(this.conditions).then((resp) => {
         const { code, msg, data, total } = resp

+ 2 - 4
src/views/goaf/info/components/GoafInfo.vue

@@ -7,7 +7,7 @@
         </div>
       </el-col>
       <el-col :span="12" class="right">
-        <el-input v-model="conditions.data.goafName" class="search-input m-right-15" placeholder="请输入采空区名称">
+        <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="handleAdd">新增</el-button>
@@ -68,9 +68,7 @@ export default {
       conditions: {
         page: 1,
         limit: 10,
-        data: {
-          goafName: ''
-        }
+        goafName: ''
       }
     }
   },

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

@@ -237,7 +237,7 @@ export default {
         zoom: 1,
         maxBounds: bounds, // 地图拖动到边界后自动弹回
         maxBoundsViscosity: 0.2,
-        attributionControl: false,
+        attributionControl: true,
         zoomControl: true // zoomControl(缩放控制):确定缩放控制是否默认加载在地图上。
       })
       this.layerGroup = L.layerGroup().addTo(this.map)

+ 6 - 1
src/views/goaf/qrcode/components/GoafInfo.vue

@@ -27,7 +27,12 @@
         <el-table-column prop="goafName" label="采空区名称" />
         <el-table-column prop="positionName" label="二维码" header-align="center" align="center" width="70">
           <template v-slot="{row}">
-            <span class="icon iconfont icon-erweima" @click="showQrcode(row)" />
+            <span class="icon iconfont icon-erweima" style="color:#fff" @click="showQrcode(row)" />
+          </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>

+ 1 - 1
src/views/goaf/sensor/Model.vue

@@ -56,7 +56,7 @@
       </el-form-item>
       <el-form-item label="责任人员" prop="executeAccountId">
         <el-select v-model="formData.user" style="width:260px" filterable clearable @change="handleUserSelect">
-          <el-option v-for="item in userList" :key="item.accountId" :value="item.accountId" :label="item.accountRealName" />
+          <el-option v-for="item in userList" :key="item.accountId" :value="item.accountId" :label="item.accountName" />
         </el-select>
       </el-form-item>
     </el-form>