学生作业增加预览

This commit is contained in:
曹磊 2024-05-24 20:43:23 +08:00
parent 13115de7d6
commit 5a8a4a171c
8 changed files with 121 additions and 78 deletions

View File

@ -1,5 +1,5 @@
<template>
<div style="background: #fff;height: calc(100vh - 255px);overflow-y: auto;overflow-x: hidden;padding: 10px 0;">
<div style="background: #fff;height: calc(100vh - 255px);overflow-y: auto;overflow-x: hidden;margin: 10px 0;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -32,7 +32,7 @@
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 280px;">
<a-card style="height: 256px;border: 1px solid rgb(28, 132, 198);">
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish =='0'? '待发布':'已发布'}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
@ -60,10 +60,10 @@
<a-col :span="12" class="zyCon"><div style="float:right;" @click="handleDjjgs(item,'1')" v-if="item.ywcrs>0"><a>已提交{{item.ywcrs}}</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" >详情</a-button>
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">配置</a-button>
<a-button type="primary" @click="handleDjjgs(item,'')" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>
<a-col :span="24" style="text-align:center;margin-top:10px;">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;padding: 0px 4px;background:rgb(28, 132, 198);" >详情</a-button>
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">配置</a-button>
<a-button type="primary" @click="handleDjjgs(item,'')" style="margin-left:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>
</a-col>
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->

View File

