mooho-base-admin-plus 2.10.0 → 2.10.2

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.10.0",
4
+ "version": "2.10.2",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -4,10 +4,29 @@
4
4
  <PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
5
5
  </div>
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
- <view-table ref="table" v-if="page" :filter="filter" :create-enable="allow('create')" @create="create">
7
+ {{ allow('create') }}
8
+ <view-table ref="table" v-if="page" :create-enable="allow('create')" @create="create">
9
+ <template #top>
10
+ <slot name="top"></slot>
11
+ </template>
8
12
  <template #filter>
9
13
  <slot name="filter"></slot>
10
14
  </template>
15
+ <template #customFilter>
16
+ <slot name="customFilter"></slot>
17
+ </template>
18
+ <template #filterColumn="{ column, code }">
19
+ <slot name="filterColumn" :column="column" :code="code"></slot>
20
+ </template>
21
+ <template #filterCommand>
22
+ <slot name="filterCommand"></slot>
23
+ </template>
24
+ <template #middle>
25
+ <slot name="middle"></slot>
26
+ </template>
27
+ <template #commandBefore="{ row, index }">
28
+ <slot name="commandBefore" :row="row" :index="index"></slot>
29
+ </template>
11
30
  <template #command="{ row, index }">
12
31
  <Button
13
32
  size="small"
@@ -30,6 +49,21 @@
30
49
  </view-table>
31
50
  </Card>
32
51
  <modal-form ref="form" v-if="page" @on-after-save="$refs.table.loadData()">
52
+ <template #top>
53
+ <slot name="formTop"></slot>
54
+ </template>
55
+ <template #tableColumn="{ table, tableColumn, tableCode, row, index, column, code }">
56
+ <slot name="formTableCommand" :table="table" :tableColumn="tableColumn" :tableCode="tableCode" :row="row" :index="row" :column="column" :code="code"></slot>
57
+ </template>
58
+ <template #tableCommand="{ table, tableColumn, tableCode, row, index }">
59
+ <slot name="formTableCommand" :table="table" :tableColumn="tableColumn" :tableCode="tableCode" :row="row" :index="row"></slot>
60
+ </template>
61
+ <template #column="{ form, data, column, code }">
62
+ <slot name="formColumn" :form="form" :data="data" :column="column" :code="code"></slot>
63
+ </template>
64
+ <template #bottom>
65
+ <slot name="formBottom"></slot>
66
+ </template>
33
67
  <template #footer>
34
68
  <span></span>
35
69
  <Button type="primary" custom-icon="fa fa-cloud-upload-alt" @click="submit">{{ $t('Front_Btn_Submit') }}</Button>
@@ -60,6 +94,21 @@
60
94
  </template>
61
95
  </modal-form>
62
96
  <modal-form ref="showForm" v-if="page" :readonly="page.showViewCode == null" @on-after-save="$refs.table.loadData()">
97
+ <template #top>
98
+ <slot name="showFormTop"></slot>
99
+ </template>
100
+ <template #tableColumn="{ table, tableColumn, tableCode, row, index, column, code }">
101
+ <slot name="showFormTableCommand" :table="table" :tableColumn="tableColumn" :tableCode="tableCode" :row="row" :index="row" :column="column" :code="code"></slot>
102
+ </template>
103
+ <template #tableCommand="{ table, tableColumn, tableCode, row, index }">
104
+ <slot name="showFormTableCommand" :table="table" :tableColumn="tableColumn" :tableCode="tableCode" :row="row" :index="row"></slot>
105
+ </template>
106
+ <template #column="{ form, data, column, code }">
107
+ <slot name="showFormColumn" :form="form" :data="data" :column="column" :code="code"></slot>
108
+ </template>
109
+ <template #bottom>
110
+ <slot name="showFormBottom"></slot>
111
+ </template>
63
112
  <template #footer>
64
113
  <span></span>
65
114
  <Button
@@ -137,6 +186,7 @@
137
186
  </div>
138
187
  </template>
139
188
  <script>
189
+ import router from '../../router';
140
190
  import modelApi from '../../api/model';
141
191
  import applicationApi from '../../api/application';
142
192
  import processInstApi from '../../api/processInst';
@@ -179,6 +229,11 @@
179
229
  },
180
230
  computed: {},
181
231
  async mounted() {
232
+ console.log('router.currentRoute.value.fullPath', router.currentRoute.value.fullPath);
233
+ console.log('this.userPermissions', this.userPermissions);
234
+ console.log("url + '$' + key", router.currentRoute.value.fullPath.substr(1).split('?')[0] + '$' + 'create');
235
+ console.log("this.userPermissions[url + '$' + key]", this.userPermissions[router.currentRoute.value.fullPath.substr(1).split('?')[0] + '$' + 'create']);
236
+
182
237
  if (this.$route.meta.data.id) {
183
238
  let res = await this.loadPage(this.$route.meta.data.id);
184
239
  this.page = res.customPage;
@@ -215,7 +270,7 @@
215
270
 
216
271
  setTimeout(() => {
217
272
  if (!this.allow('all')) {
218
- this.filter.createUserID = this.info.id;
273
+ this.$refs.table.filterData['createUserID'] = this.info.id;
219
274
  }
220
275
 
221
276
  this.$refs.table.init(this.page.tableViewCode, () => {
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <process-page ref="processPage" application-type-code="ExpenseApplication" table-view-code="ExpenseApplication" form-view-code="ExpenseApplicationEdit"></process-page>
3
+ </template>
4
+ <script>
5
+ import { mixinPage } from '/src';
6
+ import processPage from '/src/pages/template/processPage.vue';
7
+
8
+ export default {
9
+ name: 'pqcp-issueReport',
10
+ mixins: [mixinPage],
11
+ components: { processPage },
12
+ data() {
13
+ return {};
14
+ },
15
+ computed: {},
16
+ created() {
17
+ setTimeout(() => {});
18
+ },
19
+ methods: {}
20
+ };
21
+ </script>