mooho-base-admin-plus 2.3.13 → 2.4.0
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/history.md +1 -0
- package/package/mooho-base-admin-plus.min.esm.js +96 -23
- package/package/mooho-base-admin-plus.min.js +27 -27
- package/package.json +1 -1
- package/src/components/view/table-setting.vue +16 -0
- package/src/components/view/view-table.vue +33 -2
- package/src/pages/system/tableView.vue +22 -0
- package/src/pages/template/viewPage.vue +8 -0
package/package.json
CHANGED
|
@@ -105,6 +105,22 @@
|
|
|
105
105
|
{{ $t('Front_Btn_Condition') }}
|
|
106
106
|
</Button>
|
|
107
107
|
</div>
|
|
108
|
+
<div v-if="code == 'showEnable'">
|
|
109
|
+
<Switch
|
|
110
|
+
:model-value="!!data.showEnable"
|
|
111
|
+
v-if="showCheck(data.showEnableJson)"
|
|
112
|
+
@update:model-value="
|
|
113
|
+
$event => {
|
|
114
|
+
data.showEnable = $event;
|
|
115
|
+
//$forceUpdate();
|
|
116
|
+
}
|
|
117
|
+
"
|
|
118
|
+
@on-change="checkChange('showEnableJson', 'showEnable')"
|
|
119
|
+
/>
|
|
120
|
+
<Button style="margin-left: 8px" @click="$refs.conditionEdit.open(data, 'showEnableJson', 'showEnable', dataView.model)" type="primary" size="small" icon="ios-settings">
|
|
121
|
+
{{ $t('Front_Btn_Condition') }}
|
|
122
|
+
</Button>
|
|
123
|
+
</div>
|
|
108
124
|
<div v-if="code == 'removeEnable'">
|
|
109
125
|
<Switch
|
|
110
126
|
:model-value="!!data.removeEnable"
|
|
@@ -39,12 +39,14 @@
|
|
|
39
39
|
<slot name="filterColumn" :column="column" :code="column.code"></slot>
|
|
40
40
|
</template>
|
|
41
41
|
</table-filter>
|
|
42
|
-
<Col v-bind="getGrid(tableView.filterWidth)" :style="{ 'text-align': tableView.filterAlign
|
|
42
|
+
<Col v-bind="getGrid(tableView.filterWidth)" :style="{ 'text-align': !(tableView.filterAlign || '').trim() ? 'left' : tableView.filterAlign.toLowerCase() }">
|
|
43
43
|
<FormItem :label-width="0">
|
|
44
44
|
<Button type="info" v-if="tableView.keywordEnable || filterColumns.length > 0" custom-icon="fa fa-search" @click="search()" size="small">
|
|
45
45
|
{{ $t('Front_Btn_Search') }}
|
|
46
46
|
</Button>
|
|
47
|
-
<Button type="primary" v-if="tableView.createEnable && createEnable" custom-icon="fa fa-plus" @click="create()" size="small">
|
|
47
|
+
<Button type="primary" v-if="tableView.createEnable && createEnable && !readonly" custom-icon="fa fa-plus" @click="create()" size="small">
|
|
48
|
+
{{ $t('Front_Btn_New') }}
|
|
49
|
+
</Button>
|
|
48
50
|
<!--
|
|
49
51
|
@slot 筛选栏按钮
|
|
50
52
|
-->
|
|
@@ -474,6 +476,14 @@
|
|
|
474
476
|
custom-icon="fa fa-edit"
|
|
475
477
|
@click="edit(rowData(row, index), index)"
|
|
476
478
|
></Button>
|
|
479
|
+
<Button
|
|
480
|
+
v-if="judge(tableView.showEnable, tableView.showEnableJson, rowData(row, index)) && showEnable"
|
|
481
|
+
size="small"
|
|
482
|
+
:title="$t('Front_Btn_Detail')"
|
|
483
|
+
type="info"
|
|
484
|
+
custom-icon="fa fa-file-alt"
|
|
485
|
+
@click="show(rowData(row, index), index)"
|
|
486
|
+
></Button>
|
|
477
487
|
<Button
|
|
478
488
|
v-if="judge(tableView.removeEnable, tableView.removeEnableJson, rowData(row, index)) && removeEnable && !readonly"
|
|
479
489
|
size="small"
|
|
@@ -826,6 +836,13 @@
|
|
|
826
836
|
type: Boolean,
|
|
827
837
|
default: true
|
|
828
838
|
},
|
|
839
|
+
/**
|
|
840
|
+
* 允许查看
|
|
841
|
+
*/
|
|
842
|
+
showEnable: {
|
|
843
|
+
type: Boolean,
|
|
844
|
+
default: true
|
|
845
|
+
},
|
|
829
846
|
/**
|
|
830
847
|
* 允许删除
|
|
831
848
|
*/
|
|
@@ -1332,6 +1349,20 @@
|
|
|
1332
1349
|
*/
|
|
1333
1350
|
this.$emit('edit', { row, index });
|
|
1334
1351
|
},
|
|
1352
|
+
/**
|
|
1353
|
+
* 查看项
|
|
1354
|
+
*
|
|
1355
|
+
* @param {object} row 行对象
|
|
1356
|
+
* @param {int} index 行序号
|
|
1357
|
+
* @public
|
|
1358
|
+
*/
|
|
1359
|
+
show(row, index) {
|
|
1360
|
+
/**
|
|
1361
|
+
* 查看事件
|
|
1362
|
+
* @property {object} args { row 行对象, index 行序号 }
|
|
1363
|
+
*/
|
|
1364
|
+
this.$emit('show', { row, index });
|
|
1365
|
+
},
|
|
1335
1366
|
/**
|
|
1336
1367
|
* 删除项
|
|
1337
1368
|
*
|
|
@@ -113,6 +113,28 @@
|
|
|
113
113
|
{{ $t('Front_Btn_Condition') }}
|
|
114
114
|
</Button>
|
|
115
115
|
</div>
|
|
116
|
+
<div v-if="code == 'showEnable'">
|
|
117
|
+
<Switch
|
|
118
|
+
:model-value="!!data.showEnable"
|
|
119
|
+
v-if="showCheck(data.showEnableJson)"
|
|
120
|
+
@update:model-value="
|
|
121
|
+
$event => {
|
|
122
|
+
data.showEnable = $event;
|
|
123
|
+
//$forceUpdate();
|
|
124
|
+
}
|
|
125
|
+
"
|
|
126
|
+
@on-change="checkChange('showEnableJson', 'showEnable')"
|
|
127
|
+
/>
|
|
128
|
+
<Button
|
|
129
|
+
style="margin-left: 8px"
|
|
130
|
+
@click="$refs.conditionEdit.open(data, 'showEnableJson', 'showEnable', $refs.form.data.model)"
|
|
131
|
+
type="primary"
|
|
132
|
+
size="small"
|
|
133
|
+
icon="ios-settings"
|
|
134
|
+
>
|
|
135
|
+
{{ $t('Front_Btn_Condition') }}
|
|
136
|
+
</Button>
|
|
137
|
+
</div>
|
|
116
138
|
<div v-if="code == 'removeEnable'">
|
|
117
139
|
<Switch
|
|
118
140
|
:model-value="!!data.removeEnable"
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
:removeEnable="allow('remove')"
|
|
12
12
|
@create="$refs.form.open()"
|
|
13
13
|
@edit="({ row, index }) => $refs.form.open(row)"
|
|
14
|
+
@show="({ row, index }) => $refs.showForm.open(row)"
|
|
14
15
|
>
|
|
15
16
|
<template #command="{ row }">
|
|
16
17
|
<Button
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
</view-table>
|
|
27
28
|
</Card>
|
|
28
29
|
<modal-form ref="form" :createEnable="allow('create')" :editEnable="allow('edit')" v-if="page" @on-after-save="$refs.table.loadData()" />
|
|
30
|
+
<modal-form ref="showForm" v-if="page" :readonly="page.showViewCode == null" :save-enable="false" />
|
|
29
31
|
<template v-if="inited">
|
|
30
32
|
<modal-table
|
|
31
33
|
v-for="table in tables"
|
|
@@ -96,6 +98,12 @@
|
|
|
96
98
|
this.$refs.form.init(this.page.formViewCode);
|
|
97
99
|
}
|
|
98
100
|
|
|
101
|
+
if (!!(this.page.showViewCode || '').trim()) {
|
|
102
|
+
this.$refs.showForm.init(this.page.showViewCode);
|
|
103
|
+
} else if (!!(this.page.formViewCode || '').trim()) {
|
|
104
|
+
this.$refs.showForm.init(this.page.formViewCode);
|
|
105
|
+
}
|
|
106
|
+
|
|
99
107
|
this.page.controls = res.customPageControls.filter(item => {
|
|
100
108
|
return item.customPageComponentID == null;
|
|
101
109
|
});
|