@ -1,5 +1,5 @@
<template>
<div style="background: #fff;height: calc(100vh - 255px);overflow-y: auto;overflow-x: hidden;padding: 10px 0;">
<div style="background: #fff;height: calc(100vh - 255px);overflow-y: auto;overflow-x: hidden;margin: 10px 0;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -36,7 +36,7 @@
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 280px;">
<a-card style="height: 256px;border: 1px solid rgb(28, 132, 198);">
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish_dictText}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
@ -44,12 +44,7 @@
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="6" class="zyCon">时间
</a-col>
<a-col :span="16" class="zyCon">
<a-col :span="24" class="zyCon">{{item.startTime}}</a-col>
<a-col :span="24" class="zyCon">{{item.endTime}}</a-col>
</a-col>
<a-col :span="24" class="zyCon">时间{{dayjs(item.startTime).format('YYYY.MM.DD')}} - {{dayjs(item.endTime).format('YYYY.MM.DD')}}</a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
@ -64,14 +59,14 @@
<a-col :span="12" class="zyCon"><div style="float:right;" @click="handleDjjgs(item,'1')" v-if="item.ywcrs>0"><a>已提交{{item.ywcrs}}</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">设置试卷</a-button>
<a-button type="primary" @click="handlePeizhi(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">编辑题目</a-button>
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">发布试卷</a-button>
<a-button type="primary" @click="handleDelete(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">删除试卷</a-button>
<a-button type="primary" @click="handleDetail(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="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">编辑题目</a-button>
<a-button type="primary" @click="handleDjjgs(item,'')" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">测验结果</a-button>
<a-col :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="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="handleDetail(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">试卷详情</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">编辑题目</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">测验结果</a-button>
</a-col>
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
<!-- <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">答卷</a-button>-->
@ -113,6 +108,7 @@
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import {useMessage} from "/@/hooks/web/useMessage";
import TikuListModal from '/@/views/kc/wjxWjxxTmlb/TikuListModal.vue';
import dayjs from 'dayjs';
//
const { currentRoute } = useRouter();
@ -229,8 +225,17 @@
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => {
handleSuccess();
createConfirm({
iconType: 'warning',
title: '发布测验',
content: '是否发布此测验?',
okText: '确认',
cancelText: '取消',
onOk: () => {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "6" } }).then(res => {
handleSuccess();
});
}
});
}
/**

View File

@ -32,7 +32,7 @@
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 280px;">
<a-card style="height: 256px;border: 1px solid rgb(28, 132, 198);">
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish =='0'? '待发布':'已发布'}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
@ -60,10 +60,10 @@
<a-col :span="12" class="zyCon"><div style="float:right;" @click="handleDjjgs(item,'1')" v-if="item.ywcrs>0"><a>已提交{{item.ywcrs}}</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" >详情</a-button>
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">配置</a-button>
<a-button type="primary" @click="handleDjjgs(item,'')" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>
<a-col :span="24" style="text-align:center;margin-top:10px;">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;padding: 0px 4px;background:rgb(28, 132, 198);" >详情</a-button>
<a-button type="primary" @click="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">配置</a-button>
<a-button type="primary" @click="handleDjjgs(item,'')" style="margin-left:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>
</a-col>
</a-row>
</a-card>

View File

@ -35,7 +35,7 @@
<a-row>
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 280px;">
<a-card style="height: 256px;border: 1px solid rgb(28, 132, 198);">
<div class="rotate" :style="classFun(item.qpublish)">{{item.qpublish_dictText}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;">
@ -43,12 +43,7 @@
</a-col>
<a-col :span="24" class="zyCon">
<a-row>
<a-col :span="6" class="zyCon">时间
</a-col>
<a-col :span="16" class="zyCon">
<a-col :span="24" class="zyCon">{{item.startTime}}</a-col>
<a-col :span="24" class="zyCon">{{item.endTime}}</a-col>
</a-col>
<a-col :span="24" class="zyCon">时间{{dayjs(item.startTime).format('YYYY.MM.DD')}} - {{dayjs(item.endTime).format('YYYY.MM.DD')}}</a-col>
</a-row>
</a-col>
<a-col :span="24" class="zyCon">
@ -63,13 +58,13 @@
<a-col :span="12" class="zyCon"><div style="float:right;" @click="handleDjjgs(item,'1')" v-if="item.ywcrs>0"><a>已提交{{item.ywcrs}}</a></div></a-col>
</a-row>
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">编辑问卷</a-button>
<a-button type="primary" @click="handlePeizhi(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">问卷设置</a-button>
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">发布问卷</a-button>
<a-button type="primary" @click="handleDelete(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==0">删除问卷</a-button>
<a-button type="primary" @click="handleDetail(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="handlePeizhiXq(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">问卷设置</a-button>
<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="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="handleDetail(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">问卷详情</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">问卷设置</a-button>
<!-- <a-button type="primary" @click="handleDjjgs(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.qpublish==1">结果</a-button>-->
</a-col>
<!-- <a-col :span="24" style="text-align:center;margin-top:20px;">-->
@ -115,6 +110,8 @@
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import {useMessage} from "/@/hooks/web/useMessage";
import TikuListModal from '/@/views/kc/wjxWjxxTmlb/TikuListModal.vue';
import dayjs from 'dayjs';
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
@ -228,8 +225,20 @@
* 发布
*/
function handleFabu(record: Recordable) {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/fbwj', params: { id: record.id,wjlx: "1" } }).then(res => {
handleSuccess();
createConfirm({
iconType: 'warning',
title: '发布问卷',
content: '是否发布此问卷?',
okText: '确认',
cancelText: '取消',
onOk: () => {
defHttp.get({
url: '/wjxWjxx/wjxWjxx/fbwj',
params: {id: record.id, wjlx: "1"}
}).then(res => {
handleSuccess();
});
}
});
}
/**

View File

@ -51,7 +51,8 @@
</a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;background:rgb(28, 132, 198);">详情</a-button>
<a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="!item.stuFilePath" >上传</a-button>
<a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="!item.stuFilePath">上传</a-button>
<a-button type="primary" @click="handlePreview(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.stuFilePath">预览</a-button>
</a-col>
</a-row>
</a-card>
@ -87,8 +88,6 @@
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
@ -146,8 +145,6 @@
//
function handleShangchuan(record){
let timestamp = new Date().getTime();
let startTimestamp = Date.parse(record.startTime);
if(timestamp<startTimestamp){
@ -161,18 +158,25 @@
}
createConfirm({
iconType: 'warning',
title: '确认上传',
content: '是否确认上传作业',
okText: '确认',
cancelText: '取消',
onOk: () => {
ZyInfoStudentModalPage.value.disableSubmit = false;
var param = {id:record.stuId,zyfj:record.filePath}
ZyInfoStudentModalPage.value.edit(param);
}
});
iconType: 'warning',
title: '确认上传',
content: '是否确认上传作业',
okText: '确认',
cancelText: '取消',
onOk: () => {
ZyInfoStudentModalPage.value.disableSubmit = false;
var param = {id:record.stuId,zyfj:record.filePath}
ZyInfoStudentModalPage.value.edit(param);
}
});
}
//
function handlePreview(record){
console.log(record);
record.isYl = true;
ZyInfoStudentModalPage.value.disableSubmit = true;
ZyInfoStudentModalPage.value.edit(record);
}
//

View File

@ -39,7 +39,7 @@
<a-row style="overflow:hidden;">
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px;overflow:hidden;">
<div style="width: 100%; height: 20px; background-color: rgb(28, 132, 198);"></div>
<a-card style="height: 290px;border: 1px solid rgb(28, 132, 198);">
<a-card style="height: 256px;border: 1px solid rgb(28, 132, 198);">
<div class="rotate" :style="classFun(item.zyStatus)">{{item.zyStatus_dictText}}</div>
<a-row style="top: -48px;position: relative;">
<a-col :span="24" style="margin-bottom: 10px;height:53px;overflow:hidden;" :title="item.title">
@ -50,12 +50,12 @@
<a-col :span="24" class="zyCon"><div style="float:left">未提交{{item.wtjnum}};</div><div style="float:right;" >已提交{{item.ytjnum}}</div></a-col>
<a-col :span="24" class="zyCon"><div style="float:left">未评阅{{item.wpynum}};</div><div style="float:right;" >已评阅{{item.ypynum}}</div></a-col>
<a-col :span="24" style="text-align:center;margin-top:20px;">
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">编辑作业</a-button>
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">发布作业</a-button>
<a-button type="primary" @click="handleDelete(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==0">删除作业</a-button>
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">作业详情</a-button>
<a-button type="primary" @click="handleZyxx(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">查看作业</a-button>
<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.zyStatus==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.zyStatus==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.zyStatus==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.zyStatus==1||item.zyStatus==2||item.zyStatus==3">作业详情</a-button>
<a-button type="primary" @click="handleZyxx(item)" style="margin-left:5px;margin-bottom:5px;padding: 0px 4px;background:rgb(28, 132, 198);" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">查看作业</a-button>
<!-- <a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;background:rgb(28, 132, 198);" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">上传</a-button> -->
</a-col>
</a-row>

View File

@ -5,11 +5,21 @@
<!-- <a-col :span="24" style="text-align:center;margin-top:30px;">
<span style="color:red;font-weight:bold;">作业上传后不可修改请仔细检查后提交</span>
</a-col> -->
<a-col :span="24" style="margin-top:30px;">
<a-col :span="24" style="margin-top:30px;" v-if="!isYl">
<a-form-item label="上传作业" v-bind="validateInfos.filePath">
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true" ></j-upload>
</a-form-item>
</a-col>
<a-col :span="24" style="margin-top:30px;" v-if="isYl">
<span style="width:300px;float: left;">
<span style="float:left;">
<j-upload v-model:value="formData.stuFilePath" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true"></j-upload>
</span>
</span>
<span style="float: right;">
<a-button type="primary" style="margin-left:10px;" @click="openPdf(formData)">预览</a-button>
</span>
</a-col>
</a-row>
</a-form>
</a-spin>
@ -23,8 +33,12 @@
import { getValueType } from '/@/utils';
import { saveOrUpdate,zyscStu } from '../ZyInfoStudent.api';
import { Form } from 'ant-design-vue';
import {getFileAccessHttpUrl} from "/@/utils/common/compUtils";
import {useGlobSetting} from "/@/hooks/setting";
const { createConfirm } = useMessage();
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const { createConfirm } = useMessage();
const props = defineProps({
formDisabled: { type: Boolean, default: false },
@ -32,6 +46,7 @@ const { createConfirm } = useMessage();
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const isYl = ref<boolean>(false);
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
@ -72,10 +87,12 @@ const { createConfirm } = useMessage();
* 编辑
*/
function edit(record) {
console.log(record);
nextTick(() => {
resetFields();
//
Object.assign(formData, record);
isYl.value = record.isYl;
});
}
@ -124,9 +141,17 @@ const { createConfirm } = useMessage();
});
}
});
}
function openPdf(record){
if(record.stuPdfPath){
var url2 = getFileAccessHttpUrl(record.pdfPath)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}else{
createMessage.warning("暂无文件或文件上传中")
}
}
defineExpose({
add,

View File

@ -31,7 +31,7 @@
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
title.value = disableSubmit.value ? '预览' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);