Commit 2895a356 authored by 张伯涛's avatar 张伯涛

修改

parent c24f0dc2
......@@ -120,23 +120,32 @@
<el-table v-loading="loading" :data="wzzryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="姓名" align="center" prop="userName" width="100" :show-overflow-tooltip="true" />
<el-table-column label="身份证号码" align="center" prop="cardNo" width="180" :show-overflow-tooltip="true" />
<el-table-column label="联系方式" align="center" prop="phone" width="120" :show-overflow-tooltip="true" />
<el-table-column label="街道/镇" align="center" prop="street" width="100" :show-overflow-tooltip="true" />
<el-table-column label="居委会" align="center" prop="committee" width="100" :show-overflow-tooltip="true" />
<el-table-column label="小区/村名称" align="center" prop="community" width="100" :show-overflow-tooltip="true" />
<el-table-column label="街道/镇" align="center" prop="street" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.street_town" :value="scope.row.street"/>
</template>
</el-table-column>
<el-table-column label="居委会" align="center" prop="committee" width="130" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.committee" :value="scope.row.committee"/>
</template>
</el-table-column>
<el-table-column label="小区/村名称" align="center" prop="communityName" width="100" :show-overflow-tooltip="true" />
<el-table-column label="楼号" align="center" prop="building" width="100" :show-overflow-tooltip="true" />
<el-table-column label="单元号" align="center" prop="unit" width="100" :show-overflow-tooltip="true" />
<el-table-column label="楼层" align="center" prop="floor" width="100" :show-overflow-tooltip="true" />
<el-table-column label="门牌号" align="center" prop="house" width="100" :show-overflow-tooltip="true" />
<el-table-column label="住址" align="center" prop="address" width="100" :show-overflow-tooltip="true" />
<el-table-column label="基础病情况" align="center" prop="basicDisease" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.basic_disease" :value="scope.row.basicDisease"/>
</template>
</el-table-column>
<el-table-column label="基础病情况" align="center" prop="basicDiseaseName" width="100" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="基础病情况" align="center" prop="basicDisease" width="100" :show-overflow-tooltip="true">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.basic_disease" :value="scope.row.basicDisease.split(',')"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="是否有人照顾" align="center" prop="isCare" width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{scope.row.isCare === '0' ? '是':scope.row.isCare === '1' ? '否' : '' }}</span>
......@@ -349,10 +358,11 @@
<script>
import { listWzzry, getWzzry, delWzzry, addWzzry, updateWzzry } from "@/api/system/wzzry";
import {getDicts} from "@/api/system/dict/data"
export default {
name: "Wzzry",
dicts: ['basic_disease'],
dicts: ['street_town', 'committee', 'basic_disease'],
data() {
return {
// 遮罩层
......@@ -393,6 +403,8 @@ export default {
cohabitantsNumber: null,
status: null,
},
basicdiseaseOptions: [],
basicDiseaseName: [],
zhen: [],
zhenList : [
{ name: "长江街道",code: "1",parent: "1" },
......@@ -673,14 +685,14 @@ export default {
};
},
created() {
this.getList();
this.getSelect()
},
methods: {
streetBlur(val) {
this.$refs.form.validateField(val)
},
zhenSelect(val){
// this.$refs.form.validateField('street')
this.$refs.form.validateField('street')
this.ju = []
this.form.community = ''
this.form.committee = ''
......@@ -700,11 +712,38 @@ export default {
}
})
},
getSelect() {
const params = 'basic_disease'
getDicts(params).then(res=>{
this.basicdiseaseOptions = res.data
this.getList();
})
},
/** 查询危重症人员列表 */
getList() {
this.loading = true;
listWzzry(this.queryParams).then(response => {
this.wzzryList = response.rows;
this.wzzryList.forEach(item=>{
if(item.community) {
const communityName = this.cunList.find(optionItem => optionItem.code === item.community).name
this.$set(item, 'communityName', communityName)
} else {
this.$set(item, 'communityName', '')
}
if(item.basicDisease) {
let list = []
this.basicDiseaseName = []
list = item.basicDisease.split(',')
for (let i = 0; i < list.length; i++) {
const name = this.basicdiseaseOptions.find(optionItem => optionItem.dictValue === list[i]).dictLabel
this.basicDiseaseName.push(name+ ',')
}
this.$set(item, 'basicDiseaseName', this.basicDiseaseName)
} else {
this.$set(item, 'basicDiseaseName', '')
}
})
this.total = response.total;
this.loading = false;
});
......@@ -772,7 +811,15 @@ export default {
this.open = true;
const id = row.id || this.ids
getWzzry(id).then(response => {
this.zhenSelect(response.data.street)
// this.zhenSelect(response.data.street)
this.ju = []
this.form.community = ''
this.form.committee = ''
this.juList.forEach(res => {
if (res.parent === response.data.street){
this.ju.push(res)
}
})
this.juSelect(response.data.committee)
this.form = response.data;
if(this.form.floor) {
......@@ -791,7 +838,15 @@ export default {
this.open = true;
const id = row.id || this.ids
getWzzry(id).then(response => {
this.zhenSelect(response.data.street)
// this.zhenSelect(response.data.street)
this.ju = []
this.form.community = ''
this.form.committee = ''
this.juList.forEach(res => {
if (res.parent === response.data.street){
this.ju.push(res)
}
})
this.juSelect(response.data.committee)
this.form = response.data;
if(this.form.floor) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment