imatrix-ui 0.0.15 → 0.1.1-up

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 (171) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/README.md +7 -0
  3. package/components/dynamic-source-select/dynamic-source-select-service.js +106 -0
  4. package/components/dynamic-source-select/dynamic-source-select.vue +673 -0
  5. package/components/dynamic-source-select/events.js +77 -0
  6. package/components/fs-preview/fs-preview.vue +287 -0
  7. package/components/index.js +26 -0
  8. package/components/plugins/export-data-new.js +623 -0
  9. package/components/plugins/export-data.js +431 -0
  10. package/components/plugins/index.js +15 -0
  11. package/components/plugins/public-method.js +47 -0
  12. package/components/rich-editor/index-bak.vue +306 -0
  13. package/components/rich-editor/index.vue +236 -0
  14. package/components/rich-editor/langs/zh-Hans.js +438 -0
  15. package/components/rich-editor/viewer.vue +105 -0
  16. package/components/super-grid/apis.js +1065 -0
  17. package/components/super-grid/columns-config.vue +430 -0
  18. package/components/super-grid/custom-formatter.js +330 -0
  19. package/components/super-grid/dynamic-input.vue +1706 -0
  20. package/components/super-grid/eventBus.js +2 -0
  21. package/components/super-grid/events.js +56 -0
  22. package/components/super-grid/formValidatorUtil.js +300 -0
  23. package/components/super-grid/formatter.js +190 -0
  24. package/components/super-grid/group-column.vue +100 -0
  25. package/components/super-grid/header-context-menu.vue +82 -0
  26. package/components/super-grid/index-column.vue +69 -0
  27. package/components/super-grid/normal-column.vue +1148 -0
  28. package/components/super-grid/public-methods.js +30 -0
  29. package/components/super-grid/row-operation.vue +193 -0
  30. package/components/super-grid/search-button.vue +74 -0
  31. package/components/super-grid/search-condition-input.vue +73 -0
  32. package/components/super-grid/search-condition-list.vue +68 -0
  33. package/components/super-grid/search-form-advancedQuery.vue +820 -0
  34. package/components/super-grid/search-form-dialog.vue +77 -0
  35. package/components/super-grid/search-form-item.vue +470 -0
  36. package/components/super-grid/search-form-number.vue +111 -0
  37. package/components/super-grid/search-form-open.vue +178 -0
  38. package/components/super-grid/search-form-ordinarySearch.vue +218 -0
  39. package/components/super-grid/search-form.vue +756 -0
  40. package/components/super-grid/search-methods.js +484 -0
  41. package/components/super-grid/selection-column.vue +46 -0
  42. package/components/super-grid/store.js +3 -0
  43. package/components/super-grid/super-grid-service.js +682 -0
  44. package/components/super-grid/super-grid.vue +2893 -0
  45. package/components/super-grid/utils.js +851 -0
  46. package/components/super-grid/view-image-dialog.vue +173 -0
  47. package/components/utils/gogocodeTransfer.js +59 -0
  48. package/components/utils/utils.js +180 -0
  49. package/components/utils/value-set.js +98 -0
  50. package/components/z-test-utton/index.vue +82 -0
  51. package/package.json +29 -40
  52. package/public/index.html +13 -0
  53. package/public/vite.svg +1 -0
  54. package/src/api/sso-service.js +172 -19
  55. package/src/api/tab.js +36 -0
  56. package/src/api/user-service.js +11 -11
  57. package/src/assets/401/401.gif +0 -0
  58. package/src/assets/404/404-cloud.png +0 -0
  59. package/src/assets/404/404.png +0 -0
  60. package/src/assets/cloud.png +0 -0
  61. package/src/directives/permission/index.js +13 -13
  62. package/src/directives/permission/permission.js +20 -15
  63. package/src/i18n/i18n.js +16 -0
  64. package/src/i18n/langs/cn.js +254 -0
  65. package/src/i18n/langs/en.js +264 -0
  66. package/src/permission.js +157 -71
  67. package/src/plugins.js +18 -18
  68. package/src/router/index.js +96 -69
  69. package/src/store/getters.js +15 -10
  70. package/src/store/index.js +19 -19
  71. package/src/store/modules/app.js +54 -42
  72. package/src/store/modules/permission.js +137 -73
  73. package/src/store/modules/tab-content.js +36 -0
  74. package/src/store/modules/user.js +293 -80
  75. package/src/styles/display-layout.scss +34 -0
  76. package/src/styles/element-ui.scss +29 -29
  77. package/src/styles/index.scss +157 -78
  78. package/src/styles/mixin.scss +27 -27
  79. package/src/styles/theme/black/font-style.scss +70 -0
  80. package/src/styles/theme/black/index.scss +306 -0
  81. package/src/styles/theme/black/sidebar.scss +189 -0
  82. package/src/styles/theme/blue/font-style.scss +46 -0
  83. package/src/styles/theme/blue/index.scss +172 -0
  84. package/src/styles/{sidebar.scss → theme/blue/sidebar.scss} +171 -141
  85. package/src/styles/theme/blue2/font-style.scss +70 -0
  86. package/src/styles/theme/blue2/index.scss +188 -0
  87. package/src/styles/theme/blue2/sidebar.scss +201 -0
  88. package/src/styles/theme/dark-blue/button.scss +9 -0
  89. package/src/styles/theme/dark-blue/card.scss +62 -0
  90. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  91. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  92. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  93. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  94. package/src/styles/theme/dark-blue/font.scss +71 -0
  95. package/src/styles/theme/dark-blue/form.scss +51 -0
  96. package/src/styles/theme/dark-blue/index.scss +269 -0
  97. package/src/styles/theme/dark-blue/input.scss +15 -0
  98. package/src/styles/theme/dark-blue/message.scss +8 -0
  99. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  100. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  101. package/src/styles/theme/dark-blue/sidebar.scss +266 -0
  102. package/src/styles/theme/dark-blue/tab.scss +83 -0
  103. package/src/styles/theme/dark-blue/table.scss +60 -0
  104. package/src/styles/theme/dark-blue/tree.scss +31 -0
  105. package/src/styles/theme/dark-blue/var.scss +1028 -0
  106. package/src/styles/theme/gray/card-style.scss +54 -0
  107. package/src/styles/theme/gray/font-style.scss +70 -0
  108. package/src/styles/theme/gray/index.scss +172 -0
  109. package/src/styles/theme/gray/input-style.scss +19 -0
  110. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  111. package/src/styles/theme/gray/sidebar.scss +231 -0
  112. package/src/styles/theme/gray/tab-style.scss +81 -0
  113. package/src/styles/transition.scss +47 -46
  114. package/src/utils/auth-api.js +159 -0
  115. package/src/utils/auth.js +61 -15
  116. package/src/utils/calculator/calculator-factory-wf.js +558 -0
  117. package/src/utils/calculator/calculator-factory.js +145 -0
  118. package/src/utils/calculator/calculator-util.js +166 -0
  119. package/src/utils/common-util.js +305 -0
  120. package/src/utils/eventBus.js +2 -0
  121. package/src/utils/iconUtils.js +28 -0
  122. package/src/utils/index.js +102 -86
  123. package/src/utils/jump-page-utils.js +814 -0
  124. package/src/utils/local-storage.js +33 -31
  125. package/src/utils/menu.js +19 -0
  126. package/src/utils/permission.js +31 -26
  127. package/src/utils/permissionAuth.js +90 -0
  128. package/src/utils/range-selector.js +188 -0
  129. package/src/utils/request.js +270 -116
  130. package/src/utils/restful-interface-utils.js +57 -0
  131. package/src/utils/util.js +698 -0
  132. package/src/utils/validate.js +34 -33
  133. package/src/utils/watermark.js +108 -0
  134. package/src/utils/workflow-util.js +93 -0
  135. package/src/views/404.vue +248 -228
  136. package/src/views/dsc-component/Sidebar/Item.vue +84 -0
  137. package/src/views/dsc-component/Sidebar/Link.vue +38 -0
  138. package/src/views/dsc-component/Sidebar/SidebarItem.vue +196 -0
  139. package/src/views/dsc-component/Sidebar/index.vue +220 -0
  140. package/src/views/dsc-component/tabs/tab-content.vue +199 -0
  141. package/src/views/error-page/401.vue +106 -91
  142. package/src/views/error-page/404.vue +248 -228
  143. package/src/views/layout/EmptyLayout.vue +3 -0
  144. package/src/views/layout/Layout.vue +81 -68
  145. package/src/views/layout/NewLayout.vue +18 -0
  146. package/src/views/layout/components/AppMain.vue +39 -29
  147. package/src/views/layout/components/Breadcrumb/index.vue +156 -0
  148. package/src/views/layout/components/Menubar/Item.vue +57 -0
  149. package/src/views/layout/components/Menubar/Link.vue +38 -0
  150. package/src/views/layout/components/Menubar/SidebarItem.vue +164 -0
  151. package/src/views/layout/components/Menubar/index.vue +210 -0
  152. package/src/views/layout/components/Sidebar/Item.vue +53 -29
  153. package/src/views/layout/components/Sidebar/Link.vue +38 -39
  154. package/src/views/layout/components/Sidebar/SidebarItem.vue +135 -100
  155. package/src/views/layout/components/Sidebar/index.vue +141 -48
  156. package/src/views/layout/components/iframe-page.vue +38 -0
  157. package/src/views/layout/components/index.js +4 -3
  158. package/src/views/layout/components/tabs/tab-content.vue +207 -0
  159. package/src/views/layout/mixin/ResizeHandler.js +41 -41
  160. package/src/views/layout/tab-content-iframe-index.vue +38 -0
  161. package/src/views/layout/tab-content-index.vue +93 -0
  162. package/src/views/login/authredirect.vue +10 -10
  163. package/src/views/login/index.vue +296 -203
  164. package/src/views/login/update-password.vue +243 -0
  165. package/src/views/redirect/index.vue +14 -12
  166. package/src/views/wf-history/tache-subprocess-history.vue +45 -0
  167. package/vite.config.js +31 -0
  168. package/lib/super-ui.css +0 -1
  169. package/lib/super-ui.umd.min.js +0 -2
  170. package/src/styles/variables.scss +0 -4
  171. package/src/views/layout/components/Navbar.vue +0 -92
