Quellcode durchsuchen

部件跳转无数据修改

zhangyu vor 5 Jahren
Ursprung
Commit
1a912db0d5

+ 2 - 2
src/components/ledger/handsontables/device.vue

@@ -1072,9 +1072,9 @@ export default {
       if (val == "Count") {
         let partsVal = this.hot.getDataAtCell(row.row,row.col);//获取被点击的单元格的数据
         if(this.onlyRead){
-          this.$router.push({ name: 'partsLedger', params: { deviceId: infos.infos.EquipID }});
+          this.$router.push({ path: '/ledger/parts', query: { deviceId: infos.infos.EquipID }});
         }else{
-          this.$router.push({ name: 'partsmanageLedger', params: { deviceId: infos.infos.EquipID,typeId: this.mess.deviceId }});
+          this.$router.push({ path: '/ledger/partsmanage', query: { deviceId: infos.infos.EquipID,typeId: this.mess.deviceId }});
         }
       }
 

+ 1 - 1
src/views/ledger/facility/parts/index.vue

@@ -121,7 +121,7 @@ export default {
     ...mapGetters("layout", ["projectId", "secret", "userId"])
   },
   created() {
-    this.deviceId = this.$route.params.deviceId;
+    this.deviceId = this.$route.query.deviceId;
     this.getTypes();
   },
   methods: {

+ 2 - 2
src/views/ledger/facility/partsmanage/index.vue

@@ -186,8 +186,8 @@ export default {
     ...mapGetters("layout", ["projectId", "secret", "userId"])
   },
   created() {
-    this.deviceId = this.$route.params.deviceId; //设备id
-    this.typeId = this.$route.params.typeId; //设备类id
+    this.deviceId = this.$route.query.deviceId; //设备id
+    this.typeId = this.$route.query.typeId; //设备类id
     this.mess.deviceId = this.typeId;
     this.getTypes();
     this.getEquipmentFamilyList();