vue2-client 1.5.5 → 1.5.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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Tooltip from 'ant-design-vue/es/tooltip'
|
|
3
|
-
import { cutStrByFullLength, getStrFullLength } from '@vue2-client/components/_util/util'
|
|
4
|
-
/*
|
|
5
|
-
const isSupportLineClamp = document.body.style.webkitLineClamp !== undefined;
|
|
6
|
-
|
|
7
|
-
const TooltipOverlayStyle = {
|
|
8
|
-
overflowWrap: 'break-word',
|
|
9
|
-
wordWrap: 'break-word',
|
|
10
|
-
};
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'Ellipsis',
|
|
15
|
-
components: {
|
|
16
|
-
Tooltip
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
prefixCls: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: 'ant-pro-ellipsis'
|
|
22
|
-
},
|
|
23
|
-
tooltip: {
|
|
24
|
-
type: Boolean
|
|
25
|
-
},
|
|
26
|
-
length: {
|
|
27
|
-
type: Number,
|
|
28
|
-
required: true
|
|
29
|
-
},
|
|
30
|
-
lines: {
|
|
31
|
-
type: Number,
|
|
32
|
-
default: 1
|
|
33
|
-
},
|
|
34
|
-
fullWidthRecognition: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
getStrDom (str, fullLength) {
|
|
41
|
-
return (
|
|
42
|
-
<span>{ cutStrByFullLength(str, this.length) + (fullLength > this.length ? '...' : '') }</span>
|
|
43
|
-
)
|
|
44
|
-
},
|
|
45
|
-
getTooltip (fullStr, fullLength) {
|
|
46
|
-
return (
|
|
47
|
-
<Tooltip>
|
|
48
|
-
<template slot="title">{ fullStr }</template>
|
|
49
|
-
{ this.getStrDom(fullStr, fullLength) }
|
|
50
|
-
</Tooltip>
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
render () {
|
|
55
|
-
const { tooltip, length } = this.$props
|
|
56
|
-
const str = this.$slots.default.map(vNode => vNode.text).join('')
|
|
57
|
-
const fullLength = getStrFullLength(str)
|
|
58
|
-
const strDom = tooltip && fullLength > length ? this.getTooltip(str, fullLength) : this.getStrDom(str, fullLength)
|
|
59
|
-
return (
|
|
60
|
-
strDom
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
</script>
|
|
1
|
+
<script>
|
|
2
|
+
import Tooltip from 'ant-design-vue/es/tooltip'
|
|
3
|
+
import { cutStrByFullLength, getStrFullLength } from '@vue2-client/components/_util/util'
|
|
4
|
+
/*
|
|
5
|
+
const isSupportLineClamp = document.body.style.webkitLineClamp !== undefined;
|
|
6
|
+
|
|
7
|
+
const TooltipOverlayStyle = {
|
|
8
|
+
overflowWrap: 'break-word',
|
|
9
|
+
wordWrap: 'break-word',
|
|
10
|
+
};
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'Ellipsis',
|
|
15
|
+
components: {
|
|
16
|
+
Tooltip
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
prefixCls: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'ant-pro-ellipsis'
|
|
22
|
+
},
|
|
23
|
+
tooltip: {
|
|
24
|
+
type: Boolean
|
|
25
|
+
},
|
|
26
|
+
length: {
|
|
27
|
+
type: [String, Number],
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
lines: {
|
|
31
|
+
type: Number,
|
|
32
|
+
default: 1
|
|
33
|
+
},
|
|
34
|
+
fullWidthRecognition: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
getStrDom (str, fullLength) {
|
|
41
|
+
return (
|
|
42
|
+
<span>{ cutStrByFullLength(str, this.length) + (fullLength > this.length ? '...' : '') }</span>
|
|
43
|
+
)
|
|
44
|
+
},
|
|
45
|
+
getTooltip (fullStr, fullLength) {
|
|
46
|
+
return (
|
|
47
|
+
<Tooltip>
|
|
48
|
+
<template slot="title">{ fullStr }</template>
|
|
49
|
+
{ this.getStrDom(fullStr, fullLength) }
|
|
50
|
+
</Tooltip>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
render () {
|
|
55
|
+
const { tooltip, length } = this.$props
|
|
56
|
+
const str = this.$slots.default.map(vNode => vNode.text).join('')
|
|
57
|
+
const fullLength = getStrFullLength(str)
|
|
58
|
+
const strDom = tooltip && fullLength > length ? this.getTooltip(str, fullLength) : this.getStrDom(str, fullLength)
|
|
59
|
+
return (
|
|
60
|
+
strDom
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</script>
|
|
@@ -1,53 +1,56 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
<a-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<a-drawer
|
|
4
|
+
:closable="false"
|
|
5
|
+
:visible="institutionDetailVisible"
|
|
6
|
+
:width="screenWidth * 0.5"
|
|
7
|
+
placement="right"
|
|
8
|
+
@close="onClose"
|
|
9
|
+
>
|
|
10
|
+
<institution-detail
|
|
11
|
+
:affirmInstitution="affirmInstitution"
|
|
12
|
+
:institutionId="institution"
|
|
13
|
+
@get_to_be_confirmed="getToBeConfirmed"/>
|
|
14
|
+
</a-drawer>
|
|
15
|
+
<a-dropdown v-model="show" :trigger="['click']">
|
|
16
|
+
<div slot="overlay">
|
|
17
|
+
<a-spin :spinning="loading">
|
|
18
|
+
<a-tabs
|
|
19
|
+
v-model="activeKey"
|
|
20
|
+
:style="{width: '500px'}"
|
|
21
|
+
:tabBarStyle="{textAlign: 'center'}"
|
|
22
|
+
class="dropdown-tabs">
|
|
23
|
+
<a-tab-pane key="1" tab="通知">
|
|
24
|
+
<a-list class="tab-pane">
|
|
25
|
+
</a-list>
|
|
26
|
+
</a-tab-pane>
|
|
27
|
+
<a-tab-pane key="2" tab="消息">
|
|
28
|
+
<a-list class="tab-pane"></a-list>
|
|
29
|
+
</a-tab-pane>
|
|
30
|
+
<a-tab-pane key="3" tab="待办">
|
|
31
|
+
<a-list :data-source="backlog" class="tab-pane" item-layout="horizontal">
|
|
32
|
+
<a-list-item slot="renderItem" slot-scope="item">
|
|
33
|
+
<a v-if="item.type==='制度待确认'" slot="actions" @click="confirm_institution(item)">查看</a>
|
|
34
|
+
<a-list-item-meta :description="item.description" :title="item.title"/>
|
|
35
|
+
</a-list-item>
|
|
36
|
+
</a-list>
|
|
37
|
+
</a-tab-pane>
|
|
38
|
+
</a-tabs>
|
|
39
|
+
</a-spin>
|
|
40
|
+
</div>
|
|
41
|
+
<span class="header-notice" @click="fetchNotice">
|
|
42
|
+
<a-badge :count="backlog.length" class="notice-badge">
|
|
43
|
+
<a-icon :class="['header-notice-icon']" type="bell"/>
|
|
44
|
+
</a-badge>
|
|
45
|
+
</span>
|
|
46
|
+
</a-dropdown>
|
|
47
|
+
</div>
|
|
46
48
|
</template>
|
|
47
49
|
|
|
48
50
|
<script>
|
|
49
51
|
import { post } from '@vue2-client/services/api'
|
|
50
52
|
import InstitutionDetail from './InstitutionDetail'
|
|
53
|
+
import ellipsis from '@/components/Ellipsis'
|
|
51
54
|
|
|
52
55
|
export default {
|
|
53
56
|
name: 'HeaderNotice',
|
|
@@ -85,7 +88,7 @@ export default {
|
|
|
85
88
|
key,
|
|
86
89
|
message: `您有${this.backlog.length}条待办需要确认`,
|
|
87
90
|
top: '50px',
|
|
88
|
-
description: this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';')
|
|
91
|
+
description: <ellipsis length="200" tooltip>{ this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';') }</ellipsis>,
|
|
89
92
|
icon: <a-icon type="container" style="color: #f5222d"/>,
|
|
90
93
|
btn: h => {
|
|
91
94
|
return h(
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<div style="position: relative;">
|
|
3
3
|
<h2 style="text-align: center">{{ institutionData.f_title }}</h2>
|
|
4
4
|
<p>简述: {{ institutionData.f_sketch }}</p>
|
|
5
|
-
<p
|
|
5
|
+
<p>时间: {{ format(institutionData.f_effective_date) }}</p>
|
|
6
6
|
<div v-if="showDocument" class="content">
|
|
7
7
|
<iframe :src="institutionDocUrl" frameborder="0" height="100%" width="100%"></iframe>
|
|
8
8
|
</div>
|
|
9
9
|
<!-- 其他附件 -->
|
|
10
10
|
<div class="other-file">
|
|
11
|
-
<div class="title"
|
|
11
|
+
<div class="title">其他信息:</div>
|
|
12
12
|
<div v-for="file in otherFiles" :key="file.id">
|
|
13
13
|
<a class="file-item">
|
|
14
14
|
<span class="file-action" @click="handlePreviewDoc(file.url)">
|