xiongchao 3 years ago
parent
commit
b5614f95dc

+ 2 - 2
public/hitch-screen/index.html

@@ -125,9 +125,9 @@ var option = {
     },
     itemStyle: {
       normal: {
-        color: '#17bf9e',
+        color: '#174FBF',
         shadowBlur: 200,
-        shadowColor: '#17bf9e'
+        shadowColor: '#174FBF'
       }
     },
     zlevel: 1

+ 21 - 11
public/hitch-screen/point.html

@@ -10,11 +10,10 @@
 </head>
 <body>
   <div class="positon">
-    <span></span><span>水平位置: </span><span id="x"></span><span>,垂直位置: </span><span id="y"></span>
+    <span></span><span>水平位置: </span><input id="x"></input><span>,垂直位置: </span><input id="y"></input>
     <span id="y"><a class="ahref">保存位置</a></span>
   </div>
   <div class="point">
-    位置
   </div>
   <div id="echart" class="echart"></div>
   <div class="data">
@@ -52,20 +51,33 @@
 
   var yy = window.location.search.split("jbdh=")[1] || 0;
   yy = filterUrlData(yy);
+
   // 初始化设备位置
   $(function(){
-    $('#x').text(xx);
-    $('#y').text(yy);
-    $('.point').css('left',xx).css('top',yy).css('position', 'absolute');
+
+    $('#x').val(xx);
+    $('#y').val(yy);
+    $('.point').attr("style", 'left: ' + xx + 'px;top: ' + yy + 'px');
 
     $('#echart').click(function(e) {
       xx = e.pageX || 0;
       yy = e.pageY || 0;
       console.log(xx+'   '+yy);
-      $('#x').text(xx);
-      $('#y').text(yy);
+      $('#x').val(xx);
+      $('#y').val(yy);
       $('.point').css('left',xx).css('top',yy);
     })
+
+    $('#x').on('input',function(e){
+      xx = e.delegateTarget.value
+      $('.point').attr("style", 'left: ' + xx + 'px;top: ' + yy + 'px')
+    });
+
+    $('#y').on('input',function(e){
+      yy = e.delegateTarget.value
+      $('.point').attr("style", 'left: ' + xx + 'px;top: ' + yy + 'px')
+    });
+
     $('.ahref').click(function(e) {
       if(id == null){
         alert('请设置设备')
@@ -247,7 +259,6 @@ var option = {
 // 使用刚指定的配置项和数据显示图表
 myChart.setOption(option);
 
-
 function getHeader(){
   return {
     Authorization: getToken(),
@@ -273,9 +284,8 @@ function getToken(){
   .point{
     position: absolute;
     padding: 5px;
-    background: red;
-    left:0;
-    top:0;
+    background: blue;
+    border-radius: 5px;
     z-index: 1000;
   }
   .ahref{

+ 2 - 0
src/router/generator-platform-routers.js

@@ -117,6 +117,7 @@ const constantRouterComponents = {
   'PollingCheckProject': () => import('@/views/check/checkproject/PollingCheckProject'),
   'PollingCheckPlan': () => import('@/views/check/checkplan/PollingCheckPlan'),
   'PollingCheckJob': () => import('@/views/check/checkjob/PollingCheckJob'),
+  'PollingCheckJobFinish': () => import('@/views/check/checkjob/PollingCheckJobFinish'),
   // 润滑
   'RunCheckStandard': () => import('@/views/check/checkstandard/RunCheckStandard'),
   'RunCheckProject': () => import('@/views/check/checkproject/RunCheckProject'),
@@ -277,6 +278,7 @@ const constantRouterComponents = {
   'CompanySpareStore': () => import('@/views/store/sparestore/CompanySpareStore'),
   'MyRunCheckJob': () => import('@/views/check/checkjob/MyRunCheckJob'),
   'MyPollingCheckJob': () => import('@/views/check/checkjob/MyPollingCheckJob'),
+  'MyPollingCheckJobFinish': () => import('@/views/check/checkjob/MyPollingCheckJobFinish'),
   'MySpotCheckJob': () => import('@/views/check/checkjob/MySpotCheckJob'),
   // 验收单
   'SbCheckForm': () => import('@/views/sb/sbcheckform/SbCheckForm'),

+ 32 - 2
src/views/check/checkjob/CheckJob.vue

@@ -16,7 +16,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="设备等级">
-                <a-select v-model="queryParam.level" placeholder="请选择">
+                <a-select v-model="queryParam.sblevel" placeholder="请选择">
                   <a-select-option
                     v-for="(label,value) in levelMap"
                     :key="value"
@@ -40,6 +40,18 @@
                 </a-tree-select>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="保养等级">
+                <a-select v-model="queryParam.standardLevel" placeholder="请选择">
+                  <a-select-option
+                    v-for="(label,value) in standardLevelMap"
+                    :key="value"
+                    :label="label"
+                    :value="parseInt(value)">{{ label }}
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="周期类型">
                 <a-select v-model="queryParam.periodType" placeholder="请选择">
@@ -166,6 +178,7 @@ import BaseForm from './modules/BaseForm'
 import Detail from './modules/Detail'
 import { getCheckJobPage, deleteCheckJobs, fetchCheckJob, exportCheckJob, executeJob } from '@/api/check/checkjob'
 import { fetchSbTypeTree } from '@/api/sb/type'
+import DictCache from '@/utils/dict'
 
 export default {
   name: 'CheckJobList',
@@ -186,6 +199,15 @@ export default {
     filter: {
       type: Number,
       default: -1
+    },
+    status: {
+      type: Number,
+      default: null
+    },
+    statusList: {
+      type: String,
+      default: [DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE, DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING, DictCache.VALUE.CHECK_JOB_STATUS.OUT_OF_DATE].join(',')
+
     }
   },
   data () {
@@ -197,7 +219,9 @@ export default {
         type: this.checkType,
         searchStartTime: null,
         searchEndTime: null,
-        filter: this.filter
+        filter: this.filter,
+        status: this.status,
+        statusList: this.statusList
       },
       treeData: [],
       // 表头
@@ -448,6 +472,12 @@ export default {
     },
     resetSearchForm () {
       this.queryParam = {
+        type: this.checkType,
+        searchStartTime: null,
+        searchEndTime: null,
+        filter: this.filter,
+        status: this.status,
+        statusList: this.statusList
       }
       this.$refs.table.refresh(true)
     },

+ 17 - 0
src/views/check/checkjob/MyPollingCheckJobFinish.vue

@@ -0,0 +1,17 @@
+<template>
+  <CheckJob :check-type="2" :filter="0" :status="DictCache.VALUE.CHECK_JOB_STATUS.FINISHED" :status-list='[]'/>
+</template>
+
+<script>
+import CheckJob from './CheckJob'
+export default {
+  name: 'PollingCheckJob',
+  components: {
+    CheckJob
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 17 - 0
src/views/check/checkjob/PollingCheckJobFinish.vue

@@ -0,0 +1,17 @@
+<template>
+  <CheckJob :check-type="2" :status="DictCache.VALUE.CHECK_JOB_STATUS.FINISHED" :status-list="[]"/>
+</template>
+
+<script>
+import CheckJob from './CheckJob'
+export default {
+  name: 'PollingCheckJob',
+  components: {
+    CheckJob
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/views/check/checkjob/SpecialCheckJob.vue

@@ -5,7 +5,7 @@
 <script>
 import CheckJob from './CheckJob'
 export default {
-  name: 'AdjustCheckJob',
+  name: 'SpecialCheckJob',
   components: {
     CheckJob
   }

+ 35 - 12
src/views/check/checkjob/modules/CheckJobTable.vue

@@ -59,6 +59,7 @@
       :columns="columns"
       :data="loadData"
       :alert="options.alert"
+      :scroll="{x: 1500, y: BaseTool.Constant.scrollY }"
       :rowSelection="options.rowSelection"
       showPagination="auto"
     >
@@ -148,13 +149,15 @@ export default {
     return {
       // 查询参数
       queryParam: {
-        type: this.checkType
+        type: this.checkType,
+        status: this.DictCache.VALUE.CHECK_JOB_STATUS.FINISHED
       },
       // 表头
       columns: [
         {
           title: '序号',
           dataIndex: 'index',
+          width: '100px',
           customRender: (text, record, index) => {
             return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
           },
@@ -163,52 +166,72 @@ export default {
         {
           title: '任务要求',
           dataIndex: 'requirement',
-          checked: true
+          checked: true,
+          width: '300px'
         },
         {
           title: '负责人',
           dataIndex: 'checkUserName',
-          checked: true
+          checked: true,
+          width: '100px'
         },
         {
           title: '设备',
           dataIndex: 'sbName',
-          checked: true
+          checked: true,
+          width: '100px'
         },
         {
           title: '部位',
           dataIndex: 'partName',
-          checked: true
+          checked: true,
+          width: '100px'
+        },
+        {
+          title: '保养等级',
+          dataIndex: 'standardlevel',
+          width: '100px',
+          checked: true,
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.standardLevelMap, text)
+          }
         },
         {
           title: '执行日期',
           dataIndex: 'startTime',
-          checked: true
+          checked: true,
+          width: '200px'
         },
         {
           title: '截至日期',
           dataIndex: 'endTime',
-          checked: true
+          checked: true,
+          width: '200px'
         },
         {
-          title: '实际开始时间',
-          dataIndex: 'actualStartTime'
+          title: '开始时间',
+          dataIndex: 'actualStartTime',
+          width: '200px'
         },
         {
-          title: '实际结束时间',
-          dataIndex: 'actualEndTime'
+          title: '完成时间',
+          dataIndex: 'actualEndTime',
+          width: '200px'
         },
         {
           title: '任务状态',
           dataIndex: 'status',
           checked: true,
+          width: '100px',
+          fixed: 'right',
           scopedSlots: { customRender: 'status' }
         },
         {
           title: '操作',
           key: 'action',
-          width: '200px',
+          width: '250px',
           align: 'center',
+          fixed: 'right',
           scopedSlots: { customRender: 'action' },
           checked: true
         }

+ 1 - 0
src/views/check/checkjob/modules/Detail.vue

@@ -23,6 +23,7 @@
       <detail-list-item term="编码">{{ modelStandard.no }}</detail-list-item>
       <detail-list-item term="检查类型">{{ BaseTool.Object.getField(typeMap,modelStandard.type) }}</detail-list-item>
       <detail-list-item term="计划周期">{{ modelStandard.period }}{{ BaseTool.Object.getField(periodTypeMap,modelStandard.periodType) }}</detail-list-item>
+      <detail-list-item term="保养等级">{{ BaseTool.Object.getField(periodTypeMap,modelStandard.level) }}</detail-list-item>
       <detail-list-item term="标准工时">{{ modelStandard.standardHours }}</detail-list-item>
       <detail-list-item term="动作类型">{{ BaseTool.Object.getField(actionTypeMap,modelStandard.actionType) }}</detail-list-item>
       <detail-list-item term="部位">{{ modelStandard.partName }}</detail-list-item>

+ 3 - 3
src/views/check/checkjob/modules/DetailSbCheckJob.vue

@@ -46,7 +46,7 @@
       :columns="columns"
       tableLayout="auto"
       :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
-      :scroll="{x: 1500 }"
+      :scroll="{x: 1500, y: BaseTool.Constant.scrollY }"
       rowKey="id">
       <span slot="action" slot-scope="record">
         <template>
@@ -223,12 +223,12 @@ export default {
       this.visible = true
       this.model = record
       this.modalTitle = '详情2'
-      queryCheckJob({ sbId: record.id, type: this.checkType }).then(res => {
+      queryCheckJob({ sbId: record.id, type: this.checkType, statusList: [this.DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE, this.DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING, this.DictCache.VALUE.CHECK_JOB_STATUS.OUT_OF_DATE].join(',') }).then(res => {
         this.data = res.data
       })
     },
     handleOk () {
-      queryCheckJob({ sbId: this.model.id, type: this.checkType }).then(res => {
+      queryCheckJob({ sbId: this.model.id, type: this.checkType, statusList: [this.DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE, this.DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING, this.DictCache.VALUE.CHECK_JOB_STATUS.OUT_OF_DATE].join(',') }).then(res => {
         this.data = res.data
       })
     },

+ 2 - 3
src/views/check/checkstandard/modules/BaseForm.vue

@@ -97,14 +97,13 @@
             </a-select>
           </a-form-item>
         </row-item>
-<!--        <row-item>
+        <row-item>
           <a-form-item
             label="保养等级"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-select
-              disabled
               v-decorator="['level', {rules: [{required: true, message: '保养等级不能为空'}]}]"
               placeholder="请选择">
               <a-select-option
@@ -115,7 +114,7 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-        </row-item>-->
+        </row-item>
         <row-item>
           <a-form-item
             label="计划周期"

+ 2 - 2
src/views/sb/info/modules/Detail.vue

@@ -16,7 +16,7 @@
             <a-badge :count="numCheckStandard" title="保养项目总数" :number-style="{ backgroundColor: '#52c41a' }">
               <a-button style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewCheck()">保养项目</a-button>
             </a-badge>
-            <a-badge :count="numCheckjob" title="待保养项目总数" :number-style="{ backgroundColor: '#52c41a' }">
+            <a-badge :count="numCheckjob" title="保养任务总数" :number-style="{ backgroundColor: '#52c41a' }">
               <a-button style="margin-left: 8px" type="default" @click="handleViewCheckJob()">保养任务</a-button>
             </a-badge>
             <a-button v-show="model.useType==4" style="margin-left: 8px" type="default" @click="handleMeasure()">检定记录</a-button>
@@ -141,7 +141,7 @@
         <q-tab-pane key="2" tab="配件记录">
           <spare-part-used-select-table :type="2" :table-params="{sbId: model.id, modelId: model.modelId}" ref="sparePartUsedSelectTable"/>
         </q-tab-pane>
-        <q-tab-pane key="3" tab="保养任务">
+        <q-tab-pane key="3" tab="保养记录">
           <check-job-table :type="2" :check-type="2" :table-params="{sbId: model.id}" ref="spotJobTable" />
         </q-tab-pane>
         <q-tab-pane key="4" tab="历史故障">