This commit is contained in:
bai 2024-11-07 11:55:49 +08:00
commit 3de4a8f9d0
22 changed files with 1516 additions and 88 deletions

View File

@ -27,7 +27,7 @@ export const plugins = [
// 'fullscreen code preview | undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent lineheight|subscript superscript blockquote| numlist bullist checklist | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | insertfile image media pageembed link anchor codesample insertdatetime hr| a11ycheck ltr rtl'; // 'fullscreen code preview | undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent lineheight|subscript superscript blockquote| numlist bullist checklist | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | insertfile image media pageembed link anchor codesample insertdatetime hr| a11ycheck ltr rtl';
export const toolbar = export const toolbar =
'bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify '; 'kityformula-editor bold italic underline strikethrough | alignleft aligncenter alignright alignjustify ';
// fullscreen code preview | undo redo | // fullscreen code preview | undo redo |
export const simplePlugins = ['lists image link media table textcolor wordcount contextmenu fullscreen']; export const simplePlugins = ['lists image link media table textcolor wordcount contextmenu fullscreen'];

View File

@ -20,21 +20,21 @@
// export const menubar = 'file edit insert view format table'; // export const menubar = 'file edit insert view format table';
export const plugins = [ export const plugins = [
'image code kityformula-editor', 'image',
]; ];
// export const toolbar = // export const toolbar =
// 'fullscreen code preview | undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent lineheight|subscript superscript blockquote| numlist bullist checklist | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | insertfile image media pageembed link anchor codesample insertdatetime hr| a11ycheck ltr rtl'; // 'fullscreen code preview | undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent lineheight|subscript superscript blockquote| numlist bullist checklist | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | insertfile image media pageembed link anchor codesample insertdatetime hr| a11ycheck ltr rtl';
export const toolbar = export const toolbar =
'bold italic underline strikethrough | insertfile image media pageembed link | alignleft aligncenter alignright alignjustify | outdent indent lineheight| numlist bullist checklist | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | anchor codesample insertdatetime hr| a11ycheck ltr rtl | code kityformula-editor'; 'bold italic underline strikethrough | insertfile image media pageembed link | alignleft aligncenter alignright alignjustify | outdent indent lineheight| numlist bullist checklist | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | charmap emoticons | anchor codesample insertdatetime hr| a11ycheck ltr rtl';
// fullscreen code preview | undo redo | // fullscreen code preview | undo redo |
export const simplePlugins = ['lists insertfile image link table fullscreen']; export const simplePlugins = ['lists insertfile image link table fullscreen mathjax kityformula-editor bullist numlist'];
export const simpleToolbar = [ export const simpleToolbar = [
'lists link unlink image media table fullscreen | code kityformula-editor', 'lists link unlink image media table fullscreen mathjax kityformula-editor bullist numlist',
]; ];
export const menubar = ''; export const menubar = '';

View File

@ -842,6 +842,10 @@
</a-col> </a-col>
<a-col :lg="6" :xs="24"> <a-col :lg="6" :xs="24">
<div style="text-align: right"> <div style="text-align: right">
<a @click="handleFenxiang(item)" class="home-status">分享</a>
<a-divider type="vertical" />
<a @click="handleWxtx(item)">微信提醒</a> <a @click="handleWxtx(item)">微信提醒</a>
<!-- <a-divider type="vertical" /> --> <!-- <a-divider type="vertical" /> -->
<!-- <a @click="handleDelete(item)" v-if="item.ytjnum == '0'">删除</a> --> <!-- <a @click="handleDelete(item)" v-if="item.ytjnum == '0'">删除</a> -->
@ -993,6 +997,7 @@
<YinyongTikuDcListModal ref="YinyongTikuDcListModalpage" @success="handleYytkSuccess" /> <YinyongTikuDcListModal ref="YinyongTikuDcListModalpage" @success="handleYytkSuccess" />
<TikuListModal ref="TikuListModalPage"></TikuListModal> <TikuListModal ref="TikuListModalPage"></TikuListModal>
<YycyListModal ref="YycyListModalPage" @success="handleCallYinyong"></YycyListModal> <YycyListModal ref="YycyListModalPage" @success="handleCallYinyong"></YycyListModal>
<ZyCyFenxiangListModal ref="ZyCyFenxiangListModalpage"></ZyCyFenxiangListModal>
</div> </div>
</template> </template>
@ -1023,6 +1028,7 @@ import YycyListModal from '/@/views/kc/wjxWjxx/YycyListModal.vue';
import { create } from 'sortablejs'; import { create } from 'sortablejs';
import { downloadByUrl } from '/@/utils/file/download'; import { downloadByUrl } from '/@/utils/file/download';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import ZyCyFenxiangListModal from '/@/views/zy/zyCyFenxiang/ZyCyFenxiangListModal.vue';
const glob = useGlobSetting(); const glob = useGlobSetting();
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
@ -1049,6 +1055,7 @@ const registerZcjcModal = ref();
const YinyongTikuListModalpage = ref(); const YinyongTikuListModalpage = ref();
const YinyongTikuDcListModalpage = ref(); const YinyongTikuDcListModalpage = ref();
const TikuListModalPage = ref(); const TikuListModalPage = ref();
const ZyCyFenxiangListModalpage = ref();
const showType = ref<number>(0); const showType = ref<number>(0);
const zycs = ref<number>(0); const zycs = ref<number>(0);
@ -1123,6 +1130,13 @@ const wrapperCol4 = reactive({
sm: { span: 12 }, sm: { span: 12 },
}); });
//
function handleFenxiang(record){
console.log(record);
record.type="1";
ZyCyFenxiangListModalpage.value.init(record)
ZyCyFenxiangListModalpage.value.disableSubmit = true;
}
// //
function handleYyzy() { function handleYyzy() {
@ -1724,9 +1738,9 @@ function handleFabu(record: Recordable) {
}, },
}); });
// //
setTimeout(() => { // setTimeout(() => {
defHttp.get({ url: '/wjxWjxx/wjxWjxx/sendWjWechat', params: { id: record.id, wjlx: wjLeixing.value } }).then((res) => {}); // defHttp.get({ url: '/wjxWjxx/wjxWjxx/sendWjWechat', params: { id: record.id, wjlx: wjLeixing.value } }).then((res) => {});
}, 5000); // }, 5000);
} }
// //

