单店铺管理员只能获取本店的挑战活动

This commit is contained in:
zhl 2021-05-18 11:24:28 +08:00
parent 6d3ae0aa95
commit 185feb5d72
2 changed files with 11 additions and 5 deletions

View File

@ -32,7 +32,7 @@ export const defaultExamData: IExamData = {
endTime: 1924963201000, endTime: 1924963201000,
timeone: 5, timeone: 5,
name: '', name: '',
qcount: 0, qcount: 10,
qtypes: [], qtypes: [],
shop: '', shop: '',
source: 0, source: 0,

View File

@ -216,7 +216,7 @@
</div> </div>
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="shopList" :data="shopExamList"
border border
fit fit
stripe stripe
@ -320,7 +320,7 @@ export default class extends Vue {
private shop = UserModule.department || '' private shop = UserModule.department || ''
private allDepts: IShopData[] = [] private allDepts: IShopData[] = []
private listLoading = false private listLoading = false
private shopList: IExamData[] = [] private shopExamList: IExamData[] = []
private tableRadio: any = {} private tableRadio: any = {}
$refs!: { $refs!: {
@ -336,6 +336,9 @@ export default class extends Vue {
async created() { async created() {
if (UserModule.level === 1) { if (UserModule.level === 1) {
await this.getRemoteDeptList() await this.getRemoteDeptList()
} else if (UserModule.department) {
this.shop = UserModule.department
} }
} }
@ -566,8 +569,11 @@ export default class extends Vue {
this.downloadLoading = false this.downloadLoading = false
} }
private importFromOther() { private async importFromOther() {
console.log('importFromOther') console.log('importFromOther')
if (UserModule.level === 9 && UserModule.department) {
await this.getList()
}
this.listVisible = true this.listVisible = true
} }
@ -636,7 +642,7 @@ export default class extends Vue {
shop: this.shop shop: this.shop
}) })
this.listLoading = false this.listLoading = false
this.shopList = data.records.filter(o => o._id !== this.examid) this.shopExamList = data.records.filter(o => o._id !== this.examid)
} }
private clickChange(item: any) { private clickChange(item: any) {