hyf 3 lat temu
rodzic
commit
ce5a64d241

+ 137 - 29
src/utils/index.js

@@ -561,6 +561,14 @@ export function getNestedChildren(arr = [], parent = 0) {
   }
   return res
 }
+export function Uint8ArrayToString(fileData) {
+  var dataString = ''
+  for (var i = 0; i < fileData.length; i++) {
+    dataString += String.fromCharCode(fileData[i])
+  }
+
+  return dataString
+}
 // 风险类型
 export function riskType(val) {
   const strs = [
@@ -587,9 +595,21 @@ export function riskLevel(val) {
 // 风险等级
 export function riskPointStatus(val) {
   const strs = [
-    '未知',
-    '安全受控',
-    '失控'
+    '未激活',
+    '活动'
+  ]
+  if (val >= 0) return strs[val]
+  else return '失控'
+}
+
+// 风险点等级
+export function riskPointType(val) {
+  const strs = [
+    '默认',
+    '风险点',
+    '网格区域',
+    '设备设施',
+    '工作人员'
   ]
   return strs[val]
 }
@@ -621,8 +641,28 @@ export function taskType(i) {
   const strs = [
     '未知',
     '常规',
-    '临时',
-    '立即'
+    '审批任务',
+    '巡检任务'
+  ]
+  return strs[i]
+}
+
+export function checkType(i) {
+  const strs = [
+    '未知',
+    '常规检查',
+    '临时检查',
+    '扫码检查'
+  ]
+  return strs[i]
+}
+
+export function checklistType(i) {
+  const strs = [
+    '未知',
+    '危险源辨识清单',
+    '巡检清单',
+    '评价清单'
   ]
   return strs[i]
 }
@@ -639,23 +679,68 @@ export function taskStatus(i) {
   }
 }
 
-export function checkResult(i) {
+export function checkStatus(i) {
   const strs = [
-    '没执行',
-    '通过',
-    '没通过',
-    '有隐患',
+    '未开始',
+    '执行中',
     '已完成'
   ]
-  return strs[i]
+  if (i === -1) {
+    return '已撤消'
+  } else {
+    return strs[i]
+  }
+}
+
+export function checkResult(i) {
+  if (i >= 0) {
+    const strs = [
+      '不涉及',
+      '通过'
+    ]
+    return strs[i]
+  } else {
+    if (i === -1) {
+      return '未通过'
+    } else if (i === -2) {
+      return '发现隐患'
+    }
+  }
+}
+
+export function targetType(val) {
+  const strs = [
+    '未知',
+    '风险点',
+    '科室',
+    '设备设施',
+    '人员',
+    '医生'
+  ]
+  return strs[val]
+}
+
+export function checklistRecordStatus(i) {
+  const strs = [
+    '待处理',
+    '未完成',
+    '全部通过'
+  ]
+  if (i === -1) {
+    return '没有通过'
+  } else {
+    return strs[i]
+  }
 }
 
 export function dangerStatus(i) {
   if (i >= 0) {
     const strs = [
-      '未开始',
-      '处理中',
-      '已完成'
+      '待提交',
+      '待评审',
+      '待整改',
+      '待验收',
+      '已整改'
     ]
     return strs[i]
   } else {
@@ -666,8 +751,10 @@ export function dangerStatus(i) {
 export function dangerLevel(i) {
   const strs = [
     '未知',
-    '一般隐患',
-    '重大隐患'
+    '重大隐患',
+    '较大隐患',
+    '严重隐患',
+    '一般隐患'
   ]
   return strs[i]
 }
@@ -719,6 +806,16 @@ export function dangerRectifyCat(i) {
   return strs[i]
 }
 
+export function appType(i) {
+  const strs = [
+    '未知',
+    '电脑端',
+    '手机APP',
+    '小程序'
+  ]
+  return strs[i]
+}
+
 export function alertLevel(i) {
   const strs = [
     '未知',
@@ -735,7 +832,30 @@ export function alertLevel(i) {
 export function alertStatus(i) {
   if (i >= 0) {
     const strs = [
-      '未知',
+      '待处理',
+      '已处理'
+    ]
+    return strs[i]
+  } else {
+    return '已撤销'
+  }
+}
+
+export function snapshotStatus(i) {
+  if (i >= 0) {
+    const strs = [
+      '待处理',
+      '已处理'
+    ]
+    return strs[i]
+  } else {
+    return '已撤销'
+  }
+}
+
+export function ticketStatus(i) {
+  if (i >= 0) {
+    const strs = [
       '待处理',
       '已处理'
     ]
@@ -782,18 +902,6 @@ export function ocAccess(i) {
   return strs[i]
 }
 
-export function targetType(val) {
-  const strs = [
-    '未知',
-    '风险点',
-    '科室',
-    '设备设施',
-    '人员',
-    '医生'
-  ]
-  return strs[val]
-}
-
 export function isNotNull(value) {
   if (value !== undefined && value !== 'undefined' && value !== null && value !== '') return true
   return false

+ 4 - 4
src/views/system/art/components/ArtList.vue

@@ -7,10 +7,10 @@
         </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 v-model="conditions.keywords" class="search-input m-right-15" size="mini" placeholder="请输入内容">
+          <el-button slot="append" icon="el-icon-search" size="mini" @click="getData()" />
         </el-input>
-        <el-button type="primary" @click="handleAdd">发布内容</el-button>
+        <el-button type="primary" size="mini" @click="handleAdd">发布内容</el-button>
       </el-col>
     </el-row>
 
@@ -32,7 +32,7 @@
 
         <el-table-column prop="artAuthor" width="120" label="发布人" header-align="center" align="center">
           <template v-slot="{row}">
-            <span><i class="el-icon-user" /> {{ row.editorName }}</span>
+            <span v-if="row.editorId > 0"><i class="el-icon-user" /> {{ row.editorName }}</span>
           </template>
         </el-table-column>
 

+ 4 - 4
src/views/system/art/components/LeftCat.vue

@@ -18,7 +18,7 @@
           <template v-slot="{ node, data }">
             <span class="custom-tree-node">
               <span class="label">{{ node.label }}</span>
-              <span class="right-icon" @click="event => clickItem(event,data)">
+              <span class="right-icon" @click.stop="event => clickItem(event,data)">
                 <i class="icon el-icon-caret-bottom" />
               </span>
             </span>
@@ -164,7 +164,7 @@ export default {
 <style lang="scss" scoped>
   .content-container {
     margin: 10px 0 10px 10px;
-    height: calc(100vh - 90px);
+    height: calc(100vh - 95px);
 
       .title-bar {
         position: relative;
@@ -187,7 +187,7 @@ export default {
         .right-icon {
           position: absolute;
           right: 15px;
-          top: 14px;
+          top: 8px;
           color: #5181A2;
           width: 14px;
           height: 14px;
@@ -260,7 +260,7 @@ export default {
         .right-icon {
           position: absolute;
           right: 10px;
-          top: 14px;
+          top: 8px;
           background: #5181A2;
           color: #FFFFFF;
           width: 14px;

+ 2 - 2
src/views/system/art/index.vue

@@ -2,7 +2,7 @@
   <div class="page-container">
     <el-row class="counter-wrap">
       <el-col :span="4" class="left-counter-wrap">
-        <left-cat @nodeClick="artCatSelChange" @treeInit="artCatSelChange" />
+        <left-cat @nodeClick="selChange" @treeInit="selChange" />
       </el-col>
       <el-col :span="20" class="right-counter-wrap">
         <art-list ref="ArtList" />
@@ -22,7 +22,7 @@ export default {
     ArtList
   },
   methods: {
-    artCatSelChange(data) {
+    selChange(data) {
       const { artCatId, artCatTitle } = data
       this.$refs['ArtList'].loadData(artCatId, artCatTitle)
     }

+ 29 - 1
src/views/system/checklist/components/Basic.vue

@@ -2,14 +2,33 @@
   <div class="content-container">
     <el-form label-position="right" label-width="100px">
       <el-form-item label="编辑"><i class="el-icon-edit info" @click="handleEdit(viewData)" /></el-form-item>
+
       <el-form-item label="名称">
+        <span v-if="status===0" class="info">{{ viewData.checklistTitle }}</span>
+        <el-input v-else v-model="formData.checklistTitle" placeholder="输入清单名称" />
+      </el-form-item>
+
+      <el-form-item label="分类">
         <span v-if="status===0" class="info">{{ viewData.checklistCatTitle }}</span>
         <checklist-cat-selector v-show="status===1" v-model="formData.checklistCatId" />
       </el-form-item>
+
+      <el-form-item label="类型">
+        <span v-if="status===0" class="info">{{ viewData.checklistTypeId | checklistTypeFilter }}</span>
+        <el-select v-show="status===1" v-model="formData.checklistTypeId" placeholder="请选择清单类型">
+          <el-option-group>
+            <el-option label="危险源清单" value="1" />
+            <el-option label="常规清单" value="2" />
+            <el-option label="评价清单" value="3" />
+          </el-option-group>
+        </el-select>
+      </el-form-item>
+
       <el-form-item label="说明:">
         <span v-if="status===0" class="info">{{ viewData.checklistDesc }}</span>
         <el-input v-else v-model="formData.checklistDesc" type="textarea" rows="10" placeholder="输入描述" />
       </el-form-item>
+
       <el-form-item v-if="status===1">
         <el-button type="primary" style="margin-top:10px" @click="submit">提交</el-button>
       </el-form-item>
@@ -19,10 +38,15 @@
 <script>
 import { updateChecklist } from '@/api/system/checklistApi'
 import ChecklistCatSelector from '@/components/ChecklistCatSelector'
+import { checklistType } from '@/utils'
 export default {
   name: 'ChecklistBasic',
   components: { ChecklistCatSelector },
-  filters: { },
+  filters: {
+    checklistTypeFilter(val) {
+      return checklistType(val)
+    }
+  },
   data() {
     return {
       ops: {
@@ -47,6 +71,9 @@ export default {
         author: ''
       },
       formData: {
+        checklistId: undefined,
+        checklistTitle: '',
+        checklistTypeId: undefined,
         checklistDesc: '',
         checklistCatId: undefined
       },
@@ -62,6 +89,7 @@ export default {
     showView(data) {
       this.resetFormData()
       this.viewData = data
+      this.formData.checklistId = data.checklistId
       this.dialogVisible = true
       this.status = 0
     },

+ 141 - 116
src/views/system/checklist/components/ChecklistItem.vue

@@ -1,65 +1,65 @@
 <template>
-  <ul v-if="itemList">
+  <ul v-if="itemList && itemList.length > 0">
     <li v-for="(item, itemIdx) in itemList" :key="item.itemCode">
       <el-row class="checklist-item">
-        <el-col :span="1">
-          <template v-if="item.status !== 2">
-            <span v-if="item.parentId===0&&itemIdx===itemList.length-1" style="margin-right:10px" @click="handleAddItem(1,item,itemIdx+2,itemList)"><i class="el-icon-plus" /> </span>
-            <template v-if="(item.itemType === 1||item.status === 2)&&item.status !== -1">
-              <span @click="handleAddItem(2,item, itemIdx+2)"><i class="el-icon-zoom-in" /> </span>
-            </template>
+        <el-col :span="2">
+          <span style="margin:0 5px" title="新增同级目录项" @click="handleAddItemBrother(item, itemIdx+1, itemList)"><i class="el-icon-plus" /> </span>
+          <template v-if="item.children && item.children.length >=0 && item.pointList && item.pointList.length<=0">
+            <span title="新增下级目录项" @click="handleAddItemSub(item)"><i class="el-icon-zoom-in" /> </span>
           </template>
           <span v-else> &nbsp;</span>
         </el-col>
 
-        <el-col :span="3" class="index">
-          <span>{{ itemIdx + 1 }}</span>
+        <el-col :span="2" class="index">
+          <span v-if="nodePath!==''">{{ nodePath }}.{{ itemIdx + 1 }}</span>
+          <span v-else>{{ itemIdx + 1 }}</span>
         </el-col>
 
         <el-col :span="18" class="title">
-          <div v-if="item.editAble" class="flex-start">
-            <el-input v-model="item.itemTitle" type="text" @blur="cancelEdit(item)" />
-            <el-button size="mini" style="margin:5px 10px" @click="saveEditItem(item)">保存</el-button>
+          <div v-if="item.editMode" class="flex-start">
+            <el-input v-model="item.itemTitle" size="mini" style="flex: 1;" />
+            <el-button size="mini" style="margin:5px 10px" @click="saveItem(item)">保存</el-button>
+            <el-button size="mini" style="margin:5px 10px" @click="cancelEdit(item)">放弃</el-button>
           </div>
           <span v-else>{{ item.itemTitle }}</span>
         </el-col>
 
         <el-col :span="2" class="bt-container">
-          <template v-if="item.status !== 2&&item.status !== -1">
-            <span class="hide" @click="handleEditItem(item)"> <i class="el-icon-edit" /> </span>
-            <span class="hide" style="margin:0 10px" @click="handleDeleteItem(item)"> <i class="el-icon-delete" /> </span>
-            <span v-if="item.itemType === 2" class="hide" @click="handleAddPoint(item)"><i class="el-icon-circle-plus" /> </span>
+          <template v-if="!item.editMode">
+            <span class="hide" title="编辑目录项" @click="handleEditItem(item)"> <i class="el-icon-edit" /> </span>
+            <span class="hide" title="删除目录项" style="margin:0 10px" @click="handleDeleteItem(item)"> <i class="el-icon-delete" /> </span>
+            <span v-if="item.children && item.children.length <= 0 && item.pointList && item.pointList.length >=0 " class="hide" title="添加内容项" @click="handleAddPoint(item)"><i class="el-icon-circle-plus" /> </span>
           </template>
         </el-col>
       </el-row>
 
-      <checklist-item :item-list="item.children" @actionUpdate="actionUpdate" />
+      <checklist-item :item-list="item.children" :node-path="nodePath===''? (itemIdx+1): nodePath+'.'+(itemIdx+1)" @actionUpdate="actionUpdate" />
 
       <ul class="point-container">
         <li v-for="(point, pointIdx) in item.pointList" :key="point.pointCode" class="checklist-point">
           <el-row>
-            <el-col :span="1">
-              <span>&nbsp;</span>
+            <el-col :span="3" class="index">
+              <i v-if="pointIdx>0" class="el-icon-sort-up" title="上移" @click="sortPoint(0,pointIdx,item.pointList)" />
+              <i v-if="item.pointList && item.pointList.length>pointIdx+1" title="下移" class="el-icon-sort-down" @click="sortPoint(1,pointIdx,item.pointList)" />
             </el-col>
 
-            <el-col :span="3" class="index">
-              <span class="text-indent"> {{ pointIdx + 1 }}</span>
-              <i v-if="pointIdx>0" class="el-icon-sort-up" @click="sortPoint(0,pointIdx,item.pointList)" />
-              <i v-if="item.pointList.length>pointIdx+1" class="el-icon-sort-down" @click="sortPoint(1,pointIdx,item.pointList)" />
+            <el-col :span="1">
+              <span class="text-indent"> {{ pointIdx + 1 }}>.</span>
             </el-col>
 
             <el-col :span="18" class="title">
-              <div v-if="point.editAble" class="flex-start">
-                <el-input v-model="point.pointContent" type="text" @blur="cancelEdit(point)" />
+              <div v-if="point.editMode" class="flex-start">
+                <el-input v-model="point.pointContent" size="mini" />
                 <el-button size="mini" style="margin:5px 10px" @click="savePoint(point)">保存</el-button>
+                <el-button size="mini" style="margin:5px 10px" @click="cancelEdit(point)">放弃</el-button>
               </div>
-              <!-- <span v-else class="text-indent" @click="handleAddPoint(point)">{{ point.pointContent }} </span> -->
+
               <span v-else class="text-indent">{{ point.pointContent }} </span>
             </el-col>
 
             <el-col :span="2" class="bt-container">
-              <span class="hide" @click="handleEditPoint(point)"><i class="el-icon-edit" /></span>
-              <span class="hide" style="margin:0 10px" @click="handleDeletePoint(point)"><i class="el-icon-delete" /></span>
+              <span class="hide" title="编辑内容项" @click="handleEditPoint(point)"><i class="el-icon-edit" /></span>
+              <span class="hide" style="margin:0 10px" title="删除内容项" @click="handleDeletePoint(point)"><i class="el-icon-delete" /></span>
             </el-col>
           </el-row>
         </li>
@@ -71,6 +71,7 @@
 <script>
 import { createChecklistItem, updateChecklistItem, deleteChecklistItemById } from '@/api/system/checklistItemApi'
 import { createChecklistItemPoint, updateChecklistItemPoint, deleteChecklistItemPointById } from '@/api/system/checklistItemPointApi'
+import { isNotNull } from '@/utils'
 
 export default {
   name: 'ChecklistItem',
@@ -78,6 +79,10 @@ export default {
     itemList: {
       type: Array,
       default: undefined
+    },
+    nodePath: {
+      type: [String, Number],
+      default: ''
     }
   },
   data() {
@@ -87,48 +92,47 @@ export default {
   },
   mounted() { },
   methods: {
+    isNotNull,
 
-    // Show Data
+    // 显示数据
     showData(data) {
       this.viewData = data
     },
 
-    handleAddItem(type, item, sortNo, itemList) {
-      let _item = {}
-      if (type === 1) {
-        _item = {
-          itemTitle: '新增item',
-          editAble: true,
-          status: 2,
-          itemType: 1,
-          parentId: item.parentId,
-          checklistId: item.checklistId,
-          sortNo,
-          children: []
-        }
-        itemList.push(_item)
-      } else {
-        _item = {
-          itemTitle: `新增${item.itemTitle}子集item`,
-          editAble: true,
-          status: 2,
-          itemType: 2,
-          parentId: item.itemId,
-          checklistId: item.checklistId,
-          sortNo
-        }
-        if (item.itemType === 1) {
-          if (item.children) {
-            item.children.push(_item)
-          } else {
-            item.children = [_item]
-          }
-          this.$forceUpdate()
-        }
+    // 添加下一个同级节点
+    handleAddItemBrother(item, idx, itemList) {
+      const newItem = {
+        itemId: 0,
+        itemTitle: '新增item',
+        editMode: true,
+        itemType: 1,
+        parentId: item.parentId,
+        checklistId: item.checklistId,
+        sortNo: item.sortNo + 1,
+        children: []
       }
+      itemList.splice(idx, 0, newItem)
+      this.$forceUpdate()
     },
-    saveEditItem(item) {
-      if (item.status === 2) {
+
+    // 添加子结点
+    handleAddItemSub(item) {
+      const newItem = {
+        itemId: 0,
+        itemTitle: `新增${item.itemTitle}子集item`,
+        itemType: 1,
+        parentId: item.itemId,
+        checklistId: item.checklistId,
+        sortNo: item.children.length,
+        editMode: true
+      }
+      item.children.push(newItem)
+      this.$forceUpdate()
+    },
+
+    // "保存" Item
+    saveItem(item) {
+      if (item.itemId <= 0) {
         createChecklistItem(item).then((resp) => {
           const { data } = resp
           this.formData = data
@@ -147,14 +151,17 @@ export default {
           console.log(error)
         })
       }
-      item.editAble = false
+      item.editMode = false
       this.$forceUpdate()
     },
+
+    // 编辑 Item
     handleEditItem(item) {
-      item.editAble = true
+      item.editMode = true
       this.$forceUpdate()
     },
 
+    // 删除 Item
     handleDeleteItem(item) {
       const { checklistId, itemId } = item
       const self = this
@@ -174,41 +181,48 @@ export default {
       })
     },
 
+    // 新增 Point
     handleAddPoint(item) {
       item.pointList = item.pointList || []
       item.pointList.push({
-        pointContent: 'point',
         itemId: item.itemId,
+        pointId: 0,
         checklistId: item.checklistId,
-        editAble: true,
-        status: 2
+        pointContent: 'point',
+        sortNo: item.pointList.length + 1,
+        editMode: true
       })
       this.$forceUpdate()
     },
 
-    savePoint(point) {
-      createChecklistItemPoint(point).then((resp) => {
-        point.editAble = false
-        this.$emit('actionUpdate')
-        this.$forceUpdate()
-      }).catch((error) => {
-        console.log(error)
-      })
-    },
-
-    saveEdit(point) {
-      updateChecklistItemPoint(point).then((resp) => {
-        point.editAble = false
-        this.$emit('actionUpdate')
-        this.$forceUpdate()
-      }).catch((error) => {
-        console.log(error)
-      })
-    },
+    // 编辑 Point
     handleEditPoint(point) {
-      point.editAble = true
+      point.editMode = true
       this.$forceUpdate()
     },
+
+    // 保存 Point
+    savePoint(point) {
+      if (point.pointId <= 0) {
+        createChecklistItemPoint(point).then((resp) => {
+          point.editMode = false
+          this.$emit('actionUpdate')
+          this.$forceUpdate()
+        }).catch((error) => {
+          console.log(error)
+        })
+      } else {
+        updateChecklistItemPoint(point).then((resp) => {
+          point.editMode = false
+          this.$emit('actionUpdate')
+          this.$forceUpdate()
+        }).catch((error) => {
+          console.log(error)
+        })
+      }
+    },
+
+    // 删除 Point
     handleDeletePoint(point) {
       const { checklistId, itemId, pointId } = point
       this.$confirm(`此操作将删除该数据, 是否继续?`, '提示', {
@@ -225,30 +239,35 @@ export default {
         this.$message({ type: 'info', message: '已取消删除' })
       })
     },
-    actionUpdate() {
-      this.$emit('actionUpdate')
-      this.$forceUpdate()
-    },
+
+    // 放弃修改
     cancelEdit(node) {
-      delete node.editAble
+      node.editMode = false
       this.$forceUpdate()
     },
-    sortPoint(status, index, items) {
-      const point = items[index]
+
+    // 保存点
+    sortPoint(status, index, pointList) {
+      const point = pointList[index]
       var swapPoint = {}
       var sortNo = index + 1
       if (status === 0) { // 上移
-        swapPoint = items[index - 1]
+        swapPoint = pointList[index - 1]
         swapPoint.sortNo = sortNo
-        sortNo = sortNo - 1
       } else {
-        swapPoint = items[index + 1]
+        swapPoint = pointList[index + 1]
         swapPoint.sortNo = sortNo
         sortNo = sortNo + 1
       }
       point.sortNo = sortNo
       this.saveEdit(swapPoint)
       this.saveEdit(point)
+    },
+
+    // 更新
+    actionUpdate() {
+      this.$emit('actionUpdate')
+      this.$forceUpdate()
     }
   }
 }
@@ -261,30 +280,36 @@ ul {
     min-height: 1px;
   }
 }
+.flex-start{
+  display: flex;
+}
 // .hide{
 //   display: none;
 // }
- .checklist-item {
-    color: #F7F7F7;
-    line-height: 1;
-    .el-col{
-      padding-top: 10px;
-      padding-bottom: 10px;
-   }
-  &.el-row{
-    display: flex;
-    justify-content: flex-start;
-    align-items: center;
-    &:hover{
-      .hide{
-        display: inline-block;
+   .checklist-item {
+      background-color: #435c70;
+      color: #F7F7F7;
+      line-height: 1;
+      .el-col{
+        padding-top: 10px;
+        padding-bottom: 10px;
+      }
+      &.el-row{
+        display: flex;
+        justify-content: flex-start;
+        align-items: center;
+        &:hover{
+          .hide{
+            display: inline-block;
+          }
+        }
       }
-    }
-  }
  }
 
  .checklist-point {
    color: #F7F7F7;
+   font-size: 12px;
+   font-weight: bold;
    line-height: 1;
    .el-col{
       padding-top: 10px;
@@ -310,7 +335,8 @@ ul ul{
 }
 .checklist-point{
   .index,.title{
-      text-indent: 30px;
+    text-indent: 30px;
+    font-size: 12px;
     }
     .index{
       [class^="el-icon-sort"]{
@@ -327,7 +353,6 @@ ul ul{
 }
 .el-row{
   .title{
-    background-color: #435c70;
     padding: 10px;
     box-sizing: border-box;
     border-bottom: 1px solid #587185;

+ 34 - 5
src/views/system/checklist/components/Content.vue

@@ -8,11 +8,17 @@
           </div>
         </el-col>
 
-        <el-col :span="12" class="right" />
+        <el-col :span="12" class="right">
+          <span class="note">
+            <i class="el-icon-warning" title="提示信息" />
+            1. 目录项:浅色背景内容;内容项:其它;
+            2. 左边操作目录项,右边操作内容项
+          </span>
+        </el-col>
       </el-row>
 
       <el-row class="content-body checklist-item-container">
-        <checklist-item :item-list="itemList" @actionUpdate="actionUpdate" />
+        <checklist-item :item-list="itemList" node-path="" @actionUpdate="actionUpdate" />
       </el-row>
     </vuescroll>
   </div>
@@ -48,6 +54,8 @@ export default {
   mounted() {
   },
   methods: {
+
+    // 显示内容
     showView(data) {
       this.dialogVisible = true
       this.checklistTitle = data.checklistTitle
@@ -55,10 +63,22 @@ export default {
         this.itemList = data.itemList
       } else {
         this.itemList = [
-          { checklistId: data.checklistId, parentId: 0, itemTitle: '点击+新增清单数据,并保存', status: -1 }
+          {
+            itemId: 0,
+            itemTitle: '点击+新增清单数据,并保存',
+            itemType: 1,
+            checklistId: data.checklistId,
+            parentId: 0,
+            sortNo: 1,
+            pointList: [],
+            children: [],
+            editMode: true
+          }
         ]
       }
     },
+
+    // 更新通知
     actionUpdate() {
       this.$emit('actionUpdate')
     }
@@ -72,9 +92,18 @@ export default {
 <style lang="scss" scoped>
 .content-container {
   margin: 0 0 15px 15px;
-  height: calc(100vh - 160px);
+  height: calc(100vh - 170px);
   background: #164153;
-  border-radius: 5px;
+
+  .tool-bar{
+    .note {
+      color: #cccccc;
+      font-size: 12px;
+      padding-top: 15px;
+      padding-right: 20px;
+    }
+  }
+
   .checklist-item-container{
     padding: 0 10px;
   }

+ 7 - 4
src/views/system/checklist/components/Details.vue

@@ -1,18 +1,19 @@
 <template>
   <el-drawer
     :title="title"
-    :append-to-body="false"
+    :append-to-body="true"
     :modal="false"
     :wrapper-closable="false"
-    size="99%"
+    size="100%"
     :visible.sync="dialogVisible"
   >
     <el-row class="content-container">
-      <el-col :span="19" class="right-counter-wrap">
+
+      <el-col :span="18" class="right-counter-wrap">
         <ChecklistContent ref="ChecklistContent" @actionUpdate="actionUpdate" />
       </el-col>
 
-      <el-col :span="5" class="left-counter-wrap">
+      <el-col :span="6" class="left-counter-wrap">
         <ChecklistInfo ref="ChecklistInfo" @actionUpdate="actionUpdate" />
       </el-col>
     </el-row>
@@ -41,6 +42,8 @@ export default {
   },
   mounted() {},
   methods: {
+
+    // 显示窗口
     showModel(checklistId) {
       this.checklistId = checklistId
       this.dialogVisible = true

+ 32 - 19
src/views/system/checklist/index.vue

@@ -8,52 +8,58 @@
       </el-col>
 
       <el-col :span="12" class="right">
-        <el-input v-model="conditions.keywords" style="width: 200px;" class="filter-item" prefix-icon="el-icon-search" size="mini" placeholder="请输入内容" @keyup.enter.native="getData" />
-        <el-button class="filter-item" style="margin-left: 10px;" type="primary" size="mini" icon="el-icon-search" @click="getData">查询</el-button>
-
+        <el-input v-model="conditions.keywords" class="search-input m-right-15" size="mini" placeholder="请输入内容">
+          <el-button slot="append" icon="el-icon-search" size="mini" @click="getData()" />
+        </el-input>
         <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">添加</el-button>
       </el-col>
     </el-row>
 
     <el-row class="content-body">
-      <el-table v-loading="listLoading" class="page-table" border :data="dataList" size="mini" height="calc(100vh - 218px)">
+      <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="80" />
 
-        <el-table-column prop="checklistTitle" label="评价清单" header-align="left" align="left" width="260">
+        <el-table-column prop="checklistTitle" label="名称" header-align="left" align="left">
           <template v-slot="{row}">
             <span><i class="el-icon-tickets" /> {{ row.checklistTitle }}</span>
           </template>
         </el-table-column>
 
-        <el-table-column prop="checklistCatTitle" label="类别" header-align="center" align="center" width="200">
+        <el-table-column prop="checklistCatTitle" label="分类" header-align="center" align="center" width="130">
           <template v-slot="{row}">
             <span><el-tag effect="plain" color="rgb(38 69 90)">{{ row.checklistCatTitle }}</el-tag></span>
           </template>
         </el-table-column>
 
+        <el-table-column prop="checklistCatTitle" label="类型" header-align="center" align="center" width="120">
+          <template v-slot="{row}">
+            <span><el-tag effect="plain" color="rgb(38 69 90)">{{ row.checklistTypeId | checklistTypeFilter }}</el-tag></span>
+          </template>
+        </el-table-column>
+
         <el-table-column prop="checklistDesc" label="说明" header-align="left" align="left">
           <template v-slot="{row}">
             <span>{{ row.checklistDesc }}</span>
           </template>
         </el-table-column>
 
-        <el-table-column prop="issuedAt" label="变更人" header-align="center" align="center" width="200">
+        <el-table-column prop="issuedAt" label="变更人" header-align="center" align="center" width="100">
           <template v-slot="{row}">
-            <i class="el-icon-user-solid" />
+            <i class="el-icon-user" />
             <span> {{ row.issuedAccountName }}</span>
           </template>
         </el-table-column>
 
-        <el-table-column prop="issuedAt" label="变更时间" header-align="center" align="center" width="200">
+        <el-table-column prop="issuedAt" label="变更时间" header-align="center" align="center" width="160">
           <template v-slot="{row}">
             <i class="el-icon-time" />
             <span> {{ row.issuedAt | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
           </template>
         </el-table-column>
 
-        <el-table-column label="操作" header-align="center" align="center" width="180">
+        <el-table-column label="操作" header-align="center" align="left" width="160">
           <template v-slot="{row}">
-            <el-button size="mini" icon="el-icon-view" type="primary" @click="handleDetails(row)">详情</el-button>
+            <el-button size="mini" type="primary" icon="el-icon-tickets" @click="handleDetails(row)">内容</el-button>
             <el-button v-if="row.isFixed !== 1" size="mini" icon="el-icon-delete" type="danger" @click="handleDelete(row)">删除</el-button>
           </template>
         </el-table-column>
@@ -64,7 +70,7 @@
       </div>
     </el-row>
 
-    <checklist ref="AddChecklist" title="新增" @formSuccess="formSuccess" />
+    <checklist ref="AddChecklist" title="新增" @formSuccess="AddChecklistSuccess" />
     <checklist-details ref="ChecklistDetails" title="详情" @formSuccess="getData" />
   </div>
 </template>
@@ -74,6 +80,7 @@ import Checklist from './components/Checklist'
 import ChecklistDetails from './components/Details'
 import { deleteChecklistById, getChecklistByPage } from '@/api/system/checklistApi'
 import { Pagination } from '@/components'
+import { checklistType } from '@/utils'
 
 export default {
   name: 'ChecklistIndex',
@@ -82,6 +89,11 @@ export default {
     Checklist,
     ChecklistDetails
   },
+  filters: {
+    checklistTypeFilter(val) {
+      return checklistType(val)
+    }
+  },
   data() {
     return {
       title: '清单管理',
@@ -102,6 +114,7 @@ export default {
   },
 
   methods: {
+
     // 请求数据
     getData() {
       this.listLoading = true
@@ -116,6 +129,12 @@ export default {
     },
 
     // 新增
+    AddChecklistSuccess(data) {
+      this.getData()
+      this.handleDetails(data)
+    },
+
+    // 修改
     handleAdd() {
       this.$refs['AddChecklist'].showAddModel()
     },
@@ -126,7 +145,7 @@ export default {
       this.$refs['ChecklistDetails'].showModel(checklistId)
     },
 
-    // Delete Handling
+    // 删除
     handleDelete(data) {
       const { checklistId, checklistTitle } = data
       this.$confirm(`此操作将删除该数据${checklistTitle}, 是否继续?`, '提示', {
@@ -144,13 +163,7 @@ export default {
       }).catch(() => {
         this.$message({ type: 'info', message: '已取消删除' })
       })
-    },
-
-    // 更新
-    formSuccess(data) {
-      this.getData()
     }
-
   }
 }
 </script>

+ 6 - 14
src/views/system/customer/customer/index.vue

@@ -81,14 +81,10 @@ export default {
     getData() {
       this.listLoading = true
       getCustomerByPage(this.conditions).then((resp) => {
-        const { code, data, total, msg } = resp
+        const { data, total } = resp
         this.listLoading = false
-        if (code === 200) {
-          this.total = total
-          this.dataList = data
-        } else {
-          this.$message.error(msg)
-        }
+        this.total = total
+        this.dataList = data
       }).catch((error) => {
         console.log(error)
       })
@@ -110,13 +106,9 @@ export default {
         type: 'warning'
       }).then(() => {
         deleteCustomerById(customerId).then((resp) => {
-          const { code, msg } = resp
-          if (code === 200) {
-            this.getData()
-            this.$message.success(msg)
-          } else {
-            this.$message.error(msg)
-          }
+          const { msg } = resp
+          this.getData()
+          this.$message.success(msg)
         }).catch((error) => {
           console.log(error)
         })

+ 2 - 2
src/views/system/customer/wx/index.vue

@@ -6,13 +6,13 @@
       </el-col>
 
       <el-col :span="12" class="right">
-        <el-input v-model="conditions.keywords" style="width: 200px;" class="filter-item" prefix-icon="el-icon-search" size="mini" placeholder="请输入内容" @keyup.enter.native="getData" />
+        <el-input v-model="conditions.keywords" style="width: 200px;" class="filter-item" prefix-icon="el-icon-search" placeholder="请输入内容" size="mini" @keyup.enter.native="getData" />
         <el-button class="filter-item" style="margin-left: 10px;" type="primary" size="mini" icon="el-icon-search" @click="getData">查询</el-button>
       </el-col>
     </el-row>
 
     <el-row class="content-body">
-      <el-table v-loading="listLoading" class="page-table" border :data="dataList" size="mini" height="calc(100vh - 280px)">
+      <el-table v-loading="listLoading" class="page-table" border :data="dataList" height="calc(100vh - 280px)">
         <el-table-column type="index" label="序号" header-align="center" align="center" width="80" />
 
         <el-table-column label="客户名称" width="200" align="center" header-align="center">

+ 5 - 4
src/views/system/doc/components/DirTree.vue

@@ -44,6 +44,7 @@ import Vuescroll from 'vuescroll'
 import Dir from './Dir'
 
 export default {
+  name: 'DirTree',
   components: {
     Vuescroll,
     Dir
@@ -186,9 +187,9 @@ export default {
 
   .content-container {
     margin : 10px 0 10px 10px;
-    height: calc(100vh - 90px);
+    height: calc(100vh - 95px);
     .list-group{
-      height: calc(100vh - 150px);
+      height: calc(100vh - 160px);
       overflow-y: auto;
       overflow-x: hidden;
       .title-bar {
@@ -212,7 +213,7 @@ export default {
         .right-icon {
           position: absolute;
           right: 15px;
-          top: 14px;
+          top: 8px;
           color: #5181A2;
           width: 14px;
           height: 14px;
@@ -235,7 +236,7 @@ export default {
       .right-icon {
         position: absolute;
         right: 10px;
-        top: 14px;
+        top: 8px;
         background: #5181A2;
         color: #FFFFFF;
         width: 14px;

+ 8 - 7
src/views/system/doc/components/FileList.vue

@@ -6,6 +6,7 @@
           <i class="el-icon-folder" /> {{ title }}
         </div>
       </el-col>
+
       <el-col :span="1" class="right">
         <el-upload
           multiple
@@ -14,20 +15,20 @@
           :show-file-list="false"
           action=""
         >
-          <el-button size="small" type="primary">上传</el-button>
+          <el-button size="mini" icon="el-icon-upload2" type="primary" style="margin-left: 10px;">上传</el-button>
         </el-upload>
       </el-col>
+
       <el-col :span="11" 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 v-model="conditions.keywords" class="search-input m-right-15" size="mini" placeholder="请输入内容">
+          <el-button slot="append" icon="el-icon-search" size="mini" @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 - 260px)">
+      <el-table v-loading="listLoading" class="page-table" border :data="dataList" size="mini" height="calc(100vh - 235px)">
         <el-table-column type="index" label="序号" width="80" header-align="center" align="center" />
         <el-table-column prop="fileTitle" label="文件名称" header-align="left" align="left">
           <template v-slot="{row}">
@@ -57,7 +58,7 @@
                 <a target="_blank" :href="row.fileUrl" dowload>下载</a>
               </el-button>
             </label>
-            <el-button size="mini" type="danger" @click="handleDelete(row)">删除</el-button>
+            <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(row)">删除</el-button>
           </template>
         </el-table-column>
 
@@ -176,7 +177,7 @@ export default {
 <style lang="scss" scoped>
   .content-container {
     margin: 10px 10px 10px 10px;
-    height: calc(100vh - 86px);
+    height: calc(100vh - 95px);
   }
  .right{
    display: flex;

+ 2 - 1
src/views/system/group/group/Group.vue

@@ -28,7 +28,7 @@
       </el-form>
 
       <div class="btn-group">
-        <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
+        <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
         <el-button class="cancel-btn" @click="dialogVisible = false">取消</el-button>
       </div>
     </div>
@@ -41,6 +41,7 @@ import { getGroupById, createGroup, updateGroup } from '@/api/system/groupApi'
 import GroupCatSelector from '@/components/GroupCatSelector'
 
 export default {
+  name: 'Group',
   components: { GroupCatSelector },
   props: {
     title: {

+ 1 - 1
src/views/system/group/group/GroupTree.vue

@@ -35,7 +35,7 @@ import Vuescroll from 'vuescroll'
 import Group from './Group.vue'
 
 export default {
-
+  name: 'GroupTree',
   components: {
     Vuescroll,
     Group

+ 1 - 1
src/views/system/group/index.vue

@@ -16,7 +16,7 @@ import GroupTree from './group/GroupTree.vue'
 import UserList from './user/UserList.vue'
 
 export default {
-
+  name: 'GroupUserIndex',
   components: {
     GroupTree,
     UserList

+ 1 - 0
src/views/system/group/user/GrantGroup.vue

@@ -40,6 +40,7 @@ import { getGrantGroupById, createGrantGroup, updateGrantGroup } from '@/api/sys
 import { ACTION_ADD, ACTION_UPDATE } from '@/utils/actionType'
 
 export default {
+  name: 'GrantGroup',
   components: {
     vuescroll
   },

+ 1 - 1
src/views/system/group/user/User.vue

@@ -44,7 +44,7 @@
         </el-form>
 
         <div class="btn-group">
-          <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
+          <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
           <el-button class="cancel-btn" @click="dialogVisible = false">取消</el-button>
         </div>
       </vuescroll>

+ 22 - 17
src/views/system/group/user/UserList.vue

@@ -10,7 +10,7 @@
         <el-input v-model="conditions.keywords" class="search-input m-right-15" size="mini" placeholder="请输入内容">
           <el-button slot="append" icon="el-icon-search" size="mini" @click="getData()" />
         </el-input>
-        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddUser">账号</el-button>
+        <el-button type="primary" size="mini" icon="el-icon-plus" @click="handleAddUser">账号</el-button>
       </el-col>
     </el-row>
 
@@ -20,7 +20,8 @@
 
         <el-table-column align="center" header-align="center" label="头像" width="50">
           <template v-slot="{row}">
-            <el-avatar :size="30" :src="row.accountAvatar" />
+            <el-avatar v-if="row.accountAvatar" :size="30" :src="row.accountAvatar" />
+            <svg-icon v-else icon-class="people" />
           </template>
         </el-table-column>
 
@@ -72,15 +73,18 @@
                 @change="(status)=>handlerChangeUserStatus(status, row)"
               />
             </div>
+            <div v-else>
+              <span>-</span>
+            </div>
           </template>
         </el-table-column>
 
         <el-table-column label="操作" header-align="center" align="center" width="190">
           <template v-slot="{row}">
             <div v-if="row.isFixed !== 1">
-              <el-button size="mini" @click="handleEditUser(row)">修改</el-button>
-              <el-button v-if="row.isFixed !== 1" size="mini" type="danger" @click="handleDeleteUser(row)">删除</el-button>
-              <el-dropdown v-if="row.isFixed !== 1" class="el-dropdown-link" @command="(command)=>handlerCommand(command, row)">
+              <el-button size="mini" type="warning" @click="handleEditUser(row)">修改</el-button>
+              <el-button size="mini" type="danger" @click="handleDeleteUser(row)">删除</el-button>
+              <el-dropdown class="el-dropdown-link" @command="(command)=>handlerCommand(command, row)">
                 <el-button size="mini" type="primary">
                   更多<i class="el-icon-arrow-down el-icon--right" />
                 </el-button>
@@ -93,7 +97,7 @@
                     <el-dropdown-item command="addGrantGroup">添加授权</el-dropdown-item>
                   </template>
                   <el-dropdown-item command="resetPwd">重置密码</el-dropdown-item>
-                  <el-dropdown-item command="handlePermit">权限配置</el-dropdown-item>
+                  <el-dropdown-item command="configPermit">权限配置</el-dropdown-item>
                   <el-dropdown-item command="bindWx">微信绑定</el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
@@ -102,17 +106,15 @@
               <span><el-tag type="info">系统锁定</el-tag></span>
             </div>
           </template>
-
         </el-table-column>
       </el-table>
 
       <div class="pagination-container">
         <pagination v-show="total>0" :total="total" :page.sync="conditions.page" :limit.sync="conditions.limit" @pagination="getData" />
       </div>
-
     </el-row>
     <user ref="AddUser" @formSuccess="getData" />
-    <user ref="EditUser" title="编辑用户" @formSuccess="getData" />
+    <user ref="EditUser" title="编辑账号" @formSuccess="getData" />
     <grant-group ref="AddGrantGroup" title="添加授权" @formSuccess="getData" />
     <grant-group ref="EditGrantGroup" title="变更授权" @formSuccess="getData" />
     <account-permit ref="AccountPermit" title="权限配置" />
@@ -121,11 +123,11 @@
 </template>
 
 <script>
-import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+import Pagination from '@/components/Pagination'
 import AccountPermit from '@/views/system/permit/account'
 import GrantGroup from './GrantGroup.vue'
-import User from './User.vue'
 import BindWx from './BindWx.vue'
+import User from './User.vue'
 import { deleteUserById, getUserByPage, resetPassword, updateUserStatus } from '@/api/system/userApi'
 import { mapGetters } from 'vuex'
 
@@ -180,7 +182,7 @@ export default {
       })
     },
 
-    // Change User "Status"
+    // 账号 "Status"变更
     handlerChangeUserStatus(status, data) {
       updateUserStatus(data.accountId, status).then((resp) => {
         const { msg } = resp
@@ -190,7 +192,7 @@ export default {
       })
     },
 
-    // Command Handling
+    // 功能处理
     handlerCommand(command, data) {
       switch (command) {
         case 'addGrantGroup':
@@ -209,7 +211,7 @@ export default {
           this.handleResetPassword(data)
           break
 
-        case 'handlePermit':
+        case 'configPermit':
           this.handlePermit(data)
           break
 
@@ -250,6 +252,11 @@ export default {
       })
     },
 
+    // 删除授权群组
+    handleDelGrantGroup(data) {
+
+    },
+
     // 权限管理
     handlePermit(data) {
       const { accountId, positionId } = data
@@ -262,8 +269,6 @@ export default {
       this.$refs.BindWx.show(accountId, wxCode)
     },
 
-    handleDelGrantGroup() {},
-
     // Click "Delete" User
     handleDeleteUser(data) {
       this.$confirm('此操作将永久删除该账号, 是否继续?', '提示', {
@@ -286,7 +291,7 @@ export default {
 
 <style scoped>
 .content-container {
-  margin: 10px 10px 0px 0 ;
+  margin: 10px 10px 10px 0 ;
 }
 
 </style>

+ 3 - 3
src/views/system/job/job/index.vue

@@ -7,9 +7,9 @@
         </div>
       </el-col>
       <el-col :span="12" class="right">
-        <el-input v-model="conditions.keywords" style="width: 200px;" class="filter-item" prefix-icon="el-icon-search" placeholder="请输入内容" @keyup.enter.native="getData" />
-        <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-search" @click="getData">查询</el-button>
-        <el-button type="primary" @click="handleAdd">添加</el-button>
+        <el-input v-model="conditions.keywords" style="width: 200px;" class="filter-item" prefix-icon="el-icon-search" size="mini" placeholder="请输入内容" @keyup.enter.native="getData" />
+        <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-search" size="mini" @click="getData">查询</el-button>
+        <el-button type="primary" size="mini" icon="el-icon-plus" @click="handleAdd">添加</el-button>
       </el-col>
     </el-row>
 

+ 10 - 5
src/views/system/map/index.vue

@@ -7,10 +7,10 @@
         </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 v-model="conditions.keywords" class="search-input m-right-15" size="mini" placeholder="请输入内容">
+          <el-button slot="append" icon="el-icon-search" size="mini" @click="getData()" />
         </el-input>
-        <el-button type="primary" @click="handleAdd">添加</el-button>
+        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">添加</el-button>
       </el-col>
     </el-row>
 
@@ -47,14 +47,14 @@ import EntMap from './components/Map'
 import { getMapByPage, deleteMapById } from '@/api/system/mapApi'
 
 export default {
-  name: 'Index',
+  name: 'MapIndex',
   components: {
     EntMap
   },
 
   data() {
     return {
-      title: '地图配置',
+      title: '现场地图',
       dataList: [],
       listLoading: false,
       total: 0,
@@ -130,3 +130,8 @@ export default {
   }
 }
 </script>
+<style scoped>
+.content-container {
+  height: calc(100vh - 95px);
+}
+</style>