View File

@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/wjxWjxx/wjxWjxx/list', list = '/wjxWjxx/wjxWjxx/list',
listOther = '/wjxWjxx/wjxWjxx/listOther',
save='/wjxWjxx/wjxWjxx/add', save='/wjxWjxx/wjxWjxx/add',
edit='/wjxWjxx/wjxWjxx/edit', edit='/wjxWjxx/wjxWjxx/edit',
deleteOne = '/wjxWjxx/wjxWjxx/delete', deleteOne = '/wjxWjxx/wjxWjxx/delete',
@ -32,6 +33,7 @@ export const getImportUrl = Api.importExcel;
* @param params * @param params
*/ */
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
export const listOther = (params) => defHttp.get({ url: Api.listOther, params });
/** /**
* *

View File

@ -0,0 +1,91 @@
<template>
<div>
<a-tabs v-model:activeKey="activeKey" @change="handleChange">
<a-tab-pane key="1" tab="我的测验">
<YycyList ref="yycyListPage" @yinyong="handleYinyong"></YycyList>
</a-tab-pane>
<a-tab-pane key="2" tab="他人分享">
<YycyListOther ref="yycyOtherListPage" @yinyong="handleYinyong"></YycyListOther>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script lang="ts" name="kcTeachingUnitContentOne-kcTeachingUnitContentOne" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns2 } from './WjxWjxx.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './WjxWjxx.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import YycyxqModal from '/@/views/kc/wjxWjxx/components/YycyxqModal.vue';
import YycyList from '/@/views/kc/wjxWjxx/YycyList.vue';
import YycyListOther from '/@/views/kc/wjxWjxx/YycyListOther.vue';
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const yycyListPage = ref();
const yycyOtherListPage = ref();
const activeKey= ref('1');
const emit = defineEmits(['register', 'ok', 'yinyong']);
//
//
function handleChange(record){
console.log("🚀 ~ handleChange ~ record:", record)
if(record == '2'){
yycyOtherListPage.value.init(queryParam.value);
}
}
function handleYinyong(record) {
console.log('🎅', record);
emit('yinyong', record);
}
function init(record) {
console.log('🥼', record);
queryParam.value = record;
queryParam.value.titleNull = "1";
console.log('🦸‍♀️', queryParam);
activeKey.value = "1";
yycyListPage.value.init(record);
}
/**
* 提交数据
*/
async function submitForm() {
// var ids = selectedRowKeys.value;
// console.log('😘', ids);
// emit('ok', ids);
}
defineExpose({
init,
submitForm,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center;
}
}
</style>

