vue2-client 1.6.49 → 1.7.0

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 (119) hide show
  1. package/.env +15 -15
  2. package/CHANGELOG.md +628 -625
  3. package/index.js +30 -30
  4. package/package.json +81 -81
  5. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +316 -316
  6. package/src/base-client/components/common/CitySelect/CitySelect.vue +247 -247
  7. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +667 -667
  8. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +733 -733
  9. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +468 -462
  10. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +508 -508
  11. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +146 -140
  12. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  13. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  14. package/src/base-client/components/common/Upload/Upload.vue +168 -168
  15. package/src/base-client/components/common/XAddForm/XAddForm.vue +325 -325
  16. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +279 -279
  17. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  18. package/src/base-client/components/common/XForm/XForm.vue +180 -180
  19. package/src/base-client/components/common/XForm/XFormItem.vue +513 -513
  20. package/src/base-client/components/common/XForm/XTreeSelect.vue +184 -184
  21. package/src/base-client/components/common/XFormCol/XFormCol.vue +38 -38
  22. package/src/base-client/components/common/XFormTable/XFormTable.vue +344 -336
  23. package/src/base-client/components/common/XFormTable/index.md +97 -97
  24. package/src/base-client/components/common/XImportExcel/XImportExcel.vue +132 -132
  25. package/src/base-client/components/common/XTable/XTable.vue +506 -506
  26. package/src/base-client/components/common/XTreeOne/XTreeOne.vue +111 -111
  27. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
  28. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  29. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  30. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  31. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  32. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  33. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  34. package/src/base-client/plugins/AppData.js +76 -76
  35. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  36. package/src/base-client/plugins/PagedList.js +177 -177
  37. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  38. package/src/base-client/plugins/i18n-extend.js +32 -32
  39. package/src/components/Ellipsis/Ellipsis.vue +65 -65
  40. package/src/components/Ellipsis/index.md +38 -38
  41. package/src/components/NumberInfo/index.md +43 -43
  42. package/src/components/STable/README.md +341 -341
  43. package/src/components/STable/index.js +318 -318
  44. package/src/components/Trend/index.md +45 -45
  45. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  46. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  47. package/src/components/exception/ExceptionPage.vue +70 -70
  48. package/src/components/form/FormRow.vue +52 -52
  49. package/src/components/index.js +36 -36
  50. package/src/components/menu/SideMenu.vue +62 -62
  51. package/src/components/menu/menu.js +273 -273
  52. package/src/components/page/header/index.less +40 -40
  53. package/src/components/setting/Setting.vue +235 -235
  54. package/src/components/table/StandardTable.vue +141 -141
  55. package/src/components/table/advance/ActionColumns.vue +158 -158
  56. package/src/components/table/advance/SearchArea.vue +355 -355
  57. package/src/components/tool/AStepItem.vue +60 -60
  58. package/src/components/tool/AvatarList.vue +68 -68
  59. package/src/components/tool/Drawer.vue +142 -142
  60. package/src/components/tool/TagSelect.vue +83 -83
  61. package/src/components/transition/PageToggleTransition.vue +97 -97
  62. package/src/config/CreateQueryConfig.js +307 -307
  63. package/src/config/default/admin.config.js +18 -18
  64. package/src/config/replacer/resolve.config.js +67 -67
  65. package/src/layouts/CommonLayout.vue +42 -42
  66. package/src/layouts/ComponentLayoutOne.vue +47 -47
  67. package/src/layouts/PageLayout.vue +151 -151
  68. package/src/layouts/SinglePageView.vue +116 -116
  69. package/src/layouts/footer/PageFooter.vue +49 -49
  70. package/src/layouts/header/AdminHeader.vue +134 -134
  71. package/src/layouts/header/HeaderAvatar.vue +64 -64
  72. package/src/layouts/header/HeaderNotice.vue +176 -176
  73. package/src/layouts/header/HeaderSearch.vue +67 -67
  74. package/src/layouts/header/InstitutionDetail.vue +181 -181
  75. package/src/layouts/header/index.less +92 -92
  76. package/src/layouts/tabs/TabsHead.vue +190 -190
  77. package/src/layouts/tabs/TabsView.vue +379 -379
  78. package/src/mock/goods/index.js +108 -108
  79. package/src/pages/CreateQueryPage.vue +84 -84
  80. package/src/pages/login/Login.vue +369 -369
  81. package/src/pages/report/ReportTable.js +124 -124
  82. package/src/pages/report/ReportTableHome.vue +28 -28
  83. package/src/pages/resourceManage/orgListManage.vue +98 -98
  84. package/src/pages/system/dictionary/index.vue +43 -43
  85. package/src/pages/system/file/index.vue +317 -317
  86. package/src/pages/system/monitor/loginInfor/index.vue +36 -36
  87. package/src/pages/system/monitor/operLog/index.vue +36 -36
  88. package/src/pages/system/settings/index.vue +126 -126
  89. package/src/pages/system/settings/modifyPassword.vue +109 -109
  90. package/src/router/async/config.async.js +28 -28
  91. package/src/router/async/router.map.js +66 -68
  92. package/src/router/index.js +27 -27
  93. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  94. package/src/services/api/LogDetailsViewApi.js +10 -10
  95. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  96. package/src/services/api/TicketDetailsViewApi.js +34 -34
  97. package/src/services/api/cas.js +79 -79
  98. package/src/services/api/common.js +137 -132
  99. package/src/services/api/commonTempTable.js +10 -10
  100. package/src/services/api/index.js +17 -17
  101. package/src/services/api/logininfor/index.js +6 -6
  102. package/src/services/api/manage.js +8 -8
  103. package/src/services/apiService.js +14 -14
  104. package/src/services/user.js +67 -67
  105. package/src/store/modules/index.js +4 -4
  106. package/src/theme/default/nprogress.less +76 -76
  107. package/src/theme/default/style.less +58 -58
  108. package/src/utils/EncryptUtil.js +53 -53
  109. package/src/utils/colors.js +107 -107
  110. package/src/utils/excel/Blob.js +180 -180
  111. package/src/utils/excel/Export2Excel.js +141 -141
  112. package/src/utils/formatter.js +68 -68
  113. package/src/utils/i18n.js +80 -80
  114. package/src/utils/map-utils.js +37 -37
  115. package/src/utils/theme-color-replacer-extend.js +91 -91
  116. package/src/utils/themeUtil.js +100 -100
  117. package/src/utils/util.js +230 -230
  118. package/vue.config.js +106 -106
  119. package/src/pages/system/queryParams/index.vue +0 -43
