修改bug

This commit is contained in:
yangjun 2023-05-27 10:45:45 +08:00
parent be7d1dc9ec
commit f38ec347fe
30 changed files with 4948 additions and 7 deletions

View File

@ -78,7 +78,19 @@ export function useMethods() {
createMessage.error(fileInfo.message || `${data.file.name} 导入失败`);
//update-end---author:wangshuai ---date:20221121 for[VUEN-2827]导入无权限,提示图标错误------------
} else {
createMessage.success(fileInfo.message || `${data.file.name} 文件上传成功`);
// createMessage.success(fileInfo.message || `${data.file.name} 文件上传成功`);
// createMessage.success({
// content:`<div>${fileInfo.message}</div>`,
// style: {
// marginTop: '20vh',
// },
// });
createWarningModal({
centered: false,
content: `<div>
<span>${fileInfo.message}</span><br/>
</div>`,
});
}
} catch (error) {
console.log('导入的数据异常', error);

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/kcZzThpjb/kcZzThpjb/list',
save='/kcZzThpjb/kcZzThpjb/add',
edit='/kcZzThpjb/kcZzThpjb/edit',
deleteOne = '/kcZzThpjb/kcZzThpjb/delete',
deleteBatch = '/kcZzThpjb/kcZzThpjb/deleteBatch',
importExcel = '/kcZzThpjb/kcZzThpjb/importExcel',
exportXls = '/kcZzThpjb/kcZzThpjb/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,229 @@
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: 'kcbh'
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
},
{
title: '授课教师',
align: "center",
dataIndex: 'skjs'
},
{
title: '授课时间',
align: "center",
dataIndex: 'sksj',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '上课地点',
align: "center",
dataIndex: 'skdd'
},
{
title: '使用教材',
align: "center",
dataIndex: 'syjc'
},
{
title: '授课对象',
align: "center",
dataIndex: 'skdx'
},
{
title: '授课教授',
align: "center",
dataIndex: 'skjiaoshou'
},
{
title: '教学理解',
align: "center",
dataIndex: 'jxlj'
},
{
title: '教学态度',
align: "center",
dataIndex: 'jxtd'
},
{
title: '教学过程',
align: "center",
dataIndex: 'jxgc'
},
{
title: '教学效果',
align: "center",
dataIndex: 'jxxg'
},
{
title: '教学特殊',
align: "center",
dataIndex: 'jxts'
},
{
title: '总分',
align: "center",
dataIndex: 'zf'
},
{
title: '优点或建议',
align: "center",
dataIndex: 'ydhjy'
},
{
title: '评价时间',
align: "center",
sorter: true,
dataIndex: 'pjsj'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "课程编号",
field: 'kcbh',
component: 'Input',
colProps: {span: 6},
},
{
label: "课程名称",
field: 'kcmc',
component: 'Input',
colProps: {span: 6},
},
{
label: "授课教师",
field: 'skjs',
component: 'Input',
colProps: {span: 6},
},
{
label: "授课时间",
field: 'sksj',
component: 'DatePicker',
colProps: {span: 6},
},
{
label: "上课地点",
field: 'skdd',
component: 'Input',
colProps: {span: 6},
},
{
label: "评价时间",
field: 'pjsj',
component: 'DatePicker',
componentProps: {
showTime: true,
},
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '课程编号',
field: 'kcbh',
component: 'Input',
},
{
label: '课程名称',
field: 'kcmc',
component: 'Input',
},
{
label: '授课教师',
field: 'skjs',
component: 'Input',
},
{
label: '授课时间',
field: 'sksj',
component: 'DatePicker',
},
{
label: '上课地点',
field: 'skdd',
component: 'Input',
},
{
label: '使用教材',
field: 'syjc',
component: 'Input',
},
{
label: '授课对象',
field: 'skdx',
component: 'Input',
},
{
label: '授课教授',
field: 'skjiaoshou',
component: 'Input',
},
{
label: '教学理解',
field: 'jxlj',
component: 'Input',
},
{
label: '教学态度',
field: 'jxtd',
component: 'Input',
},
{
label: '教学过程',
field: 'jxgc',
component: 'Input',
},
{
label: '教学效果',
field: 'jxxg',
component: 'Input',
},
{
label: '教学特殊',
field: 'jxts',
component: 'Input',
},
{
label: '总分',
field: 'zf',
component: 'Input',
},
{
label: '优点或建议',
field: 'ydhjy',
component: 'Input',
},
{
label: '评价时间',
field: 'pjsj',
component: 'DatePicker',
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,259 @@
<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="课程编号">
<a-input placeholder="请输入课程编号" v-model:value="queryParam.kcbh"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="课程名称">
<a-input placeholder="请输入课程名称" v-model:value="queryParam.kcmc"></a-input>
</a-form-item>
</a-col>
<!--<template v-if="toggleSearchStatus">-->
<a-col :lg="8">
<a-form-item label="授课教师">
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="授课时间">
<a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择授课时间" v-model:value="queryParam.sksj" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="上课地点">
<a-input placeholder="请输入上课地点" v-model:value="queryParam.skdd"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="评价时间">
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择评价时间" v-model:value="queryParam.pjsj" />
</a-form-item>
</a-col>
<!--</template>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>-->
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽: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)" :dropDownActions="getDropDownAction(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>
<!-- 表单区域 -->
<KcZzThpjbModal ref="registerModal" @success="handleSuccess"></KcZzThpjbModal>
</div>
</template>
<script lang="ts" name="kcZzThpjb-kcZzThpjb" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './KcZzThpjb.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcZzThpjb.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import KcZzThpjbModal from './components/KcZzThpjbModal.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,
},
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),
},
];
}
/**
* 下拉操作栏
*/
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,217 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="8">
<a-form-item label="课程编号" v-bind="validateInfos.kcbh">
<a-input v-model:value="formData.kcbh" placeholder="请输入课程编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<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="8">
<a-form-item label="授课教师" v-bind="validateInfos.skjs">
<a-input v-model:value="formData.skjs" placeholder="请输入授课教师" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="授课时间" v-bind="validateInfos.sksj">
<a-date-picker placeholder="请选择授课时间" v-model:value="formData.sksj" value-format="YYYY-MM-DD" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="上课地点" v-bind="validateInfos.skdd">
<a-input v-model:value="formData.skdd" placeholder="请输入上课地点" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="使用教材" v-bind="validateInfos.syjc">
<a-input v-model:value="formData.syjc" placeholder="请输入使用教材" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="授课对象" v-bind="validateInfos.skdx">
<a-input v-model:value="formData.skdx" placeholder="请输入授课对象" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="授课教授" v-bind="validateInfos.skjiaoshou">
<a-input v-model:value="formData.skjiaoshou" placeholder="请输入授课教授" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="教学理解" v-bind="validateInfos.jxlj">
<a-input v-model:value="formData.jxlj" placeholder="请输入教学理解" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="教学态度" v-bind="validateInfos.jxtd">
<a-input v-model:value="formData.jxtd" placeholder="请输入教学态度" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="教学过程" v-bind="validateInfos.jxgc">
<a-input v-model:value="formData.jxgc" placeholder="请输入教学过程" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="教学效果" v-bind="validateInfos.jxxg">
<a-input v-model:value="formData.jxxg" placeholder="请输入教学效果" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="教学特殊" v-bind="validateInfos.jxts">
<a-input v-model:value="formData.jxts" placeholder="请输入教学特殊" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="总分" v-bind="validateInfos.zf">
<a-input v-model:value="formData.zf" placeholder="请输入总分" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="优点或建议" v-bind="validateInfos.ydhjy">
<a-input v-model:value="formData.ydhjy" placeholder="请输入优点或建议" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="评价时间" v-bind="validateInfos.pjsj">
<a-date-picker placeholder="请选择评价时间" v-model:value="formData.pjsj" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
</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 '../KcZzThpjb.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: '',
kcbh: '',
kcmc: '',
skjs: '',
sksj: '',
skdd: '',
syjc: '',
skdx: '',
skjiaoshou: '',
jxlj: '',
jxtd: '',
jxgc: '',
jxxg: '',
jxts: '',
zf: '',
ydhjy: '',
pjsj: '',
});
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="关闭">
<KcZzThpjbForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcZzThpjbForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcZzThpjbForm from './KcZzThpjbForm.vue'
const title = ref<string>('');
const width = ref<string>('90%');
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,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/kcZzXstkb/kcZzXstkb/list',
save='/kcZzXstkb/kcZzXstkb/add',
edit='/kcZzXstkb/kcZzXstkb/edit',
deleteOne = '/kcZzXstkb/kcZzXstkb/delete',
deleteBatch = '/kcZzXstkb/kcZzXstkb/deleteBatch',
importExcel = '/kcZzXstkb/kcZzXstkb/importExcel',
exportXls = '/kcZzXstkb/kcZzXstkb/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,300 @@
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: 'kcbh'
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
},
{
title: '授课教师',
align: "center",
dataIndex: 'skjs'
},
{
title: '授课时间',
align: "center",
dataIndex: 'sksj',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '上课地点',
align: "center",
dataIndex: 'skdd'
},
{
title: '听课教师姓名',
align: "center",
dataIndex: 'tkjsxm'
},
{
title: '听课教师工号',
align: "center",
dataIndex: 'tkjsgh'
},
{
title: '听课时间',
align: "center",
dataIndex: 'tksj'
},
{
title: '1.声音和画面情况',
align: "center",
dataIndex: 'ans1_dictText'
},
{
title: '2.ppt等课件情况',
align: "center",
dataIndex: 'ans2_dictText'
},
{
title: '3.教师出镜情况',
align: "center",
dataIndex: 'ans3_dictText'
},
{
title: '4.教师仪态仪表方面',
align: "center",
dataIndex: 'ans4_dictText'
},
{
title: '5.教师所在环境情况',
align: "center",
dataIndex: 'ans5_dictText'
},
{
title: '6.学生出席情况',
align: "center",
dataIndex: 'ans6_dictText'
},
{
title: '7.课堂秩序情况',
align: "center",
dataIndex: 'ans7_dictText'
},
{
title: '8.课堂教学互动情况',
align: "center",
dataIndex: 'ans8_dictText'
},
{
title: '9.过程性评价情况',
align: "center",
dataIndex: 'ans9_dictText'
},
{
title: '总体评价',
align: "center",
dataIndex: 'ztpj_dictText'
},
{
title: '您认为课堂值得肯定的方面或者需要改进的方面',
align: "center",
dataIndex: 'pjnr'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "课程编号",
field: 'kcbh',
component: 'Input',
colProps: {span: 6},
},
{
label: "课程名称",
field: 'kcmc',
component: 'Input',
colProps: {span: 6},
},
{
label: "授课教师",
field: 'skjs',
component: 'Input',
colProps: {span: 6},
},
{
label: "授课时间",
field: 'sksj',
component: 'DatePicker',
colProps: {span: 6},
},
{
label: "上课地点",
field: 'skdd',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课教师姓名",
field: 'tkjsxm',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课教师工号",
field: 'tkjsgh',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课时间",
field: 'tksj',
component: 'DatePicker',
componentProps: {
showTime: true,
},
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '课程编号',
field: 'kcbh',
component: 'Input',
},
{
label: '课程名称',
field: 'kcmc',
component: 'Input',
},
{
label: '授课教师',
field: 'skjs',
component: 'Input',
},
{
label: '授课时间',
field: 'sksj',
component: 'DatePicker',
},
{
label: '上课地点',
field: 'skdd',
component: 'Input',
},
{
label: '听课教师姓名',
field: 'tkjsxm',
component: 'Input',
},
{
label: '听课教师工号',
field: 'tkjsgh',
component: 'Input',
},
{
label: '听课时间',
field: 'tksj',
component: 'DatePicker',
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '1.声音和画面情况',
field: 'ans1',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '2.ppt等课件情况',
field: 'ans2',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '3.教师出镜情况',
field: 'ans3',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '4.教师仪态仪表方面',
field: 'ans4',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '5.教师所在环境情况',
field: 'ans5',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '6.学生出席情况',
field: 'ans6',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '7.课堂秩序情况',
field: 'ans7',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '8.课堂教学互动情况',
field: 'ans8',
component: 'JDictSelectTag',
componentProps:{
dictCode: "fix_dict"
},
},
{
label: '9.过程性评价情况',
field: 'ans9',
component: 'JDictSelectTag',
componentProps:{
dictCode: "fix_dict"
},
},
{
label: '总体评价',
field: 'ztpj',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '您认为课堂值得肯定的方面或者需要改进的方面',
field: 'pjnr',
component: 'InputTextArea',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,269 @@
<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="课程编号">
<a-input placeholder="请输入课程编号" v-model:value="queryParam.kcbh"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="课程名称">
<a-input placeholder="请输入课程名称" v-model:value="queryParam.kcmc"></a-input>
</a-form-item>
</a-col>
<!--<template v-if="toggleSearchStatus">-->
<a-col :lg="8">
<a-form-item label="授课教师">
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="授课时间">
<a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择授课时间" v-model:value="queryParam.sksj" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="上课地点">
<a-input placeholder="请输入上课地点" v-model:value="queryParam.skdd"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="听课教师姓名">
<a-input placeholder="请输入听课教师姓名" v-model:value="queryParam.tkjsxm"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="听课教师工号">
<a-input placeholder="请输入听课教师工号" v-model:value="queryParam.tkjsgh"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="听课时间">
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择听课时间" v-model:value="queryParam.tksj" />
</a-form-item>
</a-col>
<!--</template>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>-->
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽: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)" :dropDownActions="getDropDownAction(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>
<!-- 表单区域 -->
<KcZzXstkbModal ref="registerModal" @success="handleSuccess"></KcZzXstkbModal>
</div>
</template>
<script lang="ts" name="kcZzXstkb-kcZzXstkb" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './KcZzXstkb.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcZzXstkb.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import KcZzXstkbModal from './components/KcZzXstkbModal.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,
},
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),
},
];
}
/**
* 下拉操作栏
*/
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,238 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="8">
<a-form-item label="课程编号" v-bind="validateInfos.kcbh">
<a-input v-model:value="formData.kcbh" placeholder="请输入课程编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<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="8">
<a-form-item label="授课教师" v-bind="validateInfos.skjs">
<a-input v-model:value="formData.skjs" placeholder="请输入授课教师" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="授课时间" v-bind="validateInfos.sksj">
<a-date-picker placeholder="请选择授课时间" v-model:value="formData.sksj" value-format="YYYY-MM-DD" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="上课地点" v-bind="validateInfos.skdd">
<a-input v-model:value="formData.skdd" placeholder="请输入上课地点" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="听课教师姓名" v-bind="validateInfos.tkjsxm">
<a-input v-model:value="formData.tkjsxm" placeholder="请输入听课教师姓名" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="听课教师工号" v-bind="validateInfos.tkjsgh">
<a-input v-model:value="formData.tkjsgh" placeholder="请输入听课教师工号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="听课时间" v-bind="validateInfos.tksj">
<a-date-picker placeholder="请选择听课时间" v-model:value="formData.tksj" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="1.声音和画面情况" v-bind="validateInfos.ans1">
<j-dict-select-tag type='radio' v-model:value="formData.ans1" dictCode="five_dict" placeholder="请选择1.声音和画面情况" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="2.ppt等课件情况" v-bind="validateInfos.ans2">
<j-dict-select-tag type='radio' v-model:value="formData.ans2" dictCode="five_dict" placeholder="请选择2.ppt等课件情况" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="3.教师出镜情况" v-bind="validateInfos.ans3">
<j-dict-select-tag type='radio' v-model:value="formData.ans3" dictCode="five_dict" placeholder="请选择3.教师出镜情况" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="4.教师仪态仪表方面" v-bind="validateInfos.ans4">
<j-dict-select-tag type='radio' v-model:value="formData.ans4" dictCode="five_dict" placeholder="请选择4.教师仪态仪表方面" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="5.教师所在环境情况" v-bind="validateInfos.ans5">
<j-dict-select-tag type='radio' v-model:value="formData.ans5" dictCode="five_dict" placeholder="请选择5.教师所在环境情况" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="6.学生出席情况" v-bind="validateInfos.ans6">
<j-dict-select-tag type='radio' v-model:value="formData.ans6" dictCode="five_dict" placeholder="请选择6.学生出席情况" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="7.课堂秩序情况" v-bind="validateInfos.ans7">
<j-dict-select-tag type='radio' v-model:value="formData.ans7" dictCode="five_dict" placeholder="请选择7.课堂秩序情况" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="8.课堂教学互动情况" v-bind="validateInfos.ans8">
<j-dict-select-tag type='radio' v-model:value="formData.ans8" dictCode="fix_dict" placeholder="请选择8.课堂教学互动情况" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="9.过程性评价情况" v-bind="validateInfos.ans9">
<j-dict-select-tag type='radio' v-model:value="formData.ans9" dictCode="fix_dict" placeholder="请选择9.过程性评价情况" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="总体评价" v-bind="validateInfos.ztpj">
<j-dict-select-tag type='radio' v-model:value="formData.ztpj" dictCode="five_dict" placeholder="请选择总体评价" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="您认为课堂值得肯定的方面或者需要改进的方面" v-bind="validateInfos.pjnr" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
<a-textarea v-model:value="formData.pjnr" rows="4" placeholder="请输入您认为课堂值得肯定的方面或者需要改进的方面" :disabled="disabled"/>
</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 JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../KcZzXstkb.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: '',
kcbh: '',
kcmc: '',
skjs: '',
sksj: '',
skdd: '',
tkjsxm: '',
tkjsgh: '',
tksj: '',
ans1: '',
ans2: '',
ans3: '',
ans4: '',
ans5: '',
ans6: '',
ans7: '',
ans8: '',
ans9: '',
ztpj: '',
pjnr: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 10 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 14 } });
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
const wrapperCol2 = 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="关闭">
<KcZzXstkbForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcZzXstkbForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcZzXstkbForm from './KcZzXstkbForm.vue'
const title = ref<string>('');
const width = ref<string>('90%');
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,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/kcZzYbtkb/kcZzYbtkb/list',
save='/kcZzYbtkb/kcZzYbtkb/add',
edit='/kcZzYbtkb/kcZzYbtkb/edit',
deleteOne = '/kcZzYbtkb/kcZzYbtkb/delete',
deleteBatch = '/kcZzYbtkb/kcZzYbtkb/deleteBatch',
importExcel = '/kcZzYbtkb/kcZzYbtkb/importExcel',
exportXls = '/kcZzYbtkb/kcZzYbtkb/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,281 @@
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: 'kcbh'
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
},
{
title: '授课教师',
align: "center",
dataIndex: 'skjs'
},
{
title: '授课时间',
align: "center",
dataIndex: 'skrq',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '上课地点',
align: "center",
dataIndex: 'skdd'
},
{
title: '听课教师编号',
align: "center",
dataIndex: 'tkjsbh'
},
{
title: '听课教师姓名',
align: "center",
dataIndex: 'tkjsxm'
},
{
title: '评课时间',
align: "center",
dataIndex: 'pksj'
},
{
title: '授课有启发性,能给予学生思考、联想、创造的启迪',
align: "center",
dataIndex: 'ans1_dictText'
},
{
title: '能有效利用各种教学媒体,课件或板书使用效果好',
align: "center",
dataIndex: 'ans2_dictText'
},
{
title: '仪表得体,按时上下课,严格要求学生',
align: "center",
dataIndex: 'ans3_dictText'
},
{
title: '讲课有热情,精神饱满,能调动学生情绪,课堂气氛活跃',
align: "center",
dataIndex: 'ans4_dictText'
},
{
title: '教学目标明确,内容丰富,重点突出,言语表达清楚。',
align: "center",
dataIndex: 'ans5_dictText'
},
{
title: '无迟到、早退、旷课现象',
align: "center",
dataIndex: 'ans6_dictText'
},
{
title: '课堂教学秩序好,无喧闹、打瞌睡、发短信、玩手机等现象',
align: "center",
dataIndex: 'ans7_dictText'
},
{
title: '上课认真听讲、积极思考、主动与老师交流互动',
align: "center",
dataIndex: 'ans8_dictText'
},
{
title: '课堂教学总体印象评价',
align: "center",
dataIndex: 'ans9_dictText'
},
{
title: '请填写对课堂内容以及其他方面的具体意见或建议',
align: "center",
dataIndex: 'ans10'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "课程编号",
field: 'kcbh',
component: 'Input',
colProps: {span: 6},
},
{
label: "课程名称",
field: 'kcmc',
component: 'Input',
colProps: {span: 6},
},
{
label: "授课教师",
field: 'skjs',
component: 'Input',
colProps: {span: 6},
},
{
label: "授课时间",
field: 'skrq',
component: 'DatePicker',
colProps: {span: 6},
},
{
label: "听课教师编号",
field: 'tkjsbh',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课教师姓名",
field: 'tkjsxm',
component: 'Input',
colProps: {span: 6},
},
{
label: "评课时间",
field: 'pksj',
component: 'DatePicker',
componentProps: {
showTime: true,
},
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '课程编号',
field: 'kcbh',
component: 'Input',
},
{
label: '课程名称',
field: 'kcmc',
component: 'Input',
},
{
label: '授课教师',
field: 'skjs',
component: 'Input',
},
{
label: '授课时间',
field: 'skrq',
component: 'DatePicker',
},
{
label: '上课地点',
field: 'skdd',
component: 'Input',
},
{
label: '听课教师编号',
field: 'tkjsbh',
component: 'Input',
},
{
label: '听课教师姓名',
field: 'tkjsxm',
component: 'Input',
},
{
label: '评课时间',
field: 'pksj',
component: 'DatePicker',
componentProps: {
showTime: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '授课有启发性,能给予学生思考、联想、创造的启迪',
field: 'ans1',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '能有效利用各种教学媒体,课件或板书使用效果好',
field: 'ans2',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '仪表得体,按时上下课,严格要求学生',
field: 'ans3',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '讲课有热情,精神饱满,能调动学生情绪,课堂气氛活跃',
field: 'ans4',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '教学目标明确,内容丰富,重点突出,言语表达清楚。',
field: 'ans5',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '无迟到、早退、旷课现象',
field: 'ans6',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '课堂教学秩序好,无喧闹、打瞌睡、发短信、玩手机等现象',
field: 'ans7',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '上课认真听讲、积极思考、主动与老师交流互动',
field: 'ans8',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '课堂教学总体印象评价',
field: 'ans9',
component: 'JDictSelectTag',
componentProps:{
dictCode: "five_dict"
},
},
{
label: '请填写对课堂内容以及其他方面的具体意见或建议',
field: 'ans10',
component: 'InputTextArea',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,264 @@
<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="课程编号">
<a-input placeholder="请输入课程编号" v-model:value="queryParam.kcbh"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="课程名称">
<a-input placeholder="请输入课程名称" v-model:value="queryParam.kcmc"></a-input>
</a-form-item>
</a-col>
<!--<template v-if="toggleSearchStatus">-->
<a-col :lg="8">
<a-form-item label="授课教师">
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="授课时间">
<a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择授课时间" v-model:value="queryParam.skrq" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="听课教师编号">
<a-input placeholder="请输入听课教师编号" v-model:value="queryParam.tkjsbh"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="听课教师姓名">
<a-input placeholder="请输入听课教师姓名" v-model:value="queryParam.tkjsxm"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="评课时间">
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择评课时间" v-model:value="queryParam.pksj" />
</a-form-item>
</a-col>
<!--</template>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>-->
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽: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)" :dropDownActions="getDropDownAction(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>
<!-- 表单区域 -->
<KcZzYbtkbModal ref="registerModal" @success="handleSuccess"></KcZzYbtkbModal>
</div>
</template>
<script lang="ts" name="kcZzYbtkb-kcZzYbtkb" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './KcZzYbtkb.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcZzYbtkb.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import KcZzYbtkbModal from './components/KcZzYbtkbModal.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,
},
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),
},
];
}
/**
* 下拉操作栏
*/
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,232 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="8">
<a-form-item label="课程编号" v-bind="validateInfos.kcbh">
<a-input v-model:value="formData.kcbh" placeholder="请输入课程编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<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="8">
<a-form-item label="授课教师" v-bind="validateInfos.skjs">
<a-input v-model:value="formData.skjs" placeholder="请输入授课教师" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="授课时间" v-bind="validateInfos.skrq">
<a-date-picker placeholder="请选择授课时间" v-model:value="formData.skrq" value-format="YYYY-MM-DD" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="上课地点" v-bind="validateInfos.skdd">
<a-input v-model:value="formData.skdd" placeholder="请输入上课地点" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="听课教师编号" v-bind="validateInfos.tkjsbh">
<a-input v-model:value="formData.tkjsbh" placeholder="请输入听课教师编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="听课教师姓名" v-bind="validateInfos.tkjsxm">
<a-input v-model:value="formData.tkjsxm" placeholder="请输入听课教师姓名" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="评课时间" v-bind="validateInfos.pksj">
<a-date-picker placeholder="请选择评课时间" v-model:value="formData.pksj" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授课有启发性,能给予学生思考、联想、创造的启迪" v-bind="validateInfos.ans1">
<j-dict-select-tag type='radio' v-model:value="formData.ans1" dictCode="five_dict" placeholder="请选择授课有启发性,能给予学生思考、联想、创造的启迪" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="能有效利用各种教学媒体,课件或板书使用效果好" v-bind="validateInfos.ans2">
<j-dict-select-tag type='radio' v-model:value="formData.ans2" dictCode="five_dict" placeholder="请选择能有效利用各种教学媒体,课件或板书使用效果好" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="仪表得体,按时上下课,严格要求学生" v-bind="validateInfos.ans3">
<j-dict-select-tag type='radio' v-model:value="formData.ans3" dictCode="five_dict" placeholder="请选择仪表得体,按时上下课,严格要求学生" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="讲课有热情,精神饱满,能调动学生情绪,课堂气氛活跃" v-bind="validateInfos.ans4">
<j-dict-select-tag type='radio' v-model:value="formData.ans4" dictCode="five_dict" placeholder="请选择讲课有热情,精神饱满,能调动学生情绪,课堂气氛活跃" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="教学目标明确,内容丰富,重点突出,言语表达清楚。" v-bind="validateInfos.ans5">
<j-dict-select-tag type='radio' v-model:value="formData.ans5" dictCode="five_dict" placeholder="请选择教学目标明确,内容丰富,重点突出,言语表达清楚。" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="无迟到、早退、旷课现象" v-bind="validateInfos.ans6">
<j-dict-select-tag type='radio' v-model:value="formData.ans6" dictCode="five_dict" placeholder="请选择无迟到、早退、旷课现象" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="课堂教学秩序好,无喧闹、打瞌睡、发短信、玩手机等现象" v-bind="validateInfos.ans7">
<j-dict-select-tag type='radio' v-model:value="formData.ans7" dictCode="five_dict" placeholder="请选择课堂教学秩序好,无喧闹、打瞌睡、发短信、玩手机等现象" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="上课认真听讲、积极思考、主动与老师交流互动" v-bind="validateInfos.ans8">
<j-dict-select-tag type='radio' v-model:value="formData.ans8" dictCode="five_dict" placeholder="请选择上课认真听讲、积极思考、主动与老师交流互动" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="课堂教学总体印象评价" v-bind="validateInfos.ans9">
<j-dict-select-tag type='radio' v-model:value="formData.ans9" dictCode="five_dict" placeholder="请选择课堂教学总体印象评价" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="请填写对课堂内容以及其他方面的具体意见或建议" v-bind="validateInfos.ans10" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
<a-textarea v-model:value="formData.ans10" rows="4" placeholder="请输入请填写对课堂内容以及其他方面的具体意见或建议" :disabled="disabled"/>
</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 JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../KcZzYbtkb.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: '',
kcbh: '',
kcmc: '',
skjs: '',
skrq: '',
skdd: '',
tkjsbh: '',
tkjsxm: '',
pksj: '',
ans1: '',
ans2: '',
ans3: '',
ans4: '',
ans5: '',
ans6: '',
ans7: '',
ans8: '',
ans9: '',
ans10: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 12 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 12 } });
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
const wrapperCol2 = 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="关闭">
<KcZzYbtkbForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcZzYbtkbForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcZzYbtkbForm from './KcZzYbtkbForm.vue'
const title = ref<string>('');
const width = ref<string>('90%');
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,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/ktgl/kcKechengbiao/list',
save='/ktgl/kcKechengbiao/add',
edit='/ktgl/kcKechengbiao/edit',
deleteOne = '/ktgl/kcKechengbiao/delete',
deleteBatch = '/ktgl/kcKechengbiao/deleteBatch',
importExcel = '/ktgl/kcKechengbiao/importExcel',
exportXls = '/ktgl/kcKechengbiao/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,418 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
// import { render } from '/@/utils/common/renderUtils';
import { JVxeColumn, JVxeTypes } from '/@/components/jeecg/JVxeTable/types';
//列表数据
export const columns = <JVxeColumn[]>([
{
title: '课程编号',
align: "left",
width: '300px',
key: 'kcbh',
},
{
title: '课程名称',
align: "left",
key: 'kcmc'
},
{
title: '授课教师',
align: "left",
key: 'skjs'
},
{
title: '学科人数',
align: "left",
width: '80px',
key: 'xkrs'
},
{
title: '开课单位',
align: "left",
width: '100px',
key: 'kkdw_dictText'
},
{
title: '课程性质',
align: "left",
width: '105px',
key: 'kcxz_dictText'
},
{
title: '上课地点',
align: "left",
width: '100px',
key: 'skdd'
},
{
title: '上课周次',
align: "left",
width: '100px',
key: 'jkzc_dictText'
},
{
title: '节次',
align: "left",
width: '70px',
key: 'hh_dictText'
},
{
title: '星期',
align: "left",
width: '70px',
key: 'week_dictText'
},
{
title: '学分',
align: "left",
width: '50px',
key: 'xf'
},
// {
// title: '操作',
// key: 'action',
// type: JVxeTypes.slot,
// align: 'center',
// slotName: 'myAction',
// },
]);
// export const columns: BasicColumn[] = [
// {
// title: 'id',
// align: "center",
// width: '0',
// dataIndex: 'id',
// // ifShow: false,
// },
// {
// title: '课程号',
// align: "center",
// width: '300px',
// dataIndex: 'kcbh'
// },
// {
// title: '课程名称',
// align: "center",
// dataIndex: 'kcmc'
// },
// {
// title: '授课教师',
// align: "center",
// dataIndex: 'skjs'
// },
// {
// title: '学科人数',
// align: "center",
// width: '80px',
// dataIndex: 'xkrs'
// },
// {
// title: '开课单位',
// align: "center",
// width: '100px',
// dataIndex: 'kkdw_dictText'
// },
// {
// title: '课程性质',
// align: "center",
// width: '105px',
// dataIndex: 'kcxz_dictText'
// },
// {
// title: '上课地点',
// align: "center",
// width: '100px',
// dataIndex: 'skdd'
// },
// {
// title: '上课周次',
// align: "center",
// width: '100px',
// dataIndex: 'jkzc_dictText'
// },
// {
// title: '节次',
// align: "center",
// width: '70px',
// dataIndex: 'hh_dictText'
// },
// {
// title: '星期',
// align: "center",
// width: '70px',
// dataIndex: 'week_dictText'
// },
// {
// title: '学分',
// align: "center",
// width: '50px',
// dataIndex: 'xf'
// },
// {
// title: '是否出镜',
// align: "center",
// dataIndex: 'sfcj',
// edit: true,
// editComponent: 'Select',
// // editComponentProps: {
// // // //选中
// // checkedChildren: "是-",
// // // checkedValue: 0,
// // // //未选中
// // unCheckedChildren:'否-',
// // // unCheckedValue: 1,
// // // onClick: (checked: boolean | string | number, event: Event) => {
// // // event.stopPropagation();
// // // console.log('选择后回调',checked,event);
// // // }
// // },
// // editValueMap: (value) => value == '0'?'是':'否',
// // editValueMap: (value) => value?'0':'1',
// // format: (text) => ,C
// editComponentProps: {
// options: [
// { label: '是', value: 0, },
// { label: '否', value: 1, },
// ],
// },
// // customRender: (r) => r.text == 0?'是':'否'
// },
// {
// title: '上课形式',
// align: "center",
// dataIndex: 'skxs',
// edit: true,
// editComponent: 'Select',
// editComponentProps: {
// options: [
// { label: '线上', value: 0, },
// { label: '线下', value: 1, },
// { label: '线上线下混合', value: 2, },
// ],
// },
// // customRender: (r) => r.text == 0?'线上':r.text == 1?'线下':'线上线下混合'
// },
// ];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "课程名称",
field: 'kcmc',
component: 'Input',
colProps: {span: 6},
},
{
label: "授课教师",
field: 'skjs',
component: 'JDictSelectTag',
componentProps:{
},
colProps: {span: 6},
},
{
label: "开课单位",
field: 'kkdw',
component: 'JDictSelectTag',
componentProps:{
},
colProps: {span: 6},
},
{
label: "课程性质",
field: 'kcxz',
component: 'Input',
colProps: {span: 6},
},
{
label: "节次",
field: 'hh',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skjc"
},
colProps: {span: 6},
},
{
label: "星期几",
field: 'week',
component: 'JDictSelectTag',
componentProps:{
dictCode: "week"
},
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '课程编号',
field: 'kcbh',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入课程编号!'},
{...rules.duplicateCheckRule('kc_kechengbiao', 'kcbh',model,schema)[0]},
];
},
},
{
label: '课程名称',
field: 'kcmc',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入课程名称!'},
];
},
},
{
label: '授课教师',
field: 'skjs',
component: 'JDictSelectTag',
componentProps:{
dictCode: ""
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入授课教师!'},
];
},
},
{
label: '学科人数',
field: 'xkrs',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入学科人数!'},
];
},
},
{
label: '开课单位',
field: 'kkdw',
component: 'JDictSelectTag',
componentProps:{
dictCode: ""
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入开课单位!'},
];
},
},
{
label: '课程性质',
field: 'kcxz',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入课程性质!'},
];
},
},
{
label: '上课地点',
field: 'skdd',
component: 'Input',
},
{
label: '上课周次',
field: 'jkzc',
component: 'JSelectMultiple',
componentProps:{
dictCode: "skzc"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入上课周次!'},
];
},
},
{
label: '节次',
field: 'hh',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skjc"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入节次!'},
];
},
},
{
label: '星期几',
field: 'week',
component: 'JDictSelectTag',
componentProps:{
dictCode: "week"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入星期几!'},
];
},
},
{
label: '直播方式',
field: 'zbfs',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skpt"
},
},
{
label: '会议号',
field: 'hyh',
component: 'Input',
},
{
label: '会议密码',
field: 'hymm',
component: 'Input',
},
{
label: '课程链接',
field: 'kclj',
component: 'Input',
},
{
label: '学分',
field: 'xf',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入学分!'},
];
},
},
{
label: '是否出镜0-出镜1-不出镜',
field: 'sfcj',
component: 'InputNumber',
},
{
label: '上课形式0-线上1-线下2-线上线下混合',
field: 'skxs',
component: 'InputNumber',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,254 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container" v-if="!props.isNoSearch">
<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-dict-select-tag placeholder="请选择星期" v-model:value="queryParam.week" dictCode="week"/>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="节次">
<j-dict-select-tag placeholder="请选择节次" v-model:value="queryParam.hh" dictCode="skjc"/>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="课程性质">
<j-dict-select-tag v-model:value="queryParam.kcxz" dictCode="kcxz" placeholder="请选择课程性质"/>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="课程名称或教师名">
<a-input placeholder="请输入课程名称或教师名" v-model:value="queryParam.searchInput"></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-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<vxe-toolbar>
<template #buttons>
<a-button type="primary" class="pl1r" @click="handleAdd" preIcon="ant-design:plus-outlined" v-if="!props.isNoSearch"> 新增</a-button>
<a-button type="primary" class="pl1r" @click="handleYichu" preIcon="ant-design:plus-outlined" v-if="!props.isNoSearch"> 移除</a-button>
</template>
</vxe-toolbar>
<JVxeTable
ref="tableRef"
row-number
keep-source
bordered
:loading="loading"
:dataSource="dataSource"
:columns="columns"
:pagination="pagination"
style="margin-top: 8px"
@page-change="handlePageChange"
>
<!--操作栏-->
<template #myAction="props">
<Popconfirm title="确定移除吗?" @confirm="handleDelete(props)">
<a>移除</a>
</Popconfirm>
</template>
</JVxeTable>
<!-- 表单区域 -->
<XzKechengbiaoList ref="registerModal" @success="handleSuccess"></XzKechengbiaoList>
<YcKechengbiaoListModal ref="ycregisterModal" @success="handleSuccess"></YcKechengbiaoListModal>
</div>
</template>
<script lang="ts" name="ktgl-kcKechengbiao" setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { Popconfirm } from 'ant-design-vue';
// import { useListPage } from '/@/ho oks/system/useListPage';
import { propTypes } from '/@/utils/propTypes';
import { useMessage } from '/@/hooks/web/useMessage';
import { columns } from './KcKechengbiao.data';
import { list, batchDelete,deleteOne, saveOrUpdate } from './KcKechengbiao.api';
import XzKechengbiaoList from './components/XzKechengbiaoListModal.vue'
import YcKechengbiaoListModal from './components/YcKechengbiaoListModal.vue'
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JVxeTableInstance } from '/@/components/jeecg/JVxeTable/types';
import { filterObj } from '/@/utils/common/compUtils';
//-----------------------------------------------------------------------------------------------------------------
const props = defineProps({
searchParam: propTypes.object.def({}),
isNoSearch: propTypes.bool.def(false)
});
const tableRef = ref<JVxeTableInstance>();
const loading = ref(false);
const selectedRows = ref([]);
const selectedRowKeys = ref([]);
const dataSource = ref<any[]>([]);
const pagination = reactive({
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30', '100', '200'],
total: 0,
});
const queryParam = ref<any>({ });
// const filterInfo = ref<any>({ xnxq: '2022-2023-2' });
const filterInfo = ref<any>({ });
const registerModal = ref();
const ycregisterModal = ref();
const labelCol = reactive({ xs: { span: 24 }, sm: { span: 7 }, });
const wrapperCol = reactive({ xs: { span: 24 }, sm: { span: 16 }, });
const { createMessage } = useMessage();
//--------------------------------------END------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
onMounted(() => {
loadData(1);
})
watch(() => props.searchParam, async (newRow, oldRow) => {
reload();
});
//--------------------------------------END---------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
function loadData(pageNo?){
loading.value = true;
if(pageNo == 1){
pagination.current = 1;
}
//
let { current, pageSize } = pagination;
let param = {szkc:'1', column: 'createTime', order: 'desc', pageNo: current, pageSize, ...queryParam.value, ...filterInfo.value, ...props.searchParam }
list(filterObj(param)).then(res => {
dataSource.value = res?.records??[];
pagination.total = res?.total??0;
//
if(props.isNoSearch){
selectedRows.value = Array<never>(dataSource.value[0]);
console.log('tableRef =>',tableRef);
}
}).finally(() => {
// loading
loading.value = false;
});
}
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
function handlePageChange(event) {
// ,
pagination.current = event.current;
pagination.pageSize = event.pageSize;
//
loadData();
}
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
//
function reload() {
loadData(1);
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 移除事件
*/
function handleYichu() {
ycregisterModal.value.title = "移除";
ycregisterModal.value.disableSubmit = false;
ycregisterModal.value.add();
}
/**
* 删除事件
*/
async function handleDelete(record) {
var info = record.row
info.szkc = '0'
await saveOrUpdate(info, true)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
reload();
} else {
createMessage.warning(res.message);
}
})
}
/**
* 成功回调
*/
function handleSuccess() {
(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
}
}
.pl1r {
margin-left: 1rem;
}
</style>

