Browse Source

设备详情完善1

guarantee-lsq 2 years ago
parent
commit
77e4b6a9d1

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

@@ -297,7 +297,9 @@ const constantRouterComponents = {
   // 自定义管理
   'CustomizeReport': () => import('@/views/customize/report/CustomizeReport'), // 自定义报表
   'CustomFieldTemplate': () => import('@/views/customize/fieldTemplate/CustomFieldTemplate'), // 自定义模板
-  'CustomFieldTemplateData': () => import('@/views/customize/fieldTemplateData/CustomFieldTemplateData') // 自定义模板数据
+  'CustomFieldTemplateData': () => import('@/views/customize/fieldTemplateData/CustomFieldTemplateData'), // 自定义模板数据
+  // 新增路由
+  'SparePartUsedSelectTable': () => import('@/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectTable') // 备件使用记录
 }
 
 // 前端未找到页面路由(固定不用改)

+ 2 - 1
src/views/repair/application-form/RepairForm.vue

@@ -168,7 +168,8 @@ export default {
       // 查询参数
       queryParam: {
         filter: this.filter,
-        searchType: this.searchType
+        searchType: this.searchType,
+        sbId: this.$route.query.id
       },
       visible: true,
       // 表头

+ 1 - 0
src/views/repair/fee/RepairFee.vue

@@ -127,6 +127,7 @@ export default {
     return {
       // 查询参数
       queryParam: {
+        sbId: this.$route.query.id
       },
       moneyTypeMap: {},
       categoryMap: {},

+ 28 - 8
src/views/sb/info/modules/DetailC.vue

@@ -47,32 +47,32 @@
           <a-divider style="background: #D6D6D6" />
           <a-row type="flex" justify="space-between" :gutter="[16,16]">
             <a-col :span="10">
-              <a-button shape="round" block>
+              <a-button shape="round" @click="handleRouter(1)" block>
                 配件记录
               </a-button>
             </a-col>
             <a-col :span="10">
-              <a-button shape="round" @click="handleCheckFinish()" block>
+              <a-button shape="round" @click="handleRouter(2)" block>
                 保养记录
               </a-button>
             </a-col>
             <a-col :span="10">
-              <a-button shape="round" block>
+              <a-button shape="round" @click="handleRouter(3)" block>
                 历史故障
               </a-button>
             </a-col>
             <a-col :span="10">
-              <a-button shape="round" block>
+              <a-button shape="round" @click="handleRouter(4)" block>
                 历史费用
               </a-button>
             </a-col>
             <a-col :span="10">
-              <a-button shape="round" block>
+              <a-button shape="round" @click="handleRouter(5)" block>
                 状态变更记录
               </a-button>
             </a-col>
             <a-col :span="10">
-              <a-button shape="round" block>
+              <a-button shape="round" @click="handleRouter(6)" block>
                 停机记录
               </a-button>
             </a-col>
@@ -448,8 +448,28 @@ export default {
       const routeUrl = this.$router.resolve({ path: '/check/polling-job', query: { id: this.model.id } })
       window.open(routeUrl.href, '_blank')
     },
-    handleCheckFinish () {
-      const routeUrl = this.$router.resolve({ path: '/check/polling-job/finish', query: { id: this.model.id } })
+    // 根据keyNum路由相关页面
+    handleRouter (keyNum) {
+      const id = this.model.id
+      var routeUrl = ''
+      if (keyNum === 1) {
+        routeUrl = this.$router.resolve({ path: '/spare/used/record', query: { id: id } })
+      }
+      if (keyNum === 2) {
+        routeUrl = this.$router.resolve({ path: '/check/polling-job/finish', query: { id: id } })
+      }
+      if (keyNum === 3) {
+        routeUrl = this.$router.resolve({ path: '/repair/form', query: { id: id } })
+      }
+      if (keyNum === 4) {
+        routeUrl = this.$router.resolve({ path: '/repair/form', query: { id: id } })
+      }
+      if (keyNum === 5) {
+        routeUrl = this.$router.resolve({ path: '/status/log', query: { id: id } })
+      }
+      if (keyNum === 6) {
+        routeUrl = this.$router.resolve({ path: '/stop/log', query: { id: id } })
+      }
       window.open(routeUrl.href, '_blank')
     },
     handleMeasure (record) {

+ 1 - 0
src/views/sb/status-log/SbStatusLog.vue

@@ -88,6 +88,7 @@ export default {
       statusMap: {},
       // 查询参数
       queryParam: {
+        sbId: this.$route.query.id
       },
       // 表头
       columns: [

+ 1 - 0
src/views/sb/stop-logs/SbStopLog.vue

@@ -83,6 +83,7 @@ export default {
       statusMap: {},
       // 查询参数
       queryParam: {
+        sbId: this.$route.query.id
       },
       // 表头
       columns: [

+ 1 - 0
src/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectTable.vue

@@ -116,6 +116,7 @@ export default {
       record: null,
       // 查询参数
       queryParam: {
+        sbId: this.$route.query.id,
       },
       // 表头
       columns: [