修改bug

This commit is contained in:
yangjun 2023-04-15 15:53:53 +08:00
parent 851c0ed661
commit aec98d498b
10 changed files with 815 additions and 71 deletions

View File

@ -0,0 +1,160 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable">
<template #tableTitle>
<div></div>
</template>
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
</div>
</template>
<script lang="ts" name="kcErrorreport-kcErrorreport" setup>
import { ref, reactive,defineExpose, createVNode,h } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { jscjcolumns } from './KcErrorreport.data';
import { list } from './KcErrorreport.api';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined,CheckOutlined } from '@ant-design/icons-vue';
const queryParam = ref<any>({});
//table
const { tableContext } = useListPage({
tableProps: {
title: 'kc_errorreport',
api: list,
columns:jscjcolumns,
canResize:false,
useSearchForm: false,
immediate: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
});
const [registerTable, { reload}, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
function zbLoadData(queryParamPar){
console.log(`🚀 ~ file: ZbptErrorList.vue:46 ~ zbLoadData ~ queryParamPar:`, queryParamPar)
queryParam.value.startTime = queryParamPar.startTime
queryParam.value.endTime = queryParamPar.endTime
queryParam.value.kkdw = queryParamPar.kkdw
queryParam.value.optionsradios = queryParamPar.optionsradios
console.log(`🚀 ~ file: ZbptErrorList.vue:50 ~ zbLoadData ~ queryParam:`, queryParam)
searchQuery()
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '未处理',
onClick: handleEdit.bind(null, record),
},
];
}
function handleEdit(record: Recordable) {
Modal.confirm({
icon: createVNode({}),
content: h('div', {style:'height:300px;text-align:center;'}, [
h('icon', {style:'font-size:100px;font-weight:600;color:#C9DAE1;'}, createVNode(ExclamationCircleOutlined)),
h('p',{style:'font-size:36px;font-weight:600;color:black;'}, '状态确认'),
h('p',{style:'color: #8b949e;'}, '请确认错误报告是否处理完成。'),
]),
okText: '确认',
cancelText: '取消',
width:'500px',
onOk: () => submit(record)
});
}
function submit(...data){
console.log(`🚀 ~ file: ZbptErrorList.vue:95 ~ submit ~ data:`, ...data)
Modal.success({
icon: createVNode({}),
content: h('div', {style:'height:200px;text-align:center;'}, [
h('icon', {style:'font-size:100px;font-weight:600;color:green;'}, createVNode(CheckOutlined)),
h('p',{style:'font-size:36px;font-weight:600;color:black;'}, '操作成功'),
]),
okText: 'OK',
width:'500px',
onOk: () => searchQuery()
});
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
defineExpose({
zbLoadData
});
</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>
<style>
.jeecg-basic-table .ant-table-wrapper .ant-table-title{
min-height: 0px;
padding: 0 !important;
}
</style>

View File

@ -5,14 +5,34 @@ import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '报错',
title: '报错时间',
align: "center",
dataIndex: 'subper'
dataIndex: 'reportstime'
},
{
title: '错误类型',
title: '报错人姓名',
align: "center",
dataIndex: 'optionsradios_dictText'
dataIndex: 'username'
},
{
title: '报错课程',
align: "center",
dataIndex: 'kcmc'
},
{
title: '开课单位',
align: "center",
dataIndex: 'kkdw'
},
{
title: '上课日期',
align: "center",
dataIndex: 'skrq'
},
{
title: '上课节次',
align: "center",
dataIndex: 'hh'
},
{
title: '会议号',
@ -25,32 +45,132 @@ export const columns: BasicColumn[] = [
dataIndex: 'meetingpsw'
},
{
title: '会议邀请链接',
title: '课程链接',
align: "center",
dataIndex: 'meetinglink'
},
{
title: '修改类型0-本堂课修改1-',
title: '修改方式',
align: "center",
dataIndex: 'edittype_dictText'
},
];
export const kcxxcolumns: BasicColumn[] = [
{
title: '是否修改0-未修改1-已修改',
title: '报错时间',
align: "center",
dataIndex: 'ismodified'
dataIndex: 'reportstime'
},
{
title: '课程的上课日期',
title: '报错人工号',
align: "center",
dataIndex: 'userid'
},
{
title: '报错人姓名',
align: "center",
dataIndex: 'username'
},
{
title: '报错人单位',
align: "center",
dataIndex: 'college'
},
{
title: '报错课程',
align: "center",
dataIndex: 'kcmc'
},
{
title: '开课单位',
align: "center",
dataIndex: 'kkdw'
},
{
title: '上课日期',
align: "center",
dataIndex: 'skrq'
},
{
title: '是否出镜0-出镜1-不出镜',
title: '上课节次',
align: "center",
dataIndex: 'sfcj'
dataIndex: 'hh'
},
{
title: '错误信息描述',
align: "center",
dataIndex: 'errortext'
},
{
title: '修改方式',
align: "center",
dataIndex: 'edittype_dictText'
},
];
export const jscjcolumns: BasicColumn[] = [
{
title: '报错时间',
align: "center",
dataIndex: 'reportstime'
},
{
title: '报错人工号',
align: "center",
dataIndex: 'userid'
},
{
title: '报错人姓名',
align: "center",
dataIndex: 'username'
},
{
title: '报错人单位',
align: "center",
dataIndex: 'college'
},
{
title: '报错课程',
align: "center",
dataIndex: 'kcmc'
},
{
title: '开课单位',
align: "center",
dataIndex: 'kkdw'
},
{
title: '上课日期',
align: "center",
dataIndex: 'skrq'
},
{
title: '上课节次',
align: "center",
dataIndex: 'hh'
},
{
title: '要求是否出境',
align: "center",
dataIndex: 'ktbsfcj_dictText'
},
{
title: '当前是否出境',
align: "center",
dataIndex: 'sfcj_dictText'
},
{
title: '修改方式',
align: "center",
dataIndex: 'edittype_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];

View File

@ -0,0 +1,126 @@
<template>
<div style="background-color: #fff;padding:20px">
<div><span style="font-size: 24px;font-weight: 600;">报错明细表</span></div>
<div>
<a-form @keyup.enter.native="searchQuery" :model="queryParam" >
<a-row :gutter="24">
<a-col :span="4">
<a-form-item label="">
<JDictSelectTag placeholder="报错人所在单位" v-model:value="queryParam.kkdw" :dictCode="`tkrszdw_view,college,college`"/>
</a-form-item>
</a-col>
<a-col :span="3">
<a-form-item label="">
<a-date-picker
:showTime="false"
valueFormat="YYYY-MM-DD"
:placeholder="'请选择开始时间'"
v-model:value="queryParam.startTime"
></a-date-picker>
</a-form-item>
</a-col>
<a-col :span="3">
<a-form-item label="">
<a-date-picker
:showTime="false"
valueFormat="YYYY-MM-DD"
:placeholder="'请选择结束时间'"
v-model:value="queryParam.endTime"
></a-date-picker>
</a-form-item>
</a-col>
<a-col :span="4">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<div>
<a-tabs v-model:activeKey="activeKey" type="card" @change="kclbCard">
<a-tab-pane key="1">
<template #tab>直播平台错误</template>
<div>
<ZbptErrorList ref="ZbptErrorListModel"></ZbptErrorList>
</div>
</a-tab-pane>
<a-tab-pane key="2" >
<template #tab>课程信息错误</template>
<div>
<KcxxErrorList ref="KcxxErrorListModel"></KcxxErrorList>
</div>
</a-tab-pane>
<a-tab-pane key="3">
<template #tab>教师处境信息错误</template>
<div>
<JscjErrorList ref="JscjErrorListModel"></JscjErrorList>
</div>
</a-tab-pane>
</a-tabs>
</div>
</div>
</template>
<script lang="ts" name="kcErrorreport-kcErrorreport" setup>
import { ref, reactive, onMounted } from 'vue';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import ZbptErrorList from '/@/views/kc/kcErrorreport/ZbptErrorList.vue';
import KcxxErrorList from '/@/views/kc/kcErrorreport/KcxxErrorList.vue';
import JscjErrorList from '/@/views/kc/kcErrorreport/JscjErrorList.vue';
import { dateFormat } from '/@/utils/common/compUtils';
const ZbptErrorListModel = ref();
const KcxxErrorListModel = ref();
const JscjErrorListModel = ref();
const queryParam = ref<any>({});
const activeKey = ref<any>('1')
//
onMounted(() => {
const format = 'yyyy-MM-dd';
const startTime = new Date();
startTime.setTime(startTime.getTime()-60000*60*24*7);
console.log(`🚀 ~ file: KcErrorreportListMain.vue:81 ~ onMounted ~ queryParam:`, queryParam)
queryParam.value.startTime = dateFormat(startTime, format);
queryParam.value.endTime = dateFormat(new Date(), format);
console.log(`🚀 ~ file: KcErrorreportListMain.vue:83 ~ onMounted ~ queryParam:`, queryParam)
queryParam.value.optionsradios = 'errohyhmm';
ZbptErrorListModel.value.zbLoadData(queryParam.value);
});
function kclbCard(activeKey){
console.log(`🚀 ~ file: KcErrorreportListMain.vue:83 ~ kclbCard ~ activeKey:`, activeKey)
if(activeKey==1){
queryParam.value.optionsradios = "errohyhmm";
ZbptErrorListModel.value.zbLoadData(queryParam.value);
}else if(activeKey==2){
queryParam.value.optionsradios = "errokcxx";
KcxxErrorListModel.value.zbLoadData(queryParam.value);
}else if(activeKey==3){
queryParam.value.optionsradios = "errosfcj";
JscjErrorListModel.value.zbLoadData(queryParam.value);
}
}
/**
* 查询
*/
function searchQuery() {
console.log(`🚀 ~ file: KcErrorreportListMain.vue:83 ~ kclbCard ~ activeKey:`, activeKey.value)
let lsxx = activeKey.value;
if(lsxx==1){
queryParam.value.optionsradios = "errohyhmm";
ZbptErrorListModel.value.zbLoadData(queryParam.value);
}else if(lsxx==2){
queryParam.value.optionsradios = "errokcxx";
KcxxErrorListModel.value.zbLoadData(queryParam.value);
}else if(lsxx==3){
queryParam.value.optionsradios = "errosfcj";
JscjErrorListModel.value.zbLoadData(queryParam.value);
}
}
</script>
<style lang="less" scoped>
</style>

View File

@ -0,0 +1,160 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable">
<template #tableTitle>
<div></div>
</template>
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
</div>
</template>
<script lang="ts" name="kcErrorreport-kcErrorreport" setup>
import { ref, reactive,defineExpose, createVNode,h } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { kcxxcolumns } from './KcErrorreport.data';
import { list } from './KcErrorreport.api';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined,CheckOutlined } from '@ant-design/icons-vue';
const queryParam = ref<any>({});
//table
const { tableContext } = useListPage({
tableProps: {
title: 'kc_errorreport',
api: list,
columns:kcxxcolumns,
canResize:false,
useSearchForm: false,
immediate: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
});
const [registerTable, { reload}, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
function zbLoadData(queryParamPar){
console.log(`🚀 ~ file: ZbptErrorList.vue:46 ~ zbLoadData ~ queryParamPar:`, queryParamPar)
queryParam.value.startTime = queryParamPar.startTime
queryParam.value.endTime = queryParamPar.endTime
queryParam.value.kkdw = queryParamPar.kkdw
queryParam.value.optionsradios = queryParamPar.optionsradios
console.log(`🚀 ~ file: ZbptErrorList.vue:50 ~ zbLoadData ~ queryParam:`, queryParam)
searchQuery()
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '未处理',
onClick: handleEdit.bind(null, record),
},
];
}
function handleEdit(record: Recordable) {
Modal.confirm({
icon: createVNode({}),
content: h('div', {style:'height:300px;text-align:center;'}, [
h('icon', {style:'font-size:100px;font-weight:600;color:#C9DAE1;'}, createVNode(ExclamationCircleOutlined)),
h('p',{style:'font-size:36px;font-weight:600;color:black;'}, '状态确认'),
h('p',{style:'color: #8b949e;'}, '请确认错误报告是否处理完成。'),
]),
okText: '确认',
cancelText: '取消',
width:'500px',
onOk: () => submit(record)
});
}
function submit(...data){
console.log(`🚀 ~ file: ZbptErrorList.vue:95 ~ submit ~ data:`, ...data)
Modal.success({
icon: createVNode({}),
content: h('div', {style:'height:200px;text-align:center;'}, [
h('icon', {style:'font-size:100px;font-weight:600;color:green;'}, createVNode(CheckOutlined)),
h('p',{style:'font-size:36px;font-weight:600;color:black;'}, '操作成功'),
]),
okText: 'OK',
width:'500px',
onOk: () => searchQuery()
});
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
defineExpose({
zbLoadData
});
</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>
<style>
.jeecg-basic-table .ant-table-wrapper .ant-table-title{
min-height: 0px;
padding: 0 !important;
}
</style>

View File

@ -0,0 +1,160 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable">
<template #tableTitle>
<div></div>
</template>
<template #action="{ record }">
<TableAction :actions="getTableAction(record)"/>
</template>
</BasicTable>
</div>
</template>
<script lang="ts" name="kcErrorreport-kcErrorreport" setup>
import { ref, reactive,defineExpose, createVNode,h } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './KcErrorreport.data';
import { list } from './KcErrorreport.api';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined,CheckOutlined } from '@ant-design/icons-vue';
const queryParam = ref<any>({});
//table
const { tableContext } = useListPage({
tableProps: {
title: 'kc_errorreport',
api: list,
columns,
canResize:false,
immediate: false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
return Object.assign(params, queryParam.value);
},
},
});
const [registerTable, { reload}, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
function zbLoadData(queryParamPar){
console.log(`🚀 ~ file: ZbptErrorList.vue:46 ~ zbLoadData ~ queryParamPar:`, queryParamPar)
queryParam.value.startTime = queryParamPar.startTime
queryParam.value.endTime = queryParamPar.endTime
queryParam.value.kkdw = queryParamPar.kkdw
queryParam.value.optionsradios = queryParamPar.optionsradios
console.log(`🚀 ~ file: ZbptErrorList.vue:50 ~ zbLoadData ~ queryParam:`, queryParam)
searchQuery()
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '未处理',
onClick: handleEdit.bind(null, record),
},
];
}
function handleEdit(record: Recordable) {
Modal.confirm({
icon: createVNode({}),
content: h('div', {style:'height:300px;text-align:center;'}, [
h('icon', {style:'font-size:100px;font-weight:600;color:#C9DAE1;'}, createVNode(ExclamationCircleOutlined)),
h('p',{style:'font-size:36px;font-weight:600;color:black;'}, '状态确认'),
h('p',{style:'color: #8b949e;'}, '请确认错误报告是否处理完成。'),
]),
okText: '确认',
cancelText: '取消',
width:'500px',
onOk: () => submit(record)
});
}
function submit(...data){
console.log(`🚀 ~ file: ZbptErrorList.vue:95 ~ submit ~ data:`, ...data)
Modal.success({
icon: createVNode({}),
content: h('div', {style:'height:200px;text-align:center;'}, [
h('icon', {style:'font-size:100px;font-weight:600;color:green;'}, createVNode(CheckOutlined)),
h('p',{style:'font-size:36px;font-weight:600;color:black;'}, '操作成功'),
]),
okText: 'OK',
width:'500px',
onOk: () => searchQuery()
});
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
selectedRowKeys.value = [];
//
reload();
}
defineExpose({
zbLoadData
});
</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>
<style>
.jeecg-basic-table .ant-table-wrapper .ant-table-title{
min-height: 0px;
padding: 0 !important;
}
</style>

