Эх сурвалжийг харах

Merge remote-tracking branch 'origin/demo_' into demo_

hfxc226 2 жил өмнө
parent
commit
621e4a93c1

+ 31 - 0
src/api/fill/task.js

@@ -118,6 +118,37 @@ export function fetchFillGatherTask (parameter) {
     }
   })
 }
+/**
+ * fetch single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getFillGatherTask (parameter) {
+  return axios({
+    url: '/fill/task-details/page?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
+
+/**
+ * fetch single func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getFillUpdates (parameter) {
+  return axios({
+    url: '/fill/updates/page?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
 
 /**
  * query list func

BIN
src/assets/bgView/SwitchingRoomBG.png


BIN
src/assets/bgView/bianyaqi.png


BIN
src/assets/bgView/jiantouBlue.png


BIN
src/assets/bgView/jiantouGreen.png


BIN
src/assets/bgView/jiantouYellow.png


BIN
src/assets/bgView/luogan.png


BIN
src/assets/bgView/sbInfoBg.png


BIN
src/assets/bgView/zhongBYQ.png


+ 1 - 1
src/components/Table/index.js

@@ -162,7 +162,7 @@ export default {
     })
     if (isChecked === 0) {
       this.columns.forEach((item, index) => {
-        if (index < 8) {
+        if (index < 18) {
           item['checked'] = true
           this.checkCustomMap[item.title] = item
         }

+ 4 - 1
src/router/generator-platform-routers.js

@@ -425,7 +425,10 @@ export const constantRouterMap = [
     path: '/RepairBigScreen',
     component: () => import('@/views/statisticView/100')
   },
-
+  {
+    path: '/SwitchingRoomBigScreen',
+    component: () => import('@/views/statisticView/SwitchingRoom')
+  },
   {
     path: '/StoreBigScreen',
     component: () => import('@/views/statisticView/9')

+ 1 - 0
src/utils/dict.js

@@ -160,6 +160,7 @@ DictCache.TYPE = {
   REMOTE_MEASURE: 'REMOTE_MEASURE', // 设备遥测
   REMOTE_DEGREE: 'REMOTE_DEGREE', // 设备电度
   FILL_GATHER_TASK_STATUS: 'FILL_GATHER_TASK_STATUS', // 巡检任务状态
+  FILL_UPDATE_TYPE: 'FILL_UPDATE_TYPE', // 巡检操作类型
   /* 审批单 */
   ACTIVITI_FORM_STATUS: 'ACTIVITI_FORM_STATUS', // 申请单状态
 

+ 9 - 6
src/views/fill/gather/FillGather.vue

@@ -51,11 +51,11 @@
             v-if="$auth('fill-gathers-edit')"
             @click="handleEdit(record)"
           >修改</operation-button>
-          <operation-button
+          <!-- <operation-button
             v-if="$auth('fill-gathers-del')"
             :type="2"
             title="是否要删除该条数据?"
-            @confirm="batchDelete(record.id)">删除</operation-button>
+            @confirm="batchDelete(record.id)">删除</operation-button> -->
           <operation-button
             v-if="$auth('fill-gathers-edit')"
             @click="handleConfigEdit(record)"
@@ -124,17 +124,21 @@ export default {
           dataIndex: 'period'
         },
         {
-          title: '备注',
-          dataIndex: 'remark'
+          title: '巡检项(个)',
+          dataIndex: 'countNum'
         },
         {
-          title: '创建人名称',
+          title: '创建人',
           dataIndex: 'createdUserName'
         },
         {
           title: '创建日期',
           dataIndex: 'createdTime'
         },
