quanyawei
2024-03-18 9c3961f513cb548c129dd911c1eb92ec21bb703c
pages/actionChange/workOrderDetails/index.vue
@@ -59,43 +59,60 @@
      async mounted() {
         await this.$onLaunched
         //等待登录成功 
         this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || 'null')
         this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || null)
         console.log('详情页的用户信息', this.userInfor)
         if (this.option.type === 'share' && this.userInfor) {
            let params = {
               allocationNum: this.basicInfor.allocationNum,
               userId: this.userInfor.userId
            }
            this.$http.httpGet('/allocationApp/authority', params).then(res => {
               console.log('权限控制参数', res)
               if (res.data.code === 3) {
                  uni.showModal({
                     content: '您暂无操作权限,请联系管理员!',
                     showCancel: false,
                     confirmText: '确定',
                     success: res => {
                        if (res.confirm) {
                           uni.reLaunch({
                              url: '/pages/index/index',
                           })
                        }
                     },
                  })
               } else if (res.data.code === 1) {
                  // 可以编辑
                  this.basicInfor.pageState = 'edit'
                  this.basicInfor.stateName = res.data.name
                  this.getData()
               } else if (res.data.code === 2) {
                  // 可以看
                  this.basicInfor.pageState = 'view'
                  this.basicInfor.stateName = res.data.name
                  this.getData()
         if (this.option.type === 'share') {
            if (this.userInfor) {
               let params = {
                  allocationNum: this.basicInfor.allocationNum,
                  userId: this.userInfor.userId
               }
            }).catch(errors => {
               console.log('获取失败的信息', errors)
               console.log('获取失败的信息params', params)
            })
               this.$http.httpGet('/allocationApp/authority', params).then(res => {
                  console.log('权限控制参数', res)
                  if (res.data.code === 3) {
                     uni.showModal({
                        content: '您暂无操作权限,请联系管理员!',
                        showCancel: false,
                        confirmText: '确定',
                        success: res => {
                           if (res.confirm) {
                              uni.reLaunch({
                                 url: '/pages/index/index',
                              })
                           }
                        },
                     })
                  } else if (res.data.code === 1) {
                     // 可以编辑
                     this.basicInfor.pageState = 'edit'
                     this.basicInfor.stateName = res.data.name
                     this.getData()
                  } else if (res.data.code === 2) {
                     // 可以看
                     this.basicInfor.pageState = 'view'
                     this.basicInfor.stateName = res.data.name
                     this.getData()
                  }
               }).catch(errors => {
                  console.log('获取失败的信息', errors)
                  console.log('获取失败的信息params', params)
               })
            } else {
               uni.showModal({
                  title: '未登录',
                  content: '您未登录,需要登录后才能继续',
                  showCancel: false,
                  confirmText: '确定',
                  success: res => {
                     if (res.confirm) {
                        uni.reLaunch({
                           url: '/pages/login/login',
                        })
                     }
                  },
               })
               this.$isResolve()
            }
         } else {
            this.isShow = true
            this.getData()