@@ -1,111 +1,111 @@
1
- <template>
2
- <div id="XTreeOne">
3
- <component-layout-one :siderProps="{width: leftWidth,collapsible: collapsible,collapsedWidth: collapsedWidth,theme: 'light'}">
4
- <template slot="left">
5
- <div class="bg-white pd-20" :style="{height: treeHeight}">
6
- <a-input-search style="margin-bottom: 8px" placeholder="Search" allow-clear @change="onChange" />
7
- <a-tree
8
- :tree-data="searchData"
9
- @select="onSelect">
10
- <template #title="{ title }">
11
- <span v-if="title.indexOf(searchValue) > -1">
12
- {{ title.substr(0, title.indexOf(searchValue)) }}
13
- <span style="color: #f50">{{ searchValue }}</span>
14
- {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
15
- </span>
16
- <span v-else>{{ title }}</span>
17
- </template>
18
- </a-tree>
19
- </div>
20
- </template>
21
- <slot></slot>
22
- </component-layout-one>
23
- </div>
24
- </template>
25
-
26
- <script>
27
- import ComponentLayoutOne from '@vue2-client/layouts/ComponentLayoutOne'
28
- export default {
29
- name: 'XTreeOne',
30
- components: { ComponentLayoutOne },
31
- props: {
32
- // 左侧宽度
33
- leftWidth: {
34
- type: [Number, String],
35
- default: () => {
36
- return 200
37
- }
38
- },
39
- // 左侧是否可收起
40
- collapsible: {
41
- type: Boolean,
42
- default: true
43
- },
44
- // 左侧收起后宽度
45
- collapsedWidth: {
46
- type: Number,
47
- default: 0
48
- },
49
- // Tree 树形控件数据
50
- // array<{key, title, children, [disabled, selectable]}>
51
- treeData: {
52
- type: Array,
53
- required: true
54
- },
55
- treeHeight: {
56
- type: String,
57
- default: '85vh'
58
- }
59
- },
60
- data () {
61
- return {
62
- // 用于展示筛选出的数据
63
- searchData: [],
64
- // 查询值
65
- searchValue: ''
66
- }
67
- },
68
- created () {
69
- this.init()
70
- },
71
- mounted () {
72
- },
73
- watch: {
74
- 'treeData' () {
75
- this.init()
76
- }
77
- },
78
- methods: {
79
- init () {
80
- // 添加title插槽
81
- for (const index of this.treeData.keys()) {
82
- this.treeData[index].scopedSlots = { title: 'title' }
83
- }
84
- this.searchData = Object.assign([], this.treeData)
85
- },
86
- onChange (e) {
87
- const name = e.target.value
88
- this.searchValue = name
89
- this.searchData = []
90
- for (const row of this.treeData) {
91
- if (row.title.indexOf(name) > -1) {
92
- this.searchData.push(row)
93
- }
94
- }
95
- },
96
- onSelect (selectedKeys, e) {
97
- this.$emit('onSelect', selectedKeys, e)
98
- }
99
- }
100
- }
101
- </script>
102
-
103
- <style lang="less" scoped>
104
- .pd-20 {
105
- padding: 20px;
106
- }
107
- /deep/ .ant-tree-switcher-icon svg{
108
- width: 1.5em;
109
- height: 1.5em;
110
- }
111
- </style>
1
+ <template>
2
+ <div id="XTreeOne">
3
+ <component-layout-one :siderProps="{width: leftWidth,collapsible: collapsible,collapsedWidth: collapsedWidth,theme: 'light'}">
4
+ <template slot="left">
5
+ <div class="bg-white pd-20" :style="{height: treeHeight}">
6
+ <a-input-search style="margin-bottom: 8px" placeholder="Search" allow-clear @change="onChange" />
7
+ <a-tree
8
+ :tree-data="searchData"
9
+ @select="onSelect">
10
+ <template #title="{ title }">
11
+ <span v-if="title.indexOf(searchValue) > -1">
12
+ {{ title.substr(0, title.indexOf(searchValue)) }}
13
+ <span style="color: #f50">{{ searchValue }}</span>
14
+ {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
15
+ </span>
16
+ <span v-else>{{ title }}</span>
17
+ </template>
18
+ </a-tree>
19
+ </div>
20
+ </template>
21
+ <slot></slot>
22
+ </component-layout-one>
23
+ </div>
24
+ </template>
25
+
26
+ <script>
27
+ import ComponentLayoutOne from '@vue2-client/layouts/ComponentLayoutOne'
28
+ export default {
29
+ name: 'XTreeOne',
30
+ components: { ComponentLayoutOne },
31
+ props: {
32
+ // 左侧宽度
33
+ leftWidth: {
34
+ type: [Number, String],
35
+ default: () => {
36
+ return 200
37
+ }
38
+ },
39
+ // 左侧是否可收起
40
+ collapsible: {
41
+ type: Boolean,
42
+ default: true
43
+ },
44
+ // 左侧收起后宽度
45
+ collapsedWidth: {
46
+ type: Number,
47
+ default: 0
48
+ },
49
+ // Tree 树形控件数据
50
+ // array<{key, title, children, [disabled, selectable]}>
51
+ treeData: {
52
+ type: Array,
53
+ required: true
54
+ },
55
+ treeHeight: {
56
+ type: String,
57
+ default: '85vh'
58
+ }
59
+ },
60
+ data () {
61
+ return {
62
+ // 用于展示筛选出的数据
63
+ searchData: [],
64
+ // 查询值
65
+ searchValue: ''
66
+ }
67
+ },
68
+ created () {
69
+ this.init()
70
+ },
71
+ mounted () {
72
+ },
73
+ watch: {
74
+ 'treeData' () {
75
+ this.init()
76
+ }
77
+ },
78
+ methods: {
79
+ init () {
80
+ // 添加title插槽
81
+ for (const index of this.treeData.keys()) {
82
+ this.treeData[index].scopedSlots = { title: 'title' }
83
+ }
84
+ this.searchData = Object.assign([], this.treeData)
85
+ },
86
+ onChange (e) {
87
+ const name = e.target.value
88
+ this.searchValue = name
89
+ this.searchData = []
90
+ for (const row of this.treeData) {
91
+ if (row.title.indexOf(name) > -1) {
92
+ this.searchData.push(row)
93
+ }
94
+ }
95
+ },
96
+ onSelect (selectedKeys, e) {
97
+ this.$emit('onSelect', selectedKeys, e)
98
+ }
99
+ }
100
+ }
101
+ </script>
102
+
103
+ <style lang="less" scoped>
104
+ .pd-20 {
105
+ padding: 20px;
106
+ }
107
+ /deep/ .ant-tree-switcher-icon svg{
108
+ width: 1.5em;
109
+ height: 1.5em;
110
+ }
111
+ </style>
@@ -1,231 +1,231 @@
1
- <template>
2
- <a-drawer
3
- title="字典详情"
4
- placement="right"
5
- :width="isMobile ? screenWidth : screenWidth * 0.85"
6
- :visible="visible"
7
- @close="onClose"
8
- >
9
- <a-spin :spinning="loadDetails">
10
- <a-page-header
11
- :title="'字典名称:' + details.f_name"
12
- >
13
- <div class="row">
14
- <div class="content">
15
- <a-descriptions size="small" :column="isMobile ? 1 : 2">
16
- <a-descriptions-item label="字典编号">{{ details.id }}</a-descriptions-item>
17
- <a-descriptions-item label="字典键">{{ details.f_key }}</a-descriptions-item>
18
- <a-descriptions-item label="备注">{{ details.f_remark }}</a-descriptions-item>
19
- <a-descriptions-item label="创建时间">{{ format(details.f_input_date) }}</a-descriptions-item>
20
- </a-descriptions>
21
- </div>
22
- <div class="extra">
23
- <a-row class="status-list">
24
- <a-col :xs="12" :sm="24">
25
- </a-col>
26
- </a-row>
27
- </div>
28
- </div>
29
- <!-- actions -->
30
- <template v-slot:extra>
31
- <a-button-group style="margin-right: 4px;">
32
- <a-button type="dashed" @click="initView" :loading="loadDetails">刷新</a-button>
33
- </a-button-group>
34
- </template>
35
- <template slot="footer">
36
- <a-tabs :default-active-key="tabActiveKey" :activeKey="tabActiveKey" @change="handleTabChange" style="margin-bottom: 23px;">
37
- <template v-for="value in tabList">
38
- <a-tab-pane :key="value.key" :tab="value.tab"/>
39
- </template>
40
- </a-tabs>
41
- <div v-if="!loadDetails">
42
- <template v-if="tabActiveKey === '1'">
43
- <x-form-table
44
- title="字典数据配置"
45
- :fixed-add-form="fixedAddForm"
46
- :fixed-query-form="fixedQueryForm"
47
- queryParamsName="dictionaryValueQueryParams"
48
- @afterSubmit="afterSubmit"
49
- >
50
- </x-form-table>
51
- </template>
52
- </div>
53
- </template>
54
- </a-page-header>
55
- </a-spin>
56
- </a-drawer>
57
- </template>
58
-
59
- <script>
60
- import { DictionaryDetailsViewApi, post } from '@vue2-client/services/api'
61
- import { mapState } from 'vuex'
62
- import { formatDate } from '@vue2-client/utils/util'
63
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
64
-
65
- export default {
66
- name: 'DictionaryDetailsView',
67
- components: {
68
- XFormTable
69
- },
70
- data () {
71
- return {
72
- // 页面宽度
73
- screenWidth: document.documentElement.clientWidth,
74
- // Tab页签
75
- tabActiveKey: '1',
76
- // 字典详情
77
- details: {
78
- id: 0,
79
- f_name: '',
80
- f_key: '',
81
- f_remark: '',
82
- f_input_date: '',
83
- f_state: 0
84
- },
85
- tabList: [
86
- { key: '1', tab: '字典数据' }
87
- ],
88
- // 固定新增数据
89
- fixedAddForm: {},
90
- // 固定查询数据
91
- fixedQueryForm: {},
92
- // 详情加载
93
- loadDetails: true
94
- }
95
- },
96
- mounted () {
97
- this.initView()
98
- },
99
- computed: {
100
- ...mapState('account', { currUser: 'user' }),
101
- ...mapState('setting', ['isMobile'])
102
- },
103
- props: {
104
- id: {
105
- type: String,
106
- required: true
107
- },
108
- visible: {
109
- type: Boolean,
110
- default: false
111
- }
112
- },
113
- methods: {
114
- // 初始化组件
115
- initView () {
116
- this.tabActiveKey = '1'
117
- this.fixedQueryForm['v_f_dictionary_id'] = this.id
118
- this.fixedAddForm['v_f_dictionary_id'] = this.id
119
- this.getDetails(this.id)
120
- },
121
- onClose () {
122
- this.$emit('update:visible', false)
123
- },
124
- // 获取详情信息
125
- getDetails (userId) {
126
- this.loadDetails = true
127
- return post(DictionaryDetailsViewApi.getDictionaryDetails, {
128
- id: userId
129
- })
130
- .then(res => {
131
- this.details = res
132
- this.loadDetails = false
133
- }, err => {
134
- this.loadDetails = false
135
- console.error(err)
136
- })
137
- },
138
- // Tab切换
139
- handleTabChange (key) {
140
- this.tabActiveKey = key
141
- },
142
- // 日期格式化
143
- format (date, format) {
144
- return formatDate(date, format)
145
- },
146
- afterSubmit () {
147
- this.$appdata.load()
148
- }
149
- },
150
- watch: {
151
- 'visible' (val) {
152
- if (val) {
153
- this.initView()
154
- }
155
- }
156
- }
157
- }
158
- </script>
159
-
160
- <style lang="less" scoped>
161
- .business {
162
- color: #ffffff;
163
- }
164
- .business:enabled:hover {
165
- background-color: #85CE61 !important;
166
- border-color: #85CE61 !important;
167
- }
168
- .business:enabled {
169
- background-color: #67c23a;
170
- border-color: #67c23a;
171
- }
172
- .business:disabled {
173
- color: rgba(0, 0, 0, 0.25);
174
- }
175
- .detail-layout {
176
- margin-left: 44px;
177
- }
178
- .text {
179
- color: rgba(0, 0, 0, .45);
180
- }
181
-
182
- .heading {
183
- color: rgba(0, 0, 0, .85);
184
- font-size: 20px;
185
- }
186
-
187
- .no-data {
188
- color: rgba(0, 0, 0, .25);
189
- text-align: center;
190
- line-height: 64px;
191
- font-size: 16px;
192
-
193
- i {
194
- font-size: 24px;
195
- margin-right: 16px;
196
- position: relative;
197
- top: 3px;
198
- }
199
- }
200
-
201
- .mobile {
202
- .detail-layout {
203
- margin-left: unset;
204
- }
205
- .text {
206
-
207
- }
208
- .status-list {
209
- text-align: left;
210
- }
211
- }
212
-
213
- .row {
214
- display: flex;
215
-
216
- .content {
217
- -webkit-box-flex: 1;
218
- flex: auto;
219
- -ms-flex: auto;
220
- }
221
-
222
- .extra {
223
- flex: 0 1 auto;
224
- -webkit-box-flex: 0;
225
- -ms-flex: 0 1 auto;
226
- min-width: 242px;
227
- margin-left: 88px;
228
- text-align: right;
229
- }
230
- }
231
- </style>
1
+ <template>
2
+ <a-drawer
3
+ title="字典详情"
4
+ placement="right"
5
+ :width="isMobile ? screenWidth : screenWidth * 0.85"
6
+ :visible="visible"
7
+ @close="onClose"
8
+ >
9
+ <a-spin :spinning="loadDetails">
10
+ <a-page-header
11
+ :title="'字典名称:' + details.f_name"
12
+ >
13
+ <div class="row">
14
+ <div class="content">
15
+ <a-descriptions size="small" :column="isMobile ? 1 : 2">
16
+ <a-descriptions-item label="字典编号">{{ details.id }}</a-descriptions-item>
17
+ <a-descriptions-item label="字典键">{{ details.f_key }}</a-descriptions-item>
18
+ <a-descriptions-item label="备注">{{ details.f_remark }}</a-descriptions-item>
19
+ <a-descriptions-item label="创建时间">{{ format(details.f_input_date) }}</a-descriptions-item>
20
+ </a-descriptions>
21
+ </div>
22
+ <div class="extra">
23
+ <a-row class="status-list">
24
+ <a-col :xs="12" :sm="24">
25
+ </a-col>
26
+ </a-row>
27
+ </div>
28
+ </div>
29
+ <!-- actions -->
30
+ <template v-slot:extra>
31
+ <a-button-group style="margin-right: 4px;">
32
+ <a-button type="dashed" @click="initView" :loading="loadDetails">刷新</a-button>
33
+ </a-button-group>
34
+ </template>
35
+ <template slot="footer">
36
+ <a-tabs :default-active-key="tabActiveKey" :activeKey="tabActiveKey" @change="handleTabChange" style="margin-bottom: 23px;">
37
+ <template v-for="value in tabList">
38
+ <a-tab-pane :key="value.key" :tab="value.tab"/>
39
+ </template>
40
+ </a-tabs>
41
+ <div v-if="!loadDetails">
42
+ <template v-if="tabActiveKey === '1'">
43
+ <x-form-table
44
+ title="字典数据配置"
45
+ :fixed-add-form="fixedAddForm"
46
+ :fixed-query-form="fixedQueryForm"
47
+ queryParamsName="crud_dictionary_value_manage"
48
+ @afterSubmit="afterSubmit"
49
+ >
50
+ </x-form-table>
51
+ </template>
52
+ </div>
53
+ </template>
54
+ </a-page-header>
55
+ </a-spin>
56
+ </a-drawer>
57
+ </template>
58
+
59
+ <script>
60
+ import { DictionaryDetailsViewApi, post } from '@vue2-client/services/api'
61
+ import { mapState } from 'vuex'
62
+ import { formatDate } from '@vue2-client/utils/util'
63
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
64
+
65
+ export default {
66
+ name: 'DictionaryDetailsView',
67
+ components: {
68
+ XFormTable
69
+ },
70
+ data () {
71
+ return {
72
+ // 页面宽度
73
+ screenWidth: document.documentElement.clientWidth,
74
+ // Tab页签
75
+ tabActiveKey: '1',
76
+ // 字典详情
77
+ details: {
78
+ id: 0,
79
+ f_name: '',
80
+ f_key: '',
81
+ f_remark: '',
82
+ f_input_date: '',
83
+ f_state: 0
84
+ },
85
+ tabList: [
86
+ { key: '1', tab: '字典数据' }
87
+ ],
88
+ // 固定新增数据
89
+ fixedAddForm: {},
90
+ // 固定查询数据
91
+ fixedQueryForm: {},
92
+ // 详情加载
93
+ loadDetails: true
94
+ }
95
+ },
96
+ mounted () {
97
+ this.initView()
98
+ },
99
+ computed: {
100
+ ...mapState('account', { currUser: 'user' }),
101
+ ...mapState('setting', ['isMobile'])
102
+ },
103
+ props: {
104
+ id: {
105
+ type: String,
106
+ required: true
107
+ },
108
+ visible: {
109
+ type: Boolean,
110
+ default: false
111
+ }
112
+ },
113
+ methods: {
114
+ // 初始化组件
115
+ initView () {
116
+ this.tabActiveKey = '1'
117
+ this.fixedQueryForm['v_f_dictionary_id'] = this.id
118
+ this.fixedAddForm['v_f_dictionary_id'] = this.id
119
+ this.getDetails(this.id)
120
+ },
121
+ onClose () {
122
+ this.$emit('update:visible', false)
123
+ },
124
+ // 获取详情信息
125
+ getDetails (userId) {
126
+ this.loadDetails = true
127
+ return post(DictionaryDetailsViewApi.getDictionaryDetails, {
128
+ id: userId
129
+ })
130
+ .then(res => {
131
+ this.details = res
132
+ this.loadDetails = false
133
+ }, err => {
134
+ this.loadDetails = false
135
+ console.error(err)
136
+ })
137
+ },
138
+ // Tab切换
139
+ handleTabChange (key) {
140
+ this.tabActiveKey = key
141
+ },
142
+ // 日期格式化
143
+ format (date, format) {
144
+ return formatDate(date, format)
145
+ },
146
+ afterSubmit () {
147
+ this.$appdata.load()
148
+ }
149
+ },
150
+ watch: {
151
+ 'visible' (val) {
152
+ if (val) {
153
+ this.initView()
154
+ }
155
+ }
156
+ }
157
+ }
158
+ </script>
159
+
160
+ <style lang="less" scoped>
161
+ .business {
162
+ color: #ffffff;
163
+ }
164
+ .business:enabled:hover {
165
+ background-color: #85CE61 !important;
166
+ border-color: #85CE61 !important;
167
+ }
168
+ .business:enabled {
169
+ background-color: #67c23a;
170
+ border-color: #67c23a;
171
+ }
172
+ .business:disabled {
173
+ color: rgba(0, 0, 0, 0.25);
174
+ }
175
+ .detail-layout {
176
+ margin-left: 44px;
177
+ }
178
+ .text {
179
+ color: rgba(0, 0, 0, .45);
180
+ }
181
+
182
+ .heading {
183
+ color: rgba(0, 0, 0, .85);
184
+ font-size: 20px;
185
+ }
186
+
187
+ .no-data {
188
+ color: rgba(0, 0, 0, .25);
189
+ text-align: center;
190
+ line-height: 64px;
191
+ font-size: 16px;
192
+
193
+ i {
194
+ font-size: 24px;
195
+ margin-right: 16px;
196
+ position: relative;
197
+ top: 3px;
198
+ }
199
+ }
200
+
201
+ .mobile {
202
+ .detail-layout {
203
+ margin-left: unset;
204
+ }
205
+ .text {
206
+
207
+ }
208
+ .status-list {
209
+ text-align: left;
210
+ }
211
+ }
212
+
213
+ .row {
214
+ display: flex;
215
+
216
+ .content {
217
+ -webkit-box-flex: 1;
218
+ flex: auto;
219
+ -ms-flex: auto;
220
+ }
221
+
222
+ .extra {
223
+ flex: 0 1 auto;
224
+ -webkit-box-flex: 0;
225
+ -ms-flex: 0 1 auto;
226
+ min-width: 242px;
227
+ margin-left: 88px;
228
+ text-align: right;
229
+ }
230
+ }
231
+ </style>