cloud-web-corejs 1.0.54-dev.235 → 1.0.54-dev.237

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.
@@ -13,7 +13,7 @@
13
13
  class="button-sty"
14
14
  icon="el-icon-set-up"
15
15
  @click="openOtherAuthDialog"
16
- v-if="isDev && !!dataId && menuKindAuth.editAuth === 1 && !readonly && !otherFlag"
16
+ v-if="isDev && !!dataId && menuKindAuth.editAuth === 1 && !readonly && !otherFlag && !formTemplate"
17
17
  >
18
18
  {{ $t1("分派") }}
19
19
  </el-button>
@@ -117,7 +117,7 @@
117
117
  class="designer-drawer" :class="[isFullscreen ? 'is-fullscreen' : '']" @close="handleFormDesignClose">
118
118
  <el-tabs v-model="formDesTabs" type="card" class="tab-boxOnly" :stretch="true">
119
119
  <el-tab-pane :label="$t1('设计器')" name="first">
120
- <designer ref="designer" :formCode.sync="formCode" @reflushTemplateList="reflushTemplateList"></designer>
120
+ <designer ref="designer" :formCode.sync="formCode" @reflushTemplateList="reflushTemplateList" :readonly="designerReadonly"></designer>
121
121
  </el-tab-pane>
122
122
  <el-tab-pane :label="$t1('后端脚本')" name="second">
123
123
  <formScriptList :formCode="formCode" :formTemplate="currentFormTemplate"
@@ -157,8 +157,10 @@ modules = {
157
157
  });
158
158
  },
159
159
  openDesignDialog() {
160
+ let readonly = !this.menuKindAuth.editAuth
160
161
  this.$emit('openDesignDialog', {
161
162
  row: this.formTemplate,
163
+ readonly,
162
164
  callback: () => {
163
165
  this.$baseReload()
164
166
  }
@@ -139,6 +139,7 @@ modules = {
139
139
  isDev: true,
140
140
  menuKindAuth: {},
141
141
  showTree: false,
142
+ designerReadonly: false
142
143
  };
143
144
  },
144
145
  computed: {
@@ -188,16 +189,42 @@ modules = {
188
189
  this.$refs.xTabs.openEditTab(row);
189
190
  }
190
191
  },
191
- openDesingerDialog(row, callback) {
192
+ openDesingerDialogByAuth(row) {
193
+ if (!this.otherFlag) {
194
+ this.openDesingerDialog(row);
195
+ } else {
196
+ this.getOtherMenuKindAuth(row, (editAuth) => {
197
+ this.openDesingerDialog(row, null, !editAuth);
198
+ })
199
+ }
200
+ },
201
+ getOtherMenuKindAuth(row, callback) {
202
+ if (row.sid) {
203
+ this.$http({
204
+ aes: true,
205
+ url: USER_PREFIX + "/form_template_auth/getAuth",
206
+ method: `post`,
207
+ data: {stringOne: row.sid},
208
+ isLoading: true,
209
+ success: (res) => {
210
+ let menuKindAuth = res.objx || {};
211
+ callback(!!menuKindAuth.editAuth)
212
+ },
213
+ });
214
+ }
215
+ },
216
+ openDesingerDialog(row, callback, readonly = false) {
192
217
  this.formCode = row.formCode;
193
218
  this.formName = row.formName;
194
219
  this.currentFormTemplate = row;
195
220
  this.isFullscreen = false;
221
+
222
+ this.designerReadonly = readonly
196
223
  this.showDesingerDialog = true;
197
224
  this.designerSaveCallback = callback ?? null;
198
225
  },
199
- openDesingerDialogByChild({row, callback}) {
200
- this.openDesingerDialog(row, callback);
226
+ openDesingerDialogByChild({row, readonly, callback}) {
227
+ this.openDesingerDialog(row, callback, readonly);
201
228
  },
202
229
  reflushTemplateList() {
203
230
  this.searchEvent();
@@ -379,7 +406,7 @@ modules = {
379
406
  iconName: "iconfont icon-liuchengguanli-shejiqi_liucheng",
380
407
  content: this.$t1("表单设计"),
381
408
  onclick: () => {
382
- this.openDesingerDialog(row);
409
+ this.openDesingerDialogByAuth(row);
383
410
  },
384
411
  },
385
412
  ]);