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 @@