View File

@ -0,0 +1,291 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="12">
<a-form-item label="课程号" v-bind="validateInfos.kcbh">
<a-input v-model:value="formData.kcbh" placeholder="请输入课程号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<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="12">
<a-form-item label="学分" v-bind="validateInfos.xf">
<a-input v-model:value="formData.xf" placeholder="请输入学分" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授课教师" v-bind="validateInfos.skjs">
<!-- <j-dict-select-tag v-model:value="formData.skjs" dictCode="" placeholder="请选择授课教师" :disabled="disabled"/> -->
<!-- :formElRef="formRef" -->
<JPopup
placeholder="请选择授课教师"
v-model:value="formData.skjs"
code="selectTeacherLilst"
:param="{}"
:field-config="[
{ source: 'id', target: 'id' },
{ source: 'user', target: 'user' },
{ source: 'cn', target: 'cn' },
{ source: 'collegecode', target: 'collegecode' },
{ source: 'college', target: 'college' },
{ source: 'csrq', target: 'csrq' },
{ source: 'sfzxm', target: 'sfzxm' },
{ source: 'zdxms', target: 'zdxms' },
]"
:setFieldsValue="updateSkjsFn"
:multi="false"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="星期" v-bind="validateInfos.week">
<j-dict-select-tag v-model:value="formData.week" dictCode="week" placeholder="请选择星期" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="节次" v-bind="validateInfos.hh">
<j-dict-select-tag v-model:value="formData.hh" dictCode="skjc" placeholder="请选择节次" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="选课人数" v-bind="validateInfos.xkrs">
<a-input v-model:value="formData.xkrs" placeholder="请输入选课人数" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="课程性质" v-bind="validateInfos.kcxz">
<!-- <a-input v-model:value="formData.kcxz" placeholder="请输入课程性质" :disabled="disabled"></a-input> -->
<j-dict-select-tag v-model:value="formData.kcxz" dictCode="kcxz" placeholder="请选择课程性质" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="上课周次" v-bind="validateInfos.jkzc">
<j-checkbox type="checkbox" v-model:value="formData.jkzc" dictCode="skzc" placeholder="请选择上课周次" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开课单位" v-bind="validateInfos.kkdw">
<j-dict-select-tag v-model:value="formData.kkdw" dictCode="kc_kkdw_view,kkdw,id" placeholder="请选择开课单位" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="授课平台" v-bind="validateInfos.zbfs">
<j-dict-select-tag v-model:value="formData.zbfs" dictCode="skpt" placeholder="请选择授课平台" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="会议号" v-bind="validateInfos.hyh">
<a-input v-model:value="formData.hyh" placeholder="请输入会议号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="会议密码" v-bind="validateInfos.hymm">
<a-input v-model:value="formData.hymm" placeholder="请输入会议密码" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程链接" v-bind="validateInfos.kclj">
<a-input v-model:value="formData.kclj" placeholder="请输入课程链接" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<!--
<a-col :span="12">
<a-form-item label="上课地点" v-bind="validateInfos.skdd">
<a-input v-model:value="formData.skdd" placeholder="请输入上课地点" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="是否出镜0-出镜1-不出镜" v-bind="validateInfos.sfcj">
<a-input-number v-model:value="formData.sfcj" placeholder="请输入是否出镜0-出镜1-不出镜" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="上课形式0-线上1-线下2-线上线下混合" v-bind="validateInfos.skxs">
<a-input-number v-model:value="formData.skxs" placeholder="请输入上课形式0-线上1-线下2-线上线下混合" style="width: 100%" :disabled="disabled"/>
</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 JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JCheckbox from "/@/components/Form/src/jeecg/components/JCheckbox.vue";
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../KcKechengbiao.api';
import { Form } from 'ant-design-vue';
import { duplicateValidate } from '/@/utils/helper/validator'
// import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'
import { JPopup } from '/@/components/Form';
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: '',
kcbh: '',
kcmc: '',
skjs: '',
xkrs: '',
kkdw: '',
kcxz: '',
skdd: '',
jkzc: '',
hh: '',
week: '',
zbfs: '',
hyh: '',
hymm: '',
kclj: '',
xf: '',
sfcj: undefined,
skxs: undefined,
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ style: { width: '150px' } });
const wrapperCol = ref<any>({ style: { width: '100%' } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = {
kcbh: [{ required: true, message: '请输入课程号!'}, { validator: kcbhDuplicatevalidate }],
kcmc: [{ required: true, message: '请输入课程名称!'},],
skjs: [{ required: true, message: '请输入授课教师!'},],
xkrs: [{ required: true, message: '请输入学科人数!'},],
kkdw: [{ required: true, message: '请输入开课单位!'},],
kcxz: [{ required: true, message: '请输入课程性质!'},],
jkzc: [{ required: true, message: '请输入上课周次!'},],
hh: [{ required: true, message: '请输入节次!'},],
week: [{ required: true, message: '请输入星期!'},],
xf: [{ required: true, message: '请输入学分!'},],
};
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;
});
}
function updateSkjsFn(selectRow) {
console.log(`🚀 -----------------------------------------------------------------🚀`);
console.log(`🚀 ~ file: KcKechengbiaoForm.vue:249 ~ updateSkjsFn ~ ...d:`, selectRow);
console.log(`🚀 -----------------------------------------------------------------🚀`);
let { id, user, cn, collegecode, college, csrq, sfzxm, zdxms } = selectRow;
formData.skjs = cn;
formData.zc = zdxms;
formData.jgh = user;
// formData.skjs
// cn
// ""
// college
// ""
// collegecode
// "166000"
// csrq
// "19561115"
// id
// "114135"
// sfzxm
// "1"
// user
// "1000900003"
// zdxms
// ""
}
async function kcbhDuplicatevalidate(_r, value) {
return duplicateValidate('kc_kechengbiao', 'kcbh', value, formData.id || '')
}
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="关闭">
<KcKechengbiaoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcKechengbiaoForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcKechengbiaoForm from './KcKechengbiaoForm.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

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/ktgl/kcKechengbiao/listGroupBy',
save='/ktgl/kcKechengbiao/editYichu',
edit='/ktgl/kcKechengbiao/editSzkc',
deleteOne = '/ktgl/kcKechengbiao/delete',
deleteBatch = '/ktgl/kcKechengbiao/deleteBatch',
importExcel = '/ktgl/kcKechengbiao/importExcel',
exportXls = '/ktgl/kcKechengbiao/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,381 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
// import { render } from '/@/utils/common/renderUtils';
import { JVxeColumn, JVxeTypes } from '/@/components/jeecg/JVxeTable/types';
//列表数据
export const columns = <JVxeColumn[]>([
{
title: '课程编号',
align: "left",
width: '300px',
key: 'kcbh',
},
{
title: '课程名称',
align: "left",
key: 'kcmc'
},
// {
// title: '授课教师',
// align: "left",
// key: 'skjs'
// },
{
title: '开课单位',
align: "left",
width: '100px',
key: 'kkdw'
},
{
title: '课程性质',
align: "left",
width: '105px',
key: 'kcxz_dictText'
},
// {
// title: '上课地点',
// align: "left",
// width: '100px',
// key: 'skdd'
// },
]);
// export const columns: BasicColumn[] = [
// {
// title: 'id',
// align: "center",
// width: '0',
// dataIndex: 'id',
// // ifShow: false,
// },
// {
// title: '课程号',
// align: "center",
// width: '300px',
// dataIndex: 'kcbh'
// },
// {
// title: '课程名称',
// align: "center",
// dataIndex: 'kcmc'
// },
// {
// title: '授课教师',
// align: "center",
// dataIndex: 'skjs'
// },
// {
// title: '学科人数',
// align: "center",
// width: '80px',
// dataIndex: 'xkrs'
// },
// {
// title: '开课单位',
// align: "center",
// width: '100px',
// dataIndex: 'kkdw_dictText'
// },
// {
// title: '课程性质',
// align: "center",
// width: '105px',
// dataIndex: 'kcxz_dictText'
// },
// {
// title: '上课地点',
// align: "center",
// width: '100px',
// dataIndex: 'skdd'
// },
// {
// title: '上课周次',
// align: "center",
// width: '100px',
// dataIndex: 'jkzc_dictText'
// },
// {
// title: '节次',
// align: "center",
// width: '70px',
// dataIndex: 'hh_dictText'
// },
// {
// title: '星期',
// align: "center",
// width: '70px',
// dataIndex: 'week_dictText'
// },
// {
// title: '学分',
// align: "center",
// width: '50px',
// dataIndex: 'xf'
// },
// {
// title: '是否出镜',
// align: "center",
// dataIndex: 'sfcj',
// edit: true,
// editComponent: 'Select',
// // editComponentProps: {
// // // //选中
// // checkedChildren: "是-",
// // // checkedValue: 0,
// // // //未选中
// // unCheckedChildren:'否-',
// // // unCheckedValue: 1,
// // // onClick: (checked: boolean | string | number, event: Event) => {
// // // event.stopPropagation();
// // // console.log('选择后回调',checked,event);
// // // }
// // },
// // editValueMap: (value) => value == '0'?'是':'否',
// // editValueMap: (value) => value?'0':'1',
// // format: (text) => ,C
// editComponentProps: {
// options: [
// { label: '是', value: 0, },
// { label: '否', value: 1, },
// ],
// },
// // customRender: (r) => r.text == 0?'是':'否'
// },
// {
// title: '上课形式',
// align: "center",
// dataIndex: 'skxs',
// edit: true,
// editComponent: 'Select',
// editComponentProps: {
// options: [
// { label: '线上', value: 0, },
// { label: '线下', value: 1, },
// { label: '线上线下混合', value: 2, },
// ],
// },
// // customRender: (r) => r.text == 0?'线上':r.text == 1?'线下':'线上线下混合'
// },
// ];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "课程名称",
field: 'kcmc',
component: 'Input',
colProps: {span: 6},
},
{
label: "授课教师",
field: 'skjs',
component: 'JDictSelectTag',
componentProps:{
},
colProps: {span: 6},
},
{
label: "开课单位",
field: 'kkdw',
component: 'JDictSelectTag',
componentProps:{
},
colProps: {span: 6},
},
{
label: "课程性质",
field: 'kcxz',
component: 'Input',
colProps: {span: 6},
},
{
label: "节次",
field: 'hh',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skjc"
},
colProps: {span: 6},
},
{
label: "星期几",
field: 'week',
component: 'JDictSelectTag',
componentProps:{
dictCode: "week"
},
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '课程编号',
field: 'kcbh',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入课程编号!'},
{...rules.duplicateCheckRule('kc_kechengbiao', 'kcbh',model,schema)[0]},
];
},
},
{
label: '课程名称',
field: 'kcmc',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入课程名称!'},
];
},
},
{
label: '授课教师',
field: 'skjs',
component: 'JDictSelectTag',
componentProps:{
dictCode: ""
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入授课教师!'},
];
},
},
{
label: '学科人数',
field: 'xkrs',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入学科人数!'},
];
},
},
{
label: '开课单位',
field: 'kkdw',
component: 'JDictSelectTag',
componentProps:{
dictCode: ""
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入开课单位!'},
];
},
},
{
label: '课程性质',
field: 'kcxz',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入课程性质!'},
];
},
},
{
label: '上课地点',
field: 'skdd',
component: 'Input',
},
{
label: '上课周次',
field: 'jkzc',
component: 'JSelectMultiple',
componentProps:{
dictCode: "skzc"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入上课周次!'},
];
},
},
{
label: '节次',
field: 'hh',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skjc"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入节次!'},
];
},
},
{
label: '星期几',
field: 'week',
component: 'JDictSelectTag',
componentProps:{
dictCode: "week"
},
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入星期几!'},
];
},
},
{
label: '直播方式',
field: 'zbfs',
component: 'JDictSelectTag',
componentProps:{
dictCode: "skpt"
},
},
{
label: '会议号',
field: 'hyh',
component: 'Input',
},
{
label: '会议密码',
field: 'hymm',
component: 'Input',
},
{
label: '课程链接',
field: 'kclj',
component: 'Input',
},
{
label: '学分',
field: 'xf',
component: 'Input',
dynamicRules: ({model,schema}) => {
return [
{ required: true, message: '请输入学分!'},
];
},
},
{
label: '是否出镜0-出镜1-不出镜',
field: 'sfcj',
component: 'InputNumber',
},
{
label: '上课形式0-线上1-线下2-线上线下混合',
field: 'skxs',
component: 'InputNumber',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -0,0 +1,219 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container" v-if="!props.isNoSearch">
<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="课程名称或教师名">
<a-input placeholder="请输入课程名称或教师名" v-model:value="queryParam.searchInput"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="课程性质">
<j-dict-select-tag v-model:value="queryParam.kcxz" dictCode="kcxz" placeholder="请选择课程性质"/>
</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-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<vxe-toolbar>
<template #buttons>
</template>
</vxe-toolbar>
<JVxeTable
ref="tableRef"
row-number
row-selection
keep-source
clickSelectRow
rowSelectionType="checkbox"
bordered
:loading="loading"
:dataSource="dataSource"
:columns="columns"
:pagination="pagination"
style="margin-top: 8px"
@page-change="handlePageChange"
@value-change="valueChange"
@select-row-change="selectRowChange"
>
</JVxeTable>
</div>
</template>
<script lang="ts" name="ktgl-kcKechengbiao" setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { propTypes } from '/@/utils/propTypes';
import { useMessage } from '/@/hooks/web/useMessage';
import { columns } from './XzKechengbiao.data';
import { list, batchDelete,deleteOne, saveOrUpdate } from './XzKechengbiao.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JVxeTableInstance } from '/@/components/jeecg/JVxeTable/types';
import { filterObj } from '/@/utils/common/compUtils';
import { defHttp } from '/@/utils/http/axios';
const emit = defineEmits(['register', 'ok']);
//-----------------------------------------------------------------------------------------------------------------
const props = defineProps({
searchParam: propTypes.object.def({}),
isNoSearch: propTypes.bool.def(false)
});
const tableRef = ref<JVxeTableInstance>();
const loading = ref(false);
const selectedRows = ref<any[]>([]);
const selectedRowKeys = ref([]);
const dataSource = ref<any[]>([]);
const pagination = reactive({
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30', '100', '200'],
total: 0,
});
const queryParam = ref<any>({ });
const filterInfo = ref<any>({ });
const registerModal = ref();
const labelCol = reactive({ xs: { span: 24 }, sm: { span: 7 }, });
const wrapperCol = reactive({ xs: { span: 24 }, sm: { span: 16 }, });
const { createMessage } = useMessage();
//--------------------------------------END------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
function add(){
reload()
}
async function submitForm() {
const list = selectedRows.value
for(var i=0;i<list.length;i++){
const info = list[i];
info.szkc = '1'
await saveOrUpdate(info, true).then((res) => {})
}
var url = "/kcSzkc/kcSzkc/addBatch";
var params = {};
defHttp.post({ url: url, params }, { isTransformResponse: false });
createMessage.success("操作成功");
emit('ok');
}
onMounted(() => {
loadData(1);
})
watch(() => props.searchParam, async (newRow, oldRow) => {
reload();
});
//--------------------------------------END---------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
function loadData(pageNo?){
loading.value = true;
if(pageNo == 1){
pagination.current = 1;
}
//
let { current, pageSize } = pagination;
let param = {ywcol:'le20',szkc:'!1',kkdw:'马列教研室', column: 'kcbh', order: 'desc', pageNo: current, pageSize, ...queryParam.value, ...filterInfo.value, ...props.searchParam }
list(filterObj(param)).then(res => {
dataSource.value = res?.records??[];
pagination.total = res?.total??0;
}).finally(() => {
// loading
loading.value = false;
});
}
//
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
function selectRowChange(event) {
selectedRows.value = event.selectedRows;
}
function handlePageChange(event) {
// ,
pagination.current = event.current;
pagination.pageSize = event.pageSize;
//
loadData();
}
function valueChange({ value, col, row }) {
let key = col?.key
let id = row?.id
}
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
//
function reload() {
loadData(1);
}
defineExpose({
add,
submitForm,
});
//-----------------------------------------------------------------------------------------------------------------
</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
}
}
.pl1r {
margin-left: 1rem;
}
</style>

