mooho-base-admin-plus 2.7.4 → 2.7.6

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.7.4",
4
+ "version": "2.7.6",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -69,7 +69,7 @@
69
69
  <Divider :plain="true" dashed orientation="left" size="small">
70
70
  <span class="title">{{ getNameI18n(column) }}</span>
71
71
  </Divider>
72
- <view-table :ref="'list_' + column.code" :static="true" :view-code="column.source" :readonly="true" :embedded="true"></view-table>
72
+ <view-table :ref="'list_' + column.code" :view-code="column.source" :readonly="true" :auto-load="false"></view-table>
73
73
  </div>
74
74
  <FormItem
75
75
  :label="getNameI18n(column)"
@@ -1527,13 +1527,11 @@
1527
1527
  };
1528
1528
  }
1529
1529
 
1530
- if (column.isSourceCustom) {
1531
- res = await customModelApi.query(column.sourceModel, param);
1532
- } else {
1533
- res = await modelApi.query(column.sourceModel, param, tableView.functionName, tableView.functionType);
1530
+ for (let key in param) {
1531
+ this.$refs['list_' + column.code][0].filterData[key] = param[key];
1534
1532
  }
1535
1533
 
1536
- this.$refs['list_' + column.code][0].loadData(res.data);
1534
+ this.$refs['list_' + column.code][0].loadData();
1537
1535
  }
1538
1536
  }
1539
1537
  }
@@ -55,7 +55,7 @@
55
55
  </NotificationTab>
56
56
  </Notification>
57
57
  </span>
58
- <task-form ref="taskForm"></task-form>
58
+ <task-form ref="taskForm" @on-after-action="reload()"></task-form>
59
59
  <modal-form ref="notificationForm" view-code="NotificationView" :save-enable="false"></modal-form>
60
60
  </div>
61
61
  </template>
@@ -203,6 +203,9 @@
203
203
  this.taskFilter.page = 0;
204
204
  this.loadMore('task');
205
205
  },
206
+ reload() {
207
+ location.reload();
208
+ },
206
209
  openNotification(item) {
207
210
  if (!item.isRead) {
208
211
  this.unreadCount--;
@@ -6,7 +6,7 @@
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
7
  <Tabs value="todo">
8
8
  <TabPane :label="$t('Front_Label_Todo')" name="todo">
9
- <view-table ref="table" view-code="TodoList" :select-enable="true">
9
+ <view-table ref="todoTable" view-code="TodoList" :select-enable="true">
10
10
  <template #filterCommand>
11
11
  <Button size="small" type="primary" custom-icon="fa fa-check-double" @click="batchDo">{{ $t('Front_Btn_Batch_Do') }}</Button>
12
12
  </template>
@@ -16,7 +16,7 @@
16
16
  </view-table>
17
17
  </TabPane>
18
18
  <TabPane :label="$t('Front_Label_Done')" name="done">
19
- <view-table ref="table" view-code="DoneList">
19
+ <view-table ref="doneTable" view-code="DoneList">
20
20
  <template #command="{ row }">
21
21
  <Button size="small" :title="$t('Front_Btn_Detail')" type="info" custom-icon="fa fa-file-alt" @click="$refs.taskForm.open(row)"></Button>
22
22
  </template>
@@ -24,7 +24,7 @@
24
24
  </TabPane>
25
25
  </Tabs>
26
26
  </Card>
27
- <task-form ref="taskForm" @on-after-action="$refs.table.loadData()"></task-form>
27
+ <task-form ref="taskForm" @on-after-action="onAfterAction()"></task-form>
28
28
  </div>
29
29
  </template>
30
30
  <script>
@@ -55,18 +55,23 @@
55
55
  methods: {
56
56
  batchDo() {
57
57
  this.confirm('Front_Msg_Sure_To_Batch_Do', async () => {
58
- let ids = this.$refs.table.getSelected().map(x => {
58
+ let ids = this.$refs.todoTable.getSelected().map(x => {
59
59
  return x.id;
60
60
  });
61
61
 
62
62
  if (ids.length > 0) {
63
63
  await taskApi.batchDo(ids);
64
64
  this.success('Front_Msg_Success');
65
- this.$refs.table.loadData();
65
+ this.$refs.todoTable.loadData();
66
+ this.$refs.doneTable.loadData();
66
67
  } else {
67
68
  this.error('Front_Msg_Please_Select_Task_Item');
68
69
  }
69
70
  });
71
+ },
72
+ onAfterAction() {
73
+ this.$refs.todoTable.loadData();
74
+ this.$refs.doneTable.loadData();
70
75
  }
71
76
  }
72
77
  };