cloud-web-corejs 1.0.54-dev.592 → 1.0.54-dev.594

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": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.592",
4
+ "version": "1.0.54-dev.594",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -1,80 +1,85 @@
1
- /**version-1.0*/
2
- let tmixins = {};
3
- tmixins = {
4
- props: ["dataId", "type", "parentTarget", 'option'],
5
- data() {
6
- return {
7
- oplogDTOs: [],
8
- m1Option: {}
9
- };
10
- },
11
- computed: {
12
- target: function () {
13
- return this.parentTarget || this;
14
- }
15
- },
16
- mounted() {
17
- this.initOplogDTOs();
18
- },
19
- methods: {
20
- initOplogDTOs() {
21
- const tableOption = {
22
- vue: this,
23
- tableRef: 'table-m1',
24
- tableName: 'component-form_oplog-m1Grid',
25
- columns: [{
26
- type: 'checkbox',
27
- fixed: 'left',
28
- width: 48,
29
- resizable: false
30
- },
31
- {
32
- title: this.$t1('操作时间'),
33
- field: 'createDate',
34
- width: 150
35
- },
36
- {
37
- title: this.$t1('操作人员'),
38
- field: 'createBy',
39
- width: 150
40
- },
41
- {
42
- title: this.$t1('操作日志'),
43
- field: 'logContent',
44
- width: 150
45
- },
46
- {
47
- width: 47,
48
- fixed: 'right',
49
- title: '',
50
- sortable: false
51
- }
52
- ]
53
- };
54
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
55
- this.m1Option = opts;
56
- });
57
-
58
- },
59
- initData(option) {
60
- let data = option.param ? option.param() : {};
61
- let url = option.url || (USER_PREFIX + '/form_oplog/listPage');
62
- this.target.$commonHttp({
63
- aes: true,
64
- url: url,
65
- method: `post`,
66
- data: {
67
- ...data,
68
- searchCount: false
69
- },
70
- isLoading: true,
71
- modalStrictly: true,
72
- success: res => {
73
- let rows = res.objx ? (res.objx.records || res.objx || []) : [];
74
- this.oplogDTOs = rows;
75
- }
76
- });
77
- },
78
- }
79
- };
80
- export const mixins = tmixins
1
+ /**version-1.0*/
2
+ let tmixins = {};
3
+ tmixins = {
4
+ props: ["dataId", "type", "parentTarget", 'option'],
5
+ data() {
6
+ return {
7
+ oplogDTOs: [],
8
+ m1Option: {}
9
+ };
10
+ },
11
+ computed: {
12
+ target: function () {
13
+ return this.parentTarget || this;
14
+ }
15
+ },
16
+ mounted() {
17
+ this.initOplogDTOs();
18
+ },
19
+ methods: {
20
+ initOplogDTOs() {
21
+ const tableOption = {
22
+ vue: this,
23
+ tableRef: 'table-m1',
24
+ tableName: 'component-form_oplog-m1Grid',
25
+ columns: [{
26
+ type: 'checkbox',
27
+ fixed: 'left',
28
+ width: 48,
29
+ resizable: false
30
+ },
31
+ {
32
+ title: this.$t1('操作时间'),
33
+ field: 'createDate',
34
+ width: 150
35
+ },
36
+ {
37
+ title: this.$t1('操作人员'),
38
+ field: 'createBy',
39
+ width: 150
40
+ },
41
+ {
42
+ title: this.$t1('操作日志'),
43
+ field: 'logContent',
44
+ width: 150
45
+ },
46
+ {
47
+ title: this.$t1('版本'),
48
+ field: 'version',
49
+ width: 150
50
+ },
51
+ {
52
+ width: 47,
53
+ fixed: 'right',
54
+ title: '',
55
+ sortable: false
56
+ }
57
+ ]
58
+ };
59
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
60
+ this.m1Option = opts;
61
+ });
62
+
63
+ },
64
+ initData(option) {
65
+ let data = option.param ? option.param() : {};
66
+ let url = option.url || (USER_PREFIX + '/form_oplog/listPage');
67
+ this.target.$commonHttp({
68
+ aes: true,
69
+ url: url,
70
+ method: `post`,
71
+ data: {
72
+ ...data,
73
+ searchCount: false
74
+ },
75
+ isLoading: true,
76
+ modalStrictly: true,
77
+ success: res => {
78
+ let rows = res.objx ? (res.objx.records || res.objx || []) : [];
79
+ this.oplogDTOs = rows;
80
+ }
81
+ });
82
+ },
83
+ }
84
+ };
85
+ export const mixins = tmixins
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <el-button
3
+ type="primary"
4
+ plain
5
+ class="button-sty"
6
+ icon="el-icon-set-up"
7
+ @click="openHistoryDialog"
8
+ >
9
+ {{ $t1("查看历史版本") }}
10
+ <ftHistoryDialog
11
+ v-if="historyDialogVisible"
12
+ :visiable.sync="historyDialogVisible"
13
+ :objType="objType"
14
+ :objCode="objCode"
15
+ :relationCode="relationCode"
16
+ @reverCallback="reverCallback"
17
+ />
18
+ </el-button>
19
+ </template>
20
+ <script>
21
+ export default {
22
+ name: "ftHistoryButton",
23
+ props: {
24
+ objType: {
25
+ type: String,
26
+ default: null,
27
+ },
28
+ objCode: {
29
+ type: String,
30
+ default: null,
31
+ },
32
+ relationCode: {
33
+ type: String,
34
+ default: null,
35
+ },
36
+ },
37
+ components: {
38
+ ftHistoryDialog: () =>
39
+ import("@base/views/bd/setting/formVersion/ftHistoryDialog.vue"),
40
+ },
41
+ data() {
42
+ return {
43
+ historyDialogVisible: false,
44
+ };
45
+ },
46
+ methods: {
47
+ openHistoryDialog() {
48
+ this.historyDialogVisible = true;
49
+ },
50
+ reverCallback() {
51
+ this.$emit("reverCallback");
52
+ },
53
+ },
54
+ };
55
+ </script>
@@ -0,0 +1,384 @@
1
+ <template>
2
+ <div>
3
+ <el-dialog
4
+ :title="$t1(title)"
5
+ :append-to-body="true"
6
+ :modal-append-to-body="true"
7
+ :close-on-click-modal="falseValue"
8
+ :visible.sync="showDialog"
9
+ :modal="falseValue"
10
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
11
+ width="1200px"
12
+ @close="dialogClose"
13
+ v-el-drag-dialog
14
+ v-el-dialog-center
15
+ :fullscreen="true"
16
+ >
17
+ <div class="cont" id="containt" style="overflow: hidden">
18
+ <el-tabs ref="xTabs" v-model="activeName" class="tab-box">
19
+ <el-tab-pane :label="$t1('详情')" name="first">
20
+ <component
21
+ :is="editContent"
22
+ v-if="showEdit"
23
+ visible-key="showEdit"
24
+ :hData="hData"
25
+ :parent-target="_self"
26
+ @reload="$reloadHandle"
27
+ @openDesignDialog="openDesingerDialogByChild"
28
+ @reverCallback="reverCallback"
29
+ ></component>
30
+ </el-tab-pane>
31
+ <el-tab-pane :label="$t1('列表')" name="second">
32
+ <div class="grid-height">
33
+ <vxe-grid
34
+ ref="table-m1"
35
+ v-bind="vxeOption"
36
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
37
+ @custom="$vxeTableUtil.customHandle"
38
+ >
39
+ <template #form>
40
+ <div class="clearfix screen-btns">
41
+ <div class="fr">
42
+ <vxe-button
43
+ icon="el-icon-brush"
44
+ class="button-sty"
45
+ @click="resetEvent"
46
+ type="text"
47
+ status="primary"
48
+ plain
49
+ >{{ $t1("重置") }}
50
+ </vxe-button>
51
+ <vxe-button
52
+ status="warning"
53
+ icon="el-icon-search"
54
+ class="button-sty"
55
+ @click="searchEvent"
56
+ >
57
+ {{ $t1("搜索") }}
58
+ </vxe-button>
59
+ </div>
60
+ </div>
61
+ <vxe-form
62
+ class="screen-box"
63
+ title-width="92px"
64
+ title-align="right"
65
+ :data="formData"
66
+ @submit="searchEvent"
67
+ @reset="resetEvent"
68
+ >
69
+ <vxe-form-item :title="$t1('版本号') + ':'">
70
+ <template v-slot>
71
+ <base-input-number v-model="formData.version" />
72
+ </template>
73
+ </vxe-form-item>
74
+ </vxe-form>
75
+ </template>
76
+ </vxe-grid>
77
+ </div>
78
+ </el-tab-pane>
79
+ </el-tabs>
80
+ </div>
81
+ <el-drawer
82
+ :title="$t1('表单设计({formName})', { formName })"
83
+ :visible.sync="showDesingerDialog"
84
+ :modal="false"
85
+ :destroy-on-close="true"
86
+ size="100%"
87
+ direction="rtl"
88
+ :append-to-body="false"
89
+ class="designer-drawer"
90
+ :class="[isFullscreen ? 'is-fullscreen' : '']"
91
+ @close="handleFormDesignClose"
92
+ >
93
+ <el-tabs v-model="formDesTabs" type="card" class="tab-boxOnly" :stretch="true">
94
+ <el-tab-pane :label="$t1('设计器')" name="first">
95
+ <designer
96
+ ref="designer"
97
+ :formCode.sync="formCode"
98
+ @reflushTemplateList="reflushTemplateList"
99
+ :readonly="designerReadonly"
100
+ ></designer>
101
+ </el-tab-pane>
102
+ <!-- <el-tab-pane :label="$t1('后端脚本')" name="second">
103
+ <formScriptList
104
+ :formCode="formCode"
105
+ :formTemplate="currentFormTemplate"
106
+ v-if="showFormScriptList"
107
+ ></formScriptList>
108
+ </el-tab-pane> -->
109
+ </el-tabs>
110
+ <el-button class="isFullIcon" v-if="!isFullscreen" @click="handleFullscreen">
111
+ <el-tooltip effect="dark" :content="$t1('全屏')" placement="top">
112
+ <i class="iconfont icon-quanping"></i>
113
+ </el-tooltip>
114
+ </el-button>
115
+ <el-button class="isFullIcon" v-else @click="handleFullscreen">
116
+ <el-tooltip effect="dark" :content="$t1('缩小')" placement="top">
117
+ <i class="iconfont icon-suoxiao"></i>
118
+ </el-tooltip>
119
+ </el-button>
120
+ </el-drawer>
121
+ </el-dialog>
122
+ </div>
123
+ </template>
124
+
125
+ <script>
126
+ import { selectDialogMixins } from "@base/mixins/selectDialog";
127
+ import FormTemplateEdit from "@base/views/bd/setting/form_template/edit.vue";
128
+ import FormScriptEdit from "@base/views/bd/setting/form_script/edit.vue";
129
+ import FormScriptEdit1 from "@base/views/bd/setting/form_script/edit1.vue";
130
+ import SzTaMbEdit from "@base/views/bd/setting/table_model/edit.vue";
131
+ import formScriptList from "@base/views/bd/setting/form_script/form_list.vue";
132
+
133
+ export default {
134
+ name: "ftHistoryDialog",
135
+ props: ["visiable", "objType", "objCode", "relationCode"],
136
+ mixins: [selectDialogMixins],
137
+ components: {
138
+ FormTemplateEdit,
139
+ FormScriptEdit,
140
+ FormScriptEdit1,
141
+ SzTaMbEdit,
142
+ formScriptList,
143
+ designer: () => import("@base/views/user/form/vform/designer.vue"),
144
+ },
145
+ created() {
146
+ this.initSetting();
147
+ this.initTitle();
148
+ },
149
+ mounted() {
150
+ this.initTableM1();
151
+ },
152
+ data() {
153
+ return {
154
+ showEdit: false,
155
+ showDialog: true,
156
+ falseValue: false,
157
+ selectMulti: true,
158
+ formData: {},
159
+ vxeOption: {},
160
+ showSaleOrgDialog: false,
161
+ activeName: "second",
162
+
163
+ editContent: null,
164
+ hData: null,
165
+
166
+ formCode: null,
167
+ formName: null,
168
+ currentFormTemplate: null,
169
+ isFullscreen: false,
170
+ designerReadonly: false,
171
+ showDesingerDialog: false,
172
+
173
+ showFormScriptList: false,
174
+ formDesTabs: "first",
175
+ title: "历史列表",
176
+ };
177
+ },
178
+ watch: {
179
+ formDesTabs(val) {
180
+ if (this.showFormScriptList == false && val == "second") {
181
+ this.showFormScriptList = true;
182
+ }
183
+ },
184
+ },
185
+ methods: {
186
+ initTitle() {
187
+ let titleMap = {
188
+ FormTemplate: "表单模板历史版本",
189
+ FormScript: "逻辑脚本历史版本",
190
+ SzTaMb: "数据表历史版本",
191
+ };
192
+ this.title = titleMap[this.objType];
193
+ },
194
+ initTableM1() {
195
+ let that = this;
196
+ let objNameTitleMap = {
197
+ FormTemplate: "模板名称",
198
+ FormScript: "脚本名称",
199
+ SzTaMb: "数据表名称",
200
+ };
201
+ let objNameTitle = objNameTitleMap[this.objType];
202
+ let objCodeTitleMap = {
203
+ FormTemplate: "模板编码",
204
+ FormScript: "脚本编码",
205
+ SzTaMb: "数据表编码",
206
+ };
207
+ let objCodeTitle = objCodeTitleMap[this.objType];
208
+
209
+ let tableOption = {
210
+ vue: that,
211
+ tableRef: "table-m1",
212
+ tableName: "bd_formVersion_dialog-m1",
213
+ path: USER_PREFIX + "/formVersion/listPage",
214
+ param: () => {
215
+ return {
216
+ ...this.formData,
217
+ objType: this.objType,
218
+ objCode: this.objCode,
219
+ relationCode: this.relationCode,
220
+ };
221
+ },
222
+ columns: [
223
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
224
+ {
225
+ title: this.$t1(objNameTitle),
226
+ field: "objName",
227
+ width: 150,
228
+ fixed: "left",
229
+ },
230
+ {
231
+ title: this.$t1(objCodeTitle),
232
+ field: "objCode",
233
+ width: 150,
234
+ },
235
+ {
236
+ title: this.$t1("版本号"),
237
+ field: "version",
238
+ width: 150,
239
+ },
240
+ {
241
+ title: this.$t1("创建时间"),
242
+ field: "createDate",
243
+ width: 150,
244
+ },
245
+ {
246
+ width: 90,
247
+ fixed: "right",
248
+ title: "",
249
+ sortable: false,
250
+ slots: {
251
+ default: ({ row }) => {
252
+ return [
253
+ <div>
254
+ <a
255
+ href="javascript:void(0);"
256
+ class="a-link"
257
+ onclick={() => {
258
+ this.openEditView(row);
259
+ }}
260
+ >
261
+ <el-tooltip
262
+ enterable={false}
263
+ effect="dark"
264
+ content="查看"
265
+ placement="top"
266
+ popper-class="tooltip-skin"
267
+ >
268
+ <i class="el-icon-edit" />
269
+ </el-tooltip>
270
+ </a>
271
+ </div>,
272
+ ];
273
+ },
274
+ },
275
+ },
276
+ ],
277
+ };
278
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
279
+ that.vxeOption = opts;
280
+ });
281
+ },
282
+ openEditView(row) {
283
+ this.$http({
284
+ url: USER_PREFIX + "/formVersion/get",
285
+ method: "post",
286
+ data: {
287
+ id: row.id,
288
+ },
289
+ success: (res) => {
290
+ let objx = res.objx;
291
+ let hData = JSON.parse(objx.content);
292
+ this.hData = hData;
293
+ let map = {
294
+ FormTemplate: FormTemplateEdit,
295
+ FormScript: FormScriptEdit,
296
+ SzTaMb: SzTaMbEdit,
297
+ };
298
+ let scriptTypeMap = {
299
+ 0: FormScriptEdit,
300
+ 1: FormScriptEdit1,
301
+ };
302
+ if (row.objType === "FormScript") {
303
+ this.editContent = scriptTypeMap[hData.scriptType];
304
+ } else {
305
+ this.editContent = map[row.objType];
306
+ }
307
+ this.activeName = "first";
308
+ this.$openEditView("showEdit");
309
+ },
310
+ });
311
+ },
312
+ rever(row) {},
313
+ openDesingerDialog(row, callback, readonly = false) {
314
+ this.formCode = row.formCode;
315
+ this.formName = row.formName + " - " + row.formVersion;
316
+ this.currentFormTemplate = row;
317
+ this.isFullscreen = false;
318
+
319
+ this.designerReadonly = readonly;
320
+ this.showDesingerDialog = true;
321
+ this.designerSaveCallback = callback ?? null;
322
+ },
323
+ openDesingerDialogByChild({ row, readonly, callback }) {
324
+ this.openDesingerDialog(row, callback, readonly);
325
+ },
326
+ reflushTemplateList() {
327
+ this.searchEvent();
328
+ this.designerSaveCallback && this.designerSaveCallback();
329
+ },
330
+ handleFullscreen() {
331
+ let isFullscreen = this.isFullscreen;
332
+ if (!isFullscreen) {
333
+ indexUtil.addClass(document.body, "hideMenu");
334
+ } else {
335
+ indexUtil.removeClass(document.body, "hideMenu");
336
+ }
337
+ this.isFullscreen = !isFullscreen;
338
+ },
339
+ handleFormDesignClose() {
340
+ this.formDesTabs = "first";
341
+ this.showFormScriptList = false;
342
+ },
343
+ reverCallback() {
344
+ this.$emit("reverCallback");
345
+ this.dialogClose();
346
+ },
347
+ },
348
+ };
349
+ </script>
350
+ <style scoped lang="scss">
351
+ .grid-height {
352
+ height: calc(100vh - 162px) !important;
353
+ }
354
+ ::v-deep .tab-boxOnly > .el-tabs__header {
355
+ position: absolute;
356
+ right: 130px;
357
+ top: 0;
358
+ }
359
+
360
+ ::v-deep .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
361
+ .detail-wrap .d-cont {
362
+ height: calc(100vh - 158px) !important;
363
+ }
364
+
365
+ .grid-height {
366
+ height: calc(100vh - 126px) !important;
367
+ }
368
+ }
369
+
370
+ ::v-deep
371
+ .designer-drawer.is-fullscreen
372
+ .tab-boxOnly
373
+ > .el-tabs__content
374
+ .el-tab-pane
375
+ .el-tab-pane {
376
+ .detail-wrap .d-cont {
377
+ height: calc(100vh - 116px) !important;
378
+ }
379
+
380
+ .grid-height {
381
+ height: calc(100vh - 84px) !important;
382
+ }
383
+ }
384
+ </style>
@@ -0,0 +1,66 @@
1
+ <template>
2
+ <el-button
3
+ type="primary"
4
+ plain
5
+ class="button-sty"
6
+ icon="el-icon-set-up"
7
+ @click="saveData"
8
+ >
9
+ {{ $t1("回退当前版本") }}
10
+ </el-button>
11
+ </template>
12
+ <script>
13
+ import { USER_PREFIX } from "@/prefixConfig";
14
+
15
+ export default {
16
+ name: "ftHistoryButton",
17
+ props: {
18
+ hData: Object,
19
+ objType: {
20
+ type: String,
21
+ default: "",
22
+ },
23
+ objCode: {
24
+ type: String,
25
+ default: "",
26
+ },
27
+ },
28
+ components: {
29
+ ftHistoryDialog: () =>
30
+ import("@base/views/bd/setting/formVersion/ftHistoryDialog.vue"),
31
+ },
32
+ data() {
33
+ return {
34
+ historyDialogVisible: false,
35
+ };
36
+ },
37
+ methods: {
38
+ saveData() {
39
+ let url = null;
40
+ if (this.objType === "FormTemplate") {
41
+ url = USER_PREFIX + "/formTemplate/update";
42
+ } else if (this.objType === "FormScript") {
43
+ url = USER_PREFIX + "/formScript/update";
44
+ } else if (this.objType === "SzTaMb") {
45
+ url = USER_PREFIX + "/szTaMb/update";
46
+ }
47
+ this.$baseConfirm(this.$t1("您确定要回退当前版本吗?")).then(() => {
48
+ this.$http({
49
+ aes: true,
50
+ url: url,
51
+ method: `post`,
52
+ data: this.hData,
53
+ isLoading: true,
54
+ success: (res) => {
55
+ this.$message({
56
+ message: res.content,
57
+ type: "success",
58
+ });
59
+ this.$emit("reverCallback");
60
+ },
61
+ });
62
+ });
63
+ },
64
+ },
65
+ };
66
+ </script>