2023年6月3日 添加统计数据钻取
This commit is contained in:
parent
d9ab580422
commit
44cc5732ac
|
@ -37,7 +37,8 @@ export const columns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '听课次数',
|
title: '听课次数',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'tkxttj'
|
dataIndex: 'tkxttj',
|
||||||
|
slots: { customRender: 'openViewSlot' },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,14 @@
|
||||||
<template #htmlSlot="{text}">
|
<template #htmlSlot="{text}">
|
||||||
<div v-html="text"></div>
|
<div v-html="text"></div>
|
||||||
</template>
|
</template>
|
||||||
|
<template #openViewSlot="{ text, record }">
|
||||||
|
<template v-if="text == 0">
|
||||||
|
{{ text }}
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<a @click="openKetangView(record)">{{ text }}</a>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
<!--省市区字段回显插槽-->
|
<!--省市区字段回显插槽-->
|
||||||
<!--<template #pcaSlot="{text}">
|
<!--<template #pcaSlot="{text}">
|
||||||
{{ getAreaTextByCode(text) }}
|
{{ getAreaTextByCode(text) }}
|
||||||
|
@ -81,6 +89,8 @@
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
<KcTkcstjModal ref="registerModal" @success="handleSuccess"></KcTkcstjModal>
|
<KcTkcstjModal ref="registerModal" @success="handleSuccess"></KcTkcstjModal>
|
||||||
|
<keTangModal ref="keTangModalRef" @success="handleSuccess"></keTangModal>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -92,11 +102,13 @@
|
||||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcTkcstj.api';
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './KcTkcstj.api';
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
import KcTkcstjModal from './components/KcTkcstjModal.vue'
|
import KcTkcstjModal from './components/KcTkcstjModal.vue'
|
||||||
|
import keTangModal from './components/keTangModal.vue'
|
||||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||||
|
|
||||||
const queryParam = ref<any>({});
|
const queryParam = ref<any>({});
|
||||||
const toggleSearchStatus = ref<boolean>(false);
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
const registerModal = ref();
|
const registerModal = ref();
|
||||||
|
const keTangModalRef = ref();
|
||||||
//注册table数据
|
//注册table数据
|
||||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
tableProps: {
|
tableProps: {
|
||||||
|
@ -226,6 +238,11 @@
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openKetangView(record) {
|
||||||
|
keTangModalRef.value.disableSubmit = true;
|
||||||
|
keTangModalRef.value.view(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,159 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import {BasicColumn} from '/@/components/Table';
|
||||||
|
|
||||||
|
const queryParam = ref<any>({});
|
||||||
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
|
const registerModal = ref();
|
||||||
|
|
||||||
|
const list = (params) => defHttp.get({ url: '/qa/kcEvaluation/keTangList', params });
|
||||||
|
|
||||||
|
const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '课程名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'kcmc'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '授课教师',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'skjs'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '上课时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'sksj'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '节次',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'hh_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '周几',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'week_dictText'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
|
tableProps: {
|
||||||
|
title: '听课次数统计',
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
showActionColumn: false,
|
||||||
|
canResize:false,
|
||||||
|
useSearchForm: false,
|
||||||
|
actionColumn: {
|
||||||
|
ifShow: false,
|
||||||
|
width: 120,
|
||||||
|
fixed: 'right',
|
||||||
|
},
|
||||||
|
beforeFetch: (params) => {
|
||||||
|
params.column = '',params.order = '';//新生成的默认不带排序
|
||||||
|
params.upuserid = '-1';
|
||||||
|
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 handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
function searchQuery() {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function searchReset() {
|
||||||
|
queryParam.value = {};
|
||||||
|
selectedRowKeys.value = [];
|
||||||
|
//刷新数据
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
function view(record) {
|
||||||
|
console.log(`🚀 -----------------------------------------------------🚀`);
|
||||||
|
console.log(`🚀 ~ file: keTangForm.vue:96 ~ view ~ record:`, record);
|
||||||
|
console.log(`🚀 -----------------------------------------------------🚀`);
|
||||||
|
//添加参数
|
||||||
|
|
||||||
|
queryParam.value = {};
|
||||||
|
selectedRowKeys.value = [];
|
||||||
|
queryParam.value.upuserid = record.jgh
|
||||||
|
queryParam.value.xnxq = record.xnxq
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
view
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.jeecg-basic-table-form-container {
|
||||||
|
.table-page-search-submitButtons {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.query-group-cust{
|
||||||
|
width: calc(50% - 15px);
|
||||||
|
min-width: 100px !important;
|
||||||
|
}
|
||||||
|
.query-group-split-cust{
|
||||||
|
width: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,64 @@
|
||||||
|
<template>
|
||||||
|
<a-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
|
<baseForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></baseForm>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, nextTick, defineExpose } from 'vue';
|
||||||
|
import baseForm from './keTangForm.vue'
|
||||||
|
|
||||||
|
const title = ref<string>('');
|
||||||
|
const width = ref<number>(1000);
|
||||||
|
const visible = ref<boolean>(false);
|
||||||
|
const disableSubmit = ref<boolean>(false);
|
||||||
|
const registerForm = ref();
|
||||||
|
const emit = defineEmits(['register', 'success']);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
function view(record) {
|
||||||
|
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.view(record);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定按钮点击事件
|
||||||
|
*/
|
||||||
|
function handleOk() {
|
||||||
|
registerForm.value.submitForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form保存回调事件
|
||||||
|
*/
|
||||||
|
function submitCallback() {
|
||||||
|
handleCancel();
|
||||||
|
emit('success');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消按钮回调事件
|
||||||
|
*/
|
||||||
|
function handleCancel() {
|
||||||
|
visible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
view,
|
||||||
|
disableSubmit,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/**隐藏样式-modal确定按钮 */
|
||||||
|
.jee-hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue