cloud-web-corejs 1.1.0-dev.85 → 1.1.0-dev.87
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
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:title="$t1('复制表单模板')"
|
|
4
|
+
:append-to-body="true"
|
|
5
|
+
:modal-append-to-body="true"
|
|
6
|
+
:close-on-click-modal="false"
|
|
7
|
+
:visible.sync="showDialog"
|
|
8
|
+
:modal="false"
|
|
9
|
+
custom-class="dialog-style list-dialog dialog-checkbox pd_8"
|
|
10
|
+
width="360px"
|
|
11
|
+
v-el-drag-dialog
|
|
12
|
+
v-el-dialog-center
|
|
13
|
+
@close="close"
|
|
14
|
+
>
|
|
15
|
+
<div class="cont">
|
|
16
|
+
<el-form
|
|
17
|
+
ref="editForm"
|
|
18
|
+
:model="formData"
|
|
19
|
+
label-width="110px"
|
|
20
|
+
class="adSearchForm"
|
|
21
|
+
style="width: 322px; height: auto;"
|
|
22
|
+
>
|
|
23
|
+
<el-form-item :label="$t1('后缀')" prop="suffix" :rules="suffixRules">
|
|
24
|
+
<el-input
|
|
25
|
+
v-model="formData.suffix"
|
|
26
|
+
clearable
|
|
27
|
+
:placeholder="$t1('追加到编码和名称')"
|
|
28
|
+
/>
|
|
29
|
+
</el-form-item>
|
|
30
|
+
<el-form-item :label="$t1('表单分类')" prop="menuKindName">
|
|
31
|
+
<el-input
|
|
32
|
+
class="search-input"
|
|
33
|
+
v-model="formData.menuKindName"
|
|
34
|
+
@clear="clearMenuKind"
|
|
35
|
+
v-el-readonly
|
|
36
|
+
clearable
|
|
37
|
+
:placeholder="$t1('不填则保持原分类')"
|
|
38
|
+
>
|
|
39
|
+
<i
|
|
40
|
+
slot="suffix"
|
|
41
|
+
class="el-input__icon el-icon-search"
|
|
42
|
+
@click="showMenuKindDialog = true"
|
|
43
|
+
></i>
|
|
44
|
+
</el-input>
|
|
45
|
+
</el-form-item>
|
|
46
|
+
</el-form>
|
|
47
|
+
</div>
|
|
48
|
+
<span slot="footer" class="dialog-footer">
|
|
49
|
+
<el-button type="primary" plain class="button-sty" @click="close">
|
|
50
|
+
<i class="el-icon-close el-icon"></i>
|
|
51
|
+
{{ $t1('取 消') }}
|
|
52
|
+
</el-button>
|
|
53
|
+
<el-button type="primary" @click="saveData" class="button-sty">
|
|
54
|
+
<i class="el-icon-check el-icon"></i>
|
|
55
|
+
{{ $t1('确 定') }}
|
|
56
|
+
</el-button>
|
|
57
|
+
</span>
|
|
58
|
+
<MenuKindDialog
|
|
59
|
+
v-if="showMenuKindDialog"
|
|
60
|
+
:visiable.sync="showMenuKindDialog"
|
|
61
|
+
:serviceName="serviceName"
|
|
62
|
+
@confirm="confirmMenuKind"
|
|
63
|
+
:param="{ taType: 0 }"
|
|
64
|
+
:multi="false"
|
|
65
|
+
/>
|
|
66
|
+
</el-dialog>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
|
|
71
|
+
|
|
72
|
+
export default {
|
|
73
|
+
name: "formTemplateCopyAppendDialog",
|
|
74
|
+
components: { MenuKindDialog },
|
|
75
|
+
props: {
|
|
76
|
+
visiable: Boolean,
|
|
77
|
+
ids: {
|
|
78
|
+
type: Array,
|
|
79
|
+
default() {
|
|
80
|
+
return [];
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
serviceName: String,
|
|
84
|
+
},
|
|
85
|
+
data() {
|
|
86
|
+
return {
|
|
87
|
+
showDialog: true,
|
|
88
|
+
showMenuKindDialog: false,
|
|
89
|
+
formData: {
|
|
90
|
+
suffix: "",
|
|
91
|
+
menuKindCode: "",
|
|
92
|
+
menuKindName: "",
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
computed: {
|
|
97
|
+
suffixRules() {
|
|
98
|
+
return [
|
|
99
|
+
{
|
|
100
|
+
required: true,
|
|
101
|
+
message: this.$t1("请输入后缀"),
|
|
102
|
+
trigger: "blur",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
validator: (rule, value, callback) => {
|
|
106
|
+
let suffix = (value || "").trim();
|
|
107
|
+
if (!suffix) {
|
|
108
|
+
callback(new Error(this.$t1("请输入后缀")));
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (!/^[A-Za-z0-9_.-]+$/.test(suffix)) {
|
|
112
|
+
callback(new Error(this.$t1("后缀只允许是字母或数字或'_.-'")));
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
callback();
|
|
116
|
+
},
|
|
117
|
+
trigger: "blur",
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
methods: {
|
|
123
|
+
clearMenuKind() {
|
|
124
|
+
this.formData.menuKindCode = "";
|
|
125
|
+
this.formData.menuKindName = "";
|
|
126
|
+
},
|
|
127
|
+
confirmMenuKind(rows) {
|
|
128
|
+
if (rows && rows.length) {
|
|
129
|
+
let row = rows[0];
|
|
130
|
+
this.formData.menuKindCode = row.menuKindCode;
|
|
131
|
+
this.formData.menuKindName = row.name;
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
saveData() {
|
|
135
|
+
this.$refs.editForm.validate((valid) => {
|
|
136
|
+
if (!valid) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.$baseConfirm(this.$t1("您确定要复制吗?")).then(() => {
|
|
140
|
+
let data = {
|
|
141
|
+
ids: this.ids,
|
|
142
|
+
suffix: (this.formData.suffix || "").trim(),
|
|
143
|
+
};
|
|
144
|
+
if (this.formData.menuKindCode) {
|
|
145
|
+
data.menuKindCode = this.formData.menuKindCode;
|
|
146
|
+
}
|
|
147
|
+
this.$http({
|
|
148
|
+
url: USER_PREFIX + "/formTemplate/copyAppend",
|
|
149
|
+
method: "post",
|
|
150
|
+
data,
|
|
151
|
+
isLoading: true,
|
|
152
|
+
success: (res) => {
|
|
153
|
+
this.$message({
|
|
154
|
+
message: res.content,
|
|
155
|
+
type: "success",
|
|
156
|
+
duration: 500,
|
|
157
|
+
onClose: () => {
|
|
158
|
+
this.close();
|
|
159
|
+
this.$emit("confirm");
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
close() {
|
|
168
|
+
this.showDialog = false;
|
|
169
|
+
this.$emit("update:visiable", false);
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
</script>
|
|
@@ -63,6 +63,14 @@
|
|
|
63
63
|
v-if="isDev && currentFormType.addAuth === 1"
|
|
64
64
|
>{{ $t1("新增") }}
|
|
65
65
|
</vxe-button>
|
|
66
|
+
<vxe-button
|
|
67
|
+
status="primary"
|
|
68
|
+
class="button-sty"
|
|
69
|
+
icon="el-icon-document-copy"
|
|
70
|
+
@click="openCopyAppendDialog"
|
|
71
|
+
v-if="isDev && currentFormType.addAuth === 1"
|
|
72
|
+
>{{ $t1("复制") }}
|
|
73
|
+
</vxe-button>
|
|
66
74
|
<vxe-button
|
|
67
75
|
status="success"
|
|
68
76
|
class="button-sty"
|
|
@@ -290,6 +298,13 @@
|
|
|
290
298
|
:rows="checkTags"
|
|
291
299
|
:multi="true"
|
|
292
300
|
></projectTagDialog>
|
|
301
|
+
<copyAppendDialog
|
|
302
|
+
v-if="showCopyAppendDialog"
|
|
303
|
+
:visiable.sync="showCopyAppendDialog"
|
|
304
|
+
:ids="copyIds"
|
|
305
|
+
:serviceName="copyServiceName"
|
|
306
|
+
@confirm="confirmCopyAppendDialog"
|
|
307
|
+
></copyAppendDialog>
|
|
293
308
|
</div>
|
|
294
309
|
</template>
|
|
295
310
|
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
getJsxStatus,
|
|
20
20
|
} from "@base/views/bd/setting/utils/index";
|
|
21
21
|
import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
|
|
22
|
+
import copyAppendDialog from "@base/views/bd/setting/form_template/copyAppendDialog.vue";
|
|
22
23
|
import settingConfig from "@/settings";
|
|
23
24
|
import {
|
|
24
25
|
getDesignerLayoutType,
|
|
@@ -45,6 +46,7 @@ modules = {
|
|
|
45
46
|
formDesignerDialog: () =>
|
|
46
47
|
import("@base/views/bd/setting/form_template/formDesignerDialog.vue"),
|
|
47
48
|
formVersionButton,
|
|
49
|
+
copyAppendDialog,
|
|
48
50
|
},
|
|
49
51
|
data() {
|
|
50
52
|
return {
|
|
@@ -148,6 +150,9 @@ modules = {
|
|
|
148
150
|
showTree: false,
|
|
149
151
|
designerReadonly: false,
|
|
150
152
|
designerLayoutType: "PC",
|
|
153
|
+
showCopyAppendDialog: false,
|
|
154
|
+
copyIds: [],
|
|
155
|
+
copyServiceName: "",
|
|
151
156
|
};
|
|
152
157
|
},
|
|
153
158
|
computed: {
|
|
@@ -190,6 +195,22 @@ modules = {
|
|
|
190
195
|
this.checkTags = [];
|
|
191
196
|
this.$refs["table-m1"].commitProxy("reload");
|
|
192
197
|
},
|
|
198
|
+
openCopyAppendDialog() {
|
|
199
|
+
let rows = this.$refs["table-m1"].getCheckboxRecords(true) || [];
|
|
200
|
+
if (!rows.length) {
|
|
201
|
+
this.$baseAlert(this.$t1("请选择需要复制的数据"));
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
this.copyIds = rows.map((item) => item.id);
|
|
205
|
+
let serviceNames = [
|
|
206
|
+
...new Set(rows.map((item) => item.serviceName).filter((item) => item)),
|
|
207
|
+
];
|
|
208
|
+
this.copyServiceName = serviceNames.length === 1 ? serviceNames[0] : "";
|
|
209
|
+
this.showCopyAppendDialog = true;
|
|
210
|
+
},
|
|
211
|
+
confirmCopyAppendDialog() {
|
|
212
|
+
this.searchEvent();
|
|
213
|
+
},
|
|
193
214
|
openEditDialog(row) {
|
|
194
215
|
let dataId = row?.id || 0;
|
|
195
216
|
/*this.dataId = !id || typeof id === 'object' ? 0 : id;
|