vue2-client 1.3.8 → 1.3.9

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/package.json +1 -1
  3. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +3 -3
  4. package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
  5. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  6. package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -372
  7. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +13 -12
  8. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  9. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  10. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  11. package/src/base-client/plugins/AppData.js +4 -6
  12. package/src/base-client/plugins/GetLoginInfoService.js +252 -252
  13. package/src/base-client/plugins/PagedList.js +3 -3
  14. package/src/base-client/plugins/i18n-extend.js +32 -32
  15. package/src/components/Ellipsis/index.md +38 -38
  16. package/src/components/NumberInfo/index.md +43 -43
  17. package/src/components/STable/README.md +341 -341
  18. package/src/components/Trend/index.md +45 -45
  19. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  20. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  21. package/src/components/exception/ExceptionPage.vue +70 -70
  22. package/src/components/form/FormRow.vue +52 -52
  23. package/src/components/menu/SideMenu.vue +62 -62
  24. package/src/components/menu/menu.js +273 -273
  25. package/src/components/setting/Setting.vue +235 -235
  26. package/src/components/table/advance/ActionColumns.vue +158 -158
  27. package/src/components/table/advance/SearchArea.vue +355 -355
  28. package/src/components/tool/AStepItem.vue +60 -60
  29. package/src/components/tool/AvatarList.vue +68 -69
  30. package/src/components/tool/Drawer.vue +142 -142
  31. package/src/components/transition/PageToggleTransition.vue +97 -97
  32. package/src/config/replacer/resolve.config.js +67 -67
  33. package/src/layouts/AdminLayout.vue +174 -174
  34. package/src/layouts/header/AdminHeader.vue +3 -3
  35. package/src/layouts/header/HeaderSearch.vue +67 -67
  36. package/src/layouts/header/InstitutionDetail.vue +181 -0
  37. package/src/layouts/tabs/TabsHead.vue +190 -190
  38. package/src/layouts/tabs/TabsView.vue +379 -379
  39. package/src/mock/goods/index.js +108 -108
  40. package/src/pages/report/ReportTable.js +124 -125
  41. package/src/theme/default/nprogress.less +76 -76
  42. package/src/utils/colors.js +103 -103
  43. package/src/utils/excel/Blob.js +53 -54
  44. package/src/utils/excel/Export2Excel.js +4 -4
  45. package/src/utils/formatter.js +68 -68
  46. package/src/utils/i18n.js +1 -1
  47. package/src/utils/routerUtil.js +3 -3
  48. package/src/utils/theme-color-replacer-extend.js +3 -3
  49. package/src/utils/themeUtil.js +100 -102
  50. package/src/utils/util.js +2 -2
