zant-admin 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +36 -0
- package/README.md +248 -0
- package/SCAFFOLD_README.md +215 -0
- package/bin/cli.js +99 -0
- package/bin/generator.js +503 -0
- package/bin/prompts.js +159 -0
- package/bin/utils.js +134 -0
- package/package.json +74 -0
- package/public/logo.png +0 -0
- package/src/App.vue +16 -0
- package/src/api/methods/logError.js +8 -0
- package/src/api/methods/logOperation.js +8 -0
- package/src/api/methods/login.js +6 -0
- package/src/api/methods/quartz.js +36 -0
- package/src/api/methods/region.js +16 -0
- package/src/api/methods/sysAccount.js +30 -0
- package/src/api/methods/sysDict.js +29 -0
- package/src/api/methods/sysDictItem.js +26 -0
- package/src/api/methods/sysMenu.js +42 -0
- package/src/api/methods/sysRole.js +35 -0
- package/src/api/methods/sysUser.js +25 -0
- package/src/api/methods/system.js +16 -0
- package/src/api/request.js +225 -0
- package/src/assets/css/style.css +70 -0
- package/src/assets/css/zcui.css +340 -0
- package/src/assets/imgs/loginbackground.svg +69 -0
- package/src/assets/imgs/logo.png +0 -0
- package/src/assets/imgs/md/1.png +0 -0
- package/src/assets/imgs/md/10.png +0 -0
- package/src/assets/imgs/md/11.png +0 -0
- package/src/assets/imgs/md/2.png +0 -0
- package/src/assets/imgs/md/3.png +0 -0
- package/src/assets/imgs/md/4.png +0 -0
- package/src/assets/imgs/md/5.png +0 -0
- package/src/assets/imgs/md/6.png +0 -0
- package/src/assets/imgs/md/7.png +0 -0
- package/src/assets/imgs/md/8.png +0 -0
- package/src/assets/imgs/md/9.png +0 -0
- package/src/components/FormTable.vue +875 -0
- package/src/components/IconPicker.vue +344 -0
- package/src/components/MainPage.vue +957 -0
- package/src/components/details/logErrorDetails.vue +58 -0
- package/src/components/details/logOperationDetails.vue +76 -0
- package/src/components/edit/QuartzEdit.vue +221 -0
- package/src/components/edit/SysAccountEdit.vue +178 -0
- package/src/components/edit/SysDictEdit.vue +114 -0
- package/src/components/edit/SysDictItemEdit.vue +134 -0
- package/src/components/edit/SysRoleEdit.vue +109 -0
- package/src/components/edit/sysMenuEdit.vue +305 -0
- package/src/config/index.js +74 -0
- package/src/directives/permission.js +45 -0
- package/src/main.js +38 -0
- package/src/router/index.js +270 -0
- package/src/stores/config.js +37 -0
- package/src/stores/dict.js +33 -0
- package/src/stores/menu.js +57 -0
- package/src/stores/user.js +21 -0
- package/src/utils/baseEcharts.js +661 -0
- package/src/utils/dictTemplate.js +26 -0
- package/src/utils/regionUtils.js +169 -0
- package/src/utils/useFormCRUD.js +60 -0
- package/src/views/baiscstatis/center.vue +463 -0
- package/src/views/baiscstatis/iframePage.vue +31 -0
- package/src/views/baiscstatis/notFound.vue +192 -0
- package/src/views/console.vue +771 -0
- package/src/views/demo/importexport.vue +123 -0
- package/src/views/demo/region.vue +240 -0
- package/src/views/demo/statistics.vue +195 -0
- package/src/views/home.vue +7 -0
- package/src/views/login.vue +272 -0
- package/src/views/operations/log/logError.vue +78 -0
- package/src/views/operations/log/logLogin.vue +66 -0
- package/src/views/operations/log/logOperation.vue +103 -0
- package/src/views/operations/log/logQuartz.vue +57 -0
- package/src/views/operations/quartz.vue +181 -0
- package/src/views/operations/serviceMonitoring.vue +134 -0
- package/src/views/system/sysAccount.vue +123 -0
- package/src/views/system/sysDict.vue +156 -0
- package/src/views/system/sysDictItem.vue +118 -0
- package/src/views/system/sysMenu.vue +223 -0
- package/src/views/system/sysRole.vue +184 -0
- package/templates/env.production +2 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app">
|
|
3
|
+
<div class="demo-login">
|
|
4
|
+
<div class="tel flex-row">
|
|
5
|
+
<img src="@/assets/imgs/logo.png" alt="" width="50px" />ZAntAdmin
|
|
6
|
+
</div>
|
|
7
|
+
<a-tabs v-model:activeKey="activeKey" centered tabBarGutter="10">
|
|
8
|
+
<a-tab-pane key="1" tab="密码登录">
|
|
9
|
+
<a-form
|
|
10
|
+
:model="formState"
|
|
11
|
+
name="normal_login"
|
|
12
|
+
class="login-form"
|
|
13
|
+
@finish="onFinish"
|
|
14
|
+
@finishFailed="onFinishFailed"
|
|
15
|
+
>
|
|
16
|
+
<a-form-item
|
|
17
|
+
name="mobile"
|
|
18
|
+
:rules="[{ required: true, message: '手机号码不能为空!' }]"
|
|
19
|
+
>
|
|
20
|
+
<a-input
|
|
21
|
+
v-model:value="formState.mobile"
|
|
22
|
+
placeholder="请输入手机号码"
|
|
23
|
+
size="large"
|
|
24
|
+
>
|
|
25
|
+
<template #prefix>
|
|
26
|
+
<MobileOutlined class="site-form-item-icon" />
|
|
27
|
+
</template>
|
|
28
|
+
</a-input>
|
|
29
|
+
</a-form-item>
|
|
30
|
+
<a-form-item
|
|
31
|
+
name="password"
|
|
32
|
+
:rules="[{ required: true, message: '密码不能为空!' }]"
|
|
33
|
+
>
|
|
34
|
+
<a-input-password
|
|
35
|
+
v-model:value="formState.password"
|
|
36
|
+
placeholder="请输入密码"
|
|
37
|
+
size="large"
|
|
38
|
+
>
|
|
39
|
+
<template #prefix>
|
|
40
|
+
<LockOutlined class="site-form-item-icon" />
|
|
41
|
+
</template>
|
|
42
|
+
</a-input-password>
|
|
43
|
+
</a-form-item>
|
|
44
|
+
<a-form-item>
|
|
45
|
+
<a-form-item name="remember" no-style>
|
|
46
|
+
<a-checkbox v-model:checked="formState.remember"
|
|
47
|
+
>自动登录</a-checkbox
|
|
48
|
+
>
|
|
49
|
+
</a-form-item>
|
|
50
|
+
<a class="login-form-forgot" href="">忘记密码</a>
|
|
51
|
+
</a-form-item>
|
|
52
|
+
|
|
53
|
+
<a-form-item>
|
|
54
|
+
<a-button
|
|
55
|
+
:disabled="disabled"
|
|
56
|
+
type="primary"
|
|
57
|
+
:loading="loading"
|
|
58
|
+
html-type="submit"
|
|
59
|
+
size="large"
|
|
60
|
+
class="login-form-button"
|
|
61
|
+
>
|
|
62
|
+
登录
|
|
63
|
+
</a-button>
|
|
64
|
+
</a-form-item>
|
|
65
|
+
</a-form>
|
|
66
|
+
</a-tab-pane>
|
|
67
|
+
<a-tab-pane key="2" tab="验证码登录" force-render>
|
|
68
|
+
<a-form
|
|
69
|
+
:model="formState"
|
|
70
|
+
name="normal_login"
|
|
71
|
+
class="login-form"
|
|
72
|
+
@finish="onFinish"
|
|
73
|
+
@finishFailed="onFinishFailed"
|
|
74
|
+
>
|
|
75
|
+
<a-form-item
|
|
76
|
+
name="mobile"
|
|
77
|
+
:rules="[{ required: true, message: '手机号码不能为空!' }]"
|
|
78
|
+
>
|
|
79
|
+
<a-input
|
|
80
|
+
v-model:value="formState.mobile"
|
|
81
|
+
placeholder="请输入手机号码"
|
|
82
|
+
size="large"
|
|
83
|
+
>
|
|
84
|
+
<template #prefix>
|
|
85
|
+
<MobileOutlined class="site-form-item-icon" />
|
|
86
|
+
</template>
|
|
87
|
+
</a-input>
|
|
88
|
+
</a-form-item>
|
|
89
|
+
<a-row :gutter="16">
|
|
90
|
+
<a-col :span="16">
|
|
91
|
+
<a-form-item
|
|
92
|
+
name="mobile"
|
|
93
|
+
:rules="[{ required: true, message: '验证码不能为空!' }]"
|
|
94
|
+
>
|
|
95
|
+
<a-input
|
|
96
|
+
v-model:value="formState.vercode"
|
|
97
|
+
placeholder="请输入验证码"
|
|
98
|
+
size="large"
|
|
99
|
+
>
|
|
100
|
+
<template #prefix>
|
|
101
|
+
<LockOutlined class="site-form-item-icon" />
|
|
102
|
+
</template>
|
|
103
|
+
</a-input>
|
|
104
|
+
</a-form-item>
|
|
105
|
+
</a-col>
|
|
106
|
+
<a-col :span="8">
|
|
107
|
+
<a-button
|
|
108
|
+
size="large"
|
|
109
|
+
class="login-form-button"
|
|
110
|
+
@click="sendSmsCode"
|
|
111
|
+
:disabled="smsdisabled"
|
|
112
|
+
>
|
|
113
|
+
{{ smstext }}
|
|
114
|
+
</a-button>
|
|
115
|
+
</a-col>
|
|
116
|
+
</a-row>
|
|
117
|
+
<a-form-item>
|
|
118
|
+
<a-form-item name="remember" no-style>
|
|
119
|
+
<a-checkbox v-model:checked="formState.remember"
|
|
120
|
+
>自动登录</a-checkbox
|
|
121
|
+
>
|
|
122
|
+
</a-form-item>
|
|
123
|
+
<a class="login-form-forgot" href="">忘记密码</a>
|
|
124
|
+
</a-form-item>
|
|
125
|
+
<a-form-item>
|
|
126
|
+
<a-button
|
|
127
|
+
:disabled="disabled"
|
|
128
|
+
type="primary"
|
|
129
|
+
:loading="loading"
|
|
130
|
+
html-type="submit"
|
|
131
|
+
size="large"
|
|
132
|
+
class="login-form-button"
|
|
133
|
+
>
|
|
134
|
+
登录
|
|
135
|
+
</a-button>
|
|
136
|
+
</a-form-item>
|
|
137
|
+
</a-form>
|
|
138
|
+
</a-tab-pane>
|
|
139
|
+
</a-tabs>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="footer">Copyright © 2025 *********</div>
|
|
142
|
+
</div>
|
|
143
|
+
</template>
|
|
144
|
+
<script setup>
|
|
145
|
+
import { login } from '@/api/methods/login'
|
|
146
|
+
import sysUser from '@/api/methods/sysUser'
|
|
147
|
+
import router, { refreshRoutes } from '@/router'
|
|
148
|
+
import { useUserStore } from '@/stores/user'
|
|
149
|
+
import { reactive, computed, ref } from 'vue'
|
|
150
|
+
import { message } from 'ant-design-vue'
|
|
151
|
+
const formState = reactive({
|
|
152
|
+
mobile: '123456',
|
|
153
|
+
password: '123456',
|
|
154
|
+
remember: true,
|
|
155
|
+
vercode: '',
|
|
156
|
+
})
|
|
157
|
+
const loading = ref(false)
|
|
158
|
+
const user = useUserStore()
|
|
159
|
+
const activeKey = ref('1')
|
|
160
|
+
//登录
|
|
161
|
+
const onFinish = values => {
|
|
162
|
+
loading.value = true
|
|
163
|
+
|
|
164
|
+
let data = {
|
|
165
|
+
mobile: values.mobile,
|
|
166
|
+
password: values.password,
|
|
167
|
+
loginType: 0,
|
|
168
|
+
vercode: '',
|
|
169
|
+
}
|
|
170
|
+
login(data)
|
|
171
|
+
.then(async res => {
|
|
172
|
+
loading.value = false
|
|
173
|
+
user.token = res.data.token
|
|
174
|
+
user.userInfo = res.data
|
|
175
|
+
message.success('登录成功')
|
|
176
|
+
// 重置路由状态并重新加载动态路由
|
|
177
|
+
try {
|
|
178
|
+
await refreshRoutes()
|
|
179
|
+
router.push('/console')
|
|
180
|
+
} catch (error) {
|
|
181
|
+
console.error('路由加载失败:', error)
|
|
182
|
+
// 即使路由加载失败,也跳转到控制台,路由守卫会处理后续逻辑
|
|
183
|
+
router.push('/console')
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
.catch(err => {
|
|
187
|
+
loading.value = false
|
|
188
|
+
})
|
|
189
|
+
}
|
|
190
|
+
const disabled = computed(() => {
|
|
191
|
+
console.log(activeKey.value)
|
|
192
|
+
if (activeKey.value == '1') {
|
|
193
|
+
return !(formState.mobile && formState.password)
|
|
194
|
+
} else {
|
|
195
|
+
return !(formState.mobile && formState.vercode)
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
const smstext = ref('获取验证码')
|
|
199
|
+
const smsdisabled = ref(false)
|
|
200
|
+
let countdownTimer
|
|
201
|
+
//发送验证码
|
|
202
|
+
const sendSmsCode = () => {
|
|
203
|
+
if (formState.mobile == '') {
|
|
204
|
+
message.error('请输入手机号码')
|
|
205
|
+
return
|
|
206
|
+
}
|
|
207
|
+
sysUser.sendCode({ mobile: formState.mobile }).then(res => {
|
|
208
|
+
message.success('验证码已发送')
|
|
209
|
+
smsdisabled.value = true
|
|
210
|
+
smstext.value = '60s后可重发'
|
|
211
|
+
let count = 60
|
|
212
|
+
countdownTimer = setInterval(() => {
|
|
213
|
+
count--
|
|
214
|
+
smstext.value = `${count}s后可重发`
|
|
215
|
+
if (count === 0) {
|
|
216
|
+
clearInterval(countdownTimer)
|
|
217
|
+
smsdisabled.value = false
|
|
218
|
+
smstext.value = '获取验证码'
|
|
219
|
+
}
|
|
220
|
+
}, 1000)
|
|
221
|
+
})
|
|
222
|
+
}
|
|
223
|
+
</script>
|
|
224
|
+
<style scoped>
|
|
225
|
+
.app {
|
|
226
|
+
height: 100vh !important;
|
|
227
|
+
display: flex !important;
|
|
228
|
+
align-items: center !important;
|
|
229
|
+
background-image: url(../assets/imgs/loginbackground.svg);
|
|
230
|
+
background-size: 100% 100%;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.demo-login {
|
|
234
|
+
width: 400px !important;
|
|
235
|
+
height: auto;
|
|
236
|
+
margin: 0 auto;
|
|
237
|
+
background-color: rgba(255, 255, 255, 1);
|
|
238
|
+
padding: 30px;
|
|
239
|
+
border-radius: 20px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.demo-auto-login {
|
|
243
|
+
margin-bottom: 60px;
|
|
244
|
+
text-align: left;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.demo-auto-login a {
|
|
248
|
+
float: right;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.tel {
|
|
252
|
+
font-size: 30px;
|
|
253
|
+
text-align: center;
|
|
254
|
+
padding: 20px;
|
|
255
|
+
color: rgb(0, 0, 0);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.login-form-forgot {
|
|
259
|
+
float: right;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.login-form-button {
|
|
263
|
+
width: 100%;
|
|
264
|
+
}
|
|
265
|
+
.footer {
|
|
266
|
+
position: fixed;
|
|
267
|
+
bottom: 20px;
|
|
268
|
+
left: 0;
|
|
269
|
+
right: 0;
|
|
270
|
+
text-align: center;
|
|
271
|
+
}
|
|
272
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form-table
|
|
3
|
+
:formState="formState"
|
|
4
|
+
:columns="columns"
|
|
5
|
+
modulePath="LogError"
|
|
6
|
+
:rowSelect="false"
|
|
7
|
+
:permissionModulePath="permissionModulePath"
|
|
8
|
+
@details="details"
|
|
9
|
+
>
|
|
10
|
+
</form-table>
|
|
11
|
+
<!-- 详情 -->
|
|
12
|
+
<LogErrorDetails
|
|
13
|
+
:open="detailsopen"
|
|
14
|
+
:info="info"
|
|
15
|
+
@close="detailsopen = false"
|
|
16
|
+
>
|
|
17
|
+
</LogErrorDetails>
|
|
18
|
+
</template>
|
|
19
|
+
<script setup>
|
|
20
|
+
import { ref } from 'vue'
|
|
21
|
+
import FormTable from '@/components/FormTable.vue'
|
|
22
|
+
import logError from '@/api/methods/logError'
|
|
23
|
+
import LogErrorDetails from '@/components/details/logErrorDetails.vue'
|
|
24
|
+
// 权限模块路径
|
|
25
|
+
const permissionModulePath = ref('operations:log:logError')
|
|
26
|
+
const formState = ref({
|
|
27
|
+
actionName: { label: '方法', value: '', type: 'text' },
|
|
28
|
+
code: { label: '异常码', value: '', type: 'text' },
|
|
29
|
+
createTime: { label: '日期范围', value: '', type: 'time' },
|
|
30
|
+
})
|
|
31
|
+
const columns = ref([
|
|
32
|
+
{
|
|
33
|
+
title: '序号',
|
|
34
|
+
key: 'num',
|
|
35
|
+
width: 80,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: '方法',
|
|
39
|
+
dataIndex: 'actionName',
|
|
40
|
+
ellipsis: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: '异常码',
|
|
44
|
+
dataIndex: 'code',
|
|
45
|
+
width: 100,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: '异常内容',
|
|
49
|
+
dataIndex: 'message',
|
|
50
|
+
ellipsis: true,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
{
|
|
54
|
+
title: '创建时间',
|
|
55
|
+
dataIndex: 'createTime',
|
|
56
|
+
width: 200,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: '操作',
|
|
60
|
+
key: 'operation',
|
|
61
|
+
fixed: 'right',
|
|
62
|
+
width: 100,
|
|
63
|
+
},
|
|
64
|
+
])
|
|
65
|
+
//详情
|
|
66
|
+
const detailsopen = ref(false)
|
|
67
|
+
const info = ref({})
|
|
68
|
+
const details = record => {
|
|
69
|
+
logError.detail({ id: record.id }).then(res => {
|
|
70
|
+
info.value = res.data
|
|
71
|
+
detailsopen.value = true
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
const detailsHandleCancel = () => {
|
|
75
|
+
detailsopen.value = false
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
<style></style>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form-table
|
|
3
|
+
:formState="formState"
|
|
4
|
+
:columns="columns"
|
|
5
|
+
modulePath="LogLogin"
|
|
6
|
+
:rowSelect="false"
|
|
7
|
+
>
|
|
8
|
+
<!-- 可以通过插槽自定义单元格 -->
|
|
9
|
+
<template #custom-status="{ record }">
|
|
10
|
+
<span
|
|
11
|
+
v-html="dictTemplate.tabletempbool('loginlog_status', record.status)"
|
|
12
|
+
></span>
|
|
13
|
+
</template>
|
|
14
|
+
</form-table>
|
|
15
|
+
</template>
|
|
16
|
+
<script setup>
|
|
17
|
+
import { ref } from 'vue'
|
|
18
|
+
import FormTable from '@/components/FormTable.vue'
|
|
19
|
+
import dictTemplate from '@/utils/dictTemplate'
|
|
20
|
+
const formState = ref({
|
|
21
|
+
userName: { label: '用户名称', value: '', type: 'text' },
|
|
22
|
+
createTime: { label: '日期范围', value: '', type: 'time' },
|
|
23
|
+
})
|
|
24
|
+
const columns = ref([
|
|
25
|
+
{
|
|
26
|
+
title: '序号',
|
|
27
|
+
key: 'num',
|
|
28
|
+
width: 80,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: '用户名称',
|
|
32
|
+
dataIndex: 'userName',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: '登录ip',
|
|
36
|
+
dataIndex: 'loginIp',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: '登录地点',
|
|
40
|
+
dataIndex: 'loginLocation',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: '浏览器',
|
|
44
|
+
dataIndex: 'browser',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: '操作系统',
|
|
48
|
+
dataIndex: 'operatingSystem',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: '状态',
|
|
52
|
+
key: 'status',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: '备注',
|
|
56
|
+
dataIndex: 'remark',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: '创建时间',
|
|
60
|
+
dataIndex: 'createTime',
|
|
61
|
+
width: 200,
|
|
62
|
+
},
|
|
63
|
+
])
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style></style>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form-table
|
|
3
|
+
:formState="formState"
|
|
4
|
+
:columns="columns"
|
|
5
|
+
modulePath="LogOperation"
|
|
6
|
+
:permissionModulePath="permissionModulePath"
|
|
7
|
+
:rowSelect="false"
|
|
8
|
+
@details="details"
|
|
9
|
+
>
|
|
10
|
+
</form-table>
|
|
11
|
+
<!-- 详情 -->
|
|
12
|
+
<LogOperationDetails
|
|
13
|
+
:open="detailsopen"
|
|
14
|
+
:info="info"
|
|
15
|
+
@close="detailsopen = false"
|
|
16
|
+
>
|
|
17
|
+
</LogOperationDetails>
|
|
18
|
+
</template>
|
|
19
|
+
<script setup>
|
|
20
|
+
import { ref } from 'vue'
|
|
21
|
+
import FormTable from '@/components/FormTable.vue'
|
|
22
|
+
import LogOperationDetails from '@/components/details/logOperationDetails.vue'
|
|
23
|
+
import logOperation from '@/api/methods/logOperation'
|
|
24
|
+
// 权限模块路径
|
|
25
|
+
const permissionModulePath = ref('operations:log:logOperation')
|
|
26
|
+
const formState = ref({
|
|
27
|
+
controllerName: { label: '控制器名称', value: '', type: 'text' },
|
|
28
|
+
operationMethod: { label: '操作方法', value: '', type: 'text' },
|
|
29
|
+
operationPersonnel: { label: '操作人员', value: '', type: 'text' },
|
|
30
|
+
createTime: { label: '日期范围', value: '', type: 'time' },
|
|
31
|
+
})
|
|
32
|
+
const columns = ref([
|
|
33
|
+
{
|
|
34
|
+
title: '序号',
|
|
35
|
+
key: 'num',
|
|
36
|
+
width: 80,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: '控制器名称',
|
|
40
|
+
dataIndex: 'controllerName',
|
|
41
|
+
width: 200,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: '操作方法',
|
|
45
|
+
dataIndex: 'operationMethod',
|
|
46
|
+
width: 200,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: '请求地址',
|
|
50
|
+
dataIndex: 'requestAddress',
|
|
51
|
+
ellipsis: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: '请求方式',
|
|
55
|
+
dataIndex: 'requestMethod',
|
|
56
|
+
width: 100,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: '请求Ip',
|
|
60
|
+
dataIndex: 'operationIp',
|
|
61
|
+
width: 120,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: '请求端源',
|
|
65
|
+
dataIndex: 'requestFrom',
|
|
66
|
+
width: 100,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: 'UserAgent',
|
|
70
|
+
dataIndex: 'userAgent',
|
|
71
|
+
ellipsis: true,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: '操作人员',
|
|
75
|
+
dataIndex: 'operationPersonnel',
|
|
76
|
+
width: 100,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: '创建时间',
|
|
80
|
+
dataIndex: 'createTime',
|
|
81
|
+
width: 200,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: '操作',
|
|
85
|
+
key: 'operation',
|
|
86
|
+
fixed: 'right',
|
|
87
|
+
width: 100,
|
|
88
|
+
},
|
|
89
|
+
])
|
|
90
|
+
//详情
|
|
91
|
+
const detailsopen = ref(false)
|
|
92
|
+
const info = ref({})
|
|
93
|
+
const details = record => {
|
|
94
|
+
logOperation.detail({ id: record.id }).then(res => {
|
|
95
|
+
info.value = res.data
|
|
96
|
+
detailsopen.value = true
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
const detailsHandleCancel = () => {
|
|
100
|
+
detailsopen.value = false
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
<style></style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form-table
|
|
3
|
+
:where="recordwhere"
|
|
4
|
+
:columns="columns"
|
|
5
|
+
modulePath="quartz"
|
|
6
|
+
pageAction="logPage"
|
|
7
|
+
:rowSelect="false"
|
|
8
|
+
>
|
|
9
|
+
<template #custom-status="{ record }">
|
|
10
|
+
<span class="text-color-success" v-if="record.status">成功</span>
|
|
11
|
+
<span class="text-color-error" v-else>失败</span>
|
|
12
|
+
</template>
|
|
13
|
+
</form-table>
|
|
14
|
+
</template>
|
|
15
|
+
<script setup>
|
|
16
|
+
import { ref } from 'vue'
|
|
17
|
+
import FormTable from '@/components/FormTable.vue'
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
recordwhere: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: {},
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
const columns = ref([
|
|
25
|
+
{
|
|
26
|
+
title: '序号',
|
|
27
|
+
key: 'num',
|
|
28
|
+
width: 60,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: '开始时间',
|
|
32
|
+
dataIndex: 'beginDate',
|
|
33
|
+
width: 160,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: '结束时间',
|
|
37
|
+
dataIndex: 'endDate',
|
|
38
|
+
width: 160,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: '状态',
|
|
42
|
+
key: 'status',
|
|
43
|
+
width: 100,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: '消息',
|
|
47
|
+
dataIndex: 'result',
|
|
48
|
+
width: 100,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: '异常',
|
|
52
|
+
dataIndex: 'error',
|
|
53
|
+
|
|
54
|
+
},
|
|
55
|
+
])
|
|
56
|
+
</script>
|
|
57
|
+
<style></style>
|