From 78b5044e39d0eef983205a180caebd844af72b92 Mon Sep 17 00:00:00 2001 From: sk1551 <15175617877@163.com> Date: Fri, 11 Sep 2020 10:33:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B6=E9=95=BF=E7=BB=B4=E6=8A=A4=E5=B9=BC?= =?UTF-8?q?=E5=84=BF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/benyi/child.js | 87 ++++++++++--------- ruoyi-ui/src/views/benyi/child/index.vue | 57 +++++++++++- .../src/views/benyi/child_preserve/index.vue | 32 ++++++- .../ruoyi/project/benyi/domain/ByChild.java | 11 +++ .../resources/mybatis/benyi/ByChildMapper.xml | 29 ++++++- 5 files changed, 171 insertions(+), 45 deletions(-) diff --git a/ruoyi-ui/src/api/benyi/child.js b/ruoyi-ui/src/api/benyi/child.js index 5b4421c11..d7c9e9578 100644 --- a/ruoyi-ui/src/api/benyi/child.js +++ b/ruoyi-ui/src/api/benyi/child.js @@ -2,70 +2,79 @@ import request from '@/utils/request' // 查询幼儿信息列表 export function listChild(query) { - return request({ - url: '/benyi/child/list', - method: 'get', - params: query - }) + return request({ + url: '/benyi/child/list', + method: 'get', + params: query + }) } // 查询幼儿信息列表 export function listByCheck(query) { - return request({ - url: '/benyi/child/listByCheck', - method: 'get', - params: query - }) + return request({ + url: '/benyi/child/listByCheck', + method: 'get', + params: query + }) } // 查询幼儿信息详细 export function getChild(id) { - return request({ - url: '/benyi/child/' + id, - method: 'get' - }) + return request({ + url: '/benyi/child/' + id, + method: 'get' + }) +} + +// 查询维护幼儿详细 +export function getChild_query(query) { + return request({ + url: '/benyi/child/getInfo', + method: 'get', + params: query + }) } // 新增幼儿信息 export function addChild(data) { - return request({ - url: '/benyi/child', - method: 'post', - data: data - }) + return request({ + url: '/benyi/child', + method: 'post', + data: data + }) } // 修改幼儿信息 export function updateChild(data) { - return request({ - url: '/benyi/child', - method: 'put', - data: data - }) + return request({ + url: '/benyi/child', + method: 'put', + data: data + }) } // 修改幼儿信息 -export function updateChild_tb(data,id) { - return request({ - url: '/benyi/child/'+id, - method: 'put', - data: data - }) +export function updateChild_tb(data, id) { + return request({ + url: '/benyi/child/' + id, + method: 'put', + data: data + }) } // 删除幼儿信息 export function delChild(id) { - return request({ - url: '/benyi/child/' + id, - method: 'delete' - }) + return request({ + url: '/benyi/child/' + id, + method: 'delete' + }) } // 导出幼儿信息 export function exportChild(query) { - return request({ - url: '/benyi/child/export', - method: 'get', - params: query - }) + return request({ + url: '/benyi/child/export', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/child/index.vue b/ruoyi-ui/src/views/benyi/child/index.vue index 0d5532d23..0687e5545 100644 --- a/ruoyi-ui/src/views/benyi/child/index.vue +++ b/ruoyi-ui/src/views/benyi/child/index.vue @@ -88,6 +88,17 @@ v-hasPermi="['benyi:child:edit']" >调班 + + + 家长填报链接 + + @@ -289,12 +300,12 @@ - + - + @@ -357,6 +368,10 @@ import { listClass } from "@/api/system/class"; //导入省市区三级联动库 import VDistpicker from "v-distpicker"; +// 获取当前ip +import { getUserProfile } from "@/api/system/user"; +// 点击复制 +import Clipboard from "clipboard"; export default { name: "Child", @@ -382,6 +397,8 @@ export default { city: null, area: null, }, + // 连接内容 + inviteCode: "", // 遮罩层 loading: true, // 选中数组 @@ -492,12 +509,48 @@ export default { this.getDicts("sys_dm_ryqd").then((response) => { this.sourceOptions = response.data; }); + this.getLink(); }, components: { //省市区三级联动全局组件 VDistpicker, }, methods: { + // 链接内容 + getLink() { + getUserProfile().then((response) => { + var domain = window.location.host; + //console.log(domain); + //this.user = response.data; + this.inviteCode = + response.data.dept.deptName + + "幼儿信息维护链接" + + "http://" + + domain + + "/child_preserve/index/" + + response.data.dept.deptId; + }); + }, + // 给家长发送链接 + copy(e, text) { + const clipboard = new Clipboard(e.target, { text: () => text }); + clipboard.on("success", (e) => { + this.msgSuccess("复制成功"); + // 释放内存 + clipboard.off("error"); + clipboard.off("success"); + clipboard.destroy(); + }); + clipboard.on("error", (e) => { + // 不支持复制 + this.msgError("手机权限不支持复制功能"); + // 释放内存 + clipboard.off("error"); + clipboard.off("success"); + clipboard.destroy(); + }); + clipboard.onClick(e); + }, // 性别字典翻译 xbFormat(row, column) { return this.selectDictLabel(this.sexOptions, row.xb); diff --git a/ruoyi-ui/src/views/benyi/child_preserve/index.vue b/ruoyi-ui/src/views/benyi/child_preserve/index.vue index 7ef329ad9..d5c5ae507 100644 --- a/ruoyi-ui/src/views/benyi/child_preserve/index.vue +++ b/ruoyi-ui/src/views/benyi/child_preserve/index.vue @@ -17,8 +17,11 @@