@@ -0,0 +1,181 @@
1
+ <template>
2
+ <div style="position: relative;">
3
+ <h2 style="text-align: center">{{ institutionData.f_title }}</h2>
4
+ <p>简述: {{ institutionData.f_sketch }}</p>
5
+ <p>生效时间: {{ format(institutionData.f_effective_date) }}</p>
6
+ <div v-if="showDocument" class="content">
7
+ <iframe :src="institutionDocUrl" frameborder="0" height="100%" width="100%"></iframe>
8
+ </div>
9
+ <!-- 其他附件 -->
10
+ <div class="other-file">
11
+ <div class="title">其他附件</div>
12
+ <div v-for="file in otherFiles" :key="file.id">
13
+ <a class="file-item">
14
+ <span class="file-action" @click="handlePreviewDoc(file.url)">
15
+ <a-icon type="link" />{{ file.name }}
16
+ </span>
17
+ <span class="file-action" @click="handlePreviewDoc(file.url)">
18
+ <a-icon type="eye" />预览
19
+ </span>
20
+ <a class="file-action" target="_blank" @click="handlePreDowDoc(file)"><a-icon type="download" />下载</a>
21
+ </a>
22
+ </div>
23
+ </div>
24
+ <!-- 其他附件预览 -->
25
+ <a-modal v-model="previewDocVisible" :dialog-style="{ top: '20px' }" :footer="null" :z-index="1001" width="97%">
26
+ <div class="preview-doc-container">
27
+ <a-spin :spinning="previewDocLoading" size="large" />
28
+ <iframe
29
+ v-show="!previewDocLoading"
30
+ :src="previewDocUrl"
31
+ frameborder="0"
32
+ height="100%"
33
+ width="100%"
34
+ @load="previewDocLoading = false" />
35
+ </div>
36
+ </a-modal>
37
+ <a-button class="submit_btn" type="primary" @click="confirm_institution">确认</a-button>
38
+ </div>
39
+ </template>
40
+
41
+ <script>
42
+ import { Base64 } from 'js-base64'
43
+ import { post } from '@vue2-client/services/api/restTools'
44
+ import { formatDate } from '@vue2-client/utils/util'
45
+
46
+ export default {
47
+ name: 'InstitutionDetail',
48
+ props: {
49
+ institutionId: {
50
+ type: Number,
51
+ default: undefined
52
+ },
53
+ affirmInstitution: {
54
+ type: Number,
55
+ default: undefined
56
+ }
57
+ },
58
+ data () {
59
+ return {
60
+ institutionDocUrl: undefined,
61
+ showDocument: false,
62
+ otherFiles: [],
63
+ institutionData: {},
64
+ previewDocVisible: false,
65
+ previewDocUrl: undefined,
66
+ previewDocLoading: false
67
+ }
68
+ },
69
+ watch: {
70
+ institutionId () {
71
+ this.getDetailData()
72
+ }
73
+ },
74
+ mounted () {
75
+ this.getDetailData()
76
+ },
77
+ methods: {
78
+ // 获取详情数据
79
+ getDetailData () {
80
+ if (!this.institutionId) {
81
+ return
82
+ }
83
+ const otherFiles = []
84
+ post('/api/af-system/getInstitutionDetail', {
85
+ id: this.institutionId
86
+ }).then(res => {
87
+ res.files.forEach(item => {
88
+ if (item.use_type === '制度文件') {
89
+ this.institutionDocUrl = previewDocService + encodeURIComponent(Base64.encode(fileServer + item.url))
90
+ this.showDocument = true
91
+ } else {
92
+ otherFiles.push(item)
93
+ }
94
+ })
95
+ this.institutionData = res.institution
96
+ this.otherFiles = otherFiles
97
+ })
98
+ },
99
+ format (dateStr) {
100
+ return formatDate(dateStr, 'yyyy-MM-dd')
101
+ },
102
+ // 其他附件预览
103
+ handlePreviewDoc (url) {
104
+ const previewDocUrl = previewDocService + encodeURIComponent(Base64.encode(fileServer + url))
105
+ if (this.previewDocUrl !== previewDocUrl) {
106
+ this.previewDocLoading = true
107
+ this.previewDocUrl = previewDocUrl
108
+ }
109
+ this.previewDocVisible = true
110
+ },
111
+ // 下载文档
112
+ handlePreDowDoc (file) {
113
+ const a = document.createElement('a')
114
+ a.href = file.url
115
+ a.download = file.name
116
+ a.click()
117
+ },
118
+ confirm_institution () {
119
+ post('/api/af-system/affirmInstitution', {
120
+ data: {
121
+ tobe: [
122
+ {
123
+ id: this.affirmInstitution,
124
+ f_affirm_type: '系统确认'
125
+ }
126
+ ]
127
+ }
128
+ }).then(res => {
129
+ this.$message.success('确认成功')
130
+ this.$emit('get_to_be_confirmed')
131
+ })
132
+ },
133
+ }
134
+ }
135
+ // 文档预览服务 API
136
+ const previewDocService = 'http://123.60.214.109:8012/onlinePreview?url='
137
+ // 文件服务器地址
138
+ const fileServer = 'http://123.60.214.109:8406'
139
+ </script>
140
+
141
+ <style lang="less" scoped>
142
+ .submit_btn{
143
+ position: absolute;
144
+ right:0;
145
+ top: 0;
146
+ }
147
+ .content {
148
+ height: 80vh;
149
+ img {
150
+ max-width: 100%;
151
+ }
152
+ }
153
+ .other-file {
154
+ margin: 16px 0;
155
+ .title {
156
+ margin-bottom: 6px;
157
+ }
158
+ }
159
+ .file-item {
160
+ .file-action {
161
+ padding: 3px 4px;
162
+ color: #1890ff;
163
+ &:hover {
164
+ background: #e6f7ff;
165
+ }
166
+ }
167
+ .anticon {
168
+ margin-right: 3px;
169
+ }
170
+ }
171
+ .file-list-title {
172
+ color: rgba(0, 0, 0, 0.85);
173
+ font-weight: bold;
174
+ font-size: 16px;
175
+ margin-bottom: 8px;
176
+ }
177
+ .preview-doc-container {
178
+ height: calc(100vh - 92px);
179
+ padding-top: 20px;
180
+ }
181
+ </style>
@@ -1,190 +1,190 @@
1
- <template>
2
- <div :class="['tabs-head', layout, pageWidth]">
3
- <a-tabs
4
- type="editable-card"
5
- :class="['tabs-container', layout, pageWidth, {'affixed' : affixed, 'fixed-header' : fixedHeader, 'collapsed' : adminLayout.collapsed}]"
6
- :active-key="active"
7
- :hide-add="true"
8
- >
9
- <a-tooltip placement="left" :title="lockTitle" slot="tabBarExtraContent">
10
- <a-icon
11
- theme="filled"
12
- @click="onLockClick"
13
- class="header-lock"
14
- :type="fixedTabs ? 'lock' : 'unlock'"
15
- />
16
- </a-tooltip>
17
- <a-tab-pane v-for="page in pageList" :key="page.path">
18
- <div slot="tab" class="tab" @contextmenu="e => onContextmenu(page.path, e)">
19
- <a-icon @click="onRefresh(page)" :class="['icon-sync', {'hide': page.path !== active && !page.loading}]" :type="page.loading ? 'loading' : 'sync'" />
20
- <div class="title" @click="onTabClick(page.path)" >{{ pageName(page) }}</div>
21
- <a-icon v-if="!page.unclose" @click="onClose(page.path)" class="icon-close" type="close"/>
22
- </div>
23
- </a-tab-pane>
24
- </a-tabs>
25
- <div v-if="affixed" class="virtual-tabs"></div>
26
- </div>
27
- </template>
28
-
29
- <script>
30
- import { mapState, mapMutations } from 'vuex'
31
- import { getI18nKey } from '@vue2-client/utils/routerUtil'
32
-
33
- export default {
34
- name: 'TabsHead',
35
- i18n: {
36
- messages: {
37
- CN: {
38
- lock: '点击锁定页签头',
39
- unlock: '点击解除锁定'
40
- },
41
- HK: {
42
- lock: '點擊鎖定頁簽頭',
43
- unlock: '點擊解除鎖定'
44
- },
45
- US: {
46
- lock: 'click to lock the tabs head',
47
- unlock: 'click to unlock'
48
- }
49
- }
50
- },
51
- props: {
52
- // eslint-disable-next-line vue/require-default-prop
53
- pageList: Array,
54
- // eslint-disable-next-line vue/require-default-prop
55
- active: String,
56
- fixed: Boolean
57
- },
58
- data () {
59
- return {
60
- affixed: false
61
- }
62
- },
63
- inject: ['adminLayout'],
64
- created () {
65
- this.affixed = this.fixedTabs
66
- },
67
- computed: {
68
- ...mapState('setting', ['layout', 'pageWidth', 'fixedHeader', 'fixedTabs', 'customTitles']),
69
- lockTitle () {
70
- return this.$t(this.fixedTabs ? 'unlock' : 'lock')
71
- }
72
- },
73
- methods: {
74
- ...mapMutations('setting', ['setFixedTabs']),
75
- onLockClick () {
76
- this.setFixedTabs(!this.fixedTabs)
77
- if (this.fixedTabs) {
78
- setTimeout(() => {
79
- this.affixed = true
80
- }, 200)
81
- } else {
82
- this.affixed = false
83
- }
84
- },
85
- onTabClick (key) {
86
- if (this.active !== key) {
87
- this.$emit('change', key)
88
- }
89
- },
90
- onClose (key) {
91
- this.$emit('close', key)
92
- },
93
- onRefresh (page) {
94
- this.$emit('refresh', page.path, page)
95
- },
96
- onContextmenu (pageKey, e) {
97
- this.$emit('contextmenu', pageKey, e)
98
- },
99
- pageName (page) {
100
- const pagePath = page.fullPath.split('?')[0]
101
- const custom = this.customTitles.find(item => item.path === pagePath)
102
- return (custom && custom.title) || page.title || this.$t(getI18nKey(page.keyPath))
103
- }
104
- }
105
- }
106
- </script>
107
-
108
- <style scoped lang="less">
109
- .tab{
110
- margin: 0 -16px;
111
- padding: 0 16px;
112
- font-size: 14px;
113
- user-select: none;
114
- transition: all 0.2s;
115
- .title{
116
- display: inline-block;
117
- height: 100%;
118
- }
119
- .icon-close{
120
- font-size: 12px;
121
- margin-left: 6px;
122
- margin-right: -4px !important;
123
- color: @text-color-second;
124
- &:hover{
125
- color: @text-color;
126
- }
127
- }
128
- .icon-sync{
129
- margin-left: -4px;
130
- color: @primary-4;
131
- transition: all 0.3s ease-in-out;
132
- &:hover{
133
- color: @primary-color;
134
- }
135
- font-size: 14px;
136
- &.hide{
137
- font-size: 0;
138
- }
139
- }
140
- }
141
- .tabs-head{
142
- margin: 0 auto;
143
- &.head.fixed{
144
- width: 1400px;
145
- }
146
- }
147
- .tabs-container{
148
- margin: -16px auto 8px;
149
- transition: top,left 0.2s;
150
- .header-lock{
151
- font-size: 18px;
152
- cursor: pointer;
153
- color: @primary-3;
154
- &:hover{
155
- color: @primary-color;
156
- }
157
- }
158
- &.affixed{
159
- margin: 0 auto;
160
- top: 0px;
161
- padding: 8px 24px 0;
162
- position: fixed;
163
- height: 48px;
164
- z-index: 1;
165
- background-color: @layout-body-background;
166
- &.side,&.mix{
167
- right: 0;
168
- left: 256px;
169
- &.collapsed{
170
- left: 80px;
171
- }
172
- }
173
- &.head{
174
- width: inherit;
175
- padding: 8px 0 0;
176
- &.fluid{
177
- left: 0;
178
- right: 0;
179
- padding: 8px 24px 0;
180
- }
181
- }
182
- &.fixed-header{
183
- top: 64px;
184
- }
185
- }
186
- }
187
- .virtual-tabs{
188
- height: 48px;
189
- }
190
- </style>
1
+ <template>
2
+ <div :class="['tabs-head', layout, pageWidth]">
3
+ <a-tabs
4
+ type="editable-card"
5
+ :class="['tabs-container', layout, pageWidth, {'affixed' : affixed, 'fixed-header' : fixedHeader, 'collapsed' : adminLayout.collapsed}]"
6
+ :active-key="active"
7
+ :hide-add="true"
8
+ >
9
+ <a-tooltip placement="left" :title="lockTitle" slot="tabBarExtraContent">
10
+ <a-icon
11
+ theme="filled"
12
+ @click="onLockClick"
13
+ class="header-lock"
14
+ :type="fixedTabs ? 'lock' : 'unlock'"
15
+ />
16
+ </a-tooltip>
17
+ <a-tab-pane v-for="page in pageList" :key="page.path">
18
+ <div slot="tab" class="tab" @contextmenu="e => onContextmenu(page.path, e)">
19
+ <a-icon @click="onRefresh(page)" :class="['icon-sync', {'hide': page.path !== active && !page.loading}]" :type="page.loading ? 'loading' : 'sync'" />
20
+ <div class="title" @click="onTabClick(page.path)" >{{ pageName(page) }}</div>
21
+ <a-icon v-if="!page.unclose" @click="onClose(page.path)" class="icon-close" type="close"/>
22
+ </div>
23
+ </a-tab-pane>
24
+ </a-tabs>
25
+ <div v-if="affixed" class="virtual-tabs"></div>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ import { mapState, mapMutations } from 'vuex'
31
+ import { getI18nKey } from '@vue2-client/utils/routerUtil'
32
+
33
+ export default {
34
+ name: 'TabsHead',
35
+ i18n: {
36
+ messages: {
37
+ CN: {
38
+ lock: '点击锁定页签头',
39
+ unlock: '点击解除锁定'
40
+ },
41
+ HK: {
42
+ lock: '點擊鎖定頁簽頭',
43
+ unlock: '點擊解除鎖定'
44
+ },
45
+ US: {
46
+ lock: 'click to lock the tabs head',
47
+ unlock: 'click to unlock'
48
+ }
49
+ }
50
+ },
51
+ props: {
52
+ // eslint-disable-next-line vue/require-default-prop
53
+ pageList: Array,
54
+ // eslint-disable-next-line vue/require-default-prop
55
+ active: String,
56
+ fixed: Boolean
57
+ },
58
+ data () {
59
+ return {
60
+ affixed: false
61
+ }
62
+ },
63
+ inject: ['adminLayout'],
64
+ created () {
65
+ this.affixed = this.fixedTabs
66
+ },
67
+ computed: {
68
+ ...mapState('setting', ['layout', 'pageWidth', 'fixedHeader', 'fixedTabs', 'customTitles']),
69
+ lockTitle () {
70
+ return this.$t(this.fixedTabs ? 'unlock' : 'lock')
71
+ }
72
+ },
73
+ methods: {
74
+ ...mapMutations('setting', ['setFixedTabs']),
75
+ onLockClick () {
76
+ this.setFixedTabs(!this.fixedTabs)
77
+ if (this.fixedTabs) {
78
+ setTimeout(() => {
79
+ this.affixed = true
80
+ }, 200)
81
+ } else {
82
+ this.affixed = false
83
+ }
84
+ },
85
+ onTabClick (key) {
86
+ if (this.active !== key) {
87
+ this.$emit('change', key)
88
+ }
89
+ },
90
+ onClose (key) {
91
+ this.$emit('close', key)
92
+ },
93
+ onRefresh (page) {
94
+ this.$emit('refresh', page.path, page)
95
+ },
96
+ onContextmenu (pageKey, e) {
97
+ this.$emit('contextmenu', pageKey, e)
98
+ },
99
+ pageName (page) {
100
+ const pagePath = page.fullPath.split('?')[0]
101
+ const custom = this.customTitles.find(item => item.path === pagePath)
102
+ return (custom && custom.title) || page.title || this.$t(getI18nKey(page.keyPath))
103
+ }
104
+ }
105
+ }
106
+ </script>
107
+
108
+ <style scoped lang="less">
109
+ .tab{
110
+ margin: 0 -16px;
111
+ padding: 0 16px;
112
+ font-size: 14px;
113
+ user-select: none;
114
+ transition: all 0.2s;
115
+ .title{
116
+ display: inline-block;
117
+ height: 100%;
118
+ }
119
+ .icon-close{
120
+ font-size: 12px;
121
+ margin-left: 6px;
122
+ margin-right: -4px !important;
123
+ color: @text-color-second;
124
+ &:hover{
125
+ color: @text-color;
126
+ }
127
+ }
128
+ .icon-sync{
129
+ margin-left: -4px;
130
+ color: @primary-4;
131
+ transition: all 0.3s ease-in-out;
132
+ &:hover{
133
+ color: @primary-color;
134
+ }
135
+ font-size: 14px;
136
+ &.hide{
137
+ font-size: 0;
138
+ }
139
+ }
140
+ }
141
+ .tabs-head{
142
+ margin: 0 auto;
143
+ &.head.fixed{
144
+ width: 1400px;
145
+ }
146
+ }
147
+ .tabs-container{
148
+ margin: -16px auto 8px;
149
+ transition: top,left 0.2s;
150
+ .header-lock{
151
+ font-size: 18px;
152
+ cursor: pointer;
153
+ color: @primary-3;
154
+ &:hover{
155
+ color: @primary-color;
156
+ }
157
+ }
158
+ &.affixed{
159
+ margin: 0 auto;
160
+ top: 0;
161
+ padding: 8px 24px 0;
162
+ position: fixed;
163
+ height: 48px;
164
+ z-index: 1;
165
+ background-color: @layout-body-background;
166
+ &.side,&.mix{
167
+ right: 0;
168
+ left: 256px;
169
+ &.collapsed{
170
+ left: 80px;
171
+ }
172
+ }
173
+ &.head{
174
+ width: inherit;
175
+ padding: 8px 0 0;
176
+ &.fluid{
177
+ left: 0;
178
+ right: 0;
179
+ padding: 8px 24px 0;
180
+ }
181
+ }
182
+ &.fixed-header{
183
+ top: 64px;
184
+ }
185
+ }
186
+ }
187
+ .virtual-tabs{
188
+ height: 48px;
189
+ }
190
+ </style>