View File

@ -49,33 +49,18 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'kclj'
},
{
title: '图片名称',
align: "center",
dataIndex: 'tpmc'
},
{
title: '教师介绍链接',
align: "center",
dataIndex: 'jslj'
},
{
title: '当前状态',
align: "center",
dataIndex: 'dqzt'
},
{
title: '当前状态排序 1 正在上课 2公开课预告 3 已下课',
align: "center",
dataIndex: 'dqztpx_dictText'
},
{
title: '是否显示 1 显示 0 不显示',
title: '是否显示',
align: "center",
dataIndex: 'sfxs_dictText'
},
{
title: '类别',
title: '候选人类别',
align: "center",
dataIndex: 'hxrlb'
},

View File

@ -1,18 +1,21 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<!-- <div class="jeecg-basic-table-form-container">
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
</div> -->
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<BasicTable @register="registerTable">
<!--插槽: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>
<span style="font-size:24px;font-weight: 600;padding: 10px;">精彩公开课</span>
<span style="padding: 14px;">
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增精彩公开课</a-button>
</span>
<!-- <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>
@ -26,7 +29,7 @@
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</a-dropdown> -->
</template>
<!--操作栏-->
<template #action="{ record }">
@ -75,7 +78,7 @@
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
params.column = 'dqztpx,rq,kssj',params.order = 'asc,desc,desc';//
return Object.assign(params, queryParam.value);
},
},