View File

@ -6,7 +6,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import YycyList from './YycyList.vue' import YycyList from './YycyListMain.vue'
const title = ref<string>(''); const title = ref<string>('');
const width = ref<number>(1000); const width = ref<number>(1000);

View File

@ -0,0 +1,225 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle> </template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{ text }">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>-->
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<YycyxqModal ref="registerModal" @success="handleSuccess"></YycyxqModal>
</div>
</template>
<script lang="ts" name="kcTeachingUnitContentOne-kcTeachingUnitContentOne" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns2 } from './WjxWjxx.data';
import { listOther, deleteOne, batchDelete, getImportUrl, getExportUrl } from './WjxWjxx.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import YycyxqModal from '/@/views/kc/wjxWjxx/components/YycyxqModal.vue';
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const emit = defineEmits(['register', 'ok', 'yinyong']);
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: 'kc_teaching_unit_content_one',
api: listOther,
columns: columns2,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
// showActionColumn: false,
beforeFetch: (params) => {
(params.column = ''), (params.order = ''); //
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: 'kc_teaching_unit_content_one',
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() {
var ids = selectedRowKeys.value;
console.log('😘', ids);
emit('ok', ids);
}
/**
* 编辑事件
*/
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 handleYinyong(record) {
console.log('🎅', record);
emit('yinyong', record);
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '引用',
onClick: handleYinyong.bind(null, record),
},
{
label: '详情',
onClick: handleDetail.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();
}
function init(record) {
console.log('🥼', record);
queryParam.value = record;
queryParam.value.titleNull = "1";
console.log('🦸‍♀️', queryParam);
reload();
}
/**
* 提交数据
*/
async function submitForm() {
var ids = selectedRowKeys.value;
console.log('😘', ids);
emit('ok', ids);
}
defineExpose({
init,
submitForm,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center;
}
}
</style>

View File

@ -127,6 +127,9 @@ function handleHqjg(record){
defHttp.post({url:'/wjxDjxx/updateDjjg',params:record}).then(res=>{ defHttp.post({url:'/wjxDjxx/updateDjjg',params:record}).then(res=>{
console.log('-->',res) console.log('-->',res)
}) })
// defHttp.post({url:'/wjxDjxx/getDjjg',params:record}).then(res=>{
// console.log('-->',res)
// })
} }
/** /**

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/zyCyFenxiang/zyCyFenxiang/list',
save='/zyCyFenxiang/zyCyFenxiang/add',
edit='/zyCyFenxiang/zyCyFenxiang/edit',
deleteOne = '/zyCyFenxiang/zyCyFenxiang/delete',
deleteBatch = '/zyCyFenxiang/zyCyFenxiang/deleteBatch',
importExcel = '/zyCyFenxiang/zyCyFenxiang/importExcel',
exportXls = '/zyCyFenxiang/zyCyFenxiang/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 });
}

View File

@ -0,0 +1,78 @@
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: 'teacherNo'
},
{
title: '教师姓名',
align: "center",
dataIndex: 'teacherName'
},
];
//列表数据
export const columns2: BasicColumn[] = [
{
title: '教工号',
align: "center",
dataIndex: 'gh'
},
{
title: '教师姓名',
align: "center",
dataIndex: 'xm'
},
{
title: '单位名称',
align: "center",
dataIndex: 'dwmc'
},
{
title: '操作',
align: "center",
key: 'action',
dataIndex: 'action'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "教工号",
field: 'teacherNo',
component: 'Input',
colProps: {span: 6},
},
{
label: "教师姓名",
field: 'teacherName',
component: 'Input',
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '教工号',
field: 'teacherNo',
component: 'Input',
},
{
label: '教师姓名',
field: 'teacherName',
component: 'Input',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -4,31 +4,24 @@
<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">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="8">
<a-form-item label="学期学年"> <a-form-item label="教工号">
<j-dict-select-tag ref="xqDictTag" placeholder="请选择学年学期" v-model:value="queryParam.xqxn" dictCode="kc_xqxn_history,title,title,true order by start_time desc"/> <a-input placeholder="请输入教工号" v-model:value="queryParam.teacherNo"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="8">
<a-form-item label="开课单位"> <a-form-item label="教师姓名">
<JDictSelectTag placeholder="开课单位" v-model:value="queryParam.kkdw" :dictCode="`kc_kkdw_view,kkdw,kkdw`"/> <a-input placeholder="请输入教师姓名" v-model:value="queryParam.teacherName"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="课程名称">
<a-input placeholder="请输入课程名称" v-model:value="queryParam.kcmc"/>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item label="授课教师">
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="6" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> <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:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button> <!--<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>-->
</a-col> </a-col>
</span> </span>
</a-col> </a-col>
@ -36,11 +29,29 @@
</a-form> </a-form>
</div> </div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable" > <BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题--> <!--插槽: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 }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" /> <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template> </template>
<!--字段回显插槽--> <!--字段回显插槽-->
<template #htmlSlot="{text}"> <template #htmlSlot="{text}">
@ -50,48 +61,32 @@
<!--<template #pcaSlot="{text}"> <!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }} {{ getAreaTextByCode(text) }}
</template>--> </template>-->
<template #fileSlot="{text,record}"> <template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<span v-else > <a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
</span>
</template>
<template #fileSlot2="{text,record}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<span v-else >
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
</span>
</template> </template>
</BasicTable> </BasicTable>
<!-- 表单区域 --> <!-- 表单区域 -->
<ZyJxdgModal ref="registerModal" @success="handleSuccess"></ZyJxdgModal> <ZyCyFenxiangModal ref="registerModal" @success="handleSuccess"></ZyCyFenxiangModal>
</div> </div>
</template> </template>
<script lang="ts" name="zyJxdg-zyJxdg" setup> <script lang="ts" name="zyCyFenxiang-zyCyFenxiang" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } 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 '/@/views/zy/sysZy/kczygl/Kczygl.data'; import { columns } from './ZyCyFenxiang.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from '/@/views/zy/sysZy/kczygl/Kczygl.api'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyCyFenxiang.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import { JInput, JDictSelectTag } from '/@/components/Form'; import ZyCyFenxiangModal from './components/ZyCyFenxiangModal.vue'
import ZyJxdgModal from './components/KczyglModal.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useGlobSetting } from '/@/hooks/setting';
const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl;
const { 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 //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
title: 'zy_cy_fenxiang',
api: list, api: list,
columns, columns,
canResize:false, canResize:false,
@ -106,11 +101,8 @@
}, },
}, },
exportConfig: { exportConfig: {
name: "课程作业管理", name: "zy_cy_fenxiang",
url: getExportUrl, url: getExportUrl,
params: () => {
return Object.assign({},queryParam.value);
}
}, },
importConfig: { importConfig: {
url: getImportUrl, url: getImportUrl,
@ -139,33 +131,10 @@
* 编辑事件 * 编辑事件
*/ */
function handleEdit(record: Recordable) { function handleEdit(record: Recordable) {
if(record.filePath){
if(!record.pdfPath){
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
}
if(record.jxrlFilePath){
if(!record.jxrlPdfPath){
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行编辑")
return;
}
}
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
function openPdf(record){
if(record){
var url2 = getFileAccessHttpUrl(record)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}else{
createMessage.warning("正在向文件服务器进行传输请稍等10秒刷新后进行预览")
}
}
/** /**
* 详情 * 详情
*/ */
@ -201,8 +170,8 @@
function getTableAction(record) { function getTableAction(record) {
return [ return [
{ {
label: '详情', label: '编辑',
onClick: handleDetail.bind(null, record), onClick: handleEdit.bind(null, record),
}, },
]; ];
} }
@ -241,9 +210,18 @@
// //
reload(); reload();
} }
function init(record){
queryParam.value.mainId = record.id;
reload();
}
defineExpose({
init,
});
</script> </script>

View File

@ -0,0 +1,309 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="8">
<a-form-item label="教工号">
<j-input placeholder="请输入教工号" v-model:value="queryParam2.gh"></j-input>
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="教师姓名">
<j-input placeholder="请输入教师姓名" v-model:value="queryParam2.xm"></j-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="getTeacherList">查询</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<div style="padding: 0 10px;">
<a-row>
<a-col :span="24">
<div class="region-title"><span class="region-title-headline"></span><span>可分享教师</span></div>
<a-table :columns="columns2" :data-source="tableQueryData" :pagination="false">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<span>
<a @click="handleXuanze(record)">选择</a>
</span>
</template>
</template>
</a-table>
</a-col>
<a-col :span="24" style="text-align: right;">
<a-pagination
v-model:current="page2No"
show-less-items
:total="total2Record"
:showSizeChanger="false"
@change="onPageChange"
/>
</a-col>
</a-row>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" >
<template #tableTitle>
<div class="region-title"><span class="region-title-headline"></span><span>已分享教师</span></div>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
<!-- 表单区域 -->
<ZyCyFenxiangModal ref="registerModal" @success="handleSuccess"></ZyCyFenxiangModal>
</div>
</template>
<script lang="ts" name="zyCyFenxiang-zyCyFenxiang" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns,columns2 } from './ZyCyFenxiang.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyCyFenxiang.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyCyFenxiangModal from './components/ZyCyFenxiangModal.vue'
import { defHttp } from '/@/utils/http/axios';
import { JInput } from '/@/components/Form';
import { Pagination } from 'ant-design-vue';
const APagination = Pagination;
const queryParam = ref<any>({});
const queryParam2 = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const tableQueryData = ref<any>([]);
const rwbh = ref<string>('');
const mainId = ref<string>('');
const type = ref<string>('');
const page2No = ref(1);
const total2Record = ref(0);
//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: "zy_cy_fenxiang",
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: handleDelete.bind(null, record),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
//
function handleXuanze(record){
console.log(record);
defHttp.post({url:'/zyCyFenxiang/zyCyFenxiang/add',params:{rwbh:rwbh.value,type:type.value,mainId:mainId.value,teacherNo:record.gh,teacherName:record.xm}}).then(res=>{
getData()
})
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
async function onPageChange() {
console.log('onPageChange', page2No.value);
await getTeacherList();
}
//
function getTeacherList(){
queryParam2.value.zzzt = "11"
queryParam2.value.mainId = mainId.value;
defHttp.get({url:'/grab/xxhbxskc/list',params:{pageSize:5,pageNo:page2No.value, ...queryParam2.value}}).then(res =>{
console.log(res);
tableQueryData.value = res.records;
total2Record.value = res.total;
page2No.value = res.current;
})
}
function getData(){
reload();
getTeacherList();
}
function init(record){
rwbh.value = record.rwbh;
mainId.value = record.id;
queryParam.value.mainId = record.id;
queryParam2.value.mainId = record.id;
type.value = record.type;
getData();
}
defineExpose({
init,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
.region-title {
font-size: 16px;
color: #333;
height: 50px;
line-height: 50px;
border-bottom: 1px solid #e1e4eb;
margin-bottom: 20px;
display: flex;
}
.region-title-headline {
display: block;
width: 5px;
height: 16px;
background: #18a689;
border-radius: 6px;
margin-top: 18px;
margin-right: 20px;
}
</style>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ZyCyFenxiangList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZyCyFenxiangList>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ZyCyFenxiangList from './ZyCyFenxiangList.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 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({
add,
init,
disableSubmit,
});
</script>
<style>
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>

View File

@ -0,0 +1,133 @@
<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.teacherNo">
<a-input v-model:value="formData.teacherNo" placeholder="请输入教工号" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="教师姓名" v-bind="validateInfos.teacherName">
<a-input v-model:value="formData.teacherName" placeholder="请输入教师姓名" :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 '../ZyCyFenxiang.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: '',
teacherNo: '',
teacherName: '',
});
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>

