mooho-base-admin-plus 0.4.11 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
@slot 页脚
|
|
81
81
|
-->
|
|
82
82
|
<slot name="footer">
|
|
83
|
-
<Button type="primary" custom-icon="fa fa-save" v-if="canSave() && saveEnable" @click="onSave">{{ $t('Front_Btn_Save') }}</Button>
|
|
83
|
+
<Button type="primary" custom-icon="fa fa-save" v-if="canSave() && saveEnable && !formView.editEnable" @click="onSave">{{ $t('Front_Btn_Save') }}</Button>
|
|
84
84
|
</slot>
|
|
85
85
|
<Button type="default" custom-icon="fa fa-times" @click="clickClose">{{ $t('Front_Btn_Close') }}</Button>
|
|
86
86
|
<Button type="error" :title="$t('Front_Btn_Setting')" custom-icon="fa fa-cog" v-if="settingEnable && allow('permission/formView')" @click="settingOpen"></Button>
|
|
@@ -447,8 +447,8 @@
|
|
|
447
447
|
<table-setting ref="tableSetting" v-if="tableSettingActive" :is-setting="true" @on-change="viewCode => init(viewCode)" />
|
|
448
448
|
<filter-setting ref="filterSetting" v-if="filterSettingActive" @on-change="viewCode => init(viewCode)" />
|
|
449
449
|
<item-select ref="itemSelect" v-if="itemSelectActive" @save="saveItemSelect"></item-select>
|
|
450
|
-
<modal-table ref="modalTable" v-if="inited"></modal-table>
|
|
451
|
-
<modal-form ref="modalForm"
|
|
450
|
+
<modal-table ref="modalTable" v-if="inited" @create="$refs.modalForm.openDefault(commandButtonParams)" @edit="({ row, index }) => $refs.modalForm.open(row)"></modal-table>
|
|
451
|
+
<modal-form ref="modalForm" v-if="inited" @on-after-save="$refs.modalTable.loadData()"></modal-form>
|
|
452
452
|
<modal-table ref="batchEditTable" :embedded="true" :static="true" :footerEnable="true" v-if="inited">
|
|
453
453
|
<template #footer>
|
|
454
454
|
<Button type="primary" custom-icon="fa fa-save" @click="batchSave()">{{ $t('Front_Btn_Save') }}</Button>
|
|
@@ -567,7 +567,8 @@
|
|
|
567
567
|
commandButtons: [],
|
|
568
568
|
preview: false,
|
|
569
569
|
imageUrl: null,
|
|
570
|
-
isFullScreen: false
|
|
570
|
+
isFullScreen: false,
|
|
571
|
+
commandButtonParams: null
|
|
571
572
|
};
|
|
572
573
|
},
|
|
573
574
|
async created() {
|
|
@@ -2164,22 +2165,26 @@
|
|
|
2164
2165
|
if (commandButton.viewType == 'TableView') {
|
|
2165
2166
|
// 打开表格
|
|
2166
2167
|
this.$refs.modalTable.init(commandButton.viewCode, async () => {
|
|
2167
|
-
|
|
2168
|
+
if (!!(commandButton.formViewCode || '').trim()) {
|
|
2169
|
+
this.$refs.modalForm.init(commandButton.formViewCode);
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
this.commandButtonParams = {};
|
|
2168
2173
|
|
|
2169
2174
|
if (!!(commandButton.params || '').trim()) {
|
|
2170
2175
|
let commandButtonParams = JSON.parse(commandButton.params);
|
|
2171
2176
|
|
|
2172
2177
|
for (let i = 0; i < commandButtonParams.length; i++) {
|
|
2173
2178
|
let value = this.parseData(row, commandButtonParams[i].value);
|
|
2174
|
-
|
|
2179
|
+
this.commandButtonParams[commandButtonParams[i].param] = value;
|
|
2175
2180
|
}
|
|
2176
2181
|
}
|
|
2177
2182
|
|
|
2178
|
-
this.$refs.modalTable.open(
|
|
2183
|
+
this.$refs.modalTable.open(this.commandButtonParams);
|
|
2179
2184
|
});
|
|
2180
2185
|
} else {
|
|
2181
2186
|
// 打开表单
|
|
2182
|
-
this.$refs.modalForm.init(commandButton.
|
|
2187
|
+
this.$refs.modalForm.init(commandButton.formViewCode, async () => {
|
|
2183
2188
|
this.$refs.modalForm.open(row);
|
|
2184
2189
|
});
|
|
2185
2190
|
}
|