浏览代码

Merge remote-tracking branch 'origin/demo_' into demo_

hfxc226 2 年之前
父节点
当前提交
edd4686ba3

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

@@ -494,10 +494,10 @@ export default {
         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 } })
+        routeUrl = this.$router.resolve({ path: '/repair/form', query: { sbId: id } })
       }
       if (keyNum === 4) {
-        routeUrl = this.$router.resolve({ path: '/repair/form', query: { id: id } })
+        routeUrl = this.$router.resolve({ path: '/repair/fee', query: { sbId: id } })
       }
       if (keyNum === 5) {
         routeUrl = this.$router.resolve({ path: '/status/log', query: { id: id } })

+ 2 - 2
src/views/sqarepartmanage/sparepartinfo/modules/BaseForm.vue

@@ -263,7 +263,7 @@
           >
             <a-input-number
               style="width: 100%"
-              :min="1"
+              :min="0"
               v-decorator="['maxStock']" />
           </a-form-item>
         </row-item>
@@ -275,7 +275,7 @@
           >
             <a-input-number
               style="width: 100%"
-              :min="1"
+              :min="0"
               v-decorator="['minStock']" />
           </a-form-item>
         </row-item>

+ 8 - 3
src/views/workplace/backlog/NewWorkplaceBacklog.vue

@@ -331,12 +331,12 @@ export default {
   },
   computed: {
     role () {
-      if (this.$store.state.user.roles.join().includes('manage')) {
+      if (this.$store.state.user.roles.join().includes('workplace-repair-manage')) {
         return 'workplace-repair-manage'
-      } else if (this.$store.state.user.roles.join().includes('normal')) {
+      } else if (this.$store.state.user.roles.join().includes('workplace-repair-normal')) {
         return 'workplace-repair-normal'
       } else {
-        return ''
+        return 'undifined'
       }
     }
   },
@@ -376,6 +376,11 @@ export default {
       this.typeDetailDict = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE)
     },
     getInfo () {
+      if (this.role === 'undifined') {
+        // this.$error('您的角色未赋予该权限')
+        alert('您的角色未赋予该权限')
+        this.$router.push({ path: '/WorkplaceBacklog' })
+      }
       getWorkplaceBacklogWeekData(this.role).then(res => {
         const data = res.data.reduce((pre, item) => {
           pre.push({

+ 8 - 3
src/views/workplace/backlog/StoreWorkplaceBacklog.vue

@@ -340,12 +340,12 @@ export default {
   },
   computed: {
     role () {
-      if (this.$store.state.user.roles.join().includes('manage')) {
+      if (this.$store.state.user.roles.join().includes('workplace_store_manage')) {
         return 'workplace_store_manage'
-      } else if (this.$store.state.user.roles.join().includes('normal')) {
+      } else if (this.$store.state.user.roles.join().includes('workplace_store_normal')) {
         return 'workplace_store_normal'
       } else {
-        return ''
+        return 'undifined'
       }
     }
   },
@@ -369,6 +369,11 @@ export default {
       this.typeDetailDict = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.WORKPLACE_BACKLOG_DETAIL_TYPE)
     },
     getInfo () {
+      if (this.role === 'undifined') {
+        // this.$error('您的角色未赋予该权限')
+        alert('您的角色未赋予该权限')
+        this.$router.push({ path: '/WorkplaceBacklog' })
+      }
       Promise.all([
         getWorkplaceBacklogWeekData(this.role),
         getWorkplaceBacklogPie(this.role),