|
|
@@ -4,138 +4,73 @@
|
|
|
{{ Language.getNameTrl($i18n.locale, tab) }}
|
|
|
</div>
|
|
|
<div v-if="!collapse" class="panel-body">
|
|
|
- <div
|
|
|
- class="grid-container"
|
|
|
- :style="{ 'padding-right': showComplexFilterPanel == true ? '360px' : '0px' }"
|
|
|
- >
|
|
|
+ <div class="grid-container" :style="{ 'padding-right': showComplexFilterPanel == true ? '360px' : '0px' }">
|
|
|
<div class="grid-item-row1">
|
|
|
<SimpleFilterPanel
|
|
|
- v-model:searchText="searchText"
|
|
|
- :disabled="showComplexFilterPanel == true"
|
|
|
- :window-no="windowNo"
|
|
|
- :tab-index="tabIndex"
|
|
|
- :filter-schema="tab.filterSchema"
|
|
|
- class="m-row"
|
|
|
- @simple-search="simpleSearch"
|
|
|
- @show-complex-filter-panel="showComplexFilterPanel = true"
|
|
|
+ v-model:searchText="searchText" :disabled="showComplexFilterPanel == true"
|
|
|
+ :window-no="windowNo" :tab-index="tabIndex" :filter-schema="tab.filterSchema" class="m-row"
|
|
|
+ @simple-search="simpleSearch" @show-complex-filter-panel="showComplexFilterPanel = true"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div class="grid-item-row2">
|
|
|
- <div class="row m-row">
|
|
|
- <div class="col-md-12 table-toolbar">
|
|
|
- <div class="btn-group toolbar-button-group-left" role="group">
|
|
|
- <button
|
|
|
- v-if="canEdit"
|
|
|
- type="button"
|
|
|
- class="btn btn-primary"
|
|
|
- @click="newModelData"
|
|
|
- >
|
|
|
- {{ $t("lang.subTabGridEdit.create") }}
|
|
|
- </button>
|
|
|
- <button
|
|
|
- v-if="canEdit"
|
|
|
- type="button"
|
|
|
- class="btn btn-danger"
|
|
|
- @click="deleteRecords(true)"
|
|
|
- >
|
|
|
- {{ $t("lang.subTabGridEdit.remove") }}
|
|
|
- </button>
|
|
|
- <button
|
|
|
- v-if="canEdit"
|
|
|
- type="button"
|
|
|
- class="btn btn-info"
|
|
|
- @click="queryGridData"
|
|
|
- >
|
|
|
- {{ $t("lang.subTabGridEdit.revert") }}
|
|
|
- </button>
|
|
|
- <button
|
|
|
- v-if="canEdit"
|
|
|
- type="button"
|
|
|
- class="btn btn-primary"
|
|
|
- @click="editAllTabData"
|
|
|
- >
|
|
|
- {{ $t("lang.subTabGridEdit.editAll") }}
|
|
|
- </button>
|
|
|
- <button type="button" class="btn btn-default" @click="queryGridData">
|
|
|
- {{ $t("lang.subTabGridEdit.refresh") }}
|
|
|
- </button>
|
|
|
-
|
|
|
- <TabButton
|
|
|
- :show-tab-dto="tab"
|
|
|
- :model-datas="modelDatas"
|
|
|
- :parent-model-data="parentModelData"
|
|
|
- :uuid="uuid"
|
|
|
- :view-type="'Grid'"
|
|
|
- :tab-buttons="tab.tabGridView ? tab.tabGridView.tabButtons : null"
|
|
|
- @save-view="$emit('saveView')"
|
|
|
- @process-execute-finish="refreshParent"
|
|
|
- />
|
|
|
-
|
|
|
- <GridColumnDef
|
|
|
- :tab-grid-fields="tabGridFields"
|
|
|
- :window-no="windowNo"
|
|
|
- :tab-index="tabIndex"
|
|
|
- @property-changed="propertyChanged($event)"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <a-space>
|
|
|
+ <a-button v-if="canEdit" type="button" class="btn btn-primary" @click="newModelData">
|
|
|
+ {{ $t("lang.subTabGridEdit.create") }}
|
|
|
+ </a-button>
|
|
|
+ <a-button v-if="canEdit" type="button" class="btn btn-danger" @click="deleteRecords(true)">
|
|
|
+ {{ $t("lang.subTabGridEdit.remove") }}
|
|
|
+ </a-button>
|
|
|
+ <a-button v-if="canEdit" type="button" class="btn btn-info" @click="queryGridData">
|
|
|
+ {{ $t("lang.subTabGridEdit.revert") }}
|
|
|
+ </a-button>
|
|
|
+ <a-button v-if="canEdit" type="button" class="btn btn-primary" @click="editAllTabData">
|
|
|
+ {{ $t("lang.subTabGridEdit.editAll") }}
|
|
|
+ </a-button>
|
|
|
+ <a-button @click="queryGridData">
|
|
|
+ {{ $t("lang.subTabGridEdit.refresh") }}
|
|
|
+ </a-button>
|
|
|
+
|
|
|
+ <TabButton
|
|
|
+ :show-tab-dto="tab" :model-datas="modelDatas" :parent-model-data="parentModelData" :uuid="uuid"
|
|
|
+ :view-type="'Grid'" :tab-buttons="tab.tabGridView ? tab.tabGridView.tabButtons : null"
|
|
|
+ :curd-window-function-access="curdWindowFunctionAccess" @save-view="$emit('saveView')"
|
|
|
+ @process-execute-finish="refreshParent"
|
|
|
+ />
|
|
|
+
|
|
|
+ <GridColumnDef
|
|
|
+ :tab-grid-fields="tabGridFields" :window-no="windowNo" :tab-index="tabIndex"
|
|
|
+ @property-changed="propertyChanged($event)"
|
|
|
+ />
|
|
|
+ </a-space>
|
|
|
+
|
|
|
<div class="grid-item-row3-column1">
|
|
|
<div class="row">
|
|
|
- <div
|
|
|
- :id="scrollObject.tableOutDivUuid1"
|
|
|
- ref="tableContainer1"
|
|
|
- class="col-md-12"
|
|
|
- >
|
|
|
+ <div :id="scrollObject.tableOutDivUuid1" ref="tableContainer1" class="col-md-12">
|
|
|
<div :id="scrollObject.tableOutDivUuid2" ref="tableContainer2">
|
|
|
- <table
|
|
|
- class="curd-table table-striped table-bordered float-table"
|
|
|
- :width="tableWidth"
|
|
|
- >
|
|
|
+ <table class="curd-table table-striped table-bordered float-table" :width="tableWidth">
|
|
|
<thead>
|
|
|
<GridHeader
|
|
|
- :is-show-edit="canEdit"
|
|
|
- :tab-grid-fields="tabGridFields"
|
|
|
- :window-no="windowNo"
|
|
|
- :tab-index="tabIndex"
|
|
|
- :parent-model-data="parentModelDataClone"
|
|
|
- :is-chinese-english="isChineseEnglish"
|
|
|
- height="40px"
|
|
|
- @on-sort="onSort($event)"
|
|
|
- @property-changed="propertyChanged($event)"
|
|
|
- @select-all="selectAll($event)"
|
|
|
+ :is-show-edit="canEdit" :tab-grid-fields="tabGridFields" :window-no="windowNo"
|
|
|
+ :tab-index="tabIndex" :parent-model-data="parentModelDataClone"
|
|
|
+ :is-chinese-english="isChineseEnglish" height="40px" @on-sort="onSort($event)"
|
|
|
+ @property-changed="propertyChanged($event)" @select-all="selectAll($event)"
|
|
|
@multiple-select="changeSelectMode($event)"
|
|
|
/>
|
|
|
</thead>
|
|
|
<tfoot>
|
|
|
<GridFooter
|
|
|
- v-for="index in [1, 2, 3]"
|
|
|
- :key="'footer' + index"
|
|
|
- :tab-grid-fields="tabGridFields"
|
|
|
- :is-show-edit="canEdit"
|
|
|
- height="40px"
|
|
|
+ v-for="index in [1, 2, 3]" :key="'footer' + index" :tab-grid-fields="tabGridFields"
|
|
|
+ :is-show-edit="canEdit" height="40px"
|
|
|
/>
|
|
|
</tfoot>
|
|
|
<tbody>
|
|
|
<template v-for="(modelData, index) in modelDatas">
|
|
|
<GridBody
|
|
|
- v-if="modelData.deleted != true && modelData.visible == true"
|
|
|
- ref="gridBody1"
|
|
|
- :key="modelData.id + '_' + index"
|
|
|
- :is-show-edit="canEdit"
|
|
|
- :serial-number="
|
|
|
- index + 1 + (pagination.current_page - 1) * pagination.per_page
|
|
|
- "
|
|
|
- :window-no="windowNo"
|
|
|
- :tab-index="tabIndex"
|
|
|
- :tab-grid-fields="tabGridFields"
|
|
|
- :model-data="modelData"
|
|
|
- :parent-model-data="parentModelDataClone"
|
|
|
- height="40px"
|
|
|
- :class-name="tab.tabDataSource.className"
|
|
|
- :scroll-object="scrollObject"
|
|
|
- :js-url="jsUrl"
|
|
|
+ v-if="modelData.deleted != true && modelData.visible == true" ref="gridBody1"
|
|
|
+ :key="modelData.id + '_' + index" :is-show-edit="canEdit" :serial-number="index + 1 + (pagination.current_page - 1) * pagination.per_page
|
|
|
+ " :window-no="windowNo" :tab-index="tabIndex" :tab-grid-fields="tabGridFields"
|
|
|
+ :model-data="modelData" :parent-model-data="parentModelDataClone" height="40px"
|
|
|
+ :class-name="tab.tabDataSource.className" :scroll-object="scrollObject" :js-url="jsUrl"
|
|
|
@delete-record="deleteRecord(modelData, true)"
|
|
|
@edit-record="editRecord(modelData, tabGridFields)"
|
|
|
@click-model-data="clickModelData(modelData)"
|
|
|
@@ -150,10 +85,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div
|
|
|
- v-if="tab != null && tab.filterSchema != null"
|
|
|
- class="grid-item-row3-column2"
|
|
|
- >
|
|
|
+ <div v-if="tab != null && tab.filterSchema != null" class="grid-item-row3-column2">
|
|
|
<div
|
|
|
style="
|
|
|
position: relative;
|
|
|
@@ -161,35 +93,25 @@
|
|
|
transform: translateY(-50%);
|
|
|
cursor: pointer;
|
|
|
user-select: none;
|
|
|
- "
|
|
|
- @click="showComplexFilterPanel = !showComplexFilterPanel"
|
|
|
+ " @click="showComplexFilterPanel = !showComplexFilterPanel"
|
|
|
>
|
|
|
<span
|
|
|
- class="glyphicon glyphicon-chevron-left"
|
|
|
- :class="{
|
|
|
+ class="glyphicon glyphicon-chevron-left" :class="{
|
|
|
'glyphicon-chevron-left': showComplexFilterPanel == false,
|
|
|
'glyphicon-chevron-right': showComplexFilterPanel == true,
|
|
|
- }"
|
|
|
- aria-hidden="true"
|
|
|
+ }" aria-hidden="true"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<a-drawer
|
|
|
- v-model:open="showComplexFilterPanel"
|
|
|
- :title="$t('lang.subTabGridEdit.advancedSearch')"
|
|
|
- :width="400"
|
|
|
- :footer-style="{ textAlign: 'right' }"
|
|
|
- :mask="false"
|
|
|
- :mask-closable="false"
|
|
|
+ v-model:open="showComplexFilterPanel" :title="$t('lang.subTabGridEdit.advancedSearch')" :width="400"
|
|
|
+ :footer-style="{ textAlign: 'right' }" :mask="false" :mask-closable="false"
|
|
|
@close="showComplexFilterPanel = false"
|
|
|
>
|
|
|
<ComplexFilterPanel
|
|
|
- ref="complexFilterPanel"
|
|
|
- :key="'complex-filter-panel-' + windowNo + '-' + tabIndex"
|
|
|
- :window-no="windowNo"
|
|
|
- :tab-index="tabIndex"
|
|
|
- :filter-schema="tab.filterSchema"
|
|
|
+ ref="complexFilterPanel" :key="'complex-filter-panel-' + windowNo + '-' + tabIndex"
|
|
|
+ :window-no="windowNo" :tab-index="tabIndex" :filter-schema="tab.filterSchema"
|
|
|
@complex-search="advancedSearchOk"
|
|
|
/>
|
|
|
</a-drawer>
|
|
|
@@ -203,16 +125,15 @@
|
|
|
pagination.current_page * pagination.per_page
|
|
|
}}</a>
|
|
|
{{ $t("lang.subTabGridEdit.strip") }},{{ $t("lang.subTabGridEdit.total") }}
|
|
|
- {{ pagination.total }} {{ $t("lang.subTabGridEdit.strip") }},{{ $t("lang.subTabGridEdit.displayOnEachPage") }}</span>
|
|
|
+ {{ pagination.total }} {{ $t("lang.subTabGridEdit.strip") }},{{
|
|
|
+ $t("lang.subTabGridEdit.displayOnEachPage")
|
|
|
+ }}</span>
|
|
|
<PageSizeSelect @page-size-changed="gridSizeSelect" />
|
|
|
<span>{{ $t("lang.subTabGridEdit.strip") }}</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="pull-right">
|
|
|
- <VueBootstrapPagination
|
|
|
- :pagination="pagination"
|
|
|
- :callback="queryGridData"
|
|
|
- />
|
|
|
+ <VueBootstrapPagination :pagination="pagination" :callback="queryGridData" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -223,16 +144,9 @@
|
|
|
<div v-for="(subTab, index) in tab.subTabs" :key="'sub-tab-' + index" class="row">
|
|
|
<div class="col-md-12">
|
|
|
<SubTabGridEdit
|
|
|
- :ref="'subTab' + subTab.tabIndex"
|
|
|
- :is-show-edit="canEdit"
|
|
|
- :tab="subTab"
|
|
|
- :parent-model-data="selectModelData"
|
|
|
- :parent-tab="tab"
|
|
|
- :window-no="windowNo"
|
|
|
- :tab-index="subTab.tabIndex"
|
|
|
- @save-view="$emit('saveView')"
|
|
|
- @save-record-event="saveRecordEvent"
|
|
|
- @refresh-parent="refreshParent"
|
|
|
+ :ref="'subTab' + subTab.tabIndex" :is-show-edit="canEdit" :tab="subTab"
|
|
|
+ :parent-model-data="selectModelData" :parent-tab="tab" :window-no="windowNo" :tab-index="subTab.tabIndex"
|
|
|
+ @save-view="$emit('saveView')" @save-record-event="saveRecordEvent" @refresh-parent="refreshParent"
|
|
|
@property-changed="propertyChanged"
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -255,12 +169,7 @@
|
|
|
</Modal>
|
|
|
</div>
|
|
|
|
|
|
- <Modal
|
|
|
- v-model:show="modal2"
|
|
|
- :large="true"
|
|
|
- @ok="showAuditPanel = false"
|
|
|
- @cancel="showAuditPanel = false"
|
|
|
- >
|
|
|
+ <Modal v-model:show="modal2" :large="true" @ok="showAuditPanel = false" @cancel="showAuditPanel = false">
|
|
|
<template #header>
|
|
|
记录信息{{ currIndex }}/{{ pagination.total }} - {{ tab.name }}
|
|
|
</template>
|
|
|
@@ -337,6 +246,12 @@ export default {
|
|
|
return null;
|
|
|
},
|
|
|
},
|
|
|
+ curdWindowFunctionAccess: {
|
|
|
+ type: Object,
|
|
|
+ default: function () {
|
|
|
+ return null;
|
|
|
+ },
|
|
|
+ },
|
|
|
isShowEdit: {
|
|
|
type: Boolean,
|
|
|
default: null,
|
|
|
@@ -456,10 +371,10 @@ export default {
|
|
|
},
|
|
|
immediate: true,
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
showComplexFilterPanel: function (newValue, oldValue) {
|
|
|
localStorage.setItem('showComplexFilterPanel', newValue ? 'true' : 'false');
|
|
|
},
|
|
|
@@ -523,10 +438,10 @@ export default {
|
|
|
_self.windowNo,
|
|
|
_self.tabIndex,
|
|
|
null,
|
|
|
- function (response) {
|
|
|
+ function (response) {
|
|
|
_self.loading = false;
|
|
|
|
|
|
- if(response.errorCode != 0){
|
|
|
+ if (response.errorCode != 0) {
|
|
|
Notify.error('数据新建异常', response.errorMessage, false);
|
|
|
return;
|
|
|
}
|
|
|
@@ -563,8 +478,8 @@ export default {
|
|
|
null,
|
|
|
function (response) {
|
|
|
_self.loading = false;
|
|
|
-
|
|
|
- if(response.errorCode != 0){
|
|
|
+
|
|
|
+ if (response.errorCode != 0) {
|
|
|
Notify.error('数据新建异常', response.errorMessage, false);
|
|
|
return;
|
|
|
}
|
|
|
@@ -608,7 +523,7 @@ export default {
|
|
|
) {
|
|
|
var idValue =
|
|
|
modelData.data == undefined ||
|
|
|
- modelData.data[fieldItem.fieldName] == undefined
|
|
|
+ modelData.data[fieldItem.fieldName] == undefined
|
|
|
? undefined
|
|
|
: modelData.data[fieldItem.fieldName].id;
|
|
|
if (idValue == undefined || idValue == '' || idValue < 1) {
|
|
|
@@ -617,7 +532,7 @@ export default {
|
|
|
} else {
|
|
|
var stringValue =
|
|
|
modelData.data == undefined ||
|
|
|
- modelData.data[fieldItem.fieldName] == undefined
|
|
|
+ modelData.data[fieldItem.fieldName] == undefined
|
|
|
? ''
|
|
|
: modelData.data[fieldItem.fieldName].displayValue[0];
|
|
|
if (stringValue == undefined || stringValue === '') {
|
|
|
@@ -697,7 +612,7 @@ export default {
|
|
|
var _self = this;
|
|
|
|
|
|
let functionName = gridFieldItem.fieldName.replace('.', '_') + '_calloutjs';
|
|
|
- let exeuteFunction = function(){
|
|
|
+ let exeuteFunction = function () {
|
|
|
let actions = {
|
|
|
changeParentModelData: _self.changeParentModelData,
|
|
|
modelDatas: _self.modelDatas,
|
|
|
@@ -710,8 +625,8 @@ export default {
|
|
|
Notify.error(
|
|
|
'数据字典定义异常',
|
|
|
'【' +
|
|
|
- scriptText +
|
|
|
- '】Callout前端逻辑定义异常,请联系管理员检查数据字典的定义。',
|
|
|
+ scriptText +
|
|
|
+ '】Callout前端逻辑定义异常,请联系管理员检查数据字典的定义。',
|
|
|
false,
|
|
|
);
|
|
|
}
|
|
|
@@ -724,8 +639,8 @@ export default {
|
|
|
Notify.error(
|
|
|
'数据字典定义异常',
|
|
|
'【' +
|
|
|
- scriptText +
|
|
|
- '】Callout前端逻辑的JS文件不存在,请联系管理员检查数据字典是否存在JS文件。',
|
|
|
+ scriptText +
|
|
|
+ '】Callout前端逻辑的JS文件不存在,请联系管理员检查数据字典是否存在JS文件。',
|
|
|
false,
|
|
|
);
|
|
|
return;
|
|
|
@@ -733,14 +648,14 @@ export default {
|
|
|
let promise = JsUtil.dynamicLoadJsFunction(jsUrl, scriptText);
|
|
|
promise.then(
|
|
|
targetFunction => {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
if (targetFunction == null) {
|
|
|
Notify.error(
|
|
|
'数据字典定义异常',
|
|
|
'【' +
|
|
|
- scriptText +
|
|
|
- '】Callout前端逻辑定义异常,请联系管理员检查数据字典的定义。',
|
|
|
+ scriptText +
|
|
|
+ '】Callout前端逻辑定义异常,请联系管理员检查数据字典的定义。',
|
|
|
false,
|
|
|
);
|
|
|
return;
|
|
|
@@ -748,7 +663,7 @@ export default {
|
|
|
|
|
|
_self[functionName] = targetFunction;
|
|
|
exeuteFunction();
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
errorData => {
|
|
|
console.error(errorData);
|
|
|
@@ -886,7 +801,7 @@ export default {
|
|
|
}
|
|
|
var message = '';
|
|
|
if (changedCount > 0) {
|
|
|
- message = _self.$t('lang.subTabGridEdit.describe2',{changedCount:changedCount});
|
|
|
+ message = _self.$t('lang.subTabGridEdit.describe2', { changedCount: changedCount });
|
|
|
}
|
|
|
|
|
|
message =
|
|
|
@@ -894,7 +809,7 @@ export default {
|
|
|
_self.$t('lang.subTabGridEdit.someWhatThree');
|
|
|
|
|
|
Notify.show({
|
|
|
- title:_self.$t('lang.subTabGridEdit.deleteConfirmation'),
|
|
|
+ title: _self.$t('lang.subTabGridEdit.deleteConfirmation'),
|
|
|
message: message,
|
|
|
buttons: [
|
|
|
{
|
|
|
@@ -945,12 +860,12 @@ export default {
|
|
|
Notify.show({
|
|
|
title: _self.$t('lang.subTabGridEdit.deleteConfirmation'),
|
|
|
message:
|
|
|
- _self.$t('lang.subTabGridEdit.someWhatOne') +
|
|
|
+ _self.$t('lang.subTabGridEdit.someWhatOne') +
|
|
|
dataPrepareDelete.length +
|
|
|
_self.$t('lang.subTabGridEdit.someWhatTwo'),
|
|
|
buttons: [
|
|
|
{
|
|
|
- label:_self.$t('lang.subTabGridEdit.determine'),
|
|
|
+ label: _self.$t('lang.subTabGridEdit.determine'),
|
|
|
cssClass: 'btn-primary',
|
|
|
action: function (dialogItself) {
|
|
|
dialogItself.close();
|
|
|
@@ -1059,8 +974,8 @@ export default {
|
|
|
Common.addTokenToRequest(request);
|
|
|
},
|
|
|
success: function (response) {
|
|
|
-
|
|
|
- if(response.errorCode != 0){
|
|
|
+
|
|
|
+ if (response.errorCode != 0) {
|
|
|
Notify.error('Error', response.errorMessage, false);
|
|
|
return;
|
|
|
}
|
|
|
@@ -1151,7 +1066,7 @@ export default {
|
|
|
|
|
|
// add by jack 20241108
|
|
|
// 如果是操作列不进行排序
|
|
|
- if(gridFieldItem.fieldName == null || gridFieldItem.fieldName == '-'){
|
|
|
+ if (gridFieldItem.fieldName == null || gridFieldItem.fieldName == '-') {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1374,9 +1289,11 @@ export default {
|
|
|
.m-row {
|
|
|
margin-bottom: 15px;
|
|
|
}
|
|
|
+
|
|
|
.a-audit {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+
|
|
|
th {
|
|
|
background-color: #f7f7f7;
|
|
|
}
|