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