修改bug
This commit is contained in:
parent
f6fe5a2105
commit
b41212f64f
|
@ -19,7 +19,8 @@ VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
|||
VITE_GLOB_API_URL=/jeecg-boot
|
||||
|
||||
#后台接口全路径地址(必填)
|
||||
VITE_GLOB_DOMAIN_URL=https://zxkccx.webvpn.nenu.edu.cn/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服务器地址
|
||||
|
@ -38,5 +39,5 @@ VITE_USE_PWA = false
|
|||
VITE_LEGACY = false
|
||||
|
||||
# 是否开启单点登录
|
||||
VITE_GLOB_APP_OPEN_SSO = true
|
||||
VITE_GLOB_APP_OPEN_SSO = false
|
||||
|
||||
|
|
|
@ -16,10 +16,13 @@
|
|||
<a-col :span="20" style="overflow-y: scroll;height: calc(80vh);">
|
||||
<div style="text-align: center;width: 100%;font-weight: bold;font-size: 20px;padding: 20px;">
|
||||
{{ title }}</div>
|
||||
<!-- 题干信息 -->
|
||||
<div style="width:100%;" v-for="(item,index) in tiganData" :key="index">
|
||||
<!-- 单选题 -->
|
||||
<div style="width: 100%;" v-if="item.wjType==3">
|
||||
|
||||
|
||||
<draggable @end="end" v-model="tiganData" item-key="id">
|
||||
<template #item="{ index,element:item }">
|
||||
<div>
|
||||
<!-- 单选题 -->
|
||||
<div style="width: 100%;" v-if="item.wjType==3">
|
||||
<a-card >
|
||||
<template #title>
|
||||
<span>{{index+1}}、</span>
|
||||
|
@ -131,6 +134,14 @@
|
|||
无对应类型
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
|
||||
|
||||
<!-- 题干信息 -->
|
||||
<div style="width:100%;" v-for="(item,index) in tiganData" :key="index">
|
||||
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<YinyongTikuListModal ref="YinyongTikuListModalpage" @success="handleYytkSuccess" />
|
||||
|
@ -147,6 +158,7 @@ import { queryWjxWjxxTmxxListByMainId, queryDataById, saveOrUpdate } from '/@/vi
|
|||
import YinyongTikuListModal from '/@/views/kc/wjxWjxxTmlb/YinyongTikuListModal.vue'
|
||||
import YinyongTikuDcListModal from '/@/views/kc/wjxWjxxTmlb/YinyongTikuDcListModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import draggable from 'vuedraggable';
|
||||
|
||||
//用户相关
|
||||
const userStore = useUserStore();
|
||||
|
@ -220,6 +232,16 @@ function addTigan(type){
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 拖动结束事件
|
||||
* @param evt
|
||||
*/
|
||||
function end(evt) {
|
||||
for(var i=0;i<tiganData.value.length;i++){
|
||||
tiganData.value[i].wjIndex = i+1;
|
||||
}
|
||||
console.log(`🚀 ~ end ~ tiganData:`, tiganData)
|
||||
}
|
||||
function handleQiehuan(record,type){
|
||||
console.log(`🚀 ~ handleQiehuan ~ type:`, type)
|
||||
console.log(`🚀 ~ handleQiehuan ~ record:`, record)
|
||||
|
|
|
@ -21,21 +21,9 @@
|
|||
<a-row >
|
||||
<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>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2" v-if="getSysConfig().flag7=='1'">
|
||||
<a class="abox" @click="toDom('tkzjDom')">评课足迹</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3" v-if="getSysConfig().flag2=='1'&& getSysConfig().sfbmd=='n'">
|
||||
<a class="abox" @click="toDom('rkjcDom')">任教课程</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="8" v-if="getSysConfig().sfbmd=='n'">
|
||||
<a class="abox" @click="toDom('pjjgDom')">评价结果</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="4" v-if="getSysConfig().flag3=='1'">
|
||||
<a class="abox" @click="toDom('yykcDom')">预约课程</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="5" v-if="getSysConfig().flag4=='1'&& getSysConfig().sfbmd=='n'">
|
||||
<a class="abox" @click="toDom('jcgkkDom')">公 开 课</a>
|
||||
</a-menu-item>
|
||||
|
@ -45,9 +33,21 @@
|
|||
<a-menu-item key="7" v-if="getSysConfig().flag6=='1'">
|
||||
<a class="abox" @click="toDom('jrkclbDom')">课程查询</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="4" v-if="getSysConfig().flag3=='1'">
|
||||
<a class="abox" @click="toDom('yykcDom')">预约课程</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="8" v-if="getSysConfig().sfbmd=='n'" >
|
||||
<a class="abox" @click="toDom('ktsbDom')">听课笔记</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="8" v-if="getSysConfig().sfbmd=='n'">
|
||||
<a class="abox" @click="toDom('pjjgDom')">评价结果</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="1" v-if="getSysConfig().flag7=='1'">
|
||||
<a class="abox" @click="toDom('tkzjDom')">听课足迹</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2" v-if="getSysConfig().flag7=='1'">
|
||||
<a class="abox" @click="toDom('tkzjDom')">评课足迹</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 0 }" :sm="{ span: 24 }" :lg="{ span: 24 }" v-if="getUserSf()=='S-'">
|
||||
|
|
|
@ -14,20 +14,16 @@
|
|||
<lunboPage v-if="getSysConfig().sfbmd=='n'"/>
|
||||
<!-- 通知公告 -->
|
||||
<tongZhiGongGaoPage v-if="getSysConfig().sfbmd=='n'"/>
|
||||
<!-- 听课足迹 -->
|
||||
<tingKeZuJiPage v-if="getUserSf()=='T'"/>
|
||||
|
||||
<!-- 教师代办提醒 -->
|
||||
<teacherDbtx v-if="getUserSf()=='T'"></teacherDbtx>
|
||||
<!-- 任教教程 -->
|
||||
<renKeJiaoChengPage v-if="getUserSf()=='T'&&getSysConfig().flag2=='1'&&getSysConfig().sfbmd=='n'" />
|
||||
<!-- 评价结果 -->
|
||||
<pjjgPage v-if="getSysConfig().sfbmd=='n'&&getUserSf()=='T'"/>
|
||||
<!-- 预约课程 -->
|
||||
<yuYueKeChengPage ref="yykcModeal" @orther-load="yykcLoad" v-if="getUserSf()=='T'&&getSysConfig().flag3=='1'"/>
|
||||
<!-- 精彩公开课 -->
|
||||
<jingCaiGongKaiKePage v-if="getUserSf()=='T'&&getSysConfig().flag4=='1'&&getSysConfig().sfbmd=='n'"/>
|
||||
<!-- 可线上听课课堂 -->
|
||||
<kxstkktPage v-if="getUserSf()=='T'&&getSysConfig().flag5=='1'"/>
|
||||
<!-- 今日课程列表 -->
|
||||
|
||||
<a-card class="rowGutter" v-if="getUserSf()=='T'&&getSysConfig().flag6=='1'" id="jrkclbDom">
|
||||
<template #title>
|
||||
<span style="font-size: 24px;font-weight: bold;">课程查询</span>
|
||||
|
@ -54,8 +50,14 @@
|
|||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
<!-- 预约课程 -->
|
||||
<yuYueKeChengPage ref="yykcModeal" @orther-load="yykcLoad" v-if="getUserSf()=='T'&&getSysConfig().flag3=='1'"/>
|
||||
<!-- 课堂随笔 -->
|
||||
<ktsbPage v-if="getSysConfig().sfbmd=='n'&&getUserSf()=='T'"/>
|
||||
<!-- 评价结果 -->
|
||||
<pjjgPage v-if="getSysConfig().sfbmd=='n'&&getUserSf()=='T'"/>
|
||||
<!-- 听课足迹 -->
|
||||
<tingKeZuJiPage v-if="getUserSf()=='T'"/>
|
||||
|
||||
</a-layout-content>
|
||||
<!-- 学生部分今日课表 -->
|
||||
|
@ -100,6 +102,7 @@
|
|||
import StudentJlrkbPage from '/@/views/site/studentJlrkb/index.vue';
|
||||
import studentWdkc from '/@/views/site/studentWdkc/studentWdkc.vue';
|
||||
import studentDbtx from '/@/views/site/studentWdkc/studentDbtx.vue';
|
||||
import teacherDbtx from '/@/views/site/studentWdkc/teacherDbtx.vue';
|
||||
|
||||
import pjjgPage from '/@/views/site/pjjgPage/index.vue';
|
||||
|
||||
|
@ -139,35 +142,9 @@
|
|||
const sfxx = ref<string>('0');
|
||||
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
// 实时计算浏览器的宽度
|
||||
// window.onresize = () => {
|
||||
// return (() => {
|
||||
// let fullWidth = document.documentElement.clientWidth;
|
||||
// let width = fullWidth; // 宽
|
||||
// if(width<600){
|
||||
// maxClassName.value = {width:"100%"}
|
||||
// }else if(width>=500&&width<1070){
|
||||
// width = width-300
|
||||
// maxClassName.value = {width:width+"px"}
|
||||
// }else{
|
||||
// width = 1070
|
||||
// maxClassName.value = {width:width+"px"}
|
||||
// }
|
||||
// })()
|
||||
// };
|
||||
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
// var width = window.screen.width * window.devicePixelRatio;
|
||||
// console.log(`🚀 ~ file: index.vue:104 ~ onMounted ~ width:`, width)
|
||||
// if(width<1070){
|
||||
// width = width-200
|
||||
// maxClassName.value = {width:width+"px"}
|
||||
// }else{
|
||||
// width = 1070
|
||||
// maxClassName.value = {width:width+"px"}
|
||||
// }
|
||||
|
||||
let roleList = getUserInfo().roleList;
|
||||
if(roleList){
|
||||
for(var i=0;i<roleList.length;i++){
|
||||
|
@ -254,13 +231,13 @@
|
|||
}
|
||||
.ant-layout-sider {
|
||||
color: #fff;
|
||||
line-height: 120px;
|
||||
// line-height: 120px;
|
||||
background: #3ba0e9;
|
||||
}
|
||||
.ant-layout-content {
|
||||
min-height: 120px;
|
||||
color: #000;
|
||||
line-height: 120px;
|
||||
// line-height: 120px;
|
||||
background: #f3f3f4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,13 +150,18 @@ function rkbLoadData() {
|
|||
var newRow = ref<any>({});
|
||||
newRow = props.queryParam;
|
||||
newRow.userid = getUserId();
|
||||
newRow.pageSize = -1
|
||||
if(!props.queryParam.pageSize){
|
||||
newRow.pageSize = -1
|
||||
}else{
|
||||
newRow.pageSize = 12
|
||||
}
|
||||
newRow.sftkb = '1'
|
||||
console.log(`🚀 ~ file: kclbList.vue:109 ~ rkbLoadData ~ newRow:`, newRow)
|
||||
if(newRow.hh!=","){
|
||||
// listType.value = newRow.type
|
||||
// console.log(`🚀 ~ file: kclbList.vue:111 ~ rkbLoadData ~ listType:`, listType)
|
||||
list(newRow).then(res => {
|
||||
console.log(`🚀 ~ list ~ res:`, res)
|
||||
listData.value = res.records;
|
||||
console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
||||
|
||||
|
@ -171,7 +176,7 @@ function rkbLoadData() {
|
|||
console.log(`🚀 ~ file: kclbList.vue:148 ~ rkbLoadData ~ pjDisabled:`, pjDisabled)
|
||||
}
|
||||
|
||||
emit('setTotal', res.records.length);
|
||||
emit('setTotal', res.total);
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -49,8 +49,9 @@
|
|||
{{xxkcTotal}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<div style="width: 100%; margin-top: -40px; text-align: right; margin-bottom: 30px; color: #9d9d9d;">说明:日课表默认展示20条数据,请根据自行的需求进行按条件检索</div>
|
||||
<kclbList ref="wqxxkcModeal" :queryParam="xxkcqueryParam" @setTotal="xxkcTotal = $event;jzzyload()"></kclbList>
|
||||
|
||||
|
||||
</a-tab-pane>
|
||||
<!-- <a-tab-pane key="2">
|
||||
<template #tab>
|
||||
|
@ -99,6 +100,7 @@ function zbLoadData() {
|
|||
xxkcqueryParam.value.skxs = '1'
|
||||
xxkcqueryParam.value.jzwh = queryParam.value.jzwh
|
||||
xxkcqueryParam.value.zhjs = queryParam.value.zhjs
|
||||
xxkcqueryParam.value.pageSize = 20
|
||||
|
||||
//----------------------腾讯会议-------------------
|
||||
txhyqueryParam.value.skrq = queryParam.value.ywTime
|
||||
|
|
|
@ -1,36 +1,51 @@
|
|||
<template>
|
||||
<div>
|
||||
<a-row>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 8 }" :key="index" v-for="(item, index) in allList" >
|
||||
<div class="ketangCard ketangCardcol" >
|
||||
<div class="rjkcTopDiv">
|
||||
<div style="text-align: left;"><span>{{ item.sksj }}</span></div>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 8 }" :key="index" v-for="(item, index) in allList">
|
||||
<div class="ketangCard ketangCardcol">
|
||||
<div class="rjkcTopDiv">
|
||||
<div style="text-align: left"
|
||||
><span>{{ item.sksj }}</span></div
|
||||
>
|
||||
</div>
|
||||
<div class="rjkcBodyDiv">
|
||||
<div class="kcmcDiv">
|
||||
<!-- <a-badge :offset="[10|0]" :count="item.dbtxType" :title="'您有'+item.dbtxType+'条提醒信息'"> -->
|
||||
<a-badge
|
||||
:dot="item.dbtxType > 0 ? true : false"
|
||||
:offset="[5 | 0]"
|
||||
:numberStyle="{ backgroundColor: '#f00', width: '10px', height: '10px' }"
|
||||
:title="'您有' + item.dbtxType + '条提醒信息'"
|
||||
>
|
||||
<span style="font-size: 20px">{{ item.kcmc }}</span>
|
||||
</a-badge>
|
||||
</div>
|
||||
<div class="rjkcBodyDiv">
|
||||
<div class="kcmcDiv">
|
||||
<a-badge :dot="item.dbtxType!=null" :offset="[5|0]" :numberStyle="{ backgroundColor: '#f00', width: '10px', height: '10px' }">
|
||||
{{ item.kcmc }}
|
||||
</a-badge>
|
||||
</div>
|
||||
<div class="skddDiv" style="margin-top:20px;">{{ item.skdd }}</div>
|
||||
<div class="xkrsDiv">{{ item.xkrs }}人选课 <a-button class="buttonClass" @click="openKechengDetail(item)">进入课程</a-button></div>
|
||||
<div class="skddDiv" style="margin-top: 20px">{{ item.skdd }}</div>
|
||||
<div class="skddDiv" style="margin-top: 20px">学分:{{ item.xf }}</div>
|
||||
<!-- <div class="skddDiv" style="margin-top: 20px">教课周次:{{ item.jkzc }}</div> -->
|
||||
<div class="xkrsDiv" @click="openXkrs(item)" style="cursor: pointer;">{{ item.xkrs }}人选课
|
||||
<a-button class="buttonClass" @click="openKechengDetail(item)">进入课程</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { getUserSf, getSysConfig } from '/@/views/site/utils/index';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||
|
||||
import { router } from '/@/router';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { router } from '/@/router';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const allList = ref<any>([]);
|
||||
const XxhbbksListModalPage = ref();
|
||||
|
||||
const weebMap = {
|
||||
'1': '星期一',
|
||||
|
@ -40,48 +55,54 @@ const weebMap = {
|
|||
'5': '星期五',
|
||||
'6': '星期六',
|
||||
'7': '星期日',
|
||||
}
|
||||
function toWeek(week){
|
||||
};
|
||||
function toWeek(week) {
|
||||
return weebMap[week];
|
||||
}
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
|
||||
//获取选课人数
|
||||
function openXkrs(record){
|
||||
console.log(`🚀 ~ openXkrs ~ record:`, record)
|
||||
XxhbbksListModalPage.value.disableSubmit = true;
|
||||
XxhbbksListModalPage.value.init(record);
|
||||
}
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
loadData();
|
||||
setInterval(() => {
|
||||
loadData()
|
||||
}, 60*1000);
|
||||
});
|
||||
|
||||
function loadData() {
|
||||
defHttp.get({ url: '/ktgl/kcKechengbiao/getKechengbiaolist', params: { checkType: '0' } }).then((res) => {
|
||||
console.log(res);
|
||||
allList.value = res.records;
|
||||
});
|
||||
}
|
||||
function openKechengDetail(item) {
|
||||
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteByRwbhCreate', params: { rwbh: item.rwbh, fbr: item.jgh } }).then((res) => {
|
||||
loadData();
|
||||
});
|
||||
|
||||
function loadData(){
|
||||
|
||||
defHttp.get({ url: '/ktgl/kcKechengbiao/getKechengbiaolist',params:{checkType:'0'}}).then((res) => {
|
||||
console.log(res);
|
||||
allList.value = res.records;
|
||||
});
|
||||
|
||||
}
|
||||
function openKechengDetail(item){
|
||||
console.log(`🚀 ~ openKechengDetail ~ item:`, item)
|
||||
|
||||
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteByRwbhCreate',params:{rwbh:item.rwbh,fbr:item.jgh} }).then((res) => {
|
||||
loadData()
|
||||
});
|
||||
|
||||
window.open('/zy/tuGonggao?rwbh='+item.rwbh+'&xqxn='+getSysConfig().flag1+"&type=1"+"&teano="+item.jgh,"_blank");
|
||||
}
|
||||
window.open('/zy/tuGonggao?rwbh=' + item.rwbh + '&xqxn=' + getSysConfig().flag1 + '&type=1' + '&teano=' + item.jgh, '_blank');
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.ketangCard {
|
||||
margin: .5rem;
|
||||
margin: 0.5rem;
|
||||
}
|
||||
.ketangCardcol{
|
||||
.ketangCardcol {
|
||||
background-color: #f3f3f3;
|
||||
padding: 1px;
|
||||
}
|
||||
.rjkcTopDiv {
|
||||
background: #fff;
|
||||
padding: .9rem;
|
||||
padding: 0.9rem;
|
||||
color: #1ab394;
|
||||
font-size: 18px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
text-align:right;
|
||||
text-align: right;
|
||||
}
|
||||
.nDayDiv {
|
||||
top: -14px;
|
||||
|
@ -92,7 +113,7 @@ function toWeek(week){
|
|||
font-weight: 200;
|
||||
padding: 2px 6px 2px 6px;
|
||||
border-radius: 0 0 0 5px;
|
||||
text-align:left;
|
||||
text-align: left;
|
||||
}
|
||||
.rjkcBodyDiv {
|
||||
margin-top: 1px;
|
||||
|
@ -125,4 +146,7 @@ function toWeek(week){
|
|||
background: #6cafda;
|
||||
}
|
||||
}
|
||||
.xkrsDiv:hover{
|
||||
color:#1c84c6;
|
||||
}
|
||||
</style>
|
|
@ -5,9 +5,10 @@
|
|||
<span style="margin-left: 10px;"><a href="javascript:void(0);" @click="openChangeKcPage">修改课程提醒</a></span>
|
||||
<span style="margin-left: 10px;"><a href="javascript:void(0);" @click="openKecheng(null)">全部课程</a></span>
|
||||
</template>
|
||||
|
||||
<dqxqkc/>
|
||||
<!-- <template #extra></template> -->
|
||||
<!-- <div class="cardBody"> -->
|
||||
<dqxqkc/>
|
||||
<!-- <a-row>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 8 }" :key="index" v-for="(item, index) in allList" :hidden="currentPageSize * 3 <= index" class="">
|
||||
|
||||
|
|
|
@ -5,16 +5,15 @@
|
|||
</div>
|
||||
<div style="min-height:70px;">
|
||||
<a-row>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 12 }" :lg="{ span: 12 }" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataSource" :key="index2">
|
||||
<a-col :span="24" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataSource" :key="index2">
|
||||
<a-row style="margin-top: 15px;">
|
||||
<a-col :span="18" style="text-align:left;padding-left:15px;">
|
||||
<!-- {{item.content}} -->
|
||||
<div>{{index2+1}}、{{item.content}}</div>
|
||||
<div>发布时间:{{item.createTime}}</div>
|
||||
|
||||
</a-col>
|
||||
<a-col :span="6" style="text-align:right">
|
||||
<a-button type="primary" @click="openKecheng(item)">查看</a-button>
|
||||
<span>提醒时间:{{item.createTime}}</span>
|
||||
<a-button type="primary" @click="openKecheng(item)" style="margin-left:10px;">查看</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
@ -38,6 +37,9 @@ const dataSource = ref([]);
|
|||
//进入就加载
|
||||
onMounted(() => {
|
||||
loaddata()
|
||||
setInterval(() => {
|
||||
loaddata()
|
||||
}, 60*1000);
|
||||
});
|
||||
function loaddata(){
|
||||
defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:10,pageNo:1,createBy:userStore.getUserInfo.username} }).then((res) => {
|
||||
|
|
|
@ -1,79 +1,127 @@
|
|||
<template>
|
||||
<div class="indexBackClass" id="stuwdkcDom">
|
||||
<div style="margin-top: 20px;">
|
||||
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">我的课程</span>
|
||||
<div style="margin-top: 20px">
|
||||
<span style="margin-left: 30px; font-size: 24px; font-weight: 600">我的课程</span>
|
||||
</div>
|
||||
<div style="min-height:200px;">
|
||||
<a-row>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 12 }" :lg="{ span: 6 }" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataSource" :key="index2">
|
||||
<div style="border: 2px #eef1f2 solid;">
|
||||
<div>
|
||||
<div class="jtkcTitleClass"></div>
|
||||
<div style="width:100%;white-space:normal; word-break:break-all;overflow:hidden;padding: 15px;font-weight: 600;font-size: 16px;color: #a50a0a; height: 70px;">
|
||||
<a-badge :dot="item.dbtxType!=null" :offset="[5|0]" :numberStyle="{ backgroundColor: '#f00', width: '10px', height: '10px' }">
|
||||
<span>{{ item.kcmc }}</span>
|
||||
</a-badge>
|
||||
<div style="text-align: right; width: 100%;padding: 0 20px 20px 0;">
|
||||
<a-switch v-model:checked="checked1" checkedChildren="卡片" unCheckedChildren="列表" />
|
||||
</div>
|
||||
<div v-if="checked1">
|
||||
<div style="min-height: 200px">
|
||||
<a-row>
|
||||
<a-col
|
||||
:xs="{ span: 24 }"
|
||||
:sm="{ span: 12 }"
|
||||
:lg="{ span: 6 }"
|
||||
style="padding: 0 10px; margin-bottom: 10px"
|
||||
v-for="(item, index2) in dataSource"
|
||||
:key="index2"
|
||||
>
|
||||
<div style="border: 2px #eef1f2 solid">
|
||||
<div>
|
||||
<div class="jtkcTitleClass"></div>
|
||||
<div
|
||||
style="
|
||||
width: 100%;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
padding: 15px;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
color: #a50a0a;
|
||||
height: 70px;
|
||||
"
|
||||
>
|
||||
<a-badge :dot="item.dbtxType != null" :offset="[5 | 0]" :numberStyle="{ backgroundColor: '#f00', width: '10px', height: '10px' }">
|
||||
<span>{{ item.kcmc }}</span>
|
||||
</a-badge>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider style="margin: 0px; color: #eef1f2" />
|
||||
<div style="padding: 20px; font-weight: 600">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="font-size: 16px; margin-top: 0px; padding: 0px; height: 45px; color: #0e6393">{{ item.skdd }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align: center">
|
||||
<span style="font-size: 16px; margin-top: 0px; padding: 0px; height: 45px; width: 50%; float: left; overflow: hidden">{{
|
||||
item.skjs
|
||||
}}</span>
|
||||
<span style="font-size: 16px; margin-top: 0px; padding: 0px; height: 45px; width: 50%; float: right"
|
||||
><a-button type="primary" @click="openKecheng(item)">进入课程</a-button></span
|
||||
>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider style="margin: 0px;color: #eef1f2;" />
|
||||
<div style="padding: 20px;font-weight: 600;">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<div style="font-size: 16px;margin-top: 0px; padding: 0px; height: 45px;color:#0e6393;">{{ item.skdd }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align: center;">
|
||||
<span style="font-size: 16px;margin-top: 0px; padding: 0px; height: 45px;width:50%;float:left;overflow: hidden;">{{ item.skjs }}</span>
|
||||
<span style="font-size: 16px;margin-top: 0px; padding: 0px; height: 45px;width:50%;float:right;"><a-button type="primary" @click="openKecheng(item)">进入课程</a-button></span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" v-show="dataSource.length == 0">
|
||||
<a-empty/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="24" v-show="dataSource.length == 0">
|
||||
<a-empty />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!checked1">
|
||||
<div style="min-height: 200px">
|
||||
<a-row>
|
||||
<a-col :span="24" style="padding: 0 10px; margin-bottom: 10px" v-for="(item, index2) in dataSource" :key="index2">
|
||||
<a-row>
|
||||
<a-col :span="18">
|
||||
<span>{{ index2+1 }}、</span>
|
||||
<span>【{{ item.kcmc }}】 </span>
|
||||
<span>在{{ item.skdd }}上课,</span>
|
||||
<span>授课教师是{{ item.skjs }}。</span>
|
||||
</a-col>
|
||||
<a-col :span="6" style="text-align:right;"><a-button type="primary" @click="openKecheng(item)">进入课程</a-button></a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="24" v-show="dataSource.length == 0">
|
||||
<a-empty />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { getSysConfig } from '/@/views/site/utils/index';
|
||||
|
||||
const checked1 = ref(true);
|
||||
const dataSource = ref([]);
|
||||
//进入就加载
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
loaddata()
|
||||
loaddata();
|
||||
});
|
||||
function loaddata(){
|
||||
defHttp.get({ url: '/ktgl/kcKechengbiao/getStudentKclist',params:{pageSize:-1} }).then((res) => {
|
||||
dataSource.value = res.records;
|
||||
function loaddata() {
|
||||
defHttp.get({ url: '/ktgl/kcKechengbiao/getStudentKclist', params: { pageSize: -1 } }).then((res) => {
|
||||
dataSource.value = res.records;
|
||||
});
|
||||
}
|
||||
|
||||
function openKecheng(record){
|
||||
console.log(`🚀 ~ openKecheng ~ record:`, record)
|
||||
|
||||
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteByRwbhCreate',params:{rwbh:record.rwbh,fbr:record.jgh} }).then((res) => {
|
||||
loaddata()
|
||||
});
|
||||
var url = "/stuzy/StudentGonggaoList?rwbh="+record.rwbh+"&xqxn="+record.xqxn+"&teano="+record.jgh;
|
||||
window.open(url,'_blank')
|
||||
}
|
||||
function openKecheng(record) {
|
||||
console.log(`🚀 ~ openKecheng ~ record:`, record);
|
||||
|
||||
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteByRwbhCreate', params: { rwbh: record.rwbh, fbr: record.jgh } }).then((res) => {
|
||||
loaddata();
|
||||
});
|
||||
var url = '/stuzy/StudentGonggaoList?rwbh=' + record.rwbh + '&xqxn=' + record.xqxn + '&teano=' + record.jgh;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.indexBackClass{
|
||||
.indexBackClass {
|
||||
background: #fff;
|
||||
margin: 20px 0;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.jtkcTitleClass{
|
||||
background-image: linear-gradient(to right ,#1c84c6, #67b4e5);
|
||||
.jtkcTitleClass {
|
||||
background-image: linear-gradient(to right, #1c84c6, #67b4e5);
|
||||
color: white;
|
||||
line-height: 30px;
|
||||
padding: 3px 0 0 10px;
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
<template>
|
||||
<div class="indexBackClass" id="stuwdkcDom">
|
||||
<div style="margin-top: 20px;">
|
||||
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">提醒信息</span>
|
||||
</div>
|
||||
<div style="min-height:70px;">
|
||||
<a-row>
|
||||
<a-col :span="24" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataSource" :key="index2">
|
||||
<a-row style="margin-top: 15px;">
|
||||
<a-col :span="18" style="text-align:left;padding-left:15px;">
|
||||
<div>{{index2+1}}、{{item.content}}</div>
|
||||
</a-col>
|
||||
<a-col :span="6" style="text-align:right">
|
||||
<span>提醒时间:{{item.createTime}}</span>
|
||||
<a-button type="primary" @click="openKecheng(item)" style="margin-left:10px;">查看</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="24" v-show="dataSource.length == 0" style="text-align: center;">
|
||||
<span style="line-height:60px;">暂无提醒</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { getSysConfig } from '/@/views/site/utils/index';
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
const dataSource = ref([]);
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
loaddata()
|
||||
setInterval(() => {
|
||||
loaddata()
|
||||
}, 60*1000);
|
||||
});
|
||||
function loaddata(){
|
||||
defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:10,pageNo:1,createBy:userStore.getUserInfo.username} }).then((res) => {
|
||||
dataSource.value = res.records;
|
||||
});
|
||||
}
|
||||
|
||||
function openKecheng(record){
|
||||
console.log(`🚀 ~ openKecheng ~ record:`, record)
|
||||
|
||||
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteById',params:{id:record.id} }).then((res) => {
|
||||
loaddata()
|
||||
});
|
||||
var url = "/zy/zuoyeMain";
|
||||
if(record.type=='5'){//当前作业
|
||||
url = "/zy/dqkcDqzy";
|
||||
}else if(record.type=='6'){//测验消息
|
||||
url = "/zy/ceshiWenjuan";
|
||||
}else if(record.type=='7'){//问卷消息
|
||||
url = "/zy/dcwjWenjuan";
|
||||
}
|
||||
url = url +"?rwbh="+record.rwbh+"&xqxn="+getSysConfig().flag1+"&teano="+record.fbr;
|
||||
window.open(url,'_blank')
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.indexBackClass{
|
||||
background: #fff;
|
||||
margin: 20px 0;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.jtkcTitleClass{
|
||||
background-image: linear-gradient(to right ,#1c84c6, #67b4e5);
|
||||
color: white;
|
||||
line-height: 30px;
|
||||
padding: 3px 0 0 10px;
|
||||
font-weight: 600;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,230 @@
|
|||
<template>
|
||||
<div style="margin-top:10px;background:#fff;height: calc(100vh - 225px);overflow: auto;">
|
||||
<a-card>
|
||||
<div>
|
||||
<a-row>
|
||||
<a-col :lg="3" style="font-size: 18px;font-weight: bold;">课程简介:</a-col>
|
||||
<a-col :lg="20"><div v-html="jxdgInfo.kcjs"></div></a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
<a-card>
|
||||
<div>
|
||||
<span style="float: left;line-height: 30px; font-size: 18px; font-weight: bold;">教学大纲:</span>
|
||||
<span style="width:300px;float: left;margin-top: 3px;">
|
||||
<span v-if="jxdgInfo.filePath">
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download" size="small" @click="downloadFile(jxdgInfo.filePath)"> 下载 </a-button>
|
||||
</span>
|
||||
<span v-else>暂无内容</span>
|
||||
</span>
|
||||
<span style="float: right;" v-if="jxdgInfo.filePath">
|
||||
<a-button type="primary" style="margin-left:10px;" @click="openPdf(jxdgInfo)">预览</a-button>
|
||||
</span>
|
||||
</div>
|
||||
</a-card>
|
||||
<a-card>
|
||||
<div>
|
||||
<span style="float: left;line-height: 30px; font-size: 18px; font-weight: bold;">教学日历:</span>
|
||||
<span style="width:300px;float: left;margin-top: 3px;">
|
||||
<span v-if="jxdgInfo.jxrlFilePath">
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download" size="small" @click="downloadFile(jxdgInfo.jxrlFilePath)"> 下载 </a-button>
|
||||
</span>
|
||||
<span v-else>暂无内容</span>
|
||||
</span>
|
||||
<span style="float: right;" v-if="jxdgInfo.jxrlFilePath">
|
||||
<a-button type="primary" style="margin-left:10px;" @click="openJxrlPdf(jxdgInfo)">预览</a-button>
|
||||
</span>
|
||||
</div>
|
||||
</a-card>
|
||||
<a-card>
|
||||
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
|
||||
<span style="float: left;">常见问题</span>
|
||||
</div>
|
||||
<a-row style="margin-top: 50px;width:100%;display: block;">
|
||||
<a-col :span="24" v-for="(item,index) in cjwtSource" :key="index">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<span style="float: left;">{{(current-1)*pageSize+index+1}}.{{item.question}}</span>
|
||||
</a-col>
|
||||
<a-col :span="24"><span><Icon icon="ant-design:caret-right-outlined" />答:<div v-html="item.answer"></div></span></a-col>
|
||||
<a-col :span="24">
|
||||
<a-divider />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="24" v-show="cjwtSource.length>0">
|
||||
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
|
||||
</a-col>
|
||||
<a-col :span="24" v-show="cjwtSource.length==0">
|
||||
<a-empty/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
<a-card>
|
||||
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
|
||||
<span style="float: left;">往届学生评价</span>
|
||||
</div>
|
||||
<studentPjjgTeaList :queryParam="{ pageSize: 3, ...tkzjParam,kcbh:'' }" style="max-height: 106px;"/>
|
||||
</a-card>
|
||||
<ZyCjwtModal ref="ZyCjwtModalPage" @success="handleCjwtOk" />
|
||||
<ZyJxdgListModal ref="ZyJxdgListModalPage" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, unref,defineExpose } from 'vue';
|
||||
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import { Pagination, Empty } from 'ant-design-vue';
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
import { deleteOne } from '/@/views/zy/zyCjwt/ZyCjwt.api';
|
||||
import headerPage from '/@/views/site/common/header.vue';
|
||||
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';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
|
||||
const globSetting = useGlobSetting();
|
||||
const baseApiUrl = globSetting.domainUrl;
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh,xqxn,teano } = query;//获取传递参数
|
||||
const APagination = Pagination;
|
||||
const current = ref<number>(1);
|
||||
const total = ref<number>(0);
|
||||
const pageNo = ref<number>(0);
|
||||
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({
|
||||
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 };
|
||||
ZyCjwtModalPage.value.disableSubmit = false;
|
||||
ZyCjwtModalPage.value.add(params);
|
||||
}
|
||||
/**
|
||||
* 常见问题编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
ZyCjwtModalPage.value.disableSubmit = false;
|
||||
ZyCjwtModalPage.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleCjwtOk2);
|
||||
}
|
||||
|
||||
function openPdf(record){
|
||||
var url2 = getFileAccessHttpUrl(record.pdfPath)
|
||||
// console.log(`🚀 ~ openPdf ~ url2:`, url2)
|
||||
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
|
||||
window.open(url,"_blank")
|
||||
}
|
||||
|
||||
function openJxrlPdf(record){
|
||||
var url2 = getFileAccessHttpUrl(record.jxrlPdfPath)
|
||||
// console.log(`🚀 ~ openPdf ~ url2:`, url2)
|
||||
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
|
||||
window.open(url,"_blank")
|
||||
}
|
||||
|
||||
//常见问题回调刷新
|
||||
function handleCjwtOk2() {
|
||||
total.value = 1;
|
||||
handlePageChange(1);
|
||||
}
|
||||
|
||||
//常见问题新增翻页
|
||||
function handlePageChange(page: number) {
|
||||
current.value = page;
|
||||
cjwtData();
|
||||
}
|
||||
|
||||
function cjwtData(){
|
||||
defHttp.get({ url: '/zyCjwt/zyCjwt/list', params: { sffb: 1,pageSize: 3,pageNo:current.value, rwbh:rwbh,xqxn:xqxn,teano:teano,column:'createTime',order:'desc' } }).then((res) => {
|
||||
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||
cjwtSource.value = res.records;
|
||||
total.value = res.total;
|
||||
pageNo.value = res.pages;
|
||||
current.value = res.current;
|
||||
// console.log(`🚀 ~ defHttp.get ~ cjwtSource:`, cjwtSource)
|
||||
});
|
||||
}
|
||||
//获取课程简介和教学大纲内容
|
||||
function getKcjsJxdg(){
|
||||
defHttp.get({ url: '/zyJxdg/zyJxdg/getKcjsJxdg', params: { rwbh:rwbh,xqxn:xqxn,teano:teano} }).then((res) => {
|
||||
console.log(`🚀 1111111111111~ getKcjsJxdg ~ res:`, 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();
|
||||
|
||||
});
|
||||
function edit(record){
|
||||
getKcjsJxdg();
|
||||
cjwtData();
|
||||
console.log(1111);
|
||||
}
|
||||
defineExpose({
|
||||
edit,
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,275 @@
|
|||
<template>
|
||||
<div style="background: #fff;height: calc(100vh - 280px);overflow-y: auto;overflow-x: hidden;margin-top:10px;">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container" style="border-bottom: 2px solid #f0f0f0;">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol" style="padding: 20px 10px 0px 10px;">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="标题">
|
||||
<j-input placeholder="请输入标题" v-model:value="queryParam.title"></j-input>
|
||||
</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-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-row>
|
||||
<a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding:10px;overflow:hidden;border-bottom: 1px solid #f0f0f0;">
|
||||
<div>
|
||||
<a-row style="padding:10px;line-height: 30px;">
|
||||
<a-col :span="item.ggStatus==0||item.ggStatus==2?14:24">
|
||||
<span style="font-size: 16px;color: #515151 ;font-weight: bold; ">{{item.title}}</span>
|
||||
<span v-if="item.ggStatus==0" style="margin-left:15px;"><a-tag color="blue">草稿</a-tag></span>
|
||||
</a-col>
|
||||
<a-col :span="item.ggStatus==0||item.ggStatus==2?10:24" style="text-align: right;color:#9e9e9e;">
|
||||
尚未发布,学生端页面看不到这条通知
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="padding:10px;">
|
||||
<a-col :span="24">
|
||||
<div style="color: #515151" v-html="item.content"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="padding:10px;">
|
||||
<a-col :span="24">
|
||||
<div style="text-align: right;color:#9e9e9e;font-weight: bold;">{{item.createTime}}</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="padding:10px;">
|
||||
<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>
|
||||
|
||||
|
||||
<ZyGonggaoModal ref="registerModal" @success="handleSuccess"></ZyGonggaoModal>
|
||||
<ZyGonggaoYlModal ref="registerYlModal" @success="handleSuccess"></ZyGonggaoYlModal>
|
||||
<!-- <ZyGonggaoHistoryModal ref="registerHistoryModal" @success="handleSuccess"></ZyGonggaoHistoryModal>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="zyGonggao-zyGonggao" setup>
|
||||
import {ref, reactive, unref, onMounted} from 'vue';
|
||||
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
|
||||
import { deleteOne } from './ZyGonggao.api';
|
||||
import ZyGonggaoModal from './components/ZyGonggaoModal.vue';
|
||||
import ZyGonggaoYlModal from './components/ZyGonggaoYlModal.vue';
|
||||
import TeacherYulanList from '/@/views/zy/zyGonggao/TeacherYulanList.vue';
|
||||
// import ZyGonggaoHistoryModal from './components/ZyGonggaoHistoryModal.vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { JInput } from '/@/components/Form';
|
||||
import { useRouter } from 'vue-router';
|
||||
import {useUserStore} from "/@/store/modules/user";
|
||||
|
||||
const APagination = Pagination;
|
||||
const { createConfirm } = useMessage();
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh,xqxn } = query;//获取传递参数
|
||||
const userStore = useUserStore();
|
||||
const userName = userStore.getUserInfo.username;
|
||||
const queryParam = ref<any>({rwbh, xqxn,"createBy":userName});
|
||||
const registerModal = ref();
|
||||
const registerYlModal = ref();
|
||||
// const registerHistoryModal = ref();
|
||||
const current = ref<number>(0);
|
||||
const total = ref<number>(0);
|
||||
const pageNo = ref<number>(0);
|
||||
const pageSize = ref<number>(5);
|
||||
const tableData = ref<any>([]);
|
||||
const showYl = ref<boolean>(true);
|
||||
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 7 },
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
function handleZtyl(type){
|
||||
if(type==1){
|
||||
showYl.value = true;
|
||||
}else if(type==0){
|
||||
showYl.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
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) {
|
||||
if(record.ggStatus == 1){
|
||||
registerYlModal.value.disableSubmit = true;
|
||||
}else{
|
||||
registerYlModal.value.disableSubmit = false;
|
||||
}
|
||||
registerYlModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史通知
|
||||
*/
|
||||
// function handleHistory(record: Recordable) {
|
||||
// registerHistoryModal.value.disableSubmit = true;
|
||||
// registerHistoryModal.value.edit(record);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '删除',
|
||||
content: '是否删除此通知?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
deleteOne({ id: record.id }, handleSuccess2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleFabu(record){
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认发布',
|
||||
content: '是否发布此通知?',
|
||||
okText: '发布',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
var params = {id:record.id,ggStatus:"1",flag:"1",fbTime:new Date()}
|
||||
defHttp.post({url: '/zyGonggao/zyGonggao/edit', params: params}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleCh(record){
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '撤回',
|
||||
content: '是否撤回此通知?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
var params = {id:record.id,ggStatus:"0",flag:"0",fbTime:new Date()}
|
||||
defHttp.post({url: '/zyGonggao/zyGonggao/edit', params: params}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调,用于删除
|
||||
*/
|
||||
function handleSuccess2() {
|
||||
total.value = 1;
|
||||
handlePageChange(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调,用于增加、修改、发布和撤回
|
||||
*/
|
||||
function handleSuccess() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
total.value = 1;
|
||||
handlePageChange(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {"createBy":userName};
|
||||
queryParam.value.rwbh = rwbh;
|
||||
queryParam.value.xqxn = xqxn;
|
||||
total.value = 1;
|
||||
handlePageChange(1);
|
||||
}
|
||||
|
||||
function handlePageChange(record){
|
||||
current.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
function reload(){
|
||||
queryParam.value.pageNo = current.value;
|
||||
queryParam.value.pageSize = pageSize.value;
|
||||
queryParam.value.rwbh = rwbh;
|
||||
queryParam.value.xqxn = xqxn;
|
||||
queryParam.value.column="createTime";
|
||||
queryParam.value.order="desc";
|
||||
defHttp.get({ url: '/zyGonggao/zyGonggao/list', params: queryParam.value }).then(res => {
|
||||
total.value = res.total;
|
||||
pageNo.value = res.pages;
|
||||
current.value = res.current;
|
||||
tableData.value = res.records;
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
searchQuery();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
width:99%;
|
||||
.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>
|
|
@ -26,18 +26,20 @@
|
|||
<a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding:10px;overflow:hidden;border-bottom: 1px solid #f0f0f0;">
|
||||
<div>
|
||||
<a-row style="padding:10px;line-height: 30px;">
|
||||
<a-col :span="item.ggStatus==0?20:24">
|
||||
<a-col :span="item.ggStatus==0||item.ggStatus==2?20:24">
|
||||
<span style="font-size: 16px;color: #515151 ;font-weight: bold; ">{{item.title}}</span>
|
||||
<span v-if="item.ggStatus==0" style="margin-left:15px;"><a-tag color="blue">草稿</a-tag></span>
|
||||
<span v-if="item.ggStatus==2" style="margin-left:15px;">
|
||||
<span style="color:#9d9d9d;font-size:12px;">已撤回,学生端页面看不到这条通知</span></span>
|
||||
<span style="margin-left:15px;">
|
||||
<a @click="handleEdit(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==0" title="编辑"><Icon icon="ant-design:form-outlined"/></a>
|
||||
<a-divider type="vertical" style="height: 30px; background-color: #7cb305" v-if="item.ggStatus==0"/>
|
||||
<a @click="handleDelete(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==0" title="删除"><Icon icon="ant-design:delete-outlined" /></a>
|
||||
<a @click="handleEdit(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==0||item.ggStatus==2" title="编辑"><Icon icon="ant-design:form-outlined"/></a>
|
||||
<a-divider type="vertical" style="height: 30px; background-color: #7cb305" v-if="item.ggStatus==0||item.ggStatus==2"/>
|
||||
<a @click="handleDelete(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==0||item.ggStatus==2" title="删除"><Icon icon="ant-design:delete-outlined" /></a>
|
||||
<a @click="handleCh(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==1" title="撤回"><Icon icon="ant-design:rollback-outlined" /></a>
|
||||
</span>
|
||||
</a-col>
|
||||
<a-col :span="item.ggStatus==0?4:24">
|
||||
<div v-if="item.ggStatus==0" style="text-align: right;color:#9e9e9e;">
|
||||
<a-col :span="item.ggStatus==0||item.ggStatus==2?4:24">
|
||||
<div v-if="item.ggStatus==0||item.ggStatus==2" style="text-align: right;color:#9e9e9e;">
|
||||
<a-button type="primary" @click="handleFabu(item)">发布</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
|
@ -203,7 +205,7 @@
|
|||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
var params = {id:record.id,ggStatus:"0",flag:"0",fbTime:new Date()}
|
||||
var params = {id:record.id,ggStatus:"2",flag:"0",fbTime:new Date()}
|
||||
defHttp.post({url: '/zyGonggao/zyGonggao/edit', params: params}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
|
|
|
@ -33,14 +33,15 @@
|
|||
<a-row>
|
||||
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
|
||||
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
|
||||
<a-card style="height: 270px;border: 1px solid rgb(28, 132, 198);">
|
||||
<a-card style="height: 300px;border: 1px solid rgb(28, 132, 198);">
|
||||
<div class="rotate" :style="classFun(item)">{{callText(item)}}</div>
|
||||
<a-row style="top: -48px;position: relative;">
|
||||
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;" :title="item.title">
|
||||
<!-- <div style="font-size: 18px;font-weight: bold;" class="ellipsis">{{item.title}}</div> -->
|
||||
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="zyCon">时间:{{dayjs(item.startTime).format('YYYY.MM.DD')}} - {{dayjs(item.endTime).format('YYYY.MM.DD')}}</a-col>
|
||||
<a-col :span="24" class="zyCon">开始时间:{{dayjs(item.startTime).format('YYYY.MM.DD HH:mm')}}</a-col>
|
||||
<a-col :span="24" class="zyCon">结束时间:{{dayjs(item.endTime).format('YYYY.MM.DD HH:mm')}}</a-col>
|
||||
<a-col :span="24" class="zyCon">
|
||||
<div style="float:left" >评分:{{item.score?item.score:'未评'}}分</div>
|
||||
</a-col>
|
||||
|
@ -71,7 +72,7 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
|
||||
<ZyInfoDetailModal ref="registerModal" @success="handleSuccess"></ZyInfoDetailModal>
|
||||
<ZyInfoStudentListModal ref="ZyInfoStudentListModalPage"></ZyInfoStudentListModal>
|
||||
<ZyInfoStudentModal ref="ZyInfoStudentModalPage" @success="handleSuccess"></ZyInfoStudentModal>
|
||||
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
|
||||
|
@ -91,7 +92,7 @@
|
|||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import dayjs from 'dayjs';
|
||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||
import ZyInfoModal from './components/ZyInfoModal.vue';
|
||||
import ZyInfoDetailModal from './components/ZyInfoDetailModal.vue';
|
||||
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||
|
@ -212,18 +213,21 @@ const baseApiUrl = globSetting.domainUrl;
|
|||
return;
|
||||
}
|
||||
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认上传',
|
||||
content: '作业上传后,不可修改,请仔细检查后提交',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
var param = {id:record.stuId,zyfj:record.filePath}
|
||||
ZyInfoStudentModalPage.value.edit(param);
|
||||
}
|
||||
});
|
||||
ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
var param = {id:record.stuId,zyfj:record.filePath}
|
||||
ZyInfoStudentModalPage.value.edit(param);
|
||||
// createConfirm({
|
||||
// iconType: 'warning',
|
||||
// title: '确认上传',
|
||||
// content: '作业上传后,不可修改,请仔细检查后提交',
|
||||
// okText: '确认',
|
||||
// cancelText: '取消',
|
||||
// onOk: () => {
|
||||
// ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||
// var param = {id:record.stuId,zyfj:record.filePath}
|
||||
// ZyInfoStudentModalPage.value.edit(param);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
//预览
|
||||
|
|
|
@ -38,13 +38,14 @@
|
|||
<a-row style="overflow:hidden;">
|
||||
<a-col :lg="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
|
||||
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
|
||||
<a-card style="height: 256px;border: 1px solid rgb(28, 132, 198);">
|
||||
<a-card style="height: 280px;border: 1px solid rgb(28, 132, 198);">
|
||||
<div class="rotate" :style="classFun(item.zyStatus)">{{item.zyStatus_dictText}}</div>
|
||||
<a-row style="top: -48px;position: relative;">
|
||||
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;" :title="item.title">
|
||||
<div style="font-size: 18px;font-weight: bold;">{{item.title}}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="zyCon">时间:{{dayjs(item.startTime).format('YYYY.MM.DD HH:mm')}} - {{dayjs(item.endTime).format('YYYY.MM.DD HH:mm')}}</a-col>
|
||||
<a-col :span="24" class="zyCon">开始时间:{{dayjs(item.startTime).format('YYYY.MM.DD HH:mm')}}</a-col>
|
||||
<a-col :span="24" class="zyCon">结束时间:{{dayjs(item.endTime).format('YYYY.MM.DD HH:mm')}}</a-col>
|
||||
<a-col :span="24" class="zyCon"><div style="float:left"> </div><div style="float:right;" @click="openXkrs(item)"><a>{{item.xkxs}}人选课</a></div></a-col>
|
||||
<a-col :span="24" class="zyCon"><div style="float:left">未提交:{{item.wtjnum}}人;</div><div style="float:right;" >已提交:{{item.ytjnum}}人</div></a-col>
|
||||
<a-col :span="24" class="zyCon"><div style="float:left">未评阅:{{item.wpynum}}人;</div><div style="float:right;" >已评阅:{{item.ypynum}}人</div></a-col>
|
||||
|
@ -71,6 +72,7 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<ZyInfoDetailModal ref="registerDetialModal" @success="handleSuccess"></ZyInfoDetailModal>
|
||||
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
|
||||
<ZyInfoEditModal ref="registerEditModal" @success="handleSuccess"></ZyInfoEditModal>
|
||||
<ZyInfoStudentListModal ref="ZyInfoStudentListModalPage" @success="handleSuccess"></ZyInfoStudentListModal>
|
||||
|
@ -89,6 +91,7 @@
|
|||
import { useRouter } from 'vue-router';
|
||||
import { JInput } from '/@/components/Form';
|
||||
import dayjs from 'dayjs';
|
||||
import ZyInfoDetailModal from './components/ZyInfoDetailModal.vue';
|
||||
import ZyInfoModal from './components/ZyInfoModal.vue';
|
||||
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
||||
|
@ -161,8 +164,8 @@ import dayjs from 'dayjs';
|
|||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
registerDetialModal.value.disableSubmit = true;
|
||||
registerDetialModal.value.edit(record);
|
||||
}
|
||||
|
||||
//查看作业信息
|
||||
|
@ -181,7 +184,7 @@ import dayjs from 'dayjs';
|
|||
//获取选课人数
|
||||
function openXkrs(record){
|
||||
console.log(`🚀 ~ openXkrs ~ record:`, record)
|
||||
ZyInfoStudentModalPage.value.disableSubmit = true;
|
||||
XxhbbksListModalPage.value.disableSubmit = true;
|
||||
XxhbbksListModalPage.value.init(record);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,242 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<span class="spana">作业名称:{{formData.title}}</span>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<span class="spana">作业分值:{{formData.score?formData.score:'未填写'}}</span>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<span class="spana">描述:
|
||||
<span v-if="formData.content">
|
||||
{{formData.content}}
|
||||
</span>
|
||||
<span v-else>暂无内容</span>
|
||||
</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<span class="spana">附件:
|
||||
<span v-if="formData.filePath">
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download" size="small" @click="downloadFile(formData.filePath)"> 下载 </a-button>
|
||||
</span>
|
||||
<span v-else>暂无内容</span>
|
||||
</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<span class="spana">上传时间:{{formData.startTime}} ~ {{formData.endTime}}</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<span class="spana">是否网络查重:{{formData.wwcc=='0'?'否':'是'}}</span> <span class="spanb">网络通过率:{{formData.wwtgl?formData.wwtgl+"%":'未配置'}}</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<span class="spana">是否课程内查重:{{formData.nwcc=='0'?'否':'是'}}</span> <span class="spanb">网络通过率:{{formData.nwtgl?formData.nwtgl+"%":'未配置'}}</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<span class="spana">Aigc是否查重:{{formData.aigccc=='0'?'否':'是'}}</span> <span class="spanb">网络通过率:{{formData.aigctgl?formData.aigctgl+"%":'未配置'}}</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<span class="spana">是否校内查重:{{formData.xncc=='0'?'否':'是'}}</span> <span class="spanb">网络通过率:{{formData.xntgl?formData.xntgl+"%":'未配置'}}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted,unref } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../ZyInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh } = query;//获取传递参数
|
||||
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: '',
|
||||
title: '',
|
||||
zyType: '0',
|
||||
content: '',
|
||||
filePath: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
wwcc: '0',
|
||||
wwtgl: undefined,
|
||||
nwcc: '0',
|
||||
nwtgl: undefined,
|
||||
aigccc: '0',
|
||||
aigctgl: undefined,
|
||||
rwbh: '',
|
||||
xncc: '0',
|
||||
xntgl: undefined,
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
|
||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = {
|
||||
title: [{ required: true, message: '请输入作业名称!'},],
|
||||
// zyType: [{ required: true, message: '请输入类型!'},],
|
||||
startTime: [{ required: true, message: '请输入开始时间!'},],
|
||||
endTime: [{ required: true, message: '请输入结束时间!'},],
|
||||
wwcc: [{ required: true, message: '请输入外网是否查重!'},],
|
||||
wwtgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||
nwcc: [{ required: true, message: '请输入内网查重!'},],
|
||||
nwtgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||
aigccc: [{ required: true, message: '请输入aigc查重!'},],
|
||||
aigctgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||
xncc: [{ required: true, message: '请输入aigc查重!'},],
|
||||
xntgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
const disabledDate = (current: Dayjs) => {
|
||||
return current && current < dayjs().subtract(1,'days').endOf('day');
|
||||
};
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({rwbh});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
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(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(model.wwcc=='1'){
|
||||
if(!model.wwtgl){
|
||||
createMessage.warning('网络通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.nwcc=='1'){
|
||||
if(!model.nwtgl){
|
||||
createMessage.warning('内网通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.aigccc=='1'){
|
||||
if(!model.aigctgl){
|
||||
createMessage.warning('AIGC通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.xncc=='1'){
|
||||
if(!model.xntgl){
|
||||
createMessage.warning('校内通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
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: 300px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
}
|
||||
.spanSm{
|
||||
top: -22px;
|
||||
position: inherit;
|
||||
padding: 0 0 0 164px;
|
||||
color: #a9a9a9;
|
||||
}
|
||||
.spana{
|
||||
margin-left: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.spanb{
|
||||
margin-left: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<ZyInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZyInfoForm>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ZyInfoForm from './ZyInfoDetailForm.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('80%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,290 @@
|
|||
<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.title" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<a-input v-model:value="formData.title" placeholder="请输入作业名称" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="作业分值" v-bind="validateInfos.score" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<a-input-number v-model:value="formData.score" placeholder="请输入作业分值" style="width: 100%" :max="100" :disabled="disabled">
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="描述" v-bind="validateInfos.content" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<a-textarea v-model:value="formData.content" placeholder="请输入描述" :disabled="disabled"></a-textarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="附件" v-bind="validateInfos.filePath" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<j-upload v-model:value="formData.filePath" :disabled="disabled" ></j-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开始时间" v-bind="validateInfos.startTime">
|
||||
<a-date-picker placeholder="请选择开始时间" v-model:value="formData.startTime" :disabled-date="disabledDate" :show-time="{ format: 'YYYY-MM-DD HH:mm' }" valueFormat="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm" style="width: 100%" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="结束时间" v-bind="validateInfos.endTime">
|
||||
<a-date-picker placeholder="请选择结束时间" v-model:value="formData.endTime" :disabled-date="disabledDate" :show-time="{ format: 'YYYY-MM-DD HH:mm' }" valueFormat="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm" style="width: 100%" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否网络查重" v-bind="validateInfos.wwcc">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.wwcc" dictCode="yn" placeholder="请选择是否网络查重" disabled/>
|
||||
</a-form-item>
|
||||
<span class="spanSm">说明:是否在外部网络资源内进行查重</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="网络通过率" v-bind="validateInfos.wwtgl">
|
||||
<a-input-number v-model:value="formData.wwtgl" placeholder="请输入网络通过率" style="width: 100%" disabled>
|
||||
<template #addonAfter>
|
||||
%
|
||||
</template>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否课程内查重" v-bind="validateInfos.nwcc">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.nwcc" dictCode="yn" placeholder="请选择是否课程内查重" disabled/>
|
||||
</a-form-item>
|
||||
<span class="spanSm">说明:是否在本课程所有提交的作业资源内进行查重</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程内通过率" v-bind="validateInfos.nwtgl">
|
||||
<a-input-number v-model:value="formData.nwtgl" placeholder="请输入课程内通过率" style="width: 100%" disabled>
|
||||
<template #addonAfter>
|
||||
%
|
||||
</template>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="Aigc是否查重" v-bind="validateInfos.aigccc">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.aigccc" dictCode="yn" placeholder="请选择Aigc查重" disabled/>
|
||||
</a-form-item>
|
||||
<span class="spanSm">说明:是否对AI撰写相似度进行查重</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="Aigc通过率" v-bind="validateInfos.aigctgl">
|
||||
<a-input-number v-model:value="formData.aigctgl" placeholder="请输入Aigc通过率" style="width: 100%" disabled>
|
||||
<template #addonAfter>
|
||||
%
|
||||
</template>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否校内查重" v-bind="validateInfos.xncc">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.xncc" dictCode="yn" placeholder="请选择是否校内查重" disabled/>
|
||||
</a-form-item>
|
||||
<span class="spanSm">说明:是否在全校范围内提交的作业资源内进行查重</span>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="校内通过率" v-bind="validateInfos.xntgl">
|
||||
<a-input-number v-model:value="formData.xntgl" placeholder="请输入校内通过率" style="width: 100%" disabled>
|
||||
<template #addonAfter>
|
||||
%
|
||||
</template>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted,unref } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../ZyInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh } = query;//获取传递参数
|
||||
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: '',
|
||||
title: '',
|
||||
zyType: '0',
|
||||
content: '',
|
||||
filePath: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
wwcc: '0',
|
||||
wwtgl: undefined,
|
||||
nwcc: '0',
|
||||
nwtgl: undefined,
|
||||
aigccc: '0',
|
||||
aigctgl: undefined,
|
||||
rwbh: '',
|
||||
xncc: '0',
|
||||
score: '',
|
||||
xntgl: undefined,
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
|
||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = {
|
||||
title: [{ required: true, message: '请输入作业名称!'},],
|
||||
score: [{ required: true, message: '请输入作业分值!'},],
|
||||
// zyType: [{ required: true, message: '请输入类型!'},],
|
||||
startTime: [{ required: true, message: '请输入开始时间!'},],
|
||||
endTime: [{ required: true, message: '请输入结束时间!'},],
|
||||
wwcc: [{ required: true, message: '请输入外网是否查重!'},],
|
||||
wwtgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||
nwcc: [{ required: true, message: '请输入内网查重!'},],
|
||||
nwtgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||
aigccc: [{ required: true, message: '请输入aigc查重!'},],
|
||||
aigctgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||
xncc: [{ required: true, message: '请输入aigc查重!'},],
|
||||
xntgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
const disabledDate = (current: Dayjs) => {
|
||||
return current && current < dayjs().subtract(1,'days').endOf('day');
|
||||
};
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({rwbh});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
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(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(model.wwcc=='1'){
|
||||
if(!model.wwtgl){
|
||||
createMessage.warning('网络通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.nwcc=='1'){
|
||||
if(!model.nwtgl){
|
||||
createMessage.warning('内网通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.aigccc=='1'){
|
||||
if(!model.aigctgl){
|
||||
createMessage.warning('AIGC通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(model.xncc=='1'){
|
||||
if(!model.xntgl){
|
||||
createMessage.warning('校内通过率不能为空');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
.spanSm{
|
||||
top: -22px;
|
||||
position: inherit;
|
||||
padding: 0 0 0 164px;
|
||||
color: #a9a9a9;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,75 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<ZyInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZyInfoForm>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ZyInfoForm from './ZyInfoEditForm.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('80%');
|
||||
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>
|
|
@ -7,11 +7,12 @@
|
|||
<a-input v-model:value="formData.title" placeholder="请输入作业名称" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12">
|
||||
<a-form-item label="类型" v-bind="validateInfos.zyType">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.zyType" dictCode="zy_type" placeholder="请选择类型" :disabled="disabled"/>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="作业分值" v-bind="validateInfos.score" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<a-input-number v-model:value="formData.score" placeholder="请输入作业分值" style="width: 100%" :max="100" :disabled="disabled">
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="描述" v-bind="validateInfos.content" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<a-textarea v-model:value="formData.content" placeholder="请输入描述" :disabled="disabled"></a-textarea>
|
||||
|
@ -40,7 +41,7 @@
|
|||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="网络通过率" v-bind="validateInfos.wwtgl">
|
||||
<a-input-number v-model:value="formData.wwtgl" placeholder="请输入网络通过率" style="width: 100%" :disabled="disabled">
|
||||
<a-input-number v-model:value="formData.wwtgl" placeholder="请输入网络通过率" style="width: 100%" :max="100" :disabled="disabled">
|
||||
<template #addonAfter>
|
||||
%
|
||||
</template>
|
||||
|
@ -56,7 +57,7 @@
|
|||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="课程内通过率" v-bind="validateInfos.nwtgl">
|
||||
<a-input-number v-model:value="formData.nwtgl" placeholder="请输入课程内通过率" style="width: 100%" :disabled="disabled">
|
||||
<a-input-number v-model:value="formData.nwtgl" placeholder="请输入课程内通过率" style="width: 100%" :max="100" :disabled="disabled">
|
||||
<template #addonAfter>
|
||||
%
|
||||
</template>
|
||||
|
@ -71,7 +72,7 @@
|
|||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="Aigc通过率" v-bind="validateInfos.aigctgl">
|
||||
<a-input-number v-model:value="formData.aigctgl" placeholder="请输入Aigc通过率" style="width: 100%" :disabled="disabled">
|
||||
<a-input-number v-model:value="formData.aigctgl" placeholder="请输入Aigc通过率" style="width: 100%" :max="100" :disabled="disabled">
|
||||
<template #addonAfter>
|
||||
%
|
||||
</template>
|
||||
|
@ -86,7 +87,7 @@
|
|||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="校内通过率" v-bind="validateInfos.xntgl">
|
||||
<a-input-number v-model:value="formData.xntgl" placeholder="请输入校内通过率" style="width: 100%" :disabled="disabled">
|
||||
<a-input-number v-model:value="formData.xntgl" placeholder="请输入校内通过率" style="width: 100%" :max="100" :disabled="disabled">
|
||||
<template #addonAfter>
|
||||
%
|
||||
</template>
|
||||
|
@ -125,6 +126,7 @@
|
|||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
title: '',
|
||||
score: '',
|
||||
zyType: '0',
|
||||
content: '',
|
||||
filePath: '',
|
||||
|
@ -149,6 +151,7 @@
|
|||
//表单验证
|
||||
const validatorRules = {
|
||||
title: [{ required: true, message: '请输入作业名称!'},],
|
||||
score: [{ required: true, message: '请输入作业分值!'},],
|
||||
// zyType: [{ required: true, message: '请输入类型!'},],
|
||||
startTime: [{ required: true, message: '请输入开始时间!'},],
|
||||
endTime: [{ required: true, message: '请输入结束时间!'},],
|
||||
|
|
|
@ -7,52 +7,61 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '学生姓名',
|
||||
align: "center",
|
||||
dataIndex: 'studentName'
|
||||
dataIndex: 'studentName',
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '学生学号',
|
||||
align: "center",
|
||||
dataIndex: 'createBy',
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '提交时间',
|
||||
align: "center",
|
||||
dataIndex: 'publishTime',
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '评分',
|
||||
align: "center",
|
||||
dataIndex: 'score',
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '网络查重',
|
||||
align: "center",
|
||||
dataIndex: 'wwsftg',
|
||||
slots: { customRender: 'wwsftgaction' },
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '作业查重',
|
||||
align: "center",
|
||||
dataIndex: 'nwsftg',
|
||||
slots: { customRender: 'nwsftgaction' },
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: 'Aigc查重',
|
||||
align: "center",
|
||||
dataIndex: 'aigcsftg',
|
||||
slots: { customRender: 'aigcsftgaction' },
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '校内查重',
|
||||
align: "center",
|
||||
dataIndex: 'xnsftg',
|
||||
slots: { customRender: 'xnsftgaction' },
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: '存档类型',
|
||||
align: "center",
|
||||
dataIndex: 'cdlx_dictText',
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" style="margin-top:-20px;">
|
||||
<template #tableTitle>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleFabu">
|
||||
|
@ -41,9 +41,14 @@
|
|||
<a-button type="primary">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<span style="font-size: 16px;font-weight:blod;color:b9b6b6;width:100%;">温馨提醒: 非高峰期预计30分钟内返回检测结果,高峰期预计时间会更长,请您耐心等待!</span>
|
||||
</a-dropdown> -->
|
||||
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px"> 一键发布评分</a-button>
|
||||
<span style="font-size: 16px;">温馨提醒:发布评分后可以在操作列进行<span style="color:red;font-weight:700;">存档类型(设置样本)</span>操作!
|
||||
非高峰期预计30分钟内返回<span style="color:blue;font-weight:700;">检测结果</span>,高峰期预计时间会更长,请您耐心等待!
|
||||
点击<span style="color:blue;font-weight:700;">查重率</span>可预览查重报告! 勾选数据后可针对勾选数据进行<span style="color:blue;font-weight:700;">一键发布评分</span>
|
||||
</span>
|
||||
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
|
@ -179,8 +184,13 @@
|
|||
width: '300px',
|
||||
// fixed: 'right',
|
||||
},
|
||||
showTableSetting: true,
|
||||
defSort: {
|
||||
field: 'name',
|
||||
order: 'ascend',
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
params.column = 'publishTime',params.order = 'desc';//新生成的默认不带排序
|
||||
// params.column = 'publishTime',params.order = 'desc';//新生成的默认不带排序
|
||||
return Object.assign(params, queryParam.value);
|
||||
},
|
||||
},
|
||||
|
@ -283,6 +293,12 @@
|
|||
|
||||
|
||||
async function batchHandleFabu() {
|
||||
|
||||
if(selectedRowKeys.value.length==0){
|
||||
createMessage.warn('请勾选要发布的数据!');
|
||||
return;
|
||||
}
|
||||
|
||||
await batchFabu({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
|
@ -326,7 +342,7 @@
|
|||
onClick: handleBohui.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '评分',
|
||||
label: record.score ? '修改评分':'评分',
|
||||
onClick: handleScore.bind(null, record),
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2,9 +2,13 @@
|
|||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<!-- <a-col :span="24" style="text-align:center;margin-top:30px;">
|
||||
<span style="color:red;font-weight:bold;">作业上传后,不可修改,请仔细检查后提交</span>
|
||||
</a-col> -->
|
||||
<a-col :span="24" style=";padding: 30px 0 0 75px;">
|
||||
<div>作业名称:{{zyInfo.title}}</div>
|
||||
<div>作业要求:{{zyInfo.content?zyInfo.content:'无'}}</div>
|
||||
<div>上传时间:{{zyInfo.startTime}} ~ {{zyInfo.endTime}}</div>
|
||||
<div v-if="zyInfo.filePath">附件:
|
||||
<a-button type="primary" style="margin-left: 10px" @click="downLoad(zyInfo.filePath)">下载</a-button></div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top:30px;" v-if="!isYl">
|
||||
<a-form-item label="上传作业" v-bind="validateInfos.filePath">
|
||||
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true" ></j-upload>
|
||||
|
@ -57,6 +61,7 @@
|
|||
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);
|
||||
let zyInfo = ref<any>({});
|
||||
//表单验证
|
||||
const validatorRules = {
|
||||
filePath: [{ required: true, message: '请上传作业附件!'},],
|
||||
|
@ -83,12 +88,32 @@
|
|||
edit({});
|
||||
}
|
||||
|
||||
function downLoad(file) {
|
||||
if (file) {
|
||||
let url = getFileAccessHttpUrl(file);
|
||||
if (url) {
|
||||
window.open(url);
|
||||
}
|
||||
} else {
|
||||
createMessage.warning('暂无文件或文件上传中');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
console.log(`🚀 ~ edit ~ record:`, record)
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
|
||||
|
||||
defHttp.get({url:'/zyInfo/zyInfo/queryZyinfoByStuId',params:{id:record.id}}).then((res) => {
|
||||
console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||
zyInfo.value = res;
|
||||
console.log(`🚀 ~ defHttp.get ~ zyInfo:`, zyInfo)
|
||||
});
|
||||
|
||||
|
||||
//赋值
|
||||
Object.assign(formData, record);
|
||||
isYl.value = record.isYl;
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<span style="margin-left: 8%;line-height:60px;">预设作业分值:{{zyInfo.score?zyInfo.score+"分 评分不能高于预设分值":'未设置 评分不能高于100分'}}</span>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="评分" v-bind="validateInfos.score">
|
||||
<a-input-number v-model:value="formData.score" :disabled="disabled" style="width:100%;" ></a-input-number>
|
||||
<a-input-number v-model:value="formData.score" :max="zyInfo.score?zyInfo.score:100" :disabled="disabled" style="width:100%;" @change="handleJyfz" ></a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -37,6 +40,7 @@
|
|||
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 zyInfo = ref<any>({});
|
||||
//表单验证
|
||||
const validatorRules = {
|
||||
score: [{ required: true, message: '请输入评分!'},],
|
||||
|
@ -55,6 +59,21 @@
|
|||
return props.formDisabled;
|
||||
});
|
||||
|
||||
function handleJyfz(record){
|
||||
console.log(`🚀 ~ handleJyfz ~ record:`, record)
|
||||
if(zyInfo.score){
|
||||
if(parseInt(record) > parseInt(zyInfo.score)){
|
||||
createMessage.warning('评分不能超过预设作业分值!');
|
||||
formData.score = zyInfo.score;
|
||||
}
|
||||
}else{
|
||||
if(parseInt(record) > 100){
|
||||
createMessage.warning('评分不能超过100分!');
|
||||
formData.score = zyInfo.score;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
@ -69,6 +88,14 @@
|
|||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
|
||||
defHttp.get({url:'/zyInfo/zyInfo/queryById',params:{id:record.mainId}}).then(res=>{
|
||||
console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||
zyInfo.value = res;
|
||||
})
|
||||
|
||||
|
||||
|
||||
//赋值
|
||||
Object.assign(formData, record);
|
||||
});
|
||||
|
|
|
@ -29,12 +29,11 @@ export const columns: BasicColumn[] = [
|
|||
title: '文件名称',
|
||||
align:"center",
|
||||
dataIndex: 'fileName',
|
||||
width: 300,
|
||||
customRender: ({ record,text }) => {
|
||||
console.log(`🚀 1~ text:`, text)
|
||||
if(text){
|
||||
text = text.substring(text.lastIndexOf("/")+1,text.length)
|
||||
}
|
||||
console.log(`🚀 2~ text:`, text)
|
||||
return text;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,367 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="文件类型">
|
||||
<j-dict-select-tag ref="wjDictTag" placeholder="请选择文件类型" v-model:value="queryParam.wjlx" :dictCode="wjlxDic"/>
|
||||
</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="handleAdd" 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">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(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>
|
||||
<!-- 表单区域 -->
|
||||
<ZykInfoModal ref="registerModal" @success="handleSuccess"></ZykInfoModal>
|
||||
</div>
|
||||
<div class="example">
|
||||
<a-spin :spinning="spinning" size="large" tip="下载中..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="zyk-zykInfo" setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './ZykInfo.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZykInfo.api';
|
||||
// import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import ZykInfoModal from './components/ZykInfoModal.vue'
|
||||
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
|
||||
import { baseApiUrl, getFileAccessHttpUrl } from "/@/utils/common/compUtils";
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const spinning = ref<boolean>(false);
|
||||
const { createMessage } = useMessage();
|
||||
const userStore = useUserStore();
|
||||
const userName = userStore.getUserInfo.username;
|
||||
const queryParam = ref<any>({
|
||||
"createBy":userName
|
||||
});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
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 },
|
||||
});
|
||||
|
||||
const xqxnDic = ref<String>(
|
||||
"zyk_info,xqxn,xqxn,create_by = '"+userName+"' and xh is null group by xqxn order by xqxn desc"
|
||||
);
|
||||
|
||||
const kkdwDic = ref<String>(
|
||||
"zyk_info,kkdw,kkdw,create_by = '"+userName+"' and xh is null group by kkdw order by kkdw"
|
||||
);
|
||||
|
||||
const kcmcDic = ref<String>(
|
||||
"zyk_info,kcmc,kcmc,create_by = '"+userName+"' and xh is null group by kcmc order by kcmc"
|
||||
);
|
||||
|
||||
const wjlxDic = ref<String>(
|
||||
"zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and wjlx !='学生论文' group by wjlx order by wjlx"
|
||||
);
|
||||
|
||||
function downloadFile(url){
|
||||
if (!url) {
|
||||
createMessage.warning('未知的文件');
|
||||
return;
|
||||
}
|
||||
if (url.indexOf(',') > 0) {
|
||||
url = url.substring(0, url.indexOf(','));
|
||||
}
|
||||
url = getFileAccessHttpUrl(url.split(',')[0]);
|
||||
if (url) {
|
||||
openWindowWithLoading(url);
|
||||
}
|
||||
}
|
||||
|
||||
function openWindowWithLoading(url){
|
||||
spinning.value = true;
|
||||
let fileName = url.substring(url.lastIndexOf("/")+1);
|
||||
let uploadAxiosHttpConfig = {
|
||||
//超时时间,分钟 * 秒 * 毫秒 60分钟
|
||||
timeout: 60 * 60 * 1000,
|
||||
//不自动拼接前缀
|
||||
joinPrefix: false,
|
||||
//自定义前缀
|
||||
apiUrl: '',
|
||||
//不自动处理
|
||||
isTransformResponse: false
|
||||
}
|
||||
ajaxDownloadFileFn(url, fileName, {}, () => { spinning.value = false; }, uploadAxiosHttpConfig);
|
||||
// let xhr = new XMLHttpRequest();
|
||||
// spinning.value = true;
|
||||
// xhr.open('GET',url,true);
|
||||
// // xhr.onprogress = function (e){
|
||||
// // let percent = Math.floor(e.loaded / e.total * 100);//百分比加载
|
||||
// // console.log(percent);
|
||||
// // }
|
||||
// xhr.send();
|
||||
// xhr.responseType = "arraybuffer";
|
||||
// xhr.onreadystatechange = event =>{
|
||||
// if(xhr.readyState == 4){
|
||||
// if(xhr.status == 200){
|
||||
// let fileName = url.substring(url.lastIndexOf("/")+1);
|
||||
// let blob = new Blob([xhr.response]);
|
||||
// const downLoadLink = document.createElement('a');
|
||||
// downLoadLink.download = fileName;
|
||||
// downLoadLink.href = URL.createObjectURL(blob);
|
||||
// downLoadLink.click();
|
||||
// }else if (xhr.status == 404){
|
||||
// createMessage.warning('没有找到可下载的资源!');
|
||||
// }
|
||||
// }
|
||||
// spinning.value = false;
|
||||
// }
|
||||
}
|
||||
|
||||
function changeXqxnDic(){
|
||||
if(queryParam.value.xqxn!=null && queryParam.value.xqxn!=""){
|
||||
kkdwDic.value = "zyk_info,kkdw,kkdw,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' group by kkdw order by kkdw";
|
||||
kcmcDic.value = "zyk_info,kcmc,kcmc,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' group by kcmc order by kcmc";
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}else{
|
||||
kkdwDic.value = "zyk_info,kkdw,kkdw,create_by = '"+userName+"' and xh is null group by kkdw order by kkdw";
|
||||
kcmcDic.value = "zyk_info,kcmc,kcmc,create_by = '"+userName+"' and xh is null group by kcmc order by kcmc";
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}
|
||||
}
|
||||
|
||||
function changeKkdwDic(){
|
||||
console.log(queryParam);
|
||||
if(queryParam.value.kkdw!=null && queryParam.value.kkdw!=""){
|
||||
if(queryParam.value.xqxn!=null && queryParam.value.xqxn!=""){
|
||||
kcmcDic.value = "zyk_info,kcmc,kcmc,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' and kkdw = '"+queryParam.value.kkdw+"' group by kcmc order by kcmc";
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' and kkdw = '"+queryParam.value.kkdw+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}else{
|
||||
kcmcDic.value = "zyk_info,kcmc,kcmc,create_by = '"+userName+"' and xh is null and kkdw = '"+queryParam.value.kkdw+"' group by kcmc order by kcmc";
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and kkdw = '"+queryParam.value.kkdw+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}
|
||||
}else{
|
||||
if(queryParam.value.xqxn!=null && queryParam.value.xqxn!=""){
|
||||
kcmcDic.value = "zyk_info,kcmc,kcmc,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' group by kcmc order by kcmc";
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}else{
|
||||
kcmcDic.value = "zyk_info,kcmc,kcmc,create_by = '"+userName+"' and xh is null group by kcmc order by kcmc";
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function changeKcmcDic(){
|
||||
if(queryParam.value.kcmc!=null && queryParam.value.kcmc!=""){
|
||||
if(queryParam.value.kkdw!=null && queryParam.value.kkdw!=""){
|
||||
if(queryParam.value.xqxn!=null && queryParam.value.xqxn!=""){
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' and kkdw = '"+queryParam.value.kkdw+"' and kcmc = '"+queryParam.value.kcmc+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}else{
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and kkdw = '"+queryParam.value.kkdw+"' and kcmc = '"+queryParam.value.kcmc+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}
|
||||
}else{
|
||||
if(queryParam.value.xqxn!=null && queryParam.value.xqxn!=""){
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' and kcmc = '"+queryParam.value.kcmc+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}else{
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and kcmc = '"+queryParam.value.kcmc+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(queryParam.value.kkdw!=null && queryParam.value.kkdw!=""){
|
||||
if(queryParam.value.xqxn!=null && queryParam.value.xqxn!=""){
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' and kkdw = '"+queryParam.value.kkdw+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}else{
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and kkdw = '"+queryParam.value.kkdw+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}
|
||||
}else{
|
||||
if(queryParam.value.xqxn!=null && queryParam.value.xqxn!=""){
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and xqxn = '"+queryParam.value.xqxn+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}else{
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and xh is null and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
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 handleYinyong(record){
|
||||
console.log(`🚀 ~ handleYinyong ~ record:`, record)
|
||||
emit('ok',record.fileName);
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '引用',
|
||||
onClick: handleYinyong.bind(null, record),
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {"createBy":userName};
|
||||
xqxnDic.value = "zyk_info,xqxn,xqxn,create_by = '"+userName+"' group by xqxn order by xqxn desc";
|
||||
kkdwDic.value = "zyk_info,kkdw,kkdw,create_by = '"+userName+"' group by kkdw order by kkdw";
|
||||
kcmcDic.value = "zyk_info,kcmc,kcmc,create_by = '"+userName+"' group by kcmc order by kcmc";
|
||||
wjlxDic.value = "zyk_info,wjlx,wjlx,create_by = '"+userName+"' and wjlx !='学生论文' group by wjlx order by wjlx";
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
queryParam.value.xqxn = getSysConfig().flag1
|
||||
}
|
||||
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
queryParam.value.xqxn = getSysConfig().flag1
|
||||
});
|
||||
|
||||
</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
|
||||
}
|
||||
}
|
||||
|
||||
.example {
|
||||
text-align: center;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
border-radius: 4px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
</style>
|
|
@ -0,0 +1,83 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<ZykInfoYinyongList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZykInfoYinyongList>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ZykInfoYinyongList from './ZykInfoYinyongList.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('90%');
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function open() {
|
||||
title.value = '引用资源';
|
||||
visible.value = true;
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
* @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(record) {
|
||||
handleCancel();
|
||||
emit('success',record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
open,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue