2023年7月27日 修改问题,

This commit is contained in:
bai 2023-07-27 00:24:40 +08:00
parent c8fe2b86ef
commit d3479915bd
9 changed files with 1234 additions and 54 deletions

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/grab/xxhbbkjxtkpjBadLog/list',
save='/grab/xxhbbkjxtkpjBadLog/add',
edit='/grab/xxhbbkjxtkpjBadLog/edit',
deleteOne = '/grab/xxhbbkjxtkpjBadLog/delete',
deleteBatch = '/grab/xxhbbkjxtkpjBadLog/deleteBatch',
importExcel = '/grab/xxhbbkjxtkpjBadLog/importExcel',
exportXls = '/grab/xxhbbkjxtkpjBadLog/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,386 @@
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: '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[] = [
{
label: "编号",
field: 'bh',
component: 'Input',
colProps: {span: 6},
},
{
label: "轮次编号",
field: 'lcbh',
component: 'Input',
colProps: {span: 6},
},
{
label: "轮次出镜人",
field: 'lccjr',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课人工号",
field: 'tkrgh',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课人姓名",
field: 'tkrxm',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课人单位名称",
field: 'tkrdwmc',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课时间学期",
field: 'tksjxq',
component: 'Input',
colProps: {span: 6},
},
{
label: "课程节次",
field: 'kcjc',
component: 'Input',
colProps: {span: 6},
},
{
label: "课程单位",
field: 'kcdm',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课教师",
field: 'tkjs',
component: 'Input',
colProps: {span: 6},
},
{
label: "听课课程名称",
field: 'tkkcmc',
component: 'Input',
colProps: {span: 6},
},
{
label: "任课教师",
field: 'rkjs',
component: 'Input',
colProps: {span: 6},
},
{
label: "教师工号",
field: 'jsgh',
component: 'Input',
colProps: {span: 6},
},
{
label: "课程编号",
field: 'kcbh',
component: 'Input',
colProps: {span: 6},
},
{
label: "时间戳",
field: 'timestamps',
component: 'DatePicker',
colProps: {span: 6},
},
{
label: "课表编号",
field: 'kbbh',
component: 'Input',
colProps: {span: 6},
},
];
//表单数据
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: '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,
},
];

View File

@ -0,0 +1,311 @@
<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.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>
<!--</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>
<!-- 表单区域 -->
<XxhbbkjxtkpjBadLogModal ref="registerModal" @success="handleSuccess"></XxhbbkjxtkpjBadLogModal>
</div>
</template>
<script lang="ts" name="grab-xxhbbkjxtkpjBadLog" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './XxhbbkjxtkpjBadLog.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './XxhbbkjxtkpjBadLog.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import XxhbbkjxtkpjBadLogModal from './components/XxhbbkjxtkpjBadLogModal.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),
label: '详情',
onClick: handleDetail.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,278 @@
<template>
<a-spin :spinning="confirmLoading">
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-row>
<a-col :span="24">
<a-form-item label="编号" v-bind="validateInfos.bh">
<a-input v-model:value="formData.bh" placeholder="请输入编号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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 '../XxhbbkjxtkpjBadLog.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: '',
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>

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="关闭">
<XxhbbkjxtkpjBadLogForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></XxhbbkjxtkpjBadLogForm>
</a-modal>
</template>
<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 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

