课程新增字段

dev_2307
Gitea 1 year ago
parent a859f0129a
commit d60c080ebc
  1. 34
      ant-design-vue-jeecg/src/views/course/AddCourse.vue
  2. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/controller/SeCourseController.java

@ -256,7 +256,7 @@
<a-form-item label="教研室" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="教研室" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart <j-select-depart
userSelect="teachingandoffice" userSelect="teachingandoffice"
v-decorator="['teachingandoffice', { initialValue: '711ca4920cfc4d61923d87ae3b1cfa8c' }]" v-model="model.teachingandoffice"
/> />
<!-- <j-select-depart <!-- <j-select-depart
userSelect="teachingandoffice" userSelect="teachingandoffice"
@ -270,6 +270,7 @@
<a-col :span="8"> <a-col :span="8">
<a-form-item label="审定人" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="审定人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep <j-select-user-by-dep
:multi="fs"
:value="model.verifier" :value="model.verifier"
userSelect="verifier" userSelect="verifier"
v-model="model.verifier" v-model="model.verifier"
@ -403,7 +404,7 @@
</template> </template>
<script> <script>
import { httpAction } from '@/api/manage' import { httpAction,getAction } from '@/api/manage'
//import { JeecgListMixin } from './JeecgListMixin.js' //import { JeecgListMixin } from './JeecgListMixin.js'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import JTreeSelect from '@/components/jeecg/JTreeSelect' import JTreeSelect from '@/components/jeecg/JTreeSelect'
@ -444,10 +445,10 @@ export default {
category: 1, category: 1,
cooperativeEducation: 0, cooperativeEducation: 0,
semester: '1', semester: '1',
depid: '711ca4920cfc4d61923d87ae3b1cfa8c', depid: '',
majorid: '1296639081827090434', majorid: '',
verifier: 'mladmin' verifier: '',
teachingandoffice:''
}, },
// //
@ -487,6 +488,7 @@ export default {
url: { url: {
add: '/course/seCourse/add', add: '/course/seCourse/add',
edit: '/course/seCourse/edit', edit: '/course/seCourse/edit',
dqyh: '/course/seCourse/dqyh',
}, },
// //
validatorRules: { validatorRules: {
@ -623,11 +625,11 @@ export default {
// ], // ],
// trigger: 'blur', // trigger: 'blur',
// }, // },
name: {//namev-decorator name: {//namev-decorator
// initialValue: "",// // initialValue: "",//
rules: [{ required: true, message: '不能为空!' },// rules: [{ required: true, message: '不能为空!' },//
// { validator: (rule, value, callback) => validateDuplicateValue('em_project_info', 'project_name', value, this.model.id, callback) },// // { validator: (rule, value, callback) => validateDuplicateValue('em_project_info', 'project_name', value, this.model.id, callback) },//
// { pattern: /^1[3456789]\d{9}$/, message: '!' },// // { pattern: /^1[3456789]\d{9}$/, message: '!' },//
{ {
// pattern: /^(([1]?\\d)|20)$/, // pattern: /^(([1]?\\d)|20)$/,
pattern: /^[^\\]{0,100}$/, pattern: /^[^\\]{0,100}$/,
@ -638,6 +640,16 @@ export default {
} }
}, },
created () { created () {
getAction(this.url.dqyh).then((res) => {
if (res.success) {
this.model.depid = res.result.depid;
this.model.teachingandoffice = res.result.teachingandoffice;
this.model.majorid = res.result.majorid;
this.model.verifier = res.result.verifier;
} else {
}
});
let that = this let that = this
that.$bus.$on('headleUser', ({ restle, userSelect }) => { that.$bus.$on('headleUser', ({ restle, userSelect }) => {
if (restle && userSelect) that.$set(that.selectContent, userSelect, restle) if (restle && userSelect) that.$set(that.selectContent, userSelect, restle)

@ -48,7 +48,10 @@ import org.jeecg.modules.py.entity.PyGraRequire;
import org.jeecg.modules.py.service.BasicInfoService; import org.jeecg.modules.py.service.BasicInfoService;
import org.jeecg.modules.py.service.IPyGraRequireService; import org.jeecg.modules.py.service.IPyGraRequireService;
import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserDepartService;
import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.teacherManage.entity.SeTeacherManage;
import org.jeecg.modules.teacherManage.service.ISeTeacherManageService;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.def.TemplateWordConstants; import org.jeecgframework.poi.excel.def.TemplateWordConstants;
@ -132,6 +135,9 @@ public class SeCourseController extends JeecgController<SeCourse, ISeCourseServi
@Autowired @Autowired
private BasicInfoService basicInfoService; private BasicInfoService basicInfoService;
@Autowired
private ISeTeacherManageService seTeacherManageService;
@Value("${jeecg.wordPath}") @Value("${jeecg.wordPath}")
private String wordPath; private String wordPath;
@ -497,12 +503,29 @@ public class SeCourseController extends JeecgController<SeCourse, ISeCourseServi
return Result.OK(sc); return Result.OK(sc);
} }
@AutoLog(value = "当前登录用户信息")
@ApiOperation(value = "当前登录用户信息", notes = "当前登录用户信息")
@GetMapping(value = "/dqyh")
public Result<?> dqyh(HttpServletRequest req) {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Map<String,String> map = new HashMap<>();
SeTeacherManage seTeacherManage = new SeTeacherManage();
QueryWrapper<SeTeacherManage> queryWrapper = QueryGenerator.initQueryWrapper(seTeacherManage, req.getParameterMap());
queryWrapper.eq("userid",user.getId());
List<SeTeacherManage> list = seTeacherManageService.list(queryWrapper);
map.put("depid",user.getDepartIds());
map.put("teachingandoffice",user.getDepartIds());
map.put("majorid",list.get(0).getProfession());
map.put("verifier",user.getUsername());
return Result.OK(map);
}
@AutoLog(value = "考核目标-分页列表查询") @AutoLog(value = "考核目标-分页列表查询")
@ApiOperation(value = "考核目标-分页列表查询", notes = "考核目标-分页列表查询") @ApiOperation(value = "考核目标-分页列表查询", notes = "考核目标-分页列表查询")
@GetMapping(value = "/getnrxz") @GetMapping(value = "/getnrxz")
public Result<?> getnrxz(@RequestParam(name = "id", required = true)String id) { public Result<?> getnrxz(@RequestParam(name = "id", required = true)String id) {
SeCourse sc = seCourseService.getById(id); SeCourse sc = seCourseService.getById(id);
return Result.ok(sc); return Result.OK(sc);
} }

Loading…
Cancel
Save