tianheng-ui 0.1.66 → 0.1.67
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/lib/tianheng-ui.js +8 -8
- package/package.json +1 -1
- package/packages/FormMaking/GenerateForm.vue +2 -3
- package/packages/FormMaking/WidgetConfig.vue +1 -1
- package/packages/FormMaking/custom/config.js +1 -1
- package/packages/FormMaking/custom/configs/tabs.vue +3 -3
- package/packages/FormMaking/custom/configs/upload.vue +3 -3
- package/packages/FormMaking/custom/configs/workflow.vue +4 -0
- package/packages/FormMaking/custom/items/alliance.vue +0 -1
- package/packages/FormMaking/custom/items/button.vue +1 -36
- package/packages/FormMaking/custom/items/descriptions.vue +9 -3
- package/packages/FormMaking/custom/items/upload.vue +2 -4
- package/packages/FormMaking/custom/items/workflow.vue +14 -6
- package/packages/FormMaking/util/generateCode.js +2 -2
- package/packages/TableMaking/util/index.js +1 -435
package/package.json
CHANGED
@@ -181,7 +181,7 @@ export default {
|
|
181
181
|
hendleElementRemoteData(item) {
|
182
182
|
if (!item.options.remote || !item.options.remote.open) return;
|
183
183
|
if (item.type === "upload" || item.type === "button") return;
|
184
|
-
|
184
|
+
|
185
185
|
let api = "";
|
186
186
|
if (item.options.remote.api.constructor === String) {
|
187
187
|
api = this.formConfig.config.network[item.options.remote.api];
|
@@ -291,7 +291,6 @@ export default {
|
|
291
291
|
if (!api) return this.$message.warning("未知的接口,请检查配置信息");
|
292
292
|
|
293
293
|
let params = {};
|
294
|
-
const inParams = api.inParams || [];
|
295
294
|
const initParams = list => {
|
296
295
|
list.map(item => {
|
297
296
|
if (item.children) {
|
@@ -302,7 +301,7 @@ export default {
|
|
302
301
|
}
|
303
302
|
});
|
304
303
|
};
|
305
|
-
initParams(inParams);
|
304
|
+
api.inParams && initParams(api.inParams);
|
306
305
|
if (api.needPage) {
|
307
306
|
params.pageNum = params.pageNum || 1;
|
308
307
|
params.pageSize = params.pageNum || 20;
|
@@ -906,7 +906,6 @@ export const businessComponents = [
|
|
906
906
|
format: "",
|
907
907
|
style: {
|
908
908
|
label: {
|
909
|
-
width: "",
|
910
909
|
customStyle: ""
|
911
910
|
},
|
912
911
|
value: {
|
@@ -931,6 +930,7 @@ export const businessComponents = [
|
|
931
930
|
reverse: false,
|
932
931
|
placement: "right",
|
933
932
|
hideTimestamp: false,
|
933
|
+
buttonsSticky: true,
|
934
934
|
remote: {
|
935
935
|
open: false,
|
936
936
|
api: "",
|
@@ -42,10 +42,10 @@
|
|
42
42
|
|
43
43
|
<el-form-item label="数据类型">
|
44
44
|
<el-radio-group
|
45
|
-
v-model="widget.options.remote"
|
45
|
+
v-model="widget.options.remote.open"
|
46
46
|
@input="
|
47
47
|
val => {
|
48
|
-
if (!val) widget.options.
|
48
|
+
if (!val) widget.options.remote.api = '';
|
49
49
|
}
|
50
50
|
"
|
51
51
|
>
|
@@ -58,7 +58,7 @@
|
|
58
58
|
<div v-if="widget.options.remote">
|
59
59
|
<el-select
|
60
60
|
style="width:100%"
|
61
|
-
v-model="widget.options.
|
61
|
+
v-model="widget.options.remote.api"
|
62
62
|
placeholder="请选择"
|
63
63
|
no-data-text="暂无数据,请查阅相关文档说明"
|
64
64
|
clearable
|
@@ -62,11 +62,11 @@
|
|
62
62
|
|
63
63
|
<el-form-item label="上传地址" :required="true">
|
64
64
|
<el-radio-group
|
65
|
-
v-model="widget.options.remote"
|
65
|
+
v-model="widget.options.remote.open"
|
66
66
|
size="mini"
|
67
67
|
@input="
|
68
68
|
val => {
|
69
|
-
if (!val) widget.options.
|
69
|
+
if (!val) widget.options.remote.api = '';
|
70
70
|
}
|
71
71
|
"
|
72
72
|
>
|
@@ -76,7 +76,7 @@
|
|
76
76
|
<el-select
|
77
77
|
v-if="widget.options.remote"
|
78
78
|
style="width:100%"
|
79
|
-
v-model="widget.options.
|
79
|
+
v-model="widget.options.remote.api"
|
80
80
|
placeholder="请选择"
|
81
81
|
no-data-text="暂无数据,请查阅相关文档说明"
|
82
82
|
clearable
|
@@ -20,6 +20,9 @@
|
|
20
20
|
<el-form-item label="隐藏时间">
|
21
21
|
<el-switch v-model="widget.options.hideTimestamp"></el-switch>
|
22
22
|
</el-form-item>
|
23
|
+
<el-form-item label="操作悬浮">
|
24
|
+
<el-switch v-model="widget.options.buttonsSticky"></el-switch>
|
25
|
+
</el-form-item>
|
23
26
|
|
24
27
|
<el-form-item label="节点数据">
|
25
28
|
<el-radio-group
|
@@ -328,6 +331,7 @@
|
|
328
331
|
value-key="id"
|
329
332
|
clearable
|
330
333
|
placeholder=""
|
334
|
+
filterable
|
331
335
|
no-data-text="暂无接口,请前往【接口模块】创建"
|
332
336
|
>
|
333
337
|
<el-option
|
@@ -20,43 +20,8 @@
|
|
20
20
|
|
21
21
|
<script>
|
22
22
|
import { itemsComponent, eventMixin } from "../mixins/index";
|
23
|
-
import * as Axios from "lib/theme-chalk/js/axios";
|
24
23
|
export default {
|
25
|
-
mixins: [itemsComponent, eventMixin]
|
26
|
-
data() {
|
27
|
-
return {
|
28
|
-
axios: null
|
29
|
-
};
|
30
|
-
},
|
31
|
-
created() {
|
32
|
-
const oauthConfig = localStorage.getItem("TH_OauthConfig") || "{}";
|
33
|
-
this.axios = Axios.init(JSON.parse(oauthConfig));
|
34
|
-
},
|
35
|
-
methods: {
|
36
|
-
// hendleRemoteData() {
|
37
|
-
// const remoteFunc = this.config.network[this.widget.options.remoteFunc];
|
38
|
-
// console.log(remoteFunc);
|
39
|
-
// const requestConfig = {
|
40
|
-
// url: remoteFunc.url,
|
41
|
-
// method: remoteFunc.method,
|
42
|
-
// headers: remoteFunc.headers
|
43
|
-
// };
|
44
|
-
// let params = { ...remoteFunc.params };
|
45
|
-
// if (remoteFunc.needPage) {
|
46
|
-
// params.pageNum = 1;
|
47
|
-
// params.pageSize = 20;
|
48
|
-
// }
|
49
|
-
// if (remoteFunc.method.toLowerCase() === "get") {
|
50
|
-
// requestConfig.params = params;
|
51
|
-
// } else {
|
52
|
-
// params = Object.assign(params, this.models);
|
53
|
-
// requestConfig.data = params;
|
54
|
-
// }
|
55
|
-
// this.axios(requestConfig).then(res => {
|
56
|
-
// this.$emit("button-submit", requestConfig);
|
57
|
-
// });
|
58
|
-
// }
|
59
|
-
}
|
24
|
+
mixins: [itemsComponent, eventMixin]
|
60
25
|
};
|
61
26
|
</script>
|
62
27
|
|
@@ -14,14 +14,14 @@
|
|
14
14
|
>
|
15
15
|
<el-descriptions-item v-for="(item, index) in dataModel" :key="index">
|
16
16
|
<template slot="label">
|
17
|
-
<div :style="labelStyle(item)">
|
17
|
+
<div class="item-label" :style="labelStyle(item)">
|
18
18
|
<i v-if="item.icon" :class="item.icon"></i>
|
19
19
|
<span v-html="item.label"></span>
|
20
20
|
<span v-if="widget.options.colon">:</span>
|
21
21
|
</div>
|
22
22
|
</template>
|
23
23
|
<a v-if="item.type === 'url'" :href="item.value">{{ item.value }}</a>
|
24
|
-
<span v-else v-html="item.value"></span>
|
24
|
+
<span v-else class="item-value" v-html="item.value"></span>
|
25
25
|
</el-descriptions-item>
|
26
26
|
</el-descriptions>
|
27
27
|
</div>
|
@@ -36,7 +36,7 @@ export default {
|
|
36
36
|
return item => {
|
37
37
|
let style = {
|
38
38
|
width: this.widget.options.labelWidth,
|
39
|
-
|
39
|
+
"text-align-last": this.widget.options.textAlignLast
|
40
40
|
};
|
41
41
|
if (item.options?.style?.label) {
|
42
42
|
style = Object.assign(style, item.options.style.label);
|
@@ -70,6 +70,12 @@ export default {
|
|
70
70
|
|
71
71
|
<style lang="scss" scoped>
|
72
72
|
.component-descriptions {
|
73
|
+
.item-label {
|
74
|
+
color: #333;
|
75
|
+
}
|
76
|
+
.item-value {
|
77
|
+
color: #666;
|
78
|
+
}
|
73
79
|
.el-descriptions {
|
74
80
|
padding: 0px;
|
75
81
|
}
|
@@ -3,8 +3,6 @@
|
|
3
3
|
<el-upload
|
4
4
|
class="upload-demo"
|
5
5
|
:action="uploadUrl"
|
6
|
-
:headers="widget.options.remote ? widget.options.remoteFunc.headers : {}"
|
7
|
-
:data="widget.options.remote ? widget.options.remoteFunc.params : {}"
|
8
6
|
:multiple="widget.options.multiple"
|
9
7
|
:limit="widget.options.length"
|
10
8
|
:width="widget.options.size.width"
|
@@ -66,11 +64,11 @@ export default {
|
|
66
64
|
},
|
67
65
|
computed: {
|
68
66
|
uploadUrl() {
|
69
|
-
if (this.widget.options.remote) {
|
67
|
+
if (this.widget.options.remote.open) {
|
70
68
|
const info = sessionStorage.getItem("th_oauth_info");
|
71
69
|
let baseUrl = "";
|
72
70
|
if (info) baseUrl = JSON.parse(info).baseUrl;
|
73
|
-
const func = this.config.network[this.widget.options.
|
71
|
+
const func = this.config.network[this.widget.options.remote.api];
|
74
72
|
if (!func) {
|
75
73
|
this.$message.warning("未知的请求接口,请检查配置信息");
|
76
74
|
return "";
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"
|
25
25
|
>
|
26
26
|
<div>
|
27
|
-
<div class="
|
27
|
+
<div class="item-header">
|
28
28
|
<div class="title">{{ item.name }}</div>
|
29
29
|
<div
|
30
30
|
v-if="
|
@@ -54,11 +54,14 @@
|
|
54
54
|
/>
|
55
55
|
</th-cell>
|
56
56
|
</div>
|
57
|
-
<div class="workflow-item-footer"></div>
|
58
57
|
</div>
|
59
58
|
</el-timeline-item>
|
60
59
|
</el-timeline>
|
61
|
-
<div
|
60
|
+
<div
|
61
|
+
v-if="dataModel.processInstButtons.length"
|
62
|
+
class="footer"
|
63
|
+
:class="{ sticky: widget.options.buttonsSticky }"
|
64
|
+
>
|
62
65
|
<el-button
|
63
66
|
v-for="(item, index) in dataModel.processInstButtons"
|
64
67
|
:key="index"
|
@@ -95,7 +98,7 @@ export default {
|
|
95
98
|
.el-timeline {
|
96
99
|
padding: 0px;
|
97
100
|
}
|
98
|
-
.
|
101
|
+
.item-header {
|
99
102
|
margin-bottom: 5px;
|
100
103
|
height: 20px;
|
101
104
|
line-height: 20px;
|
@@ -117,15 +120,20 @@ export default {
|
|
117
120
|
height: 24px;
|
118
121
|
}
|
119
122
|
}
|
120
|
-
.workflow-item-footer {
|
121
|
-
}
|
122
123
|
|
123
124
|
.footer {
|
124
125
|
display: flex;
|
126
|
+
align-items: center;
|
127
|
+
justify-content: space-evenly;
|
125
128
|
|
126
129
|
.el-button {
|
127
130
|
flex: 1;
|
128
131
|
}
|
129
132
|
}
|
133
|
+
.sticky {
|
134
|
+
position: sticky;
|
135
|
+
bottom: 0;
|
136
|
+
z-index: 99;
|
137
|
+
}
|
130
138
|
}
|
131
139
|
</style>
|
@@ -29,9 +29,9 @@ function findRemoteFunc(list, funcList, tokenFuncList, blankList) {
|
|
29
29
|
});
|
30
30
|
}
|
31
31
|
} else {
|
32
|
-
if (list[i].options.remote && list[i].options.
|
32
|
+
if (list[i].options.remote.open && list[i].options.remote.api) {
|
33
33
|
funcList.push({
|
34
|
-
func: list[i].options.
|
34
|
+
func: list[i].options.remote.api,
|
35
35
|
label: list[i].name,
|
36
36
|
model: list[i].model
|
37
37
|
});
|