添加系统配置取值

This commit is contained in:
yangjun 2023-04-10 23:14:07 +08:00
parent bcfb206506
commit f23ffa74d2
18 changed files with 839 additions and 17 deletions

View File

@ -1,5 +1,6 @@
<template>
<div style="max-width: 1430px;">
<!-- 本页面废弃 -->
<a-row>
<a-col :span="16">
<tpkztj ref="tpkztjModal"></tpkztj>

View File

@ -25,6 +25,7 @@ import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectT
import tkfglTjt from '/@/views/kc/index/tpkfgl/tpkfglTjt.vue';
import { dateFormat } from '/@/utils/common/compUtils';
import { defHttp } from '/@/utils/http/axios';
import { getSysConfig } from '/@/views/site/utils/index';
const barMultiData = reactive<any>([]);
const queryParam = ref<any>({});
@ -33,7 +34,7 @@ const list = (queryParam) => defHttp.get({ url: '/kcTingke/kcTingke/getIndexTpkf
//
onMounted(() => {
const format = 'yyyy-MM-dd';
const startTime = new Date('2023-02-19');
const startTime = new Date(getSysConfig().bxqkssj);
queryParam.value.startTime = dateFormat(startTime, format)
queryParam.value.endTime = dateFormat(new Date(), format)
loadData()

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/kcSysConfig/kcSysConfig/list',
save='/kcSysConfig/kcSysConfig/add',
edit='/kcSysConfig/kcSysConfig/edit',
deleteOne = '/kcSysConfig/kcSysConfig/delete',
deleteBatch = '/kcSysConfig/kcSysConfig/deleteBatch',
importExcel = '/kcSysConfig/kcSysConfig/importExcel',
exportXls = '/kcSysConfig/kcSysConfig/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,92 @@
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: 'bxqkssj'
},
{
title: '本学期课程结束时间',
align: "center",
dataIndex: 'bxqjssj'
},
{
title: '预留字段1',
align: "center",
dataIndex: 'flag1'
},
{
title: '预留字段2',
align: "center",
dataIndex: 'flag2'
},
{
title: '预留字段3',
align: "center",
dataIndex: 'flag3'
},
{
title: '预留字段4',
align: "center",
dataIndex: 'flag4'
},
{
title: '预留字段5',
align: "center",
dataIndex: 'flag5'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '本学期课程开始时间',
field: 'bxqkssj',
component: 'Input',
},
{
label: '本学期课程结束时间',
field: 'bxqjssj',
component: 'Input',
},
{
label: '预留字段1',
field: 'flag1',
component: 'Input',
},
{
label: '预留字段2',
field: 'flag2',
component: 'Input',
},
{
label: '预留字段3',
field: 'flag3',
component: 'Input',
},
{
label: '预留字段4',
field: 'flag4',
component: 'Input',
},
{
label: '预留字段5',
field: 'flag5',
component: 'Input',
},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
];

View File

@ -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>
<!-- 表单区域 -->
<KcSysConfigModal ref="registerModal" @success="handleSuccess"></KcSysConfigModal>
</div>
</template>
<script lang="ts" name="kcSysConfig-kcSysConfig" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns } from './KcSysConfig.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcSysConfig.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import KcSysConfigModal from './components/KcSysConfigModal.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>

View File

@ -0,0 +1,163 @@
<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.bxqkssj">
<a-input v-model:value="formData.bxqkssj" placeholder="请输入本学期课程开始时间" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="本学期课程结束时间" v-bind="validateInfos.bxqjssj">
<a-input v-model:value="formData.bxqjssj" placeholder="请输入本学期课程结束时间" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段1" v-bind="validateInfos.flag1">
<a-input v-model:value="formData.flag1" placeholder="请输入预留字段1" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段2" v-bind="validateInfos.flag2">
<a-input v-model:value="formData.flag2" placeholder="请输入预留字段2" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段3" v-bind="validateInfos.flag3">
<a-input v-model:value="formData.flag3" placeholder="请输入预留字段3" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段4" v-bind="validateInfos.flag4">
<a-input v-model:value="formData.flag4" placeholder="请输入预留字段4" :disabled="disabled"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段5" v-bind="validateInfos.flag5">
<a-input v-model:value="formData.flag5" placeholder="请输入预留字段5" :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 '../KcSysConfig.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: '',
bxqkssj: '',
bxqjssj: '',
flag1: '',
flag2: '',
flag3: '',
flag4: '',
flag5: '',
});
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,185 @@
<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.bxqkssj">
<a-input v-model:value="formData.bxqkssj" placeholder="请输入本学期课程开始时间" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="本学期课程结束时间" v-bind="validateInfos.bxqjssj">
<a-input v-model:value="formData.bxqjssj" placeholder="请输入本学期课程结束时间" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段1" v-bind="validateInfos.flag1">
<a-input v-model:value="formData.flag1" placeholder="请输入预留字段1" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段2" v-bind="validateInfos.flag2">
<a-input v-model:value="formData.flag2" placeholder="请输入预留字段2" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段3" v-bind="validateInfos.flag3">
<a-input v-model:value="formData.flag3" placeholder="请输入预留字段3" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段4" v-bind="validateInfos.flag4">
<a-input v-model:value="formData.flag4" placeholder="请输入预留字段4" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="预留字段5" v-bind="validateInfos.flag5">
<a-input v-model:value="formData.flag5" placeholder="请输入预留字段5" ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="" style="text-align: center;">
<a-button type="primary" @click="submitForm">保存</a-button>
</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 '../KcSysConfig.api';
import { Form } from 'ant-design-vue';
import { getSysConfig } from '/@/views/site/utils/index';
const queryParam = ref<any>({});
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: '',
bxqkssj: '',
bxqjssj: '',
flag1: '',
flag2: '',
flag3: '',
flag4: '',
flag5: '',
});
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;
});
const list = (queryParam) => defHttp.get({ url: '/kcSysConfig/kcSysConfig/queryById', params:queryParam });
//
onMounted(() => {
queryParam.value.id = '1';
console.log(`🚀 ~ file: KcSysConfigMain.vue:106 ~ onMounted ~ sysInfo:`,getSysConfig().bxqkssj)
// loadData()`
edit(getSysConfig())
});
function loadData(){
list(queryParam.value).then(res=>{
edit(res)
})
}
/**
* 新增
*/
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="关闭">
<KcSysConfigForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcSysConfigForm>
</a-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcSysConfigForm from './KcSysConfigForm.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

