htui-yllkbz 1.5.38 → 1.5.40
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/htui.common.js +93 -78
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +93 -78
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +9 -9
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +2 -2
- package/src/packages/HtMd/index.vue +6 -14
- package/src/packages/HtTable/htTableColumn.vue +68 -113
- package/src/packages/HtTable/index.vue +73 -189
- package/src/packages/HtUpload/index.vue +17 -50
- package/src/packages/HtUploadFiles/index.vue +20 -36
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -4,21 +4,12 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-12-21 16:24:07
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime:
|
|
7
|
+
* @LastEditTime: 2024-12-20 14:54:36
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<!-- <div>todo</div> -->
|
|
11
|
-
<mavon-editor
|
|
12
|
-
|
|
13
|
-
:subfield="subfield"
|
|
14
|
-
default_open="{}"
|
|
15
|
-
ref="md"
|
|
16
|
-
@save="save"
|
|
17
|
-
:placeholder="placeholder"
|
|
18
|
-
:editable="!disabled"
|
|
19
|
-
@imgAdd="addImg"
|
|
20
|
-
@change="change"
|
|
21
|
-
/>
|
|
11
|
+
<mavon-editor v-model="state.content" :subfield="subfield" default_open="{}" ref="md" @save="save"
|
|
12
|
+
:placeholder="placeholder" :editable="!disabled" @imgAdd="addImg" @change="change" />
|
|
22
13
|
</template>
|
|
23
14
|
<script lang="ts">
|
|
24
15
|
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
|
@@ -46,6 +37,7 @@ export default class HtMd extends Vue {
|
|
|
46
37
|
@Prop() placeholder!: string;
|
|
47
38
|
/** 是否隐藏右侧预览界面 */
|
|
48
39
|
@Prop() subfield!: boolean;
|
|
40
|
+
@Prop({ default: "file-management-service" }) proxy?: string;
|
|
49
41
|
/** 数据 */
|
|
50
42
|
state: State = {
|
|
51
43
|
loading: false,
|
|
@@ -66,7 +58,7 @@ export default class HtMd extends Vue {
|
|
|
66
58
|
formdata.append('file', f);
|
|
67
59
|
//将下面上传接口替换为你自己的服务器接口
|
|
68
60
|
_axios({
|
|
69
|
-
url:
|
|
61
|
+
url: `/${this.proxy}/api/filing/file/upload`,
|
|
70
62
|
method: 'post',
|
|
71
63
|
data: formdata,
|
|
72
64
|
headers: { 'Content-Type': 'multipart/form-data' },
|
|
@@ -74,7 +66,7 @@ export default class HtMd extends Vue {
|
|
|
74
66
|
if (res.status === 200) {
|
|
75
67
|
(this.$refs.md as any).$img2Url(
|
|
76
68
|
e,
|
|
77
|
-
|
|
69
|
+
`/${this.proxy}/api/filing/file/download/${res.data.fileToken}`
|
|
78
70
|
);
|
|
79
71
|
}
|
|
80
72
|
});
|
|
@@ -1,66 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-table-column :label="item.title"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
:column-key="item.columnKey"
|
|
9
|
-
:class-name="item.className"
|
|
10
|
-
:prop="item.key"
|
|
11
|
-
:show-overflow-tooltip="
|
|
12
|
-
item.type === 'common' || item.type === 'org' || item.type === 'userId'
|
|
13
|
-
? false
|
|
14
|
-
: item.showOverflowTooltip === false
|
|
2
|
+
<el-table-column :label="item.title" :fixed="item.fixed" :align="item.align"
|
|
3
|
+
v-if="fromColumn ? !item.hide : !item.hide && item.checked" :resizable="item.resizable === false ? false : true"
|
|
4
|
+
:header-align="item.headerAlign" :column-key="item.columnKey" :class-name="item.className" :prop="item.key"
|
|
5
|
+
:show-overflow-tooltip="item.type === 'common' || item.type === 'org' || item.type === 'userId'
|
|
6
|
+
? false
|
|
7
|
+
: item.showOverflowTooltip === false
|
|
15
8
|
? false
|
|
16
9
|
: true
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:sort-method="item.sortMethod"
|
|
20
|
-
:sort-orders="item.sortOrders"
|
|
21
|
-
:formatter="item.formatter"
|
|
22
|
-
:sort-by="item.sortBy"
|
|
23
|
-
:min-width="item.minWidth"
|
|
24
|
-
:width="item.width">
|
|
10
|
+
" :sortable="item.sortable" :sort-method="item.sortMethod" :sort-orders="item.sortOrders"
|
|
11
|
+
:formatter="item.formatter" :sort-by="item.sortBy" :min-width="item.minWidth" :width="item.width">
|
|
25
12
|
|
|
26
13
|
<template v-if="item.children && item.children.length">
|
|
27
|
-
<HtTableColumn :item="child"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
v-for="(child, childindex) in item.children"
|
|
33
|
-
@showFiles="(val) => $emit('showFiles', val)"
|
|
34
|
-
:fromColumn="true"
|
|
35
|
-
:key="`${child.key}_${childindex}_1`">
|
|
36
|
-
<template :slot="child.key"
|
|
37
|
-
slot-scope="scope">
|
|
38
|
-
<slot :name="child.key"
|
|
39
|
-
:row="scope.row"
|
|
40
|
-
:column="scope.column"
|
|
41
|
-
:rowIndex="scope.rowIndex">
|
|
14
|
+
<HtTableColumn :item="child" :getAllBaseData="getAllBaseData" :getAllOrg="getAllOrg" :getAllRole="getAllRole"
|
|
15
|
+
:getAllUser="getAllUser" v-for="(child, childindex) in item.children"
|
|
16
|
+
@showFiles="(val) => $emit('showFiles', val)" :fromColumn="true" :key="`${child.key}_${childindex}_1`">
|
|
17
|
+
<template :slot="child.key" slot-scope="scope">
|
|
18
|
+
<slot :name="child.key" :row="scope.row" :column="scope.column" :rowIndex="scope.rowIndex">
|
|
42
19
|
</slot>
|
|
43
20
|
</template>
|
|
44
21
|
<!-- <template slot="title" slot-scope="{ data }">
|
|
45
22
|
<slot name="title" :data="data"></slot
|
|
46
23
|
></template> -->
|
|
47
|
-
<template slot-scope="scope"
|
|
48
|
-
|
|
49
|
-
<slot :name="'header_' + child.key"
|
|
50
|
-
:column="scope.column"
|
|
51
|
-
:$index="scope.$index"></slot>
|
|
24
|
+
<template slot-scope="scope" :slot="'header_' + child.key">
|
|
25
|
+
<slot :name="'header_' + child.key" :column="scope.column" :$index="scope.$index"></slot>
|
|
52
26
|
</template>
|
|
53
27
|
</HtTableColumn>
|
|
54
28
|
</template>
|
|
55
29
|
<template slot-scope="{ row, column, $index }">
|
|
56
30
|
|
|
57
|
-
<slot :name="item.key"
|
|
58
|
-
:row="row"
|
|
59
|
-
:column="column"
|
|
60
|
-
:rowIndex="$index">
|
|
31
|
+
<slot :name="item.key" :row="row" :column="column" :rowIndex="$index">
|
|
61
32
|
<!-- 处理部门 -->
|
|
62
33
|
<template v-if="item.type === 'org'">
|
|
63
|
-
<el-tag v-if="getPropByPath(row, item.key)"> {{getAllOrg[getPropByPath(row, item.key)]?.displayName
|
|
34
|
+
<el-tag v-if="getPropByPath(row, item.key)"> {{ getAllOrg[getPropByPath(row, item.key)]?.displayName
|
|
35
|
+
}}</el-tag>
|
|
64
36
|
<!-- <HtOrgInfo v-if="getPropByPath(row, item.key)"
|
|
65
37
|
:org-id="getPropByPath(row, item.key)"
|
|
66
38
|
type="tag"></HtOrgInfo> -->
|
|
@@ -68,28 +40,25 @@
|
|
|
68
40
|
</template>
|
|
69
41
|
<!-- 处理基础数据 -->
|
|
70
42
|
<template v-else-if="item.type === 'common'">
|
|
71
|
-
<span v-if="item.commonType === 'userId'&&getPropByPath(row, item.key)">
|
|
43
|
+
<span v-if="item.commonType === 'userId' && getPropByPath(row, item.key)">
|
|
72
44
|
{{ getAllUser[getPropByPath(row, item.key)]?.value }}</span>
|
|
73
|
-
<span v-else-if="item.commonType === 'departmentId'&&getPropByPath(row, item.key)">
|
|
45
|
+
<span v-else-if="item.commonType === 'departmentId' && getPropByPath(row, item.key)">
|
|
74
46
|
{{ getAllOrg[getPropByPath(row, item.key)]?.displayName }}</span>
|
|
75
|
-
<span v-else-if="item.commonType === 'roleId'&&getPropByPath(row, item.key)">
|
|
47
|
+
<span v-else-if="item.commonType === 'roleId' && getPropByPath(row, item.key)">
|
|
76
48
|
{{ getAllRole[getPropByPath(row, item.key)]?.name }}</span>
|
|
77
|
-
<span v-else-if="item.commonType === 'baseDataId'&&getPropByPath(row, item.key)">
|
|
78
|
-
{{ getAllBaseData[getPropByPath(row, item.key)]?.name }}<span v-if="!item.hideCode">({{
|
|
49
|
+
<span v-else-if="item.commonType === 'baseDataId' && getPropByPath(row, item.key)">
|
|
50
|
+
{{ getAllBaseData[getPropByPath(row, item.key)]?.name }}<span v-if="!item.hideCode">({{
|
|
51
|
+
getAllBaseData[getPropByPath(row, item.key)]?.value }})</span></span>
|
|
79
52
|
|
|
80
|
-
<HtShowBaseData
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
? getPropByPath(row, item.key)
|
|
90
|
-
: ''
|
|
91
|
-
"
|
|
92
|
-
:base-data-info="true">
|
|
53
|
+
<HtShowBaseData
|
|
54
|
+
v-else-if="getPropByPath(row, item.key) && (item.commonType === 'baseDataValue' || item.commonType === 'baseDataName')"
|
|
55
|
+
:hide-code="item.hideCode" :base-data-value="item.commonType === 'baseDataValue'
|
|
56
|
+
? getPropByPath(row, item.key)
|
|
57
|
+
: ''
|
|
58
|
+
" :base-data-name="item.commonType === 'baseDataName'
|
|
59
|
+
? getPropByPath(row, item.key)
|
|
60
|
+
: ''
|
|
61
|
+
" :base-data-info="true">
|
|
93
62
|
</HtShowBaseData>
|
|
94
63
|
|
|
95
64
|
<span v-else>--</span>
|
|
@@ -102,24 +71,23 @@
|
|
|
102
71
|
</template>
|
|
103
72
|
<!-- 处理时间 yyyy-mm-dd HH:mm:ss -->
|
|
104
73
|
<template v-else-if="item.type === 'time'">
|
|
105
|
-
<div v-if="getPropByPath(row, item.key)"
|
|
106
|
-
class="ht-column-cell">
|
|
74
|
+
<div v-if="getPropByPath(row, item.key)" class="ht-column-cell">
|
|
107
75
|
<span v-if="!item.spread">
|
|
108
76
|
{{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
77
|
+
getPropByPath(row, item.key)
|
|
78
|
+
.replace('T', ' ')
|
|
79
|
+
.slice(0, 19)
|
|
80
|
+
}}</span>
|
|
113
81
|
<template v-else>
|
|
114
82
|
<p style="color:var(--primary);margin:0;padding:0">
|
|
115
83
|
{{ getPropByPath(row, item.key).slice(11, 19) }}
|
|
116
84
|
</p>
|
|
117
85
|
<p style="margin:0;padding:0">
|
|
118
86
|
{{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
87
|
+
getPropByPath(row, item.key)
|
|
88
|
+
.replace('T', ' ')
|
|
89
|
+
.slice(0, 10)
|
|
90
|
+
}}
|
|
123
91
|
</p>
|
|
124
92
|
</template>
|
|
125
93
|
</div>
|
|
@@ -127,77 +95,63 @@
|
|
|
127
95
|
</template>
|
|
128
96
|
<!-- 处理日期 yyyy-mm-dd -->
|
|
129
97
|
<template v-else-if="item.type === 'date'">
|
|
130
|
-
<div v-if="getPropByPath(row, item.key)"
|
|
131
|
-
class="ht-column-cell">
|
|
98
|
+
<div v-if="getPropByPath(row, item.key)" class="ht-column-cell">
|
|
132
99
|
<span>
|
|
133
100
|
{{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
101
|
+
getPropByPath(row, item.key)
|
|
102
|
+
.replace('T', ' ')
|
|
103
|
+
.slice(0, 10)
|
|
104
|
+
}}</span>
|
|
138
105
|
</div>
|
|
139
106
|
<span v-else>--</span>
|
|
140
107
|
</template>
|
|
141
108
|
<!-- 处理布尔值显示 -->
|
|
142
109
|
<template v-else-if="item.type === 'boolean'">
|
|
143
|
-
<el-tag :type="'success'"
|
|
144
|
-
|
|
145
|
-
v-if="getPropByPath(row, item.key)">是</el-tag>
|
|
146
|
-
<el-tag type="danger"
|
|
147
|
-
:size="'small'"
|
|
148
|
-
v-else>否</el-tag>
|
|
110
|
+
<el-tag :type="'success'" :size="'small'" v-if="getPropByPath(row, item.key)">是</el-tag>
|
|
111
|
+
<el-tag type="danger" :size="'small'" v-else>否</el-tag>
|
|
149
112
|
</template>
|
|
150
113
|
<!-- 处理新资产的单位 -->
|
|
151
114
|
<template v-else-if="item.type === 'unit'">
|
|
152
|
-
<HtSelectUnit :readonly="true"
|
|
153
|
-
:value="getPropByPath(row, item.key)"></HtSelectUnit>
|
|
115
|
+
<HtSelectUnit :readonly="true" :value="getPropByPath(row, item.key)"></HtSelectUnit>
|
|
154
116
|
</template>
|
|
155
117
|
<!-- 处理新资产的单位 -->
|
|
156
118
|
<template v-else-if="item.type === 'position'">
|
|
157
|
-
<HtSelectPosition :readonly="true"
|
|
158
|
-
:value="getPropByPath(row, item.key)"></HtSelectPosition>
|
|
119
|
+
<HtSelectPosition :readonly="true" :value="getPropByPath(row, item.key)"></HtSelectPosition>
|
|
159
120
|
</template>
|
|
160
121
|
<!-- 处理图片显示 -->
|
|
161
122
|
<template v-else-if="item.type === 'img'">
|
|
162
123
|
<span v-if="getPropByPath(row, item.key)">
|
|
163
|
-
<el-image style="width: 38px; height: 38px;margin-right:5px"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
'/files/api/filing/file/download/' + fileToken,
|
|
169
|
-
]">
|
|
124
|
+
<el-image style="width: 38px; height: 38px;margin-right:5px" :key="fileToken"
|
|
125
|
+
v-for="fileToken in getPropByPath(row, item.key).split(',')"
|
|
126
|
+
:src="`/${proxy}/api/filing/file/download/` + fileToken" :preview-src-list="[
|
|
127
|
+
`/${proxy}/api/filing/file/download/` + fileToken,
|
|
128
|
+
]">
|
|
170
129
|
</el-image>
|
|
171
130
|
</span>
|
|
172
131
|
</template>
|
|
173
132
|
<!-- 处理附件显示 -->
|
|
174
133
|
<template v-else-if="item.type === 'file'">
|
|
175
134
|
<span v-if="getPropByPath(row, item.key)">
|
|
176
|
-
<i class="el-icon-paperclip"
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}}</i>
|
|
135
|
+
<i class="el-icon-paperclip" @click="$emit('showFiles', getPropByPath(row, item.key))"
|
|
136
|
+
style="color:var(--primary);cursor:pointer">{{
|
|
137
|
+
Array.isArray(getPropByPath(row, item.key))
|
|
138
|
+
? getPropByPath(row, item.key).length
|
|
139
|
+
: getPropByPath(row, item.key).split(',').length
|
|
140
|
+
}}</i>
|
|
183
141
|
</span>
|
|
184
142
|
<span v-else>--</span>
|
|
185
143
|
</template>
|
|
186
144
|
<!-- 其他 -->
|
|
187
|
-
<span :style="item.style"
|
|
188
|
-
v-else>{{
|
|
145
|
+
<span :style="item.style" v-else>{{
|
|
189
146
|
getPropByPath(row, item.key)
|
|
190
|
-
|
|
147
|
+
}}</span>
|
|
191
148
|
</slot>
|
|
192
149
|
</template>
|
|
193
150
|
<!-- 处理重定义table头相关信息 header_key -->
|
|
194
|
-
<template slot-scope="{ column, $index }"
|
|
195
|
-
|
|
196
|
-
<slot :name="'header_' + item.key"
|
|
197
|
-
:column="column"
|
|
198
|
-
:$index="$index">{{
|
|
151
|
+
<template slot-scope="{ column, $index }" slot="header">
|
|
152
|
+
<slot :name="'header_' + item.key" :column="column" :$index="$index">{{
|
|
199
153
|
item.title
|
|
200
|
-
|
|
154
|
+
}}</slot>
|
|
201
155
|
</template>
|
|
202
156
|
</el-table-column>
|
|
203
157
|
</template>
|
|
@@ -231,6 +185,7 @@ export default class Index extends Vue {
|
|
|
231
185
|
@Prop() getAllOrg!: any;
|
|
232
186
|
@Prop() getAllRole!: any;
|
|
233
187
|
@Prop() getAllUser!: any;
|
|
188
|
+
@Prop({ default: "file-management-service" }) proxy?: string;
|
|
234
189
|
/** 是否来自循环嵌套 */
|
|
235
190
|
@Prop() fromColumn!: boolean;
|
|
236
191
|
/** 数据 */
|