@qqt-product/system 0.0.16 → 0.0.17
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 +9595 -9168
- package/dist/index.umd.js +34 -35
- package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +15 -12
- package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +13 -10
- package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +16 -12
- package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +12 -9
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +12 -9
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +15 -12
- package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +9 -0
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +387 -3
- package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +15 -12
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +12 -9
- package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +17 -14
- package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +1 -1
- package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +2 -1
- package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +9 -0
- package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
- package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +19 -2
- package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
- package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +0 -1
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +12 -9
- package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +15 -12
- package/dist/style.css +1 -1
- package/package.json +20 -9
- package/.eslintignore +0 -4
- package/.eslintrc.cjs +0 -22
- package/.prettierignore +0 -4
- package/.prettierrc.cjs +0 -41
- package/.vscode/extensions.json +0 -3
- package/dist/vite.svg +0 -1
- package/index.html +0 -13
- package/public/vite.svg +0 -1
- package/src/App.vue +0 -8
- package/src/lib/components/QAccountList/index.ts +0 -6
- package/src/lib/components/QAccountList/src/QAccountCreate.vue +0 -272
- package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -259
- package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -273
- package/src/lib/components/QAccountList/src/QAccountList.vue +0 -532
- package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
- package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
- package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -143
- package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
- package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
- package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -172
- package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
- package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
- package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -123
- package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
- package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -244
- package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -151
- package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
- package/src/lib/components/QI18nList/index.ts +0 -6
- package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
- package/src/lib/components/QI18nList/src/QI18nList.vue +0 -365
- package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
- package/src/lib/components/QImChatGroupList/index.ts +0 -6
- package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -103
- package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
- package/src/lib/components/QMqRecordList/index.ts +0 -6
- package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -109
- package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
- package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
- package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
- package/src/lib/components/QPermissionDataList/index.ts +0 -6
- package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
- package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -218
- package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -110
- package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
- package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -332
- package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -189
- package/src/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.ts +0 -84
- package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
- package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -134
- package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue +0 -91
- package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
- package/src/lib/components/QQuartzJobList/index.ts +0 -6
- package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -276
- package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
- package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
- package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
- package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
- package/src/lib/components/QRoleList/index.ts +0 -6
- package/src/lib/components/QRoleList/src/QRoleList.vue +0 -332
- package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
- package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
- package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
- package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
- package/src/lib/components/QRoleList/src/useConfigData.ts +0 -28
- package/src/lib/components/QSupplierAccountList/index.ts +0 -6
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
- package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -304
- package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
- package/src/lib/components/QUsageList/index.ts +0 -6
- package/src/lib/components/QUsageList/src/QUsageList.vue +0 -287
- package/src/lib/components/QUsageList/src/useConfigData.ts +0 -154
- package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
- package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
- package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
- package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
- package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1895
- package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
- package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
- package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
- package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
- package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
- package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
- package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
- package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
- package/src/lib/components/QcustomConfigList/index.ts +0 -6
- package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -276
- package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
- package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
- package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
- package/src/lib/components/QcustomConfigList/style/index.less +0 -3
- package/src/lib/components/QsysConfigList/index.ts +0 -6
- package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -124
- package/src/lib/components/QsysConfigList/src/types.ts +0 -1
- package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
- package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
- package/src/lib/components/QsysConfigList/style/index.less +0 -3
- package/src/lib/components/index.ts +0 -78
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
- package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -135
- package/src/lib/components/integratedNodesList/src/index.vue +0 -130
- package/src/lib/components/integratedReportList/src/index.vue +0 -111
- package/src/lib/components/integratedReportSearchList/src/index.vue +0 -106
- package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -43
- package/src/lib/components/loginLogList/src/index.vue +0 -51
- package/src/lib/components/loginSupplierLogList/src/index.vue +0 -53
- package/src/lib/components/operateLogList/src/index.vue +0 -46
- package/src/lib/index.ts +0 -15
- package/src/lib/utils/constant.ts +0 -1
- package/src/lib/utils/global.hook.ts +0 -337
- package/src/lib/utils/global.types.ts +0 -49
- package/src/lib/utils/regexp.ts +0 -143
- package/src/main.ts +0 -11
- package/src/vite-env.d.ts +0 -13
- package/tsconfig.json +0 -24
- package/tsconfig.node.json +0 -9
- package/vite.config.ts +0 -61
- /package/dist/{index.es.d.ts → index.d.ts} +0 -0
|
@@ -1,287 +0,0 @@
|
|
|
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,154 +0,0 @@
|
|
|
1
|
-
import { shallowRef, ref, reactive } from 'vue'
|
|
2
|
-
//ts
|
|
3
|
-
import type { MapObjectNoneType } from '../../../utils/global.types'
|
|
4
|
-
|
|
5
|
-
export function useConfigData(srmI18n) {
|
|
6
|
-
//响应
|
|
7
|
-
|
|
8
|
-
const apiUrls = reactive({
|
|
9
|
-
moduleOptList: '/log/elsLogStatistics/list',
|
|
10
|
-
useOptList: '/log/findUserLoginList',
|
|
11
|
-
})
|
|
12
|
-
const uploadShow = shallowRef<boolean>(false)
|
|
13
|
-
const currentEditRow = ref({})
|
|
14
|
-
const listLayoutRef = ref()
|
|
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 }
|
|
154
|
-
}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<vxe-modal title="数据字典" width="760" v-model="visible" :confirmLoading="confirmLoading" type="confirm" show-footer @confirm="selectedOk" @cancel="close">
|
|
4
|
-
<a-radio-group v-model="inputType" button-style="solid" style="margin-bottom: 12px" @change="hanldeRadioChange">
|
|
5
|
-
<a-radio-button value="sysDictCode"> 系统字典 </a-radio-button>
|
|
6
|
-
<a-radio-button value="dictCode"> 企业字典 </a-radio-button>
|
|
7
|
-
<a-radio-button value="manual"> 手动输入 </a-radio-button>
|
|
8
|
-
</a-radio-group>
|
|
9
|
-
<div v-if="inputType === 'manual'">
|
|
10
|
-
<a-input v-model="dataSource" placeholder="请输入数据源地址或字典编码" />
|
|
11
|
-
</div>
|
|
12
|
-
<div v-else>
|
|
13
|
-
<a-spin :spinning="loading">
|
|
14
|
-
<a-input-search placeholder="请输入关键字" style="margin-bottom: 8px" v-model="keyWord" @search="onSearch" enterButton />
|
|
15
|
-
<vxe-grid
|
|
16
|
-
border
|
|
17
|
-
resizable
|
|
18
|
-
show-overflow
|
|
19
|
-
highlight-hover-row
|
|
20
|
-
max-height="320"
|
|
21
|
-
row-id="id"
|
|
22
|
-
size="mini"
|
|
23
|
-
:loading="loading"
|
|
24
|
-
ref="selectGrid"
|
|
25
|
-
:seq-config="{ startIndex: ((tablePage.currentPage as number) - 1) * (tablePage.pageSize as number) }"
|
|
26
|
-
:data="tableData"
|
|
27
|
-
:pager-config="tablePage"
|
|
28
|
-
:radio-config="{ highlight: true, reserve: true, trigger: 'row' }"
|
|
29
|
-
:columns="columns"
|
|
30
|
-
@page-change="handlePageChange"
|
|
31
|
-
>
|
|
32
|
-
</vxe-grid>
|
|
33
|
-
</a-spin>
|
|
34
|
-
</div>
|
|
35
|
-
</vxe-modal>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
<script lang="ts">
|
|
39
|
-
import { defineComponent } from 'vue'
|
|
40
|
-
import { HttpClient, INJECT_HTTP, MapObjectNoneType } from '../../../utils/global.types'
|
|
41
|
-
import { message } from '@qqt-product/ui'
|
|
42
|
-
import type { VxeGridPropTypes, VxeTableDefines } from 'vxe-table'
|
|
43
|
-
export default defineComponent({
|
|
44
|
-
name: 'AddDictCodeModal',
|
|
45
|
-
inject: [INJECT_HTTP],
|
|
46
|
-
data() {
|
|
47
|
-
return {
|
|
48
|
-
visible: false,
|
|
49
|
-
loading: false,
|
|
50
|
-
confirmLoading: false,
|
|
51
|
-
inputType: 'sysDictCode',
|
|
52
|
-
dataSource: '',
|
|
53
|
-
keyWord: '',
|
|
54
|
-
columns: [
|
|
55
|
-
{ type: 'radio', width: 40 },
|
|
56
|
-
{ type: 'seq', title: '序号', width: 60 },
|
|
57
|
-
{ field: 'dictCode', title: '字典编码' },
|
|
58
|
-
{ field: 'dictName', title: '字典名称' },
|
|
59
|
-
{ field: 'description', title: '字典描述' },
|
|
60
|
-
] as VxeTableDefines.ColumnOptions[],
|
|
61
|
-
url: '',
|
|
62
|
-
queryParams: {},
|
|
63
|
-
tableData: [],
|
|
64
|
-
tablePage: {
|
|
65
|
-
total: 0,
|
|
66
|
-
currentPage: 1,
|
|
67
|
-
pageSize: 20,
|
|
68
|
-
align: 'left',
|
|
69
|
-
pageSizes: [20, 50, 100, 200, 500],
|
|
70
|
-
layouts: ['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'PageCount', 'Total'],
|
|
71
|
-
perfect: true,
|
|
72
|
-
} as VxeGridPropTypes.PagerConfig,
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
methods: {
|
|
76
|
-
hanldeRadioChange(e: MapObjectNoneType) {
|
|
77
|
-
let value = e.target.value || ''
|
|
78
|
-
let arr = ['dictCode', 'sysDictCode']
|
|
79
|
-
if (arr.includes(value)) {
|
|
80
|
-
this.loadData()
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
loadData() {
|
|
84
|
-
this.loading = true
|
|
85
|
-
let params = { pageSize: this.tablePage.pageSize, pageNo: this.tablePage.currentPage, keyWord: this.keyWord }
|
|
86
|
-
const url = this.inputType === 'sysDictCode' ? '/base/dict/listSys' : '/base/dict/list'
|
|
87
|
-
let http = this.http as HttpClient
|
|
88
|
-
http
|
|
89
|
-
.get({ url, params })
|
|
90
|
-
.then((res) => {
|
|
91
|
-
if (res.success) {
|
|
92
|
-
let list = res.result.records || []
|
|
93
|
-
this.tableData = list
|
|
94
|
-
this.tablePage.total = res.result.total
|
|
95
|
-
let selectGrid = this.$refs.selectGrid as MapObjectNoneType
|
|
96
|
-
if (this.$refs.selectGrid && selectGrid.clearRadioReserve) {
|
|
97
|
-
selectGrid.clearRadioReserve()
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
.finally(() => {
|
|
102
|
-
this.loading = false
|
|
103
|
-
})
|
|
104
|
-
},
|
|
105
|
-
open() {
|
|
106
|
-
// 清空默认值
|
|
107
|
-
this.dataSource = ''
|
|
108
|
-
this.keyWord = ''
|
|
109
|
-
this.loadData()
|
|
110
|
-
this.visible = true
|
|
111
|
-
},
|
|
112
|
-
close() {
|
|
113
|
-
this.visible = false
|
|
114
|
-
},
|
|
115
|
-
selectedOk() {
|
|
116
|
-
let selectedData = {}
|
|
117
|
-
if (this.inputType == 'manual' && this.dataSource) {
|
|
118
|
-
selectedData = { dictCode: this.dataSource }
|
|
119
|
-
} else {
|
|
120
|
-
if (this.$refs.selectGrid) selectedData = (this.$refs.selectGrid as MapObjectNoneType).getRadioRecord()
|
|
121
|
-
}
|
|
122
|
-
if (selectedData) {
|
|
123
|
-
this.visible = false
|
|
124
|
-
this.$emit('ok', selectedData)
|
|
125
|
-
} else {
|
|
126
|
-
message.warning('请选择数据')
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
handlePageChange({ currentPage, pageSize }: MapObjectNoneType) {
|
|
130
|
-
this.tablePage.currentPage = currentPage
|
|
131
|
-
this.tablePage.pageSize = pageSize
|
|
132
|
-
this.loadData()
|
|
133
|
-
},
|
|
134
|
-
onSearch(keyWord: string) {
|
|
135
|
-
this.keyWord = keyWord
|
|
136
|
-
this.loadData()
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
})
|
|
140
|
-
</script>
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<vxe-modal centered title="预览" :width="1000" v-model="visible" class="tempale-preview-modal" show-footer>
|
|
4
|
-
<div>
|
|
5
|
-
<!-- {{ currentEditRow }} -->
|
|
6
|
-
<!-- <a-form layout="inline"> -->
|
|
7
|
-
<!-- <a-form-item>
|
|
8
|
-
<span slot="label">
|
|
9
|
-
{{ $srmI18n(`${$getLangAccount()}#i18n_field_xFCK_2c23c46b`, '布局模式') }}
|
|
10
|
-
<a-tooltip title="暂business模板支持">
|
|
11
|
-
<a-icon type="exclamation-circle" />
|
|
12
|
-
</a-tooltip>
|
|
13
|
-
</span>
|
|
14
|
-
<m-select v-model="modelLayout" dict-code="srmLayout" :placeholder="$srmI18n(`${$getLangAccount()}#i18n_alert_ViFxFVK_737ad3cc`, '请选择布局样式')" />
|
|
15
|
-
</a-form-item> -->
|
|
16
|
-
<!-- </a-form> -->
|
|
17
|
-
<q-edit-page-layout isUseLocalData="true" :localData="currentEditRow" :currentRow="currentEditRow" :businessType="currentEditRow.businessType"> </q-edit-page-layout>
|
|
18
|
-
</div>
|
|
19
|
-
</vxe-modal>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script lang="ts">
|
|
24
|
-
import { defineComponent } from 'vue'
|
|
25
|
-
// import BusinessLayout from '@comp/template/business/BusinessLayout'
|
|
26
|
-
// import { businessUtilMixin } from '@comp/template/business/businessUtilMixin.js'
|
|
27
|
-
// import fieldSelectModal from '@comp/template/fieldSelectModal'
|
|
28
|
-
export default defineComponent({
|
|
29
|
-
name: 'TempalePreviewModal',
|
|
30
|
-
emits: ['update:openTure'],
|
|
31
|
-
props: {
|
|
32
|
-
currentEditRow: {
|
|
33
|
-
type: Object,
|
|
34
|
-
default() {
|
|
35
|
-
return {}
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
openTure: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
data() {
|
|
44
|
-
return {
|
|
45
|
-
visible: false,
|
|
46
|
-
loading: false,
|
|
47
|
-
remoteJsFilePath: '',
|
|
48
|
-
modelLayout: 'tab',
|
|
49
|
-
// modelLayoutArr: [
|
|
50
|
-
// {
|
|
51
|
-
// key: 'tab',
|
|
52
|
-
// value: this.$srmI18n(`${this.$getLangAccount()}#i18n_dict_WWWxF_69becf2`, 'tab布局'),
|
|
53
|
-
// },
|
|
54
|
-
// {
|
|
55
|
-
// key: 'collapse',
|
|
56
|
-
// value: this.$srmI18n(`${this.$getLangAccount()}#i18n_dict_qNs_1475877`, '可折叠'),
|
|
57
|
-
// },
|
|
58
|
-
// {
|
|
59
|
-
// key: 'unCollapse',
|
|
60
|
-
// value: this.$srmI18n(`${this.$getLangAccount()}#i18n_dict_xqNs_24c2334a`, '不可折叠'),
|
|
61
|
-
// },
|
|
62
|
-
// {
|
|
63
|
-
// key: 'masterSlave',
|
|
64
|
-
// value: this.$srmI18n(`${this.$getLangAccount()}#i18n_menu_dNmK_24c49586`, '主从格式'),
|
|
65
|
-
// },
|
|
66
|
-
// ],
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
mixins: [],
|
|
70
|
-
components: {
|
|
71
|
-
// BusinessLayout,
|
|
72
|
-
// fieldSelectModal,
|
|
73
|
-
},
|
|
74
|
-
methods: {
|
|
75
|
-
// close() {
|
|
76
|
-
// this.visible = false
|
|
77
|
-
// },
|
|
78
|
-
// open(data) {
|
|
79
|
-
// this.remoteJsFilePath = data.url
|
|
80
|
-
// this.visible = true
|
|
81
|
-
// },
|
|
82
|
-
},
|
|
83
|
-
watch: {
|
|
84
|
-
openTure(nw) {
|
|
85
|
-
this.visible = nw
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
})
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<style lang="less" scoped>
|
|
92
|
-
.tempale-preview-modal {
|
|
93
|
-
:deep(.page-container .edit-page .ant-spin-nested-loading) {
|
|
94
|
-
height: 600px;
|
|
95
|
-
}
|
|
96
|
-
:deep(.ant-form-item-control-wrapper) {
|
|
97
|
-
width: 150px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
</style>
|