From b5a602af522cef00b790d52ce225761c7177e6f0 Mon Sep 17 00:00:00 2001 From: sk1551 <15175617877@163.com> Date: Wed, 28 Oct 2020 15:57:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B6=E9=95=BF=E7=BB=B4=E6=8A=A4=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B0=83=E4=BC=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/benyi/child_preserve/index.vue | 88 ++++++++++--------- .../framework/config/SecurityConfig.java | 7 +- .../benyi/controller/ByChildController.java | 14 ++- 3 files changed, 64 insertions(+), 45 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/child_preserve/index.vue b/ruoyi-ui/src/views/benyi/child_preserve/index.vue index c74a2594b..47de43f53 100644 --- a/ruoyi-ui/src/views/benyi/child_preserve/index.vue +++ b/ruoyi-ui/src/views/benyi/child_preserve/index.vue @@ -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; diff --git a/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 10d08c919..411a23e90 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -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() diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java index b6b6eff00..0ca59a223 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java @@ -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; } /**