2023年4月12日 修复问题
This commit is contained in:
parent
f23ffa74d2
commit
5c9b2f5cfe
|
@ -11,6 +11,7 @@
|
|||
|
||||
<title><%= title %></title>
|
||||
<link rel="icon" href="/logo.png" />
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
|
||||
<!-- 全局配置 -->
|
||||
<script>
|
||||
window._CONFIG = {};
|
||||
|
|
|
@ -25,7 +25,7 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '授课教师',
|
||||
align: "center",
|
||||
dataIndex: 'skjs_dictText'
|
||||
dataIndex: 'skjs'
|
||||
},
|
||||
{
|
||||
title: '学科人数',
|
||||
|
|
|
@ -57,6 +57,8 @@
|
|||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" @click="handleEdit" preIcon="ant-design:plus-outlined"> 修改</a-button>
|
||||
<a-button type="danger" @click="batchHandleDelete" preIcon="ant-design:delete-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">
|
||||
|
@ -174,7 +176,12 @@
|
|||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
function handleEdit() {
|
||||
let record = selectedRows.value[0];
|
||||
if(!record){
|
||||
createMessage.error('请您至少选择一条记录进行操作。');
|
||||
return;
|
||||
}
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
@ -198,6 +205,11 @@
|
|||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
let record = selectedRows.value[0];
|
||||
if(!record){
|
||||
createMessage.error('请您至少选择一条记录进行操作。');
|
||||
return;
|
||||
}
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,13 +47,14 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '课程链接',
|
||||
align: "center",
|
||||
dataIndex: 'kclj'
|
||||
},
|
||||
{
|
||||
title: '开课周次',
|
||||
align: "center",
|
||||
dataIndex: 'kkzc_dictText'
|
||||
dataIndex: 'kclj',
|
||||
slots: { customRender: 'toUrl' },
|
||||
},
|
||||
// {
|
||||
// title: '开课周次',
|
||||
// align: "center",
|
||||
// dataIndex: 'kkzc_dictText'
|
||||
// },
|
||||
];
|
||||
|
||||
//查询数据
|
||||
|
|
|
@ -34,11 +34,12 @@
|
|||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="danger" @click="batchHandleDelete" preIcon="ant-design:delete-outlined">删除</a-button>
|
||||
<a-button type="primary" @click="handleEditPtxx" preIcon="ant-design:plus-outlined"> 修改平台信息</a-button>
|
||||
<a-button type="primary" @click="handleEditTeacher" 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">
|
||||
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
|
@ -50,7 +51,7 @@
|
|||
<a-button>批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</a-dropdown> -->
|
||||
</template>
|
||||
<!-- 不显示【未选中任何数据】栏 -->
|
||||
<template #tableTop><span></span></template>
|
||||
|
@ -62,6 +63,14 @@
|
|||
<template #htmlSlot="{text}">
|
||||
<div v-html="text"></div>
|
||||
</template>
|
||||
<template #toUrl="{ text }">
|
||||
<a-tooltip placement="left" trigger="click">
|
||||
<template #title>
|
||||
<a :href="text" target="_blank" style="color:white;">{{ text }}</a>
|
||||
</template>
|
||||
<a-button type="primary">查看</a-button>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<!--省市区字段回显插槽-->
|
||||
<!--<template #pcaSlot="{text}">
|
||||
{{ getAreaTextByCode(text) }}
|
||||
|
@ -220,6 +229,11 @@
|
|||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
let record = selectedRows.value[0];
|
||||
if(!record){
|
||||
createMessage.error('请您至少选择一条记录进行操作。');
|
||||
return;
|
||||
}
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开课单位" v-bind="validateInfos.kkdw">
|
||||
<j-dict-select-tag v-model:value="formData.kkdw" dictCode="" placeholder="请选择开课单位" :disabled="disabled"/>
|
||||
<j-dict-select-tag v-model:value="formData.kkdw" dictCode="tkrszdw_view,college,college" placeholder="请选择开课单位" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<template v-if="type == 'all' || type == 'js'">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开课单位" v-bind="validateInfos.kkdw">
|
||||
<j-dict-select-tag v-model:value="formData.kkdw" dictCode="" placeholder="请选择开课单位" :disabled="disabled"/>
|
||||
<j-dict-select-tag v-model:value="formData.kkdw" dictCode="tkrszdw_view,college,college" placeholder="请选择开课单位" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
|
|
|
@ -43,6 +43,11 @@ enum Api {
|
|||
const tingKeZuJiAddModal = ref();
|
||||
const viewModal = ref();
|
||||
|
||||
const props = defineProps({
|
||||
queryParam: { type: Object, default: () => ({}) },
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
|
@ -51,14 +56,23 @@ const listApi = (params) => defHttp.get({ url: Api.list, params });
|
|||
|
||||
const list = ref<any>([]);
|
||||
onMounted(() => {
|
||||
listApi({ userid: getUserId(), tingketime: getSysConfig().bxqkssj }).then(res => {
|
||||
|
||||
console.log(`🚀 ---------------------------------------------🚀`);
|
||||
console.log(`🚀 ~ file: index.vue:57 ~ listApi ~ res:`, res);
|
||||
console.log(`🚀 ---------------------------------------------🚀`);
|
||||
init();
|
||||
});
|
||||
|
||||
function init() {
|
||||
console.log('init');
|
||||
listApi({ userid: getUserId(), tingketime: getSysConfig().bxqkssj, ...props.queryParam }).then(res => {
|
||||
list.value = res ?? [];
|
||||
});
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
console.log('onSearch');
|
||||
init();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
onSearch
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<a-date-picker placeholder="请选择结束日期" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" v-model:value="queryParam.startDate" style="width: 100%" />
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }" class="dictBox">
|
||||
<j-dict-select-tag v-model:value="queryParam.kkdw" dictCode="" placeholder="请选择院系" style="width: 100%;"/>
|
||||
<j-dict-select-tag v-model:value="queryParam.kkdw" dictCode="tkrszdw_view,college,college" placeholder="请选择院系" style="width: 100%;"/>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }" class="dictBox">
|
||||
<j-dict-select-tag v-model:value="queryParam.hh" dictCode="skjc" placeholder="请选择节次" style="width: 100%;"/>
|
||||
|
@ -24,18 +24,20 @@
|
|||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-select style="width: 100%;" v-model:value="queryParam.pj">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option value="未评价">未评价</a-select-option>
|
||||
<a-select-option value="已评价">已评价</a-select-option>
|
||||
<a-select-option value="0">未评价</a-select-option>
|
||||
<a-select-option value="1">已评价</a-select-option>
|
||||
</a-select>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-input placeholder="输入课程名或教师名……" v-model:value="queryParam.searchInput" style="width: 100%" />
|
||||
<!-- <a-input placeholder="输入课程名或教师名……" v-model:value="queryParam.searchInput" style="width: 100%" /> -->
|
||||
<a-input-search v-model:value="queryParam.searchInput" placeholder="输入课程名或教师名……" enter-button @search="onSearch"/>
|
||||
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider class="divider"/>
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<listPage/>
|
||||
<listPage ref="listRef" :queryParam="queryParam"/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
|
@ -56,6 +58,13 @@ import { getSysConfig } from '/@/views/site/utils/index';
|
|||
|
||||
const queryParam = ref<any>({ startDate: getSysConfig().bxqkssj, endDate: getSysConfig().bxqjssj, pj: '' });
|
||||
|
||||
const listRef = ref();
|
||||
|
||||
function onSearch(){
|
||||
console.log('onSearch -A',listRef);
|
||||
listRef.value.onSearch();
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
#siteMain {
|
||||
|
|
Loading…
Reference in New Issue