View File

@ -8,8 +8,8 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="候选人" v-bind="validateInfos.hxr">
<a-input v-model:value="formData.hxr" placeholder="请输入候选人" :disabled="disabled"></a-input>
<a-form-item label="讲师姓名" v-bind="validateInfos.hxr">
<a-input v-model:value="formData.hxr" placeholder="请输入讲师姓名" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
@ -17,21 +17,6 @@
<a-input v-model:value="formData.zc" placeholder="请输入职称" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="日期" v-bind="validateInfos.rq">
<a-input v-model:value="formData.rq" placeholder="请输入日期" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开始时间" v-bind="validateInfos.kssj">
<a-input v-model:value="formData.kssj" placeholder="请输入开始时间" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="结束时间" v-bind="validateInfos.jssj">
<a-input v-model:value="formData.jssj" placeholder="请输入结束时间" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="课程名称" v-bind="validateInfos.kcmc">
<a-input v-model:value="formData.kcmc" placeholder="请输入课程名称" :disabled="disabled"></a-input>
@ -43,13 +28,23 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="课程链接">
<a-input v-model:value="formData.kclj" placeholder="请输入课程链接" :disabled="disabled"></a-input>
<a-form-item label="上课日期" v-bind="validateInfos.rq">
<a-input v-model:value="formData.rq" placeholder="请输入日期" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="图片名称" v-bind="validateInfos.tpmc">
<j-image-upload v-model:value="formData.tpmc" :disabled="disabled"></j-image-upload>
<a-form-item label="上课开始时间" v-bind="validateInfos.kssj">
<a-input v-model:value="formData.kssj" placeholder="请输入开始时间" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="上课结束时间" v-bind="validateInfos.jssj">
<a-input v-model:value="formData.jssj" placeholder="请输入结束时间" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="课程链接">
<a-input v-model:value="formData.kclj" placeholder="请输入课程链接" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
@ -57,13 +52,13 @@
<a-input v-model:value="formData.jslj" placeholder="请输入教师介绍链接" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<!-- <a-col :span="12">
<a-form-item label="当前状态" v-bind="validateInfos.dqzt">
<a-input v-model:value="formData.dqzt" placeholder="请输入当前状态" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
</a-col> -->
<a-col :span="12">
<a-form-item label="当前状态排序" v-bind="validateInfos.dqztpx">
<a-form-item label="当前状态" v-bind="validateInfos.dqztpx">
<j-dict-select-tag type='radio' v-model:value="formData.dqztpx" dictCode="dqztpx" placeholder="请选择当前状态排序" :disabled="disabled"/>
</a-form-item>
</a-col>
@ -73,8 +68,26 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="类别" v-bind="validateInfos.hxrlb">
<a-input v-model:value="formData.hxrlb" placeholder="请输入类别" :disabled="disabled"></a-input>
<a-form-item label="候选人类别" v-bind="validateInfos.hxrlb">
<a-input v-model:value="formData.hxrlb" placeholder="请输入候选人类别" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="教师图片1" v-bind="validateInfos.tpmc">
<j-image-upload v-model:value="formData.tpmc" :disabled="disabled"></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="教师图片2" v-bind="validateInfos.tpmc2">
<j-image-upload v-model:value="formData.tpmc2" :disabled="disabled"></j-image-upload>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="教师图片3" v-bind="validateInfos.tpmc3">
<j-image-upload v-model:value="formData.tpmc3" :disabled="disabled"></j-image-upload>
</a-form-item>
</a-col>
</a-row>
@ -91,6 +104,7 @@
import { saveOrUpdate } from '../KcGongkaike.api';
import { Form } from 'ant-design-vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil.js';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
@ -112,6 +126,8 @@
ktzt: '',
kclj: '',
tpmc: '',
tpmc2: '',
tpmc3: '',
jslj: '',
dqzt: '',
dqztpx: '',
@ -133,7 +149,6 @@
kcmc: [{ required: true, message: '请输入课程名称!'},],
ktzt: [{ required: true, message: '请输入课堂主题!'},],
kclj: [{ required: true, message: '请输入课程链接!'},],
dqzt: [{ required: true, message: '请输入当前状态!'},],
dqztpx: [{ required: true, message: '请输入当前状态排序 1 正在上课 2公开课预告 3 已下课!'},],
sfxs: [{ required: true, message: '请输入是否显示 1 显示 0 不显示!'},],
};
@ -194,6 +209,9 @@
}
}
}
let dqztpx = model.dqztpx
model.dqzt = filterDictTextByCache("dqztpx",dqztpx)
console.log(`🚀 ~ file: KcGongkaikeForm.vue:215 ~ submitForm ~ model:`, model)
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {

View File

@ -108,7 +108,7 @@
fixed: 'right',
},
beforeFetch: (params) => {
params.column = '',params.order = '';//
params.column = 'ontop,ndate',params.order = 'desc,desc';//
return Object.assign(params, queryParam.value);
},
},

