|
@@ -1,68 +1,91 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div
|
|
<div
|
|
|
- class="flex-container"
|
|
|
|
|
- :class="{
|
|
|
|
|
|
|
+ class="flex-container" :class="{
|
|
|
'flex-container-modal': isSearchWidget == true,
|
|
'flex-container-modal': isSearchWidget == true,
|
|
|
'flex-container': isSearchWidget == null || isSearchWidget == false,
|
|
'flex-container': isSearchWidget == null || isSearchWidget == false,
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
<div class="flex-header">
|
|
<div class="flex-header">
|
|
|
- <div class="panel panel-default" style="margin-bottom: 5px">
|
|
|
|
|
- <div class="panel-heading" style="padding: 0px">
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div>
|
|
|
<InfoHeader
|
|
<InfoHeader
|
|
|
:html-help-url="infoWindowDto.htmlHelpUrl"
|
|
:html-help-url="infoWindowDto.htmlHelpUrl"
|
|
|
:info-grid-fields="infoGridFieldsInstance.infoGridFields"
|
|
:info-grid-fields="infoGridFieldsInstance.infoGridFields"
|
|
|
- :header-name="Language.getNameTrl($i18n.locale, infoWindowDto)"
|
|
|
|
|
|
|
+ :header-name="Language.getNameTrl($i18n.locale, infoWindowDto)"
|
|
|
|
|
+ :sub-header-name="Language.getHelpTrl($i18n.locale, infoWindowDto)"
|
|
|
|
|
+
|
|
|
:info-filter-fields="infoFilterFields"
|
|
:info-filter-fields="infoFilterFields"
|
|
|
- :info-window-no="infoWindowDto.no"
|
|
|
|
|
- @open-complex="openComplex"
|
|
|
|
|
|
|
+ :info-window-no="infoWindowDto.no"
|
|
|
@filter-field-property-changed="filterFieldPropertyChanged($event)"
|
|
@filter-field-property-changed="filterFieldPropertyChanged($event)"
|
|
|
@grid-field-property-changed="gridFieldPropertyChanged($event)"
|
|
@grid-field-property-changed="gridFieldPropertyChanged($event)"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="panel-body" style="padding-bottom: 5px; padding-top: 8px">
|
|
|
|
|
|
|
+ <div>
|
|
|
<QueryCondition
|
|
<QueryCondition
|
|
|
- ref="queryCondition"
|
|
|
|
|
- :info-filter-fields="infoFilterFields"
|
|
|
|
|
- :info-buttons="infoWindowDto.infoButtons"
|
|
|
|
|
- :is-search-widget="isSearchWidget"
|
|
|
|
|
- :show-button="true"
|
|
|
|
|
|
|
+ ref="queryCondition" :info-filter-fields="infoFilterFields"
|
|
|
|
|
+ :info-buttons="infoWindowDto.infoButtons" :is-search-widget="isSearchWidget"
|
|
|
:info-window-no="infoWindowDto.no"
|
|
:info-window-no="infoWindowDto.no"
|
|
|
- :is-complex="isComplex"
|
|
|
|
|
- @open-complex="openComplex"
|
|
|
|
|
- @simple-search="simpleSearch"
|
|
|
|
|
- @complex-search="complexSearch"
|
|
|
|
|
- @refresh-search="pageSearch"
|
|
|
|
|
- @execute-process="executeProcess($event)"
|
|
|
|
|
- @execute-export="executeExport"
|
|
|
|
|
|
|
+ :search-condition-instance="searchConditionInstance"
|
|
|
|
|
+ @simple-search="simpleSearch" @complex-search="complexSearch"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <a-space warp style="margin-top: 5px;">
|
|
|
|
|
+ <a-button type="link" @click="pageSearch">
|
|
|
|
|
+ {{ $t('lang.QueryConditionSimple.refresh') }}
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <SyncOutlined />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <a-button type="link" @click="executeExport">
|
|
|
|
|
+ {{ $t('lang.QueryConditionSimple.export') }}
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <DownloadOutlined />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </a-space>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <div v-if="!isSearchWidget" style="display: inline-block">
|
|
|
|
|
+ <template v-for="infoButton in infoButtons" :key="infoButton.name">
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ v-tooltip.right="Language.getHelpTrl($i18n.locale, infoButton)" type="link"
|
|
|
|
|
+ @click="executeProcess(infoButton)"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ Language.getNameTrl($i18n.locale, infoButton) }}
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <a-segmented v-model:value="selectedView" :options="views" class="m-segmented" size="small">
|
|
|
|
|
+ <template #label="{ value: val, payload = {} }">
|
|
|
|
|
+ <div style="padding: 2px 2px">
|
|
|
|
|
+ <a-avatar :src="payload.src" :alt="val" size="small" shape="square">
|
|
|
|
|
+ {{ payload.content }}
|
|
|
|
|
+ </a-avatar>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-segmented>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- xx -->
|
|
<!-- xx -->
|
|
|
-
|
|
|
|
|
- <div class="flex-content">
|
|
|
|
|
- <QueryPageTable
|
|
|
|
|
- v-if="1==2"
|
|
|
|
|
- :info-grid-fields-instance="infoGridFieldsInstance"
|
|
|
|
|
- :sort-instance="sortInstance"
|
|
|
|
|
- :info-window-data-instance="infoWindowDataInstance"
|
|
|
|
|
- :pagination="pagination"
|
|
|
|
|
- :multiple="multiple"
|
|
|
|
|
- :call-out-js-url="infoWindowDto.callOutJsUrl"
|
|
|
|
|
- @data-selected="$emit('dataSelected', $event)"
|
|
|
|
|
- @delete-selected="$emit('deleteSelected', $event)"
|
|
|
|
|
- />
|
|
|
|
|
|
|
|
|
|
- <QueryPageDashboard
|
|
|
|
|
- v-else
|
|
|
|
|
- :info-grid-fields-instance="infoGridFieldsInstance"
|
|
|
|
|
- :sort-instance="sortInstance"
|
|
|
|
|
- :info-window-data-instance="infoWindowDataInstance"
|
|
|
|
|
- :pagination="pagination"
|
|
|
|
|
- :multiple="multiple"
|
|
|
|
|
- :call-out-js-url="infoWindowDto.callOutJsUrl"
|
|
|
|
|
- @data-selected="$emit('dataSelected', $event)"
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="padding:0;border-bottom: solid 1px #d1cfcf;margin-top:5px; margin-bottom: 5px;"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="flex-content"
|
|
|
|
|
+ >
|
|
|
|
|
+ <component
|
|
|
|
|
+ :is="selectedView"
|
|
|
|
|
+ v-if="selectedView != null"
|
|
|
|
|
+ :info-grid-fields-instance="infoGridFieldsInstance" :sort-instance="sortInstance"
|
|
|
|
|
+ :info-window-data-instance="infoWindowDataInstance" :pagination="pagination" :multiple="multiple"
|
|
|
|
|
+ :call-out-js-url="infoWindowDto.callOutJsUrl" @data-selected="$emit('dataSelected', $event)"
|
|
|
@delete-selected="$emit('deleteSelected', $event)"
|
|
@delete-selected="$emit('deleteSelected', $event)"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -80,10 +103,7 @@
|
|
|
,
|
|
,
|
|
|
{{ $t("lang.QueryPage.displayOnEachPage") }}
|
|
{{ $t("lang.QueryPage.displayOnEachPage") }}
|
|
|
</span>
|
|
</span>
|
|
|
- <PageSizeSelect
|
|
|
|
|
- :size="pagination.per_page"
|
|
|
|
|
- @page-size-changed="gridSizeSelect"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <PageSizeSelect :size="pagination.per_page" @page-size-changed="gridSizeSelect" />
|
|
|
<span>{{ $t("lang.QueryPage.strip") }}</span>
|
|
<span>{{ $t("lang.QueryPage.strip") }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="pull-right">
|
|
<div class="pull-right">
|
|
@@ -93,11 +113,7 @@
|
|
|
<Loading v-if="loading" />
|
|
<Loading v-if="loading" />
|
|
|
<Modal v-model:show="modal">
|
|
<Modal v-model:show="modal">
|
|
|
<template #default>
|
|
<template #default>
|
|
|
- <ProcessReportResult
|
|
|
|
|
- :process-report-result="processReportResult"
|
|
|
|
|
- :pdf-only="pdfOnly"
|
|
|
|
|
- :excel-only="excelOnly"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <ProcessReportResult :process-report-result="processReportResult" :pdf-only="pdfOnly" :excel-only="excelOnly" />
|
|
|
</template>
|
|
</template>
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<div>{{ $t("lang.QueryPage.resultsOfEnforcement") }}</div>
|
|
<div>{{ $t("lang.QueryPage.resultsOfEnforcement") }}</div>
|
|
@@ -136,7 +152,8 @@ import dayjs from 'dayjs';
|
|
|
import QueryPageTable from './QueryPageTable.vue';
|
|
import QueryPageTable from './QueryPageTable.vue';
|
|
|
import QueryPageDashboard from './QueryPageDashboard.vue';
|
|
import QueryPageDashboard from './QueryPageDashboard.vue';
|
|
|
|
|
|
|
|
-import { useSort, useInfoGridFields, useInfoWindowData } from './InfoWindowState.js';
|
|
|
|
|
|
|
+import { useSort, useInfoGridFields, useInfoWindowData, useSearchCondition } from './InfoWindowState.js';
|
|
|
|
|
+import { SyncOutlined, DownloadOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'QueryPage',
|
|
name: 'QueryPage',
|
|
@@ -151,6 +168,8 @@ export default {
|
|
|
PageSizeSelect,
|
|
PageSizeSelect,
|
|
|
QueryPageTable,
|
|
QueryPageTable,
|
|
|
QueryPageDashboard,
|
|
QueryPageDashboard,
|
|
|
|
|
+ SyncOutlined,
|
|
|
|
|
+ DownloadOutlined ,
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
props: {
|
|
@@ -189,7 +208,7 @@ export default {
|
|
|
type: String,
|
|
type: String,
|
|
|
default: null,
|
|
default: null,
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 是否多选
|
|
* 是否多选
|
|
|
*/
|
|
*/
|
|
@@ -224,11 +243,36 @@ export default {
|
|
|
infoFilterFields: [],
|
|
infoFilterFields: [],
|
|
|
loading: false,
|
|
loading: false,
|
|
|
modal: false,
|
|
modal: false,
|
|
|
- isComplex:false,
|
|
|
|
|
- searchType:'simple',
|
|
|
|
|
|
|
+ searchType: 'simple',
|
|
|
sortInstance: useSort(),
|
|
sortInstance: useSort(),
|
|
|
|
|
+ searchConditionInstance: useSearchCondition(),
|
|
|
infoGridFieldsInstance: useInfoGridFields(),
|
|
infoGridFieldsInstance: useInfoGridFields(),
|
|
|
infoWindowDataInstance: useInfoWindowData(),
|
|
infoWindowDataInstance: useInfoWindowData(),
|
|
|
|
|
+
|
|
|
|
|
+ views: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '表格视图',
|
|
|
|
|
+ value: 'QueryPageTable',
|
|
|
|
|
+ payload: {
|
|
|
|
|
+ src: 'https://joeschmoe.io/api/v1/random',
|
|
|
|
|
+ style: {
|
|
|
|
|
+ backgroundColor: '#f56a00',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '看板视图',
|
|
|
|
|
+ value: 'QueryPageDashboard',
|
|
|
|
|
+ payload: {
|
|
|
|
|
+ src: 'https://joeschmoe.io/api/v1/random',
|
|
|
|
|
+ style: {
|
|
|
|
|
+ backgroundColor: '#f56a00',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ selectedView: 'QueryPageTable', // 选中的视图
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -244,8 +288,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
deep: true,
|
|
deep: true,
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ selectedView: function(newValue, oldValue){
|
|
|
|
|
+ console.log(newValue);
|
|
|
|
|
+ console.log(oldValue);
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
created: function () {
|
|
created: function () {
|
|
|
const infoPageSize = localStorage.getItem(
|
|
const infoPageSize = localStorage.getItem(
|
|
|
`InfoWindowPageSize${this.windowNo}`,
|
|
`InfoWindowPageSize${this.windowNo}`,
|
|
@@ -255,12 +304,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ mounted: function(){
|
|
|
|
|
|
|
|
- methods: {
|
|
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- openComplex:function(value){
|
|
|
|
|
- this.isComplex = value;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
|
|
+ methods: {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 页面显示数量改变
|
|
* 页面显示数量改变
|
|
@@ -333,7 +382,7 @@ export default {
|
|
|
(_self.pagination.current_page - 1) * _self.pagination.per_page;
|
|
(_self.pagination.current_page - 1) * _self.pagination.per_page;
|
|
|
_self.infoQueryParam.length = _self.pagination.per_page;
|
|
_self.infoQueryParam.length = _self.pagination.per_page;
|
|
|
_self.infoQueryParam.infoFilterFieldValues =
|
|
_self.infoQueryParam.infoFilterFieldValues =
|
|
|
- _self.$refs.queryCondition.getQueryCondition();
|
|
|
|
|
|
|
+ _self.$refs.queryCondition.getQueryCondition();
|
|
|
if (_self.searchType === 'complex') {
|
|
if (_self.searchType === 'complex') {
|
|
|
_self.queryInfoWindowDataComplex();
|
|
_self.queryInfoWindowDataComplex();
|
|
|
} else {
|
|
} else {
|
|
@@ -446,7 +495,7 @@ export default {
|
|
|
_self.loading = false;
|
|
_self.loading = false;
|
|
|
}
|
|
}
|
|
|
_self.setSelectedFlag(data);
|
|
_self.setSelectedFlag(data);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
_self.infoWindowDataInstance.init(data.dataList);
|
|
_self.infoWindowDataInstance.init(data.dataList);
|
|
|
|
|
|
|
|
_self.pagination.total = data.totalSize;
|
|
_self.pagination.total = data.totalSize;
|
|
@@ -720,8 +769,7 @@ export default {
|
|
|
executeExport: function () {
|
|
executeExport: function () {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
|
|
|
|
|
|
- // var isSimpleQuery = _self.$refs.queryCondition.isSimpleQuery();
|
|
|
|
|
- if (this.isComplex == false) {
|
|
|
|
|
|
|
+ if (this.searchConditionInstance.state.isComplex == false) {
|
|
|
let condition = _self.$refs.queryCondition.getQueryCondition();
|
|
let condition = _self.$refs.queryCondition.getQueryCondition();
|
|
|
let downloadUrl =
|
|
let downloadUrl =
|
|
|
Common.getApiURL('exportResource/exportInfoDataSimple') +
|
|
Common.getApiURL('exportResource/exportInfoDataSimple') +
|
|
@@ -780,7 +828,7 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
getSelectedRecordIds: function () {
|
|
getSelectedRecordIds: function () {
|
|
|
return this.infoWindowDataInstance.getSelectedRecordIds();
|
|
return this.infoWindowDataInstance.getSelectedRecordIds();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -800,10 +848,10 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
getFirstSelectModelDataFieldValue: function (name) {
|
|
getFirstSelectModelDataFieldValue: function (name) {
|
|
|
const firstData = this.infoWindowDataInstance.getFirstSelected();
|
|
const firstData = this.infoWindowDataInstance.getFirstSelected();
|
|
|
- if(firstData == null){
|
|
|
|
|
|
|
+ if (firstData == null) {
|
|
|
return null;
|
|
return null;
|
|
|
- }else{
|
|
|
|
|
- if(firstData.data[name] != null){
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (firstData.data[name] != null) {
|
|
|
return firstData.data[name].displayValue[0];
|
|
return firstData.data[name].displayValue[0];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -822,6 +870,7 @@ export default {
|
|
|
float: right;
|
|
float: right;
|
|
|
margin-left: 15px;
|
|
margin-left: 15px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.mulitiple-select {
|
|
.mulitiple-select {
|
|
|
background-color: #6699cc !important;
|
|
background-color: #6699cc !important;
|
|
|
}
|
|
}
|
|
@@ -861,13 +910,12 @@ export default {
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
height: 0;
|
|
height: 0;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
/** 修复分页的样式 By YangZhiJie 2021-07-06 11:23 */
|
|
/** 修复分页的样式 By YangZhiJie 2021-07-06 11:23 */
|
|
|
-nav >>> ul.pagination {
|
|
|
|
|
|
|
+nav>>>ul.pagination {
|
|
|
margin: 0 !important;
|
|
margin: 0 !important;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
@@ -880,4 +928,12 @@ nav >>> ul.pagination {
|
|
|
.text-center {
|
|
.text-center {
|
|
|
text-align: center !important;
|
|
text-align: center !important;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.m-segmented{
|
|
|
|
|
+ float: right;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.m-segmented >>> .ant-segmented-item{
|
|
|
|
|
+ margin-bottom: 0px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|