整合统一网格员身份信息获取
This commit is contained in:
@@ -85,7 +85,7 @@ export default {
|
|||||||
...mapActions(['selectPrivilegedContact']),
|
...mapActions(['selectPrivilegedContact']),
|
||||||
getDetail() {
|
getDetail() {
|
||||||
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${this.id}`).then((res) => {
|
this.$http.post(`/app/appgirdinfo/queryDetailById?id=${this.id}`).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res?.data) {
|
||||||
this.detailInfo = res.data
|
this.detailInfo = res.data
|
||||||
if (this.fromType == 'edit') {
|
if (this.fromType == 'edit') {
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="gird-name" v-text="params.girdName"/>
|
<div class="gird-name" v-text="params.girdName"/>
|
||||||
<u-icon name="arrow-down" color="#999" class="down-icon" size="20"/>
|
<u-icon name="arrow-down" color="#999" class="down-icon" size="20"/>
|
||||||
</AiPagePicker>
|
</AiPagePicker>
|
||||||
<span @click="linkTo('./SetGird')" v-if="checkType == 2">网格配置</span>
|
<span @click="linkTo('./SetGird')" v-if="isGridAdmin">网格配置</span>
|
||||||
</div>
|
</div>
|
||||||
<component v-if="refresh && isAdmin" :is="component" @change="onChange" :params="params"></component>
|
<component v-if="refresh && isAdmin" :is="component" @change="onChange" :params="params"></component>
|
||||||
<div class="tabs" v-if="isTab && isAdmin">
|
<div class="tabs" v-if="isTab && isAdmin">
|
||||||
@@ -27,10 +27,20 @@
|
|||||||
import Statistics from './Statistics.vue'
|
import Statistics from './Statistics.vue'
|
||||||
import Organization from './Organization.vue'
|
import Organization from './Organization.vue'
|
||||||
import Map from './Map.vue'
|
import Map from './Map.vue'
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppGridManagement',
|
name: 'AppGridManagement',
|
||||||
appName: '网格管理',
|
appName: '网格管理',
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
isAdmin() {
|
||||||
|
return this.user.girdCheckType > 0
|
||||||
|
},
|
||||||
|
isGridAdmin() {
|
||||||
|
return this.user.girdCheckType == 2
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: 'Statistics',
|
component: 'Statistics',
|
||||||
@@ -58,8 +68,6 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
isTab: true,
|
isTab: true,
|
||||||
isAdmin: false,
|
|
||||||
checkType: ''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -67,7 +75,6 @@ export default {
|
|||||||
Statistics,
|
Statistics,
|
||||||
Map,
|
Map,
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onChange(e) {
|
onChange(e) {
|
||||||
this.params = e.params
|
this.params = e.params
|
||||||
@@ -83,15 +90,10 @@ export default {
|
|||||||
this.component = component
|
this.component = component
|
||||||
this.refreshHome();
|
this.refreshHome();
|
||||||
},
|
},
|
||||||
isGirdUser() {
|
getGridInfo() {
|
||||||
this.isAdmin = false
|
this.isAdmin && this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
|
||||||
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
|
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
if (res.data.checkType != '0') {
|
this.params = res.data?.appGirdInfo || {}
|
||||||
this.isAdmin = true
|
|
||||||
this.checkType = res.data.checkType
|
|
||||||
this.params = res.data.appGirdInfo
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -104,7 +106,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.isGirdUser()
|
this.getGridInfo()
|
||||||
uni.$on('hideTab', () => {
|
uni.$on('hideTab', () => {
|
||||||
this.isTab = false
|
this.isTab = false
|
||||||
})
|
})
|
||||||
@@ -139,6 +141,7 @@ export default {
|
|||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
margin: 0 30px 32px;
|
margin: 0 30px 32px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.gird-name {
|
.gird-name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-width: calc(100% - 108px);
|
max-width: calc(100% - 108px);
|
||||||
|
|||||||
Reference in New Issue
Block a user