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
@@ -1,29 +1,29 @@
1
- # TicketDetailsView 工单详情页
2
-
3
- 提供一个可以对单个工单进行一系列通用业务操作的抽屉实现
4
-
5
-
6
-
7
- ## 何时使用
8
-
9
- 允许用户对单个工单进行一系列通用业务操作
10
-
11
-
12
-
13
- ## 代码演示
14
-
15
- ```html
16
- <ticket-details-view
17
- :visible.sync="detailVisible"
18
- :ticketId="ticketId"
19
- v-if="ticketId"
20
- />
21
- ```
22
-
23
- ## API
24
-
25
- | 参数 | 说明 | 类型 | 默认值 |
26
- |---------------|-------|---------|-------|
27
- | detailVisible | 是否显示 | Boolean | false |
28
- | ticketId | 工单编号 | String | null |
29
- | id | 负责人id | String | null |
1
+ # TicketDetailsView 工单详情页
2
+
3
+ 提供一个可以对单个工单进行一系列通用业务操作的抽屉实现
4
+
5
+
6
+
7
+ ## 何时使用
8
+
9
+ 允许用户对单个工单进行一系列通用业务操作
10
+
11
+
12
+
13
+ ## 代码演示
14
+
15
+ ```html
16
+ <ticket-details-view
17
+ :visible.sync="detailVisible"
18
+ :ticketId="ticketId"
19
+ v-if="ticketId"
20
+ />
21
+ ```
22
+
23
+ ## API
24
+
25
+ | 参数 | 说明 | 类型 | 默认值 |
26
+ |---------------|-------|---------|-------|
27
+ | detailVisible | 是否显示 | Boolean | false |
28
+ | ticketId | 工单编号 | String | null |
29
+ | id | 负责人id | String | null |
@@ -1,5 +1,5 @@
1
- import { manageApi, post } from '@vue2-client/services/api'
2
- import { handleTree } from '@vue2-client/utils/util'
1
+ import {manageApi, post} from '@vue2-client/services/api'
2
+ import {handleTree} from '@vue2-client/utils/util'
3
3
 
