修改bug
This commit is contained in:
parent
90a0f9581b
commit
24341183a5
|
@ -41,12 +41,13 @@
|
|||
</a-col>
|
||||
<a-col :span="24" class="zyCon">
|
||||
<a-row>
|
||||
<a-col :span="6" class="zyCon">时间:
|
||||
<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="16" class="zyCon">
|
||||
<!-- <a-col :span="16" class="zyCon">
|
||||
<a-col :span="24" class="zyCon">从{{item.startTime}}</a-col>
|
||||
<a-col :span="24" class="zyCon">至{{item.endTime}}</a-col>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align:center;margin-top:20px;">
|
||||
|
@ -79,6 +80,7 @@
|
|||
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
|
||||
import {useRouter} from "vue-router";
|
||||
import {useMessage} from "/@/hooks/web/useMessage";
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
|
|
|
@ -60,10 +60,10 @@
|
|||
</a-col>
|
||||
<a-col :span="24" style="text-align:center;margin-top:8px;">
|
||||
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">编辑问卷</a-button>
|
||||
<a-button type="primary" @click="handlePeizhi(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">问卷设置</a-button>
|
||||
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">问卷预览</a-button>
|
||||
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">发布问卷</a-button>
|
||||
<a-button type="primary" @click="handleDelete(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">删除问卷</a-button>
|
||||
<a-button type="primary" @click="handlePeizhi(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">问卷设置</a-button>
|
||||
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">问卷预览</a-button>
|
||||
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==1||item.qpublish==2">问卷详情</a-button>
|
||||
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==1||item.qpublish==2">问卷预览</a-button>
|
||||
<a-button type="primary" @click="handleDjjgs(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1||item.qpublish==2">问卷结果</a-button>
|
||||
|
|
|
@ -41,12 +41,13 @@
|
|||
</a-col>
|
||||
<a-col :span="24" class="zyCon">
|
||||
<a-row>
|
||||
<a-col :span="6" class="zyCon">时间:
|
||||
<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="16" class="zyCon">
|
||||
<!-- <a-col :span="16" class="zyCon">
|
||||
<a-col :span="24" class="zyCon">从{{item.startTime}}</a-col>
|
||||
<a-col :span="24" class="zyCon">至{{item.endTime}}</a-col>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align:center;margin-top:20px;">
|
||||
|
@ -79,6 +80,7 @@
|
|||
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
|
||||
import {useRouter} from "vue-router";
|
||||
import {useMessage} from "/@/hooks/web/useMessage";
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
|
|
|
@ -1,5 +1,30 @@
|
|||
<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="学生姓名">
|
||||
<a-input placeholder="请输入学生姓名" v-model:value="queryParam.userName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="学生学号">
|
||||
<a-input placeholder="请输入学生学号" v-model:value="queryParam.userId"></a-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="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>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--操作栏-->
|
||||
|
@ -18,7 +43,7 @@ import {ref, reactive, defineExpose, unref} from 'vue';
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } 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>({});
|
||||
|
@ -41,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({
|
||||
|
@ -65,7 +97,6 @@ import {ref, reactive, defineExpose, unref} from 'vue';
|
|||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
console.log(`🚀 ~ getTableAction ~ record:`, record.totalScore)
|
||||
if(record.totalScore>0){
|
||||
return [
|
||||
{
|
||||
|
|
|
@ -5,6 +5,8 @@ const { createConfirm } = useMessage();
|
|||
|
||||
enum Api {
|
||||
list = '/wjxDjxx/djjglist',
|
||||
|
||||
exportXls = '/wjxWjxxTmlb/wjxWjxxTmlb/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,3 +15,5 @@ enum Api {
|
|||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
|
||||
export const getExportUrl = Api.exportXls;
|
|
@ -1,5 +1,29 @@
|
|||
<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="学生姓名">
|
||||
<a-input placeholder="请输入学生姓名" v-model:value="queryParam.userName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="学生学号">
|
||||
<a-input placeholder="请输入学生学号" v-model:value="queryParam.userId"></a-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="reload">查询</a-button>
|
||||
<!-- <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> -->
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--操作栏-->
|
||||
|
|
|
@ -1,5 +1,30 @@
|
|||
<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="学生姓名">
|
||||
<a-input placeholder="请输入学生姓名" v-model:value="queryParam.userName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="学生学号">
|
||||
<a-input placeholder="请输入学生学号" v-model:value="queryParam.userId"></a-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="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>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--操作栏-->
|
||||
|
@ -18,7 +43,8 @@ import {ref, reactive, defineExpose, unref} from 'vue';
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './WjxWjxxTmlbDjjgs.data';
|
||||
import { list } from './WjxWjxxTmlbDjjgs.api';
|
||||
import { list,getExportUrl } from './WjxWjxxTmlbDjjgs.api';
|
||||
import { JInput } from '/@/components/Form';
|
||||
import WjxWjxxTmlbDjjgModal from '/@/views/kc/wjxWjxx/components/WjxWjxxTmlbDjjgModal.vue'
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
|
@ -41,7 +67,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({
|
||||
|
|
|
@ -0,0 +1,200 @@
|
|||
<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="6">
|
||||
<a-form-item label="题目类型">
|
||||
<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 :lg="7">
|
||||
<a-form-item label="是否公有">
|
||||
<JDictSelectTag placeholder="请选择" v-model:value="queryParam.wjSytype" dictCode="yn" />
|
||||
</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">
|
||||
<!--插槽: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-gongyou" setup>
|
||||
import {ref, reactive,watch, computed, unref,onMounted} 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/WjdcTmlbModal.vue'
|
||||
// import WjxWjxxTmlbModal from './components/WjxWjxxTmlbModal.vue'
|
||||
import {wjdccolumns, searchFormSchema} 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';
|
||||
|
||||
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:wjdccolumns,
|
||||
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 [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||
const props = defineProps({
|
||||
wjLeixing: { type: String },
|
||||
});
|
||||
//监听条件变化
|
||||
watch(() => props.wjLeixing, async (newRow, oldRow) => {
|
||||
console.log(`🚀 ~ watch2222 ~ newRow, oldRow:`, newRow, oldRow)
|
||||
queryParam.value.wjLeixing = newRow;
|
||||
},{ deep: true });
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
// wjLeixing.value = "1";
|
||||
// queryParam.value.wjLeixing = "1";
|
||||
queryParam.value.wjSytype = "1";
|
||||
reload();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,231 @@
|
|||
<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="6">
|
||||
<a-form-item label="问题标题">
|
||||
<j-input placeholder="请输入问题标题" v-model:value="queryParam.wjTitle"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item label="题目类型">
|
||||
<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 :lg="6">
|
||||
<a-form-item label="是否公有">
|
||||
<JDictSelectTag placeholder="请选择" v-model:value="queryParam.wjSytype" dictCode="yn" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="6" :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">
|
||||
<!--插槽: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,onMounted} 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/WjdcTmlbModal.vue'
|
||||
import {wjdccolumns, searchFormSchema} 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:wjdccolumns,
|
||||
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 [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
wjLeixing: { type: String },
|
||||
});
|
||||
//监听条件变化
|
||||
watch(() => props.wjLeixing, async (newRow, oldRow) => {
|
||||
console.log(`🚀 ~ watch ~ newRow, oldRow:`, newRow, oldRow)
|
||||
queryParam.value.wjLeixing = newRow;
|
||||
},{ deep: true });
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable,wjSytype) {
|
||||
defHttp.post({url:'/wjxWjxxTmlb/wjxWjxxTmlb/editSwgysy',params:{id:record.id,wjSytype}}).then(res=>{
|
||||
reload();
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record){
|
||||
if(record.wjSytype == '0'){
|
||||
return [
|
||||
{
|
||||
label: '设为公有',
|
||||
onClick: handleEdit.bind(null, record,'1'),
|
||||
},
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}
|
||||
]
|
||||
}else{
|
||||
return [
|
||||
{
|
||||
label: '设为私有',
|
||||
onClick: handleEdit.bind(null, record,'0'),
|
||||
},
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
// wjLeixing.value = "1";
|
||||
// console.log(`🚀 ~ onMounted ~ wjLeixing:`, wjLeixing)
|
||||
// queryParam.value.wjLeixing = wjLeixing;
|
||||
queryParam.value.createBy = userStore.getUserInfo.username;
|
||||
reload();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
width: calc(50% - 15px);
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,45 @@
|
|||
<template>
|
||||
<div style="padding: 20px;">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane key="1" tab="我的题库"><WjdcTikuList :wjLeixing="wjLeixing"/></a-tab-pane>
|
||||
<a-tab-pane key="2" tab="公有题库" force-render><WjdcTikuGongyouList :wjLeixing="wjLeixing" /></a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="wjxWjxxTmlb-main" setup>
|
||||
import {ref, reactive, computed, unref,defineExpose} from 'vue';
|
||||
import WjdcTikuList from '/@/views/kc/wjxWjxxTmlb/WjdcTikuList.vue'
|
||||
import WjdcTikuGongyouList from '/@/views/kc/wjxWjxxTmlb/WjdcTikuGongyouList.vue'
|
||||
|
||||
const activeKey = ref('1');
|
||||
const wjLeixing = ref<string>('');
|
||||
|
||||
function init(record){
|
||||
console.log(`🚀 ~ init ~ record:`, record)
|
||||
wjLeixing.value = record.wjLeixing;
|
||||
}
|
||||
|
||||
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>
|
|
@ -0,0 +1,64 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<WjdcTikuListMain ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></WjdcTikuListMain>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import WjdcTikuListMain from './WjdcTikuListMain.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() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<a-form v-bind="formItemLayout">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="题干" v-bind="validateInfos.wjTitle">
|
||||
<a-input v-model:value="formData.wjTitle" placeholder="请输入题干" :disabled="disabled"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
||||
<!-- 子表单区域 -->
|
||||
<a-tabs v-model:activeKey="activeKey" animated v-if="formData.wjType!='5'">
|
||||
<a-tab-pane tab="选项信息" key="wjxWjxxTmxx" :forceRender="true">
|
||||
<j-vxe-table
|
||||
:keep-source="true"
|
||||
resizable
|
||||
ref="wjxWjxxTmxxTableRef"
|
||||
:loading="wjxWjxxTmxxTable.loading"
|
||||
:columns="wjxWjxxTmxxTable.columns"
|
||||
:dataSource="wjxWjxxTmxxTable.dataSource"
|
||||
:height="340"
|
||||
:disabled="disabled"
|
||||
:rowNumber="true"
|
||||
:rowSelection="false"
|
||||
:toolbar="false"/>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
||||
import { queryWjxWjxxTmxxListByMainId, queryDataById, saveOrUpdate } from '../WjxWjxxTmlb.api';
|
||||
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
||||
import {wjxWjxxTmxxColumns,wjxWjdcColumns} from '../WjxWjxxTmlb.data';
|
||||
import { Form } from 'ant-design-vue';
|
||||
const useForm = Form.useForm;
|
||||
|
||||
export default defineComponent({
|
||||
name: "WjxWjxxTmlbForm",
|
||||
components:{
|
||||
JVxeTable,
|
||||
},
|
||||
props:{
|
||||
formDisabled:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
formData: { type: Object, default: ()=>{} },
|
||||
formBpm: { type: Boolean, default: true }
|
||||
},
|
||||
emits:['success'],
|
||||
setup(props, {emit}) {
|
||||
const loading = ref(false);
|
||||
const wjxWjxxTmxxTableRef = ref();
|
||||
const activeKey = ref('wjxWjxxTmxx');
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
wjTitle: '',
|
||||
wjScore: '',
|
||||
});
|
||||
|
||||
console.log(`🚀 ~ setup ~ formData.wjLeixing:`, formData.wjLeixing)
|
||||
const wjxWjxxTmxxTable = reactive<Record<string, any>>({
|
||||
loading: false,
|
||||
columns: wjxWjdcColumns,
|
||||
dataSource: []
|
||||
});
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const {resetFields, validate, validateInfos} = useForm(formData, validatorRules, {immediate: true});
|
||||
const dbData = {};
|
||||
const formItemLayout = {
|
||||
labelCol: {xs: {span: 24}, sm: {span: 5}},
|
||||
wrapperCol: {xs: {span: 24}, sm: {span: 16}},
|
||||
};
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
|
||||
function add() {
|
||||
resetFields();
|
||||
wjxWjxxTmxxTable.dataSource = [];
|
||||
}
|
||||
|
||||
async function edit(row) {
|
||||
//主表数据
|
||||
await queryMainData(row.id);
|
||||
//子表数据
|
||||
const wjxWjxxTmxxDataList = await queryWjxWjxxTmxxListByMainId(row['id']);
|
||||
wjxWjxxTmxxTable.dataSource = [...wjxWjxxTmxxDataList];
|
||||
}
|
||||
|
||||
async function queryMainData(id) {
|
||||
const row = await queryDataById(id);
|
||||
Object.keys(row).map(k => {
|
||||
formData[k] = row[k];
|
||||
});
|
||||
}
|
||||
|
||||
const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
|
||||
'wjxWjxxTmxx': wjxWjxxTmxxTableRef,
|
||||
});
|
||||
|
||||
async function getFormData() {
|
||||
await validate();
|
||||
return transformData(toRaw(formData))
|
||||
}
|
||||
|
||||
async function submitForm() {
|
||||
const mainData = await getFormData();
|
||||
const subData = await getSubFormAndTableData();
|
||||
const values = Object.assign({}, dbData, mainData, subData);
|
||||
console.log('表单提交数据', values)
|
||||
const isUpdate = values.id ? true : false
|
||||
await saveOrUpdate(values, isUpdate);
|
||||
//关闭弹窗
|
||||
emit('success');
|
||||
}
|
||||
|
||||
function setFieldsValue(values) {
|
||||
if(values){
|
||||
Object.keys(values).map(k=>{
|
||||
formData[k] = values[k];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 值改变事件触发-树控件回调
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
function handleFormChange(key, value) {
|
||||
formData[key] = value;
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
wjxWjxxTmxxTableRef,
|
||||
wjxWjxxTmxxTable,
|
||||
validatorRules,
|
||||
validateInfos,
|
||||
activeKey,
|
||||
loading,
|
||||
formData,
|
||||
setFieldsValue,
|
||||
handleFormChange,
|
||||
formItemLayout,
|
||||
disabled,
|
||||
getFormData,
|
||||
submitForm,
|
||||
add,
|
||||
edit
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,68 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" :width="800" @ok="handleSubmit">
|
||||
<WjdcTmlbForm ref="formComponent" :formDisabled="formDisabled" :formBpm="false" @success="submitSuccess"></WjdcTmlbForm>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, unref } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import WjdcTmlbForm from './WjdcTmlbForm.vue';
|
||||
|
||||
export default {
|
||||
name: "TestCgMainVxeModal",
|
||||
components:{
|
||||
BasicModal,
|
||||
WjdcTmlbForm
|
||||
},
|
||||
emits:['register','success'],
|
||||
setup(_p, {emit}){
|
||||
const formComponent = ref()
|
||||
const isUpdate = ref(true);
|
||||
const formDisabled = ref(false);
|
||||
const title = ref('')
|
||||
|
||||
//表单赋值
|
||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||
setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter});
|
||||
isUpdate.value = !!data?.isUpdate;
|
||||
title.value ='详情'
|
||||
formDisabled.value = !data?.showFooter;
|
||||
if (unref(isUpdate)) {
|
||||
console.log('data', data)
|
||||
formComponent.value.edit(data.record)
|
||||
}else{
|
||||
formComponent.value.add()
|
||||
}
|
||||
});
|
||||
|
||||
function handleSubmit() {
|
||||
formComponent.value.submitForm();
|
||||
}
|
||||
|
||||
function submitSuccess(){
|
||||
emit('success');
|
||||
closeModal();
|
||||
}
|
||||
|
||||
return {
|
||||
registerModal,
|
||||
title,
|
||||
formComponent,
|
||||
formDisabled,
|
||||
handleSubmit,
|
||||
submitSuccess
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
/** 时间和数字输入框样式 */
|
||||
:deep(.ant-input-number){
|
||||
width: 100%
|
||||
}
|
||||
|
||||
:deep(.ant-calendar-picker){
|
||||
width: 100%
|
||||
}
|
||||
</style>
|
|
@ -40,7 +40,7 @@
|
|||
<!-- <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">时间:{{item.startTime}} - {{item.endTime}}</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">
|
||||
<div style="float:left" >评分:{{item.score?item.score:'未评'}}分</div>
|
||||
<div style="float:right;">网络查重:{{item.wwxsl?item.wwxsl+'%':'-'}}</div>
|
||||
|
@ -86,6 +86,7 @@
|
|||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
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 ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||
|
|
|
@ -27,23 +27,6 @@ export const columns: BasicColumn[] = [
|
|||
dataIndex: 'score',
|
||||
width: '80px'
|
||||
},
|
||||
// {
|
||||
// title: '作业附件',
|
||||
// align: "center",
|
||||
// dataIndex: 'filePath',
|
||||
// slots: { customRender: 'fileSlot' },
|
||||
// },
|
||||
// {
|
||||
// title: '在线预览',
|
||||
// align: "center",
|
||||
// dataIndex: 'filePath',
|
||||
// slots: { customRender: 'fileZxSlot' },
|
||||
// },
|
||||
// {
|
||||
// title: '外网相似率',
|
||||
// align: "center",
|
||||
// dataIndex: 'wwxsl'
|
||||
// },
|
||||
{
|
||||
title: '外网检测',
|
||||
align: "center",
|
||||
|
@ -51,11 +34,6 @@ export const columns: BasicColumn[] = [
|
|||
slots: { customRender: 'wwsftgaction' },
|
||||
width: '100px'
|
||||
},
|
||||
// {
|
||||
// title: '内网相似率',
|
||||
// align: "center",
|
||||
// dataIndex: 'nwxsl'
|
||||
// },
|
||||
{
|
||||
title: '内网检测',
|
||||
align: "center",
|
||||
|
@ -63,11 +41,6 @@ export const columns: BasicColumn[] = [
|
|||
slots: { customRender: 'nwsftgaction' },
|
||||
width: '100px'
|
||||
},
|
||||
// {
|
||||
// title: 'aigc相似率',
|
||||
// align: "center",
|
||||
// dataIndex: 'aigcxsl'
|
||||
// },
|
||||
{
|
||||
title: 'aigc检测',
|
||||
align: "center",
|
||||
|
@ -163,7 +136,7 @@ export const formSchema: FormSchema[] = [
|
|||
},
|
||||
dynamicRules: ({model,schema}) => {
|
||||
return [
|
||||
{ required: true, message: '请输入作业附件!'},
|
||||
{ required: true, message: '请上传作业附件!'},
|
||||
];
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<!-- <div class="jeecg-basic-table-form-container">
|
||||
<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="作业名称">
|
||||
<a-input placeholder="请输入作业名称" v-model:value="queryParam.mainId"></a-input>
|
||||
<a-form-item label="学生姓名">
|
||||
<j-input placeholder="请输入学生姓名" v-model:value="queryParam.studentName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="学生学号">
|
||||
<j-input placeholder="请输入学生学号" v-model:value="queryParam.createBy"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
|
@ -14,14 +19,15 @@
|
|||
<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> -->
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" style="margin-top: 20px;">
|
||||
<BasicTable @register="registerTable">
|
||||
<template #tableTitle>
|
||||
<span>检测时间提醒: 非高峰期预计30分钟内返回检测结果,高峰期预计时间会更长,请您耐心等待!</span>
|
||||
</template>
|
||||
|
@ -102,6 +108,7 @@
|
|||
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();
|
||||
|
||||
|
@ -132,8 +139,11 @@
|
|||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "学生提交作业",
|
||||
name: "学生作业信息",
|
||||
url: getExportUrl,
|
||||
params: () => {
|
||||
return Object.assign({},queryParam.value);
|
||||
}
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
|
@ -232,8 +242,8 @@
|
|||
reload();
|
||||
}
|
||||
|
||||
function handleDown(record){
|
||||
downloadFile(record.filePath);
|
||||
function handleDown(text){
|
||||
downloadFile(text);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -243,22 +253,10 @@
|
|||
if(record.filePath){
|
||||
if(record.scoreFabu=='1'){
|
||||
var list = [
|
||||
// {
|
||||
// label: '详情',
|
||||
// onClick: handleDetail.bind(null, record),
|
||||
// },
|
||||
{
|
||||
label: '设置样本',
|
||||
onClick: handleSzyb.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleDown.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '预览',
|
||||
onClick: yulanFile.bind(null, record),
|
||||
}
|
||||
];
|
||||
return list;
|
||||
}else{
|
||||
|
@ -275,62 +273,76 @@
|
|||
label: '发布评分',
|
||||
onClick: handleScoreFabu.bind(null, record),
|
||||
},
|
||||
// {
|
||||
// label: '详情',
|
||||
// onClick: handleDetail.bind(null, record),
|
||||
// },
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleDown.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '预览',
|
||||
onClick: yulanFile.bind(null, record),
|
||||
}];
|
||||
];
|
||||
return list;
|
||||
}
|
||||
|
||||
}else{
|
||||
// var list = [
|
||||
// {
|
||||
// label: '详情',
|
||||
// onClick: handleDetail.bind(null, record),
|
||||
// },];
|
||||
var list = [ ];
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function handleYulan(text){
|
||||
window.open(text,"_blank")
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
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: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
onClick: handleDown.bind(null, record.wwpaperdownurl),
|
||||
});
|
||||
list.push({
|
||||
label: '外网结果预览',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '内网结果下载',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '内网结果预览',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
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: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
onClick: handleDown.bind(null, record.aigcpaperdownurl),
|
||||
});
|
||||
list.push({
|
||||
label: 'aigc结果预览',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
]
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -352,6 +364,7 @@
|
|||
}
|
||||
|
||||
function init(record){
|
||||
queryParam.value = {};
|
||||
queryParam.value.mainId = record.id;
|
||||
mainId.value = record.id;
|
||||
reload();
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = {
|
||||
filePath: [{ required: true, message: '请输入作业附件!'},],
|
||||
filePath: [{ required: true, message: '请上传作业附件!'},],
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||
|
||||
|
|
Loading…
Reference in New Issue