修改bug
This commit is contained in:
parent
731665e0a2
commit
fd23249a2b
|
@ -42,6 +42,9 @@
|
|||
<a-menu-item key="7" v-if="getSysConfig().flag6=='1'">
|
||||
<a class="abox" @click="toDom('jrkclbDom')">今日课程</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="8" >
|
||||
<a class="abox" @click="toDom('ktsbDom')">听课笔记</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
<!-- 课堂随笔 -->
|
||||
<ktsbPage />
|
||||
|
||||
</a-layout-content>
|
||||
<!-- 学生部分今日课表 -->
|
||||
|
@ -77,9 +79,10 @@
|
|||
import yuYueKeChengPage from '/@/views/site/yuYueKeCheng/index.vue'
|
||||
import jingCaiGongKaiKePage from '/@/views/site/jingCaiGongKaiKe/index.vue'
|
||||
import kxstkktPage from '/@/views/site/kxstkkt/index.vue'
|
||||
import ktsbPage from '/@/views/site/ktsb/index.vue'
|
||||
|
||||
|
||||
|
||||
|
||||
import kclbZzsk from '/@/views/site/jrkclb/kclbZzsk.vue';
|
||||
import kclbXyjk from '/@/views/site/jrkclb/kclbXyjk.vue';
|
||||
import kclbRkb from '/@/views/site/jrkclb/kclbRkb.vue';
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/kcCasusers/kcCasusers/list',
|
||||
save='/kcCasusers/kcCasusers/add',
|
||||
edit='/kcCasusers/kcCasusers/edit',
|
||||
deleteOne = '/kcCasusers/kcCasusers/delete',
|
||||
deleteBatch = '/kcCasusers/kcCasusers/deleteBatch',
|
||||
importExcel = '/kcCasusers/kcCasusers/importExcel',
|
||||
exportXls = '/kcCasusers/kcCasusers/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,137 @@
|
|||
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: 'collegecode'
|
||||
},
|
||||
{
|
||||
title: '学院',
|
||||
align: "center",
|
||||
dataIndex: 'college'
|
||||
},
|
||||
{
|
||||
title: '工号',
|
||||
align: "center",
|
||||
dataIndex: 'user'
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
align: "center",
|
||||
dataIndex: 'cn'
|
||||
},
|
||||
{
|
||||
title: '职务',
|
||||
align: "center",
|
||||
dataIndex: 'duties'
|
||||
},
|
||||
{
|
||||
title: '身份',
|
||||
align: "center",
|
||||
dataIndex: 'identity'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align: "center",
|
||||
dataIndex: 'status'
|
||||
},
|
||||
{
|
||||
title: '职称',
|
||||
align: "center",
|
||||
dataIndex: 'zdxms'
|
||||
},
|
||||
{
|
||||
title: '职务名称',
|
||||
align: "center",
|
||||
dataIndex: 'zwmc'
|
||||
},
|
||||
{
|
||||
title: '职务代码',
|
||||
align: "center",
|
||||
dataIndex: 'zwdm'
|
||||
},
|
||||
];
|
||||
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
];
|
||||
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '学院编码',
|
||||
field: 'collegecode',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '学院',
|
||||
field: 'college',
|
||||
component: 'Input',
|
||||
dynamicRules: ({model,schema}) => {
|
||||
return [
|
||||
{ required: true, message: '请输入学院!'},
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '工号',
|
||||
field: 'user',
|
||||
component: 'Input',
|
||||
dynamicRules: ({model,schema}) => {
|
||||
return [
|
||||
{ required: true, message: '请输入工号!'},
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '姓名',
|
||||
field: 'cn',
|
||||
component: 'Input',
|
||||
dynamicRules: ({model,schema}) => {
|
||||
return [
|
||||
{ required: true, message: '请输入姓名!'},
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '职务',
|
||||
field: 'duties',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '身份',
|
||||
field: 'identity',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
field: 'status',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '职称',
|
||||
field: 'zdxms',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '职务名称',
|
||||
field: 'zwmc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '职务代码',
|
||||
field: 'zwdm',
|
||||
component: 'Input',
|
||||
},
|
||||
// TODO 主键隐藏字段,目前写死为ID
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
];
|
|
@ -0,0 +1,205 @@
|
|||
<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 #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>
|
||||
<!-- 表单区域 -->
|
||||
<KcCasusersModal ref="registerModal" @success="handleSuccess"></KcCasusersModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="kcCasusers-kcCasusers" setup>
|
||||
import { ref, reactive,defineExpose } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './KtbjInfoList.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KtbjInfoList.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import KcCasusersModal from './components/KcCasusersModal.vue'
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'kc_casusers',
|
||||
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: "kc_casusers",
|
||||
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 rkbLoadData(record){
|
||||
console.log(`🚀 ~ file: KtbjInfoList.vue:92 ~ rkbLoadData ~ record:`, record)
|
||||
// reload()
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
rkbLoadData,
|
||||
});
|
||||
|
||||
|
||||
</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,65 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<KtbjInfoList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KtbjInfoList>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import KtbjInfoList from './KtbjInfoList.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']);
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
console.log(`🚀 ~ file: KtbjInfoListModal.vue:24 ~ edit ~ record:`, record)
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.rkbLoadData(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,51 @@
|
|||
<template>
|
||||
<a-card class="rowGutter" id="ktsbDom">
|
||||
<template #title>
|
||||
<span class="titleName">听课笔记</span>
|
||||
</template>
|
||||
<ktsbPage />
|
||||
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { getSysConfig } from '/@/views/site/utils/index';
|
||||
import ktsbPage from '/@/views/site/ktsb/ktsbList.vue'
|
||||
|
||||
const zzskTitle = ref('正在上课');
|
||||
const queryParam = ref<any>({});
|
||||
|
||||
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
|
||||
jclist(queryParam.value).then(res=>{
|
||||
var list = res
|
||||
let sjsksj = list[0].sjsksj
|
||||
console.log(`🚀 ~ file: index.vue:135 ~ jclist ~ sjsksj:`, sjsksj)
|
||||
if(sjsksj){
|
||||
let nowDate = new Date();
|
||||
let nowDate2 = new Date(sjsksj);
|
||||
console.log(`🚀 ~ file: index.vue:140 ~ jclist ~ nowDate.getTime():`, nowDate.getTime(),nowDate2.getTime())
|
||||
if(nowDate.getTime()<nowDate2.getTime()){
|
||||
zzskTitle.value = "即将上课";
|
||||
}else{
|
||||
zzskTitle.value = "正在上课";
|
||||
}
|
||||
}else{
|
||||
zzskTitle.value = "正在上课";
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.titleName {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,88 @@
|
|||
<template>
|
||||
<div>
|
||||
<a-row class="rowGutter" :gutter="[16, 16]">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 6 }" v-for="(item, index) in listData"
|
||||
:key="index" style="margin-bottom: 40px;">
|
||||
<div style="border: 2px #eef1f2 solid;">
|
||||
<div>
|
||||
<div style="width: 100%;height: 20px;background-color: #1c84c6;"></div>
|
||||
<div style="width:100%;white-space:normal; word-break:break-all;overflow:hidden;padding: 10px;height: 70px;font-weight: 600;font-size: 16px;">
|
||||
{{ item.kcmc }}
|
||||
</div>
|
||||
</div>
|
||||
<a-divider style="margin: 0px;color: #eef1f2;" />
|
||||
<div style="padding: 20px;font-weight: 600;">
|
||||
<a-row>
|
||||
<a-col :span="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>
|
||||
第<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" style="text-align: center;">
|
||||
<div >
|
||||
<!-- <a-button type="primary" class="bcClass" @click="tingkebiji(item)">听课笔记</a-button> -->
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 报错列表 -->
|
||||
<KtbjInfoListModal ref="KtbjInfoListModal"></KtbjInfoListModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { getUserId } from '/@/views/site/utils/index';
|
||||
import { KtbjInfoListModal } from '/@/views/site/ktsb/KtbjInfoListModal';
|
||||
let listData = ref<any>([]);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKtbjList', params });
|
||||
const KtbjInfoListModal = ref();
|
||||
|
||||
onMounted(() => {
|
||||
let userid = getUserId();
|
||||
list({ userid: userid}).then(res => {
|
||||
listData.value = res
|
||||
})
|
||||
})
|
||||
|
||||
function tingkebiji(record){
|
||||
KtbjInfoListModal.value.edit(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.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>
|
Loading…
Reference in New Issue