cloud-web-corejs 1.0.54-dev.593 → 1.0.54-dev.595

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.
@@ -1,205 +1,305 @@
1
- <template>
2
- <div class="detail-wrap">
3
- <el-form ref="editForm" :model="formTemplate">
4
- <div class="d-header clearfix">
5
- <div class="fl">
6
- <i class="el-icon-info"/>
7
- {{ dataId ? $t1('查看表单模板') : $t1('新增表单模板') }}
8
- </div>
9
- <div class="fr">
10
- <el-button
11
- type="primary"
12
- plain
13
- class="button-sty"
14
- icon="el-icon-set-up"
15
- @click="openOtherAuthDialog"
16
- v-if="isDev && !!dataId && menuKindAuth.editAuth === 1 && !readonly && !otherFlag"
17
- >
18
- {{ $t1("分派") }}
19
- </el-button>
20
- <el-button type="success" class="button-sty" @click="openDesignDialog"
21
- icon="iconfont icon-liuchengguanli-shejiqi_liucheng" v-if="!!dataId">{{ $t1('表单设计') }}
22
- </el-button>
23
- <el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
24
- {{ $t1('重置') }}
25
- </el-button>
26
- <el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData"
27
- v-if="!readonly && isDev && menuKindAuth.editAuth===1">
28
- {{ $t1('保存') }}
29
- </el-button>
30
- </div>
31
- </div>
32
- <baseTabs>
33
- <baseTabPane :label="$t1('基本信息')">
34
- <template #default>
35
- <table class="table-detail">
36
- <tbody>
37
- <tr>
38
- <th>
39
- <em class="f-red">*</em>
40
- {{ $t1('模板名称') }}
41
- </th>
42
- <td colspan="3">
43
- <el-form-item prop="formName" :rules="[{ required: true, trigger: 'blur' }]">
44
- <el-input type="text" autocomplete="off" v-model="formTemplate.formName" clearable/>
45
- </el-form-item>
46
- </td>
47
- </tr>
48
- <tr>
49
- <th>{{ $t1('模板编码') }}</th>
50
- <td colspan="3">
51
- <el-form-item prop="formCode" :rules="[{ required: true, trigger: 'blur' }]" v-if="!formTemplate.id">
52
- <el-input type="text" autocomplete="off" v-model="formTemplate.formCode" clearable/>
53
- </el-form-item>
54
- <template v-else>
55
- {{ formTemplate.formCode }}
56
- </template>
57
- </td>
58
- </tr>
59
- <tr>
60
- <th>{{ $t1('是否启用') }}</th>
61
- <td>
62
- <el-form-item prop="enabled" :rules="[{ required: false, trigger: 'blur' }]">
63
- <el-radio-group v-model="formTemplate.enabled">
64
- <el-radio :label="true">{{ $t1('启用') }}</el-radio>
65
- <el-radio :label="false">{{ $t1('禁用') }}</el-radio>
66
- </el-radio-group>
67
- </el-form-item>
68
- </td>
69
- <th>{{ $t1('启用流程') }}</th>
70
- <td>
71
- {{ formTemplate.hasWf ? $t1('是') : $t1('否') }}
72
- </td>
73
- </tr>
74
- <tr>
75
- <th>
76
- <em class="f-red">*</em>
77
- {{ $t1('表单分类') }}
78
- </th>
79
- <td colspan="5">
80
- <el-form-item prop="menuKindName" :rules="[{ required:true, trigger: ['blur', 'change'] }]">
81
- <el-input
82
- class="search-input"
83
- max="200"
84
- v-model="formTemplate.menuKindName"
85
- @clear="
86
- formTemplate.menuKindCode = '';
87
- $forceUpdate();
88
- "
89
- v-el-readonly
90
- clearable
91
- :disabled="otherFlag"
92
- >
93
- <i slot="suffix" class="el-input__icon el-icon-search" @click="showMenuKindDialog = true"></i>
94
- </el-input>
95
- </el-form-item>
96
- </td>
97
- </tr>
98
- <tr>
99
- <th>{{ $t1('备注') }}</th>
100
- <td colspan="5">
101
- <el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
102
- v-model="formTemplate.remark"
103
- clearable></el-input>
104
- </td>
105
- </tr>
106
- <tr>
107
- <th>
108
- <em class="f-red">*</em>
109
- {{ $t1('模板版本') }}
110
- </th>
111
- <td>{{ formTemplate.formVersion }}</td>
112
- <th>{{ $t1('是否历史版本') }}</th>
113
- <td>{{ formTemplate.history ? $t1('是') : $t1('否') }}</td>
114
- <th>{{ $t1('服务名') }}</th>
115
- <td>{{ formTemplate.serviceName }}</td>
116
- </tr>
117
- <tr>
118
- <th>
119
- {{ $t1('项目标签') }}
120
- </th>
121
- <td colspan="7">
122
- <projectTagView v-model="formTemplate.formTemplateTagDTOs"></projectTagView>
123
- </td>
124
- </tr>
125
- <tr>
126
- <th>
127
- {{ $t1('唯一标识') }}
128
- </th>
129
- <td colspan="7">
130
- {{ formTemplate.sid }}
131
- </td>
132
- </tr>
133
- <tr>
134
- <th>{{ $t1('创建人') }}</th>
135
- <td>{{ formTemplate.createBy }}</td>
136
- <th>{{ $t1('创建时间') }}</th>
137
- <td>{{ formTemplate.createDate }}</td>
138
- <th>{{ $t1('更新人') }}</th>
139
- <td>{{ formTemplate.modifyBy }}</td>
140
- <th>{{ $t1('更新时间') }}</th>
141
- <td>{{ formTemplate.modifyDate }}</td>
142
- </tr>
143
- <tr>
144
- <th><span class="tips">{{ $t1('URL说明') }}</span></th>
145
- <td colspan="7">
146
- <span class="fl tips">
147
- <div> {{ $t1('一、表单模板嵌入第三方系统URL配置') }}</div>
148
- <div style="padding-left: 20px">
149
- <p> {{
150
- $t1('1、列表URL: /#/form_outLinkView?url=/user/form/view/list&formCode=xx&tp=&i18nLang=&access_token=xx')
151
- }}</p>
152
- <p> {{
153
- $t1('2、详情URL: /#/form_outLinkView?url=/user/form/view/edit&formCode=xx&dataId=1&tp=&i18nLang=&access_token=xx')
154
- }}</p>
155
- </div>
156
- <div> {{ $t1('二、表单模板嵌入本地系统菜单URL配置') }}</div>
157
- <div style="padding-left: 20px">
158
- <p> {{ $t1('1、菜单URL: /user/form/view/list/xxx;xx为表单模板编码;菜单类型:动态表单') }}</p>
159
- </div>
160
- <div> {{ $t1('三、参数说明') }}</div>
161
- <div style="padding-left: 20px">
162
- <p>{{ $t1('1、url:详情页面固定为/user/form/view/edit,列表页面固定为/user/form/view/list;') }}</p>
163
- <p>{{ $t1('2、formCode:表单编码;') }}</p>
164
- <p>{{ $t1('3、dataId:单据ID,详情页面才需要传;') }}</p>
165
- <p>{{ $t1('4、i18nLang:国际化编码,不传默认中文;') }}</p>
166
- <p>{{ $t1('5、tp:第三方登录秘钥;') }}</p>
167
- <p>{{ $t1('6、access_token:用户信息token;') }}</p>
168
- <p>{{ $t1('7、tp与access_token只需要传其中一个即可;') }}</p>
169
- </div>
170
- </span>
171
- </td>
172
- </tr>
173
- </tbody>
174
- </table>
175
- </template>
176
- </baseTabPane>
177
- <baseTabPane :label="$t1('操作日志')">
178
- <template #default>
179
- <formOplogTable :parent-target="_self" ref="oplogTable"></formOplogTable>
180
- </template>
181
- </baseTabPane>
182
- </baseTabs>
183
- </el-form>
184
- <MenuKindDialog v-if="showMenuKindDialog"
185
- :visiable.sync="showMenuKindDialog"
186
- :serviceName="formTemplate.serviceName"
187
- @confirm="confirmInsertMenuKind"
188
- :param="{ taType: 0 }"
189
- :multi="false"
190
- />
191
- <preformDialog v-if="showPreformDialog" :visiable.sync="showPreformDialog"
192
- @confirm="confirmPreformDialog"></preformDialog>
193
- <otherAuthDialog v-if="showOtherAuthDialog" :visiable.sync="showOtherAuthDialog" :sid="sid"
194
- @confirm="confirmOtherAuthDialog"></otherAuthDialog>
195
- </div>
196
- </template>
197
-
198
- <script>
199
- import mixin from "./mixins/edit";
200
-
201
- export default {
202
- name: 'bd_form_templateEdit',
203
- mixins: [mixin]
204
- }
205
- </script>
1
+ <template>
2
+ <div class="detail-wrap">
3
+ <el-form ref="editForm" :model="formTemplate">
4
+ <div class="d-header clearfix">
5
+ <div class="fl">
6
+ <i class="el-icon-info" />
7
+ {{ dataId ? $t1("查看表单模板") : $t1("新增表单模板") }}
8
+ </div>
9
+ <div class="fr">
10
+ <formVersionButton
11
+ v-if="!hData && formTemplate.id && !readonly"
12
+ objType="FormTemplate"
13
+ :objCode="formTemplate.formCode"
14
+ @reverCallback="$baseReload()"
15
+ ></formVersionButton>
16
+ <reverButton
17
+ v-if="!!hData"
18
+ objType="FormTemplate"
19
+ :objCode="formTemplate.formCode"
20
+ :hData="hData"
21
+ @reverCallback="$emit('reverCallback')"
22
+ ></reverButton>
23
+ <el-button
24
+ type="primary"
25
+ plain
26
+ class="button-sty"
27
+ icon="el-icon-set-up"
28
+ @click="openOtherAuthDialog"
29
+ v-if="
30
+ isDev && !!dataId && menuKindAuth.editAuth === 1 && !readonly && !otherFlag
31
+ "
32
+ >
33
+ {{ $t1("分派") }}
34
+ </el-button>
35
+ <el-button
36
+ type="success"
37
+ class="button-sty"
38
+ @click="openDesignDialog"
39
+ icon="iconfont icon-liuchengguanli-shejiqi_liucheng"
40
+ v-if="!!dataId"
41
+ >{{ $t1("表单设计") }}
42
+ </el-button>
43
+ <el-button
44
+ type="primary"
45
+ plain
46
+ class="button-sty"
47
+ @click="$baseReload()"
48
+ icon="el-icon-refresh-right"
49
+ >
50
+ {{ $t1("重置") }}
51
+ </el-button>
52
+ <el-button
53
+ type="primary"
54
+ class="button-sty"
55
+ icon="el-icon-check"
56
+ @click="saveData"
57
+ v-if="!readonly && isDev && menuKindAuth.editAuth === 1"
58
+ >
59
+ {{ $t1("保存") }}
60
+ </el-button>
61
+ </div>
62
+ </div>
63
+ <baseTabs>
64
+ <baseTabPane :label="$t1('基本信息')">
65
+ <template #default>
66
+ <table class="table-detail">
67
+ <tbody>
68
+ <tr>
69
+ <th>
70
+ <em class="f-red">*</em>
71
+ {{ $t1("模板名称") }}
72
+ </th>
73
+ <td colspan="3">
74
+ <el-form-item
75
+ prop="formName"
76
+ :rules="[{ required: true, trigger: 'blur' }]"
77
+ >
78
+ <el-input
79
+ type="text"
80
+ autocomplete="off"
81
+ v-model="formTemplate.formName"
82
+ clearable
83
+ />
84
+ </el-form-item>
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <th>{{ $t1("模板编码") }}</th>
89
+ <td colspan="3">
90
+ <el-form-item
91
+ prop="formCode"
92
+ :rules="[{ required: true, trigger: 'blur' }]"
93
+ v-if="!formTemplate.id"
94
+ >
95
+ <el-input
96
+ type="text"
97
+ autocomplete="off"
98
+ v-model="formTemplate.formCode"
99
+ clearable
100
+ />
101
+ </el-form-item>
102
+ <template v-else>
103
+ {{ formTemplate.formCode }}
104
+ </template>
105
+ </td>
106
+ </tr>
107
+ <tr>
108
+ <th>{{ $t1("是否启用") }}</th>
109
+ <td>
110
+ <el-form-item
111
+ prop="enabled"
112
+ :rules="[{ required: false, trigger: 'blur' }]"
113
+ >
114
+ <el-radio-group v-model="formTemplate.enabled">
115
+ <el-radio :label="true">{{ $t1("启用") }}</el-radio>
116
+ <el-radio :label="false">{{ $t1("禁用") }}</el-radio>
117
+ </el-radio-group>
118
+ </el-form-item>
119
+ </td>
120
+ <th>{{ $t1("启用流程") }}</th>
121
+ <td>
122
+ {{ formTemplate.hasWf ? $t1("是") : $t1("否") }}
123
+ </td>
124
+ </tr>
125
+ <tr>
126
+ <th>
127
+ <em class="f-red">*</em>
128
+ {{ $t1("表单分类") }}
129
+ </th>
130
+ <td colspan="5">
131
+ <el-form-item
132
+ prop="menuKindName"
133
+ :rules="[{ required: true, trigger: ['blur', 'change'] }]"
134
+ >
135
+ <el-input
136
+ class="search-input"
137
+ max="200"
138
+ v-model="formTemplate.menuKindName"
139
+ @clear="
140
+ formTemplate.menuKindCode = '';
141
+ $forceUpdate();
142
+ "
143
+ v-el-readonly
144
+ clearable
145
+ :disabled="otherFlag"
146
+ >
147
+ <i
148
+ slot="suffix"
149
+ class="el-input__icon el-icon-search"
150
+ @click="showMenuKindDialog = true"
151
+ ></i>
152
+ </el-input>
153
+ </el-form-item>
154
+ </td>
155
+ </tr>
156
+ <tr>
157
+ <th>{{ $t1("备注") }}</th>
158
+ <td colspan="5">
159
+ <el-input
160
+ type="textarea"
161
+ :rows="2"
162
+ :placeholder="$t1('请输入内容')"
163
+ size="small"
164
+ v-model="formTemplate.remark"
165
+ clearable
166
+ ></el-input>
167
+ </td>
168
+ </tr>
169
+ <tr>
170
+ <th>
171
+ <em class="f-red">*</em>
172
+ {{ $t1("模板版本") }}
173
+ </th>
174
+ <td>{{ formTemplate.formVersion }}</td>
175
+ <th>{{ $t1("是否历史版本") }}</th>
176
+ <td>{{ formTemplate.history ? $t1("是") : $t1("否") }}</td>
177
+ <th>{{ $t1("服务名") }}</th>
178
+ <td>{{ formTemplate.serviceName }}</td>
179
+ </tr>
180
+ <tr>
181
+ <th>
182
+ {{ $t1("项目标签") }}
183
+ </th>
184
+ <td colspan="7">
185
+ <projectTagView
186
+ v-model="formTemplate.formTemplateTagDTOs"
187
+ ></projectTagView>
188
+ </td>
189
+ </tr>
190
+ <tr>
191
+ <th>
192
+ {{ $t1("唯一标识") }}
193
+ </th>
194
+ <td colspan="7">
195
+ {{ formTemplate.sid }}
196
+ </td>
197
+ </tr>
198
+ <tr>
199
+ <th>{{ $t1("创建人") }}</th>
200
+ <td>{{ formTemplate.createBy }}</td>
201
+ <th>{{ $t1("创建时间") }}</th>
202
+ <td>{{ formTemplate.createDate }}</td>
203
+ <th>{{ $t1("更新人") }}</th>
204
+ <td>{{ formTemplate.modifyBy }}</td>
205
+ <th>{{ $t1("更新时间") }}</th>
206
+ <td>{{ formTemplate.modifyDate }}</td>
207
+ </tr>
208
+ <tr>
209
+ <th>
210
+ <span class="tips">{{ $t1("URL说明") }}</span>
211
+ </th>
212
+ <td colspan="7">
213
+ <span class="fl tips">
214
+ <div>{{ $t1("一、表单模板嵌入第三方系统URL配置") }}</div>
215
+ <div style="padding-left: 20px">
216
+ <p>
217
+ {{
218
+ $t1(
219
+ "1、列表URL: /#/form_outLinkView?url=/user/form/view/list&formCode=xx&tp=&i18nLang=&access_token=xx"
220
+ )
221
+ }}
222
+ </p>
223
+ <p>
224
+ {{
225
+ $t1(
226
+ "2、详情URL: /#/form_outLinkView?url=/user/form/view/edit&formCode=xx&dataId=1&tp=&i18nLang=&access_token=xx"
227
+ )
228
+ }}
229
+ </p>
230
+ </div>
231
+ <div>{{ $t1("二、表单模板嵌入本地系统菜单URL配置") }}</div>
232
+ <div style="padding-left: 20px">
233
+ <p>
234
+ {{
235
+ $t1(
236
+ "1、菜单URL: /user/form/view/list/xxx;xx为表单模板编码;菜单类型:动态表单"
237
+ )
238
+ }}
239
+ </p>
240
+ </div>
241
+ <div>{{ $t1("三、参数说明") }}</div>
242
+ <div style="padding-left: 20px">
243
+ <p>
244
+ {{
245
+ $t1(
246
+ "1、url:详情页面固定为/user/form/view/edit,列表页面固定为/user/form/view/list;"
247
+ )
248
+ }}
249
+ </p>
250
+ <p>{{ $t1("2、formCode:表单编码;") }}</p>
251
+ <p>{{ $t1("3、dataId:单据ID,详情页面才需要传;") }}</p>
252
+ <p>{{ $t1("4、i18nLang:国际化编码,不传默认中文;") }}</p>
253
+ <p>{{ $t1("5、tp:第三方登录秘钥;") }}</p>
254
+ <p>{{ $t1("6、access_token:用户信息token;") }}</p>
255
+ <p>{{ $t1("7、tp与access_token只需要传其中一个即可;") }}</p>
256
+ </div>
257
+ </span>
258
+ </td>
259
+ </tr>
260
+ </tbody>
261
+ </table>
262
+ </template>
263
+ </baseTabPane>
264
+ <baseTabPane :label="$t1('操作日志')">
265
+ <template #default>
266
+ <formOplogTable :parent-target="_self" ref="oplogTable"></formOplogTable>
267
+ </template>
268
+ </baseTabPane>
269
+ </baseTabs>
270
+ </el-form>
271
+ <MenuKindDialog
272
+ v-if="showMenuKindDialog"
273
+ :visiable.sync="showMenuKindDialog"
274
+ :serviceName="formTemplate.serviceName"
275
+ @confirm="confirmInsertMenuKind"
276
+ :param="{ taType: 0 }"
277
+ :multi="false"
278
+ />
279
+ <preformDialog
280
+ v-if="showPreformDialog"
281
+ :visiable.sync="showPreformDialog"
282
+ @confirm="confirmPreformDialog"
283
+ ></preformDialog>
284
+ <otherAuthDialog
285
+ v-if="showOtherAuthDialog"
286
+ :visiable.sync="showOtherAuthDialog"
287
+ :sid="sid"
288
+ @confirm="confirmOtherAuthDialog"
289
+ ></otherAuthDialog>
290
+ </div>
291
+ </template>
292
+
293
+ <script>
294
+ import mixin from "./mixins/edit";
295
+ import formVersionButton from "@base/views/bd/setting/formVersion/button.vue";
296
+ import reverButton from "@base/views/bd/setting/formVersion/reverButton.vue";
297
+ export default {
298
+ name: "bd_form_templateEdit",
299
+ mixins: [mixin],
300
+ components: {
301
+ formVersionButton,
302
+ reverButton,
303
+ },
304
+ };
305
+ </script>
@@ -11,11 +11,15 @@ modules = {
11
11
  props: {
12
12
  _dataId: [String, Number],
13
13
  currentFormType: Object,
14
- readonly: Boolean,
14
+ // readonly: Boolean,
15
15
  otherFlag:Boolean,
16
16
  extractedObj:{
17
17
  type:Object,
18
18
  default:()=> null
19
+ },
20
+ hData:{
21
+ type:Object,
22
+ default:()=> null
19
23
  }
20
24
  },
21
25
  components: {
@@ -50,10 +54,16 @@ modules = {
50
54
  editAuth: 0
51
55
  },
52
56
  sid: null,
53
- showOtherAuthDialog:false
57
+ showOtherAuthDialog:false,
58
+ readonly: false
54
59
  };
55
60
  },
