Commit 62d1a3e7 authored by zhuangxinwei's avatar zhuangxinwei

Merge remote-tracking branch 'origin/master' into master

parents 201a50a1 7ae095db
...@@ -37,5 +37,6 @@ public class CheckUtils ...@@ -37,5 +37,6 @@ public class CheckUtils
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(checkPhone("15922013137")); System.out.println(checkPhone("15922013137"));
System.out.println(checkCard("110101199003078371"));
} }
} }
...@@ -101,6 +101,16 @@ public class Fcry extends BaseEntity ...@@ -101,6 +101,16 @@ public class Fcry extends BaseEntity
@Transient @Transient
private String value; private String value;
/** 从其他隔离点转来时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date otherGldTime;
/** 从其他方舱转来时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date otherFcTime;
public String getRemark() { public String getRemark() {
return remark; return remark;
} }
...@@ -342,4 +352,20 @@ public class Fcry extends BaseEntity ...@@ -342,4 +352,20 @@ public class Fcry extends BaseEntity
public void setValue(String value) { public void setValue(String value) {
this.value = value; this.value = value;
} }
public Date getOtherFcTime() {
return otherFcTime;
}
public void setOtherFcTime(Date otherFcTime) {
this.otherFcTime = otherFcTime;
}
public Date getOtherGldTime() {
return otherGldTime;
}
public void setOtherGldTime(Date otherGldTime) {
this.otherGldTime = otherGldTime;
}
} }
...@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl; ...@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
...@@ -166,40 +167,69 @@ public class GldryServiceImpl implements IGldryService ...@@ -166,40 +167,69 @@ public class GldryServiceImpl implements IGldryService
Gldry hldryQuerry = new Gldry(); Gldry hldryQuerry = new Gldry();
hldryQuerry.setCardNo(gldry.getCardNo()); hldryQuerry.setCardNo(gldry.getCardNo());
List<Gldry> gldries = gldryMapper.selectGldryList(hldryQuerry); List<Gldry> gldries = gldryMapper.selectGldryList(hldryQuerry);
if (StringUtils.isNotEmpty(gldry.getArea())) {
List<SysDictData> dictDataList = sysDictDataMapper.selectDictDataByType("residential_area"); // 校验 隔离点名称
String area = gldry.getArea(); if (StringUtils.isNotEmpty(gldry.getGlPlace())){
int isExist = 0; List<SysDictData> isolation_point = DictUtils.getDictCache("isolation_point");
for (SysDictData sysDictData : dictDataList) { List<String> values = isolation_point.stream().filter(l->gldry.getGlPlace().equals(l.getDictLabel()))
if (sysDictData.getDictLabel().equals(area)) { .map(SysDictData::getDictValue).collect(Collectors.toList());
area = sysDictData.getDictValue(); if (!values.isEmpty())
isExist = 1; gldry.setGlPlace(values.get(0));
} else {
failureList.add(gldry);
continue;
} }
if (isExist == 1){ }
gldry.setArea(area); // 校验四级联动是否对应字典的值
}else { // 校验 所在区
if (StringUtils.isNotEmpty(gldry.getArea())){
List<SysDictData> residential_area = DictUtils.getDictCache("residential_area");
List<String> values = residential_area.stream().filter(l->gldry.getArea().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty())
gldry.setArea(values.get(0));
else {
failureList.add(gldry); failureList.add(gldry);
continue; continue;
} }
} }
if (StringUtils.isNotEmpty(gldry.getStreet())) { // 校验 街道/镇
List<SysDictData> dictDataList = sysDictDataMapper.selectDictDataByType("street_town"); if (StringUtils.isNotEmpty(gldry.getStreet())){
String street = gldry.getStreet(); List<SysDictData> street_town = DictUtils.getDictCache("street_town");
int isExist = 0; List<String> values = street_town.stream().filter(l->gldry.getStreet().equals(l.getDictLabel()))
for (SysDictData sysDictData : dictDataList) { .map(SysDictData::getDictValue).collect(Collectors.toList());
if (sysDictData.getDictLabel().equals(street)) { if (!values.isEmpty())
street = sysDictData.getDictValue(); gldry.setStreet(values.get(0));
isExist = 1; else {
} failureList.add(gldry);
continue;
} }
if (isExist == 1){ }
gldry.setStreet(street); // 校验 居委会
}else { if (StringUtils.isNotEmpty(gldry.getCommittee())){
List<SysDictData> committee = DictUtils.getDictCache("committee");
List<String> values = committee.stream().filter(l->gldry.getCommittee().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty())
gldry.setCommittee(values.get(0));
else {
failureList.add(gldry); failureList.add(gldry);
continue; continue;
} }
} }
// 校验 小区/村名称
if (StringUtils.isNotEmpty(gldry.getCommunity())){
List<SysDictData> community = DictUtils.getDictCache("community");
List<String> values = community.stream().filter(l->gldry.getCommunity().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty())
gldry.setCommunity(values.get(0));
else {
failureList.add(gldry);
continue;
}
}
if (!gldries.isEmpty()){ if (!gldries.isEmpty()){
for (Gldry gldryUpdate:gldries){ for (Gldry gldryUpdate:gldries){
gldry.setId(gldryUpdate.getId()); gldry.setId(gldryUpdate.getId());
...@@ -221,7 +251,11 @@ public class GldryServiceImpl implements IGldryService ...@@ -221,7 +251,11 @@ public class GldryServiceImpl implements IGldryService
if (!trueList.isEmpty()){ if (!trueList.isEmpty()){
for (Gldry gldry:trueList){ for (Gldry gldry:trueList){
gldry.setCreateBy(String.valueOf(SecurityUtils.getUserId())); String createBy = DataUtils.getValue(gldry.getArea(),gldry.getStreet(),gldry.getCommittee());
if (createBy.equals("null")){
throw new ServiceException("所选居住地、街道、社区不存在");
}
gldry.setCreateBy(createBy);
gldry.setCreateTime(DateUtils.getNowDate()); gldry.setCreateTime(DateUtils.getNowDate());
gldryMapper.insertGldry(gldry); gldryMapper.insertGldry(gldry);
} }
......
...@@ -2,19 +2,16 @@ package com.ruoyi.system.service.impl; ...@@ -2,19 +2,16 @@ package com.ruoyi.system.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.CheckUtils; import com.ruoyi.common.utils.*;
import com.ruoyi.common.utils.DataUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.Zlqk; import com.ruoyi.system.domain.Zlqk;
import com.ruoyi.system.mapper.SysDictDataMapper; import com.ruoyi.system.mapper.SysDictDataMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.system.mapper.HscjMapper; import com.ruoyi.system.mapper.HscjMapper;
import com.ruoyi.system.domain.Hscj; import com.ruoyi.system.domain.Hscj;
...@@ -158,36 +155,51 @@ public class HscjServiceImpl implements IHscjService { ...@@ -158,36 +155,51 @@ public class HscjServiceImpl implements IHscjService {
&& StringUtils.isNotEmpty(hscj.getCjPhone()) && StringUtils.isNotEmpty(hscj.getCjPhone())
&& StringUtils.isNotEmpty(hscj.getBblx()) && StringUtils.isNotEmpty(hscj.getBblx())
) { ) {
if (StringUtils.isNotEmpty(hscj.getArea())) { // 校验四级联动是否对应字典的值
List<SysDictData> dictDataList = sysDictDataMapper.selectDictDataByType("residential_area"); // 校验 所在区
String area = hscj.getArea(); if (StringUtils.isNotEmpty(hscj.getArea())){
int isExist = 0; List<SysDictData> residential_area = DictUtils.getDictCache("residential_area");
for (SysDictData sysDictData : dictDataList) { List<String> values = residential_area.stream().filter(l->hscj.getArea().equals(l.getDictLabel()))
if (sysDictData.getDictLabel().equals(area)) { .map(SysDictData::getDictValue).collect(Collectors.toList());
area = sysDictData.getDictValue(); if (!values.isEmpty())
isExist = 1; hscj.setArea(values.get(0));
} else {
failureList.add(hscj);
continue;
} }
if (isExist == 1){ }
hscj.setArea(area); // 校验 街道/镇
}else { if (StringUtils.isNotEmpty(hscj.getStreet())){
List<SysDictData> street_town = DictUtils.getDictCache("street_town");
List<String> values = street_town.stream().filter(l->hscj.getStreet().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty())
hscj.setStreet(values.get(0));
else {
failureList.add(hscj); failureList.add(hscj);
continue; continue;
} }
} }
if (StringUtils.isNotEmpty(hscj.getStreet())) { // 校验 居委会
List<SysDictData> dictDataList = sysDictDataMapper.selectDictDataByType("street_town"); if (StringUtils.isNotEmpty(hscj.getCommittee())){
String street = hscj.getStreet(); List<SysDictData> committee = DictUtils.getDictCache("committee");
int isExist = 0; List<String> values = committee.stream().filter(l->hscj.getCommittee().equals(l.getDictLabel()))
for (SysDictData sysDictData : dictDataList) { .map(SysDictData::getDictValue).collect(Collectors.toList());
if (sysDictData.getDictLabel().equals(street)) { if (!values.isEmpty())
street = sysDictData.getDictValue(); hscj.setCommittee(values.get(0));
isExist = 1; else {
} failureList.add(hscj);
continue;
} }
if (isExist == 1){ }
hscj.setStreet(street); // 校验 小区/村名称
}else { if (StringUtils.isNotEmpty(hscj.getCommunity())){
List<SysDictData> community = DictUtils.getDictCache("community");
List<String> values = community.stream().filter(l->hscj.getCommunity().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty())
hscj.setCommunity(values.get(0));
else {
failureList.add(hscj); failureList.add(hscj);
continue; continue;
} }
......
...@@ -32,19 +32,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -32,19 +32,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="committee" column="committee" /> <result property="committee" column="committee" />
<result property="floor" column="floor" /> <result property="floor" column="floor" />
<result property="doorplate" column="doorplate" /> <result property="doorplate" column="doorplate" />
<result property="otherGldTime" column="other_gld_time" />
<result property="otherFcTime" column="other_fc_time" />
</resultMap> </resultMap>
<sql id="selectFcryVo"> <sql id="selectFcryVo">
select id, fc_place, room, jz_name, card_no, phone, area, street, community, unit, zr_time, zc_time, gl_place, select id, fc_place, room, jz_name, card_no, phone, area, street, community, unit, zr_time, zc_time, gl_place,
status, del_flag, create_by, create_time, update_by, update_time, remark,check_card,people_type,is_positive, status, del_flag, create_by, create_time, update_by, update_time, remark,check_card,people_type,is_positive,
positive_only,committee,floor,doorplate positive_only,committee,floor,doorplate,other_fc_time,other_gld_time
from fcry from fcry
</sql> </sql>
<select id="selectFcryList" parameterType="Fcry" resultMap="FcryResult"> <select id="selectFcryList" parameterType="Fcry" resultMap="FcryResult">
select a.id, a.fc_place, a.room, a.jz_name, a.card_no, a.phone, a.area, a.street, a.community, a.unit, a.zr_time, select a.id, a.fc_place, a.room, a.jz_name, a.card_no, a.phone, a.area, a.street, a.community, a.unit, a.zr_time,
a.zc_time, a.gl_place, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.zc_time, a.gl_place, a.status, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time,
a.remark ,a.check_card ,a.people_type ,a.is_positive ,a.positive_only ,a.committee ,a.floor ,a.doorplate from fcry a a.remark ,a.check_card ,a.people_type ,a.is_positive ,a.positive_only ,a.committee ,a.floor ,a.doorplate,
a.other_fc_time,a.other_gld_time from fcry a
left join sys_user u on u.user_id = a.create_by left join sys_user u on u.user_id = a.create_by
left join sys_dept d on u.dept_id = d.dept_id left join sys_dept d on u.dept_id = d.dept_id
where a.del_flag = 0 where a.del_flag = 0
...@@ -74,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -74,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.id, a.fc_place, a.room, a.jz_name, a.card_no, a.phone, a.area, a.street, a.community, select a.id, a.fc_place, a.room, a.jz_name, a.card_no, a.phone, a.area, a.street, a.community,
a.floor, a.unit, a.doorplate, a.zr_time, a.gl_place, a.status, a.del_flag, a.create_by, a.floor, a.unit, a.doorplate, a.zr_time, a.gl_place, a.status, a.del_flag, a.create_by,
a.create_time, a.update_by, a.update_time, a.remark , a.check_card , a.is_positive , a.positive_only, a.create_time, a.update_by, a.update_time, a.remark , a.check_card , a.is_positive , a.positive_only,
a.other_point_time, a.people_type from fcry a a.other_point_time, a.people_type,a.other_fc_time,a.other_gld_time from fcry a
where a.del_flag = 0 and a.card_no = #{cardNo} where a.del_flag = 0 and a.card_no = #{cardNo}
</select> </select>
...@@ -107,6 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -107,6 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isPositive != null">is_positive,</if> <if test="isPositive != null">is_positive,</if>
<if test="checkCard != null">check_card,</if> <if test="checkCard != null">check_card,</if>
<if test="peopleType != null">people_type,</if> <if test="peopleType != null">people_type,</if>
<if test="otherFcTime != null">other_fc_time,</if>
<if test="otherGldTime != null">other_gld_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fcPlace != null">#{fcPlace},</if> <if test="fcPlace != null">#{fcPlace},</if>
...@@ -135,6 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -135,6 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isPositive != null">#{isPositive},</if> <if test="isPositive != null">#{isPositive},</if>
<if test="checkCard != null">#{checkCard},</if> <if test="checkCard != null">#{checkCard},</if>
<if test="peopleType != null">#{peopleType},</if> <if test="peopleType != null">#{peopleType},</if>
<if test="otherFcTime != null">#{otherFcTime},</if>
<if test="otherGldTime != null">#{otherGldTime},</if>
</trim> </trim>
</insert> </insert>
<insert id="insertBatchFcry" parameterType="Fcry"> <insert id="insertBatchFcry" parameterType="Fcry">
...@@ -176,6 +183,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -176,6 +183,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isPositive != null">is_positive = #{isPositive},</if> <if test="isPositive != null">is_positive = #{isPositive},</if>
<if test="checkCard != null">check_card = #{checkCard},</if> <if test="checkCard != null">check_card = #{checkCard},</if>
<if test="peopleType != null">people_type = #{peopleType},</if> <if test="peopleType != null">people_type = #{peopleType},</if>
<if test="otherGldTime != null">other_gld_time = #{otherGldTime},</if>
<if test="otherFcTime != null">other_fc_time = #{otherFcTime},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
...@@ -17,12 +17,13 @@ export function cardGetInfo(query) { ...@@ -17,12 +17,13 @@ export function cardGetInfo(query) {
}) })
} }
// 下载治疗情况导入模板 // 下载导入模板
export function importTemplate(params) { export function importTemplate(params) {
return request({ return request({
url: '/system/yxry/importTemplate', url: '/system/yxry/importTemplate',
method: 'post', method: 'post',
responseType: 'blob', responseType: 'blob',
timeout: 30 * 1000,
params params
}) })
} }
...@@ -33,6 +34,7 @@ export function importExcel(data) { ...@@ -33,6 +34,7 @@ export function importExcel(data) {
url: '/system/yxry/importData', url: '/system/yxry/importData',
method: 'post', method: 'post',
responseType: 'blob', responseType: 'blob',
timeout: 30 * 1000,
data data
}) })
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -28,7 +28,10 @@ ...@@ -28,7 +28,10 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="街道/镇" prop="street"> <el-form-item
label="街道/镇"
prop="street"
>
<el-select v-model="queryParams.street" placeholder="请选择街道/镇" clearable> <el-select v-model="queryParams.street" placeholder="请选择街道/镇" clearable>
<el-option <el-option
v-for="dict in dict.type.street_town" v-for="dict in dict.type.street_town"
...@@ -406,7 +409,13 @@ ...@@ -406,7 +409,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="街道/镇" prop="street"> <el-form-item
label="街道/镇"
prop="street"
:rules="[
{ required: form.area === '1', message: '请选择街道/镇', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇" :disabled="form.area !== '1'" @change="zhenSelect"> <el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇" :disabled="form.area !== '1'" @change="zhenSelect">
<el-option <el-option
v-for="dict in zhen" v-for="dict in zhen"
...@@ -420,7 +429,13 @@ ...@@ -420,7 +429,13 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="居委会" prop="committee"> <el-form-item
label="居委会"
prop="committee"
:rules="[
{ required: form.area === '1', message: '请选择居委会', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.committee" placeholder="请选择居委会" :disabled="form.area !== '1'" @change="juSelect"> <el-select style="width: 100%" v-model="form.committee" placeholder="请选择居委会" :disabled="form.area !== '1'" @change="juSelect">
<el-option <el-option
v-for="dict in ju" v-for="dict in ju"
...@@ -432,7 +447,13 @@ ...@@ -432,7 +447,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="小区/村名称" prop="community" > <el-form-item
label="小区/村名称"
prop="community"
:rules="[
{ required: form.area === '1', message: '请选择小区/村名称', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.community" placeholder="请选择小区/村名称" :disabled="form.area !== '1'"> <el-select style="width: 100%" v-model="form.community" placeholder="请选择小区/村名称" :disabled="form.area !== '1'">
<el-option <el-option
v-for="dict in cun" v-for="dict in cun"
...@@ -534,8 +555,8 @@ ...@@ -534,8 +555,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检测结果" prop="cjResult"> <el-form-item label="检测结果" prop="cjResult">
<el-radio-group v-model="form.cjResult"> <el-radio-group v-model="form.cjResult">
<el-radio :label="0">阳性</el-radio> <el-radio :label="'0'">阳性</el-radio>
<el-radio :label="1">阴性</el-radio> <el-radio :label="'1'">阴性</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -917,6 +938,7 @@ export default { ...@@ -917,6 +938,7 @@ export default {
}, },
// 表单参数 // 表单参数
form: { form: {
cjTime: new Date(),
province: '河北省', province: '河北省',
city: '石家庄市', city: '石家庄市',
}, },
...@@ -1143,6 +1165,7 @@ export default { ...@@ -1143,6 +1165,7 @@ export default {
xh: null, xh: null,
city: '石家庄市', city: '石家庄市',
area: null, area: null,
committee: null,
street: null, street: null,
community: null, community: null,
cjPlace: null, cjPlace: null,
...@@ -1154,7 +1177,7 @@ export default { ...@@ -1154,7 +1177,7 @@ export default {
address: null, address: null,
age: null, age: null,
category: null, category: null,
cjTime: null, cjTime: new Date(),
cjName: null, cjName: null,
cjPhone: null, cjPhone: null,
bblx: '咽拭子', bblx: '咽拭子',
......
...@@ -274,7 +274,13 @@ ...@@ -274,7 +274,13 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="街道/镇" prop="street"> <el-form-item
label="街道/镇"
prop="street"
:rules="[
{ required: form.area === '1', message: '请选择街道/镇', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇" :disabled="form.area !== '1'" @change="zhenSelect"> <el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇" :disabled="form.area !== '1'" @change="zhenSelect">
<el-option <el-option
v-for="dict in zhen" v-for="dict in zhen"
...@@ -286,7 +292,13 @@ ...@@ -286,7 +292,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="居委会" prop="committee"> <el-form-item
label="居委会"
prop="committee"
:rules="[
{ required: form.area === '1', message: '请选择居委会', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.committee" placeholder="请选择居委会" :disabled="form.area !== '1'" @change="juSelect"> <el-select style="width: 100%" v-model="form.committee" placeholder="请选择居委会" :disabled="form.area !== '1'" @change="juSelect">
<el-option <el-option
v-for="dict in ju" v-for="dict in ju"
...@@ -300,7 +312,13 @@ ...@@ -300,7 +312,13 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="小区/村名称" prop="community" > <el-form-item
label="小区/村名称"
prop="community"
:rules="[
{ required: form.area === '1', message: '请选择小区/村名称', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.community" placeholder="请选择小区/村名称" :disabled="form.area !== '1'"> <el-select style="width: 100%" v-model="form.community" placeholder="请选择小区/村名称" :disabled="form.area !== '1'">
<el-option <el-option
v-for="dict in cun" v-for="dict in cun"
...@@ -841,7 +859,7 @@ export default { ...@@ -841,7 +859,7 @@ export default {
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接 const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href downloadElement.href = href
downloadElement.download = '治疗情况导入模板' + '.xls' // 下载后文件名 downloadElement.download = '抗原异常上报导入模板' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement) document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载 downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素 document.body.removeChild(downloadElement)// 下载完成移除元素
...@@ -886,6 +904,7 @@ export default { ...@@ -886,6 +904,7 @@ export default {
phone: null, phone: null,
address: null, address: null,
area: null, area: null,
committee: null,
street: null, street: null,
house: null, house: null,
building: null, building: null,
......
...@@ -363,7 +363,13 @@ ...@@ -363,7 +363,13 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="街道/镇" prop="street"> <el-form-item
label="街道/镇"
prop="street"
:rules="[
{ required: form.area === '1', message: '请选择街道/镇', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇" :disabled="form.area !== '1'" @change="zhenSelect"> <el-select style="width: 100%" v-model="form.street" placeholder="请选择街道/镇" :disabled="form.area !== '1'" @change="zhenSelect">
<el-option <el-option
v-for="dict in zhen" v-for="dict in zhen"
...@@ -375,7 +381,13 @@ ...@@ -375,7 +381,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="居委会" prop="committee"> <el-form-item
label="居委会"
prop="committee"
:rules="[
{ required: form.area === '1', message: '请选择居委会', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.committee" placeholder="请选择居委会" :disabled="form.area !== '1'" @change="juSelect"> <el-select style="width: 100%" v-model="form.committee" placeholder="请选择居委会" :disabled="form.area !== '1'" @change="juSelect">
<el-option <el-option
v-for="dict in ju" v-for="dict in ju"
...@@ -389,7 +401,13 @@ ...@@ -389,7 +401,13 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="小区/村名称" prop="community" > <el-form-item
label="小区/村名称"
prop="community"
:rules="[
{ required: form.area === '1', message: '请选择小区/村名称', trigger: ['blur','change'] }
]"
>
<el-select style="width: 100%" v-model="form.community" placeholder="请选择小区/村名称" :disabled="form.area !== '1'"> <el-select style="width: 100%" v-model="form.community" placeholder="请选择小区/村名称" :disabled="form.area !== '1'">
<el-option <el-option
v-for="dict in cun" v-for="dict in cun"
...@@ -1091,6 +1109,7 @@ export default { ...@@ -1091,6 +1109,7 @@ export default {
cardNo: null, cardNo: null,
phone: null, phone: null,
area: null, area: null,
committee: null,
street: null, street: null,
isolationStatus: null, isolationStatus: null,
fcName: null, fcName: null,
......
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