提交核对幼儿信息

- - + + + + + @@ -163,6 +166,9 @@ import { getChild_query, updateChild } from "@/api/benyi/child"; //导入省市区三级联动库 import VDistpicker from "v-distpicker"; +// 更新紧急联系人 +import { updateContactpeople } from "@/api/benyi/contactpeople"; + export default { name: "result", data() { @@ -193,6 +199,8 @@ export default { yzzs: "", tynrcontent: "", href_tynr: "", + father: "", + mother: "", // 是否显示弹出层 open: false, // 幼儿信息表格数据 @@ -215,7 +223,8 @@ export default { phone: undefined }, // 表单参数 - form: {} + form: { + } }; }, created() { @@ -242,6 +251,10 @@ export default { VDistpicker }, methods: { + // 强制输入刷新 + onInput() { + this.$forceUpdate(); + }, // 性别字典翻译 xbFormat(row, column) { return this.selectDictLabel(this.sexOptions, row.xb); @@ -282,7 +295,10 @@ export default { this.hide = true; this.childList = response.rows; this.form = response.data; + console.log(this.form); this.form.id = response.data.id; + this.form.father = response.data.byChildContactpeople.fathername; + this.form.mother = response.data.byChildContactpeople.mothername; this.diglogForm.province = response.data.birthProvincename; this.diglogForm.city = response.data.birthCityname; this.diglogForm.area = response.data.birthAreaname; @@ -310,6 +326,16 @@ export default { this.hide = false; } }); + this.form.childid = this.form.id; + this.form.fathername = this.form.father; + this.form.mothername = this.form.mother; + updateContactpeople(this.form).then((response) => { + if (response.code === 200) { + this.msgSuccess("修改成功"); + //this.open = false; + this.hide = false; + } + }); } } }); diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java index 45183dfc5..06af92970 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java @@ -259,6 +259,8 @@ public class ByChild extends BaseEntity { @Excel(name = "创建人") private Long createuserid; + private ByChildContactpeople byChildContactpeople; + public void setId(Long id) { this.id = id; } @@ -623,6 +625,15 @@ public class ByChild extends BaseEntity { .append("otherLanguage", getOtherLanguage()) .append("createuserid", getCreateuserid()) .append("createTime", getCreateTime()) + .append("byChildContactpeople", getByChildContactpeople()) .toString(); } + + public ByChildContactpeople getByChildContactpeople() { + return byChildContactpeople; + } + + public void setByChildContactpeople(ByChildContactpeople byChildContactpeople) { + this.byChildContactpeople = byChildContactpeople; + } } \ No newline at end of file diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml index 99aa76460..07e7f80ce 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml @@ -46,10 +46,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - select id, schoolid, classid, name, en_name, infant_name, phone, xb, mz, zjhm, csrq, birth_province, birth_provincename, birth_city, birth_cityname, birth_area, birth_areaname, registered_province, registered_provincename, registered_city, registered_cityname, registered_area, registered_areaname, addr_province, addr_provincename, addr_city, addr_cityname, addr_area, addr_areaname, addr_detail, ever_school, learn_english, source, status, enter_date, out_date, first_language, seconder_language, other_language, createuserid, create_time from by_child + select c.id, c.schoolid, c.classid, c.name, c.en_name, c.infant_name, c.phone, c.xb, c.mz, c.zjhm, c.csrq, c.birth_province, c.birth_provincename, c.birth_city, c.birth_cityname, c.birth_area, c.birth_areaname, c.registered_province, c.registered_provincename, c.registered_city, c.registered_cityname, c.registered_area, c.registered_areaname, c.addr_province, c.addr_provincename, c.addr_city, c.addr_cityname, c.addr_area, c.addr_areaname, c.addr_detail, c.ever_school, c.learn_english, c.source, c.status, c.enter_date, c.out_date, c.first_language, c.seconder_language, c.other_language, c.createuserid, c.create_time, p.fathername, p.mothername + from by_child c + left join by_child_contactpeople p on c.id=p.childid