This commit is contained in:
shijingjing
2022-07-21 16:03:34 +08:00
parent 361cf2633b
commit a829cd36a4
2 changed files with 77 additions and 25 deletions

View File

@@ -17,7 +17,7 @@
</div>
<div class="right">
<span>{{ item.createTime }}</span>
<u-icon name="list" color="#999" size="28" @click="edit(item.id)" 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"></u-icon>
</div>
</div>
<p style="color: #999999;">帮扶措施{{ $dict.getLabel('fpAssistanceMeasures',item.operationDesc) }}</p>
@@ -44,7 +44,7 @@
</div>
<div class="right">
<span>{{ item.createTime }}</span>
<u-icon name="list" color="#999" size="28" @click="edit(item.id)" style="margin-left:16px;" v-if="item.createUserId == user.id && item.operationDesc == '走访排查'"></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 == '走访排查'"></u-icon>
</div>
</div>
<p style="color: #999999;">操作类型{{ item.operationDesc }}</p>
@@ -59,11 +59,11 @@
</div>
<AiFixedBtn v-if="currentTabs === 0">
<!-- v-if="$permissions('app_apppreventionreturntopovertylog_edit')" -->
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog(1)" ></div>
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog('1')" v-if="$permissions('app_apppreventionreturntopovertylog_edit')"></div>
</AiFixedBtn>
<!-- 走访日志0 帮扶措施1 -->
<AiFixedBtn v-if="currentTabs === 1">
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog()"></div>
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog('0')"></div>
</AiFixedBtn>
</div>
</template>
@@ -132,21 +132,32 @@ export default {
})
},
edit(id) {
edit(id,type) {
uni.showActionSheet({
itemList: ['编辑', '删除'],
success: res => {
if (res.tapIndex === 0) {
uni.navigateTo({
url: `./addLog?pid=${this.info.id}&id=${id}&type=0`
})
if (type === 0) {
uni.navigateTo({
url: `./addLog?pid=${this.id}&id=${id}&type=0`
})
} else {
uni.navigateTo({
url: `./addLog?pid=${this.id}&id=${id}&type=1`
})
}
} else if (res.tapIndex === 1) {
this.$confirm('确定删除该数据?').then(() => {
uni.showLoading()
this.$http.post(`/app/apppreventionreturntopovertylog/delete?ids=${id}`).then(res => {
if (res.code === 0) {
this.$u.toast('删除成功')
this.getHelpList()
if(type == 1) {
this.getHelpList()
} else if(type == 0) {
this.getLogList()
}
}
uni.hideLoading()
})
@@ -167,7 +178,12 @@ export default {
onShow() {
document.title = '帮扶情况'
if(this.id) {
this.getHelpList()
if(this.currentTabs==0) {
this.getHelpList()
} else if (this.currentTabs ==1) {
this.getLogList()
}
}
}
}