@qqt-product/system 0.0.1 → 0.0.16
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/dist/index.es.js +53240 -10634
- package/dist/index.umd.js +94 -21
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2871 -0
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2878 -0
- package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
- package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
- package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2876 -0
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +29 -14
- package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
- package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
- package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2872 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2864 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2887 -0
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +221 -28
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
- package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +23 -7
- package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +7 -3
- package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
- package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
- package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
- package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1209 -0
- package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
- package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
- package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2863 -0
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2872 -0
- package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
- package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
- package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
- package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
- package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
- package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
- package/dist/style.css +1 -1
- package/dist/vite-env.d.ts +13 -13
- package/package.json +13 -11
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +272 -0
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +82 -14
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +65 -33
- package/src/lib/components/QAccountList/src/QAccountList.vue +532 -530
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +143 -137
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +172 -166
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +123 -124
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +66 -18
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +151 -122
- package/src/lib/components/QI18nList/src/QI18nList.vue +365 -361
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +103 -94
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +109 -105
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +3 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +218 -221
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +110 -117
- package/src/lib/components/QPermissionDataList/src/form.vue +109 -109
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +1 -1
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +120 -32
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +189 -163
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +84 -0
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +22 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +134 -85
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +91 -0
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +276 -263
- package/src/lib/components/QRoleList/src/QRoleList.vue +332 -288
- package/src/lib/components/QRoleList/src/useConfigData.ts +1 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +304 -302
- package/src/lib/components/QUsageList/src/QUsageList.vue +287 -82
- package/src/lib/components/QUsageList/src/useConfigData.ts +147 -13
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +140 -140
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +28 -28
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +130 -42
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +2 -2
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +12 -12
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +276 -268
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +1 -1
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +124 -125
- package/src/lib/components/index.ts +78 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +2 -10
- package/src/lib/components/integratedNodesList/src/index.vue +130 -136
- package/src/lib/components/integratedReportList/src/index.vue +55 -30
- package/src/lib/components/integratedReportSearchList/src/index.vue +106 -66
- package/src/lib/components/loginAbnormalLogList/src/index.vue +43 -50
- package/src/lib/components/loginLogList/src/index.vue +51 -57
- package/src/lib/components/loginSupplierLogList/src/index.vue +53 -63
- package/src/lib/components/operateLogList/src/index.vue +46 -57
- package/src/vite-env.d.ts +13 -13
- package/tsconfig.json +24 -24
- package/vite.config.ts +1 -1
- package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
- package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
- package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
- package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
- package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
- package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
- package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
|
@@ -1,82 +1,287 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: 100
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: 100%; padding: 6px">
|
|
3
|
+
<a-row :gutter="5">
|
|
4
|
+
<a-col :span="12">
|
|
5
|
+
<a-card :title="srmI18n(`i18n_title_moduleUsage`, '模块使用情况')">
|
|
6
|
+
<vxe-grid v-bind="moduleOptains"> </vxe-grid>
|
|
7
|
+
</a-card>
|
|
8
|
+
</a-col>
|
|
9
|
+
<a-col :span="12">
|
|
10
|
+
<a-card :title="srmI18n(`i18n_title_useredUsage`, '用户使用情况')">
|
|
11
|
+
<vxe-grid v-bind="useOptains"> </vxe-grid>
|
|
12
|
+
</a-card>
|
|
13
|
+
</a-col>
|
|
14
|
+
</a-row>
|
|
15
|
+
<a-row :gutter="5" style="margin-top: 6px">
|
|
16
|
+
<a-col :span="24">
|
|
17
|
+
<a-card :title="`${srmI18n(`i18n_title_moduleUsage`, '模块使用情况')}(${getYearMonth(month)})`">
|
|
18
|
+
<template #extra> <a-date-picker :disabled-date="disabledDate" v-model:value="month" picker="month" @change="datePickerChange" /></template>
|
|
19
|
+
<div class="chart" ref="chartRef"></div>
|
|
20
|
+
</a-card>
|
|
21
|
+
</a-col>
|
|
22
|
+
</a-row>
|
|
23
|
+
|
|
24
|
+
<a-row :gutter="5" style="margin-top: 6px">
|
|
25
|
+
<a-col :span="24">
|
|
26
|
+
<a-card :title="`${srmI18n(`i18n_title_userUsageSummary`, '用户使用情况(汇总)')}`">
|
|
27
|
+
<!-- <template #extra> <a-date-picker :disabled-date="disabledDate" v-model:value="month" picker="month" @change="datePickerChange" /></template> -->
|
|
28
|
+
<div class="chart" ref="useChartRef"></div>
|
|
29
|
+
</a-card>
|
|
30
|
+
</a-col>
|
|
31
|
+
</a-row>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script lang="ts">
|
|
36
|
+
//JS
|
|
37
|
+
import { defineComponent, inject, onMounted, ref, nextTick } from 'vue'
|
|
38
|
+
import qqtApi from '@qqt-product/api'
|
|
39
|
+
import { init, graphic } from 'echarts'
|
|
40
|
+
import type { ECharts } from 'echarts'
|
|
41
|
+
|
|
42
|
+
import qqtUtils from '@qqt-product/utils'
|
|
43
|
+
//hook
|
|
44
|
+
import { useConfigData } from './useConfigData'
|
|
45
|
+
//ts
|
|
46
|
+
|
|
47
|
+
//组件
|
|
48
|
+
|
|
49
|
+
export default defineComponent({
|
|
50
|
+
name: 'QUsageList',
|
|
51
|
+
|
|
52
|
+
props: {
|
|
53
|
+
userInfo: {
|
|
54
|
+
type: Object,
|
|
55
|
+
defalut: () => {
|
|
56
|
+
return {}
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
setup() {
|
|
61
|
+
//inject
|
|
62
|
+
const srmI18n = inject('Q_SRM_I18N', (i18nKey: string, defaultValue: string, account?: string | number): string => {
|
|
63
|
+
if (i18nKey) {
|
|
64
|
+
if (account) {
|
|
65
|
+
return account + defaultValue
|
|
66
|
+
}
|
|
67
|
+
return defaultValue
|
|
68
|
+
}
|
|
69
|
+
return defaultValue
|
|
70
|
+
})
|
|
71
|
+
//data-hook
|
|
72
|
+
const { apiUrls, moduleOptains, useOptains, moduleChartoption, useChartoption, useChartoptionInstan, moduleChartoptionInstan } = useConfigData(srmI18n)
|
|
73
|
+
//data
|
|
74
|
+
const qHttp: qqtApi.Request = qqtApi.useHttp()
|
|
75
|
+
const chartRef = ref()
|
|
76
|
+
const useChartRef = ref()
|
|
77
|
+
let chart: ECharts
|
|
78
|
+
let useChart: ECharts
|
|
79
|
+
// const dateNow = new Date().getTime()
|
|
80
|
+
const month = ref()
|
|
81
|
+
|
|
82
|
+
//methods
|
|
83
|
+
function getModuleList(params = {}) {
|
|
84
|
+
qHttp
|
|
85
|
+
.get({
|
|
86
|
+
url: apiUrls.moduleOptList,
|
|
87
|
+
params,
|
|
88
|
+
})
|
|
89
|
+
.then((res) => {
|
|
90
|
+
if (res.success) {
|
|
91
|
+
moduleOptains.data = res.result.records
|
|
92
|
+
moduleChartoptionInstan.xAxis.data = res.result.records.length > 0 ? res.result.records.map((n) => n.busModule) : []
|
|
93
|
+
moduleChartoptionInstan.series[0].data = res.result.records.length > 0 ? res.result.records.map((n) => n.totalCount) : []
|
|
94
|
+
|
|
95
|
+
moduleChartoption.value = {
|
|
96
|
+
...moduleChartoptionInstan,
|
|
97
|
+
}
|
|
98
|
+
nextTick(() => {
|
|
99
|
+
chart.setOption(moduleChartoption.value)
|
|
100
|
+
})
|
|
101
|
+
return res.records
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function getUseList() {
|
|
107
|
+
qHttp
|
|
108
|
+
.get({
|
|
109
|
+
url: apiUrls.useOptList,
|
|
110
|
+
})
|
|
111
|
+
.then((res) => {
|
|
112
|
+
if (res.success) {
|
|
113
|
+
useOptains.data = res.result
|
|
114
|
+
|
|
115
|
+
const year = new Date().getFullYear()
|
|
116
|
+
const tableData = res.result.map((n) => ({
|
|
117
|
+
...n,
|
|
118
|
+
_account: `${n.subAccount}_${n.userName}`,
|
|
119
|
+
}))
|
|
120
|
+
let xAxisData: string[] = []
|
|
121
|
+
for (let i = 0; i < 12; i++) {
|
|
122
|
+
let mo = ''
|
|
123
|
+
let n = i + 1
|
|
124
|
+
if (n < 10) {
|
|
125
|
+
mo = '0' + n
|
|
126
|
+
}
|
|
127
|
+
xAxisData.push(`${year}-${mo}`)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
let groupBySubAccount = qqtUtils.groupBy(tableData, '_account')
|
|
131
|
+
let legendData = Object.keys(groupBySubAccount)
|
|
132
|
+
let areaStyles = [
|
|
133
|
+
{
|
|
134
|
+
opacity: 0.8,
|
|
135
|
+
color: new graphic.LinearGradient(0, 0, 0, 1, [
|
|
136
|
+
{
|
|
137
|
+
offset: 0,
|
|
138
|
+
color: 'rgba(128, 255, 165)',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
offset: 1,
|
|
142
|
+
color: 'rgba(1, 191, 236)',
|
|
143
|
+
},
|
|
144
|
+
]),
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
opacity: 0.8,
|
|
148
|
+
color: new graphic.LinearGradient(0, 0, 0, 1, [
|
|
149
|
+
{
|
|
150
|
+
offset: 0,
|
|
151
|
+
color: 'rgba(0, 221, 255)',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
offset: 1,
|
|
155
|
+
color: 'rgba(77, 119, 255)',
|
|
156
|
+
},
|
|
157
|
+
]),
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
opacity: 0.8,
|
|
161
|
+
color: new graphic.LinearGradient(0, 0, 0, 1, [
|
|
162
|
+
{
|
|
163
|
+
offset: 0,
|
|
164
|
+
color: 'rgba(55, 162, 255)',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
offset: 1,
|
|
168
|
+
color: 'rgba(116, 21, 219)',
|
|
169
|
+
},
|
|
170
|
+
]),
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
opacity: 0.8,
|
|
174
|
+
color: new graphic.LinearGradient(0, 0, 0, 1, [
|
|
175
|
+
{
|
|
176
|
+
offset: 0,
|
|
177
|
+
color: 'rgba(255, 0, 135)',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
offset: 1,
|
|
181
|
+
color: 'rgba(135, 0, 157)',
|
|
182
|
+
},
|
|
183
|
+
]),
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
opacity: 0.8,
|
|
187
|
+
color: new graphic.LinearGradient(0, 0, 0, 1, [
|
|
188
|
+
{
|
|
189
|
+
offset: 0,
|
|
190
|
+
color: 'rgba(255, 191, 0)',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
offset: 1,
|
|
194
|
+
color: 'rgba(224, 62, 76)',
|
|
195
|
+
},
|
|
196
|
+
]),
|
|
197
|
+
},
|
|
198
|
+
]
|
|
199
|
+
let series = Object.keys(groupBySubAccount).map((prop, i) => {
|
|
200
|
+
let name = prop
|
|
201
|
+
let areaStyle
|
|
202
|
+
if (i < 5) {
|
|
203
|
+
areaStyle = areaStyles[i]
|
|
204
|
+
} else {
|
|
205
|
+
const index = Math.floor(Math.random() * 5)
|
|
206
|
+
areaStyle = areaStyles[index]
|
|
207
|
+
}
|
|
208
|
+
let accountData = groupBySubAccount[prop]
|
|
209
|
+
let data = xAxisData.map((sub) => {
|
|
210
|
+
let { totalCount = 0 } = accountData.find((n) => n.logMonth === sub) || {}
|
|
211
|
+
return totalCount
|
|
212
|
+
})
|
|
213
|
+
return {
|
|
214
|
+
name: name,
|
|
215
|
+
type: 'line',
|
|
216
|
+
stack: srmI18n(`i18n_title_total`, '总量'),
|
|
217
|
+
smooth: true,
|
|
218
|
+
lineStyle: {
|
|
219
|
+
width: 0,
|
|
220
|
+
},
|
|
221
|
+
showSymbol: false,
|
|
222
|
+
areaStyle: areaStyle,
|
|
223
|
+
emphasis: {
|
|
224
|
+
focus: 'series',
|
|
225
|
+
},
|
|
226
|
+
data: data,
|
|
227
|
+
}
|
|
228
|
+
})
|
|
229
|
+
useChartoptionInstan.legend.data = legendData.length > 0 ? legendData : []
|
|
230
|
+
useChartoptionInstan.xAxis.data = xAxisData.length > 0 ? xAxisData : []
|
|
231
|
+
useChartoptionInstan.series = series.length > 0 ? series : []
|
|
232
|
+
|
|
233
|
+
useChartoption.value = {
|
|
234
|
+
...useChartoptionInstan,
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
nextTick(() => {
|
|
238
|
+
useChart.setOption(useChartoption.value)
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
return res.records
|
|
242
|
+
}
|
|
243
|
+
})
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function getYearMonth(date) {
|
|
247
|
+
if (date) {
|
|
248
|
+
const curDate = new Date(date)
|
|
249
|
+
let curDateY = curDate.getFullYear()
|
|
250
|
+
let curDateM = curDate.getMonth() + 1
|
|
251
|
+
return curDateY + '-' + (curDateM <= 9 ? '0' + curDateM : curDateM)
|
|
252
|
+
} else {
|
|
253
|
+
return ''
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function disabledDate(current) {
|
|
258
|
+
const datacurren = new Date(current)
|
|
259
|
+
const datenow = new Date()
|
|
260
|
+
return datacurren.getMonth() + 1 > datenow.getMonth() + 1
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function datePickerChange() {
|
|
264
|
+
getModuleList({
|
|
265
|
+
logMonth: getYearMonth(month.value),
|
|
266
|
+
pageSize: 200,
|
|
267
|
+
})
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
//生命周期
|
|
271
|
+
onMounted(async () => {
|
|
272
|
+
chart = init(chartRef.value)
|
|
273
|
+
useChart = init(useChartRef.value)
|
|
274
|
+
await getModuleList()
|
|
275
|
+
await getUseList()
|
|
276
|
+
})
|
|
277
|
+
|
|
278
|
+
return { useChartRef, apiUrls, srmI18n, moduleOptains, useOptains, moduleChartoption, chartRef, month, getYearMonth, disabledDate, datePickerChange }
|
|
279
|
+
},
|
|
280
|
+
})
|
|
281
|
+
</script>
|
|
282
|
+
<style scoped>
|
|
283
|
+
.chart {
|
|
284
|
+
width: 100%;
|
|
285
|
+
height: 400px;
|
|
286
|
+
}
|
|
287
|
+
</style>
|
|
@@ -1,20 +1,154 @@
|
|
|
1
|
-
import { shallowRef, ref } from 'vue'
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export function useConfigData() {
|
|
1
|
+
import { shallowRef, ref, reactive } from 'vue'
|
|
2
|
+
//ts
|
|
3
|
+
import type { MapObjectNoneType } from '../../../utils/global.types'
|
|
4
|
+
|
|
5
|
+
export function useConfigData(srmI18n) {
|
|
6
6
|
//响应
|
|
7
7
|
|
|
8
|
-
const apiUrls =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
delete: '/account/role/delete',
|
|
12
|
-
copy: '/account/role/copy',
|
|
13
|
-
userRoleList: '/account/elsSubAccount/userRoleList',
|
|
8
|
+
const apiUrls = reactive({
|
|
9
|
+
moduleOptList: '/log/elsLogStatistics/list',
|
|
10
|
+
useOptList: '/log/findUserLoginList',
|
|
14
11
|
})
|
|
15
12
|
const uploadShow = shallowRef<boolean>(false)
|
|
16
|
-
const showEditPage = shallowRef<boolean>(false)
|
|
17
13
|
const currentEditRow = ref({})
|
|
18
14
|
const listLayoutRef = ref()
|
|
19
|
-
|
|
15
|
+
const moduleOptains = reactive<MapObjectNoneType>({
|
|
16
|
+
border: true,
|
|
17
|
+
height: 500,
|
|
18
|
+
align: null,
|
|
19
|
+
columnConfig: {
|
|
20
|
+
resizable: true,
|
|
21
|
+
},
|
|
22
|
+
columns: [
|
|
23
|
+
{ type: 'seq', width: 50, title: srmI18n(`i18n_title_seq`, '序号') },
|
|
24
|
+
{ title: srmI18n(`i18n_title_moduleName`, '模块名称'), field: 'busModule' },
|
|
25
|
+
{ title: srmI18n(`i18n_field_logMonth`, '月份'), field: 'logMonth' },
|
|
26
|
+
{ title: srmI18n(`i18n_title_operationsNum`, '操作次数'), field: 'totalCount' },
|
|
27
|
+
],
|
|
28
|
+
data: [],
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const useOptains = reactive<MapObjectNoneType>({
|
|
32
|
+
border: true,
|
|
33
|
+
height: 500,
|
|
34
|
+
align: null,
|
|
35
|
+
columnConfig: {
|
|
36
|
+
resizable: true,
|
|
37
|
+
},
|
|
38
|
+
columns: [
|
|
39
|
+
{ type: 'seq', width: 50, title: srmI18n(`i18n_title_seq`, '序号') },
|
|
40
|
+
{ title: srmI18n(`i18n_field_Jey_16832e1`, '子账号'), field: 'subAccount' },
|
|
41
|
+
{ title: srmI18n(`i18n_title_userName`, '用户名'), field: 'userName' },
|
|
42
|
+
{ title: srmI18n(`i18n_field_logMonth`, '月份'), field: 'logMonth' },
|
|
43
|
+
{ title: srmI18n(`i18n_title_loginCount`, '登录次数'), field: 'totalCount' },
|
|
44
|
+
],
|
|
45
|
+
|
|
46
|
+
data: [],
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
const moduleChartoption = ref({})
|
|
50
|
+
|
|
51
|
+
const useChartoption = ref({})
|
|
52
|
+
|
|
53
|
+
const useChartoptionInstan = {
|
|
54
|
+
title: {
|
|
55
|
+
text: srmI18n(`i18n_title_loginCount`, '登录次数'),
|
|
56
|
+
},
|
|
57
|
+
tooltip: {
|
|
58
|
+
trigger: 'axis',
|
|
59
|
+
axisPointer: {
|
|
60
|
+
type: 'cross',
|
|
61
|
+
label: {
|
|
62
|
+
backgroundColor: '#6a7985',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
legend: {
|
|
67
|
+
width: '60%',
|
|
68
|
+
type: 'scroll',
|
|
69
|
+
data: [] as string[],
|
|
70
|
+
},
|
|
71
|
+
toolbox: {
|
|
72
|
+
show: true,
|
|
73
|
+
feature: {
|
|
74
|
+
dataZoom: {
|
|
75
|
+
yAxisIndex: 'none',
|
|
76
|
+
},
|
|
77
|
+
// dataView: {readOnly: false},
|
|
78
|
+
magicType: { type: ['line', 'bar', 'stack'] },
|
|
79
|
+
restore: {},
|
|
80
|
+
saveAsImage: {},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
grid: {
|
|
84
|
+
left: '3%',
|
|
85
|
+
right: '4%',
|
|
86
|
+
bottom: '3%',
|
|
87
|
+
containLabel: true,
|
|
88
|
+
},
|
|
89
|
+
xAxis: {
|
|
90
|
+
type: 'category',
|
|
91
|
+
boundaryGap: false,
|
|
92
|
+
data: [] as string[],
|
|
93
|
+
},
|
|
94
|
+
yAxis: {
|
|
95
|
+
type: 'value',
|
|
96
|
+
},
|
|
97
|
+
series: [] as MapObjectNoneType[],
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const moduleChartoptionInstan = {
|
|
101
|
+
title: {
|
|
102
|
+
text: srmI18n(`i18n_title_moduleUsage`, '模块使用情况'),
|
|
103
|
+
subtext: '汇总',
|
|
104
|
+
},
|
|
105
|
+
tooltip: {
|
|
106
|
+
trigger: 'axis',
|
|
107
|
+
},
|
|
108
|
+
legend: {
|
|
109
|
+
data: [srmI18n(`i18n_title_usage`, '使用情况')],
|
|
110
|
+
},
|
|
111
|
+
toolbox: {
|
|
112
|
+
show: true,
|
|
113
|
+
feature: {
|
|
114
|
+
dataZoom: {
|
|
115
|
+
yAxisIndex: 'none',
|
|
116
|
+
},
|
|
117
|
+
// dataView: {readOnly: false},
|
|
118
|
+
magicType: { type: ['line', 'bar', 'stack'] },
|
|
119
|
+
restore: {},
|
|
120
|
+
saveAsImage: {},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
xAxis: {
|
|
124
|
+
type: 'category',
|
|
125
|
+
data: [],
|
|
126
|
+
axisLabel: {
|
|
127
|
+
// 坐标轴刻度标签
|
|
128
|
+
rotate: '45',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
yAxis: {
|
|
132
|
+
type: 'value',
|
|
133
|
+
},
|
|
134
|
+
series: [
|
|
135
|
+
{
|
|
136
|
+
name: srmI18n(`i18n_title_usage`, '使用情况'),
|
|
137
|
+
type: 'bar',
|
|
138
|
+
data: [],
|
|
139
|
+
center: ['50%', '50%'],
|
|
140
|
+
markPoint: {
|
|
141
|
+
data: [
|
|
142
|
+
{ type: 'max', name: srmI18n(`i18n_title_maximum`, '最大值') },
|
|
143
|
+
{ type: 'min', name: srmI18n(`i18n_title_minimum`, '最小值') },
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
markLine: {
|
|
147
|
+
data: [{ type: 'average', name: srmI18n(`i18n_title_averagemum`, '平均值') }],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return { moduleChartoptionInstan, useChartoptionInstan, apiUrls, useOptains, moduleChartoption, currentEditRow, moduleOptains, listLayoutRef, uploadShow, useChartoption }
|
|
20
154
|
}
|