@ -35,6 +35,7 @@ import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectT
import tkfglTjt from '/@/views/kc/pktj/pkfgl/pkfglTjt.vue';
import { dateFormat } from '/@/utils/common/compUtils';
import { defHttp } from '/@/utils/http/axios';
import { getSysConfig } from '/@/views/site/utils/index';
const barMultiData = reactive<any>([]);
const queryParam = ref<any>({});
@ -43,7 +44,7 @@ const list = (queryParam) => defHttp.get({ url: '/qa/kcEvaluation/getPkfglTjt',
//
onMounted(() => {
const format = 'yyyy-MM-dd';
const startTime = new Date('2023-02-19');
const startTime = new Date(getSysConfig().bxqkssj);
queryParam.value.startTime = dateFormat(startTime, format)
queryParam.value.endTime = dateFormat(new Date(), format)
loadData()

View File

@ -35,6 +35,7 @@ import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectT
import tkfglTjt from '/@/views/kc/tktj/tkfgl/tkfglTjt.vue';
import { dateFormat } from '/@/utils/common/compUtils';
import { defHttp } from '/@/utils/http/axios';
import { getSysConfig } from '/@/views/site/utils/index';
const barMultiData = reactive<any>([]);
const queryParam = ref<any>({});
@ -43,7 +44,7 @@ const list = (queryParam) => defHttp.get({ url: '/kcTingke/kcTingke/getTkfglList
//
onMounted(() => {
const format = 'yyyy-MM-dd';
const startTime = new Date('2023-02-19');
const startTime = new Date(getSysConfig().bxqkssj);
queryParam.value.startTime = dateFormat(startTime, format)
queryParam.value.endTime = dateFormat(new Date(), format)
loadData()

View File

@ -29,6 +29,7 @@
<script lang="ts" name="kcTingke-zxdt" setup>
import { ref, reactive, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { getSysConfig } from '/@/views/site/utils/index';
enum Api {
list = '/kcTingke/kcTingke/getHtindexTkmxlist',
}
@ -43,7 +44,7 @@ let pageJs = ref<any>(5);
let pageNo = ref<any>(1);
//
onMounted(() => {
queryParam.value.skrq = '2023-02-19'
queryParam.value.skrq = getSysConfig().bxqkssj
queryParam.value.pageKs = pageKs.value
queryParam.value.pageJs = pageJs.value
loadData()

View File

@ -89,15 +89,16 @@ watch(() => props.queryParam, async (newRow, oldRow) => {
//
function rkbLoadData() {
var newRow = ref<any>({});
console.log(`🚀 ~ fi1111111111111111111111111111ow:`)
newRow = props.queryParam;
newRow.userid = getUserId();
newRow.pageSize = -1
listType = newRow.type
list(newRow).then(res => {
listData.value = res.records;
emit('setTotal', res.records.length);
})
if(newRow.hh!=","){
listType = newRow.type
list(newRow).then(res => {
listData.value = res.records;
emit('setTotal', res.records.length);
})
}
}
//
async function funYuyue(record){

View File

@ -1,8 +1,14 @@
<template>
<div>
<div style="color:#1c84c6;font-weight: 600;font-size: 16px;">
<div style="color:#1c84c6;font-weight: 600;font-size: 16px;" v-show="queryParam.jieci">
以下是 <span>{{queryParam.ywTime}}</span><span>{{queryParam.jieci}}节课</span> 的课表
</div>
<div style="color:#1c84c6;font-weight: 600;font-size: 16px;" v-show="!queryParam.jieci">
现在是 <span>{{queryParam.ywTime}}</span> 非上课时段
</div>
<a-row style="margin-top:20px;">
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
<a-form-item label="" style="padding: 10px;">

View File

@ -31,7 +31,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { TeamOutlined, FormOutlined } from '@ant-design/icons-vue';
import { getUserId } from '/@/views/site/utils/index';
import { getUserId,getSysConfig } from '/@/views/site/utils/index';
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
import viewModalPage from '/@/views/site/tingKeZuJi/components/viewModal.vue';
@ -51,7 +51,7 @@ const listApi = (params) => defHttp.get({ url: Api.list, params });
const list = ref<any>([]);
onMounted(() => {
listApi({ userid: getUserId(), tingketime: '2023-02-19' }).then(res => {
listApi({ userid: getUserId(), tingketime: getSysConfig().bxqkssj }).then(res => {
console.log(`🚀 ---------------------------------------------🚀`);
console.log(`🚀 ~ file: index.vue:57 ~ listApi ~ res:`, res);

View File

@ -52,8 +52,9 @@ import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import listPage from '/@/views/site/tingKeZuJi/list.vue';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getSysConfig } from '/@/views/site/utils/index';
const queryParam = ref<any>({ startDate: '2023-02-19', endDate: '2023-02-19', pj: '' });
const queryParam = ref<any>({ startDate: getSysConfig().bxqkssj, endDate: getSysConfig().bxqjssj, pj: '' });
</script>
<style lang="less" scoped>

View File

@ -93,7 +93,6 @@ import { defHttp } from '/@/utils/http/axios';
import { useRoute } from 'vue-router'
import { useMessage } from '/@/hooks/web/useMessage';
import { getUserId } from '/@/views/site/utils';
// const queryParam = ref<any>({ startDate: '2023-02-19', endDate: '2023-02-19', pj: '' });
enum Api {
queryById = '/ktgl/kcKetangbiao/queryById',

View File

@ -1,3 +1,10 @@
import { defHttp } from '/@/utils/http/axios';
export const getUserId = () => {
return '2016900057';
}
}
// export const getSysConfig = () => defHttp.get({ url: '/kcSysConfig/kcSysConfig/queryById', params:{id:'1'} })
export const getSysConfig = () => ({bxqkssj:'2023-02-19',bxqjssj:'2023-07-19'})

View File

@ -114,6 +114,7 @@ import { downloadByUrl } from '/@/utils/file/download';
import { dateFormat } from '/@/utils/common/compUtils';
import { getUserId } from '/@/views/site/utils/index';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getSysConfig } from '/@/views/site/utils/index';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
@ -132,7 +133,7 @@ let listData = ref<any>([]);
//
onMounted(() => {
const format = 'yyyy-MM-dd';
const startTime = new Date('2023-02-19');
const startTime = new Date(getSysConfig().bxqkssj);
queryParam.value.startTime = dateFormat(startTime, format)
queryParam.value.endTime = dateFormat(new Date(), format)
queryParam.value.isdeleted = '0'