mooho-base-admin-plus 2.8.9 → 2.8.11

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 CHANGED
@@ -150,3 +150,5 @@ mooho-base-admin-plus@2.8.6 - 公式计算后增加change事件
150
150
  mooho-base-admin-plus@2.8.7 - 增加密码加密,增加文件类型验证
151
151
  mooho-base-admin-plus@2.8.8 - 下拉框等返回所有数据,避免联动失效
152
152
  mooho-base-admin-plus@2.8.9 - 增加流程页面模板插槽
153
+ mooho-base-admin-plus@2.8.10 - 流程页面模板优化
154
+ mooho-base-admin-plus@2.8.11 - 修复上一版本bug
@@ -28207,7 +28207,6 @@ const user = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$O]
28207
28207
  data() {
28208
28208
  return {
28209
28209
  filter: {},
28210
- applicationType: {},
28211
28210
  page: {},
28212
28211
  messageData: {
28213
28212
  message: null
@@ -28215,9 +28214,38 @@ const user = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$O]
28215
28214
  messageOpened: !1
28216
28215
  };
28217
28216
  },
28217
+ props: {
28218
+ // 表格视图
28219
+ tableViewCode: {
28220
+ type: String
28221
+ },
28222
+ // 表单视图
28223
+ formViewCode: {
28224
+ type: String
28225
+ },
28226
+ // 查看表单视图
28227
+ showViewCode: {
28228
+ type: String
28229
+ },
28230
+ // 申请类别
28231
+ applicationTypeCode: {
28232
+ type: String
28233
+ }
28234
+ },
28218
28235
  computed: {},
28219
28236
  async mounted() {
28220
- this.init(this.$route.meta.data.id);
28237
+ if (this.$route.meta.data.id) {
28238
+ let r = await this.loadPage(this.$route.meta.data.id);
28239
+ this.page = r.customPage, this.init();
28240
+ } else if (this.applicationTypeCode) {
28241
+ let r = await modelApi.query("ApplicationType", { code: this.applicationTypeCode });
28242
+ r.data.length > 0 && (this.page = {
28243
+ tableViewCode,
28244
+ formViewCode,
28245
+ showViewCode,
28246
+ applicationType: r.data[0]
28247
+ }, this.init());
28248
+ }
28221
28249
  },
28222
28250
  // watch: {
28223
28251
  // $route() {
@@ -28229,9 +28257,8 @@ const user = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$O]
28229
28257
  methods: {
28230
28258
  ...mapActions("admin/viewPage", { loadPage: "load" }),
28231
28259
  // 初始化
28232
- async init(r) {
28233
- let a = await this.loadPage(r);
28234
- this.page = a.customPage, setTimeout(() => {
28260
+ async init() {
28261
+ setTimeout(() => {
28235
28262
  this.allow("all") || (this.filter.createUserID = this.info.id), this.$refs.table.init(this.page.tableViewCode, () => {
28236
28263
  this.$refs.table.tableView.autoLoadDisable || this.$refs.table.loadData();
28237
28264
  }), (this.page.formViewCode || "").trim() && this.$refs.form.init(this.page.formViewCode), ((this.page.formViewCode || "").trim() || (this.page.showViewCode || "").trim()) && this.$refs.showForm.init((this.page.showViewCode || "").trim() ? this.page.showViewCode : this.page.formViewCode);