View File

@ -9,7 +9,7 @@
</a-col>
<a-col :span="24">
<a-form-item label="类型" v-bind="validateInfos.ntype">
<j-dict-select-tag type='radio' v-model:value="formData.ntype" dictCode="ntype" placeholder="请选择类型" :disabled="disabled"/>
<j-dict-select-tag type='radio' v-model:value="formData.ntype" dictCode="ntype" placeholder="请选择类型" :disabled="disabled" @change="funntype"/>
</a-form-item>
</a-col>
<a-col :span="24">
@ -17,19 +17,19 @@
<j-dict-select-tag type='radio' v-model:value="formData.nstatus" dictCode="nstatus" placeholder="请选择状态" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-col :span="24" v-show="showNtype=='1'">
<a-form-item label="内容" v-bind="validateInfos.ncontentString">
<j-editor v-model:value="formData.ncontentString" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-col :span="24" v-show="showNtype=='0'">
<a-form-item label="链接" v-bind="validateInfos.nlink">
<a-input v-model:value="formData.nlink" placeholder="请输入链接" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="发布日期" v-bind="validateInfos.ndate">
<a-date-picker placeholder="请选择发布日期" v-model:value="formData.ndate" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
<a-date-picker placeholder="请选择发布日期" v-model:value="formData.ndate" value-format="YYYY-MM-DD" style="width: 100%" :disabled="disabled"/>
</a-form-item>
</a-col>
<a-col :span="24">
@ -51,6 +51,7 @@
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../KcNotice.api';
import { Form } from 'ant-design-vue';
import { dateFormat } from '/@/utils/common/compUtils';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
@ -63,17 +64,18 @@
const formData = reactive<Record<string, any>>({
id: '',
ntitle: '',
ntype: undefined,
nstatus: undefined,
ntype: '0',
nstatus: '0',
ncontentString: '',
nlink: '',
ndate: '',
ontop: undefined,
ndate: dateFormat(new Date(), 'yyyy-MM-dd'),
ontop: '0',
});
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);
let showNtype = ref<String>("0");
//
const validatorRules = {
ntitle: [{ required: true, message: '请输入标题!'},],
@ -95,6 +97,16 @@
});
function funntype(val){
console.log(`🚀 ~ file: KcNoticeForm.vue:98 ~ funntype ~ val:`, val)
if(val == 1){
showNtype.value = '1'
}else if(val == 0){
showNtype.value = '0'
}
}
/**
* 新增
*/