@@ -1,31 +1,33 @@
1
- let api = global.localStorage
2
- api = {
3
- get length() { return global.localStorage.length },
4
- getItem: global.localStorage.getItem.bind(global.localStorage),
5
- setItem: global.localStorage.setItem.bind(global.localStorage),
6
- removeItem: global.localStorage.removeItem.bind(global.localStorage),
7
- key: global.localStorage.key.bind(global.localStorage),
8
- clear: global.localStorage.clear.bind(global.localStorage),
9
- setObject: function(store, key, object) {
10
- if (typeof object !== 'object') {
11
- return store.setItem(key, object)
12
- }
13
-
14
- return store.setItem(key, JSON.stringify(object))
15
- },
16
- getObject: function(store, key) {
17
- var item = store.getItem(key)
18
-
19
- if (!item) {
20
- return null
21
- }
22
-
23
- try {
24
- return JSON.parse(item)
25
- } catch (e) {
26
- return item
27
- }
28
- }
29
- }
30
-
31
- export default api
1
+ let api = global.localStorage
2
+ api = {
3
+ get length() {
4
+ return global.localStorage.length
5
+ },
6
+ getItem: global.localStorage.getItem.bind(global.localStorage),
7
+ setItem: global.localStorage.setItem.bind(global.localStorage),
8
+ removeItem: global.localStorage.removeItem.bind(global.localStorage),
9
+ key: global.localStorage.key.bind(global.localStorage),
10
+ clear: global.localStorage.clear.bind(global.localStorage),
11
+ setObject: function (key, object) {
12
+ if (typeof object !== 'object') {
13
+ return this.setItem(key, object)
14
+ }
15
+
16
+ return this.setItem(key, JSON.stringify(object))
17
+ },
18
+ getObject: function (key) {
19
+ var item = this.getItem(key)
20
+
21
+ if (!item) {
22
+ return null
23
+ }
24
+
25
+ try {
26
+ return JSON.parse(item)
27
+ } catch (e) {
28
+ return item
29
+ }
30
+ },
31
+ }
32
+
33
+ export default api
@@ -0,0 +1,19 @@
1
+ import { getLanguageWithLocale } from './util'
2
+
3
+ export function getI18nName(menu) {
4
+ if (!menu) {
5
+ return
6
+ }
7
+ if (menu.i18Names) {
8
+ const language = getLanguageWithLocale()
9
+ const i18Names = JSON.parse(menu.i18Names)
10
+ if (i18Names[language]) {
11
+ return i18Names[language]
12
+ }
13
+ }
14
+ if (menu.i18nValue) {
15
+ return menu.i18nValue
16
+ } else {
17
+ return menu.name
18
+ }
19
+ }
@@ -1,26 +1,31 @@
1
- import 'nprogress/nprogress.css'// Progress 进度条样式
2
- import store from '../store'
3
-
4
- /**
5
- * @param {String} value
6
- * @returns {Boolean}
7
- */
8
- export default function checkPermission(value) {
9
- if (value) {
10
- const currentUserPermissions = store.getters && store.getters.currentUserPermissions
11
- const permission = value
12
-
13
- let hasPermission = false
14
- for (const p of currentUserPermissions) {
15
- if (p.toLowerCase() === permission.toLocaleLowerCase()) {
16
- hasPermission = true
17
- break
18
- }
19
- }
20
-
21
- return hasPermission
22
- } else {
23
- console.error(`need permission! Like v-permission="acs.department.save"`)
24
- return false
25
- }
26
- }
1
+ import 'nprogress/nprogress.css' // Progress 进度条样式
2
+ import { getPermissions } from './permissionAuth'
3
+
4
+ /**
5
+ * @param {String} value
6
+ * @returns {Boolean}
7
+ */
8
+ export default function checkPermission(permission) {
9
+ if (permission) {
10
+ let hasPermission = false
11
+ const storeCurrentUserPermissions = getPermissions()
12
+ if (
13
+ typeof storeCurrentUserPermissions !== 'undefined' &&
14
+ storeCurrentUserPermissions !== null
15
+ ) {
16
+ const currentPermission = permission.replace(/\./g, '__')
17
+ const permissionResult = storeCurrentUserPermissions[currentPermission]
18
+ // console.log('iMatrix-checkPermission-storeCurrentUserPermissions-result==orgPermission=', permission, '===currentPermission', currentPermission, '==permissionResult=', permissionResult)
19
+ if (permissionResult !== undefined && permissionResult === true) {
20
+ hasPermission = true
21
+ }
22
+ }
23
+
24
+ return hasPermission
25
+ } else {
26
+ console.error(`need permission2! Like v-permission="acs.department.save"`)
27
+ return false
28
+ }
29
+ }
30
+
31
+ export { checkPermission }
@@ -0,0 +1,90 @@
1
+ import * as Vue from 'vue'
2
+
3
+ const permissionKey = 'PERMISSION-'
4
+ const permissionMenuKey = 'PERMISSION_MENU-'
5
+ export function getSystemCode() {
6
+ let systemCode
7
+ if (window.$vueApp.config.globalProperties.customSystem) {
8
+ systemCode = window.$vueApp.config.globalProperties.customSystem
9
+ } else {
10
+ systemCode = window.$vueApp.config.globalProperties.systemCode
11
+ }
12
+ // let systemCode = Vue.prototype.systemCode
13
+ // if (Vue.prototype.customSystem) {
14
+ // systemCode = Vue.prototype.customSystem
15
+ // }
16
+ return systemCode
17
+ }
18
+
19
+ export function getPermissions() {
20
+ const systemCode = getSystemCode()
21
+ console.log('%c描述-160825','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',systemCode);
22
+ const permissions = window.sessionStorage.getItem(permissionKey + systemCode)
23
+ console.log('%c描述-155948','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',permissions);
24
+ if (permissions) {
25
+ return JSON.parse(permissions)
26
+ }
27
+ return null
28
+ }
29
+
30
+ export function setPermissions(permissions) {
31
+ const systemCode = getSystemCode()
32
+ const permissionObjs = {}
33
+ for (let i = 0; i < permissions.length; i++) {
34
+ const permission = permissions[i].replace(/\./g, '__')
35
+ permissionObjs[permission] = true
36
+ }
37
+ window.sessionStorage.setItem(
38
+ permissionKey + systemCode,
39
+ JSON.stringify(permissionObjs)
40
+ )
41
+ return permissionObjs
42
+ }
43
+
44
+ export function removePermissions() {
45
+ const systemCode = getSystemCode()
46
+ window.sessionStorage.removeItem(permissionKey + systemCode)
47
+ for (var i = 0; i < window.sessionStorage.length; i++) {
48
+ var key = window.sessionStorage.key(i)
49
+ if (key.indexOf(permissionKey) >= 0) {
50
+ window.sessionStorage.removeItem(key)
51
+ }
52
+ }
53
+ }
54
+
55
+ export function getMenus(systemCode) {
56
+ if (!systemCode) {
57
+ systemCode = getSystemCode()
58
+ }
59
+ const permissions = window.sessionStorage.getItem(permissionMenuKey + systemCode)
60
+ if (permissions) {
61
+ return JSON.parse(permissions)
62
+ }
63
+ return null
64
+ }
65
+
66
+ export function setMenus(menus, systemCode) {
67
+ if (menus) {
68
+ if (!systemCode) {
69
+ systemCode = getSystemCode()
70
+ }
71
+ window.sessionStorage.setItem(
72
+ permissionMenuKey + systemCode,
73
+ JSON.stringify(menus)
74
+ )
75
+ return menus
76
+ }
77
+ }
78
+
79
+ export function removeMenus(systemCode) {
80
+ if (!systemCode) {
81
+ systemCode = getSystemCode()
82
+ }
83
+ window.sessionStorage.removeItem(permissionMenuKey + systemCode)
84
+ for (var i = 0; i < window.sessionStorage.length; i++) {
85
+ var key = window.sessionStorage.key(i)
86
+ if (key.indexOf(permissionMenuKey) >= 0) {
87
+ window.sessionStorage.removeItem(key)
88
+ }
89
+ }
90
+ }
@@ -0,0 +1,188 @@
1
+ export function getFirstDayOfSeason(date) {
2
+ var month = new Date(date).getMonth()
3
+ if (month < 3) {
4
+ date.setMonth(0)
5
+ } else if (month > 2 && month < 6) {
6
+ date.setMonth(3)
7
+ } else if (month > 5 && month < 9) {
8
+ date.setMonth(6)
9
+ } else if (month > 8 && month < 11) {
10
+ date.setMonth(9)
11
+ }
12
+ date.setDate(1)
13
+ return formatDate(date)
14
+ }
15
+ export function getWeekOfSeason(date) {
16
+ const weekTime = date.getDay() - 1
17
+ if (weekTime === -1) {
18
+ return date.getTime() - 6 * 24 * 60 * 60 * 1000
19
+ } else {
20
+ return date.getTime() - weekTime * 24 * 60 * 60 * 1000
21
+ }
22
+ }
23
+
24
+ function formatDate(time) {
25
+ const date = new Date(time) // 创建Date对象
26
+ const year = date.getFullYear() // 获取年份
27
+ const month = date.getMonth() + 1 // 获取月份,记得+1
28
+ const day = date.getDate() // 获取日期
29
+ return `${year}-${month}-${day}` // 返回格式化后的日期字符串
30
+ }
31
+
32
+ export function formatTimefn(format, dateTime) {
33
+ if (format === undefined || format === null || format === '') {
34
+ return dateTime
35
+ }
36
+ const nowTime = new Date(dateTime)
37
+ const year = nowTime.getFullYear()
38
+ const month = nowTime.getMonth() + 1
39
+ const date = nowTime.getDate()
40
+ const hour = nowTime.getHours()
41
+ const minute = nowTime.getMinutes()
42
+ const second = nowTime.getSeconds()
43
+
44
+ function getCharCount(char) {
45
+ var regex = new RegExp(char, 'g') // 使用g表示整个字符串都要匹配
46
+ var result = format.match(regex) // match方法可在字符串内检索指定的值,或找到一个或多个正则表达式的匹配。
47
+ var count = !result ? 0 : result.length
48
+ return count
49
+ }
50
+ function setDateItem(oneUnit, twoUnit, itemDate) {
51
+ if (getCharCount(oneUnit) === 1) {
52
+ format = format.replace(oneUnit, itemDate)
53
+ } else if (getCharCount(oneUnit) === 2 && itemDate < 10) {
54
+ format = format.replace(twoUnit, '0' + itemDate)
55
+ } else {
56
+ format = format.replace(twoUnit, itemDate)
57
+ }
58
+ }
59
+ // 获取第几周
60
+ function getYearWeek(a, b, c) {
61
+ // a为年 b为月 c为日
62
+ var date1 = new Date(a, parseInt(b) - 1, c)
63
+ var date2 = new Date(a, 0, 1)
64
+ var d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000)
65
+ return Math.ceil((d + (date2.getDay() + 1 - 1)) / 7)
66
+ }
67
+
68
+ if (format.indexOf('y') !== -1) {
69
+ format = format.replace('yyyy', year)
70
+ }
71
+
72
+ if (format.indexOf('M') !== -1) {
73
+ setDateItem('M', 'MM', month)
74
+ }
75
+
76
+ if (format.indexOf('W') !== -1) {
77
+ const week = getYearWeek(year, month, date)
78
+ setDateItem('W', 'WW', week)
79
+ }
80
+ if (format.indexOf('d') !== -1) {
81
+ setDateItem('d', 'dd', date)
82
+ }
83
+
84
+ if (format.indexOf('H') !== -1) {
85
+ setDateItem('H', 'HH', hour)
86
+ }
87
+
88
+ if (format.indexOf('m') !== -1) {
89
+ setDateItem('m', 'mm', minute)
90
+ }
91
+
92
+ if (format.indexOf('s') !== -1) {
93
+ setDateItem('s', 'ss', second)
94
+ }
95
+ return format
96
+ }
97
+
98
+ export function getDateRangeSelectorDefaultValue(stareScopeTimeType, format) {
99
+ let Staretime = ''
100
+ const endTime = new Date()
101
+ const computeTime = new Date()
102
+ if (stareScopeTimeType === 'oneYear') {
103
+ // 近一年
104
+ const yearTime = endTime.getFullYear()
105
+ computeTime.setFullYear(yearTime)
106
+ computeTime.setMonth(0)
107
+ Staretime = computeTime.setDate(1)
108
+ } else if (stareScopeTimeType === 'twoYear') {
109
+ // 近两年
110
+ const yearTime = endTime.getFullYear() - 1
111
+ computeTime.setFullYear(yearTime)
112
+ computeTime.setMonth(0)
113
+ Staretime = computeTime.setDate(1)
114
+ } else if (stareScopeTimeType === 'oneQuarter') {
115
+ // 近一个季度
116
+ Staretime = new Date(getFirstDayOfSeason(computeTime))
117
+ } else if (stareScopeTimeType === 'twoQuarter') {
118
+ // 近两个季度
119
+ const timeMonth = computeTime.getMonth()
120
+ if (endTime.getMonth < 3) {
121
+ const yeaNum = computeTime.getFullYear() - 1
122
+ computeTime.setFullYear(yeaNum)
123
+ computeTime.setMonth(10)
124
+ } else {
125
+ computeTime.setMonth(timeMonth - 3)
126
+ }
127
+ Staretime = new Date(getFirstDayOfSeason(computeTime))
128
+ } else if (stareScopeTimeType === 'threeQuarter') {
129
+ // 近三个季度
130
+ const timeMonth = computeTime.getMonth()
131
+ if (endTime.getMonth < 8 && endTime.getMonth > 2) {
132
+ const yeaNum = computeTime.getFullYear() - 1
133
+ computeTime.setFullYear(yeaNum)
134
+ computeTime.setMonth(8)
135
+ } else if (endTime.getMonth < 3) {
136
+ const yeaNum = computeTime.getFullYear() - 1
137
+ computeTime.setFullYear(yeaNum)
138
+ computeTime.setMonth(5)
139
+ } else {
140
+ computeTime.setMonth(timeMonth - 6)
141
+ }
142
+ Staretime = new Date(getFirstDayOfSeason(computeTime))
143
+ } else if (stareScopeTimeType === 'oneMonth') {
144
+ // 近一个月
145
+ Staretime = computeTime.setDate(1)
146
+ } else if (stareScopeTimeType === 'twoMonth') {
147
+ // 近两个月
148
+ const monthNum = endTime.getMonth() - 1
149
+ if (monthNum > -1) {
150
+ computeTime.setMonth(monthNum)
151
+ } else {
152
+ const yeartime = endTime.getFullYear() - 1
153
+ computeTime.setFullYear(yeartime)
154
+ computeTime.setMonth(11)
155
+ }
156
+ Staretime = computeTime.setDate(1)
157
+ } else if (stareScopeTimeType === 'threeMonth') {
158
+ // 近三个月
159
+ const monthTime = endTime.getMonth() - 2
160
+ if (monthTime > -1) {
161
+ computeTime.setMonth(monthTime)
162
+ } else {
163
+ const yeartime = endTime.getFullYear() - 1
164
+ computeTime.setFullYear(yeartime)
165
+ computeTime.setMonth(10)
166
+ }
167
+ Staretime = computeTime.setDate(1)
168
+ } else if (stareScopeTimeType === 'oneWeek') {
169
+ // 近一周
170
+ const MondayTime = getWeekOfSeason(computeTime)
171
+ Staretime = new Date(MondayTime)
172
+ } else if (stareScopeTimeType === 'twoWeek') {
173
+ // 近两周
174
+ const MondayTime = getWeekOfSeason(computeTime)
175
+ Staretime = new Date(MondayTime - 7 * 24 * 60 * 60 * 1000)
176
+ } else if (stareScopeTimeType === 'threeWeek') {
177
+ // 近三周
178
+ const MondayTime = getWeekOfSeason(computeTime)
179
+ Staretime = new Date(MondayTime - 14 * 24 * 60 * 60 * 1000)
180
+ }
181
+ if (Staretime) {
182
+ const startTimeTemp = new Date(Staretime).getTime()
183
+ const endTimeTemp = endTime.getTime()
184
+ const startDate = formatTimefn(format, startTimeTemp)
185
+ const endDate = formatTimefn(format, endTimeTemp)
186
+ return { startTimeTemp, endTimeTemp, startDate, endDate }
187
+ }
188
+ }