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

@@ -4,16 +4,18 @@
<div class="search"><u-search placeholder="请输入姓名、身份证号" v-model="name" :show-action="false"></u-search></div>
<div class="select">
<div class="left">
<AiSelect v-model="declareReason" :list="areaList" @data="areaSelect">
<span v-if="!declareReason" style="color: #999;">地区筛选</span>
<span v-else>{{ $dict.getLabel('helpDeclarationReason', declareReason) }}</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;"></u-icon>
</AiSelect>
<AiAreaPicker v-model="areaId" :areaId="user.areaId" :name.sync="areaName" @select="areaSelect" selectRoot>
<div>
<span v-if="areaId" style="color:#333;fontSize: 14px;" class="areaName">{{ areaName }}</span>
<span v-else style="color: #999;fontSize: 14px;" class="areaName">所在地区</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;margin-top:18px" @select="areaSelect(e)"></u-icon>
</div>
</AiAreaPicker>
</div>
<div class="right">
<AiSelect v-model="declareReason" :list="typeList" @data="typeSelect">
<span v-if="!declareReason" style="color: #999;">户型类型</span>
<span v-else>{{ $dict.getLabel('helpDeclarationReason', declareReason) }}</span>
<AiSelect v-model="houseType" :list="typeList" @data="typeSelect">
<span v-if="!houseType" style="color: #999;">户型类型</span>
<span v-else>{{ $dict.getLabel('fpHouseType', houseType) }}</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px;width: 14px;display:inline-block;"></u-icon>
</AiSelect>
</div>
@@ -32,6 +34,7 @@
{{ item.countyName + item.townName + item.villageName }}{{ item.currentAddress || '' }}
</div>
</div>
<AiEmpty v-if="!list.length" description="暂无数据"></AiEmpty>
</div>
@@ -39,6 +42,7 @@
</template>
<script>
import {mapState} from 'vuex'
export default {
name: "AppHelpEffect",
appName: '帮扶成效',
@@ -52,11 +56,40 @@ export default {
houseType: 1,
provertyStatus: 0,
list: [],
areaId: '',
areaName: '',
houseType: '',
}
},
computed: {
...mapState(['user'])
},
methods: {
areaSelect() {},
typeSelect() {},
areaSelect(e) {
this.areaId =e
this.current = 1
this.list = []
this.$nextTick(() => {
this.getList()
})
},
onLoad() {
this.$dict.load('fpHouseType').then(() => {
this.typeList = this.$dict.getDict('fpHouseType').map((item) =>{
return {
label: item.dictName,
value: item.dictValue
}
})
this.typeList.unshift({ label: '全部类型', value: ''})
})
},
typeSelect(v) {
this.current = 1
this.list = []
this.houseType = v?.[0].value
this.getList()
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
@@ -65,7 +98,9 @@ export default {
params: {
current: this.current,
provertyStatus: this.provertyStatus,
name: this.name,
con: this.name,
area: this.areaId,
houseType: this.houseType
},
}).then((res) => {
if (res?.data) {
@@ -97,8 +132,9 @@ export default {
.select {
width: 100%;
display: flex;
height: 60px;
line-height: 60px;
height: 86px;
line-height: 86px;
text-align: center;
::v-deep .AiSelect .display {
justify-content: center;
@@ -106,7 +142,7 @@ export default {
.left,
.right {
width: 50%;
flex: 1;
}
}
.cardList {

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()
}
}
}
}