优化
This commit is contained in:
@@ -24,21 +24,22 @@
|
|||||||
</AiTopFixed>
|
</AiTopFixed>
|
||||||
|
|
||||||
<div class="cardList">
|
<div class="cardList">
|
||||||
<div class="card" v-for="(item,index) in list" :key="index" @click="toDetail(item.id)">
|
<div v-if="list.length">
|
||||||
<p class="user">
|
<div class="card" v-for="(item,index) in list" :key="index" @click="toDetail(item.id)">
|
||||||
<span class="name">{{ item.name }}</span>
|
<p class="user">
|
||||||
<span :style="{color: item.houseType==1? '#FF6300': '#00D25D'}">{{ $dict.getLabel('fpHouseType', item.houseType) }}</span>
|
<span class="name">{{ item.name }}</span>
|
||||||
</p>
|
<span :style="{color: item.houseType==1? '#FF6300': '#00D25D'}">{{ $dict.getLabel('fpHouseType', item.houseType) }}</span>
|
||||||
<div class="idCard">{{ item.idNumber.replace(/(.{6}).*(.{4})/, '$1********$2') }}</div>
|
</p>
|
||||||
<div class="tel"><img src="./images/dh@2x.png" alt="">{{ item.phone}}</div>
|
<div class="idCard">{{ item.idNumber.replace(/(.{6}).*(.{4})/, '$1********$2') }}</div>
|
||||||
<div class="address"><img src="./images/dz@2x.png" alt="">
|
<div class="tel"><img src="./images/dh@2x.png" alt="">{{ item.phone}}</div>
|
||||||
{{ item.countyName + item.townName + item.villageName }}{{ item.currentAddress || '' }}
|
<div class="address"><img src="./images/dz@2x.png" alt="">
|
||||||
|
{{ item.countyName + item.townName + item.villageName }}{{ item.currentAddress || '' }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty v-if="!list.length" description="暂无数据"></AiEmpty>
|
<AiEmpty v-else description="暂无数据"></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -67,7 +68,6 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
areaSelect(e) {
|
areaSelect(e) {
|
||||||
console.log(e);
|
|
||||||
this.areaId = e
|
this.areaId = e
|
||||||
this.current = 1
|
this.current = 1
|
||||||
this.list = []
|
this.list = []
|
||||||
@@ -82,9 +82,10 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.typeList.unshift({ label: '全部类型', value: ''})
|
this.typeList.unshift({ label: '全部类型', value: ''})
|
||||||
|
this.areaId = this.user.areaId
|
||||||
|
this.getList()
|
||||||
})
|
})
|
||||||
this.areaId = this.user.areaId
|
|
||||||
this.getList()
|
|
||||||
},
|
},
|
||||||
typeSelect(v) {
|
typeSelect(v) {
|
||||||
this.current = 1
|
this.current = 1
|
||||||
|
|||||||
@@ -72,9 +72,6 @@ export default {
|
|||||||
if (!this.operationDesc) {
|
if (!this.operationDesc) {
|
||||||
return this.$u.toast('请选择帮扶类型')
|
return this.$u.toast('请选择帮扶类型')
|
||||||
}
|
}
|
||||||
// if (!this.detail) {
|
|
||||||
// return this.$u.toast('请输入帮扶内容')
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
if (!this.detail) {
|
if (!this.detail) {
|
||||||
return this.$u.toast('请输入走访内容')
|
return this.$u.toast('请输入走访内容')
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bar-width="150" @change="change"></u-tabs>
|
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bar-width="150" @change="change"></u-tabs>
|
||||||
</AiTopFixed>
|
</AiTopFixed>
|
||||||
|
|
||||||
<div class="tab-content" v-show="currentTabs === 0">
|
<div class="tab-content">
|
||||||
<div class="tab-content__item">
|
<div class="tab-content__item" v-if="list.length">
|
||||||
<div class="log-item" v-for="(item, index) in helpList" :key="index">
|
<div class="log-item" v-for="(item, index) in list" :key="index">
|
||||||
<div class="log-item__wrapper">
|
<div class="log-item__wrapper">
|
||||||
<div class="log-item__user">
|
<div class="log-item__user">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
@@ -17,10 +17,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<span>{{ item.createTime }}</span>
|
<span>{{ item.createTime }}</span>
|
||||||
<u-icon name="list" color="#999" size="28" @click="edit(item.id, '1')" style="margin-left:16px;" v-if="item.createUserId == user.id"></u-icon>
|
<u-icon name="list" color="#999" size="28" @click="edit(item.id, '1')" style="margin-left:16px;" v-if="item.createUserId == user.id && currentTabs==0"></u-icon>
|
||||||
|
<u-icon name="list" color="#999" size="28" @click="edit(item.id, '0')" style="margin-left:16px;" v-if="item.createUserId == user.id && item.operationDesc == '走访排查' && currentTabs==1"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p style="color: #999999;">帮扶措施:{{ $dict.getLabel('fpAssistanceMeasures',item.operationDesc) }}</p>
|
<p style="color: #999999;" v-if="currentTabs==0">帮扶措施:{{ $dict.getLabel('fpAssistanceMeasures',item.operationDesc) }}</p>
|
||||||
|
<p style="color: #999999;" v-if="currentTabs==1">操作类型:{{ item.operationDesc }}</p>
|
||||||
<p>{{ item.detail }}</p>
|
<p>{{ item.detail }}</p>
|
||||||
<div class="imgs" v-if="item.files && item.files.length">
|
<div class="imgs" v-if="item.files && item.files.length">
|
||||||
<image :src="img.url" @click="prevImg(item.files, img.url)" v-for="(img, index) in item.files"
|
<image :src="img.url" @click="prevImg(item.files, img.url)" v-for="(img, index) in item.files"
|
||||||
@@ -28,34 +30,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty v-if="!helpList.length" style="padding-bottom: 20px;"></AiEmpty>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<AiEmpty v-else style="padding-top: 50px;" description="暂无数据"></AiEmpty>
|
||||||
|
|
||||||
<div class="tab-content__item" v-show="currentTabs == 1">
|
|
||||||
<div class="log-item" v-for="(item, index) in logList" :key="index">
|
|
||||||
<div class="log-item__wrapper">
|
|
||||||
<div class="log-item__user">
|
|
||||||
<div class="left">
|
|
||||||
<div class="user">
|
|
||||||
<span>{{ item.createUserName.substr(item.createUserName.length - 2) }}</span>
|
|
||||||
</div>
|
|
||||||
<h2>{{ item.createUserName }}</h2>
|
|
||||||
</div>
|
|
||||||
<div class="right">
|
|
||||||
<span>{{ item.createTime }}</span>
|
|
||||||
<u-icon name="list" color="#999" size="28" @click="edit(item.id, '0')" style="margin-left:16px;" v-if="item.createUserId == user.id && item.operationDesc == '走访排查'"></u-icon>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p style="color: #999999;">操作类型:{{ item.operationDesc }}</p>
|
|
||||||
<p>{{ item.detail }}</p>
|
|
||||||
<div class="imgs" v-if="item.files && item.files.length">
|
|
||||||
<image :src="img.url" @click="prevImg(item.files, img.url)" v-for="(img, index) in item.files"
|
|
||||||
:key="index"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<AiEmpty v-if="!logList.length" style="padding-bottom: 20px;"></AiEmpty>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AiFixedBtn v-if="currentTabs === 0">
|
<AiFixedBtn v-if="currentTabs === 0">
|
||||||
@@ -83,9 +59,9 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
currentTabs: 0,
|
currentTabs: 0,
|
||||||
helpList: [],
|
list: [],
|
||||||
logList: [],
|
|
||||||
id: '',
|
id: '',
|
||||||
|
current: 1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -97,24 +73,22 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
change(index) {
|
change(index) {
|
||||||
|
this.list = []
|
||||||
|
this.current = 1
|
||||||
this.currentTabs = index
|
this.currentTabs = index
|
||||||
if(index == 0) {
|
this.getList()
|
||||||
this.getHelpList()
|
|
||||||
} else if(index == 1) {
|
|
||||||
this.getLogList()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getHelpList() {
|
getList() {
|
||||||
this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1&type=1`).then(res => {
|
this.$http.post(`/app/apppreventionreturntopovertylog/list`,null,{
|
||||||
if (res.code === 0) {
|
params: {
|
||||||
this.helpList = res.data.records || []
|
pid: this.id,
|
||||||
|
size: 1000,
|
||||||
|
current: this.current,
|
||||||
|
type: this.currentTabs==0? '1':'0'
|
||||||
}
|
}
|
||||||
})
|
}).then(res => {
|
||||||
},
|
if (res?.data) {
|
||||||
getLogList() {
|
this.list = this.current==1? res.data.records : [...this.list, ...res.data.records]
|
||||||
this.$http.post(`/app/apppreventionreturntopovertylog/list?pid=${this.id}&size=1000¤t=1&type=0`).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.logList = res.data.records || []
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -137,27 +111,23 @@ export default {
|
|||||||
itemList: ['编辑', '删除'],
|
itemList: ['编辑', '删除'],
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.tapIndex === 0) {
|
if (res.tapIndex === 0) {
|
||||||
if (type === 0) {
|
if (type == 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./addLog?pid=${this.id}&id=${id}&type=0`
|
url: `./addLog?pid=${this.id}&id=${id}&type=0`
|
||||||
})
|
})
|
||||||
} else {
|
} else if (type == 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./addLog?pid=${this.id}&id=${id}&type=1`
|
url: `./addLog?pid=${this.id}&id=${id}&type=1`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (res.tapIndex === 1) {
|
} else if (res.tapIndex == 1) {
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
this.$http.post(`/app/apppreventionreturntopovertylog/delete?ids=${id}`).then(res => {
|
this.$http.post(`/app/apppreventionreturntopovertylog/delete?ids=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$u.toast('删除成功')
|
this.$u.toast('删除成功')
|
||||||
if(type == 1) {
|
this.getList()
|
||||||
this.getHelpList()
|
|
||||||
} else if(type == 0) {
|
|
||||||
this.getLogList()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
@@ -167,24 +137,17 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '帮扶情况'
|
document.title = '帮扶情况'
|
||||||
if(this.id) {
|
if(this.id) {
|
||||||
if(this.currentTabs==0) {
|
this.getList()
|
||||||
this.getHelpList()
|
|
||||||
} else if (this.currentTabs ==1) {
|
|
||||||
this.getLogList()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.current ++
|
||||||
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user