View File

@ -0,0 +1,75 @@
<template>
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ZyCyFenxiangForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZyCyFenxiangForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ZyCyFenxiangForm from './ZyCyFenxiangForm.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>

View File

@ -0,0 +1,75 @@
<template>
<div style="padding:10px;">
<a-tabs v-model:activeKey="activeKey" @change="handleChange">
<a-tab-pane key="1" tab="我的作业">
<YyzyList ref="yyzyListPage" @yinyong="handleYinyong"></YyzyList>
</a-tab-pane>
<a-tab-pane key="2" tab="他人分享">
<YyzyOtherList ref="yyzyOtherListPage" @yinyong="handleYinyong"></YyzyOtherList>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script lang="ts" name="kcTeachingUnitContentOne-kcTeachingUnitContentOne" setup>
import { ref, reactive } from 'vue';
import YyzyList from '/@/views/zy/zyInfo/YyzyList.vue';
import YyzyOtherList from '/@/views/zy/zyInfo/YyzyOtherList.vue';
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const yyzyListPage = ref();
const yyzyOtherListPage = ref();
const activeKey= ref('1');
const emit = defineEmits(['register', 'ok', 'yinyong']);
//
function handleYinyong(record) {
emit('yinyong', record);
}
//
function handleChange(record){
console.log("🚀 ~ handleChange ~ record:", record)
if(record == '2'){
yyzyOtherListPage.value.init(queryParam.value);
}
}
//
function init(record) {
queryParam.value = record;
activeKey.value = "1";
yyzyListPage.value.init(record);
}
/**
* 提交数据
*/
async function submitForm() {
}
defineExpose({
init,
submitForm,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center;
}
}
</style>

