|
|
@@ -1,7 +1,6 @@
|
|
|
<template>
|
|
|
<div
|
|
|
- class="flex-container"
|
|
|
- :class="{
|
|
|
+ class="flex-container" :class="{
|
|
|
'flex-container-modal': isSearchWidget == true,
|
|
|
'flex-container': isSearchWidget == null || isSearchWidget == false,
|
|
|
}"
|
|
|
@@ -13,36 +12,25 @@
|
|
|
:html-help-url="infoWindowDto.htmlHelpUrl"
|
|
|
:info-grid-fields="infoGridFieldsInstance.infoGridFields"
|
|
|
:header-name="Language.getNameTrl($i18n.locale, infoWindowDto)"
|
|
|
- :sub-header-name="Language.getHelpTrl($i18n.locale, infoWindowDto)"
|
|
|
- :info-filter-fields="infoFilterFields"
|
|
|
- :info-window-no="infoWindowDto.no"
|
|
|
- @filter-field-property-changed="filterFieldPropertyChanged($event)"
|
|
|
+ :sub-header-name="Language.getHelpTrl($i18n.locale, infoWindowDto)" :info-filter-fields="infoFilterFields"
|
|
|
+ :info-window-no="infoWindowDto.no" @filter-field-property-changed="filterFieldPropertyChanged($event)"
|
|
|
@grid-field-property-changed="gridFieldPropertyChanged($event)"
|
|
|
/>
|
|
|
</div>
|
|
|
<div>
|
|
|
<a-flex justify="space-between" align="center">
|
|
|
<QueryCondition
|
|
|
- ref="queryCondition"
|
|
|
- :info-filter-fields="infoFilterFields"
|
|
|
- :info-buttons="infoWindowDto.infoButtons"
|
|
|
- :is-search-widget="isSearchWidget"
|
|
|
- :info-window-no="infoWindowDto.no"
|
|
|
- :search-condition-instance="searchConditionInstance"
|
|
|
- @simple-search="simpleSearch"
|
|
|
- @complex-search="complexSearch"
|
|
|
+ ref="queryCondition" :info-filter-fields="infoFilterFields"
|
|
|
+ :info-buttons="infoWindowDto.infoButtons" :is-search-widget="isSearchWidget"
|
|
|
+ :info-window-no="infoWindowDto.no" :search-condition-instance="searchConditionInstance"
|
|
|
+ @simple-search="simpleSearch" @complex-search="complexSearch"
|
|
|
/>
|
|
|
|
|
|
<div>
|
|
|
<a-pagination
|
|
|
- v-model:current="pagination.current_page"
|
|
|
- v-model:pageSize="pagination.per_page"
|
|
|
- show-quick-jumper
|
|
|
- size="small"
|
|
|
- :total="pagination.total"
|
|
|
- :page-size-options="pageSizeOptions"
|
|
|
- @change="handlePageChange"
|
|
|
- @show-size-change="handleShowSizeChange"
|
|
|
+ v-model:current="pagination.current_page" v-model:pageSize="pagination.per_page"
|
|
|
+ show-quick-jumper size="small" :total="pagination.total" :page-size-options="pageSizeOptions"
|
|
|
+ @change="handlePageChange" @show-size-change="handleShowSizeChange"
|
|
|
/>
|
|
|
</div>
|
|
|
</a-flex>
|
|
|
@@ -66,22 +54,16 @@
|
|
|
</a-space>
|
|
|
|
|
|
<div v-if="!isSearchWidget" style="display: inline-block">
|
|
|
- <template
|
|
|
- v-for="infoButton in infoWindowDto.infoButtons"
|
|
|
- :key="infoButton.name"
|
|
|
- >
|
|
|
+ <template v-for="infoButton in infoWindowDto.infoButtons" :key="infoButton.name">
|
|
|
<a-button
|
|
|
v-if="infoButton.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
|
|
|
- v-tooltip.right="Language.getHelpTrl($i18n.locale, infoButton)"
|
|
|
- type="link"
|
|
|
+ v-tooltip.right="Language.getHelpTrl($i18n.locale, infoButton)" type="link"
|
|
|
@click="openRemoteComponentModule(infoButton)"
|
|
|
>
|
|
|
{{ Language.getNameTrl($i18n.locale, infoButton) }}
|
|
|
</a-button>
|
|
|
<a-button
|
|
|
- v-else
|
|
|
- v-tooltip.right="Language.getHelpTrl($i18n.locale, infoButton)"
|
|
|
- type="link"
|
|
|
+ v-else v-tooltip.right="Language.getHelpTrl($i18n.locale, infoButton)" type="link"
|
|
|
@click="executeProcess(infoButton)"
|
|
|
>
|
|
|
{{ Language.getNameTrl($i18n.locale, infoButton) }}
|
|
|
@@ -89,27 +71,16 @@
|
|
|
</template>
|
|
|
</div>
|
|
|
|
|
|
- <a-segmented
|
|
|
- v-model:value="selectedView"
|
|
|
- :options="views"
|
|
|
- class="m-segmented"
|
|
|
- size="small"
|
|
|
- >
|
|
|
+ <a-segmented v-model:value="selectedView" :options="views" class="m-segmented" size="small">
|
|
|
<template #label="{ value: val, payload = {} }">
|
|
|
<div style="padding: 2px 2px">
|
|
|
<a-tooltip :title="payload.name" placement="top">
|
|
|
<a-avatar
|
|
|
- :src="payload.src"
|
|
|
- :style="payload.icon ? payload.style : null"
|
|
|
- :alt="val"
|
|
|
- size="small"
|
|
|
+ :src="payload.src" :style="payload.icon ? payload.style : null" :alt="val" size="small"
|
|
|
shape="square"
|
|
|
>
|
|
|
<template #icon>
|
|
|
- <component
|
|
|
- :is="payload.icon"
|
|
|
- style="font-size: 22px; color: #1677ff; background: #f5f5f5"
|
|
|
- />
|
|
|
+ <component :is="payload.icon" style="font-size: 22px; color: #1677ff; background: #f5f5f5" />
|
|
|
</template>
|
|
|
{{ payload.content }}
|
|
|
</a-avatar>
|
|
|
@@ -130,21 +101,14 @@
|
|
|
/>
|
|
|
<div class="flex-content">
|
|
|
<component
|
|
|
- :is="selectedView"
|
|
|
- v-if="
|
|
|
+ :is="selectedView" v-if="
|
|
|
selectedView != null &&
|
|
|
selectedView != '' &&
|
|
|
componentLoadedCount == views.length
|
|
|
- "
|
|
|
- :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)"
|
|
|
- @info-selected="infoSelected"
|
|
|
- @delete-selected="$emit('deleteSelected', $event)"
|
|
|
+ " :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)"
|
|
|
+ @info-selected="infoSelected" @delete-selected="$emit('deleteSelected', $event)"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="flex-footer" style="margin-top: 10px">
|
|
|
@@ -169,26 +133,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<Loading v-if="loading" />
|
|
|
- <Modal v-model:show="modal">
|
|
|
- <template #default>
|
|
|
- <ProcessReportResult
|
|
|
- :process-report-result="processReportResult"
|
|
|
- :pdf-only="pdfOnly"
|
|
|
- :excel-only="excelOnly"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template #header>
|
|
|
- <div>{{ $t("lang.QueryPage.resultsOfEnforcement") }}</div>
|
|
|
- </template>
|
|
|
- </Modal>
|
|
|
+ <a-modal v-model:open="modal" :title="$t('lang.QueryPage.resultsOfEnforcement')" @ok="modal = false">
|
|
|
+ <ProcessReportResult :process-report-result="processReportResult" :pdf-only="pdfOnly" :excel-only="excelOnly" />
|
|
|
+ </a-modal>
|
|
|
</div>
|
|
|
<component :is="modal1Component" v-model:open="modal1Open" :model-data="selectInfoData" @refresh-data="pageSearch" />
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import Common from '../../common/Common.js';
|
|
|
-import Modal from '../../modal/src/Modal.vue';
|
|
|
-import { defineAsyncComponent,reactive } from 'vue';
|
|
|
+import { defineAsyncComponent, reactive, createVNode } from 'vue';
|
|
|
import PageSizeSelect from '../../page-size-select/src/PageSizeSelect.vue';
|
|
|
// import Pagination from '../../vue-bootstrap-pagination/src/vue-bootstrap-pagination.vue';
|
|
|
|
|
|
@@ -214,6 +168,7 @@ import dayjs from 'dayjs';
|
|
|
|
|
|
import QueryPageTable from './QueryPageTable.vue';
|
|
|
import QueryPageDashboard from './QueryPageDashboard.vue';
|
|
|
+import { Modal } from 'ant-design-vue';
|
|
|
|
|
|
import {
|
|
|
useSort,
|
|
|
@@ -225,10 +180,12 @@ import {
|
|
|
SyncOutlined,
|
|
|
DownloadOutlined,
|
|
|
TableOutlined,
|
|
|
+ ExclamationCircleOutlined,
|
|
|
} from '@ant-design/icons-vue';
|
|
|
|
|
|
import CssUtil from '../../common/CssUtil.js';
|
|
|
import { Spin as ASpin, Empty as AEmpty, message } from 'ant-design-vue';
|
|
|
+
|
|
|
export default {
|
|
|
name: 'QueryPage',
|
|
|
|
|
|
@@ -244,6 +201,7 @@ export default {
|
|
|
QueryPageDashboard,
|
|
|
SyncOutlined,
|
|
|
DownloadOutlined,
|
|
|
+ ExclamationCircleOutlined,
|
|
|
},
|
|
|
|
|
|
props: {
|
|
|
@@ -327,7 +285,7 @@ export default {
|
|
|
infoButtons: [],
|
|
|
modal1Component: null,
|
|
|
modal1Open: false,
|
|
|
- selectInfoData:null,
|
|
|
+ selectInfoData: null,
|
|
|
searchConditionInstance: useSearchCondition(),
|
|
|
infoGridFieldsInstance: useInfoGridFields(),
|
|
|
infoWindowDataInstance: useInfoWindowData(),
|
|
|
@@ -378,7 +336,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- mounted: function () {},
|
|
|
+ mounted: function () { },
|
|
|
|
|
|
methods: {
|
|
|
/**
|
|
|
@@ -779,41 +737,72 @@ export default {
|
|
|
) {
|
|
|
var processReportNo = infoButton.processReportNo;
|
|
|
if (processReportNo != undefined && processReportNo != '') {
|
|
|
+
|
|
|
+ const tipsTitle = infoButton.tipsTitle;
|
|
|
+ const tipsContent = infoButton.tipsContent;
|
|
|
+ const notNeedSelectData = infoButton.notNeedSelectData;
|
|
|
+
|
|
|
var ids = _self.getSelectedRecordIds();
|
|
|
- if (ids.length < 1) {
|
|
|
+ if (notNeedSelectData !== true && ids.length < 1) {
|
|
|
Notify.error('错误', '未选择可操作的数据', true);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- _self.loading = true;
|
|
|
- ProcessReportResource.uniqueByNo(infoButton.processReportNo).then(
|
|
|
- successData => {
|
|
|
- _self.processReportDto = successData;
|
|
|
- if (successData) {
|
|
|
- _self.pdfOnly = successData.pdfOnly;
|
|
|
- _self.excelOnly = successData.excelOnly;
|
|
|
- }
|
|
|
- ProcessReportResource.runProcessByIds(
|
|
|
- infoButton.processReportNo,
|
|
|
- ids,
|
|
|
- ).then(
|
|
|
- successData => {
|
|
|
- _self.modal = true;
|
|
|
- _self.loading = false;
|
|
|
- _self.processReportResult = successData;
|
|
|
- _self.$emit('processExecuteFinish');
|
|
|
- },
|
|
|
- errorData => {
|
|
|
- _self.loading = false;
|
|
|
- Common.processException(errorData);
|
|
|
- },
|
|
|
- );
|
|
|
- },
|
|
|
- errorData => {
|
|
|
- _self.loading = false;
|
|
|
- Common.processException(errorData);
|
|
|
- },
|
|
|
- );
|
|
|
+
|
|
|
+ const executeProcess = function(){
|
|
|
+ _self.loading = true;
|
|
|
+ ProcessReportResource.uniqueByNo(infoButton.processReportNo).then(
|
|
|
+ successData => {
|
|
|
+ _self.processReportDto = successData;
|
|
|
+ if (successData) {
|
|
|
+ _self.pdfOnly = successData.pdfOnly;
|
|
|
+ _self.excelOnly = successData.excelOnly;
|
|
|
+ }
|
|
|
+ ProcessReportResource.runProcessByIds(
|
|
|
+ infoButton.processReportNo,
|
|
|
+ ids,
|
|
|
+ ).then(
|
|
|
+ successData => {
|
|
|
+ _self.modal = true;
|
|
|
+ _self.loading = false;
|
|
|
+ _self.processReportResult = successData;
|
|
|
+ _self.$emit('processExecuteFinish');
|
|
|
+ // 流程执行完毕,调用刷新的按钮
|
|
|
+ _self.pageSearch();
|
|
|
+ },
|
|
|
+ errorData => {
|
|
|
+ _self.loading = false;
|
|
|
+ Common.processException(errorData);
|
|
|
+ },
|
|
|
+ );
|
|
|
+ },
|
|
|
+ errorData => {
|
|
|
+ _self.loading = false;
|
|
|
+ Common.processException(errorData);
|
|
|
+ },
|
|
|
+ );
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (tipsTitle != null && tipsTitle.length > 0 && tipsContent != null && tipsContent.length > 0) {
|
|
|
+ Modal.confirm({
|
|
|
+ title: tipsTitle,
|
|
|
+ icon: createVNode(ExclamationCircleOutlined),
|
|
|
+ content: tipsContent,
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk() {
|
|
|
+ executeProcess();
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ console.log('Cancel');
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ executeProcess();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
} else if (
|
|
|
infoButton.curdWindowNo != null &&
|
|
|
@@ -1025,7 +1014,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 获取表格选择的数据
|
|
|
- infoSelected: function (selected){
|
|
|
+ infoSelected: function (selected) {
|
|
|
this.selectInfoData = selected;
|
|
|
},
|
|
|
|
|
|
@@ -1054,7 +1043,7 @@ export default {
|
|
|
openRemoteComponentModule: async function (tabButton) {
|
|
|
const _self = this;
|
|
|
|
|
|
- if(!_self.selectInfoData || _self.selectInfoData.length === 0){
|
|
|
+ if (!_self.selectInfoData || _self.selectInfoData.length === 0) {
|
|
|
message.warning('请您至少选择一条数据。');
|
|
|
return;
|
|
|
}
|
|
|
@@ -1154,7 +1143,7 @@ export default {
|
|
|
|
|
|
<style scoped>
|
|
|
/** 修复分页的样式 By YangZhiJie 2021-07-06 11:23 */
|
|
|
-nav >>> ul.pagination {
|
|
|
+nav>>>ul.pagination {
|
|
|
margin: 0 !important;
|
|
|
}
|
|
|
</style>
|
|
|
@@ -1173,7 +1162,7 @@ nav >>> ul.pagination {
|
|
|
margin-top: 4px;
|
|
|
}
|
|
|
|
|
|
-.m-segmented >>> .ant-segmented-item {
|
|
|
+.m-segmented>>>.ant-segmented-item {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
</style>
|