BUG 30003
This commit is contained in:
@@ -1,27 +1,7 @@
|
||||
<template>
|
||||
<ai-list class="AppGridMember" v-if="!isShowDetail">
|
||||
<template slot="title">
|
||||
<ai-title title="网格员管理" :isShowBottomBorder="false"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance"
|
||||
:dict="dict" :permissions="permissions"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<Add v-else-if="component === 'Add'" :params="params" :instance="instance" :dict="dict" :permissions="permissions"
|
||||
@change="onChange"></Add>
|
||||
<Family v-else-if="component === 'Family'" :params="params" :instance="instance" :dict="dict"
|
||||
:permissions="permissions" @change="onChange"></Family>
|
||||
<MonitorUser v-else-if="component === 'MonitorUser'" :params="params" :instance="instance" :dict="dict"
|
||||
:permissions="permissions" @change="onChange"></MonitorUser>
|
||||
<ApplyDetail v-else-if="component === 'ApplyDetail'" :params="params" :instance="instance" :dict="dict"
|
||||
:permissions="permissions" @change="onChange"></ApplyDetail>
|
||||
<ApplyAdd v-else-if="component === 'ApplyAdd'" :params="params" :instance="instance" :dict="dict"
|
||||
:permissions="permissions" @change="onChange"></ApplyAdd>
|
||||
<keep-alive include="GmList">
|
||||
<component :is="currentPage" v-bind="$props" @change="onChange"/>
|
||||
</keep-alive>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -32,39 +12,29 @@ import ApplyDetail from './components/ApplyDetail'
|
||||
import ApplyAdd from './components/ApplyAdd'
|
||||
import Family from './components/Family'
|
||||
import MonitorUser from './components/MonitorUser'
|
||||
import GmList from "./components/gmList";
|
||||
|
||||
export default {
|
||||
name: "AppGridMember",
|
||||
label: "网格管理员",
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: "List",
|
||||
params: {},
|
||||
include: [],
|
||||
currIndex: '0',
|
||||
isShowDetail: false
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
tabs() {
|
||||
return [
|
||||
{label: '网格员信息', name: 'List', comp: List, permission: ''},
|
||||
{label: '申报信息', name: 'ApplyList', comp: ApplyList, permission: 'app_appgirdmemberapply_detail'}
|
||||
].filter(item => {
|
||||
return item.name !== 'ApplyList' || this.permissions(item.permission)
|
||||
})
|
||||
currentPage() {
|
||||
let {hash} = this.$route
|
||||
return hash == "#Family" ? Family :
|
||||
hash == "#MonitorUser" ? MonitorUser :
|
||||
hash == "#Add" ? Add :
|
||||
hash == "#ApplyAdd" ? ApplyAdd :
|
||||
hash == "#ApplyDetail" ? ApplyDetail :
|
||||
GmList
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
GmList,
|
||||
Add,
|
||||
List,
|
||||
Family,
|
||||
@@ -76,46 +46,9 @@ export default {
|
||||
|
||||
methods: {
|
||||
onChange(data) {
|
||||
if (data.type === "Add") {
|
||||
this.component = "Add"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "Family") {
|
||||
this.component = "Family"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "MonitorUser") {
|
||||
this.component = "MonitorUser"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
if (data.type === "ApplyDetail") {
|
||||
this.component = "ApplyDetail"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "ApplyAdd") {
|
||||
this.component = "ApplyAdd"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "list") {
|
||||
this.component = "List"
|
||||
this.isShowDetail = false
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "ApplyList") {
|
||||
this.component = "ApplyList"
|
||||
this.isShowDetail = false
|
||||
this.params = data.params
|
||||
}
|
||||
let {type, params: query} = data,
|
||||
hash = ["ApplyList", "list"].includes(type) ? "" : "#" + type
|
||||
this.$router.push({hash, query})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<ai-detail class="content-add">
|
||||
<template slot="title">
|
||||
<ai-title :title="params.id ? '编辑' : '添加'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
<ai-title :title="$route.query.id ? '编辑' : '添加'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
@@ -35,7 +35,6 @@
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
@@ -51,9 +50,9 @@
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
if ( this.$route.query.id) {
|
||||
this.id = this.$route.query.id
|
||||
this.getInfo(this.$route.query.id)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -76,7 +75,7 @@
|
||||
this.isLoading = true
|
||||
this.instance.post(`/app/appgirdmemberapply/addOrUpdate`, {
|
||||
...this.form,
|
||||
id: this.params.id || ''
|
||||
id: this.$route.query.id || ''
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -36,9 +35,9 @@
|
||||
},
|
||||
|
||||
created() {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
if (this.$route.query.id) {
|
||||
this.id = this.$route.query.id
|
||||
this.getInfo(this.$route.query.id)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -144,18 +144,14 @@
|
||||
add (id) {
|
||||
this.$emit('change', {
|
||||
type: 'ApplyAdd',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
params: {id}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'ApplyDetail',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
params: {id}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<ai-table-select :instance="instance" :action="`/app/appresident/list?householdName=1&areaId=${areaId}`"
|
||||
@select="v=>chooseUser=v"/>
|
||||
@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() {
|
||||
@@ -118,19 +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.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
|
||||
}
|
||||
@@ -144,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 => {
|
||||
@@ -175,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
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<ai-table-select :instance="instance" :action="`/app/appresident/list?householdName=1&areaId=${areaId}`"
|
||||
@select="v=>chooseUser=v"/>
|
||||
@select="v=>chooseUser=v" multiple/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
@@ -83,7 +83,6 @@ export default {
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -94,9 +93,7 @@ export default {
|
||||
name: '',
|
||||
girdId: ''
|
||||
},
|
||||
isLoading: false,
|
||||
form: {},
|
||||
userList: [],
|
||||
name: '',
|
||||
chooseUser: [],
|
||||
isShow: false,
|
||||
@@ -129,13 +126,12 @@ export default {
|
||||
this.dict.load('epidemicDangerousAreaLevel').then(() => {
|
||||
this.getGirdList()
|
||||
this.getList()
|
||||
this.getUserList()
|
||||
})
|
||||
},
|
||||
|
||||
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
|
||||
}
|
||||
@@ -149,7 +145,7 @@ export default {
|
||||
this.instance.post(`/app/appgirdmemberpoverty/listByGirdMemberByWeb`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
girdMemberId: this.params.id,
|
||||
girdMemberId: this.$route.query.id,
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -168,11 +164,6 @@ export default {
|
||||
handleSelectionChange(e) {
|
||||
this.ids = e.map(v => v.gmpId)
|
||||
},
|
||||
|
||||
clearAll() {
|
||||
this.chooseUser = []
|
||||
},
|
||||
|
||||
onConfirm() {
|
||||
if (!this.girdId) {
|
||||
return this.$message.error('请选择网格')
|
||||
@@ -184,7 +175,7 @@ export default {
|
||||
|
||||
const povertyList = this.chooseUser.map(v => {
|
||||
return {
|
||||
girdMemberId: this.params.id,
|
||||
girdMemberId: this.$route.query.id,
|
||||
name: v.split('~')[0],
|
||||
girdId: this.girdId,
|
||||
povertyId: v.split('~')[1]
|
||||
@@ -207,38 +198,12 @@ export default {
|
||||
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/apppreventionreturntopoverty/list`, null, {
|
||||
params: {
|
||||
current: 1,
|
||||
size: 200,
|
||||
con: this.name,
|
||||
isHousehold: 1,
|
||||
areaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.userList = res.data.records
|
||||
}
|
||||
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
onBack() {
|
||||
this.$emit('change', {
|
||||
type: 'list'
|
||||
})
|
||||
},
|
||||
|
||||
remove(ids) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appgirdmemberpoverty/delete`, null, {
|
||||
|
||||
@@ -12,10 +12,12 @@
|
||||
size="small"
|
||||
label-suffix=":"
|
||||
label-width="136px">
|
||||
<ai-edit-card
|
||||
<ai-card title="基础信息">
|
||||
<template #right v-if="title=='网格员详情'">
|
||||
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="editOne==false" @click="editOne=true">修改</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="editOne==true" @click="searchDetail(),editOne=false">取消</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="editOne==true"
|
||||
@click="searchDetail(),editOne=false">取消</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="editOne==true" @click="save()">保存</span>
|
||||
</template>
|
||||
<template slot="content">
|
||||
@@ -113,13 +115,15 @@
|
||||
<ai-card title="关联信息">
|
||||
<template #right v-if="title=='网格员详情'">
|
||||
<span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="editTwo==false" @click="editTwo=true">修改</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="editTwo==true" @click="searchDetail(),editTwo=false">取消</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="editTwo==true"
|
||||
@click="searchDetail(),editTwo=false">取消</span>
|
||||
<span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="editTwo==true" @click="save()">保存</span>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<template v-if="editTwo==true">
|
||||
<el-form-item label="责任网格" prop="girdInfoList" style="margin-top: 8px;">
|
||||
<el-form-item style="width: 100%" label-width="80px" :label="'网格' + (index + 1)" v-for="(item, index) in forms.girdInfoList" :key="'选项' + (index + 1)">
|
||||
<el-form-item style="width: 100%" label-width="80px" :label="'网格' + (index + 1)" v-for="(item, index) in forms.girdInfoList"
|
||||
:key="'选项' + (index + 1)">
|
||||
<div class="form-flex">
|
||||
<el-select v-model="item.checkType" placeholder="请选择网格角色">
|
||||
<el-option
|
||||
@@ -194,7 +198,8 @@
|
||||
<ai-info-item label="是否特殊网格员:">
|
||||
<span>{{ !forms.isGirdMember ? '-' : forms.isGirdMember === '0' ? '否' : '是' }}</span>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="特殊网格员:" v-if="forms.isGirdMember==1"><span >{{dict.getLabel('girdMemberType', forms.girdMemberType)}}</span></ai-info-item>
|
||||
<ai-info-item label="特殊网格员:" v-if="forms.isGirdMember==1"><span>{{ dict.getLabel('girdMemberType', forms.girdMemberType) }}</span>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="政治面貌:"><span>{{ dict.getLabel('politicsStatus', forms.politicsStatus) }}</span></ai-info-item>
|
||||
<ai-info-item label="学历:"><span>{{ dict.getLabel('education', forms.education) }}</span></ai-info-item>
|
||||
<ai-info-item label="人生格言:" style="width: 100%;"><span>{{ forms.motto }}</span></ai-info-item>
|
||||
@@ -239,7 +244,6 @@ export default {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
params: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -290,7 +294,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.beforeSelectTree()
|
||||
if (this.params.id) {
|
||||
if (this.$route.query.id) {
|
||||
this.searchDetail();
|
||||
this.title = "网格员详情";
|
||||
this.editOne = false;
|
||||
@@ -448,11 +452,10 @@ export default {
|
||||
});
|
||||
},
|
||||
searchDetail() {
|
||||
this.instance
|
||||
.post(`/app/appgirdmemberinfo/queryDetailById`, null, {
|
||||
params: { id: this.params.id },
|
||||
})
|
||||
.then((res) => {
|
||||
let {id} = this.$route.query
|
||||
this.instance.post(`/app/appgirdmemberinfo/queryDetailById`, null, {
|
||||
params: {id}
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.forms = {
|
||||
...res.data,
|
||||
@@ -499,9 +502,11 @@ export default {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.ai-detail__title {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ai-detail__content {
|
||||
.ai-detail__content--wrapper {
|
||||
.el-form {
|
||||
@@ -511,9 +516,11 @@ export default {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.el-form-item {
|
||||
width: 48%;
|
||||
}
|
||||
|
||||
.buildingTypes {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -521,15 +528,19 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-tag {
|
||||
margin-right: 8px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.footer-btn {
|
||||
width: 92px;
|
||||
}
|
||||
|
||||
.above {
|
||||
display: flex;
|
||||
|
||||
.left, .right {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
55
project/grid/AppGridMember/components/gmList.vue
Normal file
55
project/grid/AppGridMember/components/gmList.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<section class="gmList">
|
||||
<ai-list class="AppGridMember">
|
||||
<template slot="title">
|
||||
<ai-title title="网格员管理" :isShowBottomBorder="false"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :ref="String(i)" v-if="currIndex == i" :is="tab.comp" lazy :instance="instance"
|
||||
:dict="dict" :permissions="permissions" v-on="$listeners"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from "./list";
|
||||
import ApplyList from "./ApplyList";
|
||||
|
||||
export default {
|
||||
name: "gmList",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
tabs() {
|
||||
return [
|
||||
{label: '网格员信息', name: 'List', comp: List, permission: ''},
|
||||
{label: '申报信息', name: 'ApplyList', comp: ApplyList, permission: 'app_appgirdmemberapply_detail'}
|
||||
].filter(item => {
|
||||
return item.name !== 'ApplyList' || this.permissions(item.permission)
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currIndex: '0',
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.gmList {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -143,7 +143,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toMonitorUser(id) {
|
||||
this.$emit('change', {
|
||||
type: 'MonitorUser',
|
||||
@@ -152,7 +151,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toFamily(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Family',
|
||||
|
||||
Reference in New Issue
Block a user