56
61
  created() {
62
+ if(this.hData){
63
+ this.readonly = true;
64
+ }else{
65
+ this.readonly = this.$attrs.readonly || false;
66
+ }
57
67
  if(this.extractedObj?.objx?.id){
58
68
  this.dataId = this.extractedObj.obj.id;
59
69
  }else if (this._dataId) {
@@ -117,6 +127,12 @@ modules = {
117
127
  }); */
118
128
  }
119
129
  });
130
+ } else if (this.hData){
131
+ this.isEdit = true;
132
+ this.formTemplate = this.$baseLodash.cloneDeep(this.hData);
133
+ this.dataId = this.hData.id
134
+ this.isInited = true;
135
+ this.getMenuKindAuth(this.formTemplate.menuKindCode);
120
136
  } else {
121
137
  this.getMenuKindAuth(this.formTemplate.menuKindCode);
122
138
  this.isInited = true;
@@ -182,7 +198,7 @@ modules = {
182
198
  });
183
199
  },
184
200
  openDesignDialog() {
185
- let readonly = !this.menuKindAuth.editAuth
201
+ let readonly = this.readonly || !this.menuKindAuth.editAuth
186
202
  this.$emit('openDesignDialog', {
187
203
  row: this.formTemplate,
188
204
  readonly,