This commit is contained in:
yanran200730
2023-04-19 09:16:12 +08:00
parent 6a9ca31b8f
commit bb67491c2d
5 changed files with 144 additions and 37 deletions

View File

@@ -8,9 +8,6 @@
<ai-card title="基本信息">
<template #content>
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
<el-form-item prop="areaId" style="width: 100%;" label="所属地区" :rules="[{required: true, message: '请选择所属地区', trigger: 'change'}]">
<ai-area-select clearable @fullname="v => form.areaName = v" always-show :instance="instance" v-model="form.areaId" :disabled-level="disabledLevel"></ai-area-select>
</el-form-item>
<el-form-item label="所属网格" prop="girdId" style="width: 100%;" :rules="[{ required: true, message: '请选择所属网格', trigger: 'change' }]">
<ai-picker :ops="{label: 'girdName'}" :instance="instance" v-model="form.girdId" @pick="e => onUserChange(e)" dialogTitle="选择所属网格" action="/app/appgirdinfo/girdList">
<div class="time-select">
@@ -56,8 +53,6 @@
data () {
return {
form: {
areaName: '',
areaId: '',
classOne: '',
classThree: '',
classTwo: '',
@@ -69,19 +64,11 @@
}
},
computed: {
...mapState(['user'])
},
created () {
if (this.params && this.params.id) {
this.id = this.params.id
this.getInfo(this.params.id)
}
this.form.areaId =this.user.info.areaId
this.form.areaName =this.user.info.areaName
this.disabledLevel = this.user.info.areaList.length
},
methods: {

View File

@@ -1,7 +1,7 @@
<template>
<ai-list class="notice">
<template slot="title">
<ai-title title="积分公" isShowBottomBorder isShowArea :hideLevel="hideLevel-1" v-model="search.areaId" @change="changeArea">
<ai-title title="积分公" isShowBottomBorder>
</ai-title>
</template>
<template slot="content">
@@ -70,13 +70,11 @@
current: 1,
size: 10,
girdId: [],
girdName: '',
areaId: ''
girdName: ''
},
total: 0,
colConfigs: [
{ prop: 'areaName', label: '所属地区', align: 'left', 'show-overflow-tooltip': true },
{ prop: 'girdName', label: '所属网格', align: 'center' },
{ prop: 'girdName', label: '所属网格', align: 'left' },
{ prop: 'classOne', label: '一类', align: 'center' },
{ prop: 'classTwo', label: '二类', align: 'center' },
{ prop: 'classThree', label: '三类', align: 'center' },
@@ -86,16 +84,8 @@
tableData: []
}
},
computed: {
...mapState(['user']),
hideLevel() {
return this.user.info.areaList?.length || 0
},
},
created() {
this.search.areaId = this.user.info.areaId
created () {
this.getList()
},
@@ -124,14 +114,6 @@
})
},
changeArea () {
this.search.current = 1
this.$nextTick(() => {
this.getList()
})
},
remove (id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/appintegralpublicityinfo/delete?ids=${id}`).then(res => {