修改bug

This commit is contained in:
yangjun 2024-05-29 10:59:42 +08:00
parent d87b77664f
commit 20c16e30a6
12 changed files with 885 additions and 32 deletions

View File

@ -127,30 +127,30 @@ export const dccolumns: BasicColumn[] = [
dataIndex: 'xqxn',
width: 80
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc',
width: 200
},
{
title: '开始时间',
align: "center",
dataIndex: 'startTime',
width: 150
},
{
title: '结束时间',
align: "center",
dataIndex: 'endTime',
width: 150
},
{
title: '问卷描述',
align: "center",
dataIndex: 'content',
width: 200
},
// {
// title: '课程名称',
// align: "center",
// dataIndex: 'kcmc',
// width: 200
// },
// {
// title: '开始时间',
// align: "center",
// dataIndex: 'startTime',
// width: 150
// },
// {
// title: '结束时间',
// align: "center",
// dataIndex: 'endTime',
// width: 150
// },
// {
// title: '问卷描述',
// align: "center",
// dataIndex: 'content',
// width: 200
// },
];
//查询数据

View File

@ -17,6 +17,7 @@
<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="reload">查询</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> -->
</a-col>
</span>
@ -42,7 +43,7 @@ import {ref, reactive, defineExpose, unref} from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useListPage } from '/@/hooks/system/useListPage';
import {dccolumns} from './WjxWjxxTmlbDjjgs.data';
import { list } from './WjxWjxxTmlbDjjgs.api';
import { list,getExportUrl } from './WjxWjxxTmlbDjjgs.api';
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
const queryParam = ref<any>({});
@ -65,7 +66,14 @@ import {ref, reactive, defineExpose, unref} from 'vue';
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: "学生问卷信息",
url: getExportUrl,
params: () => {
return Object.assign({},queryParam.value);
}
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({

View File

@ -117,6 +117,7 @@
</a-col>
</a-row>
<YinyongTikuListModal ref="YinyongTikuListModalpage" @success="handleYytkSuccess" />
<YinyongTikuDcListModal ref="YinyongTikuDcListModalpage" @success="handleYytkSuccess" />
</a-spin>
</template>
@ -127,6 +128,7 @@ import { useMessage } from '/@/hooks/web/useMessage';
import { defHttp } from '/@/utils/http/axios';
import { queryWjxWjxxTmxxListByMainId, queryDataById, saveOrUpdate } from '/@/views/kc/wjxWjxxTmlb/WjxWjxxTmlb.api';
import YinyongTikuListModal from '/@/views/kc/wjxWjxxTmlb/YinyongTikuListModal.vue'
import YinyongTikuDcListModal from '/@/views/kc/wjxWjxxTmlb/YinyongTikuDcListModal.vue'
import { useUserStore } from '/@/store/modules/user';
//
@ -136,6 +138,7 @@ import YinyongTikuListModal from '/@/views/kc/wjxWjxxTmlb/YinyongTikuListModal.v
const title = ref<string>('');
const mainId = ref<string>('');
const YinyongTikuListModalpage = ref();
const YinyongTikuDcListModalpage = ref();
const isShow = ref<boolean>(false);
const confirmLoading = ref<boolean>(false);
const tiganData = ref<any>([]);
@ -197,8 +200,14 @@ function handleYylx(sylx){
wjSytype = "1";
}
var record = {wjLeixing,createBy,wjSytype};
if(wjLeixing=='6'){
YinyongTikuListModalpage.value.disableSubmit = false;
YinyongTikuListModalpage.value.init(record);
}else{
YinyongTikuDcListModalpage.value.disableSubmit = false;
YinyongTikuDcListModalpage.value.init(record);
}
}
//
@ -286,7 +295,15 @@ for(var i=0;i<record.length;i++){
//
function handleAddTmxx(record,index,list){
list.push({itemTitle:null,itemIndex:list.length+1});
var itemIndex = 0;
for(var i=0;i<list.length;i++){
var lssx = list[i].itemIndex;
if(itemIndex<parseInt(lssx)){
itemIndex = lssx
}
}
list.push({itemTitle:null,itemIndex:itemIndex+1});
}
//
function handleDelTigan(record,index){

View File

@ -98,7 +98,34 @@ export const columnsYytk: BasicColumn[] = [
dataIndex: 'wjSytype_dictText'
},
];
export const columnsYytkdc: BasicColumn[] = [
{
title: '题目类型',
align:"center",
dataIndex: 'wjType',
customRender:({text}) =>{
var rt = "";
if(text == '3'){
rt = "单选";
}else if(text == '4'){
rt = "多选";
}else if(text == '5'){
rt = "填空";
}
return rt;
},
},
{
title: '题干名称',
align:"center",
dataIndex: 'wjTitle'
},
{
title: '是否公有',
align:"center",
dataIndex: 'wjSytype_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];

View File

@ -0,0 +1,213 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="7">
<a-form-item label="题干名称">
<j-input placeholder="请输入题干名称" v-model:value="queryParam.wjTitle"></j-input>
</a-form-item>
</a-col>
<a-col :lg="7">
<a-form-item label="题目类型">
<!-- <JDictSelectTag placeholder="请选择" v-model:value="queryParam.wjSytype" dictCode="yn" /> -->
<a-select placeholder="请选择题目类型" ref="select" v-model:value="queryParam.wjType">
<a-select-option value="">全部</a-select-option>
<a-select-option value="3">单选</a-select-option>
<a-select-option value="4">多选</a-select-option>
<a-select-option value="5">填空</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<!-- <template #tableTitle>
</template> -->
<!--操作栏-->
<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>
<!-- 表单区域 -->
<WjxWjxxTmlbModal @register="registerModal" @success="handleSuccess"></WjxWjxxTmlbModal>
</div>
</template>
<script lang="ts" name="wjxWjxxTmlb-siyou" setup>
import {ref, reactive,watch, computed, unref,defineExpose} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'
import {useModal} from '/@/components/Modal';
import { defHttp } from '/@/utils/http/axios';
import WjxWjxxTmlbModal from './components/WjxWjxxTmlbModal.vue'
import {columnsYytkdc} from './WjxWjxxTmlb.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,distinctList} from './WjxWjxxTmlb.api';
import {downloadFile} from '/@/utils/common/renderUtils';
import { JInput,JDictSelectTag } from '/@/components/Form';
import { useUserStore } from '/@/store/modules/user';
//
const userStore = useUserStore();
const checkedKeys = ref<Array<string | number>>([]);
// const wjLeixing = ref<string>('');
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
// title: '',
api: distinctList,
columns: columnsYytkdc,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed:'right'
},
beforeFetch: (params) => {
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name:"题目信息",
url: getExportUrl,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
})
const emit = defineEmits(['register', 'ok']);
const [registerTable, {reload},{ rowSelection, selectedRowKeys,selectedRows }] = tableContext
const props = defineProps({
currentRowKey: Object,
})
watch(() => props.currentRowKey, async (newRow, oldRow) => {
selectedRows.value = [];
selectedRowKeys.value = [];
});
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}
]
}
/* ----------------------以下为原生查询需要添加的-------------------------- */
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
function submitForm(){
console.log(`🚀 ~ searchReset 111111 ~ selectedRowKeys:`, selectedRowKeys)
console.log(`🚀 ~ searchReset 222222 ~ selectedRows:`, selectedRows)
emit('ok',selectedRows.value);
}
function init(record){
console.log(`🚀 ~ init ~ record:`, record)
selectedRowKeys.value = []
selectedRows.value = []
queryParam.value = {
...record
}
reload();
}
defineExpose({
init,
submitForm,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -0,0 +1,65 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<YinyongTikuDcList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></YinyongTikuDcList>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import YinyongTikuDcList from './YinyongTikuDcList.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']);
/**
* 编辑
* @param record
*/
function init(record) {
title.value = '题库';
visible.value = true;
nextTick(() => {
registerForm.value.init(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback(record) {
console.log(`🚀 ~ submitCallback ~ record:`, record)
handleCancel();
emit('success',record);
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
init,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -81,7 +81,7 @@
<div hidden @click="testKuayu">点击开始跨域报错</div>
<RouterLink :to="{path:'/site/index'}" style="color:white;">{{ projectName }}
<span style="font-size: 16px;" v-if="getSysConfig().flag1">{{getSysConfig().flag1}}({{getSysConfig().bxqkssj}}{{getSysConfig().bxqjssj}})</span>
<span style="font-size: 16px;margin-left: 20px;" >本学期听课要求{{tkyqcs}}<span v-if="tkyqcs!='未配置'"></span>已完成{{tkyqywc}}</span>
<span style="font-size: 16px;margin-left: 20px;" v-if="getUserSf()=='T'" >本学期听课要求:{{tkyqcs}}<span v-if="tkyqcs!='未配置'"></span>已完成{{tkyqywc}}</span>
</RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/liveView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页rtsp</RouterLink>
<RouterLink hidden target='_blank' :to="{path:'/site/liveFlvView',query:{ url: 'rtsp://176.139.87.16/axis-media/media.amp' }}">直播测试页flv</RouterLink>

View File

@ -78,6 +78,21 @@
</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="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="disabled">
<template #addonAfter>
%
</template>
</a-input-number>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
@ -122,6 +137,8 @@
aigccc: '0',
aigctgl: undefined,
rwbh: '',
xncc: '0',
xntgl: undefined,
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
@ -223,6 +240,13 @@
return;
}
}
if(model.xncc=='1'){
if(!model.xntgl){
createMessage.warning('校内通过率不能为空');
confirmLoading.value = false;
return;
}
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {

View File

@ -14,6 +14,7 @@ enum Api {
deleteBatch = '/zyInfoStudent/zyInfoStudent/deleteBatch',
importExcel = '/zyInfoStudent/zyInfoStudent/importExcel',
exportXls = '/zyInfoStudent/zyInfoStudent/exportXls',
getQuaList = '/zyCcjg/zyCcjg/getQuaList',
}
/**
@ -33,6 +34,7 @@ export const getImportUrl = Api.importExcel;
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const cdxxlist = (params) => defHttp.get({ url: Api.cdxxlist, params });
export const getQuaList = (params) => defHttp.get({ url: Api.getQuaList, params });
/**
*

View File

@ -57,6 +57,86 @@ export const columns: BasicColumn[] = [
];
export const htcxcolumns: BasicColumn[] = [
{
title: '作业名称',
align: "center",
dataIndex: 'title',
},
{
title: '学生姓名',
align: "center",
dataIndex: 'stuName',
width: '100px'
},
{
title: '学生学号',
align: "center",
dataIndex: 'stuNo',
width: '100px'
},
{
title: '授课教师',
align: "center",
dataIndex: 'teaName',
width: '100px'
},
{
title: '提交时间',
align: "center",
dataIndex: 'createTime',
width: '100px'
},
{
title: '检测类型',
align: "center",
dataIndex: 'ccType',
width: '100px',
customRender:({text}) =>{
if(text=='1'){
text = '作业检测'
}else if(text=='3'){
text = '全校检测'
}else if(text=='2'){
text = 'aigc检测'
}else{
text = '外网检测'
}
return text;
},
},
{
title: '检测状态',
align: "center",
dataIndex: 'filestateid',
width: '100px',
customRender:({text}) =>{
if(text=='1'){
text = '检测中'
}else if(text=='3'){
text = '检测失败'
}else if(text=='2'){
text = '检测完成'
}else{
text = '未检测'
}
return text;
},
},
{
title: '文档ID',
align: "center",
dataIndex: 'paperid',
width: '100px',
},
{
title: '检测结果',
align: "center",
dataIndex: 'message',
},
];
//列表数据
export const cdxxcolumns: BasicColumn[] = [

View File

@ -29,7 +29,7 @@
<!--引用表格-->
<BasicTable @register="registerTable">
<template #tableTitle>
<span>检测时间提醒 非高峰期预计30分钟内返回检测结果高峰期预计时间会更长请您耐心等待</span>
<span style="font-size: 16px;font-weight:blod;color:red;">检测时间提醒 非高峰期预计30分钟内返回检测结果高峰期预计时间会更长请您耐心等待</span>
</template>
<!--操作栏-->
<template #action="{ record }">

View File

@ -0,0 +1,417 @@
<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="5">
<a-form-item label="学生姓名">
<a-input placeholder="请输入学生姓名" v-model:value="queryParam.stuName"></a-input>
</a-form-item>
</a-col>
<a-col :lg="5">
<a-form-item label="学生学号">
<a-input placeholder="请输入学生学号" v-model:value="queryParam.stuNo"></a-input>
</a-form-item>
</a-col>
<a-col :lg="5">
<a-form-item label="检测类型">
<a-select placeholder="请选择" v-model:value="queryParam.ccType">
<a-select-option :value="undefined">请选择</a-select-option>
<a-select-option value="0">外网检测</a-select-option>
<a-select-option value="1">作业检测</a-select-option>
<a-select-option value="2">AIGC检测</a-select-option>
<a-select-option value="3">全校检测</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="5">
<a-form-item label="检测状态">
<a-select placeholder="请选择" v-model:value="queryParam.filestateid">
<a-select-option :value="undefined">请选择</a-select-option>
<a-select-option value="1">检测中</a-select-option>
<a-select-option value="3">检测失败</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="4">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> -->
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button> -->
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<template #wwsftgaction="{text,record}">
<span v-if="record.wwcc=='0'">-</span>
<span v-else>
<span v-if="text=='通过'" style="color: green;padding: 5px 15px;" title="通过">{{record.wwxsl}}%</span>
<span v-else-if="text=='未通过'" style="color: red;padding: 5px 15px;" title="未通过">{{record.wwxsl}}%</span>
<span v-else>
<span v-if="record.filePath">检测中</span>
<span v-else>未提交</span>
</span>
</span>
</template>
<template #nwsftgaction="{text,record}">
<span v-if="record.nwcc=='0'">-</span>
<span v-else>
<span v-if="text=='通过'" style="color: green;padding: 5px 15px;" title="通过">{{record.nwxsl}}%</span>
<span v-else-if="text=='未通过'" style="color: red;padding: 5px 15px;" title="未通过">{{record.nwxsl}}%</span>
<span v-else>
<span v-if="record.filePath">检测中</span>
<span v-else>未提交</span>
</span>
</span>
</template>
<template #aigcsftgaction="{text,record}">
<span v-if="record.aigccc=='0'">-</span>
<span v-else>
<span v-if="text=='通过'" style="color: green;padding: 5px 15px;" title="通过">{{record.aigcxsl}}%</span>
<span v-else-if="text=='未通过'" style="color: red;padding: 5px 15px;" title="未通过">{{record.aigcxsl}}%</span>
<span v-else>
<span v-if="record.filePath">检测中</span>
<span v-else>未提交</span>
</span>
</span>
</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> -->
<!-- <template #fileZxSlot="{text,record}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="yulanFile(text)">预览</a-button>
</template> -->
</BasicTable>
<!-- 表单区域 -->
<ZyInfoStudentModal ref="registerModal" @success="handleSuccess"></ZyInfoStudentModal>
<ZyInfoStudentScoreModal ref="registerScoreModal" @success="handleSuccess"></ZyInfoStudentScoreModal>
<SzybStudentModal ref="SzybStudentModalpage" @success="handleSuccess"></SzybStudentModal>
</div>
</template>
<script lang="ts" name="zyInfoStudent-zyInfoStudent" setup>
import { ref, reactive,defineExpose } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { htcxcolumns } from './ZyInfoStudent.data';
import { getQuaList, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyInfoStudent.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyInfoStudentModal from './components/ZyInfoStudentModal.vue'
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import SzybStudentModal from '/@/views/zy/zyInfoStudent/components/SzybStudentModal.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import ZyInfoStudentScoreModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentScoreModal.vue'
import { useGlobSetting } from '/@/hooks/setting';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import { JInput } from '/@/components/Form';
const { createMessage } = useMessage();
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const queryParam = ref<any>({});
const mainId = ref<string>('');
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const registerScoreModal = ref();
const SzybStudentModalpage = ref();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
api: getQuaList,
columns: htcxcolumns,
canResize:false,
useSearchForm: false,
showActionColumn: false,
actionColumn: {
width: '300px',
// fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: "学生作业信息",
url: getExportUrl,
params: () => {
return Object.assign({},queryParam.value);
}
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
function yulanFile(record){
// let url = "https://view.officeapps.live.com/op/view.aspx?src="+encodeURIComponent(getFileAccessHttpUrl(text));
// let url = "https://view.officeapps.live.com/op/view.aspx?src="+encodeURIComponent(getFileAccessHttpUrl(text));
// let url = "https://view.xdocin.com/view?src="+encodeURIComponent('https://view.xdocin.com/demo/view.docx');
// window.open(url,"_blank")
var url2 = getFileAccessHttpUrl(record.pdfPath)
console.log(`🚀 ~ openPdf ~ url2:`, url2)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
function handleScore(record: Recordable) {
registerScoreModal.value.disableSubmit = false;
registerScoreModal.value.edit(record);
}
function handleBohui(record: Recordable){
defHttp.post({url:'/zyInfoStudent/zyInfoStudent/editBohui',params:{id:record.id}}).then(res =>{
handleSuccess()
})
}
function handleScoreFabu(record: Recordable){
//
if(!record.score){
createMessage.warn('请填写评分!');
return;
}
defHttp.post({url:'/zyInfoStudent/zyInfoStudent/editFabu',params:{id:record.id,scoreFabu:'1'}}).then(res =>{
handleSuccess()
})
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
//
function handleSzyb(record: Recordable){
SzybStudentModalpage.value.disabled = false;
SzybStudentModalpage.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
function handleDown(text){
downloadFile(text);
}
/**
* 操作栏
*/
function getTableAction(record) {
if(record.filePath){
if(record.scoreFabu=='1'){
var list = [
{
label: '设置样本',
onClick: handleSzyb.bind(null, record),
},
];
return list;
}else{
var list = [
{
label: '驳回',
onClick: handleBohui.bind(null, record),
},
{
label: '评分',
onClick: handleScore.bind(null, record),
},
{
label: '发布评分',
onClick: handleScoreFabu.bind(null, record),
},
];
return list;
}
}else{
var list = [ ];
return list;
}
}
function handleYulan(text){
window.open(text,"_blank")
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
var list = [];
if(record.filePath){
list.push({
label: '作业下载',
onClick: handleDown.bind(null, record.filePath),
});
list.push({
label: '作业预览',
onClick: yulanFile.bind(null, record),
});
}
if(record.wwpaperdownurl){
list.push({
label: '外网结果下载',
onClick: handleDown.bind(null, record.wwpaperdownurl),
});
list.push({
label: '外网结果预览',
onClick: handleYulan.bind(null, record.wwpaperviewurl),
});
}
if(record.zypaperdownurl){
list.push({
label: '作业结果下载',
onClick: handleDown.bind(null, record.zypaperdownurl),
});
list.push({
label: '作业结果预览',
onClick: handleYulan.bind(null, record.zypaperviewurl),
});
}
if(record.aigcpaperdownurl){
list.push({
label: 'aigc结果下载',
onClick: handleDown.bind(null, record.aigcpaperdownurl),
});
list.push({
label: 'aigc结果预览',
onClick: handleYulan.bind(null, record.aigcpaperviewurl),
});
}
if(record.xxpaperdownurl){
list.push({
label: '学校结果下载',
onClick: handleDown.bind(null, record.xxpaperdownurl),
});
list.push({
label: '学校结果预览',
onClick: handleYulan.bind(null, record.xxpaperviewurl),
});
}
return list;
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
queryParam.value.mainId = mainId;
//
reload();
}
function init(record){
queryParam.value = {};
queryParam.value.mainId = record.id;
mainId.value = record.id;
reload();
}
defineExpose({
init,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>