4
4
  const GetAppDataService = {
5
5
  install (Vue) {
@@ -59,13 +59,11 @@ const GetAppDataService = {
59
59
  },
60
60
  getParams () {
61
61
  const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
62
- const object = JSON.parse(str)
63
- return object
62
+ return JSON.parse(str)
64
63
  },
65
64
  getSingleValues () {
66
65
  const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
67
- const object = JSON.parse(str)
68
- return object
66
+ return JSON.parse(str)
69
67
  }
70
68
  }
71
69
  export default GetAppDataService
@@ -1,252 +1,252 @@
1
- import Vue from 'vue'
2
- import { SEARCH } from '@vue2-client/services/apiService'
3
- import { post } from '@vue2-client/services/api'
4
-
5
- /**
6
- * 获取片区
7
- * @returns {Promise<void>}
8
- */
9
- // eslint-disable-next-line
10
- async function getAllArea () {
11
- try {
12
- const getAllArea = await post(SEARCH, {
13
- source: 'this.getParentByType($organization$).getChildByName($片区$).getChildren()',
14
- userid: Vue.$login.f.id
15
- })
16
- const areaTemp = []
17
- for (let i = 0; i < getAllArea.length; i++) {
18
- areaTemp.push({ label: getAllArea[i].name, value: getAllArea[i] })
19
- }
20
- Vue.$login.f.f_allArea = areaTemp
21
- } catch (error) {
22
- Vue.$login.f.f_allArea = []
23
- console.log('获取片区异常', error)
24
- }
25
- }
26
- /**
27
- * 获取抄表员
28
- * @returns {Promise<void>}
29
- */
30
- async function getGasman () {
31
- try {
32
- const getGasman = await post(SEARCH, {
33
- source: 'this.getParentByType($organization$).getChildByName($抄表员$).getUsers()',
34
- userid: Vue.$login.f.id
35
- })
36
- const gasman = []
37
- for (let i = 0; i < getGasman.length; i++) {
38
- gasman.push(getGasman[i])
39
- }
40
- Vue.$login.f.f_gasman = gasman
41
- } catch (error) {
42
- Vue.$login.f.f_gasman = []
43
- console.log('获取抄表员异常', error)
44
- }
45
- }
46
- /**
47
- * 获取资源服务权限
48
- * @returns {Promise<void>}
49
- */
50
- async function getLic () {
51
- try {
52
- const getLic = await post(SEARCH, { data: {
53
- source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($资源操作$) != -1)',
54
- userid: Vue.$login.f.id
55
- } }, { resolveMsg: null, rejectMsg: null })
56
- const arry = []
57
- getLic.forEach((item) => {
58
- arry.push(item.name)
59
- })
60
- Vue.$login.f.lics = arry
61
- } catch (error) {
62
- Vue.$login.f.f_gasman = []
63
- console.log('获取资源服务权限异常', error)
64
- }
65
- }
66
- /**
67
- * 获取界面细节 (界面权限)
68
- * @returns {Promise<void>}
69
- */
70
- async function getViewDetails () {
71
- try {
72
- const viewDetails = await post(SEARCH, {
73
- source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
74
- userid: Vue.$login.f.id
75
- }, { resolveMsg: null, rejectMsg: null })
76
- const r = viewDetails
77
- Vue.$login.r = []
78
- r.forEach(x => Vue.$login.r.push(x.name))
79
- } catch (error) {
80
- Vue.$login.r = []
81
- console.log('获取界面细节异常', error)
82
- }
83
- }
84
- /**
85
- * 获取资源功能
86
- * @returns {Promise<void>}
87
- */
88
- async function getResourceFunction () {
89
- try {
90
- const resourceFunction = await post(SEARCH, {
91
- source: 'tool.getFullTree(this.getRights().where(row.getName() == $组织管理$||row.getName() == $功能管理$||row.getName() == $部门管理$ || row.getName() == $角色管理$ || row.getName() == $人员管理$|| row.getName() == $资源调配$ ))',
92
- userid: Vue.$login.f.id
93
- }, { resolveMsg: null, rejectMsg: null })
94
- return resourceFunction
95
- } catch (error) {
96
- console.log('获取资源功能异常', error)
97
- }
98
- }
99
- /**
100
- * 获取组织管理数据
101
- * @returns {Promise<void>}
102
- */
103
- async function getOrganization () {
104
- try {
105
- const resourceFunction = await post(SEARCH, {
106
- source: 'tool.getFullTree(this.getRights().where(row.getType() == $organization$||row.getType() == $zone$))',
107
- userid: Vue.$login.f.id
108
- }, { resolveMsg: null, rejectMsg: null })
109
- return resourceFunction
110
- } catch (error) {
111
- console.log('获取组织管理数据异常', error)
112
- }
113
- }
114
- /**
115
- * 完整资源树筛选指定名称的资源
116
- * @param fun 要筛选的资源树
117
- * @param name 筛选的资源名称
118
- * @returns {*}
119
- */
120
- function searchFun (fun, name) {
121
- if (fun.length > 0) {
122
- if (fun[0].name == name) {
123
- return fun[0].children
124
- } else {
125
- return searchFun(fun[0].children, name)
126
- }
127
- }
128
- }
129
-
130
- const loginGen = async function (response) {
131
- Vue.$login.f = response
132
- await Promise.all([Vue.$appdata.load(), getGasman(), getLic(), getViewDetails()])
133
- const login = {
134
- f: Vue.$login.f,
135
- jwt: Vue.$login.f.id,
136
- r: Vue.$login.r
137
- }
138
- Vue.$store.commit('account/setLogin', login)
139
- }
140
- const GetLoginInfoService = {
141
- install (Vue) {
142
- // 给vue增添对话框显示方法
143
- Vue.$login = Vue.prototype.$login = GetLoginInfoService
144
- },
145
-
146
- f: {
147
-
148
- },
149
-
150
- login (response) {
151
- return loginGen(response)
152
- },
153
-
154
- convertToIn (val) {
155
- let temp = ''
156
- if (val instanceof Array) {
157
- if (val.length >= 1) {
158
- temp = '('
159
- val.forEach((res) => {
160
- temp += `'${res}',`
161
- })
162
- temp = temp.substr(0, temp.length - 1) + ')'
163
- }
164
- }
165
- return temp
166
- },
167
- toStandardTimeString () {
168
- const dt = new Date()
169
- const month = dt.getMonth() + 1
170
- const date = dt.getDate()
171
- const hour = dt.getHours()
172
- const min = dt.getMinutes()
173
- const sec = dt.getSeconds()
174
- return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) +
175
- ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
176
- },
177
-
178
- guid () {
179
- const buf = new Uint16Array(8)
180
- window.crypto.getRandomValues(buf)
181
- const S4 = function (num) {
182
- let ret = num.toString()
183
- while (ret.length < 4) {
184
- ret = '0' + ret
185
- }
186
- return ret
187
- }
188
- return (S4(buf[0]) + S4(buf[1]) + S4(buf[2]) + S4(buf[3]) + S4(buf[4]) + S4(buf[5]) + S4(buf[6]) + S4(buf[7]))
189
- },
190
- required (param) {
191
- if (typeof param === 'number' && param === 0) {
192
- return false
193
- }
194
- if (!param) {
195
- return true
196
- }
197
- param = param + ''
198
- param = param.trim()
199
- return !param
200
- },
201
-
202
- isInt (n) {
203
- return !window.isNaN(n) && n % 1 === 0
204
- },
205
-
206
- // 不能选择器中截取掉多余的字符
207
- orgName (name) {
208
- return name.substring(10)
209
- },
210
-
211
- addDate (date, days) {
212
- // 求取当前时间的工具
213
- let endDate = new Date(date)
214
- endDate = endDate.valueOf()
215
- endDate = endDate + days * 24 * 60 * 60 * 1000
216
- endDate = new Date(endDate)
217
- const month = endDate.getMonth() + 1
218
- const day = endDate.getDate()
219
- const hour = endDate.getHours()
220
- const min = endDate.getMinutes()
221
- const sec = endDate.getSeconds()
222
- return endDate.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day) +
223
- ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
224
- // return a
225
- },
226
-
227
- // 对字符串进行加密
228
- compileStr (code) {
229
- let c = String.fromCharCode(code.charCodeAt(0) + code.length)
230
- for (let i = 1; i < code.length; i++) {
231
- c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1))
232
- }
233
- return escape(c)
234
- },
235
-
236
- // 字符串进行解密
237
- uncompileStr (code) {
238
- code = unescape(code)
239
- let c = String.fromCharCode(code.charCodeAt(0) - code.length)
240
- for (let i = 1; i < code.length; i++) {
241
- c += String.fromCharCode(code.charCodeAt(i) - c.charCodeAt(i - 1))
242
- }
243
- return c
244
- }
245
- }
246
-
247
- export default GetLoginInfoService
248
- export {
249
- getResourceFunction,
250
- getOrganization,
251
- searchFun
252
- }
1
+ import Vue from 'vue'
2
+ import { SEARCH } from '@vue2-client/services/apiService'
3
+ import { post } from '@vue2-client/services/api'
4
+
5
+ /**
6
+ * 获取片区
7
+ * @returns {Promise<void>}
8
+ */
9
+ // eslint-disable-next-line
10
+ async function getAllArea () {
11
+ try {
12
+ const getAllArea = await post(SEARCH, {
13
+ source: 'this.getParentByType($organization$).getChildByName($片区$).getChildren()',
14
+ userid: Vue.$login.f.id
15
+ })
16
+ const areaTemp = []
17
+ for (let i = 0; i < getAllArea.length; i++) {
18
+ areaTemp.push({ label: getAllArea[i].name, value: getAllArea[i] })
19
+ }
20
+ Vue.$login.f.f_allArea = areaTemp
21
+ } catch (error) {
22
+ Vue.$login.f.f_allArea = []
23
+ console.log('获取片区异常', error)
24
+ }
25
+ }
26
+ /**
27
+ * 获取抄表员
28
+ * @returns {Promise<void>}
29
+ */
30
+ async function getGasman () {
31
+ try {
32
+ const getGasman = await post(SEARCH, {
33
+ source: 'this.getParentByType($organization$).getChildByName($抄表员$).getUsers()',
34
+ userid: Vue.$login.f.id
35
+ })
36
+ const gasman = []
37
+ for (let i = 0; i < getGasman.length; i++) {
38
+ gasman.push(getGasman[i])
39
+ }
40
+ Vue.$login.f.f_gasman = gasman
41
+ } catch (error) {
42
+ Vue.$login.f.f_gasman = []
43
+ console.log('获取抄表员异常', error)
44
+ }
45
+ }
46
+ /**
47
+ * 获取资源服务权限
48
+ * @returns {Promise<void>}
49
+ */
50
+ async function getLic () {
51
+ try {
52
+ const getLic = await post(SEARCH, { data: {
53
+ source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($资源操作$) != -1)',
54
+ userid: Vue.$login.f.id
55
+ } }, { resolveMsg: null, rejectMsg: null })
56
+ const arry = []
57
+ getLic.forEach((item) => {
58
+ arry.push(item.name)
59
+ })
60
+ Vue.$login.f.lics = arry
61
+ } catch (error) {
62
+ Vue.$login.f.f_gasman = []
63
+ console.log('获取资源服务权限异常', error)
64
+ }
65
+ }
66
+ /**
67
+ * 获取界面细节 (界面权限)
68
+ * @returns {Promise<void>}
69
+ */
70
+ async function getViewDetails () {
71
+ try {
72
+ const viewDetails = await post(SEARCH, {
73
+ source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
74
+ userid: Vue.$login.f.id
75
+ }, { resolveMsg: null, rejectMsg: null })
76
+ const r = viewDetails
77
+ Vue.$login.r = []
78
+ r.forEach(x => Vue.$login.r.push(x.name))
79
+ } catch (error) {
80
+ Vue.$login.r = []
81
+ console.log('获取界面细节异常', error)
82
+ }
83
+ }
84
+ /**
85
+ * 获取资源功能
86
+ * @returns {Promise<void>}
87
+ */
88
+ async function getResourceFunction () {
89
+ try {
90
+ const resourceFunction = await post(SEARCH, {
91
+ source: 'tool.getFullTree(this.getRights().where(row.getName() == $组织管理$||row.getName() == $功能管理$||row.getName() == $部门管理$ || row.getName() == $角色管理$ || row.getName() == $人员管理$|| row.getName() == $资源调配$ ))',
92
+ userid: Vue.$login.f.id
93
+ }, { resolveMsg: null, rejectMsg: null })
94
+ return resourceFunction
95
+ } catch (error) {
96
+ console.log('获取资源功能异常', error)
97
+ }
98
+ }
99
+ /**
100
+ * 获取组织管理数据
101
+ * @returns {Promise<void>}
102
+ */
103
+ async function getOrganization () {
104
+ try {
105
+ const resourceFunction = await post(SEARCH, {
106
+ source: 'tool.getFullTree(this.getRights().where(row.getType() == $organization$||row.getType() == $zone$))',
107
+ userid: Vue.$login.f.id
108
+ }, { resolveMsg: null, rejectMsg: null })
109
+ return resourceFunction
110
+ } catch (error) {
111
+ console.log('获取组织管理数据异常', error)
112
+ }
113
+ }
114
+ /**
115
+ * 完整资源树筛选指定名称的资源
116
+ * @param fun 要筛选的资源树
117
+ * @param name 筛选的资源名称
118
+ * @returns {*}
119
+ */
120
+ function searchFun (fun, name) {
121
+ if (fun.length > 0) {
122
+ if (fun[0].name === name) {
123
+ return fun[0].children
124
+ } else {
125
+ return searchFun(fun[0].children, name)
126
+ }
127
+ }
128
+ }
129
+
130
+ const loginGen = async function (response) {
131
+ Vue.$login.f = response
132
+ await Promise.all([Vue.$appdata.load(), getGasman(), getLic(), getViewDetails()])
133
+ const login = {
134
+ f: Vue.$login.f,
135
+ jwt: Vue.$login.f.id,
136
+ r: Vue.$login.r
137
+ }
138
+ Vue.$store.commit('account/setLogin', login)
139
+ }
140
+ const GetLoginInfoService = {
141
+ install (Vue) {
142
+ // 给vue增添对话框显示方法
143
+ Vue.$login = Vue.prototype.$login = GetLoginInfoService
144
+ },
145
+
146
+ f: {
147
+
148
+ },
149
+
150
+ login (response) {
151
+ return loginGen(response)
152
+ },
153
+
154
+ convertToIn (val) {
155
+ let temp = ''
156
+ if (val instanceof Array) {
157
+ if (val.length >= 1) {
158
+ temp = '('
159
+ val.forEach((res) => {
160
+ temp += `'${res}',`
161
+ })
162
+ temp = temp.substr(0, temp.length - 1) + ')'
163
+ }
164
+ }
165
+ return temp
166
+ },
167
+ toStandardTimeString () {
168
+ const dt = new Date()
169
+ const month = dt.getMonth() + 1
170
+ const date = dt.getDate()
171
+ const hour = dt.getHours()
172
+ const min = dt.getMinutes()
173
+ const sec = dt.getSeconds()
174
+ return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) +
175
+ ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
176
+ },
177
+
178
+ guid () {
179
+ const buf = new Uint16Array(8)
180
+ window.crypto.getRandomValues(buf)
181
+ const S4 = function (num) {
182
+ let ret = num.toString()
183
+ while (ret.length < 4) {
184
+ ret = '0' + ret
185
+ }
186
+ return ret
187
+ }
188
+ return (S4(buf[0]) + S4(buf[1]) + S4(buf[2]) + S4(buf[3]) + S4(buf[4]) + S4(buf[5]) + S4(buf[6]) + S4(buf[7]))
189
+ },
190
+ required (param) {
191
+ if (typeof param === 'number' && param === 0) {
192
+ return false
193
+ }
194
+ if (!param) {
195
+ return true
196
+ }
197
+ param = param + ''
198
+ param = param.trim()
199
+ return !param
200
+ },
201
+
202
+ isInt (n) {
203
+ return !window.isNaN(n) && n % 1 === 0
204
+ },
205
+
206
+ // 不能选择器中截取掉多余的字符
207
+ orgName (name) {
208
+ return name.substring(10)
209
+ },
210
+
211
+ addDate (date, days) {
212
+ // 求取当前时间的工具
213
+ let endDate = new Date(date)
214
+ endDate = endDate.valueOf()
215
+ endDate = endDate + days * 24 * 60 * 60 * 1000
216
+ endDate = new Date(endDate)
217
+ const month = endDate.getMonth() + 1
218
+ const day = endDate.getDate()
219
+ const hour = endDate.getHours()
220
+ const min = endDate.getMinutes()
221
+ const sec = endDate.getSeconds()
222
+ return endDate.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day) +
223
+ ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
224
+ // return a
225
+ },
226
+
227
+ // 对字符串进行加密
228
+ compileStr (code) {
229
+ let c = String.fromCharCode(code.charCodeAt(0) + code.length)
230
+ for (let i = 1; i < code.length; i++) {
231
+ c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1))
232
+ }
233
+ return escape(c)
234
+ },
235
+
236
+ // 字符串进行解密
237
+ uncompileStr (code) {
238
+ code = unescape(code)
239
+ let c = String.fromCharCode(code.charCodeAt(0) - code.length)
240
+ for (let i = 1; i < code.length; i++) {
241
+ c += String.fromCharCode(code.charCodeAt(i) - c.charCodeAt(i - 1))
242
+ }
243
+ return c
244
+ }
245
+ }
246
+
247
+ export default GetLoginInfoService
248
+ export {
249
+ getResourceFunction,
250
+ getOrganization,
251
+ searchFun
252
+ }
@@ -55,7 +55,7 @@ export default class PagedList {
55
55
 
56
56
  // 初始填充数据空行
57
57
  // isNuN标记本行是否为空行
58
- if (isBlank == true) {
58
+ if (isBlank === true) {
59
59
  for (let i = 1; i <= pageSize; i++) {
60
60
  this.rows.push({ isNuN: 'true' })
61
61
  }
@@ -142,9 +142,9 @@ export default class PagedList {
142
142
  item.nanoid = nanoid()
143
143
  return item
144
144
  })
145
- if (this.isBlank == true) {
145
+ if (this.isBlank === true) {
146
146
  const size = response.length % this.pageSize
147
- if (pageNo == this.totalPage) {
147
+ if (pageNo === this.totalPage) {
148
148
  for (let i = 1; i <= this.pageSize - size; i++) {
149
149
  this.rows.push({ isNuN: 'true' })
150
150
  }
@@ -1,32 +1,32 @@
1
- // 语句模式
2
- const MODE = {
3
- STATEMENTS: 's', // 语句模式
4
- PHRASAL: 'p' // 词组模式
5
- }
6
-
7
- const VueI18nPlugin = {
8
- install: function (Vue) {
9
- Vue.mixin({
10
- methods: {
11
- $ta (syntaxKey, mode) {
12
- const _mode = mode || MODE.STATEMENTS
13
- const keys = syntaxKey.split('|')
14
- const _this = this
15
- const locale = this.$i18n.locale
16
- let message = ''
17
- const splitter = locale == 'US' ? ' ' : ''
18
- // 拼接 message
19
- keys.forEach(key => {
20
- message += _this.$t(key) + splitter
21
- })
22
- // 英文环境语句模式下,转换单词大小写
23
- if (keys.length > 0 && _mode == MODE.STATEMENTS && locale == 'US') {
24
- message = message.charAt(0).toUpperCase() + message.toLowerCase().substring(1)
25
- }
26
- return message
27
- }
28
- }
29
- })
30
- }
31
- }
32
- export default VueI18nPlugin
1
+ // 语句模式
2
+ const MODE = {
3
+ STATEMENTS: 's', // 语句模式
4
+ PHRASAL: 'p' // 词组模式
5
+ }
6
+
7
+ const VueI18nPlugin = {
8
+ install: function (Vue) {
9
+ Vue.mixin({
10
+ methods: {
11
+ $ta (syntaxKey, mode) {
12
+ const _mode = mode || MODE.STATEMENTS
13
+ const keys = syntaxKey.split('|')
14
+ const _this = this
15
+ const locale = this.$i18n.locale
16
+ let message = ''
17
+ const splitter = locale === 'US' ? ' ' : ''
18
+ // 拼接 message
19
+ keys.forEach(key => {
20
+ message += _this.$t(key) + splitter
21
+ })
22
+ // 英文环境语句模式下,转换单词大小写
23
+ if (keys.length > 0 && _mode === MODE.STATEMENTS && locale === 'US') {
24
+ message = message.charAt(0).toUpperCase() + message.toLowerCase().substring(1)
25
+ }
26
+ return message
27
+ }
28
+ }
29
+ })
30
+ }
31
+ }
32
+ export default VueI18nPlugin