ct
This commit is contained in:
@@ -199,9 +199,7 @@ export default {
|
||||
}
|
||||
.spacial {
|
||||
margin-top: 10px;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
white-space: wrap;
|
||||
span {
|
||||
margin-right: 10px;
|
||||
color: #ff4466;
|
||||
|
||||
@@ -134,9 +134,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 特殊人群 -->
|
||||
<div v-if="tabIndex != 0 && data.resident.tsrqInfos && data.resident.tsrqInfos.length">
|
||||
<!-- -->
|
||||
<div v-for="(item,index) in data.resident.tsrqInfos" :key="index" class="spacial">
|
||||
<div v-if="tabIndex != 0 && tabList && tabList.length">
|
||||
<div class="spacial" v-for="(item,index) in tabList" :key="index" v-if="tabIndex == index">
|
||||
<div class="specialList" v-for="(t,indexs) in item.tableInfos" :key="indexs" v-if="item.tableInfos && item.tableInfos.length">
|
||||
<div class="spacial-row">
|
||||
<div>{{ t.fieldName }}</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="add">
|
||||
<div class="pad-l32">
|
||||
<div class="item">
|
||||
<div class="item" v-if="!isEdit">
|
||||
<span class="label"><span class="tips">*</span>类型</span>
|
||||
<div class="value" @click="showType=true">
|
||||
<span :class="appId ? '' : 'color-999'">{{ appName }}</span>
|
||||
@@ -160,7 +160,7 @@
|
||||
<div class="item" v-else-if="item.type == 'gird'">
|
||||
<span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span>
|
||||
<div class="value" flex>
|
||||
<AiPagePicker type="gird" @select="v=>handleSelectGird(v,item)">
|
||||
<AiPagePicker type="gird" @select="v=>handleSelectGird(v,item)" isMyGird>
|
||||
<u-icon :label="formData[item.fieldDbName + '_name'] || item.fieldTips || '选择网格' "
|
||||
name="arrow-right" label-pos="left" color="#ccc"/>
|
||||
</AiPagePicker>
|
||||
@@ -203,12 +203,28 @@ export default {
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
computed: {...mapState(['user'])},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
isEdit() {
|
||||
return !!this.$route.query.id
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getType()
|
||||
},
|
||||
onShow() {
|
||||
document.title = '新增人员'
|
||||
this.appId = this.$route.query.appId
|
||||
if (this.isEdit) {
|
||||
document.title = "编辑人员"
|
||||
this.getDetail()
|
||||
} else {
|
||||
document.title = '新增人员'
|
||||
if (this.appId) {
|
||||
this.typeConfirm([this.$route.query])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['selectEnterpriseContact']),
|
||||
@@ -222,7 +238,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getType() {
|
||||
this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0`).then((res) => {
|
||||
this.$http.post(`/app/appapplicationinfo/queryApplicationListByType`, null, {
|
||||
params: {type: 0, status: 1}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
this.typeList = res.data
|
||||
}
|
||||
@@ -405,7 +423,7 @@ export default {
|
||||
}
|
||||
if (items.type == 'upload' && this.formData[items.fieldDbName]?.length) { //附件 只传id
|
||||
let files = []
|
||||
this.formData[items.fieldDbName].map((item) => {
|
||||
[this.formData[items.fieldDbName]].flat().map((item) => {
|
||||
files.push(item.url)
|
||||
})
|
||||
this.formData[items.fieldDbName] = files?.toString()
|
||||
@@ -442,7 +460,11 @@ export default {
|
||||
this.$u.toast('提交成功')
|
||||
uni.$emit('specialPeopleList')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({})
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
uni.$emit("selectType")
|
||||
}
|
||||
})
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
@@ -462,6 +484,16 @@ export default {
|
||||
this.formData[item.fieldDbName] = [info.id, info.girdName].join("_")
|
||||
this.formData[item.fieldDbName + "_name"] = info.girdName
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getDetail() {
|
||||
let {id, appId} = this.$route.query
|
||||
id && this.$http.post("/app/appapplicationinfo/queryDetailById", null, {
|
||||
params: {id, appId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<div class="title">特殊人群</div>
|
||||
<div class="num-content">
|
||||
<div class="num-item" v-for="(item, index) in statisticsList" :key="index">
|
||||
<h3>{{ item.value }}</h3>
|
||||
<p>{{ item.label }}</p>
|
||||
<h3 v-text="item.value"/>
|
||||
<p v-text="item.label"/>
|
||||
</div>
|
||||
<AiEmpty v-if="!statisticsList.length"/>
|
||||
</div>
|
||||
@@ -52,12 +52,17 @@
|
||||
<img src="../img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''"/>
|
||||
</div>
|
||||
<div class="user-list" v-if="item.check">
|
||||
<div class="user-item" v-for="(e, indexs) in item.value" :key="indexs" v-if="item.value && item.value.length">
|
||||
<div class="user-item" v-for="(e, indexs) in item.value" :key="indexs" @click="showDetail(e)">
|
||||
<div class="user-img">
|
||||
<img src="../img/user-img.png" alt=""/>
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<p class="name">{{ e.name }}</p>
|
||||
<p class="name">{{ e.name }}
|
||||
<span class="btn-icon" v-if="gridType != 0 && user.wxUserId == e.createUserId">
|
||||
<img src="../img/edit-icon.png" alt="" @click.stop="toEdit(e,item.dictValue)">
|
||||
<img src="../img/del-icon.png" alt="" @click.stop="del(e,item.dictValue)">
|
||||
</span>
|
||||
</p>
|
||||
<div class="phone">
|
||||
<span>{{ idNumberInit(e.idNumber) }}</span>
|
||||
<span>{{ e.phone }}</span>
|
||||
@@ -89,6 +94,7 @@ export default {
|
||||
statisticsListMon: [],
|
||||
userList: [],
|
||||
name: '',
|
||||
gridType: 0
|
||||
}
|
||||
},
|
||||
computed: {...mapState(['user'])},
|
||||
@@ -109,9 +115,9 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
document.title = '特殊人群管理'
|
||||
console.log(this.$dict.getDict('appSpecialTypeFive'))
|
||||
this.$dict.getDict('appSpecialTypeFive')
|
||||
this.isGirdUser()
|
||||
},
|
||||
|
||||
methods: {
|
||||
areaSelect(e) {
|
||||
this.areaId = e
|
||||
@@ -152,7 +158,7 @@ export default {
|
||||
},
|
||||
getUserList() {
|
||||
this.userList = []
|
||||
this.$http.post(`/app/appapplicationinfo/queryPeople?areaId=${this.areaId}&type=0&name=${this.name}`).then((res) => {
|
||||
this.$http.post(`/app/appapplicationinfo/queryPeople?areaId=${this.areaId}&type=0&status=1&name=${this.name}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
for (let i in res.data) {
|
||||
var obj = {
|
||||
@@ -189,6 +195,34 @@ export default {
|
||||
this.userList[index].check = true
|
||||
}
|
||||
},
|
||||
toEdit(row) {
|
||||
uni.navigateTo({
|
||||
url: `./add?id=${row.id}&appId=${row.appId}`
|
||||
})
|
||||
},
|
||||
del(row) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
uni.showLoading()
|
||||
this.$http.post("/app/appapplicationinfo/delete", null, {params: {ids: row.id}}).then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.$u.toast('删除成功!')
|
||||
this.getUserList()
|
||||
}
|
||||
uni.hideLoading()
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
isGirdUser() {
|
||||
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
|
||||
if (res?.data) {
|
||||
this.gridType = res.data.checkType
|
||||
}
|
||||
})
|
||||
},
|
||||
showDetail(e){
|
||||
uni.navigateTo({url:`/mods/AppPeopleList/DetailCard?id=${e.id}`})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -398,6 +432,17 @@ export default {
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.btn-icon {
|
||||
float: right;
|
||||
|
||||
img {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin-left: 20px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.phone {
|
||||
|
||||
BIN
src/apps/AppSpecialPeople/img/del-icon.png
Normal file
BIN
src/apps/AppSpecialPeople/img/del-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/apps/AppSpecialPeople/img/edit-icon.png
Normal file
BIN
src/apps/AppSpecialPeople/img/edit-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -82,8 +82,6 @@ export default {
|
||||
onLoad() {
|
||||
this.getTypeList()
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
userClick(row, index) {
|
||||
if (this.userList[index].isChecked) {
|
||||
@@ -174,7 +172,10 @@ export default {
|
||||
this.getUsers()
|
||||
},
|
||||
gotoSpecialPersion() {
|
||||
uni.navigateTo({url: '/apps/AppSpecialPeople/add'})
|
||||
uni.$once("selectType", () => {
|
||||
this.getUsers()
|
||||
})
|
||||
uni.navigateTo({url: `/apps/AppSpecialPeople/add?appId=${this.appId}&appName=${this.applicationName}`})
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
<ai-search-popup mode="bottom" ref="areaSelector" length="85%">
|
||||
<div slot="btn" @tap="handleInit">
|
||||
<slot v-if="$slots.default"/>
|
||||
<div v-else-if="isForm">
|
||||
<u-icon name="arrow-right" :label="areaName||'请选择'" label-pos="left" color="#ddd"/>
|
||||
</div>
|
||||
<div v-else class="areaSelector">
|
||||
<image :src="locationIcon" class="location"/>
|
||||
<div v-text="areaName"/>
|
||||
@@ -57,7 +60,10 @@ export default {
|
||||
name: {default: ''},
|
||||
value: String,
|
||||
all: Boolean,
|
||||
icon: {default: "location.svg"}
|
||||
icon: {default: "location.svg"},
|
||||
isForm: Boolean,
|
||||
valueLevel: {default: 5},
|
||||
fullName: {default: ''}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
@@ -102,9 +108,9 @@ export default {
|
||||
v && (this.getFullArea())
|
||||
},
|
||||
|
||||
value (v) {
|
||||
value(v) {
|
||||
if (this.list.length && v) {
|
||||
this.areaName = this.list.find((e) => e.id == this.value).name
|
||||
this.areaName = this.list.find((e) => e.id == this.value).name
|
||||
}
|
||||
},
|
||||
|
||||
@@ -118,7 +124,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.handleInit()
|
||||
},
|
||||
methods: {
|
||||
@@ -126,7 +132,7 @@ export default {
|
||||
this.handleInit()
|
||||
this.$refs.areaSelector.showPopup()
|
||||
},
|
||||
scrollHeight () {
|
||||
scrollHeight() {
|
||||
this.height = document.querySelector('.areaSelector') && `calc(100% - ${document.querySelector('.areaSelector').offsetHeight}px)`
|
||||
},
|
||||
getFullArea() {
|
||||
@@ -156,10 +162,10 @@ export default {
|
||||
}).then((res) => {
|
||||
if (res.data.length) {
|
||||
this.list = res.data
|
||||
let self = this.fullArea.find((e) => e.id == this.areaId)
|
||||
|
||||
let self = this.fullArea.find((e) => e.id == this.areaId)
|
||||
|
||||
if (this.value && !this.areaName && this.value !== this.areaId) {
|
||||
this.areaName = this.list.find((e) => e.id == this.value).name
|
||||
this.areaName = this.list.find((e) => e.id == this.value).name
|
||||
}
|
||||
if (!this.areaName && this.value === this.areaId) {
|
||||
this.areaName = self.name
|
||||
@@ -204,7 +210,7 @@ export default {
|
||||
},
|
||||
getChild(op) {
|
||||
if (op.id != this.index) {
|
||||
if (op.type < 5 && (/0{3}$/g.test(this.index) || !this.index)) {
|
||||
if (op.type <= this.valueLevel && op.type < 5 && (/0{3}$/g.test(this.index) || !this.index)) {
|
||||
this.fullArea.push(op)
|
||||
this.getChildAreas(op.id)
|
||||
}
|
||||
@@ -213,7 +219,7 @@ export default {
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
|
||||
|
||||
this.scrollHeight()
|
||||
})
|
||||
},
|
||||
|
||||
@@ -73,7 +73,6 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
console.log(params)
|
||||
if (params.girdLevel) {
|
||||
this.girdLevel = params.girdLevel
|
||||
}
|
||||
@@ -85,7 +84,7 @@ export default {
|
||||
this.isDisabledOneGird = params.isDisabledOneGird
|
||||
}
|
||||
this.isGirdUser()
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
isGirdUser() {
|
||||
@@ -98,7 +97,6 @@ export default {
|
||||
} else {
|
||||
this.getTree()
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$u.toast('当前人员不是网格员或网格管理员')
|
||||
}
|
||||
@@ -108,7 +106,7 @@ export default {
|
||||
getMyGird() {
|
||||
this.selectList = []
|
||||
this.$http.post('/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser').then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (res?.data) {
|
||||
this.allData = res.data
|
||||
this.treeInit()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user