2023年8月14日 新增日志模式记录,保存导入的和未导入的
This commit is contained in:
parent
91e275c30c
commit
80717927c5
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/grab/kcOldEvaluationansBad/list',
|
||||
save='/grab/kcOldEvaluationansBad/add',
|
||||
edit='/grab/kcOldEvaluationansBad/edit',
|
||||
deleteOne = '/grab/kcOldEvaluationansBad/delete',
|
||||
deleteBatch = '/grab/kcOldEvaluationansBad/deleteBatch',
|
||||
importExcel = '/grab/kcOldEvaluationansBad/importExcel',
|
||||
exportXls = '/grab/kcOldEvaluationansBad/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 });
|
||||
}
|
|
@ -0,0 +1,232 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '课程名称',
|
||||
align: "center",
|
||||
dataIndex: 'kcmc'
|
||||
},
|
||||
{
|
||||
title: '开课院系',
|
||||
align: "center",
|
||||
dataIndex: 'kkdw'
|
||||
},
|
||||
{
|
||||
title: '上课教师工号',
|
||||
align: "center",
|
||||
dataIndex: 'jgh'
|
||||
},
|
||||
{
|
||||
title: '上课教师',
|
||||
align: "center",
|
||||
dataIndex: 'skjs'
|
||||
},
|
||||
{
|
||||
title: '上课时间',
|
||||
align: "center",
|
||||
dataIndex: 'sksj'
|
||||
},
|
||||
{
|
||||
title: '课程节次',
|
||||
align: "center",
|
||||
dataIndex: 'hh'
|
||||
},
|
||||
{
|
||||
title: '上课地点',
|
||||
align: "center",
|
||||
dataIndex: 'skdd'
|
||||
},
|
||||
{
|
||||
title: '听课教师工号',
|
||||
align: "center",
|
||||
dataIndex: 'tkjgh'
|
||||
},
|
||||
{
|
||||
title: '听课教师',
|
||||
align: "center",
|
||||
dataIndex: 'tkjs'
|
||||
},
|
||||
{
|
||||
title: '评课时间',
|
||||
align: "center",
|
||||
dataIndex: 'pksj'
|
||||
},
|
||||
{
|
||||
title: '答案1',
|
||||
align: "center",
|
||||
dataIndex: 'ans1'
|
||||
},
|
||||
{
|
||||
title: '答案2',
|
||||
align: "center",
|
||||
dataIndex: 'ans2'
|
||||
},
|
||||
{
|
||||
title: '答案3',
|
||||
align: "center",
|
||||
dataIndex: 'ans3'
|
||||
},
|
||||
{
|
||||
title: '答案4',
|
||||
align: "center",
|
||||
dataIndex: 'ans4'
|
||||
},
|
||||
{
|
||||
title: '答案5',
|
||||
align: "center",
|
||||
dataIndex: 'ans5'
|
||||
},
|
||||
{
|
||||
title: '答案6',
|
||||
align: "center",
|
||||
dataIndex: 'ans6'
|
||||
},
|
||||
{
|
||||
title: '答案7',
|
||||
align: "center",
|
||||
dataIndex: 'ans7'
|
||||
},
|
||||
{
|
||||
title: '答案8',
|
||||
align: "center",
|
||||
dataIndex: 'ans8'
|
||||
},
|
||||
{
|
||||
title: '答案9',
|
||||
align: "center",
|
||||
dataIndex: 'ans9'
|
||||
},
|
||||
{
|
||||
title: '答案10',
|
||||
align: "center",
|
||||
dataIndex: 'ans10'
|
||||
},
|
||||
{
|
||||
title: '学年学期',
|
||||
align: "center",
|
||||
dataIndex: 'xnxq'
|
||||
},
|
||||
];
|
||||
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
];
|
||||
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '课程名称',
|
||||
field: 'kcmc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '开课院系',
|
||||
field: 'kkdw',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课教师工号',
|
||||
field: 'jgh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课教师',
|
||||
field: 'skjs',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课时间',
|
||||
field: 'sksj',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '课程节次',
|
||||
field: 'hh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课地点',
|
||||
field: 'skdd',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课教师工号',
|
||||
field: 'tkjgh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课教师',
|
||||
field: 'tkjs',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '评课时间',
|
||||
field: 'pksj',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案1',
|
||||
field: 'ans1',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案2',
|
||||
field: 'ans2',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案3',
|
||||
field: 'ans3',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案4',
|
||||
field: 'ans4',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案5',
|
||||
field: 'ans5',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案6',
|
||||
field: 'ans6',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案7',
|
||||
field: 'ans7',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案8',
|
||||
field: 'ans8',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案9',
|
||||
field: 'ans9',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案10',
|
||||
field: 'ans10',
|
||||
component: 'InputTextArea',
|
||||
},
|
||||
{
|
||||
label: '学年学期',
|
||||
field: 'xnxq',
|
||||
component: 'Input',
|
||||
},
|
||||
// TODO 主键隐藏字段,目前写死为ID
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
];
|
|
@ -0,0 +1,216 @@
|
|||
<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-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>
|
||||
<!-- 表单区域 -->
|
||||
<KcOldEvaluationansBadModal ref="registerModal" @success="handleSuccess"></KcOldEvaluationansBadModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="grab-kcOldEvaluationansBad" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './KcOldEvaluationansBad.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcOldEvaluationansBad.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import KcOldEvaluationansBadModal from './components/KcOldEvaluationansBadModal.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: handleDetail.bind(null, record),
|
||||
}
|
||||
// {
|
||||
// label: '编辑',
|
||||
// onClick: handleEdit.bind(null, record),
|
||||
// },
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
// , {
|
||||
// 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>
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/grab/kcOldEvaluationansGood/list',
|
||||
save='/grab/kcOldEvaluationansGood/add',
|
||||
edit='/grab/kcOldEvaluationansGood/edit',
|
||||
deleteOne = '/grab/kcOldEvaluationansGood/delete',
|
||||
deleteBatch = '/grab/kcOldEvaluationansGood/deleteBatch',
|
||||
importExcel = '/grab/kcOldEvaluationansGood/importExcel',
|
||||
exportXls = '/grab/kcOldEvaluationansGood/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 });
|
||||
}
|
|
@ -0,0 +1,232 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '课程名称',
|
||||
align: "center",
|
||||
dataIndex: 'kcmc'
|
||||
},
|
||||
{
|
||||
title: '开课院系',
|
||||
align: "center",
|
||||
dataIndex: 'kkdw'
|
||||
},
|
||||
{
|
||||
title: '上课教师工号',
|
||||
align: "center",
|
||||
dataIndex: 'jgh'
|
||||
},
|
||||
{
|
||||
title: '上课教师',
|
||||
align: "center",
|
||||
dataIndex: 'skjs'
|
||||
},
|
||||
{
|
||||
title: '上课时间',
|
||||
align: "center",
|
||||
dataIndex: 'sksj'
|
||||
},
|
||||
{
|
||||
title: '课程节次',
|
||||
align: "center",
|
||||
dataIndex: 'hh'
|
||||
},
|
||||
{
|
||||
title: '上课地点',
|
||||
align: "center",
|
||||
dataIndex: 'skdd'
|
||||
},
|
||||
{
|
||||
title: '听课教师工号',
|
||||
align: "center",
|
||||
dataIndex: 'tkjgh'
|
||||
},
|
||||
{
|
||||
title: '听课教师',
|
||||
align: "center",
|
||||
dataIndex: 'tkjs'
|
||||
},
|
||||
{
|
||||
title: '评课时间',
|
||||
align: "center",
|
||||
dataIndex: 'pksj'
|
||||
},
|
||||
{
|
||||
title: '答案1',
|
||||
align: "center",
|
||||
dataIndex: 'ans1'
|
||||
},
|
||||
{
|
||||
title: '答案2',
|
||||
align: "center",
|
||||
dataIndex: 'ans2'
|
||||
},
|
||||
{
|
||||
title: '答案3',
|
||||
align: "center",
|
||||
dataIndex: 'ans3'
|
||||
},
|
||||
{
|
||||
title: '答案4',
|
||||
align: "center",
|
||||
dataIndex: 'ans4'
|
||||
},
|
||||
{
|
||||
title: '答案5',
|
||||
align: "center",
|
||||
dataIndex: 'ans5'
|
||||
},
|
||||
{
|
||||
title: '答案6',
|
||||
align: "center",
|
||||
dataIndex: 'ans6'
|
||||
},
|
||||
{
|
||||
title: '答案7',
|
||||
align: "center",
|
||||
dataIndex: 'ans7'
|
||||
},
|
||||
{
|
||||
title: '答案8',
|
||||
align: "center",
|
||||
dataIndex: 'ans8'
|
||||
},
|
||||
{
|
||||
title: '答案9',
|
||||
align: "center",
|
||||
dataIndex: 'ans9'
|
||||
},
|
||||
{
|
||||
title: '答案10',
|
||||
align: "center",
|
||||
dataIndex: 'ans10'
|
||||
},
|
||||
{
|
||||
title: '学年学期',
|
||||
align: "center",
|
||||
dataIndex: 'xnxq'
|
||||
},
|
||||
];
|
||||
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
];
|
||||
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '课程名称',
|
||||
field: 'kcmc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '开课院系',
|
||||
field: 'kkdw',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课教师工号',
|
||||
field: 'jgh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课教师',
|
||||
field: 'skjs',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课时间',
|
||||
field: 'sksj',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '课程节次',
|
||||
field: 'hh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '上课地点',
|
||||
field: 'skdd',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课教师工号',
|
||||
field: 'tkjgh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课教师',
|
||||
field: 'tkjs',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '评课时间',
|
||||
field: 'pksj',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案1',
|
||||
field: 'ans1',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案2',
|
||||
field: 'ans2',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案3',
|
||||
field: 'ans3',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案4',
|
||||
field: 'ans4',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案5',
|
||||
field: 'ans5',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案6',
|
||||
field: 'ans6',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案7',
|
||||
field: 'ans7',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案8',
|
||||
field: 'ans8',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案9',
|
||||
field: 'ans9',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '答案10',
|
||||
field: 'ans10',
|
||||
component: 'InputTextArea',
|
||||
},
|
||||
{
|
||||
label: '学年学期',
|
||||
field: 'xnxq',
|
||||
component: 'Input',
|
||||
},
|
||||
// TODO 主键隐藏字段,目前写死为ID
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
];
|
|
@ -0,0 +1,216 @@
|
|||
<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-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>
|
||||
<!-- 表单区域 -->
|
||||
<KcOldEvaluationansGoodModal ref="registerModal" @success="handleSuccess"></KcOldEvaluationansGoodModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="grab-kcOldEvaluationansGood" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './KcOldEvaluationansGood.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcOldEvaluationansGood.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import KcOldEvaluationansGoodModal from './components/KcOldEvaluationansGoodModal.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: handleDetail.bind(null, record),
|
||||
}
|
||||
// {
|
||||
// label: '编辑',
|
||||
// onClick: handleEdit.bind(null, record),
|
||||
// },
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
// , {
|
||||
// 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>
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/grab/xxhbbkjxtkpjGoodLog/list',
|
||||
save='/grab/xxhbbkjxtkpjGoodLog/add',
|
||||
edit='/grab/xxhbbkjxtkpjGoodLog/edit',
|
||||
deleteOne = '/grab/xxhbbkjxtkpjGoodLog/delete',
|
||||
deleteBatch = '/grab/xxhbbkjxtkpjGoodLog/deleteBatch',
|
||||
importExcel = '/grab/xxhbbkjxtkpjGoodLog/importExcel',
|
||||
exportXls = '/grab/xxhbbkjxtkpjGoodLog/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 });
|
||||
}
|
|
@ -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: 'bh'
|
||||
},
|
||||
{
|
||||
title: '轮次编号',
|
||||
align: "center",
|
||||
dataIndex: 'lcbh'
|
||||
},
|
||||
{
|
||||
title: '轮次出镜人',
|
||||
align: "center",
|
||||
dataIndex: 'lccjr'
|
||||
},
|
||||
{
|
||||
title: '听课人工号',
|
||||
align: "center",
|
||||
dataIndex: 'tkrgh'
|
||||
},
|
||||
{
|
||||
title: '听课人姓名',
|
||||
align: "center",
|
||||
dataIndex: 'tkrxm'
|
||||
},
|
||||
{
|
||||
title: '听课人单位名称',
|
||||
align: "center",
|
||||
dataIndex: 'tkrdwmc'
|
||||
},
|
||||
{
|
||||
title: '听课时间学期',
|
||||
align: "center",
|
||||
dataIndex: 'tksjxq'
|
||||
},
|
||||
{
|
||||
title: '课程节次',
|
||||
align: "center",
|
||||
dataIndex: 'kcjc'
|
||||
},
|
||||
{
|
||||
title: '课程节次(转换后)',
|
||||
align: "center",
|
||||
dataIndex: 'hh'
|
||||
},
|
||||
{
|
||||
title: '课程单位',
|
||||
align: "center",
|
||||
dataIndex: 'kcdm'
|
||||
},
|
||||
{
|
||||
title: '听课教师',
|
||||
align: "center",
|
||||
dataIndex: 'tkjs'
|
||||
},
|
||||
{
|
||||
title: '听课课程名称',
|
||||
align: "center",
|
||||
dataIndex: 'tkkcmc'
|
||||
},
|
||||
{
|
||||
title: '任课教师',
|
||||
align: "center",
|
||||
dataIndex: 'rkjs'
|
||||
},
|
||||
{
|
||||
title: '总体评价',
|
||||
align: "center",
|
||||
dataIndex: 'ztpj'
|
||||
},
|
||||
{
|
||||
title: '教师工号',
|
||||
align: "center",
|
||||
dataIndex: 'jsgh'
|
||||
},
|
||||
{
|
||||
title: '全体意见',
|
||||
align: "center",
|
||||
dataIndex: 'qtyj'
|
||||
},
|
||||
{
|
||||
title: '教师评估1',
|
||||
align: "center",
|
||||
dataIndex: 'jspg1'
|
||||
},
|
||||
{
|
||||
title: '教师评估2',
|
||||
align: "center",
|
||||
dataIndex: 'jspg2'
|
||||
},
|
||||
{
|
||||
title: '教师评估3',
|
||||
align: "center",
|
||||
dataIndex: 'jspg3'
|
||||
},
|
||||
{
|
||||
title: '教师评估4',
|
||||
align: "center",
|
||||
dataIndex: 'jspg4'
|
||||
},
|
||||
{
|
||||
title: '教师评估5',
|
||||
align: "center",
|
||||
dataIndex: 'jspg5'
|
||||
},
|
||||
{
|
||||
title: '学生评估1',
|
||||
align: "center",
|
||||
dataIndex: 'xspg1'
|
||||
},
|
||||
{
|
||||
title: '学生评估2',
|
||||
align: "center",
|
||||
dataIndex: 'xspg2'
|
||||
},
|
||||
{
|
||||
title: '学生评估3',
|
||||
align: "center",
|
||||
dataIndex: 'xspg3'
|
||||
},
|
||||
{
|
||||
title: '课程编号',
|
||||
align: "center",
|
||||
dataIndex: 'kcbh'
|
||||
},
|
||||
{
|
||||
title: '时间戳',
|
||||
align: "center",
|
||||
dataIndex: 'timestamps',
|
||||
customRender:({text}) =>{
|
||||
return !text?"":(text.length>10?text.substr(0,10):text);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '课表编号',
|
||||
align: "center",
|
||||
dataIndex: 'kbbh'
|
||||
},
|
||||
];
|
||||
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
];
|
||||
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '编号',
|
||||
field: 'bh',
|
||||
component: 'Input',
|
||||
dynamicRules: ({model,schema}) => {
|
||||
return [
|
||||
{ required: true, message: '请输入编号!'},
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '轮次编号',
|
||||
field: 'lcbh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '轮次出镜人',
|
||||
field: 'lccjr',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课人工号',
|
||||
field: 'tkrgh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课人姓名',
|
||||
field: 'tkrxm',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课人单位名称',
|
||||
field: 'tkrdwmc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课时间学期',
|
||||
field: 'tksjxq',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '课程节次',
|
||||
field: 'kcjc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '课程节次(转换后)',
|
||||
field: 'hh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '课程单位',
|
||||
field: 'kcdm',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课教师',
|
||||
field: 'tkjs',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '听课课程名称',
|
||||
field: 'tkkcmc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '任课教师',
|
||||
field: 'rkjs',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '总体评价',
|
||||
field: 'ztpj',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '教师工号',
|
||||
field: 'jsgh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '全体意见',
|
||||
field: 'qtyj',
|
||||
component: 'InputTextArea',
|
||||
},
|
||||
{
|
||||
label: '教师评估1',
|
||||
field: 'jspg1',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '教师评估2',
|
||||
field: 'jspg2',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '教师评估3',
|
||||
field: 'jspg3',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '教师评估4',
|
||||
field: 'jspg4',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '教师评估5',
|
||||
field: 'jspg5',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '学生评估1',
|
||||
field: 'xspg1',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '学生评估2',
|
||||
field: 'xspg2',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '学生评估3',
|
||||
field: 'xspg3',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '课程编号',
|
||||
field: 'kcbh',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '时间戳',
|
||||
field: 'timestamps',
|
||||
component: 'DatePicker',
|
||||
},
|
||||
{
|
||||
label: '课表编号',
|
||||
field: 'kbbh',
|
||||
component: 'Input',
|
||||
},
|
||||
// TODO 主键隐藏字段,目前写死为ID
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
];
|
|
@ -0,0 +1,302 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="学期学年">
|
||||
<j-dict-select-tag placeholder="请选择学期学年" v-model:value="queryParam.xqxn" dictCode="kc_xqxn_history,title,title,true order by start_time desc"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="编号">
|
||||
<a-input placeholder="请输入编号" v-model:value="queryParam.bh"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="轮次编号">
|
||||
<a-input placeholder="请输入轮次编号" v-model:value="queryParam.lcbh"></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.lccjr"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="听课人工号">
|
||||
<a-input placeholder="请输入听课人工号" v-model:value="queryParam.tkrgh"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="听课人姓名">
|
||||
<a-input placeholder="请输入听课人姓名" v-model:value="queryParam.tkrxm"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="听课人单位名称">
|
||||
<a-input placeholder="请输入听课人单位名称" v-model:value="queryParam.tkrdwmc"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="听课时间学期">
|
||||
<a-input placeholder="请输入听课时间学期" v-model:value="queryParam.tksjxq"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="课程节次">
|
||||
<a-input placeholder="请输入课程节次" v-model:value="queryParam.kcjc"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="课程单位">
|
||||
<a-input placeholder="请输入课程单位" v-model:value="queryParam.kcdm"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="听课教师">
|
||||
<a-input placeholder="请输入听课教师" v-model:value="queryParam.tkjs"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="听课课程名称">
|
||||
<a-input placeholder="请输入听课课程名称" v-model:value="queryParam.tkkcmc"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="任课教师">
|
||||
<a-input placeholder="请输入任课教师" v-model:value="queryParam.rkjs"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="教师工号">
|
||||
<a-input placeholder="请输入教师工号" v-model:value="queryParam.jsgh"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<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-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择时间戳" v-model:value="queryParam.timestamps" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="课表编号">
|
||||
<a-input placeholder="请输入课表编号" v-model:value="queryParam.kbbh"></a-input>
|
||||
</a-form-item>
|
||||
</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>
|
||||
<!-- 表单区域 -->
|
||||
<XxhbbkjxtkpjGoodLogModal ref="registerModal" @success="handleSuccess"></XxhbbkjxtkpjGoodLogModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="grab-xxhbbkjxtkpjGoodLog" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './XxhbbkjxtkpjGoodLog.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './XxhbbkjxtkpjGoodLog.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import XxhbbkjxtkpjGoodLogModal from './components/XxhbbkjxtkpjGoodLogModal.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: handleDetail.bind(null, record),
|
||||
}
|
||||
// {
|
||||
// label: '编辑',
|
||||
// onClick: handleEdit.bind(null, record),
|
||||
// },
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
// , {
|
||||
// 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>
|
|
@ -0,0 +1,247 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="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.kkdw">
|
||||
<a-input v-model:value="formData.kkdw" placeholder="请输入开课院系" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="上课教师工号" v-bind="validateInfos.jgh">
|
||||
<a-input v-model:value="formData.jgh" placeholder="请输入上课教师工号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<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="12">
|
||||
<a-form-item label="上课时间" v-bind="validateInfos.sksj">
|
||||
<a-input v-model:value="formData.sksj" placeholder="请输入上课时间" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程节次" v-bind="validateInfos.hh">
|
||||
<a-input v-model:value="formData.hh" 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="听课教师工号" v-bind="validateInfos.tkjgh">
|
||||
<a-input v-model:value="formData.tkjgh" placeholder="请输入听课教师工号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课教师" v-bind="validateInfos.tkjs">
|
||||
<a-input v-model:value="formData.tkjs" placeholder="请输入听课教师" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="评课时间" v-bind="validateInfos.pksj">
|
||||
<a-input v-model:value="formData.pksj" placeholder="请输入评课时间" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案1" v-bind="validateInfos.ans1">
|
||||
<a-input v-model:value="formData.ans1" placeholder="请输入答案1" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案2" v-bind="validateInfos.ans2">
|
||||
<a-input v-model:value="formData.ans2" placeholder="请输入答案2" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案3" v-bind="validateInfos.ans3">
|
||||
<a-input v-model:value="formData.ans3" placeholder="请输入答案3" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案4" v-bind="validateInfos.ans4">
|
||||
<a-input v-model:value="formData.ans4" placeholder="请输入答案4" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案5" v-bind="validateInfos.ans5">
|
||||
<a-input v-model:value="formData.ans5" placeholder="请输入答案5" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案6" v-bind="validateInfos.ans6">
|
||||
<a-input v-model:value="formData.ans6" placeholder="请输入答案6" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案7" v-bind="validateInfos.ans7">
|
||||
<a-input v-model:value="formData.ans7" placeholder="请输入答案7" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案8" v-bind="validateInfos.ans8">
|
||||
<a-input v-model:value="formData.ans8" placeholder="请输入答案8" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案9" v-bind="validateInfos.ans9">
|
||||
<a-input v-model:value="formData.ans9" placeholder="请输入答案9" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案10" v-bind="validateInfos.ans10">
|
||||
<a-textarea v-model:value="formData.ans10" rows="4" placeholder="请输入答案10" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学年学期" v-bind="validateInfos.xnxq">
|
||||
<a-input v-model:value="formData.xnxq" placeholder="请输入学年学期" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../KcOldEvaluationansBad.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: '',
|
||||
kcmc: '',
|
||||
kkdw: '',
|
||||
jgh: '',
|
||||
skjs: '',
|
||||
sksj: '',
|
||||
hh: '',
|
||||
skdd: '',
|
||||
tkjgh: '',
|
||||
tkjs: '',
|
||||
pksj: '',
|
||||
ans1: '',
|
||||
ans2: '',
|
||||
ans3: '',
|
||||
ans4: '',
|
||||
ans5: '',
|
||||
ans6: '',
|
||||
ans7: '',
|
||||
ans8: '',
|
||||
ans9: '',
|
||||
ans10: '',
|
||||
xnxq: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const 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>
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<KcOldEvaluationansBadForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcOldEvaluationansBadForm>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import KcOldEvaluationansBadForm from './KcOldEvaluationansBadForm.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(1000);
|
||||
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>
|
|
@ -0,0 +1,247 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="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.kkdw">
|
||||
<a-input v-model:value="formData.kkdw" placeholder="请输入开课院系" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="上课教师工号" v-bind="validateInfos.jgh">
|
||||
<a-input v-model:value="formData.jgh" placeholder="请输入上课教师工号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<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="12">
|
||||
<a-form-item label="上课时间" v-bind="validateInfos.sksj">
|
||||
<a-input v-model:value="formData.sksj" placeholder="请输入上课时间" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程节次" v-bind="validateInfos.hh">
|
||||
<a-input v-model:value="formData.hh" 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="听课教师工号" v-bind="validateInfos.tkjgh">
|
||||
<a-input v-model:value="formData.tkjgh" placeholder="请输入听课教师工号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课教师" v-bind="validateInfos.tkjs">
|
||||
<a-input v-model:value="formData.tkjs" placeholder="请输入听课教师" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="评课时间" v-bind="validateInfos.pksj">
|
||||
<a-input v-model:value="formData.pksj" placeholder="请输入评课时间" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案1" v-bind="validateInfos.ans1">
|
||||
<a-input v-model:value="formData.ans1" placeholder="请输入答案1" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案2" v-bind="validateInfos.ans2">
|
||||
<a-input v-model:value="formData.ans2" placeholder="请输入答案2" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案3" v-bind="validateInfos.ans3">
|
||||
<a-input v-model:value="formData.ans3" placeholder="请输入答案3" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案4" v-bind="validateInfos.ans4">
|
||||
<a-input v-model:value="formData.ans4" placeholder="请输入答案4" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案5" v-bind="validateInfos.ans5">
|
||||
<a-input v-model:value="formData.ans5" placeholder="请输入答案5" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案6" v-bind="validateInfos.ans6">
|
||||
<a-input v-model:value="formData.ans6" placeholder="请输入答案6" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案7" v-bind="validateInfos.ans7">
|
||||
<a-input v-model:value="formData.ans7" placeholder="请输入答案7" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案8" v-bind="validateInfos.ans8">
|
||||
<a-input v-model:value="formData.ans8" placeholder="请输入答案8" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案9" v-bind="validateInfos.ans9">
|
||||
<a-input v-model:value="formData.ans9" placeholder="请输入答案9" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="答案10" v-bind="validateInfos.ans10">
|
||||
<a-textarea v-model:value="formData.ans10" rows="4" placeholder="请输入答案10" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学年学期" v-bind="validateInfos.xnxq">
|
||||
<a-input v-model:value="formData.xnxq" placeholder="请输入学年学期" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../KcOldEvaluationansGood.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: '',
|
||||
kcmc: '',
|
||||
kkdw: '',
|
||||
jgh: '',
|
||||
skjs: '',
|
||||
sksj: '',
|
||||
hh: '',
|
||||
skdd: '',
|
||||
tkjgh: '',
|
||||
tkjs: '',
|
||||
pksj: '',
|
||||
ans1: '',
|
||||
ans2: '',
|
||||
ans3: '',
|
||||
ans4: '',
|
||||
ans5: '',
|
||||
ans6: '',
|
||||
ans7: '',
|
||||
ans8: '',
|
||||
ans9: '',
|
||||
ans10: '',
|
||||
xnxq: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const 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>
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<KcOldEvaluationansGoodForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcOldEvaluationansGoodForm>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import KcOldEvaluationansGoodForm from './KcOldEvaluationansGoodForm.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(1000);
|
||||
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>
|
|
@ -2,132 +2,132 @@
|
|||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="编号" v-bind="validateInfos.bh">
|
||||
<a-input v-model:value="formData.bh" placeholder="请输入编号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="轮次编号" v-bind="validateInfos.lcbh">
|
||||
<a-input v-model:value="formData.lcbh" placeholder="请输入轮次编号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="轮次出镜人" v-bind="validateInfos.lccjr">
|
||||
<a-input v-model:value="formData.lccjr" placeholder="请输入轮次出镜人" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课人工号" v-bind="validateInfos.tkrgh">
|
||||
<a-input v-model:value="formData.tkrgh" placeholder="请输入听课人工号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课人姓名" v-bind="validateInfos.tkrxm">
|
||||
<a-input v-model:value="formData.tkrxm" placeholder="请输入听课人姓名" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课人单位名称" v-bind="validateInfos.tkrdwmc">
|
||||
<a-input v-model:value="formData.tkrdwmc" placeholder="请输入听课人单位名称" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课时间学期" v-bind="validateInfos.tksjxq">
|
||||
<a-input v-model:value="formData.tksjxq" placeholder="请输入听课时间学期" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程节次" v-bind="validateInfos.kcjc">
|
||||
<a-input v-model:value="formData.kcjc" placeholder="请输入课程节次" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程单位" v-bind="validateInfos.kcdm">
|
||||
<a-input v-model:value="formData.kcdm" placeholder="请输入课程单位" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课教师" v-bind="validateInfos.tkjs">
|
||||
<a-input v-model:value="formData.tkjs" placeholder="请输入听课教师" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课课程名称" v-bind="validateInfos.tkkcmc">
|
||||
<a-input v-model:value="formData.tkkcmc" placeholder="请输入听课课程名称" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="任课教师" v-bind="validateInfos.rkjs">
|
||||
<a-input v-model:value="formData.rkjs" placeholder="请输入任课教师" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="总体评价" v-bind="validateInfos.ztpj">
|
||||
<a-input v-model:value="formData.ztpj" placeholder="请输入总体评价" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师工号" v-bind="validateInfos.jsgh">
|
||||
<a-input v-model:value="formData.jsgh" placeholder="请输入教师工号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="全体意见" v-bind="validateInfos.qtyj">
|
||||
<a-textarea v-model:value="formData.qtyj" rows="4" placeholder="请输入全体意见" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估1" v-bind="validateInfos.jspg1">
|
||||
<a-input v-model:value="formData.jspg1" placeholder="请输入教师评估1" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估2" v-bind="validateInfos.jspg2">
|
||||
<a-input v-model:value="formData.jspg2" placeholder="请输入教师评估2" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估3" v-bind="validateInfos.jspg3">
|
||||
<a-input v-model:value="formData.jspg3" placeholder="请输入教师评估3" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估4" v-bind="validateInfos.jspg4">
|
||||
<a-input v-model:value="formData.jspg4" placeholder="请输入教师评估4" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估5" v-bind="validateInfos.jspg5">
|
||||
<a-input v-model:value="formData.jspg5" placeholder="请输入教师评估5" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学生评估1" v-bind="validateInfos.xspg1">
|
||||
<a-input v-model:value="formData.xspg1" placeholder="请输入学生评估1" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学生评估2" v-bind="validateInfos.xspg2">
|
||||
<a-input v-model:value="formData.xspg2" placeholder="请输入学生评估2" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学生评估3" v-bind="validateInfos.xspg3">
|
||||
<a-input v-model:value="formData.xspg3" placeholder="请输入学生评估3" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="时间戳" v-bind="validateInfos.timestamps">
|
||||
<a-date-picker placeholder="请选择时间戳" v-model:value="formData.timestamps" value-format="YYYY-MM-DD" style="width: 100%" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课表编号" v-bind="validateInfos.kbbh">
|
||||
<a-input v-model:value="formData.kbbh" placeholder="请输入课表编号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
|
@ -144,7 +144,7 @@
|
|||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../XxhbbkjxtkpjBadLog.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: ()=>{} },
|
||||
|
@ -204,7 +204,7 @@
|
|||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import XxhbbkjxtkpjBadLogForm from './XxhbbkjxtkpjBadLogForm.vue'
|
||||
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const width = ref<number>(1000);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
|
@ -25,7 +25,7 @@
|
|||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
|
@ -37,7 +37,7 @@
|
|||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,284 @@
|
|||
<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.bh">
|
||||
<a-input v-model:value="formData.bh" placeholder="请输入编号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="轮次编号" v-bind="validateInfos.lcbh">
|
||||
<a-input v-model:value="formData.lcbh" placeholder="请输入轮次编号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="轮次出镜人" v-bind="validateInfos.lccjr">
|
||||
<a-input v-model:value="formData.lccjr" placeholder="请输入轮次出镜人" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课人工号" v-bind="validateInfos.tkrgh">
|
||||
<a-input v-model:value="formData.tkrgh" placeholder="请输入听课人工号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课人姓名" v-bind="validateInfos.tkrxm">
|
||||
<a-input v-model:value="formData.tkrxm" placeholder="请输入听课人姓名" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课人单位名称" v-bind="validateInfos.tkrdwmc">
|
||||
<a-input v-model:value="formData.tkrdwmc" placeholder="请输入听课人单位名称" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课时间学期" v-bind="validateInfos.tksjxq">
|
||||
<a-input v-model:value="formData.tksjxq" placeholder="请输入听课时间学期" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程节次" v-bind="validateInfos.kcjc">
|
||||
<a-input v-model:value="formData.kcjc" placeholder="请输入课程节次" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程节次(转换后)" v-bind="validateInfos.hh">
|
||||
<a-input v-model:value="formData.hh" placeholder="请输入课程节次(转换后)" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程单位" v-bind="validateInfos.kcdm">
|
||||
<a-input v-model:value="formData.kcdm" placeholder="请输入课程单位" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课教师" v-bind="validateInfos.tkjs">
|
||||
<a-input v-model:value="formData.tkjs" placeholder="请输入听课教师" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="听课课程名称" v-bind="validateInfos.tkkcmc">
|
||||
<a-input v-model:value="formData.tkkcmc" placeholder="请输入听课课程名称" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="任课教师" v-bind="validateInfos.rkjs">
|
||||
<a-input v-model:value="formData.rkjs" placeholder="请输入任课教师" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="总体评价" v-bind="validateInfos.ztpj">
|
||||
<a-input v-model:value="formData.ztpj" placeholder="请输入总体评价" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师工号" v-bind="validateInfos.jsgh">
|
||||
<a-input v-model:value="formData.jsgh" placeholder="请输入教师工号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="全体意见" v-bind="validateInfos.qtyj">
|
||||
<a-textarea v-model:value="formData.qtyj" rows="4" placeholder="请输入全体意见" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估1" v-bind="validateInfos.jspg1">
|
||||
<a-input v-model:value="formData.jspg1" placeholder="请输入教师评估1" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估2" v-bind="validateInfos.jspg2">
|
||||
<a-input v-model:value="formData.jspg2" placeholder="请输入教师评估2" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估3" v-bind="validateInfos.jspg3">
|
||||
<a-input v-model:value="formData.jspg3" placeholder="请输入教师评估3" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估4" v-bind="validateInfos.jspg4">
|
||||
<a-input v-model:value="formData.jspg4" placeholder="请输入教师评估4" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="教师评估5" v-bind="validateInfos.jspg5">
|
||||
<a-input v-model:value="formData.jspg5" placeholder="请输入教师评估5" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学生评估1" v-bind="validateInfos.xspg1">
|
||||
<a-input v-model:value="formData.xspg1" placeholder="请输入学生评估1" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学生评估2" v-bind="validateInfos.xspg2">
|
||||
<a-input v-model:value="formData.xspg2" placeholder="请输入学生评估2" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学生评估3" v-bind="validateInfos.xspg3">
|
||||
<a-input v-model:value="formData.xspg3" placeholder="请输入学生评估3" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<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.timestamps">
|
||||
<a-date-picker placeholder="请选择时间戳" v-model:value="formData.timestamps" value-format="YYYY-MM-DD" style="width: 100%" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课表编号" v-bind="validateInfos.kbbh">
|
||||
<a-input v-model:value="formData.kbbh" placeholder="请输入课表编号" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../XxhbbkjxtkpjGoodLog.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: '',
|
||||
bh: '',
|
||||
lcbh: '',
|
||||
lccjr: '',
|
||||
tkrgh: '',
|
||||
tkrxm: '',
|
||||
tkrdwmc: '',
|
||||
tksjxq: '',
|
||||
kcjc: '',
|
||||
hh: '',
|
||||
kcdm: '',
|
||||
tkjs: '',
|
||||
tkkcmc: '',
|
||||
rkjs: '',
|
||||
ztpj: '',
|
||||
jsgh: '',
|
||||
qtyj: '',
|
||||
jspg1: '',
|
||||
jspg2: '',
|
||||
jspg3: '',
|
||||
jspg4: '',
|
||||
jspg5: '',
|
||||
xspg1: '',
|
||||
xspg2: '',
|
||||
xspg3: '',
|
||||
kcbh: '',
|
||||
timestamps: '',
|
||||
kbbh: '',
|
||||
});
|
||||
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 = {
|
||||
bh: [{ 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;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
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>
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<XxhbbkjxtkpjGoodLogForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></XxhbbkjxtkpjGoodLogForm>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import XxhbbkjxtkpjGoodLogForm from './XxhbbkjxtkpjGoodLogForm.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(1000);
|
||||
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>
|
Loading…
Reference in New Issue