课程目标绑定毕业要求

dev_2307
Gitea 1 year ago
parent db893a0772
commit 10aac03ce3
  1. 21
      ant-design-vue-jeecg/src/views/py/PyBasicCourseList.vue
  2. 176
      ant-design-vue-jeecg/src/views/py/SeCourseobjectivesTypeList.vue
  3. 171
      ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeForm.vue
  4. 60
      ant-design-vue-jeecg/src/views/py/modules/SeCourseobjectivesTypeModal.vue
  5. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/course/entity/SeCourseobjectives.java
  6. 59
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/controller/PyBasicCourseController.java
  7. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/py/entity/PyGraRequire.java

@ -54,6 +54,8 @@
> >
<!--删除--> <!--删除-->
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="byyq(record)" >设置毕业要求</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
@ -89,6 +91,11 @@ export default {
}, },
data() { data() {
return { return {
tokenid: {
basicId:'',
courseId:'',
courseobjectivesId:'',
},
description: '培养方案设置课程', description: '培养方案设置课程',
visible: false, visible: false,
basicId: '', basicId: '',
@ -216,7 +223,6 @@ export default {
dataIndex: 'action', dataIndex: 'action',
align: 'center', align: 'center',
fixed: 'right', fixed: 'right',
width: 50,
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
}, },
], ],
@ -252,6 +258,19 @@ export default {
}, },
}, },
methods: { methods: {
byyq(record){
console.log(record)
this.tokenid = {
basicId: record.basicId,
courseId: record.courseId,
courseobjectivesId:'',
};
//basicId,courseId
this.$router.push({
path: '/py/SeCourseobjectivesTypeList',
query: this.tokenid
})
},
// //
getMajor1() { getMajor1() {
this.dicode1 = "se_major,name,id,dep='" + this.queryParam.depid + "'" this.dicode1 = "se_major,name,id,dep='" + this.queryParam.depid + "'"

@ -0,0 +1,176 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="类型名称">
<a-input placeholder="请输入类型名称" v-model="queryParam.name"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>-->
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!-- <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('课程目标类型')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
&lt;!&ndash; 高级查询区域 &ndash;&gt;
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>-->
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="bdbyyq(record)">绑定毕业要求</a>
</span>
</a-table>
</div>
<se-courseobjectives-type-modal ref="modalForm" @ok="modalFormOk"></se-courseobjectives-type-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import SeCourseobjectivesTypeModal from './modules/SeCourseobjectivesTypeModal'
export default {
name: 'SeCourseobjectivesTypeList',
mixins:[JeecgListMixin, mixinDevice],
components: {
SeCourseobjectivesTypeModal
},
data () {
return {
description: '设置毕业要求',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'课程目标',
align:"center",
dataIndex: 'name'
},
{
title:'课程目标类型',
align:"center",
dataIndex: 'sctype_dictText'
},
{
title:'毕业要求',
align:"center",
dataIndex: 'temp'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/py/pyBasicCourse/queryCourseobjectivesList?courseId="+this.$route.query.courseId,
},
dictOptions:{},
superFieldList:[],
}
},
created() {
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
bdbyyq(record){
console.log(record);
console.log(this.$route.query.basicId);
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "绑定毕业要求";
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,171 @@
<template>
<a-spin :spinning="confirmLoading">
<!-- <j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入类型名称" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>-->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
class="j-table-force-nowrap"
:scroll="{ x: true }"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:radio}"
@change="handleTableChange"
>
</a-table>
</div>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import JSelectDepart from "@comp/jeecgbiz/JSelectDepart";
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
export default {
name: 'SeCourseobjectivesTypeForm',
mixins: [JeecgListMixin, mixinDevice],
components: {
JDictSelectTag,
JSelectDepart,
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
radio:'radio',
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
selectedRowKeys: [],
selectionRows: [],
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '毕业要求',
align: 'center',
customCell: () => {
return {
style: {
'max-width': '80px',
'white-space': 'normal',
},
}
},
dataIndex: 'graduateRequire',
},
],
ipagination: {
current: 1,
pageSize: 50,
pageSizeOptions: ['10', '20', '50'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
showQuickJumper: true,
showSizeChanger: true,
total: 0,
},
validatorRules: {
},
url: {
list: "/py/pyBasicCourse/queryPyGraRequireList?basicId="+this.$route.query.basicId,
szbyyq:"/py/pyBasicCourse/szbyyq",
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
//this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
onSelectChange(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
onClearSelected2() {
this.selectedRowKeys = []
this.selectionRows = []
},
popupCallback(value, row) {
this.model = Object.assign(this.model, row);
},
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.$route.query.courseobjectivesId = record.id;
},
submitForm () {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!')
return
} else {
var ids = ''
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a];
}
}
console.log(ids);
console.log(this.$route.query.courseobjectivesId)
getAction(this.url.szbyyq, {"id": ids,"courseobjectivesId":this.$route.query.courseobjectivesId}).then((res) => {
if (res.success) {
this.$message.success("绑定成功");
this.$emit('ok');
} else {
this.$message.error(res.message);
}
});
},
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<se-courseobjectives-type-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></se-courseobjectives-type-form>
</j-modal>
</template>
<script>
import SeCourseobjectivesTypeForm from './SeCourseobjectivesTypeForm'
export default {
name: 'SeCourseobjectivesTypeModal',
components: {
SeCourseobjectivesTypeForm
},
data () {
return {
title:'',
width:1000,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -101,6 +101,7 @@ public class SeCourseobjectives implements Serializable {
/**课程目标类型*/ /**课程目标类型*/
@Excel(name = "课程目标类型", width = 15) @Excel(name = "课程目标类型", width = 15)
@Dict(dicCode = "id", dicText = "name", dictTable = "se_courseobjectives_type")
@ApiModelProperty(value = "课程目标类型") @ApiModelProperty(value = "课程目标类型")
private String sctype; private String sctype;

@ -1,6 +1,7 @@
package org.jeecg.modules.py.controller; package org.jeecg.modules.py.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -11,15 +12,20 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.DictModel; import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.course.entity.SeCourse; import org.jeecg.modules.course.entity.SeCourse;
import org.jeecg.modules.course.entity.SeCourseobjectives;
import org.jeecg.modules.course.service.ISeCourseService; import org.jeecg.modules.course.service.ISeCourseService;
import org.jeecg.modules.course.service.ISeCourseobjectivesService;
import org.jeecg.modules.py.entity.PyBasicCourse; import org.jeecg.modules.py.entity.PyBasicCourse;
import org.jeecg.modules.py.entity.PyGraRequire;
import org.jeecg.modules.py.entity.vo.TeachPlanVo; import org.jeecg.modules.py.entity.vo.TeachPlanVo;
import org.jeecg.modules.py.service.BasicInfoService; import org.jeecg.modules.py.service.BasicInfoService;
import org.jeecg.modules.py.service.IPyBasicCourseService; import org.jeecg.modules.py.service.IPyBasicCourseService;
import org.jeecg.modules.py.service.IPyCourseConstituteService; import org.jeecg.modules.py.service.IPyCourseConstituteService;
import org.jeecg.modules.py.service.IPyGraRequireService;
import org.jeecg.modules.py.utils.MessageConstant; import org.jeecg.modules.py.utils.MessageConstant;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDictService; import org.jeecg.modules.system.service.ISysDictService;
@ -29,6 +35,7 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.*; import java.util.*;
/** /**
@ -60,6 +67,58 @@ public class PyBasicCourseController extends JeecgController<PyBasicCourse, IPyB
@Autowired @Autowired
private ISysUserService iSysUserService; private ISysUserService iSysUserService;
@Autowired
private ISeCourseobjectivesService seCourseobjectivesService;
@Autowired
private IPyGraRequireService pyGraRequireService;
@AutoLog(value = "查询课程对应的课程目标")
@ApiOperation(value = "查询课程对应的课程目标")
@GetMapping(value = "/queryCourseobjectivesList")
public Result<?> queryCourseobjectivesList(@RequestParam(name = "courseId") String courseId, HttpServletRequest req) {
//筛除掉pid=0的数据
SeCourseobjectives seCourseobjectives = new SeCourseobjectives();
QueryWrapper<SeCourseobjectives> queryWrapper = QueryGenerator.initQueryWrapper(seCourseobjectives, req.getParameterMap());
queryWrapper.eq("courseid",courseId);
queryWrapper.ne("pid",0);
List<SeCourseobjectives> list = seCourseobjectivesService.list(queryWrapper);
IPage<SeCourseobjectives> pageList = new Page<>();
pageList.setRecords(list);
return Result.OK(pageList);
}
@AutoLog(value = "查询培养方案对应的毕业要求")
@ApiOperation(value = "查询培养方案对应的毕业要求")
@GetMapping(value = "/queryPyGraRequireList")
public Result<?> queryPyGraRequireList(@RequestParam(name = "basicId") String basicId, HttpServletRequest req) {
//只要has_child不等于1的数据
PyGraRequire pyGraRequire = new PyGraRequire();
QueryWrapper<PyGraRequire> queryWrapper = QueryGenerator.initQueryWrapper(pyGraRequire, req.getParameterMap());
queryWrapper.eq("basic_id",basicId);
queryWrapper.isNull("has_child");
List<PyGraRequire> list = pyGraRequireService.list(queryWrapper);
return Result.OK(list);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "知识点课程目标-通过id查询")
@ApiOperation(value = "知识点课程目标-通过id查询", notes = "知识点课程目标-通过id查询")
@GetMapping(value = "/szbyyq")
public Result<?> szbyyq(@RequestParam(name = "id", required = true) String id,@RequestParam(name = "courseobjectivesId") String courseobjectivesId) {
PyGraRequire pyGraRequire = pyGraRequireService.getById(id);
SeCourseobjectives seCourseobjectives = seCourseobjectivesService.getById(courseobjectivesId);
seCourseobjectives.setRequireid(pyGraRequire.getId());
seCourseobjectives.setTemp(pyGraRequire.getGraduateRequire());
seCourseobjectivesService.updateById(seCourseobjectives);
return Result.OK("绑定成功");
}
@AutoLog(value = "培养方案管理-设置课程-根据条件培养方案列表") @AutoLog(value = "培养方案管理-设置课程-根据条件培养方案列表")
@ApiOperation(value = "培养方案管理-设置课程-根据条件培养方案列表", notes = "培养方案管理-设置课程-根据条件培养方案列表") @ApiOperation(value = "培养方案管理-设置课程-根据条件培养方案列表", notes = "培养方案管理-设置课程-根据条件培养方案列表")
@GetMapping(value = "/queryBasicInfoList") @GetMapping(value = "/queryBasicInfoList")

@ -3,9 +3,8 @@ package org.jeecg.modules.py.entity;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -51,4 +50,10 @@ public class PyGraRequire implements Serializable {
@Dict(dicCode = "yn") @Dict(dicCode = "yn")
@ApiModelProperty(value = "是否有子节点") @ApiModelProperty(value = "是否有子节点")
private String hasChild; private String hasChild;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
} }

Loading…
Cancel
Save