From e49e0e98c6776900bc3578ed2fe880bfceeb1c2c Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 08 Nov 2023 15:53:26 +0800
Subject: [PATCH] fix:查看详情权限修改
---
pages/actionChange/workOrderDetails/index.vue | 89 ++++++++++++++++++++++++++++++++++++++------
1 files changed, 77 insertions(+), 12 deletions(-)
diff --git a/pages/actionChange/workOrderDetails/index.vue b/pages/actionChange/workOrderDetails/index.vue
index 9feaf22..de61d5b 100644
--- a/pages/actionChange/workOrderDetails/index.vue
+++ b/pages/actionChange/workOrderDetails/index.vue
@@ -1,9 +1,10 @@
<template>
<view class="mainContent">
- <basicInfor :basic-infor="basicInfor" />
+ <basicInfor :basic-infor="basicInfor" v-if="isShow" />
<rectificationInfor ref="rectificationInfor" :basic-infor="basicInfor"
v-if="!(pageState === 'view' && basicInfor.state === 20)" />
- <approvalnfor ref="approvalnfor" v-if="basicInfor.state >= 30" :basic-infor="basicInfor" />
+ <approvalnfor ref="approvalnfor" v-if="basicInfor.state >= 30 && basicInfor.stateName!=='���������'"
+ :basic-infor="basicInfor" />
<view class="bunts">
<view class="but butRight">
<u-button shape="square" @click="refuse" type="error"
@@ -14,6 +15,8 @@
<u-button shape="square" type="primary" @click="submit"> ������ </u-button>
</view>
</view>
+ <u-overlay :show="show" :mask-click-able='false' opacity='0.8'>
+ </u-overlay>
</view>
</template>
<script>
@@ -28,26 +31,88 @@
},
data() {
return {
- basicInfor: {}
+ basicInfor: {},
+ unitListL: [],
+ userInfor: null,
+ show: false,
+ isShow: false,
+ option: {}
}
},
computed: {
pageState() {
return this.basicInfor.pageState
- }
+ },
+ },
+ created() {
+ this.getUnitList()
},
onLoad: function(option) {
- console.log('option', option)
//option���object������������������������������������������������
this.basicInfor = JSON.parse(option.infor)
+ // let type = JSON.parse(option.type)
+ console.log('option', option)
+ this.option = option
},
- onBackPress(e) {
- uni.navigateBack({
- delta: 1, //������������������������������������������2
- })
- return false
+ async mounted() {
+ //������������������
+ await this.$onLaunched
+ 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.isShow = true
+ } else if (res.data.code === 2) {
+ // ���������
+ this.isShow = true
+ this.basicInfor.pageState = 'view'
+ this.basicInfor.stateName = res.data.name
+ }
+ }).catch(errors => {
+ console.log('���������������������', errors)
+ console.log('���������������������params', params)
+ })
+ } else {
+ this.isShow = true
+ }
+ console.log('this.basicInfor123', this.basicInfor)
},
methods: {
+ closePop() {},
+ getUnitList() {
+ this.$http.httpGet('/allocation/unit').then(res => {
+ this.unitList = res.data
+ let data = ''
+ if (this.basicInfor.unitId && this.unitList.length > 0) {
+ data = this.unitList && this.unitList.find(a => Number(a.unitId) === Number(this.basicInfor
+ .unitId)).unitName
+ let time = this.basicInfor.time.slice(5)
+ this.share.title = `${data}-${time}������������`
+ }
+ })
+ },
radioGroupChange(e) {
console.log('radioGroupe���e', this.workForme.isChange)
},
@@ -58,8 +123,8 @@
showTabBar: true
}
})
- uni.navigateBack({
- delta: 1, //������������������������������������������2
+ uni.redirectTo({
+ url: '/pages/index/index',
})
},
refuse() {
--
Gitblit v1.8.0