hfxc226 2 lat temu
rodzic
commit
3bed899fde

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

@@ -16,7 +16,7 @@ export default {
         ...this.pagination,
         showTotal: total => `共 ${total} 条数据`,
         showSizeChanger: true,
-        pageSizeOptions: ['10', '20', '50', '100', '150']
+        pageSizeOptions: ['10', '20', '50']
       })
     }
   },
@@ -39,7 +39,7 @@ export default {
     },
     pageSize: {
       type: Number,
-      default: 50
+      default: 10
     },
     showSizeChanger: {
       type: Boolean,

+ 2 - 1
src/components/tools/UserMenu.vue

@@ -92,7 +92,8 @@ export default {
   methods: {
     ...mapActions(['Logout']),
     changeLangEvent (type) {
-      localStorage.setItem('locale', type)
+      // localStorage.setItem('locale', type)
+      localStorage.setItem('locale', 'zh-CN')
       this.$i18n.locale = type
       this.$router.go(0)
     },

+ 2 - 1
src/main.js

@@ -81,7 +81,8 @@ Vue.directive('drag-modal', (el, bindings, vnode) => {
 })
 
 const i18n = new VueI18n({
-  locale: localStorage.getItem('locale') || 'zh-CN',
+  // locale: localStorage.getItem('locale') || 'zh-CN',
+  locale: 'zh-CN',
   messages: {
     'zh-CN': require('./i18n/zh')
     // 'en-US': require('./i18n/en')

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

@@ -93,7 +93,9 @@ const constantRouterComponents = {
   'SpotCheckStandard': () => import('@/views/check/checkstandard/SpotCheckStandard'),
   'SpotCheckProject': () => import('@/views/check/checkproject/SpotCheckProject'),
   'SpotCheckPlan': () => import('@/views/check/checkplan/SpotCheckPlan'),
-  'SpotCheckJob': () => import('@/views/check/checkjob/SpotCheckJob'),
+  'SpotCheckJobOverTime': () => import('@/views/check/checkjob/SpotCheckJob'),
+  'SpotCheckJob': () => import('@/views/check/checkjob/SpotCheckJobOverTime'),
+  'SpotCheckJobFinish': () => import('@/views/check/checkjob/SpotCheckJobFinish'),
   // 保养
   'PollingCheckStandard': () => import('@/views/check/checkstandard/PollingCheckStandard'),
   'PollingCheckProject': () => import('@/views/check/checkproject/PollingCheckProject'),
@@ -106,6 +108,8 @@ const constantRouterComponents = {
   'RunCheckProject': () => import('@/views/check/checkproject/RunCheckProject'),
   'RunCheckPlan': () => import('@/views/check/checkplan/RunCheckPlan'),
   'RunCheckJob': () => import('@/views/check/checkjob/RunCheckJob'),
+  'RunCheckJobOverTime': () => import('@/views/check/checkjob/RunCheckJobOverTime'),
+  'RunCheckJobFinish': () => import('@/views/check/checkjob/RunCheckJobFinish'),
   // 工器具校准
   'AdjustCheckStandard': () => import('@/views/check/checkstandard/AdjustCheckStandard'),
   'AdjustCheckProject': () => import('@/views/check/checkproject/AdjustCheckProject'),

+ 7 - 4
src/views/activiti/model/Model.vue

@@ -96,36 +96,39 @@ export default {
       columns: [
         {
           title: '模型ID',
+          width: '120px',
           dataIndex: 'id'
         },
         {
           title: '模型标识',
+          width: '220px',
           dataIndex: 'key'
         },
         {
           title: '模型分类',
+          width: '150px',
           dataIndex: 'category'
         },
         {
           title: '模型名称',
+          width: '220px',
           dataIndex: 'name'
         },
         {
           title: '版本号',
+          width: '70px',
           dataIndex: 'version'
         },
-        {
-          title: '描述',
-          dataIndex: 'description'
-        },
         {
           title: '创建时间',
           dataIndex: 'createTime',
+          width: '150px',
           customRender: (text) => timestampToTime(text)
         },
         {
           title: '最后更新时间',
           dataIndex: 'lastUpdateTime',
+          width: '150px',
           customRender: (text) => timestampToTime(text)
         },
         {

+ 1 - 4
src/views/check/checkjob/CheckJob.vue

@@ -255,7 +255,7 @@ export default {
       advanced: false,
       // 查询参数
       queryParam: {
-        type: this.checkType,
+        type: this.$route.query.checkType || this.checkType,
         searchStartTime: null,
         searchEndTime: null,
         filter: this.filter,
@@ -455,9 +455,6 @@ export default {
     this.tableOption()
   },
   methods: {
-    ddd () {
-      alert(111)
-    },
     tableOption () {
       if (!this.optionAlertShow) {
         this.options = {

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

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

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

@@ -0,0 +1,17 @@
+<template>
+  <CheckJob :check-type="3" :receive-overtime="true" :status-list='[]'/>
+</template>
+
+<script>
+import CheckJob from './CheckJob'
+export default {
+  name: 'SpotCheckJobOverTime',
+  components: {
+    CheckJob
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

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

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

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

@@ -0,0 +1,17 @@
+<template>
+  <CheckJob :check-type="1" :receive-overtime="true" :status-list='[]'/>
+</template>
+
+<script>
+import CheckJob from './CheckJob'
+export default {
+  name: 'SpotCheckJobOverTime',
+  components: {
+    CheckJob
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 12 - 4
src/views/check/checkstandard/CheckStandard.vue

@@ -197,7 +197,7 @@ export default {
   },
   props: {
     /**
-     * 检查类型: 1-点检 2-巡检
+     * 检查类型: 1-点检 2-保养 3-润滑
      */
     checkType: {
       type: Number,
@@ -210,9 +210,8 @@ export default {
       visible: true,
       confirmLoading: false,
       queryParam: {
-        type: this.checkType,
+        type: this.$route.query.checkType || this.checkType,
         sbId: this.$route.query.id
-
       },
       // 表头
       columns: [
@@ -243,6 +242,15 @@ export default {
           checked: true,
           width: '150px'
         },
+        {
+          title: '类型',
+          dataIndex: 'type',
+          checked: true,
+          width: '120px',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.typeMap, text)
+          }
+        },
         {
           title: '部位',
           dataIndex: 'partName',
@@ -250,7 +258,7 @@ export default {
           width: '200px'
         },
         {
-          title: '维护等级',
+          title: '等级',
           dataIndex: 'level',
           width: '100px',
           checked: true,

+ 5 - 6
src/views/check/checkstandard/modules/BaseForm.vue

@@ -39,7 +39,7 @@
             <a-button type="primary" style="width: 20%" @click="handleSbSelect">选择</a-button>
           </a-form-item>
         </row-item>
-        <!--        <row-item>
+        <row-item>
           <a-form-item
             label="标准名称"
             :labelCol="BaseTool.Constant.labelCol"
@@ -48,7 +48,7 @@
             <a-input
               v-decorator="['name', {rules: [{required: true, message: '标准名称不能为空'}]}]"/>
           </a-form-item>
-        </row-item>-->
+        </row-item>
         <row-item>
           <a-form-item
             label="维护部位"
@@ -140,7 +140,7 @@
               suffix="小时"/>
           </a-form-item>
         </row-item>
-        <!--        <row-item>
+        <row-item>
           <a-form-item
             label="类型"
             :labelCol="BaseTool.Constant.labelCol"
@@ -148,8 +148,7 @@
           >
             <a-select
               disabled
-              v-show="false"
-              v-decorator="['type', {initialValue:checkType,rules: [{required: true, message: '检查类型不能为空'}]}]"
+              v-decorator="['type', {initialValue:checkType,rules: [{required: true, message: '类型不能为空'}]}]"
               placeholder="请选择">
               <a-select-option
                 v-for="(label,value) in typeMap"
@@ -159,7 +158,7 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-        </row-item>-->
+        </row-item>
         <row-item>
           <a-form-item
             label="排序"

+ 2 - 2
src/views/check/checkstandard/modules/Detail.vue

@@ -7,7 +7,7 @@
     @cancel="handleCancel"
   >
     <detail-list title="" :col="2">
-      <!--      <detail-list-item term="标准名称">{{ model.name }}</detail-list-item>-->
+      <detail-list-item term="标准名称">{{ model.name }}</detail-list-item>
       <detail-list-item term="排序">{{ model.sort }}</detail-list-item>
       <detail-list-item term="编码">{{ model.no }}</detail-list-item>
       <detail-list-item term="检查类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>
@@ -16,7 +16,7 @@
       <detail-list-item term="标准工时">{{ model.standardHours }}</detail-list-item>
       <detail-list-item term="上次实际日期">{{ model.lastDate }}</detail-list-item>
       <detail-list-item term="下次预计日期">{{ model.nextDate }}</detail-list-item>
-      <!--      <detail-list-item term="动作类型">{{ BaseTool.Object.getField(actionTypeMap,model.actionType) }}</detail-list-item>-->
+      <detail-list-item term="类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>
       <detail-list-item term="部位">{{ model.partName }}</detail-list-item>
       <!--      <detail-list-item term="是否启用"><badge :status="DictCache.COLOR.YES_NO[model.enable]" :text="enableMap[model.enable]"></badge></detail-list-item>-->
       <!--      <detail-list-item term="创建人">{{ model.createdUserName }}</detail-list-item>

+ 46 - 18
src/views/sb/info/modules/Detail.vue

@@ -14,11 +14,26 @@
               <a-badge :count="numModelbom" title="备件总数" :number-style="{ backgroundColor: '#52c41a' }">
                 <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewBom()">备件BOM</a-button>
               </a-badge>
-              <a-badge :count="numCheckStandard" title="维护项目总数" :number-style="{ backgroundColor: '#52c41a' }">
-                <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck()">维护项目</a-button>
+
+              <a-badge :count="numCheckStandard1" title="点检标准" :number-style="{ backgroundColor: '#52c41a' }">
+                <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck(1)">点检标准</a-button>
+              </a-badge>
+              <a-badge :count="numCheckjob1" title="点检任务" :number-style="{ backgroundColor: '#52c41a' }">
+                <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob(1)">点检任务</a-button>
               </a-badge>
-              <a-badge :count="numCheckjob" title="保养任务总数" :number-style="{ backgroundColor: '#52c41a' }">
-                <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob()">保养任务</a-button>
+
+              <a-badge :count="numCheckStandard2" title="保养标准" :number-style="{ backgroundColor: '#52c41a' }">
+                <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck(2)">保养标准</a-button>
+              </a-badge>
+              <a-badge :count="numCheckjob2" title="保养任务" :number-style="{ backgroundColor: '#52c41a' }">
+                <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob(2)">保养任务</a-button>
+              </a-badge>
+
+              <a-badge :count="numCheckStandard3" title="润滑标准" :number-style="{ backgroundColor: '#52c41a' }">
+                <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck(3)">润滑标准</a-button>
+              </a-badge>
+              <a-badge :count="numCheckjob3" title="润滑任务" :number-style="{ backgroundColor: '#52c41a' }">
+                <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob(3)">润滑任务</a-button>
               </a-badge>
               <a-button style="margin-left: 20px" type="default" @click="handleViewTree()">设备树</a-button>
               <a-button v-show="model.useType==4" style="margin-left: 8px" type="default" @click="handleMeasure()">检定记录</a-button>
@@ -84,6 +99,7 @@
               <a-descriptions-item label="设备编号">
                 {{ model.no }}
               </a-descriptions-item>
+              <a-descriptions-item label="资产编号">{{ model.financingNo }}</a-descriptions-item>
               <a-descriptions-item label="设备(旧号)">
                 {{ model.zbh }}
               </a-descriptions-item>
@@ -128,7 +144,7 @@
             </a-descriptions>
           </a-card>
           <br>
-          <a-card >
+          <!--          <a-card >
             <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>资产编号</b></div>
             <a-descriptions bordered :column="3">
               <a-descriptions-item label="资产编号1">{{ model.financingNo }}</a-descriptions-item>
@@ -138,7 +154,7 @@
               <a-descriptions-item label="资产编号5">{{ model.financingNoFive }}</a-descriptions-item>
             </a-descriptions>
           </a-card>
-          <br>
+          <br>-->
           <a-card >
             <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>人员信息</b></div>
             <a-descriptions bordered :column="3">
@@ -384,8 +400,12 @@ export default {
         'retirementDate': null,
         'registerDate': null
       },
-      numCheckStandard: 0,
-      numCheckjob: 0,
+      numCheckStandard1: 0,
+      numCheckjob1: 0,
+      numCheckStandard2: 0,
+      numCheckjob2: 0,
+      numCheckStandard3: 0,
+      numCheckjob3: 0,
       numRepairReason: 0,
       numModelbom: 0,
       numPartInfo: 0,
@@ -439,13 +459,13 @@ export default {
       // let routeUrl = this.$router.resolve(`/share/${96}`)
       window.open(routeUrl.href, '_blank')
     },
-    handleViewCheck (record) {
-      const routeUrl = this.$router.resolve({ path: '/check/polling-standard', query: { id: this.model.id } })
+    handleViewCheck (type) {
+      const routeUrl = this.$router.resolve({ path: '/check/polling-standard', query: { id: this.model.id, checkType: type } })
       // let routeUrl = this.$router.resolve(`/share/${96}`)
       window.open(routeUrl.href, '_blank')
     },
-    handleViewCheckJob (record) {
-      const routeUrl = this.$router.resolve({ path: '/check/polling-job', query: { id: this.model.id } })
+    handleViewCheckJob (type) {
+      const routeUrl = this.$router.resolve({ path: '/check/polling-job', query: { id: this.model.id, checkType: type } })
       window.open(routeUrl.href, '_blank')
     },
     // 根据keyNum路由相关页面
@@ -504,16 +524,24 @@ export default {
       Promise.all([
         queryNumPartInfo({ sbId: this.model.id }),
         queryNumModelbom({ sbId: this.model.id }),
-        queryNumCheckStandard({ sbId: this.model.id }),
-        queryNumCheckjob({ sbId: this.model.id }),
-        queryNumRepairReason({ sbId: this.model.id })
+        queryNumRepairReason({ sbId: this.model.id }),
+        queryNumCheckStandard({ sbId: this.model.id, type: 1 }),
+        queryNumCheckStandard({ sbId: this.model.id, type: 2 }),
+        queryNumCheckStandard({ sbId: this.model.id, type: 3 }),
+        queryNumCheckjob({ sbId: this.model.id, type: 1 }),
+        queryNumCheckjob({ sbId: this.model.id, type: 2 }),
+        queryNumCheckjob({ sbId: this.model.id, type: 3 })
       ])
         .then((values) => {
           this.numPartInfo = values[0].data
           this.numModelbom = values[1].data
-          this.numCheckStandard = values[2].data
-          this.numCheckjob = values[3].data
-          this.numRepairReason = values[4].data
+          this.numRepairReason = values[2].data
+          this.numCheckStandard1 = values[3].data
+          this.numCheckStandard2 = values[4].data
+          this.numCheckStandard3 = values[5].data
+          this.numCheckjob1 = values[6].data
+          this.numCheckjob2 = values[7].data
+          this.numCheckjob3 = values[8].data
         })
 
       // 如果是父设备,则要获取子设备的数量,并点击后可以看到子设备的情况

+ 4 - 4
vue.config.js

@@ -16,7 +16,7 @@ function isProd () {
   return process.env.NODE_ENV === 'production'
 }
 
-/* const assetsCDN = {
+const assetsCDN = {
   css: [],
   // https://unpkg.com/browse/vue@2.6.10/
   js: [
@@ -25,15 +25,15 @@ function isProd () {
     'cdn.jsdelivr.net/npm/vuex@3.1.1/dist/vuex.min.js',
     'cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js'
   ]
-} */
+}
 
 // webpack build externals
-/* const prodExternals = {
+const prodExternals = {
   vue: 'Vue',
   'vue-router': 'VueRouter',
   vuex: 'Vuex',
   axios: 'axios'
-} */
+}
 
 // vue.config.js
 const vueConfig = {