添加学生评教结果功能

This commit is contained in:
yangjun 2025-01-13 14:03:30 +08:00
parent 378695b19a
commit eff2fd913e
10 changed files with 1414 additions and 12 deletions

View File

@ -29,20 +29,49 @@
const chartRef = ref<HTMLDivElement | null>(null);
const { setOptions, echarts } = useECharts(chartRef as Ref<HTMLDivElement>);
const option = reactive({
title: {
text: '基础雷达图',
},
// title: {
// text: '',
// },
legend: {
data: ['文综', '理综'],
// data: ['', ''],
},
// tooltip: {
// trigger: 'item',
// },
radar: {
name: {
// start
formatter: function(text){
var strlength = text.length;
if(strlength % 9 != 0){
text = text.replace(/\S{9}/g,function(match){
console.log(match);
return match + '\n'
})
}else{
text = text.replace(/\S{9}/g,function(match){
console.log(match);
return match + '\n'
});
strlength = text.length;
text = text.substring(0,strlength - 1);
}
return text
}
// end
},
indicator: [
{ name: '历史', max: 100 },
{ name: '地理', max: 110 },
{ name: '生物', max: 120 },
{ name: '化学', max: 130 },
{ name: '物理', max: 140 },
{ name: '政治', max: 150 },
{ value: 9.9, name: '重视学生的成长引领,关心学生的学习需求,乐于与学生交流', max: 10 },
{ value: 9.9, name: '上课准备充分。课堂教学秩序良好。作业布置合理,反馈及时', max: 10 },
{ value: 9.9, name: '教学目标明确,重点突出,逻辑性强', max: 10 },
{ value: 9.9, name: '教学内容清晰易懂,体现适当的深度、广度和前沿性', max: 10 },
{ value: 9.9, name: '教学方法合理。教学媒体得当,课程资源丰富', max: 10 },
{ value: 9.9, name: '教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力', max: 10 },
{ value: 9.9, name: '教学语言规范、准确,情绪饱满,热忱投入,为人师表', max: 10 },
{ value: 9.9, name: '教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索', max: 10 },
{ value: 9.9, name: '掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题', max: 10 },
{ value: 9.9, name: '体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值', max: 10 },
],
},
series: [
@ -50,7 +79,7 @@
type: 'radar',
data: [
{
value: [82, 70, 60, 55, 90, 66],
value: [10,10,10,10,10,10,10,10,10,10,],
name: '文综',
},
],
@ -83,11 +112,13 @@
let obj = { name: type };
let chartArr = props.chartData.filter((item) => type === item.type);
obj['value'] = chartArr.map((item) => item.value);
obj['label'] = {show: true,}
//data
data.push(obj);
});
option.radar.indicator = indicator;
option.series[0]['data'] = data;
console.log("🚀 ~ initCharts ~ option:", option)
setOptions(option);
}
return { chartRef };

View File

