Commit ec0b7eb2 by wangchunyang

导入按钮控制长春显示,登录后同步加载用户相关信息

parent eb46c660
......@@ -151,14 +151,20 @@ export default {
const controlData = {
no: data.no
}
// 内层Promise
return new Promise((resolve, reject) => {
otherUserInfo(controlData).then(resop => {
commit('setOtherUserInfo', resop.data.data)
})
console.log('内层Promise', data, resop.data.data)
resolve(data)
}).catch(err => {
reject(err)
})
})
// resolve(data)
}).catch(err => {
reject(err)
})
} catch (error) {
reject(error)
}
......
......@@ -159,7 +159,7 @@
<!-- <Button type="primary" @click="handleDownload" style="margin-right: 10px;">导出</Button>-->
<!-- v-if="severUserInfo.company_grade === '6'"-->
<Button type="primary" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button type="primary" v-if="showImport()" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button
type="primary"
style="margin-right: 10px"
......@@ -2617,6 +2617,15 @@ export default {
desc: ret.data.errmsg
})
}
},
showImport () {
const info = this.$store.state.user.otherUserInfo || {}
const areaId = info.area_id || ''
if (areaId.startsWith('2201')) {
return true
} else {
return false
}
}
},
mounted () {
......
......@@ -134,7 +134,7 @@
<Col
style="text-align: right"
>
<Button type="primary" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button type="primary" v-if="showImport()" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button
type="primary"
@click="searchData"
......@@ -2476,6 +2476,15 @@ export default {
desc: ret.data.errmsg
})
}
},
showImport () {
const info = this.$store.state.user.otherUserInfo || {}
const areaId = info.area_id || ''
if (areaId.startsWith('2201')) {
return true
} else {
return false
}
}
},
mounted () {
......
......@@ -142,7 +142,7 @@
>搜索</Button
>
<Button type="primary" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button type="primary" v-if="showImport()" @click="importShow = true" style="margin-right: 10px;">导入</Button>
<Button type="primary" @click="handleDownload" style="margin-right: 10px;">导出</Button>
<!-- v-if="severUserInfo.company_grade === '6'"-->
<Button type="primary" @click="searchPeople">新增</Button>
......@@ -2419,6 +2419,15 @@ export default {
desc: ret.data.errmsg
})
}
},
showImport () {
const info = this.$store.state.user.otherUserInfo || {}
const areaId = info.area_id || ''
if (areaId.startsWith('2201')) {
return true
} else {
return false
}
}
},
mounted () {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论