修改路由
This commit is contained in:
parent
426450f48f
commit
bfe20c4cb7
|
@ -24,16 +24,6 @@
|
||||||
let router = useRouter();
|
let router = useRouter();
|
||||||
|
|
||||||
|
|
||||||
function getGzt(type){
|
|
||||||
console.log(`🚀 ~ getGzt ~ type:`, type)
|
|
||||||
// var href = "/site/dqkcDetail";
|
|
||||||
var href = "/site/dqkcDqzy";
|
|
||||||
if(type=='dqzy'){
|
|
||||||
href = "/site/dqkcDqzy";
|
|
||||||
}
|
|
||||||
router.push(href);
|
|
||||||
}
|
|
||||||
|
|
||||||
//进入就加载
|
//进入就加载
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log('rwbh:',rwbh);
|
console.log('rwbh:',rwbh);
|
||||||
|
|
|
@ -39,16 +39,6 @@
|
||||||
let router = useRouter();
|
let router = useRouter();
|
||||||
|
|
||||||
|
|
||||||
function getGzt(type){
|
|
||||||
console.log(`🚀 ~ getGzt ~ type:`, type)
|
|
||||||
// var href = "/site/dqkcDetail";
|
|
||||||
var href = "/site/dqkcDqzy";
|
|
||||||
if(type=='dqzy'){
|
|
||||||
href = "/site/dqkcDqzy";
|
|
||||||
}
|
|
||||||
router.push(href);
|
|
||||||
}
|
|
||||||
|
|
||||||
//进入就加载
|
//进入就加载
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log('rwbh:',rwbh);
|
console.log('rwbh:',rwbh);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-menu
|
<a-menu
|
||||||
v-model:selectedKeys="selectedKeys"
|
v-model:selectedKeys="selectedKeys"
|
||||||
style="width: 200px;min-height: calc(100vh - 150px);"
|
style="width: 98%;min-height: calc(100vh - 130px);margin: 10px 0;"
|
||||||
mode="inline"
|
mode="inline"
|
||||||
>
|
>
|
||||||
<a-sub-menu key="sub1">
|
<a-sub-menu key="sub1">
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
if(type=='dqzy'){
|
if(type=='dqzy'){
|
||||||
href = "/zy/dqkcDqzy";
|
href = "/zy/dqkcDqzy";
|
||||||
}
|
}
|
||||||
router.push(href);
|
router.push({path:href,query: {rwbh}});
|
||||||
}
|
}
|
||||||
|
|
||||||
//进入就加载
|
//进入就加载
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
<a-button type="primary" @click="handleNeiwang">上传并查重</a-button>
|
<a-button type="primary" @click="handleNeiwang">上传并查重</a-button>
|
||||||
<a-button type="primary" @click="handleNwcxjcjg" style="margin-left: 8px;">查询检测结果</a-button>
|
<a-button type="primary" @click="handleNwcxjcjg" style="margin-left: 8px;">查询检测结果</a-button>
|
||||||
|
|
||||||
<!-- <a-button type="primary" @click="handleNeiwang" style="margin-left: 8px;">内网保存</a-button>
|
|
||||||
<a-button type="primary" @click="handleNwtj" style="margin-left: 8px;">内网提交</a-button>
|
|
||||||
<a-button type="primary" @click="handleNwcxjcjg" style="margin-left: 8px;">内网查询检测结果</a-button> -->
|
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="检测文章" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
<a-form-item label="检测文章" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||||
|
@ -71,9 +68,6 @@
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-button type="primary" @click="handleAigc">上传并查重</a-button>
|
<a-button type="primary" @click="handleAigc">上传并查重</a-button>
|
||||||
<a-button type="primary" @click="handleAigccxjcjg" style="margin-left: 8px;">查询检测结果</a-button>
|
<a-button type="primary" @click="handleAigccxjcjg" style="margin-left: 8px;">查询检测结果</a-button>
|
||||||
<!-- <a-button type="primary" @click="handleAigc" style="margin-left: 8px;">aigc保存</a-button>
|
|
||||||
<a-button type="primary" @click="handleAigcTj" style="margin-left: 8px;">aigc提交</a-button>
|
|
||||||
<a-button type="primary" @click="handleAigccxjcjg" style="margin-left: 8px;">AIGC查询检测结果</a-button> -->
|
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="检测文章" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
<a-form-item label="检测文章" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||||
|
@ -99,16 +93,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-button type="primary" @click="handleImagePic">上传并检测</a-button>
|
<a-button type="primary" @click="handleImagePic">上传并检测</a-button>
|
||||||
<!-- <a-button type="primary" @click="handleAigccxjcjg" style="margin-left: 8px;">查询检测结果</a-button> -->
|
|
||||||
<!-- <a-button type="primary" @click="handleAigc" style="margin-left: 8px;">aigc保存</a-button>
|
|
||||||
<a-button type="primary" @click="handleAigcTj" style="margin-left: 8px;">aigc提交</a-button>
|
|
||||||
<a-button type="primary" @click="handleAigccxjcjg" style="margin-left: 8px;">AIGC查询检测结果</a-button> -->
|
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24">
|
|
||||||
<a-form-item label="检测文章" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
|
||||||
<a-input v-model:value="formData.aigcpaperid" style="width:200px;"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="返回结果" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
<a-form-item label="返回结果" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||||
<div v-html="formData.facecontent"></div>
|
<div v-html="formData.facecontent"></div>
|
||||||
|
@ -138,20 +123,6 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24">
|
|
||||||
<a-card title="外网检测">
|
|
||||||
<a-button type="primary" @click="handleNeiwang" style="margin-left: 8px;">内网保存</a-button>
|
|
||||||
<a-button type="primary" @click="handleNwtj" style="margin-left: 8px;">内网提交</a-button>
|
|
||||||
<a-button type="primary" @click="handleNwcxjcjg" style="margin-left: 8px;">内网查询检测结果</a-button>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24">
|
|
||||||
<a-card title="AIGC 检测">
|
|
||||||
<a-button type="primary" @click="handleAigc" style="margin-left: 8px;">aigc保存</a-button>
|
|
||||||
<a-button type="primary" @click="handleAigcTj" style="margin-left: 8px;">aigc提交</a-button>
|
|
||||||
<a-button type="primary" @click="handleAigccxjcjg" style="margin-left: 8px;">AIGC查询检测结果</a-button>
|
|
||||||
</a-card>
|
|
||||||
</a-col> -->
|
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
@ -192,7 +163,6 @@
|
||||||
confirmLoading.value = true;
|
confirmLoading.value = true;
|
||||||
console.log('sub--->',formData);
|
console.log('sub--->',formData);
|
||||||
defHttp.post({ url: '/blZycc/blZycc/zyccUpload', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/zyccUpload', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
formData.paperid = res.paperid;
|
formData.paperid = res.paperid;
|
||||||
formData.content = res.message;
|
formData.content = res.message;
|
||||||
confirmLoading.value = false;
|
confirmLoading.value = false;
|
||||||
|
@ -201,14 +171,12 @@
|
||||||
//外网提交
|
//外网提交
|
||||||
function handleWwtj(){
|
function handleWwtj(){
|
||||||
defHttp.post({ url: '/blZycc/blZycc/wwKsjc', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/wwKsjc', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//外网查询检测结果
|
//外网查询检测结果
|
||||||
function handleWwcxjcjg(){
|
function handleWwcxjcjg(){
|
||||||
confirmLoading.value = true;
|
confirmLoading.value = true;
|
||||||
defHttp.post({ url: '/blZycc/blZycc/wwCxjcjg', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/wwCxjcjg', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
var resHtml = "";
|
var resHtml = "";
|
||||||
if(res.filestateid=='0'){
|
if(res.filestateid=='0'){
|
||||||
resHtml = resHtml+"检测状态:未检测<br/>";
|
resHtml = resHtml+"检测状态:未检测<br/>";
|
||||||
|
@ -244,7 +212,6 @@
|
||||||
function handleNeiwang() {
|
function handleNeiwang() {
|
||||||
confirmLoading.value = true;
|
confirmLoading.value = true;
|
||||||
defHttp.post({ url: '/blZycc/blZycc/xfwbdUpload', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/xfwbdUpload', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
formData.xnpaperid = res.paperid;
|
formData.xnpaperid = res.paperid;
|
||||||
formData.xncontent = res.message;
|
formData.xncontent = res.message;
|
||||||
confirmLoading.value = false;
|
confirmLoading.value = false;
|
||||||
|
@ -253,14 +220,12 @@
|
||||||
//内网提交
|
//内网提交
|
||||||
function handleNwtj(){
|
function handleNwtj(){
|
||||||
defHttp.post({ url: '/blZycc/blZycc/xfwbdKsjc', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/xfwbdKsjc', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//内网查询检测结果
|
//内网查询检测结果
|
||||||
function handleNwcxjcjg(){
|
function handleNwcxjcjg(){
|
||||||
confirmLoading.value = true;
|
confirmLoading.value = true;
|
||||||
defHttp.post({ url: '/blZycc/blZycc/xfwbdCxjcjg', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/xfwbdCxjcjg', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
var resHtml = "";
|
var resHtml = "";
|
||||||
if(res.filestateid=='0'){
|
if(res.filestateid=='0'){
|
||||||
resHtml = resHtml+"检测状态:未检测<br/>";
|
resHtml = resHtml+"检测状态:未检测<br/>";
|
||||||
|
@ -297,7 +262,6 @@
|
||||||
function handleAigc() {
|
function handleAigc() {
|
||||||
confirmLoading.value = true;
|
confirmLoading.value = true;
|
||||||
defHttp.post({ url: '/blZycc/blZycc/aigcUpload', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/aigcUpload', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
formData.aigcpaperid = res.paperid;
|
formData.aigcpaperid = res.paperid;
|
||||||
formData.aigccontent = res.message;
|
formData.aigccontent = res.message;
|
||||||
confirmLoading.value = false;
|
confirmLoading.value = false;
|
||||||
|
@ -306,14 +270,12 @@
|
||||||
//AIGC提交检测
|
//AIGC提交检测
|
||||||
function handleAigcTj(){
|
function handleAigcTj(){
|
||||||
defHttp.post({ url: '/blZycc/blZycc/aigcKsjc', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/aigcKsjc', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//AIGC检测结果查询
|
//AIGC检测结果查询
|
||||||
function handleAigccxjcjg(){
|
function handleAigccxjcjg(){
|
||||||
confirmLoading.value = true;
|
confirmLoading.value = true;
|
||||||
defHttp.post({ url: '/blZycc/blZycc/aigcCxjcjg', params: formData, }).then((res) => {
|
defHttp.post({ url: '/blZycc/blZycc/aigcCxjcjg', params: formData, }).then((res) => {
|
||||||
console.log(`🚀 ~ saveOrUpdate ~ res:`, res)
|
|
||||||
var resHtml = "";
|
var resHtml = "";
|
||||||
if(res.filestateid=='0'){
|
if(res.filestateid=='0'){
|
||||||
resHtml = resHtml+"检测状态:未检测<br/>";
|
resHtml = resHtml+"检测状态:未检测<br/>";
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
|
||||||
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
list = '/zyCcjg/zyCcjg/list',
|
||||||
|
save='/zyCcjg/zyCcjg/add',
|
||||||
|
edit='/zyCcjg/zyCcjg/edit',
|
||||||
|
deleteOne = '/zyCcjg/zyCcjg/delete',
|
||||||
|
deleteBatch = '/zyCcjg/zyCcjg/deleteBatch',
|
||||||
|
importExcel = '/zyCcjg/zyCcjg/importExcel',
|
||||||
|
exportXls = '/zyCcjg/zyCcjg/exportXls',
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出api
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const getExportUrl = Api.exportXls;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入api
|
||||||
|
*/
|
||||||
|
export const getImportUrl = Api.importExcel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表接口
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除单个
|
||||||
|
* @param params
|
||||||
|
* @param handleSuccess
|
||||||
|
*/
|
||||||
|
export const deleteOne = (params,handleSuccess) => {
|
||||||
|
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param params
|
||||||
|
* @param handleSuccess
|
||||||
|
*/
|
||||||
|
export const batchDelete = (params, handleSuccess) => {
|
||||||
|
createConfirm({
|
||||||
|
iconType: 'warning',
|
||||||
|
title: '确认删除',
|
||||||
|
content: '是否删除选中数据',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
|
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存或者更新
|
||||||
|
* @param params
|
||||||
|
* @param isUpdate
|
||||||
|
*/
|
||||||
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
|
let url = isUpdate ? Api.edit : Api.save;
|
||||||
|
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
|
}
|
|
@ -0,0 +1,187 @@
|
||||||
|
import {BasicColumn} from '/@/components/Table';
|
||||||
|
import {FormSchema} from '/@/components/Table';
|
||||||
|
import { rules} from '/@/utils/helper/validator';
|
||||||
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
//列表数据
|
||||||
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '学生作业',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'zyStuId'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报告编号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'paperguid'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '文件名',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'papertitle'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '检测状态(1:检测中,2:检测完成,3:检测失败,0:未检测)',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'filestateid'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '检测进度',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'detectprogress'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '相似率',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'percentage'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '引用率',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'quotepercentage'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '复写率',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'duplicatepercentage'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '自写率',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'ownpercentage'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '文档检测完成时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'checkdate'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '论文字数',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'paperword'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '在线报告查看地址',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'paperviewurl'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报告下载地址',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'paperdownurl'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '他引率',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'otherquoterate'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '自引率',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'selfquoterate'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '专业术语率',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'proWordRate'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '查重类型(0外网 1内网 2aigc)',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'ccType'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
//查询数据
|
||||||
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
];
|
||||||
|
|
||||||
|
//表单数据
|
||||||
|
export const formSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
label: '报告编号',
|
||||||
|
field: 'paperguid',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '文件名',
|
||||||
|
field: 'papertitle',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '检测状态(1:检测中,2:检测完成,3:检测失败,0:未检测)',
|
||||||
|
field: 'filestateid',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '检测进度',
|
||||||
|
field: 'detectprogress',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '相似率',
|
||||||
|
field: 'percentage',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '引用率',
|
||||||
|
field: 'quotepercentage',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '复写率',
|
||||||
|
field: 'duplicatepercentage',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '自写率',
|
||||||
|
field: 'ownpercentage',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '文档检测完成时间',
|
||||||
|
field: 'checkdate',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '论文字数',
|
||||||
|
field: 'paperword',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '在线报告查看地址',
|
||||||
|
field: 'paperviewurl',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '报告下载地址',
|
||||||
|
field: 'paperdownurl',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '他引率',
|
||||||
|
field: 'otherquoterate',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '自引率',
|
||||||
|
field: 'selfquoterate',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '专业术语率',
|
||||||
|
field: 'proWordRate',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '查重类型(0外网 1内网 2aigc)',
|
||||||
|
field: 'ccType',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
// TODO 主键隐藏字段,目前写死为ID
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
field: 'id',
|
||||||
|
component: 'Input',
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
];
|
|
@ -0,0 +1,215 @@
|
||||||
|
<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-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
|
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
|
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||||
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu>
|
||||||
|
<a-menu-item key="1" @click="batchHandleDelete">
|
||||||
|
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||||
|
删除
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
<a-button>批量操作
|
||||||
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
|
</a-button>
|
||||||
|
</a-dropdown>
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(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>
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<ZyCcjgModal ref="registerModal" @success="handleSuccess"></ZyCcjgModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="zyCcjg-zyCcjg" setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
import { columns } from './ZyCcjg.data';
|
||||||
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyCcjg.api';
|
||||||
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
|
import ZyCcjgModal from './components/ZyCcjgModal.vue'
|
||||||
|
|
||||||
|
const queryParam = ref<any>({});
|
||||||
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
|
const registerModal = ref();
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
|
tableProps: {
|
||||||
|
title: '查重结果',
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
canResize:false,
|
||||||
|
useSearchForm: false,
|
||||||
|
actionColumn: {
|
||||||
|
width: 120,
|
||||||
|
fixed: 'right',
|
||||||
|
},
|
||||||
|
beforeFetch: (params) => {
|
||||||
|
params.column = '',params.order = '';//新生成的默认不带排序
|
||||||
|
return Object.assign(params, queryParam.value);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exportConfig: {
|
||||||
|
name: "查重结果",
|
||||||
|
url: getExportUrl,
|
||||||
|
},
|
||||||
|
importConfig: {
|
||||||
|
url: getImportUrl,
|
||||||
|
success: handleSuccess
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||||
|
const labelCol = reactive({
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 7 },
|
||||||
|
});
|
||||||
|
const wrapperCol = reactive({
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 },
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增事件
|
||||||
|
*/
|
||||||
|
function handleAdd() {
|
||||||
|
registerModal.value.disableSubmit = false;
|
||||||
|
registerModal.value.add();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑事件
|
||||||
|
*/
|
||||||
|
function handleEdit(record: Recordable) {
|
||||||
|
registerModal.value.disableSubmit = false;
|
||||||
|
registerModal.value.edit(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
function handleDetail(record: Recordable) {
|
||||||
|
registerModal.value.disableSubmit = true;
|
||||||
|
registerModal.value.edit(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除事件
|
||||||
|
*/
|
||||||
|
async function handleDelete(record) {
|
||||||
|
await deleteOne({ id: record.id }, handleSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除事件
|
||||||
|
*/
|
||||||
|
async function batchHandleDelete() {
|
||||||
|
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功回调
|
||||||
|
*/
|
||||||
|
function handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作栏
|
||||||
|
*/
|
||||||
|
function getTableAction(record) {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
onClick: handleEdit.bind(null, record),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下拉操作栏
|
||||||
|
*/
|
||||||
|
function getDropDownAction(record) {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '详情',
|
||||||
|
onClick: handleDetail.bind(null, record),
|
||||||
|
}, {
|
||||||
|
label: '删除',
|
||||||
|
popConfirm: {
|
||||||
|
title: '是否确认删除',
|
||||||
|
confirm: handleDelete.bind(null, record),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
function searchQuery() {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function searchReset() {
|
||||||
|
queryParam.value = {};
|
||||||
|
selectedRowKeys.value = [];
|
||||||
|
//刷新数据
|
||||||
|
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,235 @@
|
||||||
|
<template>
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="报告编号" v-bind="validateInfos.paperguid">
|
||||||
|
<a-input v-model:value="formData.paperguid" placeholder="请输入报告编号" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="文件名
|
||||||
|
" v-bind="validateInfos.papertitle">
|
||||||
|
<a-input v-model:value="formData.papertitle" placeholder="请输入文件名
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="检测状态(1:检测中,2:检测完成,3:检测失败,0:未检测)
|
||||||
|
" v-bind="validateInfos.filestateid">
|
||||||
|
<a-input v-model:value="formData.filestateid" placeholder="请输入检测状态(1:检测中,2:检测完成,3:检测失败,0:未检测)
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="检测进度" v-bind="validateInfos.detectprogress">
|
||||||
|
<a-input v-model:value="formData.detectprogress" placeholder="请输入检测进度" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="相似率
|
||||||
|
" v-bind="validateInfos.percentage">
|
||||||
|
<a-input v-model:value="formData.percentage" placeholder="请输入相似率
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="引用率" v-bind="validateInfos.quotepercentage">
|
||||||
|
<a-input v-model:value="formData.quotepercentage" placeholder="请输入引用率" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="复写率" v-bind="validateInfos.duplicatepercentage">
|
||||||
|
<a-input v-model:value="formData.duplicatepercentage" placeholder="请输入复写率" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="自写率" v-bind="validateInfos.ownpercentage">
|
||||||
|
<a-input v-model:value="formData.ownpercentage" placeholder="请输入自写率" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="文档检测完成时间
|
||||||
|
" v-bind="validateInfos.checkdate">
|
||||||
|
<a-input v-model:value="formData.checkdate" placeholder="请输入文档检测完成时间
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="论文字数
|
||||||
|
" v-bind="validateInfos.paperword">
|
||||||
|
<a-input v-model:value="formData.paperword" placeholder="请输入论文字数
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="在线报告查看地址" v-bind="validateInfos.paperviewurl">
|
||||||
|
<a-input v-model:value="formData.paperviewurl" placeholder="请输入在线报告查看地址" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="报告下载地址
|
||||||
|
" v-bind="validateInfos.paperdownurl">
|
||||||
|
<a-input v-model:value="formData.paperdownurl" placeholder="请输入报告下载地址
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="他引率
|
||||||
|
" v-bind="validateInfos.otherquoterate">
|
||||||
|
<a-input v-model:value="formData.otherquoterate" placeholder="请输入他引率
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="自引率
|
||||||
|
" v-bind="validateInfos.selfquoterate">
|
||||||
|
<a-input v-model:value="formData.selfquoterate" placeholder="请输入自引率
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="专业术语率
|
||||||
|
" v-bind="validateInfos.proWordRate">
|
||||||
|
<a-input v-model:value="formData.proWordRate" placeholder="请输入专业术语率
|
||||||
|
" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="查重类型(0外网 1内网 2aigc)" v-bind="validateInfos.ccType">
|
||||||
|
<a-input v-model:value="formData.ccType" placeholder="请输入查重类型(0外网 1内网 2aigc)" :disabled="disabled"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import { getValueType } from '/@/utils';
|
||||||
|
import { saveOrUpdate } from '../ZyCcjg.api';
|
||||||
|
import { Form } from 'ant-design-vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
formDisabled: { type: Boolean, default: false },
|
||||||
|
formData: { type: Object, default: ()=>{} },
|
||||||
|
formBpm: { type: Boolean, default: true }
|
||||||
|
});
|
||||||
|
const formRef = ref();
|
||||||
|
const useForm = Form.useForm;
|
||||||
|
const emit = defineEmits(['register', 'ok']);
|
||||||
|
const formData = reactive<Record<string, any>>({
|
||||||
|
id: '',
|
||||||
|
paperguid: '',
|
||||||
|
papertitle: '',
|
||||||
|
filestateid: '',
|
||||||
|
detectprogress: '',
|
||||||
|
percentage: '',
|
||||||
|
quotepercentage: '',
|
||||||
|
duplicatepercentage: '',
|
||||||
|
ownpercentage: '',
|
||||||
|
checkdate: '',
|
||||||
|
paperword: '',
|
||||||
|
paperviewurl: '',
|
||||||
|
paperdownurl: '',
|
||||||
|
otherquoterate: '',
|
||||||
|
selfquoterate: '',
|
||||||
|
proWordRate: '',
|
||||||
|
ccType: '',
|
||||||
|
});
|
||||||
|
const { createMessage } = useMessage();
|
||||||
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||||
|
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
|
const confirmLoading = ref<boolean>(false);
|
||||||
|
//表单验证
|
||||||
|
const validatorRules = {
|
||||||
|
};
|
||||||
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||||
|
|
||||||
|
// 表单禁用
|
||||||
|
const disabled = computed(()=>{
|
||||||
|
if(props.formBpm === true){
|
||||||
|
if(props.formData.disabled === false){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return props.formDisabled;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
function add() {
|
||||||
|
edit({});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*/
|
||||||
|
function edit(record) {
|
||||||
|
nextTick(() => {
|
||||||
|
resetFields();
|
||||||
|
//赋值
|
||||||
|
Object.assign(formData, record);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交数据
|
||||||
|
*/
|
||||||
|
async function submitForm() {
|
||||||
|
// 触发表单验证
|
||||||
|
await validate();
|
||||||
|
confirmLoading.value = true;
|
||||||
|
const isUpdate = ref<boolean>(false);
|
||||||
|
//时间格式化
|
||||||
|
let model = formData;
|
||||||
|
if (model.id) {
|
||||||
|
isUpdate.value = true;
|
||||||
|
}
|
||||||
|
//循环数据
|
||||||
|
for (let data in model) {
|
||||||
|
//如果该数据是数组并且是字符串类型
|
||||||
|
if (model[data] instanceof Array) {
|
||||||
|
let valueType = getValueType(formRef.value.getProps, data);
|
||||||
|
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||||
|
if (valueType === 'string') {
|
||||||
|
model[data] = model[data].join(',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await saveOrUpdate(model, isUpdate.value)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
createMessage.success(res.message);
|
||||||
|
emit('ok');
|
||||||
|
} else {
|
||||||
|
createMessage.warning(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
confirmLoading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
add,
|
||||||
|
edit,
|
||||||
|
submitForm,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.antd-modal-form {
|
||||||
|
min-height: 500px !important;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 24px 24px 24px 24px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,75 @@
|
||||||
|
<template>
|
||||||
|
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
|
<ZyCcjgForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZyCcjgForm>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, nextTick, defineExpose } from 'vue';
|
||||||
|
import ZyCcjgForm from './ZyCcjgForm.vue'
|
||||||
|
|
||||||
|
const title = ref<string>('');
|
||||||
|
const width = ref<number>(800);
|
||||||
|
const visible = ref<boolean>(false);
|
||||||
|
const disableSubmit = ref<boolean>(false);
|
||||||
|
const registerForm = ref();
|
||||||
|
const emit = defineEmits(['register', 'success']);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
function add() {
|
||||||
|
title.value = '新增';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.add();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
function edit(record) {
|
||||||
|
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.edit(record);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定按钮点击事件
|
||||||
|
*/
|
||||||
|
function handleOk() {
|
||||||
|
registerForm.value.submitForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form保存回调事件
|
||||||
|
*/
|
||||||
|
function submitCallback() {
|
||||||
|
handleCancel();
|
||||||
|
emit('success');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消按钮回调事件
|
||||||
|
*/
|
||||||
|
function handleCancel() {
|
||||||
|
visible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
add,
|
||||||
|
edit,
|
||||||
|
disableSubmit,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/**隐藏样式-modal确定按钮 */
|
||||||
|
.jee-hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="background: #fff;height: 97%;margin: 10px 0;">
|
||||||
<!--查询区域-->
|
<!--查询区域-->
|
||||||
<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-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||||
|
@ -14,10 +14,9 @@
|
||||||
<j-dict-select-tag placeholder="请选择类型" v-model:value="queryParam.zyType" dictCode="zy_type"/>
|
<j-dict-select-tag placeholder="请选择类型" v-model:value="queryParam.zyType" dictCode="zy_type"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!--<template v-if="toggleSearchStatus">-->
|
|
||||||
<a-col :lg="8">
|
<a-col :lg="8">
|
||||||
<a-form-item label="状态">
|
<a-form-item label="状态">
|
||||||
<a-input placeholder="请输入状态" v-model:value="queryParam.zyStatus"></a-input>
|
<j-dict-select-tag placeholder="请选择状态" v-model:value="queryParam.zyStatus" dictCode="zy_status"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="8">
|
<a-col :lg="8">
|
||||||
|
@ -25,105 +24,86 @@
|
||||||
<a-input placeholder="请输入学年学期" v-model:value="queryParam.xnxq"></a-input>
|
<a-input placeholder="请输入学年学期" v-model:value="queryParam.xnxq"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!--</template>-->
|
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
<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:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||||
<!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
<a-button type="primary" preIcon="ant-design:plus-outlined" @click="handleAdd" style="margin-left: 8px"> 新增</a-button>
|
||||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
|
||||||
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
|
||||||
</a>-->
|
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!--引用表格-->
|
<a-row>
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
<a-col :span="8" v-for="(item, index) in tableData" :key="index" style="padding: 10px 5px ;">
|
||||||
<!--插槽:table标题-->
|
<a-card >
|
||||||
<template #tableTitle>
|
<a-row>
|
||||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
<a-col :span="24" style="font-size: 18px;font-weight: bold;" class="ellipsis" :title="item.title">{{item.title}}</a-col>
|
||||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
<a-col :span="24">类型:{{item.zyType_dictText}}</a-col>
|
||||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
<a-col :span="24">开始时间:{{item.startTime}}</a-col>
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-col :span="24">结束时间:{{item.endTime}}</a-col>
|
||||||
<template #overlay>
|
<a-col :span="24">状态:{{item.zyStatus_dictText}}</a-col>
|
||||||
<a-menu>
|
<a-col :span="24">学年学期:{{item.xnxq}}</a-col>
|
||||||
<a-menu-item key="1" @click="batchHandleDelete">
|
<a-col :span="24" style="text-align:center;">
|
||||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
<a-button type="primary" @click="handleEdit(item)" style="margin-left:5px;" v-if="item.zyStatus==0">编辑</a-button>
|
||||||
删除
|
<a-button type="primary" @click="handleFabu(item)" style="margin-left:5px;" v-if="item.zyStatus==0">发布</a-button>
|
||||||
</a-menu-item>
|
<a-button type="primary" @click="handleDetail(item)" style="margin-left:5px;">详情</a-button>
|
||||||
</a-menu>
|
<a-button type="primary" @click="handleZyxx(item)" style="margin-left:5px;" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">作业信息</a-button>
|
||||||
</template>
|
<a-button type="primary" @click="handleShangchuan(item)" style="margin-left:5px;" v-if="item.zyStatus==1||item.zyStatus==2||item.zyStatus==3">上传</a-button>
|
||||||
<a-button>批量操作
|
</a-col>
|
||||||
<Icon icon="mdi:chevron-down"></Icon>
|
</a-row>
|
||||||
</a-button>
|
</a-card>
|
||||||
</a-dropdown>
|
</a-col>
|
||||||
</template>
|
<a-col :span="24">
|
||||||
<!--操作栏-->
|
<div v-show="tableData.length>0">
|
||||||
<template #action="{ record }">
|
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
</div>
|
||||||
</template>
|
<div v-show="tableData.length==0">
|
||||||
<!--字段回显插槽-->
|
<a-empty/>
|
||||||
<template #htmlSlot="{text}">
|
</div>
|
||||||
<div v-html="text"></div>
|
</a-col>
|
||||||
</template>
|
</a-row>
|
||||||
<!--省市区字段回显插槽-->
|
|
||||||
<!--<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>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
|
<ZyInfoModal ref="registerModal" @success="handleSuccess"></ZyInfoModal>
|
||||||
|
<ZyInfoStudentListModal ref="ZyInfoStudentListModalPage"></ZyInfoStudentListModal>
|
||||||
|
<ZyInfoStudentModal ref="ZyInfoStudentModalPage"></ZyInfoStudentModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" name="zyInfo-zyInfo" setup>
|
<script lang="ts" name="zyInfo-zyInfo" setup>
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive, onMounted,unref } from 'vue';
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { list, deleteOne } from './ZyInfo.api';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { columns } from './ZyInfo.data';
|
|
||||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyInfo.api';
|
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
||||||
import ZyInfoModal from './components/ZyInfoModal.vue'
|
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
|
import { Input, Popover, Pagination, Empty } from 'ant-design-vue';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import ZyInfoModal from './components/ZyInfoModal.vue'
|
||||||
|
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue'
|
||||||
|
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//当前路由信息
|
||||||
|
const { currentRoute } = useRouter();
|
||||||
|
const { query } = unref(currentRoute);
|
||||||
|
const { rwbh } = query;//获取传递参数
|
||||||
|
const APagination = Pagination;
|
||||||
|
const { createConfirm,createMessage } = useMessage();
|
||||||
const queryParam = ref<any>({});
|
const queryParam = ref<any>({});
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
const registerModal = ref();
|
const registerModal = ref();
|
||||||
//注册table数据
|
const ZyInfoStudentListModalPage = ref();
|
||||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
const ZyInfoStudentModalPage = ref();
|
||||||
tableProps: {
|
const current = ref<number>(0);
|
||||||
title: '作业发布',
|
const total = ref<number>(0);
|
||||||
api: list,
|
const pageNo = ref<number>(0);
|
||||||
columns,
|
const pageSize = ref<number>(6);
|
||||||
canResize:false,
|
const tableData = ref<any>([]);
|
||||||
useSearchForm: false,
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.column = '',params.order = '';//新生成的默认不带排序
|
|
||||||
return Object.assign(params, queryParam.value);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
exportConfig: {
|
|
||||||
name: "作业发布",
|
|
||||||
url: getExportUrl,
|
|
||||||
},
|
|
||||||
importConfig: {
|
|
||||||
url: getImportUrl,
|
|
||||||
success: handleSuccess
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
|
||||||
const labelCol = reactive({
|
const labelCol = reactive({
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 7 },
|
sm: { span: 7 },
|
||||||
|
@ -157,6 +137,18 @@
|
||||||
registerModal.value.edit(record);
|
registerModal.value.edit(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleZyxx(record){
|
||||||
|
ZyInfoStudentListModalPage.value.disableSubmit = true;
|
||||||
|
ZyInfoStudentListModalPage.value.init(record);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleShangchuan(record){
|
||||||
|
ZyInfoStudentModalPage.value.disableSubmit = false;
|
||||||
|
var param = {mainId:record.id}
|
||||||
|
ZyInfoStudentModalPage.value.edit(param);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除事件
|
* 删除事件
|
||||||
*/
|
*/
|
||||||
|
@ -164,49 +156,31 @@
|
||||||
await deleteOne({ id: record.id }, handleSuccess);
|
await deleteOne({ id: record.id }, handleSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
async function handleFabu(record){
|
||||||
* 批量删除事件
|
createConfirm({
|
||||||
*/
|
iconType: 'warning',
|
||||||
async function batchHandleDelete() {
|
title: '确认发布',
|
||||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
content: '是否发布作业数据',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
|
var url = "/zyInfo/zyInfo/edit";
|
||||||
|
var params = {id:record.id,zyStatus:'1'};
|
||||||
|
defHttp.post({ url: url, params }).then((res) => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 成功回调
|
* 成功回调
|
||||||
*/
|
*/
|
||||||
function handleSuccess() {
|
function handleSuccess() {
|
||||||
(selectedRowKeys.value = []) && reload();
|
reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作栏
|
|
||||||
*/
|
|
||||||
function getTableAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '编辑',
|
|
||||||
onClick: handleEdit.bind(null, record),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下拉操作栏
|
|
||||||
*/
|
|
||||||
function getDropDownAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '详情',
|
|
||||||
onClick: handleDetail.bind(null, record),
|
|
||||||
}, {
|
|
||||||
label: '删除',
|
|
||||||
popConfirm: {
|
|
||||||
title: '是否确认删除',
|
|
||||||
confirm: handleDelete.bind(null, record),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
|
@ -220,13 +194,32 @@
|
||||||
*/
|
*/
|
||||||
function searchReset() {
|
function searchReset() {
|
||||||
queryParam.value = {};
|
queryParam.value = {};
|
||||||
selectedRowKeys.value = [];
|
|
||||||
//刷新数据
|
//刷新数据
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reload(){
|
||||||
|
queryParam.value.pageNo = pageNo;
|
||||||
|
queryParam.value.pageSize = pageSize;
|
||||||
|
queryParam.value.rwbh = rwbh;
|
||||||
|
defHttp.get({ url: '/zyInfo/zyInfo/list', params: queryParam.value }).then(res => {
|
||||||
|
console.log(`🚀 ~ defHttp.get ~ res:`, res)
|
||||||
|
total.value = res.total;
|
||||||
|
pageNo.value = res.pages;
|
||||||
|
current.value = res.current;
|
||||||
|
tableData.value = res.records;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function handlePageChange(record){
|
||||||
|
pageNo.value = record;
|
||||||
|
searchQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
searchQuery();
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -247,4 +240,9 @@
|
||||||
text-align: center
|
text-align: center
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ellipsis {
|
||||||
|
overflow: hidden; /* 确保超出容器的内容被裁剪 */
|
||||||
|
white-space: nowrap; /* 确保文本在一行内显示 */
|
||||||
|
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="描述" v-bind="validateInfos.content" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
<a-form-item label="描述" v-bind="validateInfos.content" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||||
<a-input v-model:value="formData.content" placeholder="请输入描述" :disabled="disabled"></a-input>
|
<a-textarea v-model:value="formData.content" placeholder="请输入描述" :disabled="disabled"></a-textarea>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
@ -63,14 +63,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted,unref } from 'vue';
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
import { getValueType } from '/@/utils';
|
import { getValueType } from '/@/utils';
|
||||||
import { saveOrUpdate } from '../ZyInfo.api';
|
import { saveOrUpdate } from '../ZyInfo.api';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
//当前路由信息
|
||||||
|
const { currentRoute } = useRouter();
|
||||||
|
const { query } = unref(currentRoute);
|
||||||
|
const { rwbh } = query;//获取传递参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formDisabled: { type: Boolean, default: false },
|
formDisabled: { type: Boolean, default: false },
|
||||||
formData: { type: Object, default: ()=>{} },
|
formData: { type: Object, default: ()=>{} },
|
||||||
|
@ -82,22 +87,23 @@
|
||||||
const formData = reactive<Record<string, any>>({
|
const formData = reactive<Record<string, any>>({
|
||||||
id: '',
|
id: '',
|
||||||
title: '',
|
title: '',
|
||||||
zyType: undefined,
|
zyType: '0',
|
||||||
content: '',
|
content: '',
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
wwcc: undefined,
|
wwcc: '0',
|
||||||
wwtgl: undefined,
|
wwtgl: undefined,
|
||||||
nwcc: undefined,
|
nwcc: '0',
|
||||||
nwtgl: undefined,
|
nwtgl: undefined,
|
||||||
aigccc: undefined,
|
aigccc: '0',
|
||||||
aigctgl: undefined,
|
aigctgl: undefined,
|
||||||
|
rwbh: '',
|
||||||
});
|
});
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
|
||||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
|
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
|
||||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
|
||||||
const confirmLoading = ref<boolean>(false);
|
const confirmLoading = ref<boolean>(false);
|
||||||
//表单验证
|
//表单验证
|
||||||
const validatorRules = {
|
const validatorRules = {
|
||||||
|
@ -112,7 +118,7 @@
|
||||||
aigccc: [{ required: true, message: '请输入aigc查重!'},],
|
aigccc: [{ required: true, message: '请输入aigc查重!'},],
|
||||||
aigctgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
aigctgl: [{ required: false}, { pattern: /^-?\d+\.?\d*$/, message: '请输入数字!'},],
|
||||||
};
|
};
|
||||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
|
|
||||||
// 表单禁用
|
// 表单禁用
|
||||||
const disabled = computed(()=>{
|
const disabled = computed(()=>{
|
||||||
|
@ -131,7 +137,7 @@
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
function add() {
|
function add() {
|
||||||
edit({});
|
edit({rwbh});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" name="zyInfoStudent-zyInfoStudent" setup>
|
<script lang="ts" name="zyInfoStudent-zyInfoStudent" setup>
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive,defineExpose } from 'vue';
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { columns } from './ZyInfoStudent.data';
|
import { columns } from './ZyInfoStudent.data';
|
||||||
|
@ -78,6 +78,8 @@
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
|
|
||||||
const queryParam = ref<any>({});
|
const queryParam = ref<any>({});
|
||||||
|
const mainId = ref<string>('');
|
||||||
|
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
const registerModal = ref();
|
const registerModal = ref();
|
||||||
//注册table数据
|
//注册table数据
|
||||||
|
@ -204,10 +206,21 @@
|
||||||
function searchReset() {
|
function searchReset() {
|
||||||
queryParam.value = {};
|
queryParam.value = {};
|
||||||
selectedRowKeys.value = [];
|
selectedRowKeys.value = [];
|
||||||
|
queryParam.mainId = mainId;
|
||||||
//刷新数据
|
//刷新数据
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function init(record){
|
||||||
|
queryParam.value.mainId = record.id;
|
||||||
|
mainId = record.id;
|
||||||
|
searchQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
init,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
<template>
|
||||||
|
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
|
<ZyInfoStudentList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZyInfoStudentList>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, nextTick, defineExpose } from 'vue';
|
||||||
|
import ZyInfoStudentList from './ZyInfoStudentList.vue'
|
||||||
|
|
||||||
|
const title = ref<string>('');
|
||||||
|
const width = ref<number>(800);
|
||||||
|
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>
|
Loading…
Reference in New Issue