+        {
+          title: '备注',
+          dataIndex: 'remark'
+        },
         {
           title: '操作',
           key: 'action',
@@ -232,7 +236,6 @@ export default {
       })
     },
     handleView (record) {
-      console.log(this.loadData())
       fetchFillGather({ id: record.id }).then(res => {
         const modal = this.$refs.detailModal
         modal.base(res.data)

+ 6 - 5
src/views/fill/gather/modules/BaseForm.vue

@@ -31,11 +31,12 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input-number
+            <a-input
+              type="number"
               :min="0"
-              :formatter="value => `${value}天`"
-              :parser="value => value.replace('天', '')"
-              v-decorator="['period', {rules: [{required: true, message: '名频次周期不能为空'}]}]"/>
+              v-decorator="['period', {rules: [{required: true, message: '频次周期不能为空'}]}]">
+              <span slot="suffix">天</span>
+            </a-input>
           </a-form-item>
         </row-item>
         <!-- <row-item>
@@ -160,7 +161,7 @@ export default {
       this.modalTitle = '编辑'
       const { form: { setFieldsValue } } = this
       // 日期处理
-
+      record.infoIds = record.fillInfos.map(res => res.id)
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
           'id',

+ 53 - 15
src/views/fill/gather/modules/CreateTaskForm.vue

@@ -85,11 +85,18 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input-number
+            <a-input
+              type="number"
               :min="0"
-              :formatter="value => `${value}天`"
-              :parser="value => value.replace('天', '')"
-              v-decorator="['period', {rules: [{required: true, message: '巡检频次不能为空'}]}]"/>
+              v-decorator="['period', {rules: [{required: true, message: '巡检频次不能为空'}]}]">
+              <span slot="suffix">天</span>
+            </a-input>
+            <a-tooltip style="position:absolute;right:-30px;top:-3px;">
+              <template slot="title">
+                生成任务后,该任务默认定时生成周期
+              </template>
+              <a-icon class="tooltip" type="question-circle" />
+            </a-tooltip>
           </a-form-item>
         </a-col>
         <a-col :sm="20" >
@@ -98,11 +105,18 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input-number
+            <a-input
+              type="number"
               :min="0"
-              :formatter="value => `${value}小时`"
-              :parser="value => value.replace('小时', '')"
-              v-decorator="['requireHour', {rules: [{required: true, message: '要求时间不能为空'}]}]"/>
+              v-decorator="['requireHour', {rules: [{required: true, message: '要求时间不能为空'}]}]">
+              <span slot="suffix">小时</span>
+            </a-input>
+            <a-tooltip style="position:absolute;right:-30px;top:-3px;">
+              <template slot="title">
+                巡检人正常完成时间
+              </template>
+              <a-icon class="tooltip" type="question-circle" />
+            </a-tooltip>
           </a-form-item>
         </a-col>
         <a-col :sm="20" >
@@ -111,11 +125,18 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input-number
+            <a-input
+              type="number"
               :min="0"
-              :formatter="value => `${value}小时`"
-              :parser="value => value.replace('小时', '')"
-              v-decorator="['warningHour', {rules: [{required: true, message: '超时预警时间不能为空'}]}]"/>
+              v-decorator="['warningHour', {rules: [{required: true, message: '超时预警时间不能为空'}]}]">
+              <span slot="suffix">小时</span>
+            </a-input>
+            <a-tooltip style="position:absolute;right:-30px;top:-0px;">
+              <template slot="title">
+                要求时间到期的缓冲时间,超过该时间,触发超时提醒和记录
+              </template>
+              <a-icon class="tooltip" type="question-circle" />
+            </a-tooltip>
           </a-form-item>
         </a-col>
       </a-row>
@@ -205,8 +226,19 @@ export default {
         values.sbIds = this.sbIds
         console.log(values)
         addFillTasks(values).then(res => {
-          this.$message.success('创建成功!')
-          this.handleCancel()
+          // this.$message.success('创建成功!')
+          const that = this
+          this.$confirm({
+            title: '创建成功!',
+            content: '是否前往任务页?',
+            onOk () {
+              that.$router.push('/sb/inspection/fill/task')
+            },
+            onCancel () {
+              that.handleCancel()
+            }
+          })
+          // this.$router.push('/sb/inspection/fill/task')
         })
       })
     },
@@ -220,5 +252,11 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-
+.tooltip{
+  font-size:20px;
+  color:#ccc;
+  &:hover {
+  color:#2f54eb;
+  }
+}
 </style>

+ 36 - 8
src/views/fill/gather/modules/Detail.vue

@@ -1,23 +1,35 @@
 <template>
   <a-modal
-    :title="modalTitle"
-    :width="850"
+    :width="800"
     :visible="visible"
     :confirmLoading="confirmLoading"
     @cancel="handleCancel"
   >
-    <detail-list title="" :col="2">
+    <!-- <detail-list title="" :col="2">
       <detail-list-item term="名称">{{ model.name }}</detail-list-item>
-      <!-- <detail-list-item term="类型">{{ BaseTool.Object.getField(codeIdMap,model.codeId) }}</detail-list-item>
-      <detail-list-item term="使用类型">{{ BaseTool.Object.getField(useTypeMap,model.useType) }}</detail-list-item> -->
       <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
       <detail-list-item term="频次周期">{{ model.period }} 天</detail-list-item>
       <detail-list-item term="创建人">{{ model.createdUserName }}</detail-list-item>
-      <!--      <detail-list-item term="更新人">{{ model.updateUserId }}</detail-list-item>-->
       <detail-list-item term="更新人名称">{{ model.updateUserName }}</detail-list-item>
       <detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>
-    </detail-list>
-
+    </detail-list> -->
+    <div class="title">{{ model.name }}</div>
+    <div style="float:right;">频次周期:{{ model.period }} 天</div>
+    <br>
+    <div class="info" v-for="item in model.fillInfos" :key="item.id">
+      <div style="width:120px;text-align: right;">{{ item.name }}:</div>
+      <div>
+        <a-input style="width:150px;" v-if="item.type === 1 " />
+        <a-select v-else-if="item.type === 2 " style="width:150px;">
+          <a-select-option v-for="val in JSON.parse(item.selectValue)" :key="val.value" :value="val.value">
+            {{ val.value }}
+          </a-select-option>
+        </a-select>
+        <a-date-picker style="width:150px;" v-else-if="item.type === 3 " show-time :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN" />
+      </div>
+      <div style="margin-left:50px;">{{ item.remark }}</div>
+    </div>
+    </div>
     <template slot="footer">
       <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
     </template>
@@ -66,6 +78,7 @@ export default {
       this.visible = true
       this.modalTitle = '详情'
       this.model = record
+      console.log(record)
     },
     handleCancel () {
       this.visible = false
@@ -75,3 +88,18 @@ export default {
   }
 }
 </script>
+
+<style lang="less" scoped>
+.title{
+  text-align: center;
+  width: 100%;
+  font-size: 40px;
+  font-weight: 700;
+}
+.info{
+  display:flex;
+  justify-content: center;
+  align-items: center;
+  margin: 10px;;
+}
+</style>

+ 50 - 63
src/views/fill/task/FillGatherTask.vue

@@ -63,7 +63,7 @@
         :alert="options.alert"
         :rowSelection="options.rowSelection"
         showPagination="auto"
-        :scroll="{x: 1500, y: BaseTool.Constant.scrollY}"
+        :scroll="{x: 1800}"
       >
         <span slot="status" slot-scope="status">
           <badge :status="DictCache.COLOR.FILL_GATHER_TASK_STATUS[status]" :text="statusMap[status]" />
@@ -72,36 +72,35 @@
           <template>
             <a @click="handleView(record)">查看</a>
             <operation-button
+              v-show="record.status!== 2"
               @click="handleEdit(record)"
             >填报</operation-button>
             <operation-button
-              :type="2"
-              title="是否要转派该任务"
-              @confirm="handleDispatch(record)"
+              v-if="$auth('fill-tasks-dispatch')"
+              v-show="record.status!== 2"
+              @click="handleDispatch(record)"
             >转派</operation-button>
             <operation-button
-              :type="2"
-              title="是否要延时该任务"
-              @confirm="handleOvertime(record)"
+              v-if="$auth('fill-tasks-overtime')"
+              v-show="record.status!== 2"
+              @click="handleOvertime(record)"
             >延时</operation-button>
 
             <operation-button
-              v-if="record.status===5"
-              :type="2"
-              title="是否取消暂停要该任务"
-              @confirm="handlePause(record)"
+              v-if="$auth('fill-tasks-pause')"
+              v-show="record.status!== 2 && record.status===5"
+              @click="handlePause(record)"
             >取消暂停</operation-button>
             <operation-button
-              v-else
-              :type="2"
-              title="是否暂停要该任务"
-              @confirm="handlePause(record)"
+              v-if="$auth('fill-tasks-pause')"
+              v-show="record.status!== 2 && record.status!==5"
+              @click="handlePause(record)"
             >暂停</operation-button>
-            <operation-button
+            <!-- <operation-button
               v-if="$auth('fill-fills-del')"
               :type="2"
               title="是否要删除该条数据?"
-              @confirm="batchDelete(record.id)">删除</operation-button>
+              @confirm="batchDelete(record.id)">删除</operation-button> -->
           </template>
         </span>
       </s-table>
@@ -110,7 +109,7 @@
     <dispatch-form ref="dispatchModal" @ok="handleOk" />
     <overtime-form ref="overtimeModal" @ok="handleOk" />
     <pause-form ref="pauseModal" @ok="handleOk" />
-    <detail ref="detailModal" @ok="handleOk" />
+    <base-form :editor="false" ref="detailModal" @ok="handleOk" />
   </a-card>
 </template>
 
@@ -152,77 +151,75 @@ export default {
       columns: [
         {
           title: '序号',
-          width: 70,
+          width: 65,
           dataIndex: 'index',
           customRender: (text, record, index) => {
             return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
           }
         },
+        {
+          title: '巡检任务名',
+          width: 150,
+          dataIndex: 'name'
+        },
         {
           title: '巡检人',
           width: 100,
-          dataIndex: 'checker'
+          dataIndex: 'checkerName'
         },
         {
           title: '巡检主管',
           width: 100,
-          dataIndex: 'checkLeader'
+          dataIndex: 'leaderName'
         },
         {
           title: '巡检开始时间',
-          width: 150,
+          width: 120,
           dataIndex: 'createdTime'
         },
         {
           title: '任务创建人',
-          width: 100,
+          width: 120,
           dataIndex: 'createdUserName'
         },
         {
           title: '待完成数量',
-          width: 100,
+          width: 120,
           dataIndex: 'waitNum'
         },
         {
           title: '巡检总数量',
-          width: 100,
+          width: 110,
           dataIndex: 'totalNum'
         },
-        {
-          title: '任务状态',
-          width: 100,
-          dataIndex: 'status',
-          scopedSlots: { customRender: 'status' }
-        },
+
         {
           title: '要求时间',
           width: 100,
           dataIndex: 'requireHour'
         },
         {
-          title: '超时预警时间',
+          title: '超时预警时间(小时)',
           width: 100,
           dataIndex: 'warningHour'
         },
         {
-          title: '累计延时时间',
+          title: '累计延时时间(小时)',
           width: 100,
           dataIndex: 'lateHistoryHours'
         },
         {
-          title: '变更记录',
-          width: 200,
-          dataIndex: 'recordJson'
-        },
-        {
-          title: '任务名称',
+          title: '任务状态',
           width: 100,
-          dataIndex: 'name'
+          fixed: 'right',
+          dataIndex: 'status',
+          scopedSlots: { customRender: 'status' }
         },
         {
           title: '操作',
           key: 'action',
-          width: '200px',
+          width: 300,
+          fixed: 'right',
           align: 'center',
           scopedSlots: { customRender: 'action' }
         }
@@ -235,7 +232,7 @@ export default {
           ...this.queryParam,
           dataScope: {
             sortBy: 'desc',
-            sortName: 'update_time'
+            sortName: 'created_time'
           }
         }
         return getFillGatherTaskPage(Object.assign(parameter, this.queryParam))
@@ -265,7 +262,11 @@ export default {
     // 下拉框map
     this.tableOption()
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FILL_GATHER_TASK_STATUS)
-    console.log(this.statusMap)
+    if (this.$route.query.id) {
+      fetchFillGatherTask({ id: this.$route.query.id }).then(res => {
+        this.handleView(res.data)
+      })
+    }
   },
   methods: {
     tableOption () {
@@ -316,26 +317,16 @@ export default {
       })
     },
     handleDispatch (record) {
-      this.visible = false
       const modal = this.$refs.dispatchModal
       modal.base(record)
     },
     handleOvertime (record) {
-      this.visible = false
       const modal = this.$refs.overtimeModal
       modal.base(record)
     },
     handlePause (record) {
-      if (record.status === 5) {
-        this.visible = false
-        const modal = this.$refs.pauseModal
-        modal.base(record)
-        return
-      }
-      pauseFillGatherTask({ pauseType: 1, id: record.id }).then(res => {
-        this.$message.success('暂停成功!')
-        this.handleOk()
-      })
+      const modal = this.$refs.pauseModal
+      modal.base(record)
     },
     handleAdd () {
       this.visible = false
@@ -344,17 +335,13 @@ export default {
     },
     handleEdit (record) {
       this.visible = false
-      fetchFillGatherTask({ id: record.id }).then(res => {
-        const modal = this.$refs.baseModal
-        modal.base(res.data)
-      })
+      const modal = this.$refs.baseModal
+      modal.base(record)
     },
     handleView (record) {
       this.visible = false
-      fetchFillGatherTask({ id: record.id }).then(res => {
-        const modal = this.$refs.detailModal
-        modal.base(res.data)
-      })
+      const modal = this.$refs.detailModal
+      modal.base(record)
     },
     handleOk () {
       this.visible = true

+ 280 - 58
src/views/fill/task/modules/BaseForm.vue

@@ -1,89 +1,305 @@
 <template>
-  <a-card :bordered="false" v-show="visible" class="card" title="填报">
-    <a-row :gutter="48" slot="extra">
+  <a-card :bordered="false" v-show="visible" class="card">
+    <a-row :gutter="48" style="position:fixed;bottom:150px;z-index:999;display:flex; justify-content: center;width: 90%;">
       <a-col :md="48" :sm="48">
-        <span style="float: right">
-          <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
-          <a-button style="margin-left: 8px" :loading="confirmLoading" type="primary" @click="save()">确认</a-button>
+        <span>
+          <a-button v-show="editor" :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
           <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
+          <a-button
+            v-if="$auth('fill-tasks-dispatch')"
+            v-show="!editor&&model.status!== 2"
+            style="margin-left: 8px"
+            type="primary"
+            @click="handleDispatch(model)"
+          >转派</a-button>
+          <a-button
+            v-if="$auth('fill-tasks-overtime')"
+            v-show="!editor&&model.status!== 2"
+            style="margin-left: 8px"
+            type="primary"
+            @click="handleOvertime(model)"
+          >延时</a-button>
+
+          <a-button
+            v-if="$auth('fill-tasks-pause')"
+            v-show="!editor && model.status===5&&model.status!== 2"
+            style="margin-left: 8px"
+            type="primary"
+            @click="handlePause(model)"
+          >取消暂停</a-button>
+          <a-button
+            v-if="$auth('fill-tasks-pause')"
+            v-show="!editor&& model.status!==5&&model.status!== 2"
+            style="margin-left: 8px"
+            type="primary"
+            @click="handlePause(model)"
+          >暂停</a-button>
         </span>
       </a-col>
     </a-row>
-    <div class="tables">
-      <div style="text-align:center;padding-bottom:10px;font-size:32px;">时代思康仪表巡检记录表</div>
-      <table>
-        <thead border="1px">
-          <tr>
-            <td rowspan="2" width="100px">序号</td>
-            <td rowspan="2" width="150px">车间</td>
-            <td rowspan="2" width="150px">设备名称</td>
-            <td rowspan="2" width="150px">设备编号</td>
-            <td rowspan="2" width="150px">填报时间</td>
-            <td :colspan="ListForm[0].content.length">项目内容项</td>
-            <td rowspan="2" width="150px">是否填报</td>
-          </tr>
-          <tr>
-            <td v-for="item in ListForm[0].content" :key="item.name">{{ item.name }}</td>
-          </tr>
-        </thead>
-        <tbody>
-          <tr v-for="(item,i) in ListForm" :key="item.id">
-            <td>{{ i+1 }}</td>
-            <td>{{ item.positionName }}</td>
-            <td>{{ item.sbName }}</td>
-            <td>{{ item.sbNo }}</td>
-            <td>{{ item.updateTime }}</td>
-            <td v-for="li in item.content" :key="li.name">
-              <!-- <span v-if="item.status === 1" @dblclick="item.status =2"> {{ li.fillValue }}</span> -->
-              <a-input v-if="li.type === 1 " v-model="li.fillValue" />
-              <a-select v-else-if="li.type === 2" v-model="li.fillValue" style="min-width:100px;">
-                <a-select-option v-for="val in JSON.parse(li.selectValue)" :key="val.value" :value="val.value">
-                  {{ val.value }}
-                </a-select-option>
-              </a-select>
-            </td>
-            <td>
-              <a-icon v-show="item.status === 1" type="check" style="color:#87d068;font-size: 26px;" />
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <a-pagination style="float:right;margin:10px;" :default-current="1" :total="10" />
+    <a-button-group size="large" v-show="!editor" >
+      <a-button @click="type=1">
+        <a-icon type="left" />巡检记录
+      </a-button>
+      <a-button @click="type=2">
+        任务追踪<a-icon type="right" />
+      </a-button>
+    </a-button-group>
+    <div v-show="type===1">
+      <div class="tables">
+        <a-radio-group :value="status" @change="handleStatusChange">
+          <a-radio-button :value="null">
+            全部
+          </a-radio-button>
+          <a-radio-button :value="0">
+            未填报
+          </a-radio-button>
+          <a-radio-button :value="1">
+            已填报
+          </a-radio-button>
+        </a-radio-group>
+        <div style="text-align:center;padding-bottom:10px;font-size:32px;">时代思康巡检记录表</div>
+        <div v-show="!editor" style="display:flex; justify-content: space-between;">
+          <div> 巡检开始时间:{{ model.createdTime }}</div>
+          <div> 巡检要求时间:{{ model.requireHour }}小时</div>
+          <div> 巡检预警时间:{{ model.warningHour }}小时</div>
+          <div> 巡检完成时间:{{ model.updateTime }}</div>
+          <div> 巡检人:{{ model.checkerName }}</div>
+
+        </div>
+        <table>
+          <thead border="1px">
+            <tr>
+              <th rowspan="2" width="100px">序号</th>
+              <th rowspan="2" width="150px">车间</th>
+              <th rowspan="2" width="150px">设备名称</th>
+              <th rowspan="2" width="150px">设备编号</th>
+              <th rowspan="2" width="150px">填报时间</th>
+              <th :colspan="ListForm.length>0?ListForm[0].content.length:1">项目内容项</th>
+              <th rowspan="2" width="150px">是否填报</th>
+            </tr>
+            <tr v-if="ListForm.length>0">
+              <th v-for="item in ListForm[0].content" :key="item.name">{{ item.name }}</th>
+            </tr>
+          </thead>
+          <tbody v-if="ListForm.length>0">
+            <tr v-for="(item,i) in ListForm" :key="item.id">
+              <td>{{ i+1 }}</td>
+              <td>{{ item.positionName }}</td>
+              <td>{{ item.sbName }}</td>
+              <td>{{ item.sbNo }}</td>
+              <td>{{ item.updateTime }}</td>
+              <td v-for="li in item.content" :key="li.name">
+                <span v-if="!editor" > {{ li.fillValue }}</span>
+                <a-input v-else-if="li.type === 1 && editor " v-model="li.fillValue" />
+                <a-select v-else-if="li.type === 2 && editor" v-model="li.fillValue" style="min-width:100px;">
+                  <a-select-option v-for="val in JSON.parse(li.selectValue)" :key="val.value" :value="val.value">
+                    {{ val.value }}
+                  </a-select-option>
+                </a-select>
+                <a-date-picker style="min-width:100px;" v-else-if="li.type === 3 && editor" show-time :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN" v-model="li.fillValue" />
+              </td>
+              <td>
+                <a-icon v-show="item.status === 1" type="check" style="color:#87d068;font-size: 26px;" />
+              </td>
+            </tr>
+          </tbody>
+        </table>
+        <div v-if="ListForm.length===0">
+          <a-empty />
+        </div>
+        <a-pagination style="float:right;margin:10px;" v-model="listPage.pageNum" :total="listPage.total" @change="onChange" />
+      </div>
     </div>
+    <div v-show="type===2">
+      <div style="text-align:center;padding-bottom:10px;font-size:32px;">时代思康仪表任务记录表</div>
+      <a-table
+        :columns="columns"
+        :data-source="updatesInfo"
+        bordered
+        :pagination="pagination"
+        @change="handleTableChange"
+        :loading="loading">
+        <template v-slot:index="text,record,index">
+          {{ index+1 }}
+        </template>
+        <template v-slot:type="text">
+          {{ typeMap[text] }}
+        </template>
+      </a-table>
+    </div>
+    <dispatch-form ref="dispatchModal" @ok="handleOk" />
+    <overtime-form ref="overtimeModal" @ok="handleOk" />
+    <pause-form ref="pauseModal" @ok="handleOk" />
   </a-card>
 </template>
 
 <script>
-import { fillGatherTask } from '@/api/fill/task'
+import { fillGatherTask, getFillGatherTask, getFillUpdates, pauseFillGatherTask } from '@/api/fill/task'
+import DispatchForm from './DispatchForm'
+import OvertimeForm from './OvertimeForm'
+import PauseForm from './PauseForm'
 export default {
   name: 'BaseFillGatherTask',
+  components: {
+    PauseForm,
+    DispatchForm,
+    OvertimeForm
+  },
   data () {
     return {
       confirmLoading: false,
       visible: false,
+      model: {},
+      listPage: {
+        pageNum: 1,
+        pageSize: 10,
+        total: 0
+      },
+      pagination: {
+        pageNum: 1,
+        pageSize: 10,
+        total: 0
+      },
+      loading: false,
       ListForm: [],
-      id: ''
+      id: '',
+      type: 1,
+      typeMap: {},
+      status: null,
+      updatesInfo: [],
+      columns: [
+        {
+          title: '序号',
+          width: 70,
+          key: 'index',
+          align: 'center',
+          scopedSlots: { customRender: 'index' }
+        },
+        {
+
+          title: '类型',
+          width: 100,
+          dataIndex: 'type',
+          scopedSlots: { customRender: 'type' }
+        },
+        {
+          title: '巡检人',
+          width: 150,
+          dataIndex: 'checkerName'
+        },
+        {
+          title: '巡检主管',
+          width: 150,
+          dataIndex: 'leaderName'
+        },
+        {
+          title: '记录时间',
+          width: 150,
+          dataIndex: 'createdTime'
+        },
+        {
+          title: ' 延时时长',
+          width: 150,
+          dataIndex: 'lateHour'
+        },
+        {
+          title: '备注',
+          width: 150,
+          dataIndex: 'remark'
+        }
+      ]
       // 下拉框map
     }
   },
-  props: {},
+  props: {
+    editor: {
+      type: Boolean,
+      default: true
+    }
+  },
   created () {
     // 下拉框map
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FILL_UPDATE_TYPE)
   },
   methods: {
     base (record) {
       this.visible = true
+      this.model = record
       this.id = record.id
-      this.ListForm = record.details.map(item => {
-        item.content = JSON.parse(item.content)
-        item.content = item.content.map(val => {
-          val.fillValue = val.fillValue ? val.fillValue : ''
-          return val
+      this.getInfo()
+      this.getFillUpdates()
+    },
+    getInfo () {
+      const params = {
+        ...this.listPage,
+        taskId: this.id,
+        status: this.status
+      }
+      getFillGatherTask(params).then(res => {
+        if (res.data.rows.length === 0) {
+          this.ListForm = []
+          return
+        }
+        this.listPage.total = res.data.total
+        this.ListForm = res.data.rows.map(item => {
+          item.content = JSON.parse(item.content)
+          item.content = item.content.map(val => {
+            val.fillValue = val.fillValue ? val.fillValue : ''
+            return val
+          })
+          return item
         })
-        return item
       })
       console.log(this.ListForm)
     },
+    handleDispatch (record) {
+      this.visible = false
+      const modal = this.$refs.dispatchModal
+      modal.base(record)
+    },
+    handleOvertime (record) {
+      this.visible = false
+      const modal = this.$refs.overtimeModal
+      modal.base(record)
+    },
+    handlePause (record) {
+      if (record.status === 5) {
+        this.visible = false
+        const modal = this.$refs.pauseModal
+        modal.base(record)
+        return
+      }
+      pauseFillGatherTask({ pauseType: 1, id: record.id }).then(res => {
+        this.$message.success('暂停成功!')
+        this.getFillUpdates()
+      })
+    },
+    getFillUpdates () {
+      const params = {
+        ...this.pagination,
+        taskId: this.id
+      }
+      getFillUpdates(params).then(res => {
+        this.updatesInfo = res.data.rows
+        this.pagination.total = res.data.total
+      })
+    },
+    handleStatusChange (e) {
+      this.status = e.target.value
+      this.getInfo()
+    },
+    handleTableChange (pagination) {
+      console.log(pagination)
+      const pager = { ...this.pagination }
+      pager.pageNum = pagination.current
+      this.pagination = pager
+      this.getFillUpdates()
+    },
+    onChange (page) {
+      console.log(page)
+      this.getInfo()
+    },
     save () {
       const detail = this.ListForm.map(item => {
         return {
@@ -103,9 +319,15 @@ export default {
     handleConfirm (id) {
       console.log(id)
     },
+    handleOk () {
+      this.visible = true
+      this.getFillUpdates()
+    },
     handleCancel () {
       this.visible = false
-      // this.ListForm = []
+      this.ListForm = []
+      this.type = 1
+      this.status = null
       this.$emit('ok')
     }
   }
@@ -131,9 +353,9 @@ export default {
         table-layout:fixed;
     }
     th{
-      color: #FFFFFF;
-      background: #3762FC;
-      min-width:150px;
+      background: #fafafa;
+      font-weight: 500;
+
     }
     th,
     td {

+ 74 - 74
src/views/fill/task/modules/Detail.vue

@@ -1,81 +1,81 @@
 <template>
-    <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
-        <a-row :gutter="48" slot="extra">
-            <a-col :md="48" :sm="48">
-              <span class="table-page-search-submitButtons" style="float: right">
-                <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
-              </span>
-            </a-col>
-        </a-row>
-        <detail-list title="" :col="2">
-                                                                                                    <detail-list-item term="巡检人">{{ model.checker }}</detail-list-item>
-                                                                                                            <detail-list-item term="巡检主管">{{ model.checkLeader }}</detail-list-item>
-                                                                                                                                        <detail-list-item term="巡检结束时间">{{ model.updateTime }}</detail-list-item>
-                                                                                                            <detail-list-item term="任务创建人ID">{{ model.createdUserId }}</detail-list-item>
-                                                                                                                                        <detail-list-item term="巡检结束人ID">{{ model.updateUserId }}</detail-list-item>
-                                                                                                            <detail-list-item term="巡检结束人">{{ model.updateUserName }}</detail-list-item>
-                                                                                                            <detail-list-item term="待完成数量">{{ model.waitNum }}</detail-list-item>
-                                                                                                            <detail-list-item term="巡检总数量">{{ model.totalNum }}</detail-list-item>
-                                                                                                            <detail-list-item term="0 待接单 1 巡检中 2 完成  3 延迟  4 暂停">{{ model.status }}</detail-list-item>
-                                                                                                            <detail-list-item term="要求时间">{{ model.requireHour }}</detail-list-item>
-                                                                                                            <detail-list-item term="超时预警时间">{{ model.warningHour }}</detail-list-item>
-                                                                                                            <detail-list-item term="累计延时时间">{{ model.lateHistoryHours }}</detail-list-item>
-                                                                                                            <detail-list-item term="变更记录">{{ model.recordJson }}</detail-list-item>
-                                                                                                            <detail-list-item term="任务名称">{{ model.name }}</detail-list-item>
-                                                        </detail-list>
-    </a-card>
+  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
+    <a-row :gutter="48" slot="extra">
+      <a-col :md="48" :sm="48">
+        <span class="table-page-search-submitButtons" style="float: right">
+          <a-button style="margin-left: 8px" type="default" @click="handleCancel()">返回</a-button>
+        </span>
+      </a-col>
+    </a-row>
+    <detail-list title="" :col="2">
+      <detail-list-item term="巡检人">{{ model.checker }}</detail-list-item>
+      <detail-list-item term="巡检主管">{{ model.checkLeader }}</detail-list-item>
+      <detail-list-item term="巡检结束时间">{{ model.updateTime }}</detail-list-item>
+      <detail-list-item term="任务创建人ID">{{ model.createdUserId }}</detail-list-item>
+      <detail-list-item term="巡检结束人ID">{{ model.updateUserId }}</detail-list-item>
+      <detail-list-item term="巡检结束人">{{ model.updateUserName }}</detail-list-item>
+      <detail-list-item term="待完成数量">{{ model.waitNum }}</detail-list-item>
+      <detail-list-item term="巡检总数量">{{ model.totalNum }}</detail-list-item>
+      <detail-list-item term="0 待接单 1 巡检中 2 完成  3 延迟  4 暂停">{{ model.status }}</detail-list-item>
+      <detail-list-item term="要求时间">{{ model.requireHour }}</detail-list-item>
+      <detail-list-item term="超时预警时间">{{ model.warningHour }}</detail-list-item>
+      <detail-list-item term="累计延时时间">{{ model.lateHistoryHours }}</detail-list-item>
+      <detail-list-item term="变更记录">{{ model.recordJson }}</detail-list-item>
+      <detail-list-item term="任务名称">{{ model.name }}</detail-list-item>
+    </detail-list>
+  </a-card>
 </template>
 
 <script>
-    import DetailList from '@/components/tools/DetailList'
-    const DetailListItem = DetailList.Item
+import DetailList from '@/components/tools/DetailList'
+const DetailListItem = DetailList.Item
 
-    export default {
-        name: 'FillGatherTaskDetail',
-        components: {
-            DetailList,
-            DetailListItem
-        },
-        data () {
-            return {
-                confirmLoading: false,
-                mdl: {},
-                modalTitle: null,
-                visible: false,
-                // 下拉框map
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            model: {
-                                                                                                                    'checker': null,
-                                                                                                'checkLeader': null,
-                                                                                                                                            'updateTime': null,
-                                                                                                'createdUserId': null,
-                                                                                                                                            'updateUserId': null,
-                                                                                                'updateUserName': null,
-                                                                                                'waitNum': null,
-                                                                                                'totalNum': null,
-                                                                                                'status': null,
-                                                                                                'requireHour': null,
-                                                                                                'warningHour': null,
-                                                                                                'lateHistoryHours': null,
-                                                                                                'recordJson': null,
-                                                                                                'name': null,
-                                                            }
-            }
-        },
-        created () {
-            // 下拉框map
-            
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
-        methods: {
-            base (record) {
-                this.visible = true
-                this.modalTitle = '详情'
-                this.model = record
-            },
-            handleCancel () {
-                this.visible = false
-                this.confirmLoading = false
-                this.$emit('ok')
-            }
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
+export default {
+  name: 'FillGatherTaskDetail',
+  components: {
+    DetailList,
+    DetailListItem
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      // 下拉框map
+      model: {
+        'checker': null,
+        'checkLeader': null,
+        'updateTime': null,
+        'createdUserId': null,
+        'updateUserId': null,
+        'updateUserName': null,
+        'waitNum': null,
+        'totalNum': null,
+        'status': null,
+        'requireHour': null,
+        'warningHour': null,
+        'lateHistoryHours': null,
+        'recordJson': null,
+        'name': null
+      }
     }
+  },
+  created () {
+    // 下拉框map
+
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.modalTitle = '详情'
+      this.model = record
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+      this.$emit('ok')
+    }
+  }
+}
 </script>

+ 6 - 4
src/views/fill/task/modules/DispatchForm.vue

@@ -30,11 +30,12 @@
         :labelCol="BaseTool.Constant.labelCol"
         :wrapperCol="BaseTool.Constant.wrapperCol"
       >
-        <a-input-number
+        <a-input
+          type="number"
           :min="0"
-          :formatter="value => `${value}小时`"
-          :parser="value => value.replace('小时', '')"
-          v-decorator="['requireHour', {rules: [{required: true, message: '要求时间不能为空'}]}]"/>
+          v-decorator="['requireHour', {rules: [{required: true, message: '要求时间不能为空'}]}]">
+          <span slot="suffix">小时</span>
+        </a-input>
       </a-form-item>
     </a-form>
     <template slot="footer">
@@ -93,6 +94,7 @@ export default {
         }
         console.log(values)
         dispatchFillGatherTask(values).then(res => {
+          this.$message.success('转派成功!')
           this.handleCancel()
         })
         // 日期处理

+ 6 - 4
src/views/fill/task/modules/OvertimeForm.vue

@@ -15,11 +15,12 @@
         :labelCol="BaseTool.Constant.labelCol"
         :wrapperCol="BaseTool.Constant.wrapperCol"
       >
-        <a-input-number
+        <a-input
+          type="number"
           :min="0"
-          :formatter="value => `${value}小时`"
-          :parser="value => value.replace('小时', '')"
-          v-decorator="['extrahours', {rules: [{required: true, message: '要求时间不能为空'}]}]"/>
+          v-decorator="['extrahours', {rules: [{required: true, message: '延时时间不能为空'}]}]">
+          <span slot="suffix">小时</span>
+        </a-input>
       </a-form-item>
     </a-form>
     <template slot="footer">
@@ -68,6 +69,7 @@ export default {
         }
         console.log(values)
         overtimeFillGatherTask(values).then(res => {
+          this.$message.success('延时成功!')
           this.handleCancel()
         })
         // 日期处理

+ 20 - 6
src/views/fill/task/modules/PauseForm.vue

@@ -1,6 +1,6 @@
 <template>
   <a-modal
-    title="转派"
+    title="暂停"
     :width="800"
     :visible="visible"
     :confirmLoading="confirmLoading"
@@ -11,15 +11,26 @@
         <a-input v-decorator="['id']" type="hidden"/>
       </a-form-item>
       <a-form-item
+        v-if="model.status === 5"
         label="要求时间"
         :labelCol="BaseTool.Constant.labelCol"
         :wrapperCol="BaseTool.Constant.wrapperCol"
       >
-        <a-input-number
+        <a-input
+          type="number"
           :min="0"
-          :formatter="value => `${value}小时`"
-          :parser="value => value.replace('小时', '')"
-          v-decorator="['requireHour', {rules: [{required: true, message: '要求时间不能为空'}]}]"/>
+          v-decorator="['requireHour', {rules: [{required: true, message: '要求时间不能为空'}]}]">
+          <span slot="suffix">小时</span>
+        </a-input>
+      </a-form-item>
+      <a-form-item
+        v-else
+        label="暂停原因"
+        :labelCol="BaseTool.Constant.labelCol"
+        :wrapperCol="BaseTool.Constant.wrapperCol"
+      >
+        <a-textarea
+          v-decorator="['remark', {rules: [{required: true, message: '暂停原因不能为空'}]}]" />
       </a-form-item>
     </a-form>
     <template slot="footer">
@@ -43,6 +54,7 @@ export default {
       confirmLoading: false,
       form: this.$form.createForm(this),
       visible: false,
+      model: {},
       // 下拉框map
       ipqcMap: {}
     }
@@ -53,6 +65,7 @@ export default {
   methods: {
     base (record) {
       console.log(record)
+      this.model = record
       this.visible = true
       const { form: { setFieldsValue } } = this
       // 日期处理
@@ -76,7 +89,7 @@ export default {
           this.confirmLoading = false
           return
         }
-        values.pauseType = 2
+        values.pauseType = this.model.status === 5 ? 2 : 1
         console.log(values)
         pauseFillGatherTask(values).then(res => {
           this.handleCancel()
@@ -86,6 +99,7 @@ export default {
     },
     handleCancel () {
       this.visible = false
+      this.confirmLoading = false
       this.$emit('ok')
     }
 

+ 1 - 1
src/views/statisticView/44.vue

@@ -5,7 +5,7 @@
         <img src="@/assets/22title.png" alt="">
       </div>
       <div class="text">
-        <div> 设备数据大屏展示平台</div>
+        <div>设备数据大屏展示平台</div>
         <div style="font-size: 15px;color: #A7DBFF;">Large screen display platform for device data</div>
       </div>
     </div>

+ 183 - 0
src/views/statisticView/SwitchingRoom.vue

@@ -0,0 +1,183 @@
+<template>
+  <div class="view-container">
+    <div class="date">
+      <span>2022年5月17日</span>
+      <span>天气:良</span>
+    </div>
+    <div class="adress">
+      <div class="address-opt">梅康一路</div>
+      <div>梅康一路</div>
+      <div>梅康一路</div>
+    </div>
+    <div class="sb">
+      <a-row type="flex" justify="space-between" :gutter="[20,20]">
+        <a-col :span="6" v-for="item in 8" :key="item">
+          <div class="sb-info">
+            <div class="sb-info-title">
+              <span>2G04</span>
+              <span>10KV联合动力2#变压器</span>
+            </div>
+            <div class="sb-info-content">
+              <div>低压进线V</div>
+              <div class="arrow">
+                <div>
+                  <div>电压:32V</div>
+                  <div><img src="../../assets/bgView/jiantouBlue.png" width="65px" alt=""></div>
+                </div>
+                <div style="color:rgba(40, 233, 108, 1)">
+                  <div>电流:32A</div>
+                  <div><img src="../../assets/bgView/jiantouGreen.png" width="65px" alt=""></div>
+                </div>
+                <div style="color:rgba(255, 216, 0, 1)">
+                  <div>有功电度:34V</div>
+                  <div><img src="../../assets/bgView/jiantouYellow.png" width="65px" alt=""></div>
+                </div>
+              </div>
+              <div><img src="../../assets/bgView/bianyaqi.png" width="87px" alt=""></div>
+              <div class="arrow">
+                <div>
+                  <div>电压:32V</div>
+                  <div><img src="../../assets/bgView/jiantouBlue.png" width="65px" alt=""></div>
+                </div>
+                <div style="color:rgba(40, 233, 108, 1)">
+                  <div>电压:32V</div>
+                  <div><img src="../../assets/bgView/jiantouGreen.png" width="65px" alt=""></div>
+                </div>
+              </div>
+              <div>高压出线KV</div>
+            </div>
+          </div>
+        </a-col>
+        <a-col :span="6" v-for="item in 8" :key="item">
+          <div class="sb-info">
+            <div class="sb-info-title">
+              <span>2G06</span>
+              <span>10KV开山螺杆B线</span>
+            </div>
+            <div class="sb-info-content">
+              <div>低压进线V</div>
+              <div class="arrow">
+                <div>
+                  <div>电压:32V</div>
+                  <div><img src="../../assets/bgView/jiantouBlue.png" width="65px" alt=""></div>
+                </div>
+                <div style="color:rgba(40, 233, 108, 1)">
+                  <div>电压:32V</div>
+                  <div><img src="../../assets/bgView/jiantouGreen.png" width="65px" alt=""></div>
+                </div>
+                <div style="color:rgba(255, 216, 0, 1)">
+                  <div>电压:32V</div>
+                  <div><img src="../../assets/bgView/jiantouYellow.png" width="65px" alt=""></div>
+                </div>
+              </div>
+              <div><img src="../../assets/bgView/luogan.png" width="153px" alt=""></div>
+            </div>
+          </div>
+        </a-col>
+      </a-row>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+<style lang="less" scoped>
+.view-container {
+width:1920px;
+height:1080px;
+font-family: PingFang SC;
+padding: 80px 67px;
+&::after {
+  content: "";
+  width:1920px;
+  height:1080px;
+  background: url(../../assets/bgView/SwitchingRoomBG.png);
+  top: 0;
+  left: 0;
+  bottom: 0;
+  right: 0;
+  position: absolute;
+  z-index: -1;
+}
+}
+.date{
+  width: 250px;
+  color: #FFFFFF;
+  font-size: 20px;
+  display: flex;
+  justify-content: space-between;
+  position: absolute;
+  top:58px;
+  left:96px;
+}
+.adress{
+  width: 660px;
+  margin: 20px auto;
+  font-size: 30px;
+  font-weight: bold;
+  color: #FFFFFF;
+  display:flex;
+  justify-content: space-between;
+  div {
+    width: 173px;
+    height: 58px;
+    line-height: 50px;
+    text-align: center;
+    border: 2px solid #0089D8;
+    border-radius: 9px;
+  }
+  .address-opt {
+    box-shadow: 0px 0px 40px 0px rgba(0, 137, 216, 0.8) inset;
+    color:#28E96C;
+  }
+}
+.sb{
+  color:#fff;
+  margin-top: 30px;
+}
+.sb-info{
+  width: 424px;
+  height:185px;
+  background: url(../../assets/bgView/sbInfoBg.png) no-repeat;
+  position: relative;
+  .sb-info-title{
+    width: 208px;
+    font-size: 13px;
+    font-weight: bold;
+    color: RGBA(192, 231, 247, 1);
+    display: flex;
+    justify-content:space-between;
+    position: absolute;
+    top:16px;
+    left:18px;
+    &::before{
+      content: '';
+      width: 5px;
+      height: 10px;
+      background: #5ACCF8;
+      position: absolute;
+      top:5px;
+      left:2px;
+    }
+    span:first-child{
+      color:#5ACCF8;
+      padding-left:10px;
+    }
+  }
+  .sb-info-content{
+    display: flex;
+    justify-content: space-around;
+    align-items:center;
+    font-size: 14px;
+    font-weight: 500;
+    color: #5ACCF8;
+    padding: 44px 10px 10px 7px;
+    .arrow{
+      font-size:12px;
+    }
+  }
+}
+</style>

+ 3 - 0
src/views/workplace/backlog/WorkplaceBacklog.vue

@@ -385,6 +385,9 @@ export default {
           }
           this.$refs.detailScrapModal.base(param)
         }
+      } else if (record.type === this.DictCache.getValueByCode(this.DictCache.TYPE.WORKPLACE_BACKLOG_TYPE, 'FILL_TASK')) {
+        console.log(record)
+        this.$router.push('/sb/inspection/fill/task?id=' + record.targetId) // 跳转巡检
       } else {
         this.$message.info('该类型的通知正在开发中,请稍后...')
       }