更新
This commit is contained in:
parent
8b26f79651
commit
21838e24d1
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,3 +19,5 @@ yarn-error.log*
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw*
|
*.sw*
|
||||||
|
/public/index.html
|
||||||
|
/package-lock.json
|
||||||
|
14195
package-lock.json
generated
14195
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,7 @@
|
|||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"babel-eslint": "^8.0.1",
|
"babel-eslint": "^8.0.1",
|
||||||
"babel-plugin-component": "^1.1.1",
|
"babel-plugin-component": "^1.1.1",
|
||||||
"code-brick-zj": "0.0.4",
|
"code-brick-zj": "0.0.7",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
"echarts": "^5.3.3",
|
"echarts": "^5.3.3",
|
||||||
"element-theme": "^2.0.1",
|
"element-theme": "^2.0.1",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-22 14:57:50
|
* @Date: 2022-08-22 14:57:50
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-01-31 09:41:18
|
* @LastEditTime: 2023-05-12 13:29:06
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<!-- 开发环境 -->
|
<!-- 开发环境 -->
|
||||||
<% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
|
<% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
|
||||||
<script>
|
<script>
|
||||||
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.23:8080';
|
window.SITE_CONFIG['apiURL'] = 'http://demo.open.renren.io/renren-security-server/';
|
||||||
</script>
|
</script>
|
||||||
<% } %>
|
<% } %>
|
||||||
<!-- 集成测试环境 -->
|
<!-- 集成测试环境 -->
|
||||||
|
@ -390,7 +390,7 @@ img {
|
|||||||
}
|
}
|
||||||
.aui-navbar__icon-menu {
|
.aui-navbar__icon-menu {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
font-size: 16px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
.el-dropdown {
|
.el-dropdown {
|
||||||
color: $--color-text-secondary;
|
color: $--color-text-secondary;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Date: 2020-12-29 16:49:28
|
* @Date: 2020-12-29 16:49:28
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-01-05 15:49:17
|
* @LastEditTime: 2023-05-12 12:39:26
|
||||||
* @FilePath: \basic-admin\src\filters\basicData\index.js
|
* @FilePath: \basic-admin\src\filters\basicData\index.js
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -29,6 +29,10 @@ const table = {
|
|||||||
'0': i18n.t('logLogin.status0'),
|
'0': i18n.t('logLogin.status0'),
|
||||||
'1': i18n.t('logLogin.status1')
|
'1': i18n.t('logLogin.status1')
|
||||||
},
|
},
|
||||||
|
scheduleStatus: {
|
||||||
|
'0': i18n.t('schedule.status0'),
|
||||||
|
'1': i18n.t('schedule.status1')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function(dictTable) {
|
export default function(dictTable) {
|
||||||
|
267
src/i18n/en.js
Normal file
267
src/i18n/en.js
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
import module from './en'
|
||||||
|
const t = {}
|
||||||
|
|
||||||
|
t.module = module
|
||||||
|
|
||||||
|
t.loading = 'loading...'
|
||||||
|
|
||||||
|
t.brand = {}
|
||||||
|
t.brand.lg = 'SPC'
|
||||||
|
t.brand.mini = 'spc'
|
||||||
|
|
||||||
|
t.public = {}
|
||||||
|
t.public.operation = 'operation'
|
||||||
|
|
||||||
|
t.add = 'add'
|
||||||
|
t.delete = 'delete'
|
||||||
|
t.deleteBatch = 'deleteBatch'
|
||||||
|
t.update = 'update'
|
||||||
|
t.query = 'query'
|
||||||
|
t.export = 'export'
|
||||||
|
t.handle = 'handle'
|
||||||
|
t.confirm = 'confirm'
|
||||||
|
t.cancel = 'cancel'
|
||||||
|
t.clear = 'clear'
|
||||||
|
t.logout = 'logout'
|
||||||
|
t.manage = 'manage'
|
||||||
|
t.createDate = 'createDate'
|
||||||
|
t.keyword = 'keyword:'
|
||||||
|
t.choose = 'choose'
|
||||||
|
|
||||||
|
t.prompt = {}
|
||||||
|
t.prompt.title = 'Tips'
|
||||||
|
t.prompt.info = '确定进行[{handle}]操作?'
|
||||||
|
t.prompt.success = 'Operation succeeded'
|
||||||
|
t.prompt.failed = 'Operation failed'
|
||||||
|
t.prompt.deleteBatch = 'Please select delete item'
|
||||||
|
|
||||||
|
t.validate = {}
|
||||||
|
t.validate.required = 'required'
|
||||||
|
t.validate.format = '{attr}Format error'
|
||||||
|
|
||||||
|
t.upload = {}
|
||||||
|
t.upload.text = '将文件拖到此处,或<em>点击上传</em>'
|
||||||
|
t.upload.tip = '只支持{format}格式文件!'
|
||||||
|
t.upload.button = 'upload'
|
||||||
|
|
||||||
|
t.datePicker = {}
|
||||||
|
t.datePicker.range = 'range'
|
||||||
|
t.datePicker.start = 'start'
|
||||||
|
t.datePicker.end = 'end'
|
||||||
|
|
||||||
|
t.fullscreen = {}
|
||||||
|
t.fullscreen.prompt = 'Your browser does not support this operation'
|
||||||
|
|
||||||
|
t.updatePassword = {}
|
||||||
|
t.updatePassword.title = 'Change Password'
|
||||||
|
t.updatePassword.username = 'account number'
|
||||||
|
t.updatePassword.password = 'Original password'
|
||||||
|
t.updatePassword.newPassword = 'New password'
|
||||||
|
t.updatePassword.confirmPassword = 'Confirm Password'
|
||||||
|
t.updatePassword.validate = {}
|
||||||
|
t.updatePassword.validate.confirmPassword = 'The confirmed password is inconsistent with the new password'
|
||||||
|
|
||||||
|
t.contentTabs = {}
|
||||||
|
t.contentTabs.closeCurrent = 'close Current Page'
|
||||||
|
t.contentTabs.closeOther = 'close Other Page'
|
||||||
|
t.contentTabs.closeAll = 'close All'
|
||||||
|
|
||||||
|
/* 页面 */
|
||||||
|
t.notFound = {}
|
||||||
|
t.notFound.desc = '抱歉!您访问的页面<em>失联</em>啦...'
|
||||||
|
t.notFound.back = 'back'
|
||||||
|
t.notFound.home = 'home'
|
||||||
|
|
||||||
|
t.login = {}
|
||||||
|
t.login.title = 'login'
|
||||||
|
t.login.username = 'username'
|
||||||
|
t.login.password = 'password'
|
||||||
|
t.login.captcha = 'captcha'
|
||||||
|
t.login.demo = 'demo'
|
||||||
|
t.login.copyright = '中建材智能自动化研究院'
|
||||||
|
|
||||||
|
t.schedule = {}
|
||||||
|
t.schedule.beanName = 'bean名称'
|
||||||
|
t.schedule.beanNameTips = 'spring bean名称, 如: testTask'
|
||||||
|
t.schedule.pauseBatch = 'pause'
|
||||||
|
t.schedule.resumeBatch = 'resume'
|
||||||
|
t.schedule.runBatch = 'run'
|
||||||
|
t.schedule.log = 'log'
|
||||||
|
t.schedule.params = 'params'
|
||||||
|
t.schedule.cronExpression = 'cron表达式'
|
||||||
|
t.schedule.cronExpressionTips = '如: 0 0 12 * * ?'
|
||||||
|
t.schedule.remark = 'remark'
|
||||||
|
t.schedule.status = 'status'
|
||||||
|
t.schedule.status0 = 'pause'
|
||||||
|
t.schedule.status1 = 'normal'
|
||||||
|
t.schedule.statusLog0 = 'fail'
|
||||||
|
t.schedule.statusLog1 = 'success'
|
||||||
|
t.schedule.pause = 'pause'
|
||||||
|
t.schedule.resume = 'resume'
|
||||||
|
t.schedule.run = 'run'
|
||||||
|
t.schedule.jobId = '任务ID'
|
||||||
|
t.schedule.times = 'times(单位: 毫秒)'
|
||||||
|
t.schedule.createDate = 'create Date'
|
||||||
|
|
||||||
|
t.oss = {}
|
||||||
|
t.oss.config = 'Cloud storage configuration'
|
||||||
|
t.oss.upload = 'upload'
|
||||||
|
t.oss.url = 'URL'
|
||||||
|
t.oss.createDate = 'create Date'
|
||||||
|
t.oss.type = 'type'
|
||||||
|
t.oss.type1 = '七牛'
|
||||||
|
t.oss.type2 = '阿里云'
|
||||||
|
t.oss.type3 = '腾讯云'
|
||||||
|
t.oss.qiniuDomain = '域名'
|
||||||
|
t.oss.qiniuDomainTips = '七牛绑定的域名'
|
||||||
|
t.oss.qiniuPrefix = '路径前缀'
|
||||||
|
t.oss.qiniuPrefixTips = '不设置默认为空'
|
||||||
|
t.oss.qiniuAccessKey = 'AccessKey'
|
||||||
|
t.oss.qiniuAccessKeyTips = '七牛AccessKey'
|
||||||
|
t.oss.qiniuSecretKey = 'SecretKey'
|
||||||
|
t.oss.qiniuSecretKeyTips = '七牛SecretKey'
|
||||||
|
t.oss.qiniuBucketName = '空间名'
|
||||||
|
t.oss.qiniuBucketNameTips = '七牛存储空间名'
|
||||||
|
t.oss.aliyunDomain = '域名'
|
||||||
|
t.oss.aliyunDomainTips = '阿里云绑定的域名,如:http://cdn.renren.io'
|
||||||
|
t.oss.aliyunPrefix = '路径前缀'
|
||||||
|
t.oss.aliyunPrefixTips = '不设置默认为空'
|
||||||
|
t.oss.aliyunEndPoint = 'EndPoint'
|
||||||
|
t.oss.aliyunEndPointTips = '阿里云EndPoint'
|
||||||
|
t.oss.aliyunAccessKeyId = 'AccessKeyId'
|
||||||
|
t.oss.aliyunAccessKeyIdTips = '阿里云AccessKeyId'
|
||||||
|
t.oss.aliyunAccessKeySecret = 'AccessKeySecret'
|
||||||
|
t.oss.aliyunAccessKeySecretTips = '阿里云AccessKeySecret'
|
||||||
|
t.oss.aliyunBucketName = 'BucketName'
|
||||||
|
t.oss.aliyunBucketNameTips = '阿里云BucketName'
|
||||||
|
t.oss.qcloudDomain = '域名'
|
||||||
|
t.oss.qcloudDomainTips = '腾讯云绑定的域名'
|
||||||
|
t.oss.qcloudPrefix = '路径前缀'
|
||||||
|
t.oss.qcloudPrefixTips = '不设置默认为空'
|
||||||
|
t.oss.qcloudAppId = 'AppId'
|
||||||
|
t.oss.qcloudAppIdTips = '腾讯云AppId'
|
||||||
|
t.oss.qcloudSecretId = 'SecretId'
|
||||||
|
t.oss.qcloudSecretIdTips = '腾讯云SecretId'
|
||||||
|
t.oss.qcloudSecretKey = 'SecretKey'
|
||||||
|
t.oss.qcloudSecretKeyTips = '腾讯云SecretKey'
|
||||||
|
t.oss.qcloudBucketName = 'BucketName'
|
||||||
|
t.oss.qcloudBucketNameTips = '腾讯云BucketName'
|
||||||
|
t.oss.qcloudRegion = '所属地区'
|
||||||
|
t.oss.qcloudRegionTips = '请选择'
|
||||||
|
t.oss.qcloudRegionBeijing1 = '北京一区(华北)'
|
||||||
|
t.oss.qcloudRegionBeijing = '北京'
|
||||||
|
t.oss.qcloudRegionShanghai = '上海(华东)'
|
||||||
|
t.oss.qcloudRegionGuangzhou = '广州(华南)'
|
||||||
|
t.oss.qcloudRegionChengdu = '成都(西南)'
|
||||||
|
t.oss.qcloudRegionChongqing = '重庆'
|
||||||
|
t.oss.qcloudRegionSingapore = '新加坡'
|
||||||
|
t.oss.qcloudRegionHongkong = '香港'
|
||||||
|
t.oss.qcloudRegionToronto = '多伦多'
|
||||||
|
t.oss.qcloudRegionFrankfurt = '法兰克福'
|
||||||
|
|
||||||
|
t.dept = {}
|
||||||
|
t.dept.name = 'name'
|
||||||
|
t.dept.parentName = 'Superior department'
|
||||||
|
t.dept.sort = 'sort'
|
||||||
|
t.dept.parentNameDefault = 'Primary department'
|
||||||
|
t.dept.chooseerror = 'Please select a department'
|
||||||
|
t.dept.title = 'Please select a department'
|
||||||
|
|
||||||
|
t.dict = {}
|
||||||
|
t.dict.dictName = 'dictName'
|
||||||
|
t.dict.dictType = 'dictType'
|
||||||
|
t.dict.dictLabel = 'dictLabel'
|
||||||
|
t.dict.dictValue = 'dictValue'
|
||||||
|
t.dict.sort = 'sort'
|
||||||
|
t.dict.remark = 'remark'
|
||||||
|
t.dict.createDate = 'create Date'
|
||||||
|
|
||||||
|
t.logError = {}
|
||||||
|
t.logError.requestUri = 'requestURI'
|
||||||
|
t.logError.requestMethod = 'requestMethod'
|
||||||
|
t.logError.requestParams = 'requestParams'
|
||||||
|
t.logError.ip = 'IP'
|
||||||
|
t.logError.userAgent = 'userAgent'
|
||||||
|
t.logError.createDate = 'createDate'
|
||||||
|
t.logError.errorInfo = 'errorInfo'
|
||||||
|
|
||||||
|
t.logLogin = {}
|
||||||
|
t.logLogin.creatorName = 'creatorName'
|
||||||
|
t.logLogin.status = 'status'
|
||||||
|
t.logLogin.status0 = 'fail'
|
||||||
|
t.logLogin.status1 = 'success'
|
||||||
|
t.logLogin.status2 = 'Account locked'
|
||||||
|
t.logLogin.operation = 'operation'
|
||||||
|
t.logLogin.operation0 = 'login'
|
||||||
|
t.logLogin.operation1 = 'loginOut'
|
||||||
|
t.logLogin.ip = 'IP'
|
||||||
|
t.logLogin.userAgent = 'User-Agent'
|
||||||
|
t.logLogin.createDate = 'createDate'
|
||||||
|
|
||||||
|
t.logOperation = {}
|
||||||
|
t.logOperation.status = 'status'
|
||||||
|
t.logOperation.status0 = 'fail'
|
||||||
|
t.logOperation.status1 = 'success'
|
||||||
|
t.logOperation.creatorName = 'creatorName'
|
||||||
|
t.logOperation.operation = 'operation'
|
||||||
|
t.logOperation.requestUri = 'requestURI'
|
||||||
|
t.logOperation.requestMethod = 'requestMethod'
|
||||||
|
t.logOperation.requestParams = 'requestParams'
|
||||||
|
t.logOperation.requestTime = 'requestTime'
|
||||||
|
t.logOperation.ip = 'IP'
|
||||||
|
t.logOperation.userAgent = 'User-Agent'
|
||||||
|
t.logOperation.createDate = 'createDate'
|
||||||
|
|
||||||
|
t.menu = {}
|
||||||
|
t.menu.name = 'name'
|
||||||
|
t.menu.icon = 'icon'
|
||||||
|
t.menu.type = 'type'
|
||||||
|
t.menu.type0 = 'menu'
|
||||||
|
t.menu.type1 = 'button'
|
||||||
|
t.menu.sort = 'sort'
|
||||||
|
t.menu.url = 'url'
|
||||||
|
t.menu.permissions = 'permissions'
|
||||||
|
t.menu.permissionsTips = '多个用逗号分隔,如:sys:menu:save,sys:menu:update'
|
||||||
|
t.menu.parentName = 'parentName'
|
||||||
|
t.menu.parentNameDefault = 'parentNameDefault'
|
||||||
|
t.menu.resource = 'resource'
|
||||||
|
t.menu.resourceUrl = 'resourceUrl'
|
||||||
|
t.menu.resourceMethod = 'resourceMethod'
|
||||||
|
t.menu.resourceAddItem = 'resourceAddItem'
|
||||||
|
|
||||||
|
t.params = {}
|
||||||
|
t.params.paramCode = 'code'
|
||||||
|
t.params.paramValue = 'value'
|
||||||
|
t.params.remark = 'remark'
|
||||||
|
|
||||||
|
t.role = {}
|
||||||
|
t.role.name = 'name'
|
||||||
|
t.role.remark = 'remark'
|
||||||
|
t.role.createDate = 'createDate'
|
||||||
|
t.role.menuList = 'menuList'
|
||||||
|
t.role.deptList = 'deptList'
|
||||||
|
|
||||||
|
t.user = {}
|
||||||
|
t.user.username = 'username'
|
||||||
|
t.user.deptName = 'deptName'
|
||||||
|
t.user.email = 'email'
|
||||||
|
t.user.mobile = 'mobile'
|
||||||
|
t.user.status = 'status'
|
||||||
|
t.user.status0 = 'Deactivate'
|
||||||
|
t.user.status1 = 'Normal'
|
||||||
|
t.user.createDate = 'createDate'
|
||||||
|
t.user.password = 'password'
|
||||||
|
t.user.confirmPassword = 'confirmPassword'
|
||||||
|
t.user.realName = 'realName'
|
||||||
|
t.user.gender = 'gender'
|
||||||
|
t.user.gender0 = 'male'
|
||||||
|
t.user.gender1 = 'female'
|
||||||
|
t.user.gender2 = 'secrecy'
|
||||||
|
t.user.roleIdList = 'Role configuration'
|
||||||
|
t.user.validate = {}
|
||||||
|
t.user.validate.confirmPassword = 'The confirmation password is inconsistent with the password input'
|
||||||
|
t.user.select = 'Select user'
|
||||||
|
t.user.selecterror = 'Please select a record'
|
||||||
|
|
||||||
|
|
||||||
|
export default t
|
14
src/i18n/en/basicData.js
Normal file
14
src/i18n/en/basicData.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-02-28 14:21:52
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-02-28 14:24:19
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'name',
|
||||||
|
code: 'code',
|
||||||
|
status: 'status',
|
||||||
|
createTime: 'create time',
|
||||||
|
}
|
13
src/i18n/en/index.js
Normal file
13
src/i18n/en/index.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* @Author: gtz
|
||||||
|
* @Date: 2021-03-04 16:12:46
|
||||||
|
* @LastEditors: gtz
|
||||||
|
* @LastEditTime: 2021-12-08 14:29:14
|
||||||
|
* @Description: file content
|
||||||
|
*/
|
||||||
|
|
||||||
|
import basicData from './basicData'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
basicData,
|
||||||
|
}
|
@ -1,8 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-05-12 12:37:21
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-05-12 12:40:16
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueI18n from 'vue-i18n'
|
import VueI18n from 'vue-i18n'
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
|
import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
|
||||||
import zhCN from './zh-CN'
|
import zhCN from './zh-CN'
|
||||||
|
import EnLocale from 'element-ui/lib/locale/lang/en'
|
||||||
|
import en from './en'
|
||||||
|
|
||||||
Vue.use(VueI18n)
|
Vue.use(VueI18n)
|
||||||
|
|
||||||
@ -10,8 +19,13 @@ export const messages = {
|
|||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
'_lang': '简体中文',
|
'_lang': '简体中文',
|
||||||
...zhCN,
|
...zhCN,
|
||||||
...zhCNLocale
|
...zhCNLocale,
|
||||||
}
|
},
|
||||||
|
'en': {
|
||||||
|
'_lang': 'English',
|
||||||
|
...en,
|
||||||
|
...EnLocale
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new VueI18n({
|
export default new VueI18n({
|
||||||
|
@ -1,11 +1,19 @@
|
|||||||
|
|
||||||
|
import module from './zh'
|
||||||
|
|
||||||
const t = {}
|
const t = {}
|
||||||
|
|
||||||
|
t.module = module
|
||||||
|
|
||||||
t.loading = '加载中...'
|
t.loading = '加载中...'
|
||||||
|
|
||||||
t.brand = {}
|
t.brand = {}
|
||||||
t.brand.lg = 'QMS'
|
t.brand.lg = 'QMS'
|
||||||
t.brand.mini = 'qms'
|
t.brand.mini = 'qms'
|
||||||
|
|
||||||
|
t.public = {}
|
||||||
|
t.public.operation = '操作'
|
||||||
|
|
||||||
t.add = '新增'
|
t.add = '新增'
|
||||||
t.delete = '删除'
|
t.delete = '删除'
|
||||||
t.deleteBatch = '删除'
|
t.deleteBatch = '删除'
|
||||||
|
14
src/i18n/zh/basicData.js
Normal file
14
src/i18n/zh/basicData.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-02-28 14:21:52
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2023-02-28 14:24:19
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: '名称',
|
||||||
|
code: '编码',
|
||||||
|
status: '状态',
|
||||||
|
createTime: '添加时间',
|
||||||
|
}
|
13
src/i18n/zh/index.js
Normal file
13
src/i18n/zh/index.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* @Author: gtz
|
||||||
|
* @Date: 2021-03-04 16:12:46
|
||||||
|
* @LastEditors: gtz
|
||||||
|
* @LastEditTime: 2021-12-08 14:29:14
|
||||||
|
* @Description: file content
|
||||||
|
*/
|
||||||
|
|
||||||
|
import basicData from './basicData'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
basicData,
|
||||||
|
}
|
14
src/icons/svg/中英.svg
Normal file
14
src/icons/svg/中英.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 6.6 KiB |
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-22 14:57:50
|
* @Date: 2022-08-22 14:57:50
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-04-03 14:37:45
|
* @LastEditTime: 2023-05-12 13:41:20
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-24 11:19:43
|
* @Date: 2022-08-24 11:19:43
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-04-18 14:28:38
|
* @LastEditTime: 2023-05-12 12:41:57
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
@ -103,12 +103,16 @@ export default {
|
|||||||
this.$refs.addOrUpdate.init(val.data.id);
|
this.$refs.addOrUpdate.init(val.data.id);
|
||||||
});
|
});
|
||||||
} else if (val.type === "delete") {
|
} else if (val.type === "delete") {
|
||||||
this.deleteHandle(val.data.id,val.data.name)
|
this.deleteHandle(val.data.id, val.data.name,val.data._pageIndex)
|
||||||
|
} else if (val.type === "change") {
|
||||||
|
this.changeStatus(val.data.id)
|
||||||
|
} else {
|
||||||
|
this.otherMethods(val)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id, name) {
|
deleteHandle(id, name,index) {
|
||||||
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
|
this.$confirm(`确定对${name?'[名称='+name+']':'[序号='+index+']'}进行删除操作?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-01-06 10:13:07
|
* @Date: 2023-01-06 10:13:07
|
||||||
* @LastEditTime: 2023-02-22 16:52:30
|
* @LastEditTime: 2023-05-12 12:42:15
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zwq
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
@ -23,7 +23,11 @@ const http = axios.create({
|
|||||||
*/
|
*/
|
||||||
http.interceptors.request.use(config => {
|
http.interceptors.request.use(config => {
|
||||||
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
|
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
|
||||||
|
if (config.url === "/login") {
|
||||||
|
config.headers['token'] = ''
|
||||||
|
} else {
|
||||||
config.headers['token'] = Cookies.get('token') || ''
|
config.headers['token'] = Cookies.get('token') || ''
|
||||||
|
}
|
||||||
// 默认参数
|
// 默认参数
|
||||||
var defaults = {}
|
var defaults = {}
|
||||||
// 防止缓存,GET请求默认带_t参数
|
// 防止缓存,GET请求默认带_t参数
|
||||||
|
@ -2,47 +2,85 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-22 14:57:51
|
* @Date: 2022-08-22 14:57:51
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-01-06 09:44:17
|
* @LastEditTime: 2023-05-12 12:46:50
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
|
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
|
||||||
<div class="aui-navbar__header">
|
<div class="aui-navbar__header">
|
||||||
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
|
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
|
||||||
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a>
|
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t("brand.lg") }}</a>
|
||||||
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a>
|
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t("brand.mini") }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="aui-navbar__body">
|
<div class="aui-navbar__body">
|
||||||
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
|
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
|
||||||
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
|
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
|
||||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true"><use xlink:href="#icon-outdent"></use></svg>
|
<svg
|
||||||
|
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
<use xlink:href="#icon-outdent"></use>
|
||||||
|
</svg>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="2" @click="refresh()">
|
<el-menu-item index="2" @click="refresh()">
|
||||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true"><use xlink:href="#icon-sync"></use></svg>
|
<svg
|
||||||
|
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
<use xlink:href="#icon-sync"></use>
|
||||||
|
</svg>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
<el-menu class="aui-navbar__menu" mode="horizontal">
|
<el-menu class="aui-navbar__menu" mode="horizontal">
|
||||||
|
|
||||||
<el-menu-item index="6" @click="$router.push({ name: 'home' })">
|
<el-menu-item index="6" @click="$router.push({ name: 'home' })">
|
||||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-home"></use></svg>
|
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-home"></use>
|
||||||
|
</svg>
|
||||||
|
</el-menu-item>
|
||||||
|
<el-menu-item index="7">
|
||||||
|
<el-dropdown trigger="click" class="international" @command="handleSetLanguage">
|
||||||
|
<div>
|
||||||
|
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||||
|
<use xlink:href="#中英"></use>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item :disabled="language === 'zh-CN'" command="zh-CN">
|
||||||
|
中文
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :disabled="language === 'en'" command="en">
|
||||||
|
English
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="4" @click="fullscreenHandle()">
|
<el-menu-item index="4" @click="fullscreenHandle()">
|
||||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-fullscreen"></use></svg>
|
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-fullscreen"></use>
|
||||||
|
</svg>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="5" class="aui-navbar__avatar">
|
<el-menu-item index="5" class="aui-navbar__avatar">
|
||||||
<el-dropdown placement="bottom" :show-timeout="0">
|
<el-dropdown placement="bottom" :show-timeout="0">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<img src="~@/assets/img/avatar.png">
|
<img src="~@/assets/img/avatar.png" />
|
||||||
<span>{{ $store.state.user.name }}</span>
|
<span>{{ $store.state.user.name }}</span>
|
||||||
<i class="el-icon-arrow-down"></i>
|
<i class="el-icon-arrow-down"></i>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item @click.native="updatePasswordHandle()">
|
<el-dropdown-item @click.native="updatePasswordHandle()">
|
||||||
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#修改密码"></use></svg>
|
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
|
||||||
{{ $t('updatePassword.title') }}</el-dropdown-item>
|
<use xlink:href="#修改密码"></use>
|
||||||
|
</svg>
|
||||||
|
{{ $t("updatePassword.title") }}</el-dropdown-item
|
||||||
|
>
|
||||||
<el-dropdown-item @click.native="logoutHandle()">
|
<el-dropdown-item @click.native="logoutHandle()">
|
||||||
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#tuichu"></use></svg>
|
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
|
||||||
{{ $t('logout') }}</el-dropdown-item>
|
<use xlink:href="#tuichu"></use>
|
||||||
|
</svg>
|
||||||
|
{{ $t("logout") }}</el-dropdown-item
|
||||||
|
>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
@ -53,55 +91,77 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import screenfull from 'screenfull'
|
import screenfull from "screenfull";
|
||||||
import UpdatePassword from './main-navbar-update-password'
|
import UpdatePassword from "./main-navbar-update-password";
|
||||||
import { clearLoginInfo } from '@/utils'
|
import { clearLoginInfo } from "@/utils";
|
||||||
|
import { messages } from '@/i18n'
|
||||||
|
import Cookies from "js-cookie";
|
||||||
export default {
|
export default {
|
||||||
inject: ['refresh'],
|
inject: ["refresh"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
updatePasswordVisible: false,
|
updatePasswordVisible: false,
|
||||||
messageTip: false
|
messageTip: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
UpdatePassword
|
UpdatePassword,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
language() {
|
||||||
|
return Cookies.get("language");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleSetLanguage(val) {
|
||||||
|
Cookies.set("language", val);
|
||||||
|
document.querySelector("html").setAttribute("lang", val);
|
||||||
|
document.title = messages[val].brand.lg;
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
// 全屏
|
// 全屏
|
||||||
fullscreenHandle() {
|
fullscreenHandle() {
|
||||||
if (!screenfull.enabled) {
|
if (!screenfull.enabled) {
|
||||||
return this.$message({
|
return this.$message({
|
||||||
message: this.$t('fullscreen.prompt'),
|
message: this.$t("fullscreen.prompt"),
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
duration: 500
|
duration: 500,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
screenfull.toggle()
|
screenfull.toggle();
|
||||||
},
|
},
|
||||||
// 修改密码
|
// 修改密码
|
||||||
updatePasswordHandle() {
|
updatePasswordHandle() {
|
||||||
this.updatePasswordVisible = true
|
this.updatePasswordVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.updatePassword.init()
|
this.$refs.updatePassword.init();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 退出
|
// 退出
|
||||||
logoutHandle() {
|
logoutHandle() {
|
||||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('logout') }), this.$t('prompt.title'), {
|
this.$confirm(
|
||||||
confirmButtonText: this.$t('confirm'),
|
this.$t("prompt.info", { handle: this.$t("logout") }),
|
||||||
cancelButtonText: this.$t('cancel'),
|
this.$t("prompt.title"),
|
||||||
type: 'warning'
|
{
|
||||||
}).then(() => {
|
confirmButtonText: this.$t("confirm"),
|
||||||
this.$http.post('/logout').then(({ data: res }) => {
|
cancelButtonText: this.$t("cancel"),
|
||||||
|
type: "warning",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
this.$http
|
||||||
|
.post("/logout")
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg);
|
||||||
}
|
|
||||||
clearLoginInfo()
|
|
||||||
this.$router.push({ name: 'login' })
|
|
||||||
}).catch(() => {})
|
|
||||||
}).catch(() => {})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
clearLoginInfo();
|
||||||
|
this.$router.push({ name: "login" });
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
|
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||||
<el-form-item prop="beanName" :label="$t('schedule.beanName')">
|
<el-form-item prop="beanName" :label="$t('schedule.beanName')">
|
||||||
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanNameTips')"></el-input>
|
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanNameTips')"></el-input>
|
||||||
@ -17,20 +16,21 @@
|
|||||||
<el-input v-model="dataForm.remark" :placeholder="$t('schedule.remark')"></el-input>
|
<el-input v-model="dataForm.remark" :placeholder="$t('schedule.remark')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template slot="footer">
|
|
||||||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
|
||||||
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import basicAdd from '@/mixins/basic-add'
|
||||||
import debounce from 'lodash/debounce'
|
import debounce from 'lodash/debounce'
|
||||||
import { cron } from 'vue-cron'
|
import { cron } from 'vue-cron'
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
|
urlOptions: {
|
||||||
|
submitURL: '/sys/schedule/',
|
||||||
|
infoURL: '/sys/schedule'
|
||||||
|
},
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: '',
|
id: '',
|
||||||
beanName: '',
|
beanName: '',
|
||||||
@ -58,7 +58,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init () {
|
init (id) {
|
||||||
|
this.dataForm.id = id || "";
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['dataForm'].resetFields()
|
this.$refs['dataForm'].resetFields()
|
||||||
@ -95,7 +96,7 @@ export default {
|
|||||||
duration: 500,
|
duration: 500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('refreshDataList')
|
this.$emit('successSubmit')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
|
@ -1,71 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
<div class="mod-job__schedule">
|
<div class="mod-job__schedule">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
<el-form-item>
|
|
||||||
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
|
<base-table
|
||||||
</el-form-item>
|
:table-props="tableProps"
|
||||||
<el-form-item>
|
:page="listQuery.page"
|
||||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
:limit="listQuery.limit"
|
||||||
</el-form-item>
|
:table-data="tableData"
|
||||||
<el-form-item>
|
>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
<method-btn
|
||||||
</el-form-item>
|
v-if="tableBtn.length"
|
||||||
<el-form-item>
|
slot="handleBtn"
|
||||||
<el-button v-if="$hasPermission('sys:schedule:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
:width="200"
|
||||||
</el-form-item>
|
label="操作"
|
||||||
<el-form-item>
|
:method-list="tableBtn"
|
||||||
<el-button v-if="$hasPermission('sys:schedule:pause')" type="danger" @click="pauseHandle()">{{ $t('schedule.pauseBatch') }}</el-button>
|
@clickBtn="handleClick"
|
||||||
</el-form-item>
|
/>
|
||||||
<el-form-item>
|
</base-table>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:resume')" type="danger" @click="resumeHandle()">{{ $t('schedule.resumeBatch') }}</el-button>
|
<pagination
|
||||||
</el-form-item>
|
:limit.sync="listQuery.limit"
|
||||||
<el-form-item>
|
:page.sync="listQuery.page"
|
||||||
<el-button v-if="$hasPermission('sys:schedule:run')" type="danger" @click="runHandle()">{{ $t('schedule.runBatch') }}</el-button>
|
:total="listQuery.total"
|
||||||
</el-form-item>
|
@pagination="getDataList"
|
||||||
<el-form-item>
|
/>
|
||||||
<el-button v-if="$hasPermission('sys:schedule:log')" type="success" @click="logHandle()">{{ $t('schedule.log') }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-table
|
|
||||||
v-loading="dataListLoading"
|
|
||||||
:data="dataList"
|
|
||||||
border
|
|
||||||
@selection-change="dataListSelectionChangeHandle"
|
|
||||||
@sort-change="dataListSortChangeHandle"
|
|
||||||
style="width: 100%;">
|
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
|
||||||
<el-table-column prop="beanName" :label="$t('schedule.beanName')" header-align="center" align="center"></el-table-column>
|
|
||||||
<el-table-column prop="params" :label="$t('schedule.params')" header-align="center" align="center"></el-table-column>
|
|
||||||
<el-table-column prop="cronExpression" :label="$t('schedule.cronExpression')" header-align="center" align="center"></el-table-column>
|
|
||||||
<el-table-column prop="remark" :label="$t('schedule.remark')" header-align="center" align="center"></el-table-column>
|
|
||||||
<el-table-column prop="status" :label="$t('schedule.status')" sortable="custom" header-align="center" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag v-if="scope.row.status === 1" size="small">{{ $t('schedule.status1') }}</el-tag>
|
|
||||||
<el-tag v-else size="small" type="danger">{{ $t('schedule.status0') }}</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button v-if="$hasPermission('sys:schedule:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
|
|
||||||
<el-button v-if="$hasPermission('sys:schedule:pause')" type="text" size="small" @click="pauseHandle(scope.row.id)">{{ $t('schedule.pause') }}</el-button>
|
|
||||||
<el-button v-if="$hasPermission('sys:schedule:resume')" type="text" size="small" @click="resumeHandle(scope.row.id)">{{ $t('schedule.resume') }}</el-button>
|
|
||||||
<el-button v-if="$hasPermission('sys:schedule:run')" type="text" size="small" @click="runHandle(scope.row.id)">{{ $t('schedule.run') }}</el-button>
|
|
||||||
<el-button v-if="$hasPermission('sys:schedule:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-pagination
|
|
||||||
:current-page="page"
|
|
||||||
:page-sizes="[10, 20, 50, 100]"
|
|
||||||
:page-size="limit"
|
|
||||||
:total="total"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
@size-change="pageSizeChangeHandle"
|
|
||||||
@current-change="pageCurrentChangeHandle">
|
|
||||||
</el-pagination>
|
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<base-dialog
|
||||||
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="addOrUpdateVisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
>
|
||||||
|
<add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
|
||||||
|
</base-dialog>
|
||||||
<!-- 弹窗, 日志列表 -->
|
<!-- 弹窗, 日志列表 -->
|
||||||
<log v-if="logVisible" ref="log"></log>
|
<log v-if="logVisible" ref="log"></log>
|
||||||
</div>
|
</div>
|
||||||
@ -73,124 +41,255 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import mixinViewModule from '@/mixins/view-module'
|
import basicPage from "@/mixins/basic-page";
|
||||||
import AddOrUpdate from './schedule-add-or-update'
|
import AddOrUpdate from "./schedule-add-or-update";
|
||||||
import Log from './schedule-log'
|
import Log from "./schedule-log";
|
||||||
|
import i18n from "@/i18n";
|
||||||
|
import sysFilter from "@/filters/sys-filter";
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: "beanName",
|
||||||
|
label: i18n.t("schedule.beanName"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "params",
|
||||||
|
label: i18n.t("schedule.params"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "cronExpression",
|
||||||
|
label: i18n.t("schedule.cronExpression"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "remark",
|
||||||
|
label: i18n.t("schedule.remark"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "status",
|
||||||
|
label: i18n.t("schedule.status"),
|
||||||
|
filter: sysFilter("scheduleStatus"),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const tableBtn = [
|
||||||
|
{
|
||||||
|
type: "edit",
|
||||||
|
btnName: "编辑",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "pause",
|
||||||
|
btnName: "暂停",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "restore",
|
||||||
|
btnName: "恢复",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "run",
|
||||||
|
btnName: "执行",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "delete",
|
||||||
|
btnName: "删除",
|
||||||
|
},
|
||||||
|
];
|
||||||
export default {
|
export default {
|
||||||
mixins: [mixinViewModule],
|
mixins: [basicPage],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mixinViewModuleOptions: {
|
urlOptions: {
|
||||||
getDataListURL: '/sys/schedule/page',
|
getDataListURL: "/sys/schedule/page",
|
||||||
getDataListIsPage: true,
|
deleteURL: "/sys/schedule",
|
||||||
deleteURL: '/sys/schedule',
|
|
||||||
deleteIsBatch: true
|
|
||||||
},
|
},
|
||||||
dataForm: {
|
dataForm: {
|
||||||
beanName: ''
|
beanName: "",
|
||||||
},
|
},
|
||||||
logVisible: false
|
tableProps,
|
||||||
}
|
tableBtn,
|
||||||
|
addDeleteURL: true,
|
||||||
|
logVisible: false,
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: "input",
|
||||||
|
label: i18n.t("schedule.beanName"),
|
||||||
|
placeholder: i18n.t("schedule.beanName"),
|
||||||
|
param: "beanName",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
btnName: "查询",
|
||||||
|
name: "search",
|
||||||
|
color: "primary",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
btnName: "新增",
|
||||||
|
name: "add",
|
||||||
|
color: "primary",
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "button",
|
||||||
|
btnName: "日志",
|
||||||
|
name: "log",
|
||||||
|
color: "success",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
Log
|
Log,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//search-bar点击
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case "search":
|
||||||
|
this.listQuery.beanName = val.beanName;
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case "add":
|
||||||
|
this.addOrEditTitle = "新增";
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrUpdateHandle();
|
||||||
|
break;
|
||||||
|
case "log":
|
||||||
|
this.logHandle();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
btnFun(val) {
|
||||||
|
if (val.type === "pause") {
|
||||||
|
this.pauseHandle(val.data.id);
|
||||||
|
} else if (val.type === "restore") {
|
||||||
|
this.resumeHandle(val.data.id);
|
||||||
|
} else {
|
||||||
|
this.runHandle(val.data.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 暂停
|
// 暂停
|
||||||
pauseHandle(id) {
|
pauseHandle(id) {
|
||||||
if (!id && this.dataListSelections.length <= 0) {
|
if (!id && this.dataListSelections.length <= 0) {
|
||||||
return this.$message({
|
return this.$message({
|
||||||
message: this.$t('prompt.deleteBatch'),
|
message: this.$t("prompt.deleteBatch"),
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
duration: 500
|
duration: 500,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.pause') }), this.$t('prompt.title'), {
|
this.$confirm(
|
||||||
confirmButtonText: this.$t('confirm'),
|
this.$t("prompt.info", { handle: this.$t("schedule.pause") }),
|
||||||
cancelButtonText: this.$t('cancel'),
|
this.$t("prompt.title"),
|
||||||
type: 'warning'
|
{
|
||||||
}).then(() => {
|
confirmButtonText: this.$t("confirm"),
|
||||||
this.$http.put('/sys/schedule/pause', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
cancelButtonText: this.$t("cancel"),
|
||||||
|
type: "warning",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
this.$http
|
||||||
|
.put("/sys/schedule/pause", id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('prompt.success'),
|
message: this.$t("prompt.success"),
|
||||||
type: 'success',
|
type: "success",
|
||||||
duration: 500,
|
duration: 500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.getDataList()
|
this.getDataList();
|
||||||
}
|
},
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
.catch(() => {});
|
||||||
}).catch(() => {})
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
// 恢复
|
// 恢复
|
||||||
resumeHandle(id) {
|
resumeHandle(id) {
|
||||||
if (!id && this.dataListSelections.length <= 0) {
|
if (!id && this.dataListSelections.length <= 0) {
|
||||||
return this.$message({
|
return this.$message({
|
||||||
message: this.$t('prompt.deleteBatch'),
|
message: this.$t("prompt.deleteBatch"),
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
duration: 500
|
duration: 500,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.resume') }), this.$t('prompt.title'), {
|
this.$confirm(
|
||||||
confirmButtonText: this.$t('confirm'),
|
this.$t("prompt.info", { handle: this.$t("schedule.resume") }),
|
||||||
cancelButtonText: this.$t('cancel'),
|
this.$t("prompt.title"),
|
||||||
type: 'warning'
|
{
|
||||||
}).then(() => {
|
confirmButtonText: this.$t("confirm"),
|
||||||
this.$http.put('/sys/schedule/resume', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
cancelButtonText: this.$t("cancel"),
|
||||||
|
type: "warning",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
this.$http
|
||||||
|
.put("/sys/schedule/resume", id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('prompt.success'),
|
message: this.$t("prompt.success"),
|
||||||
type: 'success',
|
type: "success",
|
||||||
duration: 500,
|
duration: 500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.getDataList()
|
this.getDataList();
|
||||||
}
|
},
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
.catch(() => {});
|
||||||
}).catch(() => {})
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
// 执行
|
// 执行
|
||||||
runHandle(id) {
|
runHandle(id) {
|
||||||
if (!id && this.dataListSelections.length <= 0) {
|
if (!id && this.dataListSelections.length <= 0) {
|
||||||
return this.$message({
|
return this.$message({
|
||||||
message: this.$t('prompt.deleteBatch'),
|
message: this.$t("prompt.deleteBatch"),
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
duration: 500
|
duration: 500,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.run') }), this.$t('prompt.title'), {
|
this.$confirm(
|
||||||
confirmButtonText: this.$t('confirm'),
|
this.$t("prompt.info", { handle: this.$t("schedule.run") }),
|
||||||
cancelButtonText: this.$t('cancel'),
|
this.$t("prompt.title"),
|
||||||
type: 'warning'
|
{
|
||||||
}).then(() => {
|
confirmButtonText: this.$t("confirm"),
|
||||||
this.$http.put('/sys/schedule/run', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
cancelButtonText: this.$t("cancel"),
|
||||||
|
type: "warning",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
this.$http
|
||||||
|
.put("/sys/schedule/run", id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||||
|
.then(({ data: res }) => {
|
||||||
if (res.code !== 0) {
|
if (res.code !== 0) {
|
||||||
return this.$message.error(res.msg)
|
return this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('prompt.success'),
|
message: this.$t("prompt.success"),
|
||||||
type: 'success',
|
type: "success",
|
||||||
duration: 500,
|
duration: 500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.getDataList()
|
this.getDataList();
|
||||||
}
|
},
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
.catch(() => {});
|
||||||
}).catch(() => {})
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
// 日志列表
|
// 日志列表
|
||||||
logHandle() {
|
logHandle() {
|
||||||
this.logVisible = true
|
this.logVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.log.init()
|
this.$refs.log.init();
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -117,7 +117,7 @@ export default {
|
|||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmitHandle: debounce(function () {
|
dataFormSubmit: debounce(function () {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user