@ -0,0 +1,227 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="24" style="text-align: center">
<div style="font-size: 20px;font-weight: bold;">{{formData.kcmc}}</div>
<div style="line-height: 40px;">
<span>{{formData.jsbh}} - </span>
<span>{{formData.jsxm}} - </span>
<span>{{formData.jsyx}} - </span>
<span>{{formData.xqxn}}</span>
</div>
</a-col>
<a-col :span="12" style="margin-top: 10px;">
<a-card >
<template #cover>
<span style="font-size: 16px;font-weight: bold;margin: 30px 0 0 30px;">评价指标平均分</span>
</template>
<a-row>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />重视学生的成长引领关心学生的学习需求乐于与学生交流:{{formData.col1}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />上课准备充分课堂教学秩序良好作业布置合理反馈及时:{{formData.col2}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />教学目标明确重点突出逻辑性强:{{formData.col3}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />教学内容清晰易懂体现适当的深度广度和前沿性:{{formData.col4}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />教学方法合理教学媒体得当课程资源丰富:{{formData.col5}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />教师知识渊博教学水平高教学特色鲜明教学有吸引力:{{formData.col6}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />教学语言规范准确情绪饱满热忱投入为人师表:{{formData.col7}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />教学中启发学生思考引导自主学习激发学习动力鼓励创新探索:{{formData.col8}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />掌握了所学课程的基础知识和基本理论能用所学知识解决实际问题:{{formData.col9}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />体会到本门课程学习的乐趣和挑战理解课程内容的意义与价值:{{formData.col10}}</span></a-col>
<a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />优点或建议:{{formData.col11}}</span></a-col>
</a-row>
</a-card>
</a-col>
<a-col :span="12" style="margin-top: 10px;">
<a-card >
<template #cover>
<span style="font-size: 16px;font-weight: bold;margin: 30px 0 0 30px;">雷达图</span>
</template>
<a-row>
<a-col :span="24">
<Radar :chartData="radarData" height="50vh"></Radar>
</a-col>
</a-row>
</a-card>
</a-col>
</a-row>
</a-form>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../KcXsktjxmydcp.api';
import { Form } from 'ant-design-vue';
import { Icon } from '/@/components/Icon';
import Radar from '/@/components/chart/Radar.vue';
const radarData = ref<any>([]);
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
kktzdh: '',
kcbh: '',
kcmc: '',
jgh: '',
skjs: '',
kkdw: '',
sxxs: '',
sjxs: '',
jzxs: '',
jkxs: '',
xsrs: '',
ybzs: '',
cpl: '',
yxs: '',
zhpj: '',
col1: '',
col2: '',
col3: '',
col4: '',
col5: '',
col6: '',
col7: '',
col8: '',
col9: '',
col10: '',
xnxq: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 4 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
//
Object.assign(formData, record);
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col1}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col2}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col3}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />广沿:{{formData.col4}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col5}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col6}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col7}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col8}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col9}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col10}}</span></a-col>
// <a-col :span="24"><span class="pjzbClass"><Icon icon="ant-design:caret-right-outlined" />:{{formData.col11}}</span></a-col>
radarData.value = [
{ value: formData.col1, name: '重视学生的成长引领,关心学生的学习需求,乐于与学生交流', max: 10 },
{ value: formData.col2, name: '上课准备充分。课堂教学秩序良好。作业布置合理,反馈及时', max: 10 },
{ value: formData.col3, name: '教学目标明确,重点突出,逻辑性强', max: 10 },
{ value: formData.col4, name: '教学内容清晰易懂,体现适当的深度、广度和前沿性', max: 10 },
{ value: formData.col5, name: '教学方法合理。教学媒体得当,课程资源丰富', max: 10 },
{ value: formData.col6, name: '教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力', max: 10 },
{ value: formData.col7, name: '教学语言规范、准确,情绪饱满,热忱投入,为人师表', max: 10 },
{ value: formData.col8, name: '教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索', max: 10 },
{ value: formData.col9, name: '掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题', max: 10 },
{ value: formData.col10, name: '体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值', max: 10 },
];
});
}
/**
* 提交数据
*/
async function submitForm() {
//
await validate();
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}
.xsxxClass{
font-size: 16px;
line-height: 40px;
}
.pjzbClass{
font-size: 16px;
line-height: 40px;
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<KcXsktjxmydcpDetailForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcXsktjxmydcpDetailForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcXsktjxmydcpDetailForm from './KcXsktjxmydcpDetail2Form.vue'
const title = ref<string>('');
const width = ref<string>('80%');
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -0,0 +1,184 @@
<template>
<div style="width:100%;text-align: right;line-height:40px;">
<a style="padding-right: 0.5rem;" @click="init()">刷新</a>
<!-- <RouterLink to="/site/xspjjgore">查看更多</RouterLink> -->
</div>
<a-list item-layout="horizontal" :data-source="list" :grid="{ gutter: 16, xs: 2, sm: 4, md: 4, lg: 4, xl: 4, xxl: 4, xxxl: 4 }">
<template #renderItem="{ item }">
<a-list-item>
<div style="border: 2px #eef1f2 solid;">
<div>
<div style="width: 100%;height: 20px;background-color: #1c84c6;"></div>
<div style="width:100%;white-space:normal; word-break:break-all;overflow:hidden;padding: 10px;height: 70px;font-weight: 600;font-size: 16px;">
{{ item.kcmc }}
</div>
</div>
<a-divider style="margin: 0px;color: #eef1f2;" />
<div style="padding: 20px;font-weight: 600;">
<a-row>
<a-col :span="15">
<div style="height: 38px;font-size: 16px;font-weight: 700;">{{ item.skjs }}</div>
<div style="font-size: 14px;font-weight: 700;height: 50px;">{{ item.kkyx }}</div>
</a-col>
<a-col :span="9" style="text-align: center;height: 70px;background-color: #e2e2e2;border-radius: 5px;">
<div style="color: #1c84c6;font-size: 20px;font-weight: 600;margin-top: 10px;">{{ item.cpl }}</div>
<div style="font-size: 14px;font-weight: 700;">参评率</div>
</a-col>
<a-col :span="24" style="margin-top:0px;font-weight: 700;">
<div>平均分汇总{{ item.pjfhz }}</div>
<div> {{ item.cpl }}</div>
<!-- <div> {{ item.yxs }}</div> -->
<div>学期学年 {{ item.xqxn }}</div>
</a-col>
<a-col :span="24">
<a-row style="text-align: center;">
<a-col :span="24">
<a-button type="primary" class="bcClass" @click="openJspjPage(item)" >详情</a-button>
</a-col>
</a-row>
</a-col>
</a-row>
</div>
</div>
</a-list-item>
</template>
</a-list>
<a-pagination v-model="current" :total="total" show-less-items @change="handlePageChange" v-if="props.flagPage" style="text-align: right;" :hideOnSinglePage="true"/>
<KcXsktjxmydcpDetailModal ref="KcXsktjxmydcpDetailModalPage"/>
</template>
<script setup lang="ts">
import { ref, onMounted, watch } from 'vue';
import { TeamOutlined, FormOutlined } from '@ant-design/icons-vue';
import { Pagination } from 'ant-design-vue';
import { getUserId, getSysConfig } from '/@/views/site/utils/index';
import KcXsktjxmydcpDetailModal from '/@/views/kc/kcXsktjxmydcp/components/KcXsktjxmydcpDetail2Modal.vue';
import { defHttp } from '/@/utils/http/axios';
enum Api {
list = '/pjxxJszbpjf/pjxxJszbpjf/listIndex'
}
const KcXsktjxmydcpDetailModalPage = ref();
const current = ref<number>(0);
const total = ref<number>(2);
const loadingList = ref<boolean>(false);
const APagination = Pagination;
const emit = defineEmits(['changeParam']);
const props = defineProps({
queryParam: { type: Object, default: () => ({}) },
flagPage: { type:Boolean,default:false}
});
/**
* 列表接口
* @param params
*/
const listApi = (params) => defHttp.get({ url: Api.list, params });
const list = ref<any>([]);
onMounted(() => {
init();
});
watch(
() => props.queryParam,
(v) => init(),
{
deep:true,
immediate:true,
}
);
function init() {
console.log('init');
loadingList.value = true
listApi({ jsbh: getUserId(), ...props.queryParam }).then(res => {
list.value = res?.records ?? [];
total.value = res.total;
current.value = res.current;
list.value = res.records
loadingList.value = false
});
}
function handlePageChange(record){
emit('changeParam',record);
// loadData();
}
/**
* 转换时间由0012转成00:12
* @param time 四个字符时分无分隔
*/
function formatTime(time: string) {
if(!time) return '';
let t_i_m_e = time.split('');
return [t_i_m_e[0],t_i_m_e[1],':',t_i_m_e[2],t_i_m_e[3]].join('');
}
function onSearch() {
init();
}
//
function openJspjPage(item) {
KcXsktjxmydcpDetailModalPage.value.disableSubmit = true;
KcXsktjxmydcpDetailModalPage.value.edit(item)
}
defineExpose({
onSearch
});
</script>
<style lang="less" scoped>
.wenZiJuZhong {
text-align: center;
}
.wenZiJiaCu {
font-weight: 700;
}
.fs1d1r {
font-size: 16px;
min-height: 55.281px;
}
.hand {
cursor:pointer;
}
.dateAndTime {
padding-top: 10px;
}
.yyyClass{
background: #6cafda;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
}
.yyClass{
background-color: #1c84c6;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
}
.bcClass{
background-color: #1c84c6;font-weight: 600;border-radius: 5px;line-height: 23px;
}
.itemDate {
border-radius: 25px;
background: #cccccc8c;
width: 90%;
margin-bottom: 0.5rem;
text-align: center;
margin: 0 auto .5rem;
padding: 0.5rem;
font-weight: 700;
font-size: 16px;
}
</style>

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/pjxxJszbpjf/pjxxJszbpjf/list',
save='/pjxxJszbpjf/pjxxJszbpjf/add',
edit='/pjxxJszbpjf/pjxxJszbpjf/edit',
deleteOne = '/pjxxJszbpjf/pjxxJszbpjf/delete',
deleteBatch = '/pjxxJszbpjf/pjxxJszbpjf/deleteBatch',
importExcel = '/pjxxJszbpjf/pjxxJszbpjf/importExcel',
exportXls = '/pjxxJszbpjf/pjxxJszbpjf/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,232 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '教师编号',
align: "center",
dataIndex: 'jsbh'
},
{
title: '教师姓名',
align: "center",
dataIndex: 'jsxm'
},
{
title: '教师职称',
align: "center",
dataIndex: 'jszc'
},
{
title: '教师院系',
align: "center",
dataIndex: 'jsyx'
},
{
title: '开课院系',
align: "center",
dataIndex: 'kkyx'
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
},
{
title: '开课编号',
align: "center",
dataIndex: 'kkbh'
},
{
title: '参评率',
align: "center",
dataIndex: 'cpl'
},
{
title: '平均分汇总',
align: "center",
dataIndex: 'pjfhz'
},
{
title: '重视学生的成长引领,关心学生的学习需求,乐于与学生交流',
align: "center",
dataIndex: 'col1'
},
{
title: '上课准备充分,课堂教学秩序良好。作业布置合理,反馈及时',
align: "center",
dataIndex: 'col2'
},
{
title: '教学目标明确,重点突出,逻辑性强',
align: "center",
dataIndex: 'col3'
},
{
title: '教学内容清晰易懂,体现适当的深度、广度和前沿性',
align: "center",
dataIndex: 'col4'
},
{
title: '教学方法合理,教学媒体得当,课程资源丰富',
align: "center",
dataIndex: 'col5'
},
{
title: '教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力',
align: "center",
dataIndex: 'col6'
},
{
title: '教学语言规范、准确,情绪饱满,热忱投入,为人师表',
align: "center",
dataIndex: 'col7'
},
{
title: '教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索',
align: "center",
dataIndex: 'col8'
},
{
title: '掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题',
align: "center",
dataIndex: 'col9'
},
{
title: '体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值',
align: "center",
dataIndex: 'col10'
},
{
title: '优点或建议',
align: "center",
dataIndex: 'col11'
},
{
title: '学期学年',
align: "center",
dataIndex: 'xqxn'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '教师编号',
field: 'jsbh',
component: 'Input',
},
{
label: '教师姓名',
field: 'jsxm',
component: 'Input',
},
{
label: '教师职称',
field: 'jszc',
component: 'Input',
},
{
label: '教师院系',
field: 'jsyx',
component: 'Input',
},
{
label: '开课院系',
field: 'kkyx',
component: 'Input',
},
{
label: '课程名称',
field: 'kcmc',
component: 'Input',
},
{
label: '开课编号',
field: 'kkbh',
component: 'Input',
},
{
label: '参评率',
field: 'cpl',
component: 'Input',
},
{
label: '平均分汇总',
field: 'pjfhz',
component: 'Input',
},
{
label: '重视学生的成长引领,关心学生的学习需求,乐于与学生交流',
field: 'col1',
component: 'Input',
},
{
label: '上课准备充分,课堂教学秩序良好。作业布置合理,反馈及时',
field: 'col2',
component: 'Input',
},
{
label: '教学目标明确,重点突出,逻辑性强',
field: 'col3',
component: 'Input',
},
{
label: '教学内容清晰易懂,体现适当的深度、广度和前沿性',
field: 'col4',
component: 'Input',
},
{
label: '教学方法合理,教学媒体得当,课程资源丰富',
field: 'col5',
component: 'Input',
},
{
label: '教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力',
field: 'col6',
component: 'Input',
},
{
label: '教学语言规范、准确,情绪饱满,热忱投入,为人师表',
field: 'col7',
component: 'Input',
},
{
label: '教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索',
field: 'col8',
component: 'Input',
},
{
label: '掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题',
field: 'col9',
component: 'Input',
},
{
label: '体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值',
field: 'col10',
component: 'Input',
},
{
label: '优点或建议',
field: 'col11',
component: 'InputTextArea',
},
{
label: '学期学年',
field: 'xqxn',
component: 'Input',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,255 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="8">
<a-form-item label="教师姓名">
<j-input placeholder="请填写教师姓名" v-model:value="queryParam.jsxm" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="课程名称">
<j-input placeholder="请填写课程名称" v-model:value="queryParam.kcmc" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="开课单位">
<JDictSelectTag placeholder="请选择开课单位" v-model:value="queryParam.jsyx" :dictCode="`kc_kkdw_view,kkdw,kkdw`"/>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="开课单位">
<JDictSelectTag placeholder="请选择开课单位" v-model:value="queryParam.xqxn" :dictCode="`kc_xqxn_history,title,title`"/>
</a-form-item>
</a-col>
<a-col :lg="8">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown> -->
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>-->
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<PjxxJszbpjfModal ref="registerModal" @success="handleSuccess"></PjxxJszbpjfModal>
</div>
</template>
<script lang="ts" name="pjxxJszbpjf-pjxxJszbpjf" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './PjxxJszbpjf.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './PjxxJszbpjf.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import PjxxJszbpjfModal from './components/PjxxJszbpjfModal.vue'
import { JInput } from '/@/components/Form';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '学生评教结果',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: "学生评教结果",
url: getExportUrl,
params: () => {
let params:any = {};
return Object.assign(params,queryParam.value);
}
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
// {
// label: '',
// onClick: handleEdit.bind(null, record),
// },
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -0,0 +1,247 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="24">
<a-form-item label="教师编号" v-bind="validateInfos.jsbh">
<a-input v-model:value="formData.jsbh" placeholder="请输入教师编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教师姓名" v-bind="validateInfos.jsxm">
<a-input v-model:value="formData.jsxm" placeholder="请输入教师姓名" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教师职称" v-bind="validateInfos.jszc">
<a-input v-model:value="formData.jszc" placeholder="请输入教师职称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教师院系" v-bind="validateInfos.jsyx">
<a-input v-model:value="formData.jsyx" placeholder="请输入教师院系" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课院系" v-bind="validateInfos.kkyx">
<a-input v-model:value="formData.kkyx" placeholder="请输入开课院系" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程名称" v-bind="validateInfos.kcmc">
<a-input v-model:value="formData.kcmc" placeholder="请输入课程名称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课编号" v-bind="validateInfos.kkbh">
<a-input v-model:value="formData.kkbh" placeholder="请输入开课编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="参评率" v-bind="validateInfos.cpl">
<a-input v-model:value="formData.cpl" placeholder="请输入参评率" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="平均分汇总" v-bind="validateInfos.pjfhz">
<a-input v-model:value="formData.pjfhz" placeholder="请输入平均分汇总" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="重视学生的成长引领,关心学生的学习需求,乐于与学生交流" v-bind="validateInfos.col1">
<a-input v-model:value="formData.col1" placeholder="请输入重视学生的成长引领,关心学生的学习需求,乐于与学生交流" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="上课准备充分,课堂教学秩序良好。作业布置合理,反馈及时" v-bind="validateInfos.col2">
<a-input v-model:value="formData.col2" placeholder="请输入上课准备充分,课堂教学秩序良好。作业布置合理,反馈及时" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教学目标明确,重点突出,逻辑性强" v-bind="validateInfos.col3">
<a-input v-model:value="formData.col3" placeholder="请输入教学目标明确,重点突出,逻辑性强" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教学内容清晰易懂,体现适当的深度、广度和前沿性" v-bind="validateInfos.col4">
<a-input v-model:value="formData.col4" placeholder="请输入教学内容清晰易懂,体现适当的深度、广度和前沿性" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教学方法合理,教学媒体得当,课程资源丰富" v-bind="validateInfos.col5">
<a-input v-model:value="formData.col5" placeholder="请输入教学方法合理,教学媒体得当,课程资源丰富" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力" v-bind="validateInfos.col6">
<a-input v-model:value="formData.col6" placeholder="请输入教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教学语言规范、准确,情绪饱满,热忱投入,为人师表" v-bind="validateInfos.col7">
<a-input v-model:value="formData.col7" placeholder="请输入教学语言规范、准确,情绪饱满,热忱投入,为人师表" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索" v-bind="validateInfos.col8">
<a-input v-model:value="formData.col8" placeholder="请输入教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题" v-bind="validateInfos.col9">
<a-input v-model:value="formData.col9" placeholder="请输入掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值" v-bind="validateInfos.col10">
<a-input v-model:value="formData.col10" placeholder="请输入体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="优点或建议" v-bind="validateInfos.col11">
<a-textarea v-model:value="formData.col11" rows="4" placeholder="请输入优点或建议" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学期学年" v-bind="validateInfos.xqxn">
<a-input v-model:value="formData.xqxn" placeholder="请输入学期学年" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../PjxxJszbpjf.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: ()=>{} },
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
jsbh: '',
jsxm: '',
jszc: '',
jsyx: '',
kkyx: '',
kcmc: '',
kkbh: '',
cpl: '',
pjfhz: '',
col1: '',
col2: '',
col3: '',
col4: '',
col5: '',
col6: '',
col7: '',
col8: '',
col9: '',
col10: '',
col11: '',
xqxn: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {
};
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
//
Object.assign(formData, record);
});
}
/**
* 提交数据
*/
async function submitForm() {
//
await validate();
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
min-height: 500px !important;
overflow-y: auto;
padding: 24px 24px 24px 24px;
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<PjxxJszbpjfForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></PjxxJszbpjfForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import PjxxJszbpjfForm from './PjxxJszbpjfForm.vue'
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -10,8 +10,11 @@
</div>
<list :queryParam="{ pageSize: 4, ...tkzjParam }" style="max-height: 106px;"/>
</a-tab-pane>
<a-tab-pane key="2" tab="学生评教结果">
<!-- <a-tab-pane key="2" tab="学生评教结果">
<studentPjjgList :queryParam="{ pageSize: 4, ...tkzjParam }" style="max-height: 106px;"/>
</a-tab-pane> -->
<a-tab-pane key="3" tab="学生评教结果">
<JszbpjfList :queryParam="{ pageSize: 4, ...tkzjParam }" style="max-height: 106px;"/>
</a-tab-pane>
</a-tabs>
</a-card>
@ -22,6 +25,7 @@
import { ref } from 'vue';
import list from '/@/views/site/pjjgPage/list.vue';
import studentPjjgList from '/@/views/site/pjjgPage/studentPjjgList.vue';
import JszbpjfList from '/@/views/kc/pjxxJszbpjf/JszbpjfList.vue';
import { nextTick } from 'vue';
const tkzjParam = ref({});