修改bug
This commit is contained in:
parent
2af714b850
commit
304cb4fa90
|
@ -96,6 +96,7 @@ export const loadCategoryData = (params) => {
|
||||||
export const uploadFile = (params, success) => {
|
export const uploadFile = (params, success) => {
|
||||||
return defHttp.uploadFile({ url: uploadUrl }, params, { success });
|
return defHttp.uploadFile({ url: uploadUrl }, params, { success });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载文件
|
* 下载文件
|
||||||
* @param url 文件路径
|
* @param url 文件路径
|
||||||
|
@ -103,8 +104,8 @@ export const uploadFile = (params, success) => {
|
||||||
* @param parameter
|
* @param parameter
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const downloadFile = (url, fileName?, parameter?) => {
|
export const downloadFile = (url, fileName?, parameter?, cellBack?, config?) => {
|
||||||
return getFileblob(url, parameter).then((data) => {
|
return getFileblob(url, parameter, config).then((data) => {
|
||||||
if (!data || data.size === 0) {
|
if (!data || data.size === 0) {
|
||||||
message.warning('文件下载失败');
|
message.warning('文件下载失败');
|
||||||
return;
|
return;
|
||||||
|
@ -122,6 +123,9 @@ export const downloadFile = (url, fileName?, parameter?) => {
|
||||||
document.body.removeChild(link); //下载完成移除元素
|
document.body.removeChild(link); //下载完成移除元素
|
||||||
window.URL.revokeObjectURL(url); //释放掉blob对象
|
window.URL.revokeObjectURL(url); //释放掉blob对象
|
||||||
}
|
}
|
||||||
|
if(cellBack){
|
||||||
|
cellBack(data);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -131,14 +135,14 @@ export const downloadFile = (url, fileName?, parameter?) => {
|
||||||
* @param parameter
|
* @param parameter
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export const getFileblob = (url, parameter) => {
|
export const getFileblob = (url, parameter, config = { isTransformResponse: false }) => {
|
||||||
return defHttp.get(
|
return defHttp.get(
|
||||||
{
|
{
|
||||||
url: url,
|
url: url,
|
||||||
params: parameter,
|
params: parameter,
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
},
|
},
|
||||||
{ isTransformResponse: false }
|
config
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,8 @@
|
||||||
import { buildUUID } from '/@/utils/uuid';
|
import { buildUUID } from '/@/utils/uuid';
|
||||||
import CryptoJS from 'crypto-js';
|
import CryptoJS from 'crypto-js';
|
||||||
|
|
||||||
|
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||||
|
|
||||||
const spinning = ref<boolean>(false);
|
const spinning = ref<boolean>(false);
|
||||||
const { createMessage, createConfirm } = useMessage();
|
const { createMessage, createConfirm } = useMessage();
|
||||||
const { prefixCls } = useDesign('j-upload');
|
const { prefixCls } = useDesign('j-upload');
|
||||||
|
@ -408,31 +410,44 @@
|
||||||
* 自定义下载事件,带加载中
|
* 自定义下载事件,带加载中
|
||||||
*/
|
*/
|
||||||
function openWindowWithLoading(url){
|
function openWindowWithLoading(url){
|
||||||
let xhr = new XMLHttpRequest();
|
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
xhr.open('GET',url,true);
|
let fileName = url.substring(url.lastIndexOf("/")+1);
|
||||||
// xhr.onprogress = function (e){
|
let uploadAxiosHttpConfig = {
|
||||||
// let percent = Math.floor(e.loaded / e.total * 100);//百分比加载,用于进度条
|
//超时时间,分钟 * 秒 * 毫秒 60分钟
|
||||||
// console.log(percent);
|
timeout: 60 * 60 * 1000,
|
||||||
// }
|
//不自动拼接前缀
|
||||||
xhr.send();
|
joinPrefix: false,
|
||||||
xhr.responseType = "arraybuffer";
|
//自定义前缀
|
||||||
xhr.onreadystatechange = event =>{
|
apiUrl: '',
|
||||||
console.log(xhr);
|
//不自动处理
|
||||||
if(xhr.readyState == 4){
|
isTransformResponse: false
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
ajaxDownloadFileFn(url, fileName, {}, () => { spinning.value = false; }, uploadAxiosHttpConfig);
|
||||||
|
//spinning.value = false;
|
||||||
|
// let xhr = new XMLHttpRequest();
|
||||||
|
// 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 =>{
|
||||||
|
// console.log(xhr);
|
||||||
|
// 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 emitValue(value) {
|
function emitValue(value) {
|
||||||
|
|
|
@ -58,16 +58,16 @@ export const columns: BasicColumn[] = [
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'detectionNum'
|
dataIndex: 'detectionNum'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '累计抓取人数',
|
// title: '累计抓取人数',
|
||||||
align: "center",
|
// align: "center",
|
||||||
dataIndex: 'allNum'
|
// dataIndex: 'allNum'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '平均抓取人数',
|
// title: '平均抓取人数',
|
||||||
align: "center",
|
// align: "center",
|
||||||
dataIndex: 'averageNum',
|
// dataIndex: 'averageNum',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '出勤率',
|
title: '出勤率',
|
||||||
align: "center",
|
align: "center",
|
||||||
|
@ -107,16 +107,25 @@ export const formSchema: FormSchema[] = [
|
||||||
label: '学年学期',
|
label: '学年学期',
|
||||||
field: 'xnxq',
|
field: 'xnxq',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '课程名称',
|
label: '课程名称',
|
||||||
field: 'kcmc',
|
field: 'kcmc',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '授课日期',
|
label: '授课日期',
|
||||||
field: 'createTime',
|
field: 'createTime',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
render: ({ values }) => {
|
render: ({ values }) => {
|
||||||
let text = values?.ketangbiaoInfo?.skrq;
|
let text = values?.ketangbiaoInfo?.skrq;
|
||||||
return h(Input, { value: text, disabled: true });
|
return h(Input, { value: text, disabled: true });
|
||||||
|
@ -126,6 +135,9 @@ export const formSchema: FormSchema[] = [
|
||||||
label: '授课节次',
|
label: '授课节次',
|
||||||
field: 'ketangbiaoInfo',
|
field: 'ketangbiaoInfo',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
render: ({ values }) => {
|
render: ({ values }) => {
|
||||||
let text = values?.ketangbiaoInfo?.hh;
|
let text = values?.ketangbiaoInfo?.hh;
|
||||||
return h(Input, { value: text, disabled: true });
|
return h(Input, { value: text, disabled: true });
|
||||||
|
@ -136,12 +148,18 @@ export const formSchema: FormSchema[] = [
|
||||||
field: 'rwbh',
|
field: 'rwbh',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
show: false,
|
show: false,
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '课程编号',
|
label: '课程编号',
|
||||||
field: 'kcbh',
|
field: 'kcbh',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
show: false,
|
show: false,
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '教室编号',
|
label: '教室编号',
|
||||||
|
@ -159,21 +177,33 @@ export const formSchema: FormSchema[] = [
|
||||||
label: '抓取次数',
|
label: '抓取次数',
|
||||||
field: 'detectionNum',
|
field: 'detectionNum',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '累计抓取人数',
|
label: '累计抓取人数',
|
||||||
field: 'allNum',
|
field: 'allNum',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '平均抓取人数',
|
label: '平均抓取人数',
|
||||||
field: 'averageNum',
|
field: 'averageNum',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '选课人数',
|
label: '选课人数',
|
||||||
field: 'xkrs',
|
field: 'xkrs',
|
||||||
component: "Input",
|
component: "Input",
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
render: ({ values }) => {
|
render: ({ values }) => {
|
||||||
let text = values?.ketangbiaoInfo?.xkrs;
|
let text = values?.ketangbiaoInfo?.xkrs;
|
||||||
return h(Input, { value: text, disabled: true });
|
return h(Input, { value: text, disabled: true });
|
||||||
|
@ -184,6 +214,9 @@ export const formSchema: FormSchema[] = [
|
||||||
label: '出勤率',
|
label: '出勤率',
|
||||||
field: 'averageNum',
|
field: 'averageNum',
|
||||||
component: "Input",
|
component: "Input",
|
||||||
|
colProps: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
render: ({ values }) => {
|
render: ({ values }) => {
|
||||||
let text = '';
|
let text = '';
|
||||||
let { ketangbiaoInfo, averageNum } = values??{};
|
let { ketangbiaoInfo, averageNum } = values??{};
|
||||||
|
|
|
@ -68,6 +68,8 @@
|
||||||
<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="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="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;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;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="handleTjfx(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="handleXzdj(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-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
|
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
|
||||||
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->
|
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->
|
||||||
|
@ -92,6 +94,7 @@
|
||||||
<WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsModal>
|
<WjxWjxxTmlbDjjgsModal ref="WjxWjxxTmlbDjjgsModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsModal>
|
||||||
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
|
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
|
||||||
<TikuListModal ref="TikuListModalPage"></TikuListModal>
|
<TikuListModal ref="TikuListModalPage"></TikuListModal>
|
||||||
|
<WjxWjxxTjfxModal ref="WjxWjxxTjfxModalPage"></WjxWjxxTjfxModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -109,13 +112,14 @@
|
||||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||||
import {useMessage} from "/@/hooks/web/useMessage";
|
import {useMessage} from "/@/hooks/web/useMessage";
|
||||||
import TikuListModal from '/@/views/kc/wjxWjxxTmlb/TikuListModal.vue';
|
import TikuListModal from '/@/views/kc/wjxWjxxTmlb/TikuListModal.vue';
|
||||||
|
import WjxWjxxTjfxModal from '/@/views/kc/wjxCswj/WjxWjxxTjfxModal.vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
//当前路由信息
|
//当前路由信息
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const { query } = unref(currentRoute);
|
const { query } = unref(currentRoute);
|
||||||
const { rwbh,xqxn,typa } = query;//获取传递参数
|
const { rwbh,xqxn,typa } = query;//获取传递参数
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm,createMessage } = useMessage();
|
||||||
const APagination = Pagination;
|
const APagination = Pagination;
|
||||||
const queryParam = ref<any>({});
|
const queryParam = ref<any>({});
|
||||||
const current = ref<number>(0);
|
const current = ref<number>(0);
|
||||||
|
@ -131,6 +135,7 @@
|
||||||
const WjxWjxxTmlbDjjgsDcModalPage = ref();
|
const WjxWjxxTmlbDjjgsDcModalPage = ref();
|
||||||
const XxhbbksListModalPage = ref();
|
const XxhbbksListModalPage = ref();
|
||||||
const TikuListModalPage = ref();
|
const TikuListModalPage = ref();
|
||||||
|
const WjxWjxxTjfxModalPage = ref();
|
||||||
|
|
||||||
const labelCol = reactive({
|
const labelCol = reactive({
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
|
@ -140,7 +145,31 @@
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 16 },
|
sm: { span: 16 },
|
||||||
});
|
});
|
||||||
|
//统计分析
|
||||||
|
function handleTjfx(record){
|
||||||
|
WjxWjxxTjfxModalPage.value.disableSubmit = true;
|
||||||
|
WjxWjxxTjfxModalPage.value.edit(record);
|
||||||
|
// defHttp.get({ url: '/wjxWjxx/wjxWjxx/wjxxTjfx', params: { id: record.id } }).then(res => {
|
||||||
|
// console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
//下载答卷
|
||||||
|
function handleXzdj(record){
|
||||||
|
defHttp.get({ url: '/wjxWjxx/wjxWjxx/wjxxDownLoad', params: { id: record.id } }).then(res => {
|
||||||
|
console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||||
|
if(res.result){
|
||||||
|
var downUrl = res.data.download_url;
|
||||||
|
console.log(`🚀 ~ defHttp.get ~ downUrl:`, downUrl)
|
||||||
|
if(downUrl){
|
||||||
|
window.open(downUrl)
|
||||||
|
}else{
|
||||||
|
createMessage.warning("下载异常请联系管理员")
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
createMessage.warning(res.errormsg)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//题库类型(6作业,1问卷)
|
//题库类型(6作业,1问卷)
|
||||||
function handleTiku(wjLeixing){
|
function handleTiku(wjLeixing){
|
||||||
|
|
|
@ -59,14 +59,16 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" style="text-align:center;margin-top:8px;">
|
<a-col :span="24" style="text-align:center;margin-top:8px;">
|
||||||
<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="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="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="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="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="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="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="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="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>
|
<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>
|
||||||
|
<a-button type="primary" @click="handleTjfx(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="handleXzdj(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-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
|
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
|
||||||
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->
|
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->
|
||||||
|
@ -92,6 +94,7 @@
|
||||||
<WjxWjxxTmlbDjjgsDcModal ref="WjxWjxxTmlbDjjgsDcModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsDcModal>
|
<WjxWjxxTmlbDjjgsDcModal ref="WjxWjxxTmlbDjjgsDcModalPage" @success="handleSuccess"></WjxWjxxTmlbDjjgsDcModal>
|
||||||
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
|
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
|
||||||
<WjdcTikuListModal ref="TikuListModalPage"></WjdcTikuListModal>
|
<WjdcTikuListModal ref="TikuListModalPage"></WjdcTikuListModal>
|
||||||
|
<WjxWjxxTjfxModal ref="WjxWjxxTjfxModalPage"></WjxWjxxTjfxModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -110,13 +113,14 @@
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
import {useMessage} from "/@/hooks/web/useMessage";
|
import {useMessage} from "/@/hooks/web/useMessage";
|
||||||
import WjdcTikuListModal from '/@/views/kc/wjxWjxxTmlb/WjdcTikuListModal.vue';
|
import WjdcTikuListModal from '/@/views/kc/wjxWjxxTmlb/WjdcTikuListModal.vue';
|
||||||
|
import WjxWjxxTjfxModal from '/@/views/kc/wjxCswj/WjxWjxxTjfxModal.vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
//当前路由信息
|
//当前路由信息
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const { query } = unref(currentRoute);
|
const { query } = unref(currentRoute);
|
||||||
const { rwbh,xqxn,typa} = query;//获取传递参数
|
const { rwbh,xqxn,typa} = query;//获取传递参数
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm,createMessage } = useMessage();
|
||||||
const APagination = Pagination;
|
const APagination = Pagination;
|
||||||
const queryParam = ref<any>({});
|
const queryParam = ref<any>({});
|
||||||
const current = ref<number>(0);
|
const current = ref<number>(0);
|
||||||
|
@ -131,6 +135,7 @@
|
||||||
const WjxWjxxTmlbDjjgsDcModalPage = ref();
|
const WjxWjxxTmlbDjjgsDcModalPage = ref();
|
||||||
const XxhbbksListModalPage = ref();
|
const XxhbbksListModalPage = ref();
|
||||||
const TikuListModalPage = ref();
|
const TikuListModalPage = ref();
|
||||||
|
const WjxWjxxTjfxModalPage = ref();
|
||||||
|
|
||||||
const labelCol = reactive({
|
const labelCol = reactive({
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
|
@ -141,6 +146,28 @@
|
||||||
sm: { span: 16 },
|
sm: { span: 16 },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//统计分析
|
||||||
|
function handleTjfx(record){
|
||||||
|
WjxWjxxTjfxModalPage.value.disableSubmit = true;
|
||||||
|
WjxWjxxTjfxModalPage.value.edit(record);
|
||||||
|
}
|
||||||
|
//下载答卷
|
||||||
|
function handleXzdj(record){
|
||||||
|
defHttp.get({ url: '/wjxWjxx/wjxWjxx/wjxxDownLoad', params: { id: record.id } }).then(res => {
|
||||||
|
console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||||
|
if(res.result){
|
||||||
|
var downUrl = res.data.download_url;
|
||||||
|
console.log(`🚀 ~ defHttp.get ~ downUrl:`, downUrl)
|
||||||
|
if(downUrl){
|
||||||
|
window.open(downUrl)
|
||||||
|
}else{
|
||||||
|
createMessage.warning("下载异常请联系管理员")
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
createMessage.warning(res.errormsg)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
//题库类型(6作业,1问卷)
|
//题库类型(6作业,1问卷)
|
||||||
function handleTiku(wjLeixing){
|
function handleTiku(wjLeixing){
|
||||||
var record = {wjLeixing}
|
var record = {wjLeixing}
|
||||||
|
|
|
@ -18,21 +18,35 @@
|
||||||
<span style="float: right;margin-left: 10px;background: #1c84c6;color: #fff;padding: 9px;border-radius: 5px;font-size: 16px;" @click="() => tingKeZuJiAddModal.view({ ketangbiaoid: route.query.ktId })">填写评价表</span>
|
<span style="float: right;margin-left: 10px;background: #1c84c6;color: #fff;padding: 9px;border-radius: 5px;font-size: 16px;" @click="() => tingKeZuJiAddModal.view({ ketangbiaoid: route.query.ktId })">填写评价表</span>
|
||||||
<div style="font-size: 12px;">
|
<div style="font-size: 12px;">
|
||||||
{{ ktangInfo.zc || ' ' }} {{ ktangInfo.skjs || ' ' }} 学分:{{ ktangInfo.xf || ' ' }}
|
{{ ktangInfo.zc || ' ' }} {{ ktangInfo.skjs || ' ' }} 学分:{{ ktangInfo.xf || ' ' }}
|
||||||
选课人数:{{ ktangInfo.xkrs || ' ' }}
|
|
||||||
课程性质:{{ ktangInfo.kcxz || ' ' }}
|
课程性质:{{ ktangInfo.kcxz || ' ' }}
|
||||||
开课单位:{{ ktangInfo.kkdw || ' ' }}
|
开课单位:{{ ktangInfo.kkdw || ' ' }}
|
||||||
节次:{{ ktangInfo.hh || ' ' }}
|
节次:{{ ktangInfo.hh || ' ' }}
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 12px;text-wrap: wrap;width: 100%;word-wrap: break-word;">
|
<div style="font-size: 12px;text-wrap: wrap;width: 100%;word-wrap: break-word;" hidden>
|
||||||
课程介绍:{{ ktangInfo?.zyJxdg?.kcjs }}
|
课程介绍:{{ ktangInfo?.zyJxdg?.kcjs }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div style="padding: 1rem;">
|
<div style="padding: 1rem;">
|
||||||
<div style="font-size: 16px;float: left;">{{ mainVideoCardBoxTitle || '' }}</div>
|
<div style="font-size: 16px;float: left;">{{ mainVideoCardBoxTitle || '' }}</div>
|
||||||
<div style="float: right;">
|
<!-- <div style="float: right;">
|
||||||
AI识别出勤率:{{ calcPercentage((ktangInfo?.detectionMain?.averageNum || 0),(ktangInfo?.jiaoshirongliang?.jsrl || 0))}}
|
AI识别出勤率:{{ calcPercentage((ktangInfo?.detectionMain?.averageNum || 0),(ktangInfo?.jiaoshirongliang?.jsrl || 0))}}
|
||||||
<template v-if="ktangInfo?.jiaoshirongliang?.jsrl">本教室容量:{{ktangInfo?.jiaoshirongliang?.jsrl}}座位</template>
|
<template v-if="ktangInfo?.jiaoshirongliang?.jsrl">本教室容量:{{ktangInfo?.jiaoshirongliang?.jsrl}}座位</template>
|
||||||
|
</div> -->
|
||||||
|
<div style="float: right;">
|
||||||
|
<span>本教室容量:{{ktangInfo?.jiaoshirongliang?.jsrl || ' '}}座位</span>
|
||||||
|
<span style="margin-left:15px;">选课人数:{{ ktangInfo.xkrs || ' ' }}</span>
|
||||||
|
<span style="margin-left:15px;">出勤人数: <a @click="handleZqrs(ktangInfo)">{{ ktangInfo?.kcDetectionDetailed?.num||'89' }}</a></span>
|
||||||
|
<span style="margin-left:15px;">
|
||||||
|
<a-tooltip placement="topRight">
|
||||||
|
<template #title>
|
||||||
|
<span>抓取时间:上课后10分,课中50分钟,下课前10分钟 </span>
|
||||||
|
</template>
|
||||||
|
<Icon icon="ant-design:question-circle-outlined" />
|
||||||
|
</a-tooltip>
|
||||||
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<bVideo ref="mainVideo" videoId="mainVideo" :videoOption="{ autoplay: true }" @load-end="mainVideoLoadEnd"/>
|
<bVideo ref="mainVideo" videoId="mainVideo" :videoOption="{ autoplay: true }" @load-end="mainVideoLoadEnd"/>
|
||||||
<div class="jxDiv">
|
<div class="jxDiv">
|
||||||
<a-space>
|
<a-space>
|
||||||
|
@ -112,6 +126,7 @@
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
|
<KcDetectionMainModal @register="registerModal" ></KcDetectionMainModal>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup name="zhihuijiaoshiIndexPage">
|
<script lang="ts" setup name="zhihuijiaoshiIndexPage">
|
||||||
|
|
||||||
|
@ -128,6 +143,8 @@ import videojs from "video.js";
|
||||||
import { getSysConfig } from '/@/views/site/utils/index';
|
import { getSysConfig } from '/@/views/site/utils/index';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { baseApiUrl, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
import { baseApiUrl, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||||
|
import KcDetectionMainModal from '/@/views/kc/detection/components/KcDetectionMainModal.vue'
|
||||||
|
import { useModal } from '/@/components/Modal';
|
||||||
|
|
||||||
const { createMessage, createInfoModal, createErrorModal } = useMessage();
|
const { createMessage, createInfoModal, createErrorModal } = useMessage();
|
||||||
|
|
||||||
|
@ -149,6 +166,9 @@ const playStatus = ref(false);
|
||||||
|
|
||||||
const model = reactive<Record<string, any>>({ notes:'' });
|
const model = reactive<Record<string, any>>({ notes:'' });
|
||||||
|
|
||||||
|
//注册model
|
||||||
|
const [registerModal, { openModal }] = useModal();
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
|
@ -396,6 +416,31 @@ function downloadFile(miniUrl) {
|
||||||
window.open(url,"_blank");
|
window.open(url,"_blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleZqrs(record){
|
||||||
|
console.log(`🚀 ~ handleZqrs ~ record:`, record)
|
||||||
|
console.log(`🚀 ~ handleZqrs ~ zqrsList:`, record.zqrsList)
|
||||||
|
var a = record.detectionMain;
|
||||||
|
|
||||||
|
a.detectionDetailedList = record.zqrsList
|
||||||
|
handleZqrsDetail(a);
|
||||||
|
|
||||||
|
// if(record.zqrsList){
|
||||||
|
// a.detectionDetailedList = record.zqrsList
|
||||||
|
// handleZqrsDetail(a);
|
||||||
|
// }else{
|
||||||
|
// createMessage.warning("暂无数据!")
|
||||||
|
// // a.detectionDetailedList = [{}]
|
||||||
|
// // handleZqrsDetail(a);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleZqrsDetail(record: Recordable) {
|
||||||
|
openModal(true, {
|
||||||
|
record,
|
||||||
|
isUpdate: true,
|
||||||
|
showFooter: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -56,7 +56,7 @@ function loaddata(){
|
||||||
function openKecheng(record){
|
function openKecheng(record){
|
||||||
console.log(`🚀 ~ openKecheng ~ record:`, record)
|
console.log(`🚀 ~ openKecheng ~ record:`, record)
|
||||||
|
|
||||||
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteByRwbhCreate',params:{rwbh:record.rwbh} }).then((res) => {
|
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteByRwbhCreate',params:{rwbh:record.rwbh,fbr:record.jgh} }).then((res) => {
|
||||||
loaddata()
|
loaddata()
|
||||||
});
|
});
|
||||||
var url = "/stuzy/studentMain?rwbh="+record.rwbh+"&xqxn="+record.xqxn+"&teano="+record.jgh;
|
var url = "/stuzy/studentMain?rwbh="+record.rwbh+"&xqxn="+record.xqxn+"&teano="+record.jgh;
|
||||||
|
|
|
@ -22,8 +22,9 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" name="jiaoXueDanYuanNeiRongIndexDownload" setup>
|
<script lang="ts" name="jiaoXueDanYuanNeiRongIndexDownload" setup>
|
||||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'
|
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'
|
||||||
import {ref} from "vue";
|
import { ref } from "vue";
|
||||||
import {useMessage} from "/@/hooks/web/useMessage";
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const spinning = ref<boolean>(false);
|
const spinning = ref<boolean>(false);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -56,26 +57,40 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function openWindowWithLoading(url){
|
function openWindowWithLoading(url){
|
||||||
let xhr = new XMLHttpRequest();
|
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
xhr.open('GET',url,true);
|
let fileName = url.substring(url.lastIndexOf("/")+1);
|
||||||
xhr.send();
|
let uploadAxiosHttpConfig = {
|
||||||
xhr.responseType = "arraybuffer";
|
//超时时间,分钟 * 秒 * 毫秒 60分钟
|
||||||
xhr.onreadystatechange = event =>{
|
timeout: 60 * 60 * 1000,
|
||||||
if(xhr.readyState == 4){
|
//不自动拼接前缀
|
||||||
if(xhr.status == 200){
|
joinPrefix: false,
|
||||||
let fileName = url.substring(url.lastIndexOf("/")+1);
|
//自定义前缀
|
||||||
let blob = new Blob([xhr.response]);
|
apiUrl: '',
|
||||||
const downLoadLink = document.createElement('a');
|
//不自动处理
|
||||||
downLoadLink.download = fileName;
|
isTransformResponse: false
|
||||||
downLoadLink.href = URL.createObjectURL(blob);
|
|
||||||
downLoadLink.click();
|
|
||||||
}else if (xhr.status == 404){
|
|
||||||
createMessage.warning('没有找到可下载的资源!');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spinning.value = false;
|
|
||||||
}
|
}
|
||||||
|
ajaxDownloadFileFn(url, fileName, {}, () => { spinning.value = false; }, uploadAxiosHttpConfig);
|
||||||
|
|
||||||
|
// let xhr = new XMLHttpRequest();
|
||||||
|
// spinning.value = true;
|
||||||
|
// xhr.open('GET',url,true);
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<span v-show="one.showBtn">
|
<span v-show="one.showBtn">
|
||||||
<a-space>
|
<a-space>
|
||||||
<div v-show="one.fabu=='0'"><a-button type="primary" size="small" @click="handleFabu(one,'1')" class="addBtn" title="发布"><Icon icon="ant-design:check-outlined"/></a-button></div>
|
<div v-show="one.fabu=='0'||!one.fabu"><a-button type="primary" size="small" @click="handleFabu(one,'1')" class="addBtn" title="发布"><Icon icon="ant-design:check-outlined"/></a-button></div>
|
||||||
<div v-show="one.fabu=='1'"><a-button type="primary" size="small" @click="handleFabu(one,'0')" class="addBtn" title="取消发布"><Icon icon="ant-design:rollback-outlined"/></a-button></div>
|
<div v-show="one.fabu=='1'"><a-button type="primary" size="small" @click="handleFabu(one,'0')" class="addBtn" title="取消发布"><Icon icon="ant-design:rollback-outlined"/></a-button></div>
|
||||||
<div><a-button type="primary" size="small" @click="addTwo($event, one)" class="twoBtn addBtn" title="新增节次"><Icon icon="ant-design:plus-outlined"/></a-button></div>
|
<div><a-button type="primary" size="small" @click="addTwo($event, one)" class="twoBtn addBtn" title="新增节次"><Icon icon="ant-design:plus-outlined"/></a-button></div>
|
||||||
<div><a-button type="primary" size="small" danger @click="delOne($event, one)" class="addBtn" title="删除"><Icon icon="ant-design:delete"/></a-button></div>
|
<div><a-button type="primary" size="small" danger @click="delOne($event, one)" class="addBtn" title="删除"><Icon icon="ant-design:delete"/></a-button></div>
|
||||||
|
@ -166,6 +166,7 @@
|
||||||
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
|
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
|
||||||
import downloadAssembly from '/@/views/zy/jiaoXueDanYuanNeiRong/downloadAssembly.vue';
|
import downloadAssembly from '/@/views/zy/jiaoXueDanYuanNeiRong/downloadAssembly.vue';
|
||||||
import stuIndex from './stuIndex.vue';
|
import stuIndex from './stuIndex.vue';
|
||||||
|
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||||
|
|
||||||
const spinning = ref<boolean>(false);
|
const spinning = ref<boolean>(false);
|
||||||
//当前路由信息
|
//当前路由信息
|
||||||
|
@ -520,26 +521,40 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function openWindowWithLoading(url){
|
function openWindowWithLoading(url){
|
||||||
let xhr = new XMLHttpRequest();
|
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
xhr.open('GET',url,true);
|
let fileName = url.substring(url.lastIndexOf("/")+1);
|
||||||
xhr.send();
|
let uploadAxiosHttpConfig = {
|
||||||
xhr.responseType = "arraybuffer";
|
//超时时间,分钟 * 秒 * 毫秒 60分钟
|
||||||
xhr.onreadystatechange = event =>{
|
timeout: 60 * 60 * 1000,
|
||||||
if(xhr.readyState == 4){
|
//不自动拼接前缀
|
||||||
if(xhr.status == 200){
|
joinPrefix: false,
|
||||||
let fileName = url.substring(url.lastIndexOf("/")+1);
|
//自定义前缀
|
||||||
let blob = new Blob([xhr.response]);
|
apiUrl: '',
|
||||||
const downLoadLink = document.createElement('a');
|
//不自动处理
|
||||||
downLoadLink.download = fileName;
|
isTransformResponse: false
|
||||||
downLoadLink.href = URL.createObjectURL(blob);
|
|
||||||
downLoadLink.click();
|
|
||||||
}else if (xhr.status == 404){
|
|
||||||
createMessage.warning('没有找到可下载的资源!');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spinning.value = false;
|
|
||||||
}
|
}
|
||||||
|
ajaxDownloadFileFn(url, fileName, {}, () => { spinning.value = false; }, uploadAxiosHttpConfig);
|
||||||
|
|
||||||
|
// let xhr = new XMLHttpRequest();
|
||||||
|
// spinning.value = true;
|
||||||
|
// xhr.open('GET',url,true);
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
//移动结束时触发,如果未移动则不触发,刷新排序,
|
//移动结束时触发,如果未移动则不触发,刷新排序,
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
const globSetting = useGlobSetting();
|
const globSetting = useGlobSetting();
|
||||||
const baseApiUrl = globSetting.domainUrl;
|
const baseApiUrl = globSetting.domainUrl;
|
||||||
|
|
||||||
const queryParam = ref<any>({xqxn,teacherNo:userStore.getUserInfo.username});
|
const queryParam = ref<any>({xqxn,rwbh,teacherNo:userStore.getUserInfo.username});
|
||||||
const mainId = ref<string>('');
|
const mainId = ref<string>('');
|
||||||
|
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" name="zyk-zykInfo" setup>
|
<script lang="ts" name="zyk-zykInfo" setup>
|
||||||
import {ref, reactive, onMounted} from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
@ -96,8 +96,10 @@ import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZykI
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
import ZykInfoModal from './components/ZykInfoModal.vue'
|
import ZykInfoModal from './components/ZykInfoModal.vue'
|
||||||
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
|
import { getUserSf,getSysConfig } from '/@/views/site/utils/index';
|
||||||
import {baseApiUrl, getFileAccessHttpUrl} from "/@/utils/common/compUtils";
|
import { baseApiUrl, getFileAccessHttpUrl } from "/@/utils/common/compUtils";
|
||||||
import {useMessage} from "/@/hooks/web/useMessage";
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||||
|
|
||||||
const spinning = ref<boolean>(false);
|
const spinning = ref<boolean>(false);
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
@ -174,30 +176,43 @@ function downloadFile(url){
|
||||||
}
|
}
|
||||||
|
|
||||||
function openWindowWithLoading(url){
|
function openWindowWithLoading(url){
|
||||||
let xhr = new XMLHttpRequest();
|
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
xhr.open('GET',url,true);
|
let fileName = url.substring(url.lastIndexOf("/")+1);
|
||||||
// xhr.onprogress = function (e){
|
let uploadAxiosHttpConfig = {
|
||||||
// let percent = Math.floor(e.loaded / e.total * 100);//百分比加载
|
//超时时间,分钟 * 秒 * 毫秒 60分钟
|
||||||
// console.log(percent);
|
timeout: 60 * 60 * 1000,
|
||||||
// }
|
//不自动拼接前缀
|
||||||
xhr.send();
|
joinPrefix: false,
|
||||||
xhr.responseType = "arraybuffer";
|
//自定义前缀
|
||||||
xhr.onreadystatechange = event =>{
|
apiUrl: '',
|
||||||
if(xhr.readyState == 4){
|
//不自动处理
|
||||||
if(xhr.status == 200){
|
isTransformResponse: false
|
||||||
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;
|
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(){
|
function changeXqxnDic(){
|
||||||
|
|
Loading…
Reference in New Issue