View File

@ -6,7 +6,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import YyzyList from './YyzyList.vue' import YyzyList from './YyzyListMain.vue'
const title = ref<string>(''); const title = ref<string>('');
const width = ref<number>(1000); const width = ref<number>(1000);

View File

@ -0,0 +1,226 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle> </template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<!--字段回显插槽-->
<template #htmlSlot="{ text }">
<div v-html="text"></div>
</template>
<!--省市区字段回显插槽-->
<!--<template #pcaSlot="{text}">
{{ getAreaTextByCode(text) }}
</template>-->
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<ZyInfoDetailModal ref="registerModal" @success="handleSuccess"></ZyInfoDetailModal>
</div>
</template>
<script lang="ts" name="kcTeachingUnitContentOne-kcTeachingUnitContentOne" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns2 } from './ZyInfo.data';
import { listOther, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyInfoDetailModal from '/@/views/zy/zyInfo/components/ZyInfoDetailModal.vue';
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const emit = defineEmits(['register', 'ok', 'yinyong']);
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: 'kc_teaching_unit_content_one',
api: listOther,
columns: columns2,
canResize: false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
// showActionColumn: false,
beforeFetch: (params) => {
(params.column = ''), (params.order = ''); //
return Object.assign(params, queryParam.value);
},
},
exportConfig: {
name: 'kc_teaching_unit_content_one',
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() {
var ids = selectedRowKeys.value;
console.log('😘', ids);
emit('ok', ids);
}
/**
* 编辑事件
*/
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 handleYinyong(record) {
console.log('🎅', record);
emit('yinyong', record);
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '引用',
onClick: handleYinyong.bind(null, record),
},
{
label: '详情',
onClick: handleDetail.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();
}
function init(record) {
console.log('🥼', record);
queryParam.value = record;
queryParam.value.title = "! null";
console.log('🦸‍♀️', queryParam);
reload();
}
/**
* 提交数据
*/
async function submitForm() {
var ids = selectedRowKeys.value;
console.log('😘', ids);
emit('ok', ids);
}
defineExpose({
init,
submitForm,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center;
}
}
</style>

View File

@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/zyInfo/zyInfo/list', list = '/zyInfo/zyInfo/list',
listOther = '/zyInfo/zyInfo/listOther',
save='/zyInfo/zyInfo/add', save='/zyInfo/zyInfo/add',
edit='/zyInfo/zyInfo/edit', edit='/zyInfo/zyInfo/edit',
deleteOne = '/zyInfo/zyInfo/delete', deleteOne = '/zyInfo/zyInfo/delete',
@ -29,6 +30,7 @@ export const getImportUrl = Api.importExcel;
* @param params * @param params
*/ */
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
export const listOther = (params) => defHttp.get({ url: Api.listOther, params });
/** /**
* *

View File

@ -97,6 +97,46 @@ export const columns2: BasicColumn[] = [
dataIndex: 'xnxq' dataIndex: 'xnxq'
}, },
]; ];
//列表数据
export const columns3: BasicColumn[] = [
{
title: '作业名称',
align: "center",
dataIndex: 'title'
},
{
title: '开始时间',
align: "center",
dataIndex: 'startTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '结束时间',
align: "center",
dataIndex: 'endTime',
customRender:({text}) =>{
return !text?"":(text.length>10?text.substr(0,10):text);
},
},
{
title: '状态',
align: "center",
dataIndex: 'zyStatus_dictText'
},
{
title: '学年学期',
align: "center",
dataIndex: 'xnxq'
},
{
title: '分享教师',
align: "center",
dataIndex: 'yuanTeacherName'
},
];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {

View File

@ -525,9 +525,10 @@
<!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a> <!-- <a @click="handleWxtx(item)" class="home-status"><Icon icon="ant-design:wechat-outlined" />微信提醒</a>
<a-divider type="vertical" /> --> <a-divider type="vertical" /> -->
<a @click="handleEdit(item, true)" v-if="item.ytjnum > 0" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a> <a @click="handleEdit(item, true)" v-if="item.ytjnum > 0" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a>
<a @click="handleChehui(item)" v-if="item.dpynum == 0 && item.ypynum == 0" class="home-status" <a-divider type="vertical" v-if="item.ytjnum > 0"/>
><Icon icon="ant-design:import-outlined" />撤回作业</a <a @click="handleFenxiang(item)" class="home-status"><Icon icon="ant-design:share-alt-outlined" />分享</a>
> <a-divider type="vertical" />
<a @click="handleChehui(item)" v-if="item.dpynum == 0 && item.ypynum == 0" class="home-status" ><Icon icon="ant-design:import-outlined" />撤回作业</a>
<a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0" /> <a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0" />
<a @click="handleZyxx(item, '')" class="home-status"><Icon icon="ant-design:file-done-outlined" />批阅作业</a> <a @click="handleZyxx(item, '')" class="home-status"><Icon icon="ant-design:file-done-outlined" />批阅作业</a>
<a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0" /> <a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0" />
@ -581,6 +582,7 @@
<ZyInfoStudentModal ref="ZyInfoStudentModalPage"></ZyInfoStudentModal> <ZyInfoStudentModal ref="ZyInfoStudentModalPage"></ZyInfoStudentModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal> <XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
<YyzyListModal ref="YyzyListModalPage" @success="handleCallYinyong"></YyzyListModal> <YyzyListModal ref="YyzyListModalPage" @success="handleCallYinyong"></YyzyListModal>
<ZyCyFenxiangListModal ref="ZyCyFenxiangListModalpage"></ZyCyFenxiangListModal>
</div> </div>
</template> </template>
@ -619,6 +621,7 @@ import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStude
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue'; import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import ZyInfoEditModal from './components/ZyInfoEditModal.vue'; import ZyInfoEditModal from './components/ZyInfoEditModal.vue';
import YyzyListModal from '/@/views/zy/zyInfo/YyzyListModal.vue'; import YyzyListModal from '/@/views/zy/zyInfo/YyzyListModal.vue';
import ZyCyFenxiangListModal from '/@/views/zy/zyCyFenxiang/ZyCyFenxiangListModal.vue';
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl; const baseApiUrl = globSetting.domainUrl;
@ -666,6 +669,7 @@ const XxhbbksListModalPage = ref();
const registerEditModal = ref(); const registerEditModal = ref();
const registerDetialModal = ref(); const registerDetialModal = ref();
const YyzyListModalPage = ref(); const YyzyListModalPage = ref();
const ZyCyFenxiangListModalpage = ref();
const pdfUrl = ref('/downPath/ylhpsf.pdf'); const pdfUrl = ref('/downPath/ylhpsf.pdf');
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
@ -714,6 +718,16 @@ function handleYyzy() {
YyzyListModalPage.value.disableSubmit = true; YyzyListModalPage.value.disableSubmit = true;
YyzyListModalPage.value.init(params); YyzyListModalPage.value.init(params);
} }
//
function handleFenxiang(record){
console.log(record);
record.type="0";
ZyCyFenxiangListModalpage.value.init(record)
ZyCyFenxiangListModalpage.value.disableSubmit = true;
}
// //
function handleCallYinyong(record) { function handleCallYinyong(record) {
console.log('👯‍♂️', record); console.log('👯‍♂️', record);

View File

@ -524,6 +524,8 @@
<a-divider type="vertical" /> --> <a-divider type="vertical" /> -->
<a @click="handleEdit(item, true)" v-if="item.ytjnum > 0" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a> <a @click="handleEdit(item, true)" v-if="item.ytjnum > 0" class="home-status"><Icon icon="ant-design:form-outlined" />编辑作业</a>
<a-divider type="vertical" v-if="item.ytjnum > 0"/> <a-divider type="vertical" v-if="item.ytjnum > 0"/>
<a @click="handleFenxiang(item)" class="home-status"><Icon icon="ant-design:share-alt-outlined" />分享</a>
<a-divider type="vertical" />
<a @click="handleChehui(item)" v-if="item.dpynum == 0 && item.ypynum == 0" class="home-status"><Icon icon="ant-design:import-outlined" />撤回作业</a> <a @click="handleChehui(item)" v-if="item.dpynum == 0 && item.ypynum == 0" class="home-status"><Icon icon="ant-design:import-outlined" />撤回作业</a>
<a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0"/> <a-divider type="vertical" v-if="item.dpynum == 0 && item.ypynum == 0"/>
<a @click="handleZyxx(item, '')" class="home-status"><Icon icon="ant-design:file-done-outlined" />批阅作业</a> <a @click="handleZyxx(item, '')" class="home-status"><Icon icon="ant-design:file-done-outlined" />批阅作业</a>
@ -577,6 +579,7 @@
<ZyInfoStudentModal ref="ZyInfoStudentModalPage"></ZyInfoStudentModal> <ZyInfoStudentModal ref="ZyInfoStudentModalPage"></ZyInfoStudentModal>
<XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal> <XxhbbksListModal ref="XxhbbksListModalPage"></XxhbbksListModal>
<YyzyListModal ref="YyzyListModalPage" @success="handleCallYinyong"></YyzyListModal> <YyzyListModal ref="YyzyListModalPage" @success="handleCallYinyong"></YyzyListModal>
<ZyCyFenxiangListModal ref="ZyCyFenxiangListModalpage"></ZyCyFenxiangListModal>
<a-modal v-model:visible="imgvisible" title="图片预览" width="800px" :cancelText="`关闭`" :okButtonProps="{ class: { 'jee-hidden': true } }"> <a-modal v-model:visible="imgvisible" title="图片预览" width="800px" :cancelText="`关闭`" :okButtonProps="{ class: { 'jee-hidden': true } }">
<div style="padding: 10px 20px"> <div style="padding: 10px 20px">
@ -626,6 +629,7 @@ import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStude
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue'; import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
import ZyInfoEditModal from './components/ZyInfoEditModal.vue'; import ZyInfoEditModal from './components/ZyInfoEditModal.vue';
import YyzyListModal from '/@/views/zy/zyInfo/YyzyListModal.vue'; import YyzyListModal from '/@/views/zy/zyInfo/YyzyListModal.vue';
import ZyCyFenxiangListModal from '/@/views/zy/zyCyFenxiang/ZyCyFenxiangListModal.vue';
import { encryptByBase64 } from '/@/utils/cipher'; import { encryptByBase64 } from '/@/utils/cipher';
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
@ -680,6 +684,7 @@ const registerEditModal = ref();
const registerDetialModal = ref(); const registerDetialModal = ref();
const registerPiyueModal = ref(); const registerPiyueModal = ref();
const YyzyListModalPage = ref(); const YyzyListModalPage = ref();
const ZyCyFenxiangListModalpage = ref();
const pdfUrl = ref('/downPath/ylhpsf.pdf'); const pdfUrl = ref('/downPath/ylhpsf.pdf');
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
@ -739,6 +744,17 @@ function handleCallYinyong(record) {
zyInfo.value = record; zyInfo.value = record;
console.log('😠', zyInfo); console.log('😠', zyInfo);
} }
//
function handleFenxiang(record){
// console.log(record);
record.type="0";
ZyCyFenxiangListModalpage.value.init(record)
ZyCyFenxiangListModalpage.value.disableSubmit = true;
// defHttp.get({url:'/zyInfoStudent/zyInfoStudent/cxccByZyId'}).then(res=>{
// console.log("🚀 ~ defHttp.get ~ res:", res)
// })
}
// //
function handleXshpkg(record) { function handleXshpkg(record) {