mooho-base-admin-plus 0.4.19 → 0.4.22

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": "0.4.19",
4
+ "version": "0.4.22",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "dotnetVersion": "1.4.0",
7
7
  "license": "MIT",
package/src/index.js CHANGED
@@ -180,6 +180,9 @@ const created = async app => {
180
180
  // 初始化全屏监听
181
181
  store.dispatch('admin/layout/listenFullscreen');
182
182
 
183
+ // 所有页面
184
+ app.config.globalProperties.$pages = pages;
185
+
183
186
  // // 加载远程 i18n
184
187
  // if (Setting.i18n.remote) loadRemoteLocaleMessages(i18n);
185
188
  };
@@ -13,8 +13,8 @@
13
13
  </div>
14
14
  </template>
15
15
  <div class="ivu-ml-8 ivu-mr-8">
16
- <view-form v-show="!isCustom" ref="form" :readonly="readonly"></view-form>
17
- <component v-show="isCustom" :is="customComponent" :readonly="readonly" ref="customComponent"></component>
16
+ <view-form v-if="!isCustom" ref="form" :readonly="readonly"></view-form>
17
+ <component v-if="isCustom" ref="customComponent" :is="customComponent" :readonly="readonly"></component>
18
18
  </div>
19
19
  <template #footer>
20
20
  <div>
@@ -136,6 +136,8 @@
136
136
 
137
137
  this.form = this.$refs.customComponent.form;
138
138
  this.form.data = this.model;
139
+ this.form.onDataChange();
140
+ this.form.clearValidate();
139
141
  this.readonly = !this.task.activityInst.activity.isEditable;
140
142
 
141
143
  if (this.form.formView) {
@@ -175,23 +177,27 @@
175
177
  this.customComponent = this.$pages[applicationType.templateUrl]; // 动态组件
176
178
  this.isCustom = true;
177
179
 
178
- if (applicationType.isCustom) {
179
- this.model = await customModelApi.get(applicationType.model, row.processInst.modelID);
180
- } else {
181
- this.model = await modelApi.get(applicationType.model, row.processInst.modelID);
182
- }
180
+ setTimeout(async () => {
181
+ if (applicationType.isCustom) {
182
+ this.model = await customModelApi.get(applicationType.model, row.processInst.modelID);
183
+ } else {
184
+ this.model = await modelApi.get(applicationType.model, row.processInst.modelID);
185
+ }
183
186
 
184
- this.form = this.$refs.customComponent.form;
185
- this.form.data = this.model;
186
- this.readonly = !this.task.activityInst.activity.isEditable;
187
+ this.form = this.$refs.customComponent.form;
188
+ this.form.data = this.model;
189
+ this.form.onDataChange();
190
+ this.form.clearValidate();
191
+ this.readonly = !this.task.activityInst.activity.isEditable;
187
192
 
188
- if (this.form.formView) {
189
- this.width = this.form.formView.width || '800';
190
- this.name = this.form.formView.name;
191
- this.description = this.form.formView.description;
192
- }
193
+ if (this.form.formView) {
194
+ this.width = this.form.formView.width || '800';
195
+ this.name = this.form.formView.name;
196
+ this.description = this.form.formView.description;
197
+ }
193
198
 
194
- this.opened = true;
199
+ this.opened = true;
200
+ });
195
201
  } else if (applicationType.pageMode == 'Form') {
196
202
  this.form = this.$refs.form;
197
203
  this.form.init(applicationType.formViewCode, async view => {
@@ -220,9 +226,6 @@
220
226
 
221
227
  let res = await modelApi.query('Outcome', { activityFromID: row.activityInst.activityID });
222
228
  this.outcomes = res.data;
223
-
224
- // res = await modelApi.query('Task', { processInstID: row.processInstID });
225
- // this.$refs.approvalHistoryTable.loadData(res.data);
226
229
  },
227
230
  // 执行结果
228
231
  async action(outcome) {
package/test/main.js CHANGED
@@ -50,8 +50,8 @@ const app = createApp({
50
50
  });
51
51
 
52
52
  app.use(router);
53
- //app.use(store);
54
- //app.use(i18n);
55
53
  app.use(moohoBaseAdminPlus);
56
54
 
55
+ //app.config.globalProperties.$pages = pages;
56
+
57
57
  app.mount('#app');