修改页面样式
This commit is contained in:
parent
0a03f3465e
commit
5cbf6bb3b4
|
@ -20,7 +20,7 @@ const stuzy: AppRouteModule = {
|
|||
meta: {
|
||||
title: '作业管理',
|
||||
},
|
||||
component: () => import('/@/views/site/renKeJiaoCheng/checkKecheng/dqxqkcDetail.vue'),
|
||||
component: () => import('/@/views/site/studentWdkc/studentZyxx.vue'),
|
||||
},
|
||||
{
|
||||
path: 'studentDqzy',
|
||||
|
@ -54,6 +54,14 @@ const stuzy: AppRouteModule = {
|
|||
title: '调查问卷',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'StudentGonggaoList',
|
||||
name: 'StudentGonggaoList',
|
||||
component: () => import('/@/views/zy/zyGonggao/StudentGonggaoList.vue'),
|
||||
meta: {
|
||||
title: '通知公告',
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
|
||||
<div style="width:100%;text-align: right;line-height:40px;">
|
||||
<!-- <a style="padding-right: 0.5rem;" @click="init()">刷新</a>
|
||||
<RouterLink to="/site/xspjjgore">查看更多</RouterLink> -->
|
||||
<a style="padding-right: 0.5rem;" @click="init()">刷新</a>
|
||||
<RouterLink to="/site/xspjjgore">查看更多</RouterLink>
|
||||
</div>
|
||||
<a-list item-layout="horizontal" :data-source="list" :grid="{ gutter: 12, xs: 2, sm: 3, md: 3, lg: 3, xl: 3, xxl: 3, xxxl: 3 }">
|
||||
<template #renderItem="{ item }">
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<div>
|
||||
<a-row>
|
||||
<a-col :span="3" style="font-size: 18px;font-weight: bold;">课程介绍:</a-col>
|
||||
<a-col :span="15"><a-textarea style="width: 100%;"></a-textarea></a-col>
|
||||
<a-col :span="6" style="text-align:right;"><a-button type="primary">提交</a-button><a-button type="primary" style="margin-left:10px;">引用</a-button></a-col>
|
||||
<a-col :span="15"><a-textarea style="width: 100%;" v-model:value="jxdgInfo.kcjs"></a-textarea></a-col>
|
||||
<a-col :span="6" style="text-align:right;"><a-button type="primary" @click="addKcjsHandle(1)">提交</a-button><a-button type="primary" style="margin-left:10px;" @click="handleYinyong">引用</a-button></a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
|
@ -13,10 +13,16 @@
|
|||
<div>
|
||||
<span style="float: left;line-height: 30px; font-size: 18px; font-weight: bold;">教学大纲:</span>
|
||||
<span style="width:300px;float: left;">
|
||||
<span style="float:left;"><j-upload v-model:value="jxdgInfo.filePath"></j-upload></span>
|
||||
<span style="float:left;"><j-upload v-model:value="jxdgInfo.filePath" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true"></j-upload></span>
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<a-button type="primary" @click="addKcjsHandle(2)">提交</a-button>
|
||||
<a-button type="primary" style="margin-left:10px;" @click="openPdf(jxdgInfo)">预览</a-button>
|
||||
</span>
|
||||
<span style="float: right;"><a-button type="primary">提交</a-button><a-button type="primary" style="margin-left:10px;">预览</a-button></span>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<JeecgPdfView/>
|
||||
</div> -->
|
||||
</a-card>
|
||||
<a-card>
|
||||
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
|
||||
|
@ -55,6 +61,7 @@
|
|||
<studentPjjgTeaList :queryParam="{ pageSize: 3, ...tkzjParam,kcbh:'' }" style="max-height: 106px;"/>
|
||||
</a-card>
|
||||
<ZyCjwtModal ref="ZyCjwtModalPage" @success="handleCjwtOk" />
|
||||
<ZyJxdgListModal ref="ZyJxdgListModalPage" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -71,7 +78,14 @@
|
|||
import footerPage from '/@/views/site/common/footer.vue';
|
||||
import studentPjjgTeaList from '/@/views/site/pjjgPage/studentPjjgTeaList.vue';
|
||||
import ZyCjwtModal from '/@/views/zy/zyCjwt/components/ZyCjwtModal.vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import ZyJxdgListModal from '/@/views/zy/zyJxdg/ZyJxdgListModal.vue';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
import JeecgPdfView from '/@/views/demo/jeecg/JeecgPdfView.vue';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
|
||||
const globSetting = useGlobSetting();
|
||||
const baseApiUrl = globSetting.domainUrl;
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
|
@ -84,12 +98,22 @@
|
|||
const pageSize = ref<number>(3);
|
||||
const tkzjParam = ref({rwbh:rwbh});
|
||||
const ZyCjwtModalPage = ref();
|
||||
const ZyJxdgListModalPage = ref();
|
||||
const cjwtSource = ref([]);
|
||||
let router = useRouter();
|
||||
const { createMessage } = useMessage();
|
||||
const jxdgInfo = ref({
|
||||
filePath:''
|
||||
id:'',
|
||||
filePath:'',
|
||||
kcjs:''
|
||||
});
|
||||
|
||||
//引用功能
|
||||
function handleYinyong(){
|
||||
var record = {xqxn,rwbh}
|
||||
ZyJxdgListModalPage.value.disableSubmit = true;
|
||||
ZyJxdgListModalPage.value.init(record);
|
||||
}
|
||||
//常见问题新增
|
||||
function addCjwtHanle(){
|
||||
var params = { rwbh:rwbh,xqxn:xqxn };
|
||||
|
@ -109,6 +133,13 @@
|
|||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleCjwtOk);
|
||||
}
|
||||
|
||||
function openPdf(record){
|
||||
var url2 = getFileAccessHttpUrl(record.filePath)
|
||||
console.log(`🚀 ~ openPdf ~ url2:`, url2)
|
||||
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
|
||||
window.open(url,"_blank")
|
||||
}
|
||||
|
||||
|
||||
//常见问题回调刷新
|
||||
|
@ -129,9 +160,44 @@
|
|||
console.log(`🚀 ~ defHttp.get ~ cjwtSource:`, cjwtSource)
|
||||
});
|
||||
}
|
||||
//获取课程介绍和教学大纲内容
|
||||
function getKcjsJxdg(){
|
||||
defHttp.get({ url: '/zyJxdg/zyJxdg/getKcjsJxdg', params: { rwbh:rwbh} }).then((res) => {
|
||||
if(res){
|
||||
jxdgInfo.value = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
function addKcjsHandle(type){
|
||||
const isUpdate = true;
|
||||
var model = jxdgInfo.value;
|
||||
model.rwbh = rwbh;
|
||||
model.xqxn = xqxn;
|
||||
console.log(`🚀 ~ addKcjsHandle ~ model:`, model)
|
||||
if(model.id){
|
||||
if(type=='1'){
|
||||
model.filePath = '';
|
||||
}
|
||||
defHttp.post({ url: '/zyJxdg/zyJxdg/edit', params: model }).then((res) => {
|
||||
console.log(`🚀 ~ defHttp.post 111~ res:`, res)
|
||||
getKcjsJxdg();
|
||||
});
|
||||
}else{
|
||||
if(type=='1'){
|
||||
model.filePath = '';
|
||||
}
|
||||
defHttp.post({ url: '/zyJxdg/zyJxdg/add', params: model }).then((res) => {
|
||||
console.log(`🚀 ~ defHttp.post 222~ res:`, res)
|
||||
getKcjsJxdg();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
getKcjsJxdg();
|
||||
cjwtData(1);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
<a-layout style="height: calc(100vh - 30px)">
|
||||
<headerPage/>
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="width:100%;background: #fff;font-size: 18px;font-weight: bold;margin-top:10px;padding: 10px;">课程名称:{{kcxxInfo.kcmc}}</div>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<studentMenu/>
|
||||
</a-col>
|
||||
|
@ -31,16 +34,19 @@
|
|||
|
||||
const maxClassName = ref<any>({});
|
||||
const selectedKeys = ref<string[]>([]);
|
||||
const kcxxInfo = ref<string>('');
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh } = query;//获取传递参数
|
||||
const { rwbh,xqxn } = query;//获取传递参数
|
||||
let router = useRouter();
|
||||
|
||||
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
console.log('rwbh:',rwbh);
|
||||
defHttp.get({ url: '/ktgl/kcKechengbiao/getKcxxByRwbhXqxn', params: { rwbh: rwbh,xqxn:xqxn } }).then((res) => {
|
||||
kcxxInfo.value = res;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<div id="siteMain" style="min-height: calc(100vh - 150px);">
|
||||
<div id="siteMain" style="height: 640px;">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-menu
|
||||
v-model:selectedKeys="selectedKeys"
|
||||
style="width: 98%;min-height: calc(100vh - 130px);margin: 10px 0;"
|
||||
style="width: 98%;height:640px; margin: 10px 0;"
|
||||
mode="inline"
|
||||
>
|
||||
<a-sub-menu key="sub1">
|
||||
<template #title>课程介绍</template>
|
||||
<a-menu-item key="1">课程介绍</a-menu-item>
|
||||
<a-menu-item key="2">通知公告</a-menu-item>
|
||||
<a-menu-item key="1" @click="getGzt('kcjs')">课程介绍</a-menu-item>
|
||||
<a-menu-item key="2" @click="getGzt('tzgg')">通知公告</a-menu-item>
|
||||
<a-menu-item key="3">教学单元</a-menu-item>
|
||||
</a-sub-menu>
|
||||
<a-sub-menu key="sub4">
|
||||
|
@ -55,17 +55,18 @@
|
|||
function getGzt(zytype){
|
||||
console.log(`🚀 ~ getGzt ~ type:`, zytype)
|
||||
var href = "";
|
||||
if(zytype=='dqzy'){
|
||||
if(zytype=='dqzy'){//当前作业
|
||||
href = "/stuzy/studentDqzy";
|
||||
}
|
||||
// else if(zytype=='lszy'){
|
||||
// href = "/stuzy/studentLszy";
|
||||
// }
|
||||
else if(zytype=='dcwj'){
|
||||
} else if(zytype=='dcwj'){//当前问卷
|
||||
href = "/stuzy/stuDcwjWenjuan";
|
||||
}else if(zytype=='kcjc'){
|
||||
}else if(zytype=='kcjc'){//课程检测
|
||||
href = "/stuzy/stuCeshiWenjuan";
|
||||
}else if(zytype=='kcjs'){//课程介绍
|
||||
href = "/stuzy/studentMain";
|
||||
}else if(zytype=='tzgg'){//通知公告
|
||||
href = "/stuzy/StudentGonggaoList";
|
||||
}
|
||||
|
||||
router.push({path:href,query: {rwbh,xqxn,type}});
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<a-col :span="24" class="zyCon"><div style="float:left" v-if="item.score">{{item.score}}分</div><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkxs}}人选课</a></div></a-col>
|
||||
<a-col :span="24" style="text-align:center;margin-top:20px;">
|
||||
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;background:rgb(28, 132, 198);">详情</a-button>
|
||||
<a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="!item.score" >上传</a-button>
|
||||
<a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="!item.stuFilePath" >上传</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
|
|
|
@ -5,7 +5,17 @@ import { render } from '/@/utils/common/renderUtils';
|
|||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '附件',
|
||||
title: '学期学年',
|
||||
align: "center",
|
||||
dataIndex: 'xqxn'
|
||||
},
|
||||
{
|
||||
title: '课程介绍',
|
||||
align: "center",
|
||||
dataIndex: 'kcjs'
|
||||
},
|
||||
{
|
||||
title: '教学大纲',
|
||||
align: "center",
|
||||
dataIndex: 'filePath',
|
||||
slots: { customRender: 'fileSlot' },
|
||||
|
|
|
@ -1,36 +1,14 @@
|
|||
<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">
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button>批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
<TableAction :actions="getTableAction(record)"/>
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template #htmlSlot="{text}">
|
||||
|
@ -51,17 +29,22 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="zyJxdg-zyJxdg" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { ref, reactive,unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './ZyJxdg.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyJxdg.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import ZyJxdgModal from './components/ZyJxdgModal.vue'
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh,xqxn } = query;//获取传递参数
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
|
@ -110,8 +93,12 @@
|
|||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
// registerModal.value.disableSubmit = false;
|
||||
// registerModal.value.edit(record);
|
||||
defHttp.post({url: '/zyJxdg/zyJxdg/editJxdgyy', params: {filePath:record.filePath,kcjs:record.kcjs,pdfPath:record.pdfPath,rwbh,xqxn }}).then(res => {
|
||||
console.log(`🚀 ~ defHttp.post ~ res:`, res)
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -149,7 +136,7 @@
|
|||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
label: '引用',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
|
@ -189,8 +176,15 @@
|
|||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
function init(record){
|
||||
console.log(`🚀 ~ init ~ record:`, record)
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
-- 注意:该页面对应的前台目录为views/zyJxdg文件夹下
|
||||
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
|
||||
|
||||
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||
VALUES ('202405110931940070', NULL, '教学大纲', '/zyJxdg/zyJxdgList', 'zyJxdg/ZyJxdgList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-05-11 09:31:07', NULL, NULL, 0);
|
||||
|
||||
-- 权限控制sql
|
||||
-- 新增
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('202405110931940071', '202405110931940070', '添加教学大纲', NULL, NULL, 0, NULL, NULL, 2, 'zyJxdg:zy_jxdg:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-05-11 09:31:07', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 编辑
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('202405110931940072', '202405110931940070', '编辑教学大纲', NULL, NULL, 0, NULL, NULL, 2, 'zyJxdg:zy_jxdg:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-05-11 09:31:07', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 删除
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('202405110931940073', '202405110931940070', '删除教学大纲', NULL, NULL, 0, NULL, NULL, 2, 'zyJxdg:zy_jxdg:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-05-11 09:31:07', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 批量删除
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('202405110931940074', '202405110931940070', '批量删除教学大纲', NULL, NULL, 0, NULL, NULL, 2, 'zyJxdg:zy_jxdg:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-05-11 09:31:07', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 导出excel
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('202405110931940075', '202405110931940070', '导出excel_教学大纲', NULL, NULL, 0, NULL, NULL, 2, 'zyJxdg:zy_jxdg:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-05-11 09:31:07', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 导入excel
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('202405110931940076', '202405110931940070', '导入excel_教学大纲', NULL, NULL, 0, NULL, NULL, 2, 'zyJxdg:zy_jxdg:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-05-11 09:31:07', NULL, NULL, 0, 0, '1', 0);
|
Loading…
Reference in New Issue