家长维护幼儿信息
This commit is contained in:
@ -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
|
||||
})
|
||||
}
|
@ -88,6 +88,17 @@
|
||||
v-hasPermi="['benyi:child:edit']"
|
||||
>调班</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-tooltip effect="dark" content="点我,可以复制链接发送给所有家长补填幼儿信息呦" placement="top-start">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-document-copy"
|
||||
size="mini"
|
||||
@click="copy($event,inviteCode)"
|
||||
v-hasPermi="['benyi:child:add']"
|
||||
>家长填报链接</el-button>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="childList" @selection-change="handleSelectionChange">
|
||||
@ -289,12 +300,12 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="第一语言" prop="firstLanguage">
|
||||
<el-input v-model="form.firstLanguage" placeholder="请输入第一语言" />
|
||||
<el-input v-model="form.firstLanguage" placeholder="请输入第一语言" maxlength="2"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="第二语言" prop="seconderLanguage">
|
||||
<el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" />
|
||||
<el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" maxlength="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="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);
|
||||
|
@ -17,8 +17,11 @@
|
||||
<div class="result-form">
|
||||
<p class="form-title">提交核对幼儿信息</p>
|
||||
<el-form class="form" ref="form" :model="form" label-width="110px">
|
||||
<el-form-item label="家长姓名" prop="jzxm">
|
||||
<el-input v-model="form.jzxm" placeholder="请输入家长姓名" />
|
||||
<el-form-item label="父亲姓名" prop="father">
|
||||
<el-input v-model="form.father" placeholder="请输入父亲姓名" @input="onInput()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="母亲姓名" prop="mother">
|
||||
<el-input v-model="form.mother" placeholder="请输入母亲姓名" @input="onInput()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="家长联系方式" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入联系方式" :disabled="hide" />
|
||||
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user