无等级网格版合并
This commit is contained in:
@@ -64,8 +64,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<ai-table-select :instance="instance" :action="`/app/appresident/list?householdName=1&areaId=${areaId}&auditStatus=1`"
|
||||
@select="v=>chooseUser=v" multiple/>
|
||||
<ai-table-select :instance="instance" :action="`/app/appresident/list?householdName=1&areaId=${areaId||''}&auditStatus=1`"
|
||||
@select="v=>chooseUser=v" multiple/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
@@ -81,7 +81,6 @@ export default {
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -94,8 +93,6 @@ export default {
|
||||
},
|
||||
isLoading: false,
|
||||
form: {},
|
||||
userList: [],
|
||||
name: '',
|
||||
chooseUser: [],
|
||||
dialog: false,
|
||||
total: 10,
|
||||
@@ -120,20 +117,16 @@ export default {
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created() {
|
||||
this.areaId = this.user.info.areaId
|
||||
this.disabledLevel = this.user.info.areaList.length
|
||||
this.dict.load('epidemicDangerousAreaLevel').then(() => {
|
||||
this.getGirdList()
|
||||
this.getList()
|
||||
this.getUserList()
|
||||
})
|
||||
this.areaId = this.user.info.areaId || ""
|
||||
this.disabledLevel = this.user.info.areaList?.length || 0
|
||||
this.getGirdList()
|
||||
this.getList()
|
||||
this.dict.load('epidemicDangerousAreaLevel')
|
||||
},
|
||||
|
||||
methods: {
|
||||
getGirdList() {
|
||||
this.instance.post(`/app/appgirdmemberinfo/queryMyGirdListByLevel2?girdMemberId=${this.params.id}`).then(res => {
|
||||
this.instance.post(`/app/appgirdmemberinfo/queryMyGirdListByLevel2?girdMemberId=${this.$route.query.id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.girdList = res.data
|
||||
}
|
||||
@@ -147,7 +140,7 @@ export default {
|
||||
this.instance.post(`/app/appgirdmemberresident/listByGirdMember`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
girdMemberId: this.params.id,
|
||||
girdMemberId: this.$route.query.id,
|
||||
areaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
@@ -167,11 +160,6 @@ export default {
|
||||
handleSelectionChange(e) {
|
||||
this.ids = e.map(v => v.gmrId)
|
||||
},
|
||||
|
||||
clearAll() {
|
||||
this.chooseUser = []
|
||||
},
|
||||
|
||||
onConfirm() {
|
||||
if (!this.girdId) {
|
||||
return this.$message.error('请选择网格')
|
||||
@@ -183,7 +171,7 @@ export default {
|
||||
|
||||
const residentList = this.chooseUser.map(v => {
|
||||
return {
|
||||
girdMemberId: this.params.id,
|
||||
girdMemberId: this.$route.query.id,
|
||||
name: v.name,
|
||||
residentId: v.id,
|
||||
girdId: this.girdId
|
||||
@@ -196,42 +184,18 @@ export default {
|
||||
this.current = 1
|
||||
this.getList()
|
||||
this.$message.success('添加成功')
|
||||
this.closeDialog()
|
||||
this.dialog = false
|
||||
}
|
||||
})
|
||||
},
|
||||
closeDialog() {
|
||||
this.dialog = false
|
||||
this.chooseUser = []
|
||||
this.girdId = ''
|
||||
this.name = ''
|
||||
this.areaId = this.user.info.areaId
|
||||
this.getUserList()
|
||||
},
|
||||
|
||||
del(e) {
|
||||
this.chooseUser.splice(this.chooseUser.indexOf(e), 1)
|
||||
},
|
||||
|
||||
getUserList() {
|
||||
this.isLoading = true
|
||||
this.instance.post(`/app/appresident/list`, null, {
|
||||
params: {
|
||||
current: 1,
|
||||
size: 200,
|
||||
con: this.name,
|
||||
householdName: 1,
|
||||
areaId: this.areaId,
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.userList = res.data.records
|
||||
}
|
||||
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
onBack() {
|
||||
this.$emit('change', {
|
||||
type: 'list'
|
||||
|
||||
Reference in New Issue
Block a user