家长维护页面调优

This commit is contained in:
sk1551 2020-10-28 15:57:22 +08:00
parent c938f79f87
commit b5a602af52
3 changed files with 64 additions and 45 deletions

View File

@ -235,7 +235,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="与幼儿关系" prop="gfgx">
<el-select v-model="form_jhr.gfgx" placeholder="请选择与幼儿关系" >
<el-select v-model="form_jhr.gfgx" placeholder="请选择与幼儿关系" @input="onInput()" >
<el-option
v-for="dict in jtgxOptions"
:key="dict.dictValue"
@ -269,7 +269,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="与幼儿关系" prop="gmgx">
<el-select v-model="form_jhr.gmgx" placeholder="请选择与幼儿关系 ">
<el-select v-model="form_jhr.gmgx" placeholder="请选择与幼儿关系" @input="onInput()">
<el-option
v-for="dict in jtgxOptions"
:key="dict.dictValue"
@ -389,24 +389,24 @@ export default {
created() {
// const sid = this.$route.params && this.$route.params.id;
// this.queryParams.schoolid = sid;
this.getDicts("sys_user_sex").then(response => {
this.sexOptions = response.data;
});
this.getDicts("sys_normal_disable").then(response => {
this.statusOptions = response.data;
});
this.getDicts("sys_dm_mz").then(response => {
this.mzOptions = response.data;
});
this.getDicts("sys_yes_no").then(response => {
this.ynOptions = response.data;
});
this.getDicts("sys_dm_ryqd").then(response => {
this.sourceOptions = response.data;
});
this.getDicts("sys_dm_jtgx").then((response) => {
this.jtgxOptions = response.data;
});
// this.getDicts("sys_user_sex").then(response => {
// this.sexOptions = response.data;
// });
// this.getDicts("sys_normal_disable").then(response => {
// this.statusOptions = response.data;
// });
// this.getDicts("sys_dm_mz").then(response => {
// this.mzOptions = response.data;
// });
// this.getDicts("sys_yes_no").then(response => {
// this.ynOptions = response.data;
// });
// this.getDicts("sys_dm_ryqd").then(response => {
// this.sourceOptions = response.data;
// });
// this.getDicts("sys_dm_jtgx").then((response) => {
// this.jtgxOptions = response.data;
// });
},
components: {
//
@ -417,26 +417,26 @@ export default {
onInput() {
this.$forceUpdate();
},
//
xbFormat(row, column) {
return this.selectDictLabel(this.sexOptions, row.xb);
},
//
mzFormat(row, column) {
return this.selectDictLabel(this.mzOptions, row.mz);
},
//
ynFormat(row, column) {
return this.selectDictLabel(this.ynOptions, row.learnEnglish);
},
//
sourceFormat(row, column) {
return this.selectDictLabel(this.sourceOptions, row.source);
},
//
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
// //
// xbFormat(row, column) {
// return this.selectDictLabel(this.sexOptions, row.xb);
// },
// //
// mzFormat(row, column) {
// return this.selectDictLabel(this.mzOptions, row.mz);
// },
// //
// ynFormat(row, column) {
// return this.selectDictLabel(this.ynOptions, row.learnEnglish);
// },
// //
// sourceFormat(row, column) {
// return this.selectDictLabel(this.sourceOptions, row.source);
// },
// //
// statusFormat(row, column) {
// return this.selectDictLabel(this.statusOptions, row.status);
// },
//
classFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
@ -450,13 +450,19 @@ export default {
});
return actions.join("");
},
/** 查询入班体验申请列表 */
/** 查询幼儿信息 */
getInfo() {
getChild_query(this.queryParams).then(response => {
if (response.code == "200") {
this.hide = true;
this.childList = response.rows;
this.form = response.data;
this.sexOptions = response.sexAll;
this.statusOptions = response.statusAll;
this.mzOptions = response.mzAll;
this.ynOptions = response.ynAll;
this.sourceOptions = response.sourceAll;
this.jtgxOptions = response.jtgxAll;
this.form_jhr.fathername = response.data.byChildContactpeople.fathername;
this.form_jhr.mothername = response.data.byChildContactpeople.mothername;
this.form_jhr.fphone = response.data.byChildContactpeople.fphone;

View File

@ -105,11 +105,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/benyi/experience/add").anonymous()//半日入园体验申请
.antMatchers("/benyi/experience/getInfo**").anonymous()//半日入园体验明细
.antMatchers("/benyi/halfdayplan/getInfo/**").anonymous()//半日入园内容
.antMatchers("/benyi/child/add").anonymous()//家长维护申请
.antMatchers("/benyi/child/getInfo**").anonymous()//家长维护申请明细
.antMatchers("/benyi/child/add").anonymous()//幼儿维护申请
.antMatchers("/benyi/child/edit**").anonymous()//幼儿维护修改
.antMatchers("/benyi/child/getChild_query").anonymous()//幼儿维护申请明细
.antMatchers("/benyi/contactpeople/add").anonymous()//家长维护申请
.antMatchers("/benyi/contactpeople/edit**").anonymous()//家长维护修改
.antMatchers("/benyi/contactpeople/getInfo**").anonymous()//监护人维护明细
.antMatchers("/system/dict/data/dictType/**").anonymous()//家长维护申请中的字典
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()

View File

@ -11,6 +11,7 @@ import com.ruoyi.framework.security.service.TokenService;
import com.ruoyi.project.benyi.domain.ByChildContactpeople;
import com.ruoyi.project.benyi.service.IByChildContactpeopleService;
import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.service.ISysDictDataService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -48,6 +49,8 @@ public class ByChildController extends BaseController {
private TokenService tokenService;
@Autowired
private IByChildContactpeopleService byChildContactpeopleService;
@Autowired
private ISysDictDataService sysDictDataService;
/**
* 查询幼儿信息列表
@ -129,6 +132,8 @@ public class ByChildController extends BaseController {
*/
@GetMapping("/getInfo")
public AjaxResult getInfo_query(ByChild byChild) {
AjaxResult ajax = AjaxResult.success();
if (schoolCommon.isStringEmpty(byChild.getName())) {
return AjaxResult.error("请输入幼儿姓名");
}
@ -140,7 +145,14 @@ public class ByChildController extends BaseController {
if (list == null || list.size() == 0) {
return AjaxResult.error("未找到该幼儿的信息");
}
return AjaxResult.success(list.get(0));
ajax.put(AjaxResult.DATA_TAG, list.get(0));
ajax.put("sexAll", sysDictDataService.selectDictDataByType("sys_user_sex"));
ajax.put("statusAll", sysDictDataService.selectDictDataByType("sys_normal_disable"));
ajax.put("mzAll", sysDictDataService.selectDictDataByType("sys_dm_mz"));
ajax.put("ynAll", sysDictDataService.selectDictDataByType("sys_yes_no"));
ajax.put("sourceAll", sysDictDataService.selectDictDataByType("sys_dm_ryqd"));
ajax.put("jtgxAll", sysDictDataService.selectDictDataByType("sys_dm_jtgx"));
return ajax;
}
/**