cloud-web-corejs 1.0.54-dev.693 → 1.0.54-dev.695
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 +1 -1
- package/src/components/jsonImport/index.js +67 -49
- package/src/views/bd/setting/form_script/list.vue +13 -9
- package/src/views/bd/setting/form_script/list1.vue +13 -9
- package/src/views/bd/setting/form_script/mixins/list.js +21 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +27 -2
- package/src/views/bd/setting/form_template/list.vue +15 -11
- package/src/views/bd/setting/form_template/mixins/list.js +95 -53
- package/src/views/bd/setting/table_model/list.vue +12 -8
- package/src/views/bd/setting/table_model/mixins/list.js +29 -2
- package/src/views/bd/setting/utils/index.js +15 -0
package/package.json
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
const moudule = {};
|
|
2
|
-
import vue from "vue"
|
|
3
|
-
import excelImport from
|
|
2
|
+
import vue from "vue";
|
|
3
|
+
import excelImport from "./index.vue";
|
|
4
4
|
import exportDialog from "./exportDialog.vue";
|
|
5
|
-
import {getBdEnv} from "@base/api/user";
|
|
6
|
-
import {encrypt, decrypt} from "@base/utils/aes";
|
|
5
|
+
import { getBdEnv } from "@base/api/user";
|
|
6
|
+
import { encrypt, decrypt } from "@base/utils/aes";
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
getToken
|
|
10
|
-
} from '../../utils/auth'
|
|
8
|
+
import { getToken } from "../../utils/auth";
|
|
11
9
|
|
|
12
10
|
let configUtil = {
|
|
13
11
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
14
|
-
getToken
|
|
12
|
+
getToken,
|
|
15
13
|
};
|
|
16
14
|
const ExcelImportInstance = vue.extend(excelImport);
|
|
17
15
|
const ExportDialogInstance = vue.extend(exportDialog);
|
|
@@ -19,9 +17,9 @@ const initInstance = function (containter, flag) {
|
|
|
19
17
|
// 实例化vue实例
|
|
20
18
|
let currentInstance;
|
|
21
19
|
if (flag == 1) {
|
|
22
|
-
currentInstance = new ExcelImportInstance({i18n: window.$vueRoot._i18n});
|
|
20
|
+
currentInstance = new ExcelImportInstance({ i18n: window.$vueRoot._i18n });
|
|
23
21
|
} else {
|
|
24
|
-
currentInstance = new ExportDialogInstance({i18n: window.$vueRoot._i18n});
|
|
22
|
+
currentInstance = new ExportDialogInstance({ i18n: window.$vueRoot._i18n });
|
|
25
23
|
}
|
|
26
24
|
let dom = currentInstance.$mount().$el;
|
|
27
25
|
containter.appendChild(dom);
|
|
@@ -34,9 +32,9 @@ function toDo(options) {
|
|
|
34
32
|
let vueTarget = this && this.$el ? this : window.$vueRoot;
|
|
35
33
|
let currentInstance = initInstance(containter, 1);
|
|
36
34
|
currentInstance.param = {};
|
|
37
|
-
Object.assign(currentInstance.param, {vue: vueTarget}, options);
|
|
35
|
+
Object.assign(currentInstance.param, { vue: vueTarget }, options);
|
|
38
36
|
return currentInstance.exc();
|
|
39
|
-
}
|
|
37
|
+
}
|
|
40
38
|
|
|
41
39
|
function openExportDialog(options, callback) {
|
|
42
40
|
// let containter = this && this.$el ? this.$el : document.body;
|
|
@@ -44,9 +42,11 @@ function openExportDialog(options, callback) {
|
|
|
44
42
|
let vueTarget = this && this.$el ? this : window.$vueRoot;
|
|
45
43
|
let currentInstance = initInstance(containter, 2);
|
|
46
44
|
currentInstance.param = {};
|
|
47
|
-
Object.assign(currentInstance.param, {vue: vueTarget}, options, {
|
|
45
|
+
Object.assign(currentInstance.param, { vue: vueTarget }, options, {
|
|
46
|
+
confirm: callback,
|
|
47
|
+
});
|
|
48
48
|
// return currentInstance.exc();
|
|
49
|
-
}
|
|
49
|
+
}
|
|
50
50
|
|
|
51
51
|
// 定义插件对象
|
|
52
52
|
// vue的install方法,用于定义vue插件
|
|
@@ -62,70 +62,88 @@ moudule.install = function (Vue) {
|
|
|
62
62
|
let selectTypeAuth = options.selectTypeAuth;
|
|
63
63
|
let that = this;
|
|
64
64
|
|
|
65
|
-
let ids = []
|
|
65
|
+
let ids = [];
|
|
66
66
|
if (options.data) {
|
|
67
|
-
ids = options.data
|
|
67
|
+
ids = options.data;
|
|
68
68
|
} else if (targetRef) {
|
|
69
|
-
let url = options
|
|
69
|
+
let url = options;
|
|
70
70
|
let checkRows = this.$refs[targetRef].getCheckboxRecords(true);
|
|
71
71
|
if (!checkRows.length) {
|
|
72
|
-
this.$baseAlert(this.$t1(
|
|
73
|
-
return
|
|
72
|
+
this.$baseAlert(this.$t1("请选择需要导出的数据"));
|
|
73
|
+
return;
|
|
74
74
|
}
|
|
75
|
-
ids = checkRows.map(item => item.id);
|
|
75
|
+
ids = checkRows.map((item) => item.id);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
let handle = function (abc) {
|
|
79
79
|
let reqData = {
|
|
80
|
-
ids
|
|
81
|
-
}
|
|
80
|
+
ids,
|
|
81
|
+
};
|
|
82
82
|
if (abc) {
|
|
83
83
|
reqData.abc = abc;
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
if (options.plaintext) {
|
|
86
|
+
reqData.plaintext = options.plaintext;
|
|
87
87
|
}
|
|
88
|
+
let data = {
|
|
89
|
+
datas: encrypt(JSON.stringify(reqData)),
|
|
90
|
+
};
|
|
88
91
|
|
|
89
92
|
that.$http({
|
|
90
93
|
url: options.url,
|
|
91
94
|
method: `post`,
|
|
92
95
|
data: data,
|
|
93
96
|
isLoading: true,
|
|
94
|
-
success: res => {
|
|
95
|
-
let content = res.objx
|
|
97
|
+
success: (res) => {
|
|
98
|
+
let content = res.objx;
|
|
96
99
|
if (content && content !== "[]") {
|
|
97
|
-
let
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
let fileName;
|
|
101
|
+
if (options.fileName) {
|
|
102
|
+
fileName = options.fileName;
|
|
103
|
+
} else {
|
|
104
|
+
let timeStr = res.time
|
|
105
|
+
.replaceAll(":", "")
|
|
106
|
+
.replaceAll("-", "")
|
|
107
|
+
.replaceAll(" ", "");
|
|
108
|
+
fileName = options.title + "(" + timeStr + ")";
|
|
109
|
+
}
|
|
110
|
+
/* if (options.plaintext) {
|
|
111
|
+
try {
|
|
112
|
+
content = JSON.stringify(JSON.parse(content), null, 2);
|
|
113
|
+
} catch (e) {
|
|
114
|
+
// content is not valid JSON, keep original
|
|
115
|
+
}
|
|
116
|
+
} */
|
|
117
|
+
downloadTxt(fileName, content);
|
|
100
118
|
} else {
|
|
101
|
-
this.$baseAlert(this.$t1(
|
|
119
|
+
this.$baseAlert(this.$t1("不存在需要导出的数据"));
|
|
102
120
|
}
|
|
103
|
-
}
|
|
121
|
+
},
|
|
104
122
|
});
|
|
105
|
-
}
|
|
123
|
+
};
|
|
106
124
|
let isDev = true;
|
|
107
125
|
if (abcEnabled) {
|
|
108
126
|
await getBdEnv({
|
|
109
127
|
isLoading: true,
|
|
110
|
-
success: res => {
|
|
111
|
-
isDev = res.objx == "dev"
|
|
112
|
-
}
|
|
128
|
+
success: (res) => {
|
|
129
|
+
isDev = res.objx == "dev";
|
|
130
|
+
},
|
|
113
131
|
});
|
|
114
132
|
}
|
|
115
133
|
if (isDev && abcEnabled && editAuth === 1 && selectTypeAuth == 1) {
|
|
116
134
|
openExportDialog(options, (abc) => {
|
|
117
|
-
handle(abc)
|
|
118
|
-
})
|
|
135
|
+
handle(abc);
|
|
136
|
+
});
|
|
119
137
|
} else {
|
|
120
|
-
this.$baseConfirm(this.$t1(
|
|
121
|
-
let abc = null
|
|
138
|
+
this.$baseConfirm(this.$t1("您确定要导出吗?")).then(() => {
|
|
139
|
+
let abc = null;
|
|
122
140
|
if (abcEnabled) {
|
|
123
141
|
if (isDev) {
|
|
124
142
|
if (!editAuth || !selectTypeAuth) {
|
|
125
|
-
abc = "B"
|
|
143
|
+
abc = "B";
|
|
126
144
|
}
|
|
127
145
|
} else {
|
|
128
|
-
abc = "A"
|
|
146
|
+
abc = "A";
|
|
129
147
|
}
|
|
130
148
|
}
|
|
131
149
|
handle(abc);
|
|
@@ -136,13 +154,13 @@ moudule.install = function (Vue) {
|
|
|
136
154
|
|
|
137
155
|
function downloadTxt(fileName, content) {
|
|
138
156
|
// 创建Blob对象
|
|
139
|
-
const blob = new Blob([content], {type:
|
|
157
|
+
const blob = new Blob([content], { type: "text/plain;charset=utf-8" });
|
|
140
158
|
// 创建URL
|
|
141
159
|
const url = URL.createObjectURL(blob);
|
|
142
160
|
// 创建a标签
|
|
143
|
-
const link = document.createElement(
|
|
161
|
+
const link = document.createElement("a");
|
|
144
162
|
link.href = url;
|
|
145
|
-
link.setAttribute(
|
|
163
|
+
link.setAttribute("download", fileName + ".txt");
|
|
146
164
|
document.body.appendChild(link);
|
|
147
165
|
// 触发下载
|
|
148
166
|
link.click();
|
|
@@ -156,11 +174,11 @@ function download(ippaaapp, uuid) {
|
|
|
156
174
|
let params = {
|
|
157
175
|
// n: fileName
|
|
158
176
|
};
|
|
159
|
-
params[
|
|
177
|
+
params["access_token"] = getToken();
|
|
160
178
|
|
|
161
|
-
let form = document.createElement(
|
|
179
|
+
let form = document.createElement("form");
|
|
162
180
|
|
|
163
|
-
let randomNum =
|
|
181
|
+
let randomNum = new Date().valueOf() + Math.floor(Math.random() * 1000000);
|
|
164
182
|
let formId = "formId-" + randomNum;
|
|
165
183
|
let formName = "formName-" + randomNum;
|
|
166
184
|
|
|
@@ -170,8 +188,8 @@ function download(ippaaapp, uuid) {
|
|
|
170
188
|
document.body.appendChild(form);
|
|
171
189
|
for (let obj in params) {
|
|
172
190
|
if (params.hasOwnProperty(obj)) {
|
|
173
|
-
let input = document.createElement(
|
|
174
|
-
input.tpye =
|
|
191
|
+
let input = document.createElement("input");
|
|
192
|
+
input.tpye = "hidden";
|
|
175
193
|
input.name = obj;
|
|
176
194
|
input.value = params[obj];
|
|
177
195
|
form.appendChild(input);
|
|
@@ -72,23 +72,27 @@
|
|
|
72
72
|
</tableForm>
|
|
73
73
|
</template>
|
|
74
74
|
<template #operation="{ row }">
|
|
75
|
-
<
|
|
75
|
+
<formVersionButton
|
|
76
|
+
objType="FormScript"
|
|
77
|
+
:objCode="row.scriptCode"
|
|
78
|
+
:relationCode="row.formCode"
|
|
79
|
+
@reverCallback="searchEvent"
|
|
80
|
+
></formVersionButton>
|
|
81
|
+
<a
|
|
82
|
+
href="javascript:void(0);"
|
|
83
|
+
class="a-link"
|
|
84
|
+
@click="jsonExportArchive(row)"
|
|
85
|
+
>
|
|
76
86
|
<el-tooltip
|
|
77
87
|
:enterable="false"
|
|
78
88
|
effect="dark"
|
|
79
|
-
:content="$t1('
|
|
89
|
+
:content="$t1('导出归档')"
|
|
80
90
|
placement="top"
|
|
81
91
|
popper-class="tooltip-skin"
|
|
82
92
|
>
|
|
83
|
-
<i class="el-icon-
|
|
93
|
+
<i class="el-icon-upload2" />
|
|
84
94
|
</el-tooltip>
|
|
85
95
|
</a>
|
|
86
|
-
<formVersionButton
|
|
87
|
-
objType="FormScript"
|
|
88
|
-
:objCode="row.scriptCode"
|
|
89
|
-
:relationCode="row.formCode"
|
|
90
|
-
@reverCallback="searchEvent"
|
|
91
|
-
></formVersionButton>
|
|
92
96
|
</template>
|
|
93
97
|
</vxe-grid>
|
|
94
98
|
</div>
|
|
@@ -140,23 +140,27 @@
|
|
|
140
140
|
></projectTagView>
|
|
141
141
|
</template>
|
|
142
142
|
<template #operation="{ row }">
|
|
143
|
-
<
|
|
143
|
+
<formVersionButton
|
|
144
|
+
objType="FormScript"
|
|
145
|
+
:objCode="row.scriptCode"
|
|
146
|
+
:relationCode="row.formCode"
|
|
147
|
+
@reverCallback="searchEvent"
|
|
148
|
+
></formVersionButton>
|
|
149
|
+
<a
|
|
150
|
+
href="javascript:void(0);"
|
|
151
|
+
class="a-link"
|
|
152
|
+
@click="jsonExportArchive(row)"
|
|
153
|
+
>
|
|
144
154
|
<el-tooltip
|
|
145
155
|
:enterable="false"
|
|
146
156
|
effect="dark"
|
|
147
|
-
:content="$t1('
|
|
157
|
+
:content="$t1('导出归档')"
|
|
148
158
|
placement="top"
|
|
149
159
|
popper-class="tooltip-skin"
|
|
150
160
|
>
|
|
151
|
-
<i class="el-icon-
|
|
161
|
+
<i class="el-icon-upload2" />
|
|
152
162
|
</el-tooltip>
|
|
153
163
|
</a>
|
|
154
|
-
<formVersionButton
|
|
155
|
-
objType="FormScript"
|
|
156
|
-
:objCode="row.scriptCode"
|
|
157
|
-
:relationCode="row.formCode"
|
|
158
|
-
@reverCallback="searchEvent"
|
|
159
|
-
></formVersionButton>
|
|
160
164
|
</template>
|
|
161
165
|
</vxe-grid>
|
|
162
166
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import tableForm from "@base/components/table/tableForm.vue";
|
|
2
2
|
import editView from "@base/views/bd/setting/form_script/edit.vue";
|
|
3
3
|
import { getBdFlag } from "@base/api/user";
|
|
4
|
-
import {
|
|
4
|
+
import { getJsxEditLink, getJsxStatus } from "@base/views/bd/setting/utils/index";
|
|
5
5
|
import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
|
|
6
6
|
|
|
7
7
|
let modules = {};
|
|
@@ -78,6 +78,16 @@ modules = {
|
|
|
78
78
|
field: "scriptName",
|
|
79
79
|
width: 180,
|
|
80
80
|
fixed: "left",
|
|
81
|
+
slots: {
|
|
82
|
+
default: ({ row }) => {
|
|
83
|
+
return getJsxEditLink({
|
|
84
|
+
content: row.scriptName,
|
|
85
|
+
onclick: () => {
|
|
86
|
+
this.openEditDialog(row);
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
},
|
|
81
91
|
},
|
|
82
92
|
{
|
|
83
93
|
title: this.$t1("脚本编码"),
|
|
@@ -270,6 +280,16 @@ modules = {
|
|
|
270
280
|
abcEnabled: true,
|
|
271
281
|
});
|
|
272
282
|
},
|
|
283
|
+
jsonExportArchive(row) {
|
|
284
|
+
this.$jsonExport({
|
|
285
|
+
title: "通用脚本",
|
|
286
|
+
data: [row.id],
|
|
287
|
+
url: USER_PREFIX + "/form_develop/exportFormScript",
|
|
288
|
+
plaintext: 1,
|
|
289
|
+
fileName: row.scriptCode + "(script)",
|
|
290
|
+
abcEnabled: true,
|
|
291
|
+
});
|
|
292
|
+
},
|
|
273
293
|
getBdEnv() {
|
|
274
294
|
getBdFlag({
|
|
275
295
|
success: (res) => {
|
|
@@ -7,7 +7,10 @@ import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
|
|
|
7
7
|
import editView from "@base/views/bd/setting/form_script/edit1.vue";
|
|
8
8
|
import { treeScollx } from "@base/utils/global";
|
|
9
9
|
import { getBdFlag } from "@base/api/user";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
getJsxEditLink,
|
|
12
|
+
getJsxStatus,
|
|
13
|
+
} from "@base/views/bd/setting/utils/index";
|
|
11
14
|
import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
|
|
12
15
|
|
|
13
16
|
let modules = {};
|
|
@@ -158,6 +161,16 @@ modules = {
|
|
|
158
161
|
field: "scriptName",
|
|
159
162
|
width: 180,
|
|
160
163
|
fixed: "left",
|
|
164
|
+
slots: {
|
|
165
|
+
default: ({ row }) => {
|
|
166
|
+
return getJsxEditLink({
|
|
167
|
+
content: row.scriptName,
|
|
168
|
+
onclick: () => {
|
|
169
|
+
this.openEditDialog(row);
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
},
|
|
161
174
|
},
|
|
162
175
|
{
|
|
163
176
|
title: this.$t1("项目标签"),
|
|
@@ -266,7 +279,7 @@ modules = {
|
|
|
266
279
|
title: "",
|
|
267
280
|
sortable: false,
|
|
268
281
|
slots: {
|
|
269
|
-
default: "operation"
|
|
282
|
+
default: "operation",
|
|
270
283
|
},
|
|
271
284
|
},
|
|
272
285
|
],
|
|
@@ -468,6 +481,18 @@ modules = {
|
|
|
468
481
|
selectTypeAuth: this.currentFormType.selectTypeAuth,
|
|
469
482
|
});
|
|
470
483
|
},
|
|
484
|
+
jsonExportArchive(row) {
|
|
485
|
+
this.$jsonExport({
|
|
486
|
+
title: "逻辑脚本",
|
|
487
|
+
data: [row.id],
|
|
488
|
+
url: USER_PREFIX + "/form_develop/exportFormScript",
|
|
489
|
+
plaintext: 1,
|
|
490
|
+
fileName: `${row.scriptCode} - ${row.formCode}(script)`,
|
|
491
|
+
abcEnabled: true,
|
|
492
|
+
editAuth: this.currentFormType.editAuth,
|
|
493
|
+
selectTypeAuth: this.currentFormType.selectTypeAuth,
|
|
494
|
+
});
|
|
495
|
+
},
|
|
471
496
|
getBdEnv() {
|
|
472
497
|
getBdFlag({
|
|
473
498
|
success: (res) => {
|
|
@@ -141,17 +141,6 @@
|
|
|
141
141
|
></projectTagView>
|
|
142
142
|
</template>
|
|
143
143
|
<template #operation="{ row }">
|
|
144
|
-
<a href="javascript:void(0);" class="a-link" @click="openEditDialog(row)">
|
|
145
|
-
<el-tooltip
|
|
146
|
-
:enterable="false"
|
|
147
|
-
effect="dark"
|
|
148
|
-
:content="$t1('查看')"
|
|
149
|
-
placement="top"
|
|
150
|
-
popper-class="tooltip-skin"
|
|
151
|
-
>
|
|
152
|
-
<i class="el-icon-edit" />
|
|
153
|
-
</el-tooltip>
|
|
154
|
-
</a>
|
|
155
144
|
<a
|
|
156
145
|
href="javascript:void(0);"
|
|
157
146
|
class="a-link"
|
|
@@ -172,6 +161,21 @@
|
|
|
172
161
|
:objCode="row.formCode"
|
|
173
162
|
@reverCallback="searchEvent"
|
|
174
163
|
></formVersionButton>
|
|
164
|
+
<a
|
|
165
|
+
href="javascript:void(0);"
|
|
166
|
+
class="a-link"
|
|
167
|
+
@click="jsonExportArchive(row)"
|
|
168
|
+
>
|
|
169
|
+
<el-tooltip
|
|
170
|
+
:enterable="false"
|
|
171
|
+
effect="dark"
|
|
172
|
+
:content="$t1('导出归档')"
|
|
173
|
+
placement="top"
|
|
174
|
+
popper-class="tooltip-skin"
|
|
175
|
+
>
|
|
176
|
+
<i class="el-icon-upload2" />
|
|
177
|
+
</el-tooltip>
|
|
178
|
+
</a>
|
|
175
179
|
</template>
|
|
176
180
|
</vxe-grid>
|
|
177
181
|
<el-drawer
|
|
@@ -10,11 +10,12 @@ import ftHistoryDialog from "@base/views/bd/setting/form_template/ftHistoryDialo
|
|
|
10
10
|
import itemList from "@base/views/bd/setting/form_template/itemList.vue";
|
|
11
11
|
import formTypeEditDialog from "@base/views/user/form/form_type/editDialog.vue";
|
|
12
12
|
import projectTagDialog from "@base/views/user/project_tag/dialog.vue";
|
|
13
|
-
import {treeScollx} from "@base/utils/global";
|
|
13
|
+
import { treeScollx } from "@base/utils/global";
|
|
14
14
|
import indexUtil from "@base/utils";
|
|
15
|
-
import {getBdFlag} from "@base/api/user";
|
|
15
|
+
import { getBdFlag } from "@base/api/user";
|
|
16
16
|
import {
|
|
17
17
|
getJsxBtnList,
|
|
18
|
+
getJsxEditLink,
|
|
18
19
|
getJsxStatus,
|
|
19
20
|
} from "@base/views/bd/setting/utils/index";
|
|
20
21
|
import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
|
|
@@ -35,7 +36,8 @@ modules = {
|
|
|
35
36
|
itemList,
|
|
36
37
|
formTypeEditDialog,
|
|
37
38
|
projectTagDialog,
|
|
38
|
-
formDesignerDialog: () =>
|
|
39
|
+
formDesignerDialog: () =>
|
|
40
|
+
import("@base/views/bd/setting/form_template/formDesignerDialog.vue"),
|
|
39
41
|
formVersionButton,
|
|
40
42
|
},
|
|
41
43
|
data() {
|
|
@@ -149,8 +151,8 @@ modules = {
|
|
|
149
151
|
return this.currentFormType?.name || null;
|
|
150
152
|
},
|
|
151
153
|
otherFlag() {
|
|
152
|
-
return this.currentFormType?.menuKindCode === "other"
|
|
153
|
-
}
|
|
154
|
+
return this.currentFormType?.menuKindCode === "other";
|
|
155
|
+
},
|
|
154
156
|
},
|
|
155
157
|
watch: {
|
|
156
158
|
formDesTabs(val) {
|
|
@@ -160,7 +162,7 @@ modules = {
|
|
|
160
162
|
},
|
|
161
163
|
},
|
|
162
164
|
mounted() {
|
|
163
|
-
treeScollx({target: this, type: "default"});
|
|
165
|
+
treeScollx({ target: this, type: "default" });
|
|
164
166
|
this.getBdEnv();
|
|
165
167
|
this.initTableList();
|
|
166
168
|
this.initWfWinParam();
|
|
@@ -194,7 +196,7 @@ modules = {
|
|
|
194
196
|
} else {
|
|
195
197
|
this.getOtherMenuKindAuth(row, (editAuth) => {
|
|
196
198
|
this.openDesingerDialog(row, null, !editAuth);
|
|
197
|
-
})
|
|
199
|
+
});
|
|
198
200
|
}
|
|
199
201
|
},
|
|
200
202
|
getOtherMenuKindAuth(row, callback) {
|
|
@@ -203,11 +205,11 @@ modules = {
|
|
|
203
205
|
aes: true,
|
|
204
206
|
url: USER_PREFIX + "/form_template_auth/getAuth",
|
|
205
207
|
method: `post`,
|
|
206
|
-
data: {stringOne: row.sid},
|
|
208
|
+
data: { stringOne: row.sid },
|
|
207
209
|
isLoading: true,
|
|
208
210
|
success: (res) => {
|
|
209
211
|
let menuKindAuth = res.objx || {};
|
|
210
|
-
callback(!!menuKindAuth.editAuth)
|
|
212
|
+
callback(!!menuKindAuth.editAuth);
|
|
211
213
|
},
|
|
212
214
|
});
|
|
213
215
|
}
|
|
@@ -218,11 +220,11 @@ modules = {
|
|
|
218
220
|
this.currentFormTemplate = row;
|
|
219
221
|
this.isFullscreen = false;
|
|
220
222
|
|
|
221
|
-
this.designerReadonly = readonly
|
|
223
|
+
this.designerReadonly = readonly;
|
|
222
224
|
this.showDesingerDialog = true;
|
|
223
225
|
this.designerSaveCallback = callback ?? null;
|
|
224
226
|
},
|
|
225
|
-
openDesingerDialogByChild({row, readonly, callback}) {
|
|
227
|
+
openDesingerDialogByChild({ row, readonly, callback }) {
|
|
226
228
|
this.openDesingerDialog(row, callback, readonly);
|
|
227
229
|
},
|
|
228
230
|
reflushTemplateList() {
|
|
@@ -258,8 +260,11 @@ modules = {
|
|
|
258
260
|
if (this.checkTags.length) {
|
|
259
261
|
tagCodes = this.checkTags.map((item) => item.tagCode);
|
|
260
262
|
}
|
|
261
|
-
let currentFormType = this.currentFormType || {}
|
|
262
|
-
let menuKindCode =
|
|
263
|
+
let currentFormType = this.currentFormType || {};
|
|
264
|
+
let menuKindCode =
|
|
265
|
+
currentFormType.menuKindCode && !this.otherFlag
|
|
266
|
+
? currentFormType.menuKindCode
|
|
267
|
+
: null;
|
|
263
268
|
return {
|
|
264
269
|
...this.formData,
|
|
265
270
|
tagCodes,
|
|
@@ -274,9 +279,9 @@ modules = {
|
|
|
274
279
|
tableRef: "table-m1",
|
|
275
280
|
tableName: "bd_form_template_list-m1",
|
|
276
281
|
path: () => {
|
|
277
|
-
let url = USER_PREFIX +
|
|
282
|
+
let url = USER_PREFIX + "/formTemplate/listPage";
|
|
278
283
|
if (this.otherFlag) {
|
|
279
|
-
url = USER_PREFIX +
|
|
284
|
+
url = USER_PREFIX + "/formTemplate/listOtherPage";
|
|
280
285
|
}
|
|
281
286
|
return url;
|
|
282
287
|
},
|
|
@@ -284,20 +289,30 @@ modules = {
|
|
|
284
289
|
return this.getSearchParam();
|
|
285
290
|
},
|
|
286
291
|
columns: [
|
|
287
|
-
{type: "checkbox", width: 48, resizable: false, fixed: "left"},
|
|
292
|
+
{ type: "checkbox", width: 48, resizable: false, fixed: "left" },
|
|
288
293
|
{
|
|
289
294
|
title: this.$t1("模板名称"),
|
|
290
295
|
field: "formName",
|
|
291
296
|
width: 150,
|
|
292
297
|
fixed: "left",
|
|
298
|
+
slots: {
|
|
299
|
+
default: ({ row }) => {
|
|
300
|
+
return getJsxEditLink({
|
|
301
|
+
content: row.formName,
|
|
302
|
+
onclick: () => {
|
|
303
|
+
this.openEditDialog(row);
|
|
304
|
+
},
|
|
305
|
+
});
|
|
306
|
+
},
|
|
307
|
+
},
|
|
293
308
|
},
|
|
294
309
|
{
|
|
295
310
|
title: this.$t1("项目标签"),
|
|
296
311
|
field: "tag",
|
|
297
312
|
width: 250,
|
|
298
|
-
slots: {default: "tag"},
|
|
313
|
+
slots: { default: "tag" },
|
|
299
314
|
params: {
|
|
300
|
-
exportVal: ({row}) => {
|
|
315
|
+
exportVal: ({ row }) => {
|
|
301
316
|
if (row.formTemplateTagDTOs) {
|
|
302
317
|
return row.formTemplateTagDTOs
|
|
303
318
|
.map((item) => item.tagName)
|
|
@@ -321,7 +336,7 @@ modules = {
|
|
|
321
336
|
field: "enabled",
|
|
322
337
|
width: 150,
|
|
323
338
|
slots: {
|
|
324
|
-
default: ({row}) => {
|
|
339
|
+
default: ({ row }) => {
|
|
325
340
|
if (row.enabled) {
|
|
326
341
|
return getJsxStatus(null, this.$t1("启用"));
|
|
327
342
|
} else {
|
|
@@ -335,7 +350,7 @@ modules = {
|
|
|
335
350
|
field: "hasWf",
|
|
336
351
|
width: 150,
|
|
337
352
|
slots: {
|
|
338
|
-
default: ({row}) => {
|
|
353
|
+
default: ({ row }) => {
|
|
339
354
|
if (row.hasWf) {
|
|
340
355
|
return getJsxStatus(null, this.$t1("是"));
|
|
341
356
|
} else {
|
|
@@ -359,35 +374,35 @@ modules = {
|
|
|
359
374
|
field: "remark",
|
|
360
375
|
width: 150,
|
|
361
376
|
},
|
|
362
|
-
{field: "serviceName", title: this.$t1("服务名"), width: 150},
|
|
377
|
+
{ field: "serviceName", title: this.$t1("服务名"), width: 150 },
|
|
363
378
|
{
|
|
364
379
|
title: this.$t1("版本号"),
|
|
365
380
|
field: "version",
|
|
366
381
|
width: 150,
|
|
367
382
|
},
|
|
368
|
-
{title: this.$t1("唯一标识"), field: "sid", width: 280},
|
|
383
|
+
{ title: this.$t1("唯一标识"), field: "sid", width: 280 },
|
|
369
384
|
{
|
|
370
|
-
field:
|
|
371
|
-
title: this.$t1(
|
|
372
|
-
width: 150
|
|
385
|
+
field: "createBy",
|
|
386
|
+
title: this.$t1("创建人"),
|
|
387
|
+
width: 150,
|
|
373
388
|
},
|
|
374
389
|
{
|
|
375
|
-
field:
|
|
376
|
-
title: this.$t1(
|
|
377
|
-
width: 150
|
|
390
|
+
field: "createDate",
|
|
391
|
+
title: this.$t1("创建时间"),
|
|
392
|
+
width: 150,
|
|
378
393
|
},
|
|
379
394
|
{
|
|
380
|
-
field:
|
|
381
|
-
title: this.$t1(
|
|
382
|
-
width: 150
|
|
395
|
+
field: "modifyBy",
|
|
396
|
+
title: this.$t1("更新人"),
|
|
397
|
+
width: 150,
|
|
383
398
|
},
|
|
384
399
|
{
|
|
385
|
-
field:
|
|
386
|
-
title: this.$t1(
|
|
387
|
-
width: 150
|
|
400
|
+
field: "modifyDate",
|
|
401
|
+
title: this.$t1("更新时间"),
|
|
402
|
+
width: 150,
|
|
388
403
|
},
|
|
389
404
|
{
|
|
390
|
-
width:
|
|
405
|
+
width: 135,
|
|
391
406
|
fixed: "right",
|
|
392
407
|
title: "",
|
|
393
408
|
sortable: false,
|
|
@@ -424,8 +439,8 @@ modules = {
|
|
|
424
439
|
type: "select",
|
|
425
440
|
common: true,
|
|
426
441
|
itemOption: [
|
|
427
|
-
{label: this.$t1("启用"), value: true},
|
|
428
|
-
{label: this.$t1("禁用"), value: false},
|
|
442
|
+
{ label: this.$t1("启用"), value: true },
|
|
443
|
+
{ label: this.$t1("禁用"), value: false },
|
|
429
444
|
],
|
|
430
445
|
},
|
|
431
446
|
{
|
|
@@ -441,27 +456,42 @@ modules = {
|
|
|
441
456
|
type: "input",
|
|
442
457
|
common: false,
|
|
443
458
|
},
|
|
444
|
-
{title: this.$t1('创建人'), field: "createBy", type: "input", common: false},
|
|
445
|
-
{title: this.$t1('更新人'), field: "modifyBy", type: "input", common: false},
|
|
446
|
-
{title: this.$t1('操作日志'), field: "logContent", type: "input", common: false},
|
|
447
459
|
{
|
|
448
|
-
title: this.$t1(
|
|
460
|
+
title: this.$t1("创建人"),
|
|
461
|
+
field: "createBy",
|
|
462
|
+
type: "input",
|
|
463
|
+
common: false,
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
title: this.$t1("更新人"),
|
|
467
|
+
field: "modifyBy",
|
|
468
|
+
type: "input",
|
|
469
|
+
common: false,
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
title: this.$t1("操作日志"),
|
|
473
|
+
field: "logContent",
|
|
474
|
+
type: "input",
|
|
475
|
+
common: false,
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
title: this.$t1("创建时间"),
|
|
449
479
|
field: "startCreateDate",
|
|
450
480
|
field2: "endCreateDate",
|
|
451
481
|
type: "dateRange",
|
|
452
482
|
common: false,
|
|
453
483
|
widgetType: "datetime",
|
|
454
|
-
valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
484
|
+
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
455
485
|
},
|
|
456
486
|
{
|
|
457
|
-
title: this.$t1(
|
|
487
|
+
title: this.$t1("更新时间"),
|
|
458
488
|
field: "startModifyDate",
|
|
459
489
|
field2: "endModifyDate",
|
|
460
490
|
type: "dateRange",
|
|
461
491
|
common: false,
|
|
462
492
|
widgetType: "datetime",
|
|
463
|
-
valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
464
|
-
}
|
|
493
|
+
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
494
|
+
},
|
|
465
495
|
],
|
|
466
496
|
config: {
|
|
467
497
|
proxyConfig: {
|
|
@@ -562,7 +592,7 @@ modules = {
|
|
|
562
592
|
// 异步树叶子节点懒加载逻辑
|
|
563
593
|
loadNode(node, resolve) {
|
|
564
594
|
let id = node && node.data && node.data.id ? node.data.id || "" : 0;
|
|
565
|
-
let param = {enabled: true};
|
|
595
|
+
let param = { enabled: true };
|
|
566
596
|
let url = !id
|
|
567
597
|
? USER_PREFIX + "/menuKind/getAllList"
|
|
568
598
|
: USER_PREFIX + "/menuKind/getChildren";
|
|
@@ -573,7 +603,7 @@ modules = {
|
|
|
573
603
|
data: {
|
|
574
604
|
parent: id,
|
|
575
605
|
enabled: true,
|
|
576
|
-
dataType: 2
|
|
606
|
+
dataType: 2,
|
|
577
607
|
},
|
|
578
608
|
success: (res) => {
|
|
579
609
|
let rows = res.objx || [];
|
|
@@ -585,8 +615,8 @@ modules = {
|
|
|
585
615
|
id: "other",
|
|
586
616
|
menuKindCode: "other",
|
|
587
617
|
name: "其他分类",
|
|
588
|
-
leaf: true
|
|
589
|
-
})
|
|
618
|
+
leaf: true,
|
|
619
|
+
});
|
|
590
620
|
if (rows.length > 0) {
|
|
591
621
|
this.$nextTick(() => {
|
|
592
622
|
let firstNode = node.childNodes[0];
|
|
@@ -624,15 +654,15 @@ modules = {
|
|
|
624
654
|
saveUrl: USER_PREFIX + "/form_develop/importFormTemplate",
|
|
625
655
|
showResult: true,
|
|
626
656
|
resultColumns: [
|
|
627
|
-
{title: this.$t1("模板名称"), field: "formName", width: 200},
|
|
628
|
-
{title: this.$t1("模板编码"), field: "formCode", width: 200},
|
|
657
|
+
{ title: this.$t1("模板名称"), field: "formName", width: 200 },
|
|
658
|
+
{ title: this.$t1("模板编码"), field: "formCode", width: 200 },
|
|
629
659
|
{
|
|
630
660
|
title: this.$t1("结果信息"),
|
|
631
661
|
field: "impReturnMsg",
|
|
632
662
|
width: 300,
|
|
633
663
|
showOverflow: false,
|
|
634
664
|
slots: {
|
|
635
|
-
default: ({row}, h) => {
|
|
665
|
+
default: ({ row }, h) => {
|
|
636
666
|
let impReturnMsg = row.impReturnMsg;
|
|
637
667
|
let items = impReturnMsg
|
|
638
668
|
.split(";")
|
|
@@ -642,7 +672,7 @@ modules = {
|
|
|
642
672
|
});
|
|
643
673
|
return h("div", {}, items);
|
|
644
674
|
},
|
|
645
|
-
}
|
|
675
|
+
},
|
|
646
676
|
},
|
|
647
677
|
],
|
|
648
678
|
callback: () => {
|
|
@@ -660,6 +690,18 @@ modules = {
|
|
|
660
690
|
selectTypeAuth: this.currentFormType.selectTypeAuth,
|
|
661
691
|
});
|
|
662
692
|
},
|
|
693
|
+
jsonExportArchive(row) {
|
|
694
|
+
this.$jsonExport({
|
|
695
|
+
title: "表单模板",
|
|
696
|
+
data: [row.id],
|
|
697
|
+
url: USER_PREFIX + "/form_develop/exportFormTemplate",
|
|
698
|
+
plaintext: 1,
|
|
699
|
+
fileName: row.formCode + "(form)",
|
|
700
|
+
abcEnabled: true,
|
|
701
|
+
editAuth: this.currentFormType.editAuth,
|
|
702
|
+
selectTypeAuth: this.currentFormType.selectTypeAuth,
|
|
703
|
+
});
|
|
704
|
+
},
|
|
663
705
|
getBdEnv() {
|
|
664
706
|
getBdFlag({
|
|
665
707
|
success: (res) => {
|
|
@@ -145,22 +145,26 @@
|
|
|
145
145
|
></projectTagView>
|
|
146
146
|
</template>
|
|
147
147
|
<template #operation="{ row }">
|
|
148
|
-
<
|
|
148
|
+
<formVersionButton
|
|
149
|
+
objType="SzTaMb"
|
|
150
|
+
:objCode="row.taCode"
|
|
151
|
+
@reverCallback="searchEvent"
|
|
152
|
+
></formVersionButton>
|
|
153
|
+
<a
|
|
154
|
+
href="javascript:void(0);"
|
|
155
|
+
class="a-link"
|
|
156
|
+
@click="jsonExportArchive(row)"
|
|
157
|
+
>
|
|
149
158
|
<el-tooltip
|
|
150
159
|
:enterable="false"
|
|
151
160
|
effect="dark"
|
|
152
|
-
:content="$t1('
|
|
161
|
+
:content="$t1('导出归档')"
|
|
153
162
|
placement="top"
|
|
154
163
|
popper-class="tooltip-skin"
|
|
155
164
|
>
|
|
156
|
-
<i class="el-icon-
|
|
165
|
+
<i class="el-icon-upload2" />
|
|
157
166
|
</el-tooltip>
|
|
158
167
|
</a>
|
|
159
|
-
<formVersionButton
|
|
160
|
-
objType="SzTaMb"
|
|
161
|
-
:objCode="row.taCode"
|
|
162
|
-
@reverCallback="searchEvent"
|
|
163
|
-
></formVersionButton>
|
|
164
168
|
</template>
|
|
165
169
|
</vxe-grid>
|
|
166
170
|
</div>
|
|
@@ -7,7 +7,7 @@ import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
|
|
|
7
7
|
import projectTagDialog from "@base/views/user/project_tag/dialog.vue";
|
|
8
8
|
import {treeScollx} from "@base/utils/global";
|
|
9
9
|
import {getBdFlag} from "@base/api/user";
|
|
10
|
-
import {
|
|
10
|
+
import {getJsxEditLink, getJsxStatus} from "@base/views/bd/setting/utils";
|
|
11
11
|
import { mapGetters } from "vuex";
|
|
12
12
|
import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
|
|
13
13
|
|
|
@@ -157,7 +157,22 @@ modules = {
|
|
|
157
157
|
},
|
|
158
158
|
columns: [
|
|
159
159
|
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
|
160
|
-
{
|
|
160
|
+
{
|
|
161
|
+
title: this.$t1('实体名称'),
|
|
162
|
+
field: 'taEn',
|
|
163
|
+
width: 150,
|
|
164
|
+
fixed: 'left',
|
|
165
|
+
slots: {
|
|
166
|
+
default: ({row}) => {
|
|
167
|
+
return getJsxEditLink({
|
|
168
|
+
content: row.taEn,
|
|
169
|
+
onclick: () => {
|
|
170
|
+
this.openEditDialog(row);
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
161
176
|
{
|
|
162
177
|
title: this.$t1('项目标签'), field: 'tag', width: 250, slots: {default: "tag"}, params: {
|
|
163
178
|
exportVal: ({row}) => {
|
|
@@ -429,6 +444,18 @@ modules = {
|
|
|
429
444
|
selectTypeAuth: this.currentFormType.selectTypeAuth
|
|
430
445
|
})
|
|
431
446
|
},
|
|
447
|
+
jsonExportArchive(row) {
|
|
448
|
+
this.$jsonExport({
|
|
449
|
+
title: "数据表",
|
|
450
|
+
data: [row.id],
|
|
451
|
+
url: USER_PREFIX + "/form_develop/exportSzTaMb",
|
|
452
|
+
plaintext: 1,
|
|
453
|
+
fileName: row.taBm + "(table)",
|
|
454
|
+
abcEnabled: true,
|
|
455
|
+
editAuth: this.currentFormType.editAuth,
|
|
456
|
+
selectTypeAuth: this.currentFormType.selectTypeAuth,
|
|
457
|
+
});
|
|
458
|
+
},
|
|
432
459
|
getBdEnv() {
|
|
433
460
|
getBdFlag({
|
|
434
461
|
success: res => {
|
|
@@ -48,6 +48,21 @@ export function getJsxLink({content, onclick}) {
|
|
|
48
48
|
}, content)]
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
export function getJsxEditLink({content, onclick}) {
|
|
52
|
+
let h = window.$vueRoot.$createElement;
|
|
53
|
+
return [h("a", {
|
|
54
|
+
staticClass: "a-link",
|
|
55
|
+
on: {
|
|
56
|
+
click: (event) => {
|
|
57
|
+
onclick && onclick(event);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, [
|
|
61
|
+
h("i", {staticClass: "el-icon-edit"}),
|
|
62
|
+
h("span", {}, content)
|
|
63
|
+
])]
|
|
64
|
+
}
|
|
65
|
+
|
|
51
66
|
export function getJsxBtnList(list) {
|
|
52
67
|
let arr = [];
|
|
53
68
|
list.forEach(item => {
|