htui-yllkbz 1.3.16 → 1.3.19
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/README.md +10 -170
- package/lib/htui.common.js +2552 -45
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +2552 -45
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +4 -4
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtBaseData/index.ts +15 -0
- package/src/packages/HtBaseData/index.vue +865 -0
- package/src/packages/HtSelectBaseData/index.vue +30 -12
- package/src/packages/HtSelectOrg/index.vue +21 -11
- package/src/packages/HtSelectUser/index.vue +21 -11
- package/src/packages/HtTable/index.vue +2 -2
- package/src/packages/index.ts +5 -3
- package/src/plugins/Auth.ts +54853 -0
- package/src/plugins/commonApi.ts +24120 -0
- package/src/views/About.vue +9 -8
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime:
|
|
7
|
+
* @LastEditTime: 2022-04-14 11:41:34
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
# 基础组件整理
|
|
@@ -24,183 +24,23 @@ Vue.use(HtUI)
|
|
|
24
24
|
|
|
25
25
|
## 使用
|
|
26
26
|
|
|
27
|
-
###
|
|
27
|
+
### HtOrgInfo (部门查看组件)
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
`<HtOrgInfo org-id=""></HtOrgInfo>`
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
<ht-table
|
|
33
|
-
:data="state.tableData"
|
|
34
|
-
@onchange='changePage'
|
|
35
|
-
style="width: 100%"
|
|
36
|
-
border
|
|
37
|
-
@sort-change="sortChange"
|
|
38
|
-
height="calc(100vh - 240px)"
|
|
39
|
-
highlight-current-row
|
|
40
|
-
:page-info="{
|
|
41
|
-
currentPage:state.filterData.currentPage,
|
|
42
|
-
pageSize:state.filterData.maxResultCount,
|
|
43
|
-
skipCount:state.filterData.skipCount,
|
|
44
|
-
totalCount:state.filterData.totalCount,
|
|
45
|
-
}"
|
|
46
|
-
:columns="state.columns">
|
|
47
|
-
<template slot-scope="{row}"
|
|
48
|
-
slot="executor">
|
|
49
|
-
这里显示人员
|
|
50
|
-
</template>
|
|
51
|
-
</ht-table>
|
|
52
|
-
```
|
|
31
|
+
### HtSelectOrg (部门选择/查看组件)
|
|
53
32
|
|
|
54
|
-
|
|
33
|
+
`<HtSelectOrg v-mode="" @change="" disabeld="" readonly="" ></HtSelectOrg>`
|
|
55
34
|
|
|
56
|
-
|
|
35
|
+
### HtSelectUser (人员选择/查看组件)
|
|
57
36
|
|
|
58
|
-
|
|
37
|
+
`<HtSelectUser v-mode="" @change="" disabeld="" readonly="" ></HtSelectUser>`
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
key: 'code',
|
|
62
|
-
disabled:false,
|
|
63
|
-
clearable:true,
|
|
64
|
-
value:undefined,
|
|
65
|
-
name:'id',
|
|
66
|
-
ajax:{
|
|
67
|
-
type:'get',
|
|
68
|
-
url: '/asset-model/api/app/asset-model-instance',
|
|
69
|
-
},
|
|
70
|
-
text:'name',
|
|
71
|
-
})"></selectTable>
|
|
72
|
-
//table选择
|
|
39
|
+
### HtSelectBaseData (基础数据选择/查看组件)
|
|
73
40
|
|
|
41
|
+
`<HtSelectBaseData v-mode="" @change="" disabeld="" readonly="" ></HtSelectBaseData>`
|
|
74
42
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### table 引用部分 table---参照 Table Attributes 和 Table Events
|
|
78
|
-
|
|
79
|
-
##### 使用 slot 时候保证和 column 的 key 相互对应 slot-header 中的 slot header_key 例如:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
<div slot="header_name">测试名字</div>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
<ht-table :data="state.tableData"
|
|
87
|
-
@onchange='changePage'
|
|
88
|
-
style="width: 100%"
|
|
89
|
-
border
|
|
90
|
-
@sort-change="sortChange"
|
|
91
|
-
height="calc(100vh - 240px)"
|
|
92
|
-
highlight-current-row
|
|
93
|
-
:page-info="{
|
|
94
|
-
currentPage:state.filterData.currentPage,
|
|
95
|
-
pageSize:state.filterData.maxResultCount,
|
|
96
|
-
skipCount:state.filterData.skipCount,
|
|
97
|
-
totalCount:state.filterData.totalCount,
|
|
98
|
-
}"
|
|
99
|
-
:columns="state.columns">
|
|
100
|
-
<!-- 任务状态 -->
|
|
101
|
-
<template slot-scope="{row}"
|
|
102
|
-
slot="state">
|
|
103
|
-
<el-tag :type="state.filterData.state===5?'danger':state.filterData.state===4?'warning':''"
|
|
104
|
-
v-if="state.filterData.state===5||state.filterData.state===4">{{row.stateDescription}}</el-tag>
|
|
105
|
-
<el-tag v-else
|
|
106
|
-
:style="`color:${fontColor[row.state]}`"
|
|
107
|
-
:color="getColor[row.state]">{{row.stateDescription}}</el-tag>
|
|
108
|
-
</template>
|
|
109
|
-
<!-- 操作 -->
|
|
110
|
-
<template slot-scope="{ row }"
|
|
111
|
-
slot="handel">
|
|
112
|
-
<el-button type="text"
|
|
113
|
-
style="margin:0 8px"
|
|
114
|
-
@click="approver(row)">
|
|
115
|
-
详情
|
|
116
|
-
</el-button>
|
|
117
|
-
<repository-add-repository-btn v-if="row.state==5"
|
|
118
|
-
type='text'
|
|
119
|
-
:info="JSON.stringify({from:'pm',id:row.id})"></repository-add-repository-btn>
|
|
120
|
-
</template>
|
|
121
|
-
</ht-table>
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### table 配置项---参照 Table-column Attributes
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
columns: [
|
|
129
|
-
{
|
|
130
|
-
title: "工单名称",
|
|
131
|
-
hide:true,//是否不渲染此列
|
|
132
|
-
key: "workOrderName",
|
|
133
|
-
width: "200px",
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
title: "设备名称",
|
|
137
|
-
key: "devices[0].deviceName",
|
|
138
|
-
width: 150,
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
title: "设备类型",
|
|
142
|
-
key: "devices[0].deviceType",
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
title: "部门",
|
|
146
|
-
type: "org",
|
|
147
|
-
key: "mainteabce.organizationUnitId",
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
{
|
|
151
|
-
title: "执行人",
|
|
152
|
-
key: "executor",
|
|
153
|
-
type: "userId",
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
title: "运行模型",
|
|
157
|
-
key: "mainteabce.deviceInstanceModelName",
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
title: "设备系统",
|
|
161
|
-
sortable: "custom",
|
|
162
|
-
key: "mainteabce.systemTypeName",
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
title: "维保名称",
|
|
166
|
-
key: "mainteabce.name",
|
|
167
|
-
width: 170,
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
title: "计划开始时间",
|
|
171
|
-
key: "beginTime",
|
|
172
|
-
width: 150,
|
|
173
|
-
type: "time",
|
|
174
|
-
sortable: "custom",
|
|
175
|
-
align: "center",
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
title: "计划结束时间",
|
|
179
|
-
key: "endTime",
|
|
180
|
-
width: 150,
|
|
181
|
-
sortable: "custom",
|
|
182
|
-
type: "time",
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
title: "实际完成时间",
|
|
186
|
-
key: "realEndTime",
|
|
187
|
-
width: 150,
|
|
188
|
-
type: "time",
|
|
189
|
-
sortable: "custom",
|
|
190
|
-
align: "center",
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
title: "任务状态",
|
|
194
|
-
key: "state",
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
title: "操作",
|
|
198
|
-
key: "handel",
|
|
199
|
-
width: 160,
|
|
200
|
-
},
|
|
201
|
-
],
|
|
202
|
-
|
|
203
|
-
```
|
|
43
|
+
### ht-table
|
|
204
44
|
|
|
205
45
|
## 代码地址
|
|
206
46
|
|