@kyfe/hroa-ui 1.0.5 → 1.0.7
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/dist/hroa-ui.common.js +2927 -2545
- package/dist/hroa-ui.css +1 -1
- package/dist/hroa-ui.umd.js +2927 -2545
- package/dist/hroa-ui.umd.min.js +2 -2
- package/dist/img/header.7e31b1d5.png +0 -0
- package/lib/hr-add-list/index.js +1 -1
- package/lib/hr-bottom-button/index.js +1 -1
- package/lib/hr-breadcrumb/index.js +1 -1
- package/lib/hr-button/index.js +1 -1
- package/lib/hr-checkbox/index.css +1 -0
- package/lib/hr-checkbox/index.js +1 -0
- package/lib/hr-checkbox-group/index.css +1 -0
- package/lib/hr-checkbox-group/index.js +1 -0
- package/lib/hr-clipboard/index.js +1 -1
- package/lib/hr-collapse-card/index.js +1 -1
- package/lib/hr-condition-filtrate/index.js +1 -1
- package/lib/hr-condition-filtrate-popup/index.js +1 -1
- package/lib/hr-date-filter/index.css +1 -0
- package/lib/hr-date-filter/index.js +1 -0
- package/lib/hr-dropdown-date/index.css +1 -1
- package/lib/hr-dropdown-date/index.js +1 -1
- package/lib/hr-elasticity-box/index.js +1 -1
- package/lib/hr-elasticity-box-item/index.js +1 -1
- package/lib/hr-emotional-picture/index.js +1 -1
- package/lib/hr-employee-choose/index.js +1 -1
- package/lib/hr-file-list/index.css +1 -1
- package/lib/hr-file-list/index.js +1 -1
- package/lib/hr-full-screen/index.js +1 -1
- package/lib/hr-img-list/index.css +1 -1
- package/lib/hr-img-list/index.js +1 -1
- package/lib/hr-info-card/index.js +1 -1
- package/lib/hr-information/index.js +1 -1
- package/lib/hr-license-plate-number/index.js +1 -1
- package/lib/hr-module-card/index.js +1 -1
- package/lib/hr-multiterm-choose/index.css +1 -1
- package/lib/hr-multiterm-choose/index.js +1 -1
- package/lib/hr-no-data/index.js +1 -1
- package/lib/hr-notice-bar/index.js +1 -1
- package/lib/hr-notification-dialog/index.css +1 -0
- package/lib/hr-notification-dialog/index.js +1 -0
- package/lib/hr-open-ks/index.js +1 -1
- package/lib/hr-pager/index.css +1 -1
- package/lib/hr-pager/index.js +1 -1
- package/lib/hr-popup/index.js +1 -1
- package/lib/hr-preview-file/index.js +1 -1
- package/lib/hr-radiobox/index.css +1 -0
- package/lib/hr-radiobox/index.js +1 -0
- package/lib/hr-radiobox-group/index.css +1 -0
- package/lib/hr-radiobox-group/index.js +1 -0
- package/lib/hr-rate/index.js +1 -1
- package/lib/hr-reason-textarea/index.js +1 -1
- package/lib/hr-search-input/index.js +1 -1
- package/lib/hr-search-tips/index.css +1 -0
- package/lib/hr-search-tips/index.js +9 -0
- package/lib/hr-select/index.js +1 -1
- package/lib/hr-select-list/index.js +1 -1
- package/lib/hr-single-choose/index.css +1 -1
- package/lib/hr-single-choose/index.js +1 -1
- package/lib/hr-slide-pager/index.css +1 -1
- package/lib/hr-slide-pager/index.js +1 -1
- package/lib/hr-sort/index.js +1 -1
- package/lib/hr-stack-image/index.js +1 -1
- package/lib/hr-tab-nav/index.js +1 -1
- package/lib/hr-time-picker/index.css +1 -0
- package/lib/hr-time-picker/index.js +1 -0
- package/lib/hr-view-item/index.js +1 -1
- package/lib/hr-virtual-list/index.css +1 -0
- package/lib/hr-virtual-list/index.js +1 -0
- package/lib/img/header.7e31b1d5.png +0 -0
- package/lib/index/index.css +1 -1
- package/lib/index/index.js +2 -2
- package/lib/utils/index.js +1 -1
- package/package.json +17 -10
- package/lib/getJsModule/index.css +0 -1
- package/lib/getJsModule/index.js +0 -9
- package/packages/getJsModule.js +0 -11
- package/packages/hr-add-list/image/add.svg +0 -1
- package/packages/hr-add-list/image/close.svg +0 -1
- package/packages/hr-add-list/index.js +0 -7
- package/packages/hr-add-list/src/index.vue +0 -125
- package/packages/hr-add-list//346/226/260/345/242/236/345/244/232/347/254/224/346/225/260/346/215/256.md +0 -0
- package/packages/hr-bottom-button/index.js +0 -7
- package/packages/hr-bottom-button/src/index.vue +0 -128
- package/packages/hr-breadcrumb/index.js +0 -3
- package/packages/hr-breadcrumb/src/index.vue +0 -87
- package/packages/hr-breadcrumb//351/235/242/345/214/205/345/261/221.md +0 -0
- package/packages/hr-button/index.js +0 -13
- package/packages/hr-button/src/hr-button.vue +0 -39
- package/packages/hr-clipboard/index.js +0 -8
- package/packages/hr-clipboard/src/index.vue +0 -46
- package/packages/hr-clipboard/src/util.js +0 -9
- package/packages/hr-collapse-card/index.js +0 -3
- package/packages/hr-collapse-card/src/images/icon_up.png +0 -0
- package/packages/hr-collapse-card/src/index.vue +0 -151
- package/packages/hr-collapse-card//346/212/230/345/217/240/345/215/241/347/211/207.md +0 -0
- package/packages/hr-condition-filtrate/enum/index.js +0 -11
- package/packages/hr-condition-filtrate/image/arrow-right.png +0 -0
- package/packages/hr-condition-filtrate/index.js +0 -7
- package/packages/hr-condition-filtrate/src/employee-choose/index.vue +0 -101
- package/packages/hr-condition-filtrate/src/index.vue +0 -246
- package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +0 -167
- package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +0 -102
- package/packages/hr-condition-filtrate/src/single-choose/index.vue +0 -144
- package/packages/hr-condition-filtrate/src/text-input/index.vue +0 -60
- package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +0 -154
- package/packages/hr-condition-filtrate/src/time-selector/images/date-icon.png +0 -0
- package/packages/hr-condition-filtrate/src/time-selector/index.vue +0 -380
- package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +0 -30
- package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +0 -213
- package/packages/hr-condition-filtrate-popup/index.js +0 -7
- package/packages/hr-condition-filtrate-popup/src/index.vue +0 -236
- package/packages/hr-dropdown-date/index.js +0 -7
- package/packages/hr-dropdown-date/src/calendar/calendar.js +0 -128
- package/packages/hr-dropdown-date/src/calendar/calendar.vue +0 -485
- package/packages/hr-dropdown-date/src/calendar/images/arrow@3x.png +0 -0
- package/packages/hr-dropdown-date/src/calendar/index.js +0 -5
- package/packages/hr-dropdown-date/src/date-picker/date-range-select.vue +0 -92
- package/packages/hr-dropdown-date/src/date-picker/month-range-select.vue +0 -128
- package/packages/hr-dropdown-date/src/date-picker/month-select.vue +0 -98
- package/packages/hr-dropdown-date/src/date-picker/style.less +0 -120
- package/packages/hr-dropdown-date/src/date-picker/utils.js +0 -109
- package/packages/hr-dropdown-date/src/index.vue +0 -482
- package/packages/hr-dropdown-date/src/week.js +0 -194
- package/packages/hr-elasticity-box/index.js +0 -7
- package/packages/hr-elasticity-box/src/elasticity-box-item.vue +0 -61
- package/packages/hr-elasticity-box/src/index.vue +0 -52
- package/packages/hr-elasticity-box-item/index.js +0 -7
- package/packages/hr-emotional-picture/index.js +0 -7
- package/packages/hr-emotional-picture/src/index.vue +0 -66
- package/packages/hr-emotional-picture//346/203/205/346/204/237/345/233/276/347/273/204/344/273/266.md +0 -0
- package/packages/hr-employee-choose/index.js +0 -7
- package/packages/hr-employee-choose/src/image/arrow-right.png +0 -0
- package/packages/hr-employee-choose/src/index.vue +0 -119
- package/packages/hr-file-list/index.js +0 -3
- package/packages/hr-file-list/src/file-type/other.vue +0 -45
- package/packages/hr-file-list/src/file-type/picture.vue +0 -38
- package/packages/hr-file-list/src/file-type/video.vue +0 -60
- package/packages/hr-file-list/src/index.vue +0 -246
- package/packages/hr-file-list/src/utils/enum.js +0 -95
- package/packages/hr-file-list/src/utils/fun.js +0 -16
- package/packages/hr-file-list//346/226/207/344/273/266/345/210/227/350/241/250.md +0 -0
- package/packages/hr-full-screen/index.js +0 -7
- package/packages/hr-full-screen/src/index.vue +0 -117
- package/packages/hr-img-list/index.js +0 -3
- package/packages/hr-img-list/src/index.vue +0 -144
- package/packages/hr-img-list//345/244/232/345/233/276/345/210/227/350/241/250.md +0 -0
- package/packages/hr-info-card/index.js +0 -7
- package/packages/hr-info-card/src/index.vue +0 -67
- package/packages/hr-information/index.js +0 -7
- package/packages/hr-information/src/index.vue +0 -72
- package/packages/hr-license-plate-number/index.js +0 -8
- package/packages/hr-license-plate-number/src/enum.js +0 -44
- package/packages/hr-license-plate-number/src/index.vue +0 -164
- package/packages/hr-license-plate-number/src/vnp-keyboard.vue +0 -182
- package/packages/hr-license-plate-number//350/275/246/347/211/214/345/217/267/345/274/271/347/252/227.md +0 -0
- package/packages/hr-module-card/index.js +0 -13
- package/packages/hr-module-card/src/index.vue +0 -132
- package/packages/hr-module-card//346/250/241/345/235/227/345/215/241/347/211/207/347/273/204/344/273/266.md +0 -29
- package/packages/hr-multiterm-choose/index.js +0 -8
- package/packages/hr-multiterm-choose/src/active-icon.png +0 -0
- package/packages/hr-multiterm-choose/src/index.vue +0 -225
- package/packages/hr-multiterm-choose//345/244/232/351/200/211/346/241/206.md +0 -0
- package/packages/hr-no-data/index.js +0 -7
- package/packages/hr-no-data/src/index.vue +0 -48
- package/packages/hr-notice-bar/index.js +0 -7
- package/packages/hr-notice-bar/src/bem.js +0 -38
- package/packages/hr-notice-bar/src/index.js +0 -52
- package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +0 -3
- package/packages/hr-open-ks/index.js +0 -7
- package/packages/hr-open-ks/src/icon.png +0 -0
- package/packages/hr-open-ks/src/index.vue +0 -97
- package/packages/hr-open-ks/src/util.js +0 -31
- package/packages/hr-pager/images/next-page.png +0 -0
- package/packages/hr-pager/images/prev-page.png +0 -0
- package/packages/hr-pager/index.js +0 -7
- package/packages/hr-pager/src/index.vue +0 -96
- package/packages/hr-pager//346/214/211/351/222/256/347/277/273/351/241/265/347/273/204/344/273/266.md +0 -0
- package/packages/hr-popup/index.js +0 -3
- package/packages/hr-popup/src/index.vue +0 -64
- package/packages/hr-popup//345/274/271/345/207/272/345/261/202.md +0 -0
- package/packages/hr-preview-file/index.js +0 -7
- package/packages/hr-preview-file/src/index.vue +0 -58
- package/packages/hr-preview-file/src/util.js +0 -50
- package/packages/hr-rate/index.js +0 -7
- package/packages/hr-rate/src/index.vue +0 -42
- package/packages/hr-rate//350/257/204/345/210/206/347/273/204/344/273/266/357/274/210/345/270/246/346/226/207/346/241/210/357/274/211.md +0 -0
- package/packages/hr-reason-textarea/index.js +0 -7
- package/packages/hr-reason-textarea/src/index.vue +0 -128
- package/packages/hr-search-input/image/input-close-icon.png +0 -0
- package/packages/hr-search-input/image/search-icon.png +0 -0
- package/packages/hr-search-input/index.js +0 -8
- package/packages/hr-search-input/src/index.vue +0 -144
- package/packages/hr-select/index.js +0 -7
- package/packages/hr-select/src/index.vue +0 -41
- package/packages/hr-select-list/index.js +0 -3
- package/packages/hr-select-list/src/index.vue +0 -214
- package/packages/hr-select-list//344/270/213/346/213/211/351/200/211/346/213/251(/351/273/230/350/256/244/345/244/232/351/200/211).md +0 -0
- package/packages/hr-single-choose/index.js +0 -8
- package/packages/hr-single-choose/src/index.vue +0 -196
- package/packages/hr-single-choose//345/215/225/351/200/211/346/241/206.md +0 -0
- package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
- package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
- package/packages/hr-slide-pager/guide/index.vue +0 -59
- package/packages/hr-slide-pager/guide//346/226/260/346/211/213/346/214/207/345/274/225.md +0 -0
- package/packages/hr-slide-pager/index.js +0 -7
- package/packages/hr-slide-pager/src/index.vue +0 -381
- package/packages/hr-slide-pager//346/273/221/345/212/250/347/277/273/351/241/265/347/273/204/344/273/266.md +0 -0
- package/packages/hr-sort/index.js +0 -3
- package/packages/hr-sort/src/main.vue +0 -133
- package/packages/hr-sort//346/216/222/345/272/217.md +0 -0
- package/packages/hr-stack-image/index.js +0 -3
- package/packages/hr-stack-image/src/main.vue +0 -77
- package/packages/hr-stack-image//345/261/202/345/217/240/345/233/276/347/211/207/347/273/204/344/273/266.md +0 -0
- package/packages/hr-tab-nav/index.js +0 -8
- package/packages/hr-tab-nav/src/index.vue +0 -190
- package/packages/hr-view-item/index.js +0 -13
- package/packages/hr-view-item/src/index.vue +0 -89
- package/packages/hr-view-item//350/241/250/345/215/225/351/241/271item/345/261/225/347/244/272.md +0 -0
- package/packages/index.js +0 -23
- package/packages/utils/directive/common.js +0 -0
- package/packages/utils/directive/index.js +0 -2
- package/packages/utils/directive/specific.js +0 -54
- package/packages/utils/index.js +0 -7
- package/packages/utils/tool/common.js +0 -65
- package/packages/utils/tool/index.js +0 -2
- package/packages/utils/tool/specific.js +0 -0
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author : HR-OA-KTS 黄强 670604@ky-tech.com.cn
|
|
3
|
-
* @Date : 2023-08-15 21:26:28
|
|
4
|
-
* @Description : icon卡片列表 视图组件
|
|
5
|
-
-->
|
|
6
|
-
|
|
7
|
-
## 模块卡片 公共组件
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<view-module-card
|
|
11
|
-
title="标题"
|
|
12
|
-
:divider="分割线Boolean"
|
|
13
|
-
refresh 刷新按钮
|
|
14
|
-
edit 编辑按钮
|
|
15
|
-
@click="handleTitleBtnClick"> </view-module-card>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### 插槽
|
|
19
|
-
|
|
20
|
-
#### 标题插槽,具名插槽 slot="title"
|
|
21
|
-
|
|
22
|
-
<code>
|
|
23
|
-
|
|
24
|
-
</code>
|
|
25
|
-
接受参数 refresh、edit进行标题按钮的渲染
|
|
26
|
-
|
|
27
|
-
#### 默认插槽
|
|
28
|
-
|
|
29
|
-
默认插槽为卡片内容区
|
|
Binary file
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
name: 'HrMultitermChoose',
|
|
4
|
-
props: {
|
|
5
|
-
list: {
|
|
6
|
-
type: Array,
|
|
7
|
-
default () {
|
|
8
|
-
return [
|
|
9
|
-
{
|
|
10
|
-
label: '新人培训1212121212121',
|
|
11
|
-
value: 10
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
label: '新人培训2',
|
|
15
|
-
value: 20
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
label: '新人培训3',
|
|
19
|
-
value: 30
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
label: '新人培训4',
|
|
23
|
-
value: 40
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
title: {
|
|
29
|
-
type: String,
|
|
30
|
-
default () {
|
|
31
|
-
return ''
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
isShowAll: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default () {
|
|
37
|
-
return true
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
divideeQually: {
|
|
41
|
-
type: Number,
|
|
42
|
-
default () {
|
|
43
|
-
return 3
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
margin: {
|
|
47
|
-
type: Number,
|
|
48
|
-
default () {
|
|
49
|
-
return 12
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
marginBottom: {
|
|
53
|
-
type: Number,
|
|
54
|
-
default () {
|
|
55
|
-
return this.margin
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
selfAdaption: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default () {
|
|
61
|
-
return false
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
checkList: { // 选中列表
|
|
65
|
-
type: Array,
|
|
66
|
-
default () {
|
|
67
|
-
return []
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
data () {
|
|
72
|
-
return {
|
|
73
|
-
listActive: []
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
computed: {
|
|
77
|
-
concatList () {
|
|
78
|
-
return this.isShowAll ? [{ label: '全部', value: 0 }].concat(this.list) : this.list
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
watch: {
|
|
82
|
-
checkList: {
|
|
83
|
-
handler () {
|
|
84
|
-
this.initListActive()
|
|
85
|
-
},
|
|
86
|
-
immediate: true
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
created () {
|
|
90
|
-
this.init()
|
|
91
|
-
},
|
|
92
|
-
methods: {
|
|
93
|
-
init () {
|
|
94
|
-
this.initState()
|
|
95
|
-
},
|
|
96
|
-
initState () {
|
|
97
|
-
},
|
|
98
|
-
initListActive () {
|
|
99
|
-
const list = this.concatList
|
|
100
|
-
if (!Array.isArray(list)) return
|
|
101
|
-
|
|
102
|
-
// 设置默认值
|
|
103
|
-
this.listActive = list.reduce((pre, item) => {
|
|
104
|
-
return pre.concat(Boolean(this.checkList.find((value) => item.value === value)))
|
|
105
|
-
}, [])
|
|
106
|
-
this.isShowAll && this.checkList.length === 0 && (this.listActive[0] = true) // 当有全部选项时,全部选中
|
|
107
|
-
},
|
|
108
|
-
select (index) {
|
|
109
|
-
console.log(index, 'index')
|
|
110
|
-
const active = this.listActive[index]
|
|
111
|
-
this.listActive.splice(index, 1, !active)
|
|
112
|
-
|
|
113
|
-
if (this.isShowAll) {
|
|
114
|
-
if (index === 0) {
|
|
115
|
-
this.listActive = this.listActive.map(() => false)
|
|
116
|
-
this.listActive.splice(index, 1, true)
|
|
117
|
-
} else {
|
|
118
|
-
this.listActive.splice(0, 1, this.listActive.every((item) => !item))
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
const chooseList = this.concatList.filter((item, index) => this.listActive[index])
|
|
122
|
-
this.$emit('select', chooseList)
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
cleanListActive () {
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
render () {
|
|
129
|
-
const width = this.selfAdaption ? null : `calc((100% - ${this.margin * (this.divideeQually - 1)}px) / ${this.divideeQually})`
|
|
130
|
-
const marginBottom = this.selfAdaption ? null : `${this.marginBottom}px`
|
|
131
|
-
const gap = this.selfAdaption ? `${this.margin}px` : null
|
|
132
|
-
return <div class="multiterm-choose">
|
|
133
|
-
{
|
|
134
|
-
this.title && <div class="choose-title">{this.title}</div>
|
|
135
|
-
}
|
|
136
|
-
<div class="choose-condition" style={{ gap }}>
|
|
137
|
-
{
|
|
138
|
-
this.concatList.map((item, index) => {
|
|
139
|
-
const marginRight = this.selfAdaption ? null : `${(index + 1) % this.divideeQually === 0 ? 0 : this.margin}px`
|
|
140
|
-
return <div
|
|
141
|
-
onClick={this.select.bind(this, index)}
|
|
142
|
-
style={{ width, marginRight, marginBottom }}
|
|
143
|
-
class={[
|
|
144
|
-
'condition-item',
|
|
145
|
-
'ellipsis',
|
|
146
|
-
this.listActive[index] && 'active']}>
|
|
147
|
-
{item.label}
|
|
148
|
-
{
|
|
149
|
-
this.listActive[index] && <img class="item-icon" src={require('./active-icon.png')} />
|
|
150
|
-
}
|
|
151
|
-
</div>
|
|
152
|
-
})
|
|
153
|
-
}
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
</script>
|
|
159
|
-
|
|
160
|
-
<style scoped lang="less">
|
|
161
|
-
.ellipsis {
|
|
162
|
-
overflow: hidden;
|
|
163
|
-
white-space: nowrap;
|
|
164
|
-
text-overflow: ellipsis;
|
|
165
|
-
}
|
|
166
|
-
.multiterm-choose {
|
|
167
|
-
.choose-title {
|
|
168
|
-
line-height: 20px;
|
|
169
|
-
margin-bottom: 12px;
|
|
170
|
-
text-align: left;
|
|
171
|
-
font-size: 14px;
|
|
172
|
-
font-weight: 600;
|
|
173
|
-
color: #03050d;
|
|
174
|
-
.title-black {
|
|
175
|
-
font-size: 14px;
|
|
176
|
-
font-weight: normal;
|
|
177
|
-
color: #6e6d72;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
.choose-condition {
|
|
181
|
-
display: flex;
|
|
182
|
-
flex-wrap: wrap;
|
|
183
|
-
justify-content: flex-start;
|
|
184
|
-
.condition-item {
|
|
185
|
-
height: 28px;
|
|
186
|
-
border-radius: 8px;
|
|
187
|
-
box-sizing: border-box;
|
|
188
|
-
background: #f7f8fa;
|
|
189
|
-
text-align: center;
|
|
190
|
-
line-height: 27px;
|
|
191
|
-
color: #03050d;
|
|
192
|
-
font-size: 12px;
|
|
193
|
-
position: relative;
|
|
194
|
-
padding: 0 8px;
|
|
195
|
-
.item-icon {
|
|
196
|
-
width: 12px;
|
|
197
|
-
height: 10px;
|
|
198
|
-
position: absolute;
|
|
199
|
-
bottom: 0.5px;
|
|
200
|
-
right: 0.5px;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
.condition-item.active {
|
|
204
|
-
// border: 1px solid rgba(121, 114, 254, 0.8);
|
|
205
|
-
background: rgba(121, 114, 254, 0.08);
|
|
206
|
-
color: #7972fe;
|
|
207
|
-
&::after {
|
|
208
|
-
content: " ";
|
|
209
|
-
position: absolute;
|
|
210
|
-
left: 0;
|
|
211
|
-
top: 0;
|
|
212
|
-
width: calc(200% - 2px);
|
|
213
|
-
height: calc(200% - 2px);
|
|
214
|
-
box-sizing: border-box;
|
|
215
|
-
border: 1px solid #7972fe;
|
|
216
|
-
border-radius: 16px;
|
|
217
|
-
-webkit-transform-origin: 0 0;
|
|
218
|
-
transform-origin: 0 0;
|
|
219
|
-
-webkit-transform: scale(0.5);
|
|
220
|
-
transform: scale(0.5);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
</style>
|
|
File without changes
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
name: 'HrNoData',
|
|
4
|
-
props: {
|
|
5
|
-
type: {
|
|
6
|
-
type: String,
|
|
7
|
-
default: 'NoContent'
|
|
8
|
-
},
|
|
9
|
-
text: {
|
|
10
|
-
type: String,
|
|
11
|
-
default: '暂无内容'
|
|
12
|
-
},
|
|
13
|
-
size: {
|
|
14
|
-
type: [String, Number],
|
|
15
|
-
default: ''
|
|
16
|
-
},
|
|
17
|
-
paddingTop: {
|
|
18
|
-
type: [String, Number],
|
|
19
|
-
default: '30'
|
|
20
|
-
},
|
|
21
|
-
center: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
render () {
|
|
27
|
-
const ksNoDate = () => (<ks-no-data type={this.type} size={this.size} text={this.text} />)
|
|
28
|
-
const style = {
|
|
29
|
-
paddingTop: this.center ? '' : `${this.paddingTop}px`,
|
|
30
|
-
alignItems: this.center ? 'center' : '',
|
|
31
|
-
justifyContent: 'center'
|
|
32
|
-
}
|
|
33
|
-
return (
|
|
34
|
-
<div style={style} class="hr-no-data">
|
|
35
|
-
{this.$slots.default ? this.$slots.default : ksNoDate()}
|
|
36
|
-
</div>
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
<style lang="less" scoped>
|
|
42
|
-
.hr-no-data {
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: 100%;
|
|
45
|
-
min-height: inherit;
|
|
46
|
-
display: flex;
|
|
47
|
-
}
|
|
48
|
-
</style>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const ELEMENT = '__'
|
|
2
|
-
const MODS = '--'
|
|
3
|
-
|
|
4
|
-
function hrJoin (name, el, symbol) {
|
|
5
|
-
return el ? name + symbol + el : name
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function hrPrefix (name, mods) {
|
|
9
|
-
if (typeof mods === 'string') { return hrJoin(name, mods, MODS) }
|
|
10
|
-
|
|
11
|
-
if (Array.isArray(mods)) {
|
|
12
|
-
return mods.map(function (item) {
|
|
13
|
-
return hrPrefix(name, item)
|
|
14
|
-
})
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const ret = {}
|
|
18
|
-
|
|
19
|
-
if (mods) {
|
|
20
|
-
Object.keys(mods).forEach(function (key) {
|
|
21
|
-
ret[name + MODS + key] = mods[key]
|
|
22
|
-
})
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return ret
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function createHrBEM (name) {
|
|
29
|
-
return function (el, mods) {
|
|
30
|
-
if (el && typeof el !== 'string') {
|
|
31
|
-
mods = el
|
|
32
|
-
el = ''
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
el = hrJoin(name, el, ELEMENT);
|
|
36
|
-
return mods ? [el, hrPrefix(el, mods)] : el
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { createHrBEM } from './bem.js'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
name: 'HrNoticeBar',
|
|
5
|
-
extends: window.vant.NoticeBar,
|
|
6
|
-
data () {
|
|
7
|
-
return {
|
|
8
|
-
firstRound: true
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
12
|
-
isOverflowShow: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default () {
|
|
15
|
-
return true
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
watch: {
|
|
20
|
-
text: {
|
|
21
|
-
handler () {
|
|
22
|
-
this.$nextTick(function () {
|
|
23
|
-
const ref = this.$refs
|
|
24
|
-
const wrap = ref.wrap
|
|
25
|
-
const content = ref.content
|
|
26
|
-
if (!wrap || !content) { return }
|
|
27
|
-
const wrapWidth = wrap.getBoundingClientRect().width
|
|
28
|
-
const offsetWidth = content.getBoundingClientRect().width
|
|
29
|
-
|
|
30
|
-
if (this.scrollable) { // _this.scrollable && offsetWidth > wrapWidth 【原逻辑】
|
|
31
|
-
if (this.isOverflowShow && offsetWidth <= wrapWidth) return
|
|
32
|
-
this.wrapWidth = wrapWidth
|
|
33
|
-
this.offsetWidth = offsetWidth
|
|
34
|
-
this.duration = offsetWidth / this.speed
|
|
35
|
-
this.animationClass = createHrBEM('van-notice-bar')('play')
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
},
|
|
39
|
-
immediate: true
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
mounted () {
|
|
43
|
-
this.init()
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
init () {
|
|
47
|
-
this.initState()
|
|
48
|
-
},
|
|
49
|
-
initState () {
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
}
|
|
Binary file
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import icon from './icon.png'
|
|
3
|
-
import {
|
|
4
|
-
openSession,
|
|
5
|
-
openProfile
|
|
6
|
-
} from './util.js'
|
|
7
|
-
export default {
|
|
8
|
-
name: 'HrOpenKS',
|
|
9
|
-
props: {
|
|
10
|
-
name: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: ''
|
|
13
|
-
},
|
|
14
|
-
num: {
|
|
15
|
-
type: [String, Number],
|
|
16
|
-
default: ''
|
|
17
|
-
},
|
|
18
|
-
color: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: 'inherit'
|
|
21
|
-
},
|
|
22
|
-
size: {
|
|
23
|
-
type: [String, Number],
|
|
24
|
-
default: '12'
|
|
25
|
-
},
|
|
26
|
-
imgSize: {
|
|
27
|
-
type: [String, Number],
|
|
28
|
-
default: '14'
|
|
29
|
-
},
|
|
30
|
-
// 模块形式导入
|
|
31
|
-
icon: {
|
|
32
|
-
default: icon
|
|
33
|
-
},
|
|
34
|
-
// chat聊天窗 / profile信息卡
|
|
35
|
-
type: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: 'chat'
|
|
38
|
-
},
|
|
39
|
-
marginLeft: {
|
|
40
|
-
type: [String, Number],
|
|
41
|
-
default: '4'
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
methods: {
|
|
45
|
-
open () {
|
|
46
|
-
if (!this.num) return window.vant.Toast('无效的工号')
|
|
47
|
-
|
|
48
|
-
const map = {
|
|
49
|
-
'chat': openSession,
|
|
50
|
-
'profile': openProfile
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const fn = map[this.type]
|
|
54
|
-
|
|
55
|
-
if (fn === void 0) return window.vant.Toast('请传入正确的打开方式 chat/profile')
|
|
56
|
-
|
|
57
|
-
fn(this.num)
|
|
58
|
-
|
|
59
|
-
this.$emit('click', {
|
|
60
|
-
name: this.name,
|
|
61
|
-
num: this.num,
|
|
62
|
-
})
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
render () {
|
|
66
|
-
const defaultDom = () => {
|
|
67
|
-
return (
|
|
68
|
-
<div class="default-class">
|
|
69
|
-
<div style={{ fontSize: `${this.size}px`, color: this.color }}>{this.name}</div>
|
|
70
|
-
<div style={{ width: `${this.imgSize}px`, height: `${this.imgSize}px`, marginLeft: `${this.marginLeft}px` }} class="openks-img">
|
|
71
|
-
<img width={this.imgSize}
|
|
72
|
-
height={this.imgSize}
|
|
73
|
-
src={this.icon} />
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
return (<div onClick={this.open.bind(this)} class="openks">
|
|
79
|
-
|
|
80
|
-
{this.$slots.default ? this.$slots.default : defaultDom()}
|
|
81
|
-
|
|
82
|
-
</div>)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
</script>
|
|
86
|
-
<style lang="less" scoped>
|
|
87
|
-
.openks {
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
.default-class {
|
|
90
|
-
display: flex;
|
|
91
|
-
align-items: center;
|
|
92
|
-
.openks-img {
|
|
93
|
-
font-size: 0;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
</style>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description: 打开用户信息聊天
|
|
3
|
-
* @param {String} num 工号
|
|
4
|
-
*/
|
|
5
|
-
export async function openSession (num) {
|
|
6
|
-
try {
|
|
7
|
-
const res = await window.ksui.http('iaa.user.getOpenId', 10184, { employeeNumberList: [num] })
|
|
8
|
-
window.ks.callFunc({
|
|
9
|
-
method: 'openSession',
|
|
10
|
-
params: { sessionId: res[num] }
|
|
11
|
-
})
|
|
12
|
-
} catch (err) {
|
|
13
|
-
console.log(`🚀 ~ openSession ~ err:`, err)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @description: 打开用户详情页面
|
|
19
|
-
* @param {String} num 工号
|
|
20
|
-
*/
|
|
21
|
-
export async function openProfile (num) {
|
|
22
|
-
try {
|
|
23
|
-
const res = await window.ksui.http('iaa.user.getOpenId', 10184, { employeeNumberList: [num] })
|
|
24
|
-
window.ks.callFunc({
|
|
25
|
-
method: 'openProfile',
|
|
26
|
-
params: { userId: res[num] }
|
|
27
|
-
})
|
|
28
|
-
} catch (err) {
|
|
29
|
-
console.log(`🚀 ~ openProfile ~ err:`, err)
|
|
30
|
-
}
|
|
31
|
-
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hr-pager"
|
|
3
|
-
v-if="ids && ids.length">
|
|
4
|
-
<img @click="prevPage"
|
|
5
|
-
class="prev"
|
|
6
|
-
v-if="!prevDisabled"
|
|
7
|
-
src="../images/prev-page.png">
|
|
8
|
-
<img @click="nextPage"
|
|
9
|
-
class="next"
|
|
10
|
-
v-if="!nextDisabled"
|
|
11
|
-
src="../images/next-page.png">
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
export default {
|
|
17
|
-
name: 'hr-pager', // 按钮分页组件
|
|
18
|
-
props: {
|
|
19
|
-
currentId: {
|
|
20
|
-
type: [String, Number],
|
|
21
|
-
default: ''
|
|
22
|
-
},
|
|
23
|
-
ids: {
|
|
24
|
-
type: [Array],
|
|
25
|
-
default: () => []
|
|
26
|
-
},
|
|
27
|
-
// 切换上下周周报时是否冻结分页器,用于保留当前分页id
|
|
28
|
-
isFreeze: {
|
|
29
|
-
default: false
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
data () {
|
|
33
|
-
return {
|
|
34
|
-
currentIndex: 0,
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
watch: {
|
|
38
|
-
currentId: {
|
|
39
|
-
handler () {
|
|
40
|
-
// 切换上下周周报时,冻结分页器后不响应id变化处理
|
|
41
|
-
if (this.ids.length && !this.isFreeze) {
|
|
42
|
-
this.currentIndex = this.ids.findIndex(v => +v === +this.currentId)
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
immediate: true
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
computed: {
|
|
49
|
-
prevDisabled () {
|
|
50
|
-
return this.currentIndex <= 0
|
|
51
|
-
},
|
|
52
|
-
nextDisabled () {
|
|
53
|
-
return this.currentIndex >= this.ids.length - 1
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
methods: {
|
|
57
|
-
nextPage () {
|
|
58
|
-
if (this.nextDisabled) {
|
|
59
|
-
return
|
|
60
|
-
}
|
|
61
|
-
this.currentIndex++
|
|
62
|
-
this.$emit('turnPage', this.ids[this.currentIndex])
|
|
63
|
-
},
|
|
64
|
-
prevPage () {
|
|
65
|
-
if (this.prevDisabled) {
|
|
66
|
-
return
|
|
67
|
-
}
|
|
68
|
-
this.currentIndex--
|
|
69
|
-
this.$emit('turnPage', this.ids[this.currentIndex])
|
|
70
|
-
},
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<style lang="less" scoped>
|
|
76
|
-
.hr-pager {
|
|
77
|
-
user-select: none;
|
|
78
|
-
position: fixed;
|
|
79
|
-
top: 45%;
|
|
80
|
-
left: 0;
|
|
81
|
-
width: 100%;
|
|
82
|
-
box-sizing: border-box;
|
|
83
|
-
padding: 0 30px;
|
|
84
|
-
> img {
|
|
85
|
-
position: absolute;
|
|
86
|
-
width: 48px;
|
|
87
|
-
height: 48px;
|
|
88
|
-
}
|
|
89
|
-
.prev {
|
|
90
|
-
left: 14px;
|
|
91
|
-
}
|
|
92
|
-
.next {
|
|
93
|
-
right: 14px;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
</style>
|
|
File without changes
|