This commit is contained in:
yangjun 2023-08-15 08:29:16 +08:00
commit e4eaaefe40
4 changed files with 27 additions and 17 deletions

View File

@ -79,8 +79,8 @@
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button v-if="roleList.filter(x => x.roleCode == 'admin' ).length" type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()" style="margin-left: 8px">导出</a-button>
<a-button v-else type="primary" preIcon="ant-design:export-outlined" @click="onExportXls2()" style="margin-left: 8px">导出</a-button>
<a-button v-if="!roleList.filter(x => x.roleCode == 'admin' ).length" admin type="primary" preIcon="ant-design:export-outlined" @click="onExportXls2()" style="margin-left: 8px">导出</a-button>
<a-button v-else 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'"/>
@ -160,7 +160,7 @@ const queryParam:Ref<any> = ref({});
const { createMessage } = useMessage();
onMounted(() => {
loadData(1);
//loadData(1);
});
const roleList = computed(() => getUserInfo()?.roleList??[]);
@ -202,9 +202,11 @@ const xqDictTag = ref();
watch(() => xqDictTag.value?.dictOptions,(d) => {
if(d){
queryParam.value.xqxn = d[0]?.value
nextTick(() => {
loadData(1);
})
if(queryParam.value.xqxn){
nextTick(() => {
loadData(1);
})
}
}
},{
deep:true,
@ -264,7 +266,10 @@ function onExportXls() {
let url = '/statistics/exportEvaluationXls';
if (url) {
let title = '评价量表统计';
return handleExportXls(title as string, url, queryParam.value);
let param = Object.assign({},queryParam.value);
delete param.findByPkdwmc;
delete param.findByBeiTkkdwmc;
return handleExportXls(title as string, url, param);
} else {
createMessage.warn('没有传递 export.url 参数');
return Promise.reject();

View File

@ -79,8 +79,8 @@
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button v-if="roleList.filter(x => x.roleCode == 'admin' ).length" type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()" style="margin-left: 8px">导出</a-button>
<a-button v-else type="primary" preIcon="ant-design:export-outlined" @click="onExportXls2()" style="margin-left: 8px">导出</a-button>
<a-button v-if="!roleList.filter(x => x.roleCode == 'admin' ).length" admin type="primary" preIcon="ant-design:export-outlined" @click="onExportXls2()" style="margin-left: 8px">导出</a-button>
<a-button v-else 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'"/>
@ -160,7 +160,7 @@ const queryParam:Ref<any> = ref({});
const { createMessage } = useMessage();
onMounted(() => {
loadData(1);
//loadData(1);
});
const roleList = computed(() => getUserInfo()?.roleList??[]);
@ -202,9 +202,11 @@ const xqDictTag = ref();
watch(() => xqDictTag.value?.dictOptions,(d) => {
if(d){
queryParam.value.xqxn = d[0]?.value
nextTick(() => {
loadData(1);
})
if(queryParam.value.xqxn){
nextTick(() => {
loadData(1);
})
}
}
},{
deep:true,
@ -260,11 +262,14 @@ function openEve(record){
const { handleExportXls } = useMethods();
// excel
function onExportXls() {
function onExportXls() {//
let url = '/statistics/exportEvaluationXls';
if (url) {
let title = '评价量表统计';
return handleExportXls(title as string, url, queryParam.value);
let param = Object.assign({},queryParam.value);
delete param.findByPkdwmc;
delete param.findByBeiTkkdwmc;
return handleExportXls(title as string, url, param);
} else {
createMessage.warn('没有传递 export.url 参数');
return Promise.reject();

View File

@ -1,6 +1,6 @@
<template>
<!-- <a-list item-layout="horizontal" :data-source="list" :grid="{ gutter: 16, xs: 1, sm: 2, md: 4, lg: 4, xl: 6, xxl: 3, xxxl: 2 }"> -->
<a-list item-layout="horizontal" :data-source="list" :loading="loadingList" style="height: 105px;">
<a-list item-layout="horizontal" :data-source="list" :loading="loadingList" :style="props.flagPage?{ minHeight: '105px' }:{ height: '105px' }" >
<template #renderItem="{ item }">
<a-list-item>
<a-list-item-meta>

View File

@ -1,7 +1,7 @@
<template>
<!-- <a-list item-layout="horizontal" :data-source="list" :grid="{ gutter: 16, xs: 1, sm: 2, md: 4, lg: 4, xl: 6, xxl: 3, xxxl: 2 }"> -->
<div>
<a-list item-layout="horizontal" :data-source="list" :loading="loadingList" style="height: 105px;" >
<a-list item-layout="horizontal" :data-source="list" :loading="loadingList" :style="props.flagPage?{ minHeight: '105px' }:{ height: '105px' }" >
<template #renderItem="{ item }">
<a-list-item>
<a-list-item-meta>