Merge remote-tracking branch 'origin/master'

This commit is contained in:
曹磊 2024-05-18 00:53:49 +08:00
commit 5ba706a0db
21 changed files with 1872 additions and 28 deletions

View File

@ -20,7 +20,7 @@ VITE_GLOB_API_URL=/jeecg-boot
#后台接口全路径地址(必填)
#VITE_GLOB_DOMAIN_URL=https://zxkccx.webvpn.nenu.edu.cn/jeecg-boot
VITE_GLOB_DOMAIN_URL=https://kczxcs.nenu.edu.cn/jeecg-boot
VITE_GLOB_DOMAIN_URL=http://210.47.29.100/jeecg-boot
#RTC服务器地址
VITE_GLOB_RTC_SERVER = https://zxkccx.webvpn.nenu.edu.cn:8081

View File

@ -65,7 +65,7 @@ const zuoye: AppRouteModule = {
{
path: 'jiaoXueDanYuanNeiRong',
name: 'jiaoXueDanYuanNeiRong',
component: () => import('/@/views/zy/jiaoXueDanYuanNeiRong/index.vue'),
component: () => import('/@/views/zy/jiaoXueDanYuanNeiRong/index2.vue'),
meta: {
title: '教学单元内容',
},

View File

@ -46,6 +46,22 @@ const zuoyehistory: AppRouteModule = {
title: '到课识别率',
},
},
{
path: 'hisKccy',
name: 'hisKccy',
component: () => import('/@/views/kc/wjxCswj/WjxCswjHisMainList.vue'),
meta: {
title: '课程测验',
},
},
{
path: 'hisWjdc',
name: 'hisWjdc',
component: () => import('/@/views/kc/wjxDcwj/WjxDcwjHisMainList.vue'),
meta: {
title: '问卷调查',
},
},
]
}

View File

