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

View File

@@ -17,7 +17,7 @@
</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)" 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>
</div> </div>
<p style="color: #999999;">帮扶措施{{ $dict.getLabel('fpAssistanceMeasures',item.operationDesc) }}</p> <p style="color: #999999;">帮扶措施{{ $dict.getLabel('fpAssistanceMeasures',item.operationDesc) }}</p>
@@ -44,7 +44,7 @@
</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)" 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>
</div> </div>
<p style="color: #999999;">操作类型{{ item.operationDesc }}</p> <p style="color: #999999;">操作类型{{ item.operationDesc }}</p>
@@ -59,11 +59,11 @@
</div> </div>
<AiFixedBtn v-if="currentTabs === 0"> <AiFixedBtn v-if="currentTabs === 0">
<!-- v-if="$permissions('app_apppreventionreturntopovertylog_edit')" --> <div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog('1')" v-if="$permissions('app_apppreventionreturntopovertylog_edit')"></div>
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAddLog(1)" ></div>
</AiFixedBtn> </AiFixedBtn>
<!-- 走访日志0 帮扶措施1 -->
<AiFixedBtn v-if="currentTabs === 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> </AiFixedBtn>
</div> </div>
</template> </template>
@@ -132,21 +132,32 @@ export default {
}) })
}, },
edit(id) { edit(id,type) {
uni.showActionSheet({ uni.showActionSheet({
itemList: ['编辑', '删除'], itemList: ['编辑', '删除'],
success: res => { success: res => {
if (res.tapIndex === 0) { if (res.tapIndex === 0) {
uni.navigateTo({ if (type === 0) {
url: `./addLog?pid=${this.info.id}&id=${id}&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) { } 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('删除成功')
this.getHelpList() if(type == 1) {
this.getHelpList()
} else if(type == 0) {
this.getLogList()
}
} }
uni.hideLoading() uni.hideLoading()
}) })
@@ -167,7 +178,12 @@ export default {
onShow() { onShow() {
document.title = '帮扶情况' document.title = '帮扶情况'
if(this.id) { if(this.id) {
this.getHelpList() if(this.currentTabs==0) {
this.getHelpList()
} else if (this.currentTabs ==1) {
this.getLogList()
}
} }
} }
} }