htui-yllkbz 1.2.23 → 1.2.24

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 CHANGED
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-15 14:41:40
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2021-12-09 17:47:51
7
+ * @LastEditTime: 2021-12-12 11:24:02
8
8
  -->
9
9
 
10
10
  # 基础组件整理
@@ -62,6 +62,127 @@ Vue.use(HtUI)
62
62
 
63
63
  ```
64
64
 
65
+ ### table 引用部分
66
+
67
+ ```
68
+ <ht-table :data="state.tableData"
69
+ @onchange='changePage'
70
+ style="width: 100%"
71
+ border
72
+ @sort-change="sortChange"
73
+ height="calc(100vh - 240px)"
74
+ highlight-current-row
75
+ :page-info="{
76
+ currentPage:state.filterData.currentPage,
77
+ pageSize:state.filterData.maxResultCount,
78
+ skipCount:state.filterData.skipCount,
79
+ totalCount:state.filterData.totalCount,
80
+ }"
81
+ :columns="state.columns">
82
+ <!-- 任务状态 -->
83
+ <template slot-scope="{row}"
84
+ slot="state">
85
+ <el-tag :type="state.filterData.state===5?'danger':state.filterData.state===4?'warning':''"
86
+ v-if="state.filterData.state===5||state.filterData.state===4">{{row.stateDescription}}</el-tag>
87
+ <el-tag v-else
88
+ :style="`color:${fontColor[row.state]}`"
89
+ :color="getColor[row.state]">{{row.stateDescription}}</el-tag>
90
+ </template>
91
+ <!-- 操作 -->
92
+ <template slot-scope="{ row }"
93
+ slot="handel">
94
+ <el-button type="text"
95
+ style="margin:0 8px"
96
+ @click="approver(row)">
97
+ 详情
98
+ </el-button>
99
+ <repository-add-repository-btn v-if="row.state==5"
100
+ type='text'
101
+ :info="JSON.stringify({from:'pm',id:row.id})"></repository-add-repository-btn>
102
+ </template>
103
+ </ht-table>
104
+
105
+ ```
106
+
107
+ ### table 配置项
108
+
109
+ ```
110
+ columns: [
111
+ {
112
+ title: "工单名称",
113
+ key: "workOrderName",
114
+ width: "200px",
115
+ },
116
+ {
117
+ title: "设备名称",
118
+ key: "devices[0].deviceName",
119
+ width: 150,
120
+ },
121
+ {
122
+ title: "设备类型",
123
+ key: "devices[0].deviceType",
124
+ },
125
+ {
126
+ title: "部门",
127
+ type: "org",
128
+ key: "mainteabce.organizationUnitId",
129
+ },
130
+
131
+ {
132
+ title: "执行人",
133
+ key: "executor",
134
+ type: "userId",
135
+ },
136
+ {
137
+ title: "运行模型",
138
+ key: "mainteabce.deviceInstanceModelName",
139
+ },
140
+ {
141
+ title: "设备系统",
142
+ sortable: "custom",
143
+ key: "mainteabce.systemTypeName",
144
+ },
145
+ {
146
+ title: "维保名称",
147
+ key: "mainteabce.name",
148
+ width: 170,
149
+ },
150
+ {
151
+ title: "计划开始时间",
152
+ key: "beginTime",
153
+ width: 150,
154
+ type: "time",
155
+ sortable: "custom",
156
+ align: "center",
157
+ },
158
+ {
159
+ title: "计划结束时间",
160
+ key: "endTime",
161
+ width: 150,
162
+ sortable: "custom",
163
+ type: "time",
164
+ },
165
+ {
166
+ title: "实际完成时间",
167
+ key: "realEndTime",
168
+ width: 150,
169
+ type: "time",
170
+ sortable: "custom",
171
+ align: "center",
172
+ },
173
+ {
174
+ title: "任务状态",
175
+ key: "state",
176
+ },
177
+ {
178
+ title: "操作",
179
+ key: "handel",
180
+ width: 160,
181
+ },
182
+ ],
183
+
184
+ ```
185
+
65
186
  ## 代码地址
66
187
 
67
188
  ### [点我跳转-玉林路扛把子](https://gitee.com/yulin-road-shoulder/htui-yllkbz)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.2.23",
3
+ "version": "1.2.24",
4
4
  "typings": "types/index.d.ts",
5
5
  "main": "lib/htui.common.js",
6
6
  "style": "lib/htui.css",
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-10-25 17:05:17
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2021-12-12 11:16:45
7
+ * @LastEditTime: 2021-12-12 14:10:52
8
8
  */
9
9
  /** 初始的默认条数 */
10
10
  export const defalutPageSize = 10
@@ -67,7 +67,7 @@ export interface Column {
67
67
  /** 是否隐藏当前列 */
68
68
  hide?: boolean;
69
69
  /** 通过type展示相应的数据 用户id|部门id|时间格式化*/
70
- type?: 'useId' | 'org' | 'time'
70
+ type?: 'userId' | 'org' | 'time'
71
71
  }
72
72
  export interface PageInfoType {
73
73
  currentPage: number;