@ -0,0 +1,329 @@
<template>
<div style="background: #fff;height: 600px;padding: 10px 0;overflow-y: auto;overflow-x: hidden;">
<!--查询区域-->
<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="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.qpublish">
<a-select-option value="">全部</a-select-option>
<a-select-option value="0">未发布</a-select-option>
<a-select-option value="1">已发布</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 280px;">
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish =='0'? '待发布':'已发布'}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="6" class="zyCon">时间
</a-col>
<a-col :span="16" class="zyCon">
<a-col :span="24" class="zyCon">{{item.startTime}}</a-col>
<a-col :span="24" class="zyCon">{{item.endTime}}</a-col>
</a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="12" class="zyCon">{{item.xqxn}}</a-col>
<a-col :span="12" class="zyCon"><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkrs}}人选课</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="12" class="zyCon"><div style="float:left;" @click="handleDjjgs(item,'0')" v-if="item.wwcrs>0"><a>未提交{{item.wwcrs}}</a></div></a-col>
<a-col :span="12" class="zyCon"><div style="float:right;" @click="handleDjjgs(item,'1')" v-if="item.ywcrs>0"><a>已提交{{item.ywcrs}}</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" >详情</a-button>
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">配置</a-button>
<a-button type="primary" @click="handleDjjgs(item,'')" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>
</a-col>
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->
<!-- <a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">查看答卷</a-button>-->
<!-- </a-col>-->
</a-row>
</a-card>
</a-col>
<a-col :span="24">
<div v-show="tableData.length>0">
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
</div>
<div v-show="tableData.length==0">
<a-empty/>
</div>
</a-col>
</a-row>
<!-- 表单区域 -->
<WjxWjxxModal ref="registerModal" @success="handleSuccess"></WjxWjxxModal>
<WjxWjxxTmlbModal ref="WjxWjxxTmlbModalPage" @success="handleSuccess"></WjxWjxxTmlbModal>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref, onMounted} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
import { list ,deleteOne } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa } = query;//
const APagination = Pagination;
const queryParam = ref<any>({});
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(6);
const tableData = ref<any>([]);
const registerModal = ref();
const WjxWjxxTmlbModalPage = ref();
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgsModalPage = ref()
const WjxWjxxTmlbDjjgsDcModalPage = ref();
const XxhbbksListModalPage = ref();
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("6");
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 获取选课人数
*/
function openXkrs(record){
// console.log(`🚀 ~ openXkrs ~ record:`, record)
XxhbbksListModalPage.value.disableSubmit = true;
XxhbbksListModalPage.value.init(record);
}
/**
* 配置
*/
function handlePeizhi(record: Recordable) {
WjxWjxxTmlbModalPage.value.disableSubmit = false;
WjxWjxxTmlbModalPage.value.edit(record,"6");
}
/**
* 配置详情
*/
function handlePeizhiXq(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjModalPage.value.edit(record,true,"6",'ls');
}
// /**
// *
// */
// function handleDj(record: Recordable) {
// WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
// WjxWjxxTmlbDjModalPage.value.edit(record,false);
// }
// /**
// *
// */
// function handleDjjg(record: Recordable) {
// WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
// WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
// }
/**
* 学生答卷列表
*/
function handleDjjgs(record: Recordable,flag) {
WjxWjxxTmlbDjjgsModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgsModalPage.value.edit(record,flag);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => {
total.value = 1;
pageNo.value = 0;
reload();
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
function reload(){
queryParam.value.pageNo = pageNo;
queryParam.value.pageSize = pageSize;
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "6";
defHttp.get({ url: '/wjxWjxx/wjxWjxx/list', params: queryParam.value }).then(res => {
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
total.value = res.total;
pageNo.value = res.pages;
current.value = res.current;
tableData.value = res.records;
});
}
/**
* 成功回调
*/
function handleSuccess() {
total.value = 1;
pageNo.value = 0;
reload();
}
/**
* 查询
*/
function searchQuery() {
pageNo.value = 0;
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
total.value = 1;
handlePageChange(1);
}
function handlePageChange(record){
pageNo.value = record;
reload();
}
onMounted(() => {
searchQuery();
});
function classFun(type){
if(type == '0'){
return "background: #a7a6a6";
}else if(type == '1'){
return "background: #18a689";
}
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.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
}
}
.jeecg-basic-table-form-container .ant-form {
padding: 12px 10px 0px 10px;
margin-bottom: 0px;
background-color: #fff;
border-radius: 2px;
}
.ellipsis {
overflow: hidden; /* 确保超出容器的内容被裁剪 */
white-space: nowrap; /* 确保文本在一行内显示 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.zyCon{
line-height: 30px;
}
.rotate {
transform: rotate(45deg);
background: rgb(28, 132, 198);
color: #fff;
padding: 19px 10px 3px 10px;
position: relative;
top: -54px;
right: -131px;
text-align: center;
font-size: 11px;
}
</style>

View File

@ -0,0 +1,27 @@
<template>
<div style="background: #fff;height: 97%;margin: 10px 0;">
<div style="text-align:right;width:100%;">
<a-switch v-model:checked="checked1" @change="onChange1"/>
</div>
<div v-show="checked1">
<WjxCswjList/>
</div>
<div v-show="!checked1">
<WjxCswjTableList/>
</div>
</div>
</template>
<script lang="ts" name="wjx-cswj" setup>
import { ref, reactive, onMounted,unref } from 'vue';
import WjxCswjTableList from '/@/views/kc/wjxCswj/WjxCswjHisTableList.vue'
import WjxCswjList from '/@/views/kc/wjxCswj/WjxCswjHisList.vue'
const checked1 = ref(true);
function onChange1(record){
}
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,297 @@
<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="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.qpublish">
<a-select-option value="">全部</a-select-option>
<a-select-option value="0">未发布</a-select-option>
<a-select-option value="1">已发布</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
<!-- 表单区域 -->
<WjxWjxxModal ref="registerModal" @success="handleSuccess"></WjxWjxxModal>
<WjxWjxxTmlbModal ref="WjxWjxxTmlbModalPage" @success="handleSuccess"></WjxWjxxTmlbModal>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
<WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref} from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { defHttp } from '/@/utils/http/axios';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from '/@/views/kc/wjxWjxx/WjxWjxx.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import WjxWjxxTmlbDjjgsModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa} = query;//
const queryParam = ref<any>({rwbh : rwbh,xqxn : xqxn,atype : "6"});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const WjxWjxxTmlbModalPage = ref();
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgsModalPage = ref();
const XxhbbksListModalPage = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 230,
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("6");
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 配置
*/
function handlePeizhi(record: Recordable) {
WjxWjxxTmlbModalPage.value.disableSubmit = false;
WjxWjxxTmlbModalPage.value.edit(record,"6");
}
/**
* 配置详情
*/
function handlePeizhiXq(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjModalPage.value.edit(record,true,"6",'ls');
}
// /**
// *
// */
// function handlePeizhiDj(record: Recordable) {
// WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
// WjxWjxxTmlbDjModalPage.value.edit(record,false);
// }
//
// /**
// *
// */
// function handlePeizhiDjjg(record: Recordable) {
// WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
// WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
// }
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 学生答卷列表
*/
function handleDjjgs(record: Recordable,flag) {
WjxWjxxTmlbDjjgsModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgsModalPage.value.edit(record, flag);
}
/**
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => {
reload();
});
}
/**
* 删除事件
*/
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) {
if(record.qpublish == '1'){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '配置详情',
onClick: handlePeizhiXq.bind(null, record),
},
{
label: '学生列表',
onClick: handleDjjgs.bind(null, record,"1"),
},
]
}else{
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]
};
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "6";
selectedRowKeys.value = [];
//
reload();
}
function init(){
defHttp.get({url:'/wjxWjxx/wjxWjxx/getWjxLogin',params:{}}).then(res =>{
})
}
defineExpose({
init
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.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,326 @@
<template>
<div style="background: #fff;height: 97%;margin: 10px 0;">
<!--查询区域-->
<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="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.qpublish">
<a-select-option value="">全部</a-select-option>
<a-select-option value="0">未发布</a-select-option>
<a-select-option value="1">已发布</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 10px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 280px;">
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish =='0'? '待发布':'已发布'}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="6" class="zyCon">时间
</a-col>
<a-col :span="16" class="zyCon">
<a-col :span="24" class="zyCon">{{item.startTime}}</a-col>
<a-col :span="24" class="zyCon">{{item.endTime}}</a-col>
</a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="12" class="zyCon">{{item.xqxn}}</a-col>
<a-col :span="12" class="zyCon"><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkrs}}人选课</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="12" class="zyCon"><div style="float:left;" @click="handleDjjgs(item,'0')" v-if="item.wwcrs>0"><a>未提交{{item.wwcrs}}</a></div></a-col>
<a-col :span="12" class="zyCon"><div style="float:right;" @click="handleDjjgs(item,'1')" v-if="item.ywcrs>0"><a>已提交{{item.ywcrs}}</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" >详情</a-button>
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">配置</a-button>
<a-button type="primary" @click="handleDjjgs(item,'')" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>
</a-col>
</a-row>
</a-card>
</a-col>
<a-col :span="24">
<div v-show="tableData.length>0">
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
</div>
<div v-show="tableData.length==0">
<a-empty/>
</div>
</a-col>
</a-row>
<!-- 表单区域 -->
<WjxWjxxModal ref="registerModal" @success="handleSuccess"></WjxWjxxModal>
<WjxWjxxTmlbModal ref="WjxWjxxTmlbModalPage" @success="handleSuccess"></WjxWjxxTmlbModal>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
<WjxWjxxTmlbDjjgsDcModal ref="WjxWjxxTmlbDjjgsDcModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsDcModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref, onMounted} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
import { list ,deleteOne } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import WjxWjxxTmlbDjjgsDcModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa} = query;//
const APagination = Pagination;
const queryParam = ref<any>({});
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(6);
const tableData = ref<any>([]);
const registerModal = ref();
const WjxWjxxTmlbModalPage = ref();
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgsDcModalPage = ref();
const XxhbbksListModalPage = ref();
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("1");
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 获取选课人数
*/
function openXkrs(record){
// console.log(`🚀 ~ openXkrs ~ record:`, record)
XxhbbksListModalPage.value.disableSubmit = true;
XxhbbksListModalPage.value.init(record);
}
/**
* 配置
*/
function handlePeizhi(record: Recordable) {
WjxWjxxTmlbModalPage.value.disableSubmit = false;
WjxWjxxTmlbModalPage.value.edit(record,"1");
}
/**
* 配置详情
*/
function handlePeizhiXq(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjModalPage.value.edit(record,true,"1",'ls');
}
// /**
// *
// */
// function handleDj(record: Recordable) {
// WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
// WjxWjxxTmlbDjModalPage.value.edit(record,false);
// }
/**
* 答卷详情
*/
// function handleDjjg(record: Recordable) {
// WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
// WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
// }
/**
* 学生答卷列表
*/
function handleDjjgs(record: Recordable,flag) {
WjxWjxxTmlbDjjgsDcModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgsDcModalPage.value.edit(record, flag);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "1" } }).then(res => {
total.value = 1;
pageNo.value = 0;
reload();
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
function reload(){
queryParam.value.pageNo = pageNo;
queryParam.value.pageSize = pageSize;
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "1";
defHttp.get({ url: '/wjxWjxx/wjxWjxx/list', params: queryParam.value }).then(res => {
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
total.value = res.total;
pageNo.value = res.pages;
current.value = res.current;
tableData.value = res.records;
});
}
/**
* 成功回调
*/
function handleSuccess() {
total.value = 1;
pageNo.value = 0;
reload();
}
/**
* 查询
*/
function searchQuery() {
pageNo.value = 0;
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
total.value = 1;
handlePageChange(1);
}
function handlePageChange(record){
pageNo.value = record;
reload();
}
onMounted(() => {
searchQuery();
});
function classFun(type){
if(type == '0'){
return "background: #a7a6a6";
}else if(type == '1'){
return "background: #18a689";
}
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.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
}
}
.jeecg-basic-table-form-container .ant-form {
padding: 12px 10px 0px 10px;
margin-bottom: 0px;
background-color: #fff;
border-radius: 2px;
}
.ellipsis {
overflow: hidden; /* 确保超出容器的内容被裁剪 */
white-space: nowrap; /* 确保文本在一行内显示 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.zyCon{
line-height: 30px;
}
.rotate {
transform: rotate(45deg);
background: rgb(28, 132, 198);
color: #fff;
padding: 19px 10px 3px 10px;
position: relative;
top: -54px;
right: -131px;
text-align: center;
font-size: 11px;
}
</style>

View File

@ -0,0 +1,27 @@
<template>
<div style="background: #fff;height: 97%;margin: 10px 0;">
<div style="text-align:right;width:100%;">
<a-switch v-model:checked="checked1" @change="onChange1"/>
</div>
<div v-show="checked1">
<WjxDcwjList/>
</div>
<div v-show="!checked1">
<WjxDcwjTableList/>
</div>
</div>
</template>
<script lang="ts" name="wjx-dcwj" setup>
import { ref, reactive, onMounted,unref } from 'vue';
import WjxDcwjTableList from '/@/views/kc/wjxDcwj/WjxDcwjHisTableList.vue'
import WjxDcwjList from '/@/views/kc/wjxDcwj/WjxDcwjHisList.vue'
const checked1 = ref(true);
function onChange1(record){
}
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,297 @@
<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="7">
<a-form-item label="问卷名称">
<a-input placeholder="请输入问卷名称" v-model:value="queryParam.title"></a-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="问卷类型">
<a-select placeholder="请选择问卷状态" ref="select" v-model:value="queryParam.qpublish">
<a-select-option value="">全部</a-select-option>
<a-select-option value="0">未发布</a-select-option>
<a-select-option value="1">已发布</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
<!-- 表单区域 -->
<WjxWjxxModal ref="registerModal" @success="handleSuccess"></WjxWjxxModal>
<WjxWjxxTmlbModal ref="WjxWjxxTmlbModalPage" @success="handleSuccess"></WjxWjxxTmlbModal>
<WjxWjxxTmlbDjModal ref="WjxWjxxTmlbDjModalPage" @success="handleSuccess"></WjxWjxxTmlbDjModal>
<WjxWjxxTmlbDjjgModal ref="WjxWjxxTmlbDjjgModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgModal>
<WjxWjxxTmlbDjjgsDcModal ref="WjxWjxxTmlbDjjgsDcModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsDcModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
</div>
</template>
<script lang="ts" name="wjxWjxx-wjxWjxx" setup>
import {ref, reactive, defineExpose, unref} from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { defHttp } from '/@/utils/http/axios';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from '/@/views/kc/wjxWjxx/WjxWjxx.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from '/@/views/kc/wjxWjxx/WjxWjxx.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import WjxWjxxModal from '/@/views/kc/wjxWjxx/components/WjxWjxxModal.vue'
import WjxWjxxTmlbModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbModal.vue'
import WjxWjxxTmlbDjModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjModal.vue'
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
import WjxWjxxTmlbDjjgsDcModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgsDcModal.vue'
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useRouter} from "vue-router";
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn,typa} = query;//
const queryParam = ref<any>({rwbh : rwbh,xqxn : xqxn,atype : "1"});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const WjxWjxxTmlbModalPage = ref();
const WjxWjxxTmlbDjModalPage = ref();
const WjxWjxxTmlbDjjgsDcModalPage = ref();
const XxhbbksListModalPage = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 280,
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("1");
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 配置
*/
function handlePeizhi(record: Recordable) {
WjxWjxxTmlbModalPage.value.disableSubmit = false;
WjxWjxxTmlbModalPage.value.edit(record,"1");
}
/**
* 配置详情
*/
function handlePeizhiXq(record: Recordable) {
WjxWjxxTmlbDjModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjModalPage.value.edit(record,true,"1",'ls');
}
// /**
// *
// */
// function handlePeizhiDj(record: Recordable) {
// WjxWjxxTmlbDjModalPage.value.disableSubmit = false;
// WjxWjxxTmlbDjModalPage.value.edit(record,false);
// }
//
// /**
// *
// */
// function handlePeizhiDjjg(record: Recordable) {
// WjxWjxxTmlbDjjgModalPage.value.disableSubmit = true;
// WjxWjxxTmlbDjjgModalPage.value.edit(record,false);
// }
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 学生答卷列表
*/
function handleDjjgs(record: Recordable,flag) {
WjxWjxxTmlbDjjgsDcModalPage.value.disableSubmit = true;
WjxWjxxTmlbDjjgsDcModalPage.value.edit(record, flag);
}
/**
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "1" } }).then(res => {
reload();
});
}
/**
* 删除事件
*/
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) {
if(record.qpublish == '1'){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '配置详情',
onClick: handlePeizhiXq.bind(null, record),
},
{
label: '学生列表',
onClick: handleDjjgs.bind(null, record,"1"),
},
]
}else{
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
]
};
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
queryParam.value.rwbh = rwbh;
queryParam.value.xqxn = xqxn;
queryParam.value.atype = "1";
selectedRowKeys.value = [];
//
reload();
}
function init(){
defHttp.get({url:'/wjxWjxx/wjxWjxx/getWjxLogin',params:{}}).then(res =>{
})
}
defineExpose({
init
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.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

@ -230,11 +230,15 @@ async function submitForm(){
let param = values[i];
console.log(`🚀 ~ submitForm ~ param:`, param)
values[i].itemSelected = param.itemSelected+"";
if(!param.wjScore){
createMessage.error('请填写题目分数');
sfjx = "0";
return;
console.log(`🚀 ~ submitForm ~ isShow:`, isShow)
if(isShow.value){
if(!param.wjScore){
createMessage.error('请填写题目分数');
sfjx = "0";
return;
}
}
if(!param.wjTitle){
createMessage.error('请填写题目信息');
sfjx = "0";

View File

@ -19,7 +19,7 @@
</div>
<div id="leftDiv" v-show="props.showRightButton">
<a-row >
<a-col :xs="{ span: 0 }" :sm="{ span: 24 }" :lg="{ span: 24 }">
<a-col :xs="{ span: 0 }" :sm="{ span: 24 }" :lg="{ span: 24 }" v-if="getUserSf()=='T'">
<a-menu style="margin-top: 20px;" :selectable="false">
<a-menu-item key="1" v-if="getSysConfig().flag7=='1'">
<a class="abox" @click="toDom('tkzjDom')">听课足迹</a>
@ -50,6 +50,22 @@
</a-menu-item>
</a-menu>
</a-col>
<a-col :xs="{ span: 0 }" :sm="{ span: 24 }" :lg="{ span: 24 }" v-if="getUserSf()=='S'">
<a-menu style="margin-top: 20px;" :selectable="false">
<a-menu-item key="1" >
<a class="abox" @click="toDom('ktsbDom')">听课笔记</a>
</a-menu-item>
<a-menu-item key="2" >
<a class="abox" @click="toDom('stujrkbDom')">今日课表</a>
</a-menu-item>
<a-menu-item key="3" >
<a class="abox" @click="toDom('stujlrkbDom')">进六日课表</a>
</a-menu-item>
<a-menu-item key="4" >
<a class="abox" @click="toDom('stuwdkcDom')">我的课程</a>
</a-menu-item>
</a-menu>
</a-col>
</a-row>

View File

@ -65,9 +65,9 @@
}else if(zytype=='kczy'){//
href = "/history/hisKczy";
}else if(zytype=='kccy'){//
href = "/history/dqkcLszy";
href = "/history/hisKccy";
}else if(zytype=='wjdc'){//
href = "/history/ceshiWenjuan";
href = "/history/hisWjdc";
}else if(zytype=='dksbl'){//
href = "/history/hisdksbl";
}

View File

@ -1,5 +1,5 @@
<template>
<div class="indexBackClass">
<div class="indexBackClass" id="stujlrkbDom">
<div style="margin-top: 20px;">
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">进六日课表</span>
<span style="margin-left: 10px;"><a href="javascript:void(0);" @click="openChangeKcPage">修改课程提醒</a></span>

View File

@ -1,5 +1,5 @@
<template>
<div class="indexBackClass">
<div class="indexBackClass" id="stujrkbDom">
<div style="margin-top: 20px">
<span style="margin-left: 30px; font-size: 24px; font-weight: 600">今日课表</span>
<span style="margin-left: 30px; color: #1c84c6; font-weight: 600">{{ sjtime }} {{ sjtitle }}</span>

View File

@ -1,5 +1,5 @@
<template>
<div class="indexBackClass" >
<div class="indexBackClass" id="stuwdkcDom">
<div style="margin-top: 20px;">
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">我的课程</span>
</div>

View File

@ -0,0 +1,489 @@
<template>
<div class="max">
<!-- <a-affix :offset-top="0" :target="() => doctomen"> -->
<div class="topButton">
<a-space>
<a-button type="primary" @click="save" :loading="saveLoading">保存</a-button>
<a-button @click="reload">刷新</a-button>
<a-button type="primary" @click="addOne()" class="addBtn" title="新增一级"><Icon icon="ant-design:plus-outlined"/>新增标题</a-button>
</a-space>
</div>
<!-- </a-affix> -->
<div class="maxDiv">
<a-empty v-if="!dataSource || !dataSource.length"/>
<draggable v-bind="draggableBind" v-model="dataSource">
<template #item="{ element: one }">
<div class="box">
<!-- 下一层 -->
<a-card>
<a-collapse ghost expandIconPosition="right">
<a-collapse-panel :key="one._id">
<template #header>
<div class="topDiv">
<div>{{ one.sort }}</div>
<div class="inputd">
<a-input v-if="one.isEdit" :value="one.title" @change="changeInput($event, one, 'title')" @blur="() => { one.isEdit = false }" @click="stop" class="ainput"/>
<div v-else class="ainput ainputNoEdit" @click="(e) => { stop(e);one.isEdit = true }" >&nbsp;{{ one.title }}</div>
</div>
</div>
</template>
<template #extra>
<a-space>
<div><a-button type="primary" @click="addTwo($event, one)" class="twoBtn addBtn" title="新增二级"><Icon icon="ant-design:plus-outlined"/>新增章节</a-button></div>
<div><a-button type="primary" danger @click="delOne($event, one)" class="addBtn" title="删除此项及以下"><Icon icon="ant-design:delete"/>删除</a-button></div>
</a-space>
</template>
<draggable v-bind="draggableBind" v-model="one.childrenList">
<template #item="{ element: two }">
<div class="box">
<!-- 下一层 -->
<a-card>
<a-collapse ghost expandIconPosition="right">
<a-collapse-panel :key="two._id" :showArrow="false">
<template #header>
<div class="twoTopDiv">
<div class="topDiv">
<div>{{ one.sort }}.{{ two.sort }}</div>
<div class="twoInputd">
<a-input v-if="two.isEdit" :value="two.title" @change="changeInput($event, two, 'title')" @blur="() => { two.isEdit = false }" @click="stop" class="ainput"/>
<div v-else class="ainput ainputNoEdit" @click="(e) => { stop(e);two.isEdit = true }" >&nbsp;{{ two.title }}</div>
</div>
</div>
</div>
</template>
<template #extra>
<a-space>
<a-button type="primary" class="addBtn" title="展开收起"><Icon icon="ant-design:plus-outlined"/>上传资源</a-button>
<a-button type="primary" danger @click="delTwo($event, one, two)" class="addBtn" title="删除此项及以下"><Icon icon="ant-design:delete"/>删除</a-button>
</a-space>
</template>
<div style="padding-top: 1rem;">
<a-space>
<div><a-button type="primary" @click="addThree($event, two, 'video')" class="addBtn"><Icon icon="ant-design:video-camera-outlined"/>视频</a-button></div>
<div><a-button type="primary" @click="addThree($event, two, 'document')" class="addBtn"><Icon icon="ant-design:file-outlined"/>文档</a-button></div>
<div><a-button type="primary" @click="addThree($event, two, 'richText')" class="addBtn"><Icon icon="ant-design:file-text-outlined"/>富文本</a-button></div>
<!-- <div><a-button type="primary" @click="addThree($event, two, 'classroomTest')" class="addBtn"><Icon icon="ant-design:plus-outlined"/>随堂测试</a-button></div>
<div><a-button type="primary" @click="addThree($event, two, 'discuss')" class="addBtn"><Icon icon="ant-design:plus-outlined"/>讨论</a-button></div> -->
</a-space>
</div>
<draggable v-bind="draggableBind" v-model="two.childrenList">
<template #item="{ element: three }">
<div class="box">
<a-card>
<template #title>
{{ one.sort }}.{{ two.sort }}.{{ three.sort }}
<template v-if="three.type == 'video'">
<Icon icon="ant-design:video-camera-outlined" />视频
</template>
<template v-else-if="three.type == 'document'">
<Icon icon="ant-design:file-outlined" />文档
</template>
<template v-else-if="three.type == 'richText'">
<Icon icon="ant-design:file-text-outlined" />富文本
</template>
</template>
<template #extra>
<a-space>
<a-button type="primary" v-if="three.isEdit" @click="() => three.isEdit = false" class="addBtn"><Icon icon="ant-design:edit"/>确认</a-button>
<a-button type="primary" v-if="!three.isEdit" @click="() => three.isEdit = true" class="addBtn"><Icon icon="ant-design:edit"/>编辑</a-button>
<a-button type="primary" danger @click="delThree($event, two, three)" class="addBtn"><Icon icon="ant-design:delete"/>删除</a-button>
</a-space>
</template>
<div class="topDiv">
<template v-if="three.type == 'video'">
<!-- <j-upload v-model:value="three.filePath" maxCount="1" suffixList="avi,mov,mkv,mpeg,asf,3gp,wmv,mp4,flv,rmvb"/> video/mp4,video/webm,video/ogv-->
<j-upload v-if="three.isEdit" v-model:value="three.filePath" maxCount="1" text="上传视频" accept=".mp4,.webm,.ogv" :forceAcceptVerify="true"/>
<div v-else class="ainput">&nbsp;{{ three.filePath }}</div>
</template>
<template v-if="three.type == 'document'">
<j-upload v-if="three.isEdit" v-model:value="three.filePath" maxCount="1"/>
<div v-else class="ainput">&nbsp;{{ three.filePath }}</div>
</template>
<template v-if="three.type == 'richText'">
<j-editor v-if="three.isEdit" v-model:value="three.richText"/>
<div v-else class="richText" v-html="three.richText"></div>
</template>
<!-- <template v-if="three.type == 'classroomTest'">
随堂测试
</template>
<template v-if="three.type == 'discuss'">
讨论
</template> -->
</div>
</a-card>
</div>
</template>
</draggable>
</a-collapse-panel>
</a-collapse>
</a-card>
</div>
</template>
</draggable>
</a-collapse-panel>
</a-collapse>
</a-card>
</div>
</template>
<!-- <template #footer> -->
<!-- <a-button @click="sureChange" type="primary" style="margin-top: 100px">确定</a-button> -->
<!-- </template> -->
</draggable>
</div>
</div>
</template>
<script lang="ts" name="jiaoXueDanYuanNeiRongIndex" setup>
import { ref, reactive, onMounted, unref, nextTick } from 'vue';
import { Input, Popover, Pagination, Empty, Affix as aAffix } from 'ant-design-vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
import { useRouter } from 'vue-router';
import { randomString, simpleDebounce } from '/@/utils/common/compUtils'
import draggable from 'vuedraggable';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh, xqxn, type } = query;//
const { createConfirm, createMessage } = useMessage();
const queryParam = ref<any>({});
const dataSource = ref<any>([]);
const isNotMove = ref<boolean>(true);
const saveLoading = ref<boolean>(false);
//
const draggableBind = ref<Object>({
//
itemKey: '_id',
// onStart: moveDraggable,
// onAdd: onAddFn,
// onRemove: onRemoveFn,
// onUpdate: onUpdateFn,
//
onEnd: endDraggable,
//
// onChoose: simpleDebounce(chooseDraggable, 500),
// onChoose: chooseDraggable,
//
// onUnchoose: unchooseDraggable,
// onSort: onSortFn,
// onFilter: onFilterFn,
// onClone: onCloneFn,
// onMove: onMoveFn,
});
enum Api {
list = '/teachingunitcontent/kcTeachingUnitContentOne/allList',
edit = '/teachingunitcontent/kcTeachingUnitContentOne/edit',
}
/**
* 列表接口
* @param params
*/
const listAll = (params) => defHttp.get({ url: Api.list, params });
const editAll = (params) => defHttp.post({ url: Api.edit, params }, { isTransformResponse: true });
function reload() {
loadData();
}
function loadData() {
dataSource.value = [];
let params = {
rwbh,
xqxn,
}
listAll(params).then(res => {
dataRecursion(res, (x) => x._id = x.id);
dataSource.value = res;
});
}
//
function dataRecursion(list, fn){
let _list = list;
_list.forEach((x,i) => {
fn(x,i);
if(x.childrenList && x.childrenList.length){
dataRecursion(x.childrenList, fn);
}
})
}
//
function refreshDataSort(){
dataRecursion(dataSource.value, (x, i) => x.sort = i+1);
}
//
function createNoneData(){
let data = {
//ID
_id: randomString(32),
title: null,
sort: 0,
childrenList: [],
}
return data;
}
function stop(e) {
e?.stopPropagation();
}
function changeInput(e, pdata, key) {
let { target } = e;
let { value } = target;
pdata[key] = value;
}
function addOne(){
dataSource.value.push(createNoneData());
createMessage.success('添加标题成功!');
nextTick(() => {
refreshDataSort();
})
}
function delOne(e, one){
stop(e);
let index = dataSource.value.findIndex(x => x == one);
if(index == -1) return;
dataSource.value.splice(index, 1);
createMessage.success('删除标题成功!');
nextTick(() => {
refreshDataSort();
})
}
// function insertOne(index){
// dataSource.value.splice(index,0, createNoneData());
// }
//
function getBtnEle(e, className){
if(e){
//
if(e?.classList?.contains(className)){
return e;
} else {
//
return getBtnEle(e.parentElement, className);
}
// //
// if(!e.parentElement.classList.contains(className)){
// //
// console.log('111111',e.parentElement);
// }else{
// console.log('2222',e.parentElement);
// return e.parentElement;
// }
}
}
function addTwo(e, one){
let btn = getBtnEle(e.target, 'twoBtn');
if(btn == null){
console.error('出大事了!');
return;
}
let tab = null;
document.querySelectorAll('.maxDiv .box .ant-collapse-header').forEach(x => {
let twoBtn = x.querySelector('.twoBtn');
if(twoBtn == btn){
tab = x;
}
});
let ariaExpanded = tab.getAttribute('aria-expanded');
if(ariaExpanded == 'false') {
}else{
stop(e);
}
if(one.childrenList){
one.childrenList.push(createNoneData());
}else{
one.childrenList = [ createNoneData() ];
}
createMessage.success('添加章节成功!');
nextTick(() => {
refreshDataSort();
})
}
function delTwo(e, one, two){
stop(e);
let index = one.childrenList.findIndex(x => x == two);
if(index == -1) return;
one.childrenList.splice(index, 1);
createMessage.success('删除章节成功!');
nextTick(() => {
refreshDataSort();
})
}
// function insertTwo(one, index){
// one.childrenList.splice(index,0, createNoneData());
// }
function addThree(e, two, type){
stop(e);
let data = createNoneData();
delete data.title;
data.type = type;
data.richText = null;
data.filePath = null;
if(two.childrenList){
two.childrenList.push(data);
}else{
two.childrenList = [ data ];
}
createMessage.success('新增成功!');
nextTick(() => {
refreshDataSort();
})
}
function delThree(e, two, three){
stop(e);
let index = two.childrenList.findIndex(x => x == three);
if(index == -1) return;
two.childrenList.splice(index, 1);
createMessage.success('删除成功!');
nextTick(() => {
refreshDataSort();
})
}
//,
function endDraggable(){
//
isNotMove.value = false;
nextTick(() => {
isNotMove.value = true;
refreshDataSort();
})
}
//
// function chooseDraggable(){
// // isNotMove.value = false;
// }
//
// function unchooseDraggable(){
// // isNotMove.value = true;
// }
// function onAddFn() { console.log('onAddFn'); }
// function onRemoveFn() { console.log('onRemoveFn'); }
// function onUpdateFn() { console.log('onUpdateFn'); }
// function onChooseFn() { console.log('onChooseFn'); }
// function onUnchooseFn() { console.log('onUnchooseFn'); }
// function onSortFn() { console.log('onSortFn'); }
// function onFilterFn() { console.log('onFilterFn'); }
// function onCloneFn() { console.log('onCloneFn'); }
// function onMoveFn() { console.log('onMoveFn'); }
// //
// function moveDraggable() {
// console.log('move');
// isNotMove.value = false;
// }
async function save(){
saveLoading.value = true;
console.log(unref(dataSource));
let saveData = {
rwbh,
xqxn,
teachingUnitContentOneList: unref(dataSource),
}
if(!saveData.rwbh || !saveData.xqxn){
createMessage.error('无法保存!');
saveLoading.value = false;
return;
}else if(!saveData.teachingUnitContentOneList || !saveData.teachingUnitContentOneList.length){
createMessage.warn('请添加数据!');
saveLoading.value = false;
return;
}
await editAll(saveData);
saveLoading.value = false;
}
loadData();
</script>
<style lang="less" scoped>
.max {
height: calc(-142px + 100vh);
min-height: calc(-142px + 100vh);
max-height: calc(-142px + 100vh);
overflow: hidden;
.maxDiv {
height: calc(-170px + 100vh);
overflow-y: auto;
}
}
.box {
margin: .5rem 0 0 0;
.itemTop {
width: 100%;
}
}
.topButton {
padding-top: 10px;
}
.ainput {
width: 100%;
}
.ainputNoEdit {
border: #d9d9d9 solid 1px;
}
.inputd {
width: calc(100% - 35px);
}
.topDiv {
width: 100%;
display: flex;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
}
.twoInputd {
width: calc(100% - 45px);
}
.twoTopDiv {
width: 100%;
}
.richText {
max-height: 400px;
overflow: auto;
}
:deep(.maxDiv) .ant-collapse-header{
align-items: center;
}
</style>

View File

@ -7,6 +7,7 @@ enum Api {
list = '/zyInfoStudent/zyInfoStudent/list',
save='/zyInfoStudent/zyInfoStudent/add',
edit='/zyInfoStudent/zyInfoStudent/edit',
zyscStu='/zyInfoStudent/zyInfoStudent/zyscStu',
deleteOne = '/zyInfoStudent/zyInfoStudent/delete',
deleteBatch = '/zyInfoStudent/zyInfoStudent/deleteBatch',
importExcel = '/zyInfoStudent/zyInfoStudent/importExcel',
@ -70,3 +71,10 @@ export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}
export const zyscStu = (params, isUpdate) => {
let url = Api.zyscStu;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -37,14 +37,14 @@
<!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>-->
<template #fileSlot="{text}">
<!-- <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>
<template #fileZxSlot="{text}">
</template> -->
<!-- <template #fileZxSlot="{text,record}">
<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="yulanFile(text)">预览</a-button>
</template>
</template> -->
</BasicTable>
<!-- 表单区域 -->
<ZyInfoStudentModal ref="registerModal" @success="handleSuccess"></ZyInfoStudentModal>
@ -64,7 +64,10 @@
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import ZyInfoStudentScoreModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentScoreModal.vue'
import { useGlobSetting } from '/@/hooks/setting';
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const queryParam = ref<any>({});
const mainId = ref<string>('');
@ -108,10 +111,15 @@ import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
sm: { span: 16 },
});
function yulanFile(text){
function yulanFile(record){
// let url = "https://view.officeapps.live.com/op/view.aspx?src="+encodeURIComponent(getFileAccessHttpUrl(text));
// let url = "https://view.officeapps.live.com/op/view.aspx?src="+encodeURIComponent(getFileAccessHttpUrl(text));
let url = "https://view.xdocin.com/view?src="+encodeURIComponent('https://view.xdocin.com/demo/view.docx');
// let url = "https://view.xdocin.com/view?src="+encodeURIComponent('https://view.xdocin.com/demo/view.docx');
// window.open(url,"_blank")
var url2 = getFileAccessHttpUrl(record.pdfPath)
console.log(`🚀 ~ openPdf ~ url2:`, url2)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}
/**

View File

@ -4,7 +4,7 @@
<a-row>
<a-col :span="24">
<a-form-item label="上传作业" v-bind="validateInfos.filePath">
<j-upload v-model:value="formData.filePath" :disabled="disabled" ></j-upload>
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true" ></j-upload>
</a-form-item>
</a-col>
</a-row>
@ -18,7 +18,7 @@
import { useMessage } from '/@/hooks/web/useMessage';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../ZyInfoStudent.api';
import { saveOrUpdate,zyscStu } from '../ZyInfoStudent.api';
import { Form } from 'ant-design-vue';
const props = defineProps({
@ -98,7 +98,7 @@
}
}
}
await saveOrUpdate(model, isUpdate.value)
await zyscStu(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);

View File

@ -14,12 +14,12 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'kcjs'
},
{
title: '教学大纲',
align: "center",
dataIndex: 'filePath',
slots: { customRender: 'fileSlot' },
},
// {
// title: '教学大纲',
// align: "center",
// dataIndex: 'filePath',
// slots: { customRender: 'fileSlot' },
// },
];
//查询数据

View File

@ -95,7 +95,7 @@
function handleEdit(record: Recordable) {
// 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 => {
defHttp.post({url: '/zyJxdg/zyJxdg/editJxdgyy', params: {kcjs:record.kcjs,rwbh,xqxn }}).then(res => {
console.log(`🚀 ~ defHttp.post ~ res:`, res)
});