View File

@ -0,0 +1,91 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<XzKechengbiaoList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></XzKechengbiaoList>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import XzKechengbiaoList from './XzKechengbiaoList.vue'
const title = ref<string>('');
const width = ref<string>('100%');
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;
}
.full-modal {
.ant-modal {
max-width: 100%;
top: 0;
padding-bottom: 0;
margin: 0;
}
.ant-modal-content {
display: flex;
flex-direction: column;
height: calc(100vh);
}
.ant-modal-body {
flex: 1;
}
}
</style>

View File

@ -0,0 +1,214 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container" v-if="!props.isNoSearch">
<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="课程名称或教师名">
<a-input placeholder="请输入课程名称或教师名" v-model:value="queryParam.searchInput"></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-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<vxe-toolbar>
<template #buttons>
</template>
</vxe-toolbar>
<JVxeTable
ref="tableRef"
row-number
row-selection
keep-source
clickSelectRow
rowSelectionType="checkbox"
bordered
:loading="loading"
:dataSource="dataSource"
:columns="columns"
:pagination="pagination"
style="margin-top: 8px"
@page-change="handlePageChange"
@value-change="valueChange"
@select-row-change="selectRowChange"
>
</JVxeTable>
</div>
</template>
<script lang="ts" name="ktgl-kcKechengbiao" setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { propTypes } from '/@/utils/propTypes';
import { useMessage } from '/@/hooks/web/useMessage';
import { columns } from './XzKechengbiao.data';
import { list, batchDelete,deleteOne, saveOrUpdate } from './XzKechengbiao.api';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { JVxeTableInstance } from '/@/components/jeecg/JVxeTable/types';
import { filterObj } from '/@/utils/common/compUtils';
import { defHttp } from '/@/utils/http/axios';
const emit = defineEmits(['register', 'ok']);
//-----------------------------------------------------------------------------------------------------------------
const props = defineProps({
searchParam: propTypes.object.def({}),
isNoSearch: propTypes.bool.def(false)
});
const tableRef = ref<JVxeTableInstance>();
const loading = ref(false);
const selectedRows = ref<any[]>([]);
const selectedRowKeys = ref([]);
const dataSource = ref<any[]>([]);
const pagination = reactive({
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30', '100', '200'],
total: 0,
});
const queryParam = ref<any>({ });
const filterInfo = ref<any>({ });
const registerModal = ref();
const labelCol = reactive({ xs: { span: 24 }, sm: { span: 7 }, });
const wrapperCol = reactive({ xs: { span: 24 }, sm: { span: 16 }, });
const { createMessage } = useMessage();
//--------------------------------------END------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
function add(){
reload()
}
async function submitForm() {
const list = selectedRows.value
for(var i=0;i<list.length;i++){
const info = list[i];
info.szkc = '1'
await saveOrUpdate(info, false).then((res) => {})
}
var url = "/kcSzkc/kcSzkc/addBatch";
var params = {};
defHttp.post({ url: url, params }, { isTransformResponse: false });
createMessage.success("操作成功");
emit('ok');
}
onMounted(() => {
loadData(1);
})
watch(() => props.searchParam, async (newRow, oldRow) => {
reload();
});
//--------------------------------------END---------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
function loadData(pageNo?){
loading.value = true;
if(pageNo == 1){
pagination.current = 1;
}
//
let { current, pageSize } = pagination;
let param = {ywcol:'le20',szkc:'1',kkdw:'马列教研室', column: 'kcbh', order: 'desc', pageNo: current, pageSize, ...queryParam.value, ...filterInfo.value, ...props.searchParam }
list(filterObj(param)).then(res => {
dataSource.value = res?.records??[];
pagination.total = res?.total??0;
}).finally(() => {
// loading
loading.value = false;
});
}
//
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
function selectRowChange(event) {
selectedRows.value = event.selectedRows;
}
function handlePageChange(event) {
// ,
pagination.current = event.current;
pagination.pageSize = event.pageSize;
//
loadData();
}
function valueChange({ value, col, row }) {
let key = col?.key
let id = row?.id
}
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
//
function reload() {
loadData(1);
}
defineExpose({
add,
submitForm,
});
//-----------------------------------------------------------------------------------------------------------------
</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
}
}
.pl1r {
margin-left: 1rem;
}
</style>