@ -215,6 +215,7 @@
columns,
canResize:false,
useSearchForm: false,
showActionColumn: false,
actionColumn: {
width: 120,
fixed: 'right',

View File

@ -5,7 +5,19 @@
<!-- <div style="text-align: center;">{{ form.kcmc }}-{{ form.skjs }}-星期{{ form.WEEK }}-{{ form.hh }}</div> -->
教师评价
</template>
<baseForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"/>
<a-card>
<a-tabs v-model:activeKey="activeKey" @change="changeTab">
<a-tab-pane key="1" tab="听课记录">
<baseForm ref="registerForm1" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false" :param="{ evaluationver: '3' }"/>
</a-tab-pane>
<a-tab-pane key="2" tab="同行专家">
<baseForm ref="registerForm2" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false" :param="{ evaluationver: '4' }"/>
</a-tab-pane>
<a-tab-pane key="3" tab="线上听课">
<baseForm ref="registerForm3" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false" :param="{ evaluationver: '2' }"/>
</a-tab-pane>
</a-tabs>
</a-card>
</a-modal>
</div>
</template>
@ -17,31 +29,51 @@
const width = ref<number>(1200);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const registerForm1 = ref();
const registerForm2 = ref();
const registerForm3 = ref();
const form = ref();
const activeKey = ref<any>('1');
const recordData = ref<any>({});
function getPDom() {
return document.querySelector('.pjjgPageBase')
}
function getActiveKeyRef():any{
if(activeKey.value == '1'){
return registerForm1.value;
}else if(activeKey.value == '2'){
return registerForm2.value;
}else if(activeKey.value == '3'){
return registerForm3.value;
}
return null;
}
/**
* 新增
*/
function view(record) {
activeKey.value = '1';
recordData.value = record;
visible.value = true;
disableSubmit.value = true;
console.log(`🚀 ~ file: viewModal.vue:32 ~ view ~ disableSubmit.value:`, disableSubmit.value)
form.value = record;
nextTick(() => {
registerForm.value.view(record);
//getActiveKeyRef().view(record);
registerForm1.value.view(record);
registerForm2.value.view(record);
registerForm3.value.view(record);
});
}
/**
/**z
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
getActiveKeyRef()?.submitForm();
}
/**
@ -58,6 +90,13 @@
visible.value = false;
}
function changeTab(activeKey) {
getActiveKeyRef()?.view(recordData.value);
// registerForm1.value.view(recordData.value);
// registerForm2.value.view(recordData.value);
// registerForm3.value.view(recordData.value);
}
defineExpose({
view,
disableSubmit,

View File

@ -3,8 +3,61 @@
<!-- <a-list item-layout="horizontal" :data-source="list" :loading="loadingList" :grid="{ column: }"> -->
<template #renderItem="{ item }">
<a-list-item>
<a-card>
<div class="wenZiJiaCu fs1d1r">
<div style="border: 2px #eef1f2 solid;">
<div>
<div style="width: 100%;height: 20px;background-color: #1c84c6;"></div>
<div style="width:100%;white-space:normal; word-break:break-all;overflow:hidden;padding: 10px;height: 70px;font-weight: 600;font-size: 16px;">
{{ item.kcmc }} <template v-if="item.szkc == '1'" title="思政课程"></template>
</div>
</div>
<a-divider style="margin: 0px;color: #eef1f2;" />
<div style="padding: 20px;font-weight: 600;">
<a-row>
<a-col :span="16">
<div style="height: 38px;font-size: 16px;font-weight: 700;">{{ item.skjs }}</div>
<div style="font-size: 14px;font-weight: 700;height: 50px;">{{ item.kkdw }}</div>
</a-col>
<a-col :span="8" style="text-align: center;height: 70px;">
<div style="color: #1c84c6;font-size: 24px;font-weight: 600;">{{ item.xkrs }}</div>
<div style="font-size: 14px;font-weight: 700;">选课人数</div>
</a-col>
<a-col :span="24" style="margin-top:0px;font-weight: 700;">
<div>教师评价{{ (item.jspjPjf == 0?null:item.jspjPjf) || '未评价' }}</div>
<div>学生评价{{ (item.xspjPjf == 0?null:item.xspjPjf) || '未评价' }}</div>
</a-col>
<a-col :span="24" style="margin-top:0px;font-weight: 700;">
<div>
<span>{{ item.hh }}</span>
</div>
</a-col>
<a-col :span="24">
<div style="width:100%;text-align: center;font-weight: 700;">
线下上课地点
</div>
</a-col>
<a-col :span="24">
<div style="height: 50px;font-weight: 700;">
{{ item.skdd }}
</div>
</a-col>
<a-col :span="24">
<a-row style="text-align: center;">
<a-col :span="12">
<a-button type="primary" class="bcClass" @click="openJspjPage(item)" >教师评价</a-button>
</a-col>
<a-col :span="12">
<a-button type="primary" class="bcClass" @click="openXspjPage(item)" >学生评评价</a-button>
</a-col>
</a-row>
</a-col>
</a-row>
</div>
</div>
<!-- <div class="wenZiJiaCu fs1d1r">
<div>课程名称{{ item.kcmc }}</div>
<div>授课教师{{ item.skjs }}</div>
<div>开课单位{{ item.kkdw }}</div>
@ -22,52 +75,7 @@
</a-col>
</a-row>
</div>
</div>
</a-card>
<!-- <a-list-item-meta>
<template #title>
<div class="wenZiJiaCu fs1d1r">
<div>课程名称{{ item.kcmc }}</div>
<div>授课教师{{ item.skjs }}</div>
<div>开课单位{{ item.kkdw }}</div>
<div>授课地点{{ item.skdd }}</div>
<div>教师评价{{ item.jspjPjf }}</div>
<div>学生评价{{ item.xspjPjf }}</div>
<div style="text-align: center;">
<a-button type="primary" style="margin-right: 1rem;" @click="openJspjPage(item)">教师评价</a-button>
<a-button type="primary" style="margin-right: 1rem;" @click="openXspjPage(item)">学生评评价</a-button>
</div>
</div>
</template>
<template #description> -->
<!-- -{{ item }}- -->
<!-- <div class="wenZiJiaCu">
<span v-if="item.score" class="hand" style="color: #337ab7;" @click="viewModal.view(item)">已评分{{ item.score }}</span>
<span v-if="item.source != null" class="hand" style="padding-left: .5rem;color: #337ab7;"></span>
<span v-if="item.source=='0'" class="hand" style="padding-left: .5rem;color: #337ab7;">课程中心</span>
<span v-else-if="item.source=='1'" class="hand" style="padding-left: .5rem;color: #337ab7;">老系统</span>
<span v-else-if="item.source=='2'" class="hand" style="padding-left: .5rem;color: #337ab7;">政务大厅</span>
<span v-else-if="item.source=='3'" class="hand" style="padding-left: .5rem;color: #337ab7;">纸质评价</span>
<span v-if="item.source != null" class="hand" style="padding-left: .5rem;color: #337ab7;">--</span>
<span v-if="item.evaluationver=='1'" class="hand" style="padding-left: .5rem;color: #337ab7;">原始数据</span>
<span v-else-if="item.evaluationver=='2'" class="hand" style="padding-left: .5rem;color: #337ab7;">线上听课</span>
<span v-else-if="item.evaluationver=='3'" class="hand" style="padding-left: .5rem;color: #337ab7;">听课记录</span>
<span v-else-if="item.evaluationver=='4'" class="hand" style="padding-left: .5rem;color: #337ab7;">同行专家</span>
<span v-if="item.source != null" class="hand" style="padding-left: .5rem;color: #337ab7;"></span>
</div> -->
<!-- </template> -->
<!-- <template #avatar>
<div class="wenZiJuZhong dateAndTime">
<i class="fas fa-users" />
<div>{{ item.shijian }}</div>
<div style="color: #1ab394;">{{ item.tkrq }}</div>
</div>
</template> -->
<!-- </a-list-item-meta> -->
</div> -->
</a-list-item>
</template>
</a-list>
@ -196,4 +204,14 @@ defineExpose({
padding-top: 10px;
}
.yyyClass{
background: #6cafda;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
}
.yyClass{
background-color: #1c84c6;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
}
.bcClass{
background-color: #1c84c6;font-weight: 600;border-radius: 5px;line-height: 23px;
}
</style>

View File

@ -8,7 +8,7 @@
<a-layout-content>
<a-card style="min-height: calc(100vh - 68px * 2);">
<div style="font-size: 24px;font-weight: bold;height: 70px;">课足迹
<div style="font-size: 24px;font-weight: bold;height: 70px;">价结果
<span>{{getSysConfig().flag1}} {{dateFormat(getSysConfig().bxqkssj, 'MM月dd日')}} {{dateFormat(getSysConfig().bxqjssj, 'MM月dd日')}}</span>
</div>
<a-row :gutter="[16,16]">