Procházet zdrojové kódy

设备,紫外灯统计默认部门改为主部门

luoaoxuan před 1 rokem
rodič
revize
7f9840d15f

+ 2 - 2
src/views/component/device/maintenanceStaticAll.vue

@@ -158,7 +158,7 @@ export default {
         if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {
             monthList[1] = 29
         }
-        const { userId, position, level } = this.$store.getters
+        const { userId, position, level, mainPosition } = this.$store.getters
         return {
             dialogParams: {},
             MaintenanceStaticVisible: false,
@@ -174,7 +174,7 @@ export default {
             month: monthValue,
             monthDays: monthDays,
             userId: userId,
-            position: position,
+            position: (mainPosition && mainPosition.id) || position,
             level: level.second || level.first,
             loading: false,
             title: '设备维护统计',

+ 2 - 2
src/views/component/facility/ultStatic.vue

@@ -160,7 +160,7 @@ export default {
         if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {
             monthList[1] = 29
         }
-        const { userId, position, level } = this.$store.getters
+        const { userId, position, level, mainPosition } = this.$store.getters
         return {
             dialogParams: {},
             MaintenanceStaticVisible: false,
@@ -177,7 +177,7 @@ export default {
             month: monthValue,
             monthDays: monthDays,
             userId: userId,
-            position: position,
+            position: (mainPosition && mainPosition.id) || position,
             level: level.second || level.first,
             loading: false,
             title: '设备维护统计',