View File

@ -0,0 +1,91 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<XzKechengbiaoList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></XzKechengbiaoList>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import XzKechengbiaoList from './YcKechengbiaoList.vue'
const title = ref<string>('');
const width = ref<string>('100%');
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;
}
.full-modal {
.ant-modal {
max-width: 100%;
top: 0;
padding-bottom: 0;
margin: 0;
}
.ant-modal-content {
display: flex;
flex-direction: column;
height: calc(100vh);
}
.ant-modal-body {
flex: 1;
}
}
</style>

View File

@ -37,11 +37,12 @@
</div>
</a-col>
<a-col :span="24" v-if="listType == 1 || listType == '1'">
<!-- <a-col :span="24" > -->
<a-row style="text-align: center;">
<a-col :span="8">
<a-col :span="12">
<a-button type="primary" class="yyyClass" @click="toLivePage(item)" :disabled="!item.jsbh || !item.zhjsId">听课</a-button>
</a-col>
<a-col :span="8">
<a-col :span="12">
<a-button type="primary" class="bcClass" @click="funpingjia(item)" >评价</a-button>
</a-col>
<!-- <a-col :span="8">
@ -49,10 +50,16 @@
</a-col> -->
</a-row>
</a-col>
<!-- <a-col :span="24" style="text-align: center;"> -->
<a-col :span="24" v-else style="text-align: center;">
<!-- <a-col :span="24"> -->
<div v-show="isNow(item)">
<a-button type="primary" class="yyyClass" disabled v-if="item.sfyy==1 && item.isdeleted==0">已预约</a-button>
<a-button type="primary" class="yyClass" @click="funYuyue(item)" v-if="item.sfyy==0 || (item.sfyy==1 && item.isdeleted==1)">预约</a-button>
</div>
<div v-show="!isNow(item)">
<a-button type="primary" class="bcClass" @click="funpingjia(item)" >评价</a-button>
</div>
<!-- <a-col :span="24"> -->
<!-- <a-button type="primary" class="bcClass" @click="handleBaocuo(item)">报错</a-button> -->
</a-col>
</a-row>
@ -74,6 +81,7 @@ import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErro
import { getUserId } from '/@/views/site/utils/index';
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
import { useRouter } from 'vue-router'
import dayjs from 'dayjs';
//
import { useUserStore } from '/@/store/modules/user';
@ -135,6 +143,16 @@ async function funYuyue(record){
});
}
function isNow(item){
const jssj = dayjs(item.skrq + " " +item.jssj, 'YYYY-MM-DD hh:mm:ss');
const dqsj = dayjs(new Date(), 'YYYY-MM-DD hh:mm:ss');
if(jssj<dqsj){
return true;
}else{
return false;
}
}
function funpingjia(record){
var item = {ketangbiaoid:record.id}
tingKeZuJiAddModal.value.view(item)

View File

@ -57,9 +57,12 @@
</div>
</a-col>
<a-col :span="25" style="line-height: 50px;">
<div v-show="1 == pageNo">
<div v-show="1 == pageNo && current>0">
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
</div>
<div v-show="current==0">
<div style="text-align: center;"><a @click="funMore">暂无课堂</a></div>
</div>
<div v-show="1 < pageNo && pageNo < current">
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
<div style="text-align: right;margin-top: -51px;"><a @click="funShouqi">收起</a></div>

View File

@ -1,7 +1,7 @@
<template>
<a-card class="rowGutter" id="rkjcDom">
<template #title>
<span style="font-size: 24px;font-weight: bold;">教程</span>
<span style="font-size: 24px;font-weight: bold;"></span>
<span style="margin-left: 10px;"><a href="javascript:void(0);" @click="openChangeKcPage">修改课程提醒</a></span>
</template>
<!-- <template #extra></template> -->