初始化
|
@ -0,0 +1,2 @@
|
|||
NODE_ENV=development
|
||||
VUE_APP_NODE_ENV=dev
|
|
@ -0,0 +1,2 @@
|
|||
NODE_ENV=production
|
||||
VUE_APP_NODE_ENV=prod
|
|
@ -0,0 +1,2 @@
|
|||
NODE_ENV=production
|
||||
VUE_APP_NODE_ENV=prod:sit
|
|
@ -0,0 +1,2 @@
|
|||
NODE_ENV=production
|
||||
VUE_APP_NODE_ENV=prod:uat
|
|
@ -0,0 +1 @@
|
|||
/src/icons/iconfont.js
|
|
@ -0,0 +1,21 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
|
@ -0,0 +1,9 @@
|
|||
renren-security【企业版】版权声明
|
||||
|
||||
1. renren-security【企业版】已申请软件著作权,未经授权的企业或个人,请购买正版授权,否则我们会根据事态轻重追究相应法律责任。
|
||||
2. 授权者不得擅自将源码上传到包括但不限于GitHub、Gitee、CSDN、百度网盘等互联网分享平台,不得直接对授权的产品本身进行二次转售或倒卖等,否则我们收回产品授权,并移交司法机关处理。
|
||||
3. 未经授权的任何公司及个人,无权使用、重构及二次开发,否则,我们将收集并固定相关证据,对侵权者采取一切必要的法律措施,追究侵权行为人的法律责任以维护我司的合法权益。
|
||||
|
||||
律师声明函:
|
||||
![律师声明函](https://www.renren.io/res/images/lawyer_letter-1.jpg "在这里输入图片标题")
|
||||
![律师声明函](https://www.renren.io/res/images/lawyer_letter-2.jpg "在这里输入图片标题")
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
var gulp = require('gulp')
|
||||
var $ = require('gulp-load-plugins')()
|
||||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var del = require('del')
|
||||
//var colors = require('colors')
|
||||
var child_process = require('child_process')
|
||||
|
||||
var theme = {}
|
||||
var themeList = require('./src/element-ui/config.js').filter(item => !item.hasBuild)
|
||||
var styleFileDir = './src/assets/scss'
|
||||
var styleFileDirTemp = `${styleFileDir}-temp`
|
||||
var themeFileDir = './public/element-theme'
|
||||
var et = require('element-theme')
|
||||
var etOptions = require('./package.json')['element-theme']
|
||||
var themeFileName = etOptions.config.replace(/.*\/(.+\.scss)/, '$1')
|
||||
|
||||
/**
|
||||
* 构建生成主题
|
||||
*/
|
||||
gulp.task('themes', () => {
|
||||
if (themeList.length <= 0) { return del(styleFileDirTemp) }
|
||||
|
||||
// 删除临时文件,保证本次操作正常执行
|
||||
//del(styleFileDirTemp)
|
||||
console.log('del(styleFileDirTemp)');
|
||||
|
||||
// 拷贝一份scss样式文件夹,作为构建的临时处理文件夹
|
||||
//child_process.spawnSync('cp', ['-r', styleFileDir, styleFileDirTemp])
|
||||
console.log('copy styleFileDirTemp');
|
||||
|
||||
// 拷贝element组件scss变量样式文件至临时处理文件夹中,并修改相应配置信息
|
||||
//child_process.spawnSync('cp', ['-r', etOptions.config, styleFileDirTemp])
|
||||
etOptions.config = `${styleFileDirTemp}/${themeFileName}`
|
||||
|
||||
// 开始构建生成
|
||||
fnCreate(themeList)
|
||||
|
||||
function fnCreate (themeList) {
|
||||
if (themeList.length >= 1) {
|
||||
// 保存当前构建生成的主题对象
|
||||
theme = themeList[0]
|
||||
|
||||
console.log('\n')
|
||||
console.log('-------------------- 待构建,主题 -------------------------')
|
||||
console.log(themeList)
|
||||
console.log('\n')
|
||||
console.log('-------------------- 构建中,主题 -------------------------')
|
||||
console.log(theme)
|
||||
console.log('\n')
|
||||
|
||||
// 修改.scss临时文件中的$--color-primary主题变量值
|
||||
var data = fs.readFileSync(etOptions.config, 'utf8')
|
||||
var result = data.replace(/\$--color-primary:(.*) !default;/, `$--color-primary:${theme.color} !default;`)
|
||||
fs.writeFileSync(path.resolve(etOptions.config), result)
|
||||
|
||||
// 修改aui.scss临时文件中引入element组件主题变量文件路径
|
||||
var data = fs.readFileSync(`${styleFileDirTemp}/aui.scss`, 'utf8')
|
||||
var result = data.replace(new RegExp(`(@import \")(.*\/)(${themeFileName}\";)`), '$1./$3')
|
||||
fs.writeFileSync(path.resolve(`${styleFileDirTemp}/aui.scss`), result)
|
||||
|
||||
// 调用element-theme插件,生成element组件主题
|
||||
etOptions.out = `${themeFileDir}/${theme.name}`
|
||||
et.run(etOptions, () => {
|
||||
// 生成后,构建同主题色aui.css项目主题
|
||||
gulp.start(['styles'], () => {
|
||||
// 递归下一步
|
||||
themeList.splice(0, 1)
|
||||
fnCreate(themeList)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// 删除临时文件
|
||||
del(styleFileDirTemp)
|
||||
console.log('\n')
|
||||
console.log('-------------------- 构建完毕,删除临时文件 -------------------------')
|
||||
console.log(styleFileDirTemp)
|
||||
console.log('\n')
|
||||
|
||||
// 删除主题不需要的部分文件
|
||||
var files = [
|
||||
`${themeFileDir}/**/*.css`,
|
||||
`!${themeFileDir}/**/index.css`,
|
||||
`!${themeFileDir}/**/aui.css`,
|
||||
`!${themeFileDir}/**/fonts`
|
||||
]
|
||||
del(files)
|
||||
console.log('-------------------- 构建完毕,删除主题独立组件文件 -------------------------')
|
||||
console.log(files)
|
||||
console.log('\n')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
gulp.task('styles', () => {
|
||||
return gulp.src([`${styleFileDirTemp}/aui.scss`])
|
||||
.pipe($.sass().on('error', $.sass.logError))
|
||||
.pipe($.autoprefixer({
|
||||
browsers: etOptions.browsers,
|
||||
cascade: false
|
||||
}))
|
||||
.pipe($.cleanCss())
|
||||
.pipe($.rename('aui.css'))
|
||||
.pipe(gulp.dest(`${themeFileDir}/${theme.name}`))
|
||||
})
|
|
@ -0,0 +1,108 @@
|
|||
{
|
||||
"name": "security-enterprise-admin",
|
||||
"version": "2.9.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint",
|
||||
"build:prod": "vue-cli-service build --mode production",
|
||||
"build:sit": "vue-cli-service build --mode production.sit",
|
||||
"build:uat": "vue-cli-service build --mode production.uat",
|
||||
"et": "node_modules/.bin/et",
|
||||
"et:init": "node_modules/.bin/et -i",
|
||||
"et:list": "gulp themes"
|
||||
},
|
||||
"dependencies": {
|
||||
"af-table-column": "^1.0.3",
|
||||
"ant-design-vue": "^1.7.8",
|
||||
"axios": "^0.27.2",
|
||||
"babel-eslint": "^8.0.1",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"carddragger": "^0.3.6",
|
||||
"clipboard": "^2.0.6",
|
||||
"core-js": "^3.6.5",
|
||||
"echarts": "^4.7.0",
|
||||
"element-ui": "^2.13.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"gulp-autoprefixer": "^7.0.1",
|
||||
"gulp-clean-css": "^4.3.0",
|
||||
"gulp-load-plugins": "^2.0.3",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"js-cookie": "^2.2.1",
|
||||
"lodash": "^4.17.19",
|
||||
"monaco-editor": "^0.20.0",
|
||||
"monaco-editor-webpack-plugin": "^1.9.0",
|
||||
"qs": "^6.9.4",
|
||||
"quill": "^1.3.7",
|
||||
"sass": "^1.51.0",
|
||||
"sass-loader": "^10.1.0",
|
||||
"screenfull": "^4.2.1",
|
||||
"sortablejs": "^1.10.2",
|
||||
"svg-sprite-loader": "^5.0.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-cron": "^1.0.9",
|
||||
"vue-i18n": "^8.18.2",
|
||||
"vue-monaco": "^1.2.1",
|
||||
"vue-router": "^3.3.4",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuex": "^3.5.1",
|
||||
"vxe-table": "^2.9.19",
|
||||
"xe-utils": "^2.7.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.4.6",
|
||||
"@vue/cli-plugin-eslint": "^4.4.6",
|
||||
"@vue/cli-service": "^4.4.6",
|
||||
"@vue/eslint-config-standard": "^5.1.2",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"element-theme-chalk": "^2.13.2",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"less-loader": "^7.3.0",
|
||||
"natives": "^1.1.6",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"@vue/standard"
|
||||
],
|
||||
"rules": {},
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
}
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"autoprefixer": {}
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 10"
|
||||
],
|
||||
"element-theme": {
|
||||
"config": "./src/element-ui/theme-variables.scss",
|
||||
"out": "./src/element-ui/theme",
|
||||
"minimize": true,
|
||||
"browsers": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 10"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.11.1",
|
||||
"npm": ">= 5.6.0"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1,82 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-11 10:11:40
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-13 11:21:09
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<link rel="shortcut icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<!-- 站点配置 -->
|
||||
<script>
|
||||
window.SITE_CONFIG = {};
|
||||
window.SITE_CONFIG['version'] = 'v2.9.0';
|
||||
window.SITE_CONFIG['nodeEnv'] = '<%= process.env.VUE_APP_NODE_ENV %>';
|
||||
window.SITE_CONFIG['apiURL'] = ''; // api请求地址
|
||||
window.SITE_CONFIG['storeState'] = {}; // vuex本地储存初始化状态(用于不刷新页面的情况下,也能重置初始化项目中所有状态)
|
||||
window.SITE_CONFIG['contentTabDefault'] = { // 内容标签页默认属性对象
|
||||
'name': '', // 名称, 由 this.$route.name 自动赋值(默认,名称 === 路由名称 === 路由路径)
|
||||
'params': {}, // 参数, 由 this.$route.params 自动赋值
|
||||
'query': {}, // 查询参数, 由 this.$route.query 自动赋值
|
||||
'menuId': '', // 菜单id(用于选中侧边栏菜单,与this.$store.state.sidebarMenuActiveName进行匹配)
|
||||
'title': '', // 标题
|
||||
'isTab': true, // 是否通过tab展示内容?
|
||||
'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配)
|
||||
};
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/#/vueTemplateDemo';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/#/vueTemplateDemo';
|
||||
window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/#/vueTemplateDemo';
|
||||
window.SITE_CONFIG['menuList'] = []; // 左侧菜单列表(后台返回,未做处理)
|
||||
window.SITE_CONFIG['permissions'] = []; // 页面按钮操作权限(后台返回,未做处理)
|
||||
window.SITE_CONFIG['dynamicRoutes'] = []; // 动态路由列表
|
||||
window.SITE_CONFIG['dynamicMenuRoutes'] = []; // 动态(菜单)路由列表
|
||||
window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = false; // 动态(菜单)路由是否已经添加的状态标示(用于判断是否需要重新拉取数据并进行动态添加操作)
|
||||
</script>
|
||||
|
||||
<!-- 开发环境 -->
|
||||
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
|
||||
<script>
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
|
||||
// WebSocket地址
|
||||
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';
|
||||
</script>
|
||||
<% } %>
|
||||
<!-- 集成测试环境 -->
|
||||
<% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %>
|
||||
<script>
|
||||
window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
|
||||
// WebSocket地址
|
||||
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';
|
||||
</script>
|
||||
<% } %>
|
||||
<!-- 验收测试环境 -->
|
||||
<% if (process.env.VUE_APP_NODE_ENV === 'prod:uat') { %>
|
||||
<script>
|
||||
window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
|
||||
// WebSocket地址
|
||||
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';
|
||||
</script>
|
||||
<% } %>
|
||||
<!-- 生产环境 -->
|
||||
<% if (process.env.VUE_APP_NODE_ENV === 'prod') { %>
|
||||
<script>
|
||||
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
||||
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
||||
// WebSocket地址
|
||||
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';
|
||||
</script>
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<transition name="el-fade-in-linear">
|
||||
<router-view />
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.el-table th.gutter{
|
||||
display: table-cell!important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
import { messages } from '@/i18n'
|
||||
export default {
|
||||
watch: {
|
||||
'$i18n.locale': 'i18nHandle'
|
||||
},
|
||||
created () {
|
||||
this.i18nHandle(this.$i18n.locale)
|
||||
},
|
||||
methods: {
|
||||
i18nHandle (val, oldVal) {
|
||||
Cookies.set('language', val)
|
||||
document.querySelector('html').setAttribute('lang', val)
|
||||
document.title = messages[val].brand.lg
|
||||
// 非登录页面,切换语言刷新页面
|
||||
if (this.$route.name !== 'login' && oldVal) {
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
After Width: | Height: | Size: 860 B |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 135 KiB |
|
@ -0,0 +1,11 @@
|
|||
// 变量
|
||||
@import "~@/element-ui/theme-variables.scss";
|
||||
@import "./variables.scss";
|
||||
// 公共
|
||||
@import "./normalize.scss";
|
||||
@import "./common.scss";
|
||||
// 页面
|
||||
@import "./pages/login.scss";
|
||||
@import "./pages/404.scss";
|
||||
// 模块
|
||||
@import "./modules/home.scss";
|
|
@ -0,0 +1,717 @@
|
|||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
font-size: $--font-size-base;
|
||||
line-height: $base--line-height;
|
||||
color: $--color-text-primary;
|
||||
background-color: #fff;
|
||||
}
|
||||
a {
|
||||
color: mix(#fff, $--color-primary, 20%);
|
||||
text-decoration: none;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
:focus,
|
||||
:hover {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Utils
|
||||
------------------------------ */
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
.fr {
|
||||
float: right !important;
|
||||
}
|
||||
.fl {
|
||||
float: left !important;
|
||||
}
|
||||
.fi {
|
||||
float: initial !important;
|
||||
}
|
||||
.m-auto {
|
||||
margin: auto !important;
|
||||
}
|
||||
.mt-auto {
|
||||
margin-top: auto !important;
|
||||
}
|
||||
.mr-auto {
|
||||
margin-right: auto !important;
|
||||
}
|
||||
.mb-auto {
|
||||
margin-bottom: auto !important;
|
||||
}
|
||||
.ml-auto {
|
||||
margin-left: auto !important;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right !important;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left !important;
|
||||
}
|
||||
.w-percent-100 {
|
||||
width: 100% !important;
|
||||
}
|
||||
.base-line-height {
|
||||
line-height: $base--line-height !important;
|
||||
}
|
||||
|
||||
|
||||
/* Reset element-ui
|
||||
------------------------------ */
|
||||
.aui-wrapper {
|
||||
.el-card + .el-card {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.el-input__prefix .el-input__icon {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.el-date-editor .el-range-separator {
|
||||
width: 8%;
|
||||
}
|
||||
.el-table th {
|
||||
color: $--color-text-primary;
|
||||
background-color: $--background-color-base;
|
||||
}
|
||||
.el-pagination {
|
||||
margin-top: 15px;
|
||||
text-align: right;
|
||||
}
|
||||
.el-table__expand-icon {
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Common
|
||||
------------------------------ */
|
||||
// 图标
|
||||
.icon-svg {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
fill: currentColor;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
}
|
||||
// 卡片
|
||||
.aui-card--fill .el-card__header {
|
||||
height: $content--card-header-height;
|
||||
line-height: $content--card-header-height - 36px;
|
||||
}
|
||||
.aui-card__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
// 表单
|
||||
.aui-form__label-icon {
|
||||
display: inline-block;
|
||||
margin: 0 3px;
|
||||
vertical-align: middle;
|
||||
font-size: 18px;
|
||||
color: $--color-text-secondary;
|
||||
}
|
||||
// 按钮
|
||||
.aui-button--dashed {
|
||||
border-style: dashed;
|
||||
&:focus,
|
||||
&:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
&-add {
|
||||
> span > *[class*="el-icon-"],
|
||||
> span > *[class*="icon"] {
|
||||
vertical-align: middle;
|
||||
font-size: 18px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 主题工具
|
||||
.aui-theme-tools {
|
||||
position: fixed;
|
||||
top: $navbar--height + $content--tabs-header-height + 15px;
|
||||
right: -210px;
|
||||
bottom: 0;
|
||||
z-index: 1010;
|
||||
width: 210px;
|
||||
transition: right .3s;
|
||||
&--open {
|
||||
right: 0;
|
||||
}
|
||||
&__toggle {
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
left: -40px;
|
||||
width: 40px;
|
||||
padding: 10px 8px;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
border-right: 0;
|
||||
border-radius: $--border-radius-base 0 0 $--border-radius-base;
|
||||
color: #fff;
|
||||
background-color: $--color-primary;
|
||||
cursor: pointer;
|
||||
}
|
||||
&__content {
|
||||
height: 100%;
|
||||
padding: 5px 20px 20px;
|
||||
border: 1px solid $--border-color-lighter;
|
||||
border-radius: $--border-radius-base 0 0 $--border-radius-base;
|
||||
background-color: #fff;
|
||||
.el-radio {
|
||||
display: block;
|
||||
margin-left: 0 !important;
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
&__item + &__item {
|
||||
margin-top: 15px;
|
||||
border-top: 1px solid $--border-color-lighter;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Layout
|
||||
------------------------------ */
|
||||
.aui-wrapper {
|
||||
position: relative;
|
||||
padding-top: $navbar--height;
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar fold
|
||||
------------------------------ */
|
||||
.aui-sidebar--fold {
|
||||
.aui-navbar {
|
||||
&__header,
|
||||
&__brand {
|
||||
width: $sidebar--width-fold;
|
||||
}
|
||||
&__brand {
|
||||
&-lg {
|
||||
display: none;
|
||||
}
|
||||
&-mini {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
&__icon-menu--switch {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
}
|
||||
.aui-sidebar {
|
||||
&__inner {
|
||||
width: $sidebar--width-fold + 20px;
|
||||
}
|
||||
&,
|
||||
&__menu {
|
||||
width: $sidebar--width-fold;
|
||||
}
|
||||
&__menu > li > .el-submenu__title {
|
||||
text-align: center;
|
||||
}
|
||||
&__menu-icon {
|
||||
margin-right: 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.aui-content {
|
||||
&__wrapper {
|
||||
margin-left: $sidebar--width-fold;
|
||||
}
|
||||
&--tabs > .el-tabs > .el-tabs__header {
|
||||
left: $sidebar--width-fold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Navbar
|
||||
------------------------------ */
|
||||
.aui-navbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 1030;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
height: $navbar--height;
|
||||
background-color: $--color-primary;
|
||||
box-shadow: 0 1px 0 0 rgba(0, 0, 0, .05);
|
||||
&--colorful {
|
||||
.aui-navbar__body {
|
||||
background-color: transparent;
|
||||
}
|
||||
.aui-navbar__menu {
|
||||
> .el-menu-item,
|
||||
> .el-submenu > .el-submenu__title {
|
||||
color: #fff;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background-color: mix(#000, $--color-primary, 15%);
|
||||
}
|
||||
}
|
||||
> .el-menu-item.is-active,
|
||||
> .el-submenu.is-active > .el-submenu__title {
|
||||
color: #fff;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.el-menu-item i,
|
||||
.el-submenu__title i,
|
||||
.el-menu-item svg,
|
||||
.el-submenu__title svg,
|
||||
.el-menu-item .el-dropdown {
|
||||
color: #fff !important;
|
||||
}
|
||||
.el-button {
|
||||
color: #fff;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
.aui-navbar__search {
|
||||
&-txt {
|
||||
.el-input__inner {
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
&::-webkit-input-placeholder {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&__header {
|
||||
position: relative;
|
||||
width: $sidebar--width;
|
||||
height: $navbar--height;
|
||||
transition: width .3s;
|
||||
}
|
||||
&__brand {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 20px;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
transition: width .3s;
|
||||
&-lg,
|
||||
&-mini {
|
||||
max-width: 100%;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
&-mini {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&__body {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
&__menu {
|
||||
background-color: transparent;
|
||||
border-bottom: 0 !important;
|
||||
a:focus,
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.el-menu-item,
|
||||
.el-submenu > .el-submenu__title {
|
||||
height: $navbar--height;
|
||||
padding: 0 15px;
|
||||
line-height: $navbar--height;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
.el-menu-item.is-active,
|
||||
.el-submenu.is-active > .el-submenu__title {
|
||||
color: $--color-text-secondary;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
}
|
||||
.el-menu-item {
|
||||
&:focus,
|
||||
&:hover {
|
||||
.aui-navbar__icon-menu {
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
.el-dropdown {
|
||||
color: $--color-text-primary;
|
||||
.el-icon-arrow-down {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
* {
|
||||
vertical-align: initial;
|
||||
}
|
||||
.aui-navbar__icon-menu {
|
||||
vertical-align: middle;
|
||||
font-size: 16px;
|
||||
}
|
||||
.el-dropdown {
|
||||
color: $--color-text-secondary;
|
||||
.el-icon-arrow-down {
|
||||
width: auto;
|
||||
font-size: 12px;
|
||||
margin: 0 0 0 5px;
|
||||
transition: transform .3s;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-badge {
|
||||
display: inline;
|
||||
z-index: 2;
|
||||
&__content {
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
&__search {
|
||||
> *[class*="el-icon-"],
|
||||
> *[class*="icon"] {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
&-txt {
|
||||
width: 0;
|
||||
transition: width .3s, margin-left .3s;
|
||||
&.is-show {
|
||||
width: 210px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.el-input__inner {
|
||||
height: $navbar--height - 20px;
|
||||
padding: 0;
|
||||
line-height: $navbar--height - 20px;
|
||||
border-color: $--color-text-primary;
|
||||
border-top: 0;
|
||||
border-right: 0;
|
||||
border-left: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
&__avatar {
|
||||
.el-dropdown-link {
|
||||
> img {
|
||||
width: 36px;
|
||||
height: auto;
|
||||
margin-right: 5px;
|
||||
border-radius: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar
|
||||
------------------------------ */
|
||||
.aui-sidebar {
|
||||
position: fixed;
|
||||
top: $navbar--height;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 1020;
|
||||
width: $sidebar--width;
|
||||
background-color: #fff;
|
||||
box-shadow: 1px 0 2px 0 rgba(0, 0, 0, .05);
|
||||
overflow: hidden;
|
||||
transition: width .3s;
|
||||
&--dark {
|
||||
background-color: $sidebar--background-color-dark;
|
||||
.aui-sidebar__menu,
|
||||
> .el-menu--popup {
|
||||
background-color: $sidebar--background-color-dark;
|
||||
.el-menu-item,
|
||||
.el-submenu > .el-submenu__title {
|
||||
color: $sidebar--text-color-dark;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: mix(#fff, $sidebar--text-color-dark, 50%);
|
||||
background-color: mix(#fff, $sidebar--background-color-dark, 2.5%);
|
||||
}
|
||||
}
|
||||
.el-menu,
|
||||
.el-submenu.is-opened {
|
||||
background-color: mix(#000, $sidebar--background-color-dark, 15%);
|
||||
}
|
||||
.el-menu-item.is-active,
|
||||
.el-submenu.is-active > .el-submenu__title {
|
||||
color: mix(#fff, $sidebar--text-color-dark, 80%);
|
||||
}
|
||||
}
|
||||
}
|
||||
&__inner {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: $sidebar--width + 20px;
|
||||
height: 100%;
|
||||
padding-bottom: 15px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
transition: width .3s;
|
||||
}
|
||||
&__menu {
|
||||
width: $sidebar--width;
|
||||
border-right: 0;
|
||||
transition: width .3s;
|
||||
.el-menu-item,
|
||||
.el-submenu__title {
|
||||
height: $sidebar--menu-item-height;
|
||||
line-height: $sidebar--menu-item-height;
|
||||
}
|
||||
}
|
||||
&__menu-icon {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 24px !important;
|
||||
margin-right: 5px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: inherit !important;
|
||||
transition: font-size .3s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Content
|
||||
------------------------------ */
|
||||
.aui-content {
|
||||
position: relative;
|
||||
padding: $content--padding;
|
||||
min-height: calc(100vh - #{$navbar--height});
|
||||
&__wrapper {
|
||||
position: relative;
|
||||
margin-left: $sidebar--width;
|
||||
min-height: calc(100vh - #{$navbar--height});
|
||||
background-color: $content--background-color;
|
||||
transition: margin-left .3s;
|
||||
}
|
||||
> .aui-card--fill > .el-card__body {
|
||||
min-height: calc(#{$content--fill-height} - 2px);
|
||||
}
|
||||
> .aui-card--fill > .el-card__header + .el-card__body {
|
||||
min-height: calc(#{$content--fill-height} - #{$content--card-header-height} - 2px);
|
||||
}
|
||||
&--tabs {
|
||||
padding: $content--tabs-header-height 0 0;
|
||||
}
|
||||
&--tabs-tools {
|
||||
position: fixed;
|
||||
top: $navbar--height;
|
||||
right: 0;
|
||||
z-index: 931;
|
||||
min-width: $content--tabs-header-height;
|
||||
height: $content--tabs-header-height;
|
||||
padding: 0 12px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
line-height: $content--tabs-header-height;
|
||||
background-color: $--background-color-base;
|
||||
cursor: pointer;
|
||||
}
|
||||
&--tabs-icon-nav {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 16px;
|
||||
}
|
||||
> .el-tabs {
|
||||
> .el-tabs__header {
|
||||
position: fixed;
|
||||
top: $navbar--height;
|
||||
left: $sidebar--width;
|
||||
right: 0;
|
||||
z-index: 930;
|
||||
padding: 0 55px 0 15px;
|
||||
margin: 0;
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
|
||||
background-color: #fff;
|
||||
transition: left .3s;
|
||||
> .el-tabs__nav-wrap {
|
||||
margin-bottom: 0;
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
> .el-tabs__nav-next,
|
||||
> .el-tabs__nav-prev {
|
||||
line-height: $content--tabs-header-height;
|
||||
}
|
||||
> .el-tabs__nav-scroll > .el-tabs__nav {
|
||||
& > .el-tabs__active-bar {
|
||||
display: none;
|
||||
}
|
||||
& > .el-tabs__item {
|
||||
height: $content--tabs-header-height;
|
||||
padding: 0 15px;
|
||||
line-height: $content--tabs-header-height;
|
||||
border: 0;
|
||||
color: $--color-text-regular;
|
||||
&:focus,
|
||||
&:hover,
|
||||
&.is-active {
|
||||
color: $--color-text-primary;
|
||||
background-color: $--background-color-base;
|
||||
&:after {
|
||||
display: block;
|
||||
}
|
||||
> .el-icon-close {
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
}
|
||||
&:after {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background-color: $--color-primary;
|
||||
}
|
||||
+ .el-tabs__item {
|
||||
margin-left: 1px;
|
||||
}
|
||||
> .el-icon-close {
|
||||
width: 14px;
|
||||
margin-left: 15px;
|
||||
color: $--color-text-secondary;
|
||||
}
|
||||
> i.icon {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
> .el-tabs__content {
|
||||
padding: $content--padding;
|
||||
.el-loading-mask {
|
||||
z-index: 830;
|
||||
}
|
||||
> .el-tab-pane {
|
||||
min-height: calc(#{$content--fill-height-tabs});
|
||||
> .aui-card--fill > .el-card__body {
|
||||
min-height: calc(#{$content--fill-height-tabs} - 2px);
|
||||
}
|
||||
> .aui-card--fill > .el-card__header + .el-card__body {
|
||||
min-height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px);
|
||||
}
|
||||
&.is-iframe {
|
||||
height: calc(#{$content--fill-height-tabs} + #{$content--padding * 2});
|
||||
margin: -$content--padding;
|
||||
min-height: auto;
|
||||
> .aui-card--fill {
|
||||
background-color: transparent;
|
||||
}
|
||||
> .aui-card--fill > .el-card__header {
|
||||
background-color: #fff;
|
||||
}
|
||||
> .aui-card--fill > .el-card__body {
|
||||
height: calc(#{$content--fill-height-tabs} - 2px);
|
||||
margin: $content--padding;
|
||||
min-height: auto;
|
||||
border: $--border-base;
|
||||
border-color: $--border-color-lighter;
|
||||
border-radius: $--border-radius-base;
|
||||
background-color: #fff;
|
||||
}
|
||||
> .aui-card--fill > .el-card__header + .el-card__body {
|
||||
height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// quill富文本编辑器
|
||||
.ql-toolbar {
|
||||
line-height: 20px;
|
||||
&.ql-snow {
|
||||
border-color: $--border-color-base;
|
||||
}
|
||||
.ql-formats {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
.ql-container {
|
||||
height: 150px;
|
||||
&.ql-snow {
|
||||
border-color: $--border-color-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Page
|
||||
------------------------------ */
|
||||
*[class*="aui-page__"] {
|
||||
padding-top: 0;
|
||||
.aui-content {
|
||||
min-height: auto;
|
||||
&__wrapper {
|
||||
min-height: 100vh;
|
||||
margin-left: 0;
|
||||
}
|
||||
> .aui-card--fill > .el-card__body {
|
||||
min-height: calc(100vh - #{$content--padding * 2} - 2px);
|
||||
}
|
||||
> .aui-card--fill > .el-card__header + .el-card__body {
|
||||
min-height: calc(100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.aui-navbar__header {
|
||||
width: 268px;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
.mod-home {
|
||||
table {
|
||||
width: 100%;
|
||||
border: 1px solid $--border-color-lighter;
|
||||
border-collapse: collapse;
|
||||
th,
|
||||
td {
|
||||
padding: 12px 10px;
|
||||
border: 1px solid $--border-color-lighter;
|
||||
}
|
||||
th {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,447 @@
|
|||
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in
|
||||
* IE on Windows Phone and in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in IE.
|
||||
*/
|
||||
|
||||
figcaption,
|
||||
figure,
|
||||
main { /* 1 */
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct margin in IE 8.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Remove the gray background on active links in IE 10.
|
||||
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent; /* 1 */
|
||||
-webkit-text-decoration-skip: objects; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font style in Android 4.3-.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct background and color in IE 9-.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in iOS 4-7.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10-.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the overflow in IE.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers (opinionated).
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
* controls in Android 4.
|
||||
* 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
html [type="button"], /* 1 */
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct display in IE 9-.
|
||||
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10-.
|
||||
* 2. Remove the padding in IE 10-.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in Edge, IE, and Firefox.
|
||||
*/
|
||||
|
||||
details, /* 1 */
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Scripting
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hidden
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10-.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
.aui-page__not-found {
|
||||
.aui-content {
|
||||
display: flex;
|
||||
flex-flow: column wrap;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
padding: 15% 50px 50px;
|
||||
text-align: center;
|
||||
&__wrapper {
|
||||
height: 100vh;
|
||||
background-color: transparent;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
margin: 0 0 15px;
|
||||
font-size: 10em;
|
||||
font-weight: 400;
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
.desc {
|
||||
margin: 0 0 20px;
|
||||
font-size: 26px;
|
||||
color: $--color-text-secondary;
|
||||
> em {
|
||||
margin: 0 5px;
|
||||
font-style: normal;
|
||||
color: $--color-warning;
|
||||
}
|
||||
}
|
||||
.btn-bar .el-button {
|
||||
margin: 0 15px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.aui-page__not-found {
|
||||
.title {
|
||||
font-size: 8em;
|
||||
}
|
||||
.desc {
|
||||
font-size: 20px;
|
||||
}
|
||||
.btn-bar .el-button {
|
||||
margin: 0 7.5px;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,220 @@
|
|||
.aui-page__login {
|
||||
&::before,
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
content: "";
|
||||
}
|
||||
&::before {
|
||||
background-image: url(~@/assets/img/login_bg.jpg);
|
||||
background-size: cover;
|
||||
}
|
||||
&::after {
|
||||
background-color: rgba(38, 50, 56, .4);
|
||||
}
|
||||
.aui-content {
|
||||
display: flex;
|
||||
flex-flow: column wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
padding: 50px 20px 150px;
|
||||
text-align: center;
|
||||
&__wrapper {
|
||||
height: 100vh;
|
||||
background-color: transparent;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.login-header {
|
||||
padding: 20px;
|
||||
color: #fff;
|
||||
.login-brand {
|
||||
margin: 0 0 15px;
|
||||
font-size: 40px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.login-intro {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
> li {
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
color: rgba(255, 255, 255, .6);
|
||||
& + li {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.login-body,
|
||||
.login-footer {
|
||||
width: 460px;
|
||||
}
|
||||
.login-body {
|
||||
padding: 20px 30px;
|
||||
background-color: #fff;
|
||||
.login-title {
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.el-input__prefix .el-input__icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
.login-captcha {
|
||||
height: $--input-height;
|
||||
line-height: $--input-height -2px;
|
||||
> img {
|
||||
max-width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.login-shortcut {
|
||||
margin-bottom: 20px;
|
||||
&__title {
|
||||
position: relative;
|
||||
margin: 0 0 15px;
|
||||
font-weight: 400;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
content: "";
|
||||
height: 1px;
|
||||
margin-top: -.5px;
|
||||
background-color: $--border-color-base;
|
||||
overflow: hidden;
|
||||
}
|
||||
> span {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0 20px;
|
||||
color: rgba(0, 0, 0, .3);
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
&__list {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
font-size: 0;
|
||||
> li {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: 0 10px;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.login-guide {
|
||||
color: rgba(0, 0, 0, .3);
|
||||
}
|
||||
}
|
||||
.login-footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding: 20px;
|
||||
color: rgba(255, 255, 255, .6);
|
||||
p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
a {
|
||||
padding: 0 5px;
|
||||
color: rgba(255, 255, 255, .6);
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 右侧垂直风格
|
||||
&--right-vertical {
|
||||
.aui-content {
|
||||
flex-flow: row nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
padding: 0;
|
||||
}
|
||||
.login-header {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-flow: column wrap;
|
||||
justify-content: center;
|
||||
padding: 30px 120px;
|
||||
text-align: left;
|
||||
}
|
||||
.login-body {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-flow: column wrap;
|
||||
justify-content: center;
|
||||
padding: 120px 30px 150px;
|
||||
text-align: center;
|
||||
.login-guide {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
.login-footer {
|
||||
right: 0;
|
||||
color: $--color-text-regular;
|
||||
a {
|
||||
color: $--color-text-regular;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.aui-page__login {
|
||||
&--right-vertical {
|
||||
.login-header {
|
||||
padding: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.aui-page__login {
|
||||
&--right-vertical {
|
||||
.login-header {
|
||||
.login-brand,
|
||||
.login-intro {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (max-width: 575px) {
|
||||
.aui-page__login {
|
||||
.login-body,
|
||||
.login-footer {
|
||||
width: 100%;
|
||||
}
|
||||
.login-captcha {
|
||||
text-align: left;
|
||||
> img {
|
||||
width: 136px;
|
||||
}
|
||||
}
|
||||
&--right-vertical {
|
||||
.login-header {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
// Base
|
||||
$base--line-height: 1.15;
|
||||
|
||||
// Navbar
|
||||
$navbar--height: 50px;
|
||||
|
||||
// Sidebar
|
||||
$sidebar--width: 230px;
|
||||
$sidebar--width-fold: 64px;
|
||||
$sidebar--background-color-dark: #263238;
|
||||
$sidebar--text-color-dark: #8a979e;
|
||||
$sidebar--menu-item-height: 48px;
|
||||
|
||||
// Content
|
||||
$content--padding: 15px;
|
||||
$content--background-color: #f1f4f5;
|
||||
$content--card-header-height: 60px;
|
||||
$content--tabs-header-height: 38px;
|
||||
// Content, 填充整屏高度(非tabs状态) = 整屏高度 - 导航条高度 - aui-content上下内边距高度
|
||||
$content--fill-height: calc(100vh - #{$navbar--height} - #{$content--padding * 2});
|
||||
// Content, 填充整屏高度(是tabs状态) = 整屏高度 - 导航条高度 - tabs组件header高度 - tabs组件content上下内边距高度
|
||||
$content--fill-height-tabs: calc(100vh - #{$navbar--height} - #{$content--tabs-header-height} - #{$content--padding * 2});
|
|
@ -0,0 +1,76 @@
|
|||
<template>
|
||||
<div class="bar-container"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
const echarts = require('echarts/lib/echarts')
|
||||
require('echarts/lib/chart/bar')
|
||||
require('echarts/lib/component/legend')
|
||||
require('echarts/lib/component/title')
|
||||
|
||||
export default {
|
||||
props: {
|
||||
option: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
hasClick:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
option: {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler () {
|
||||
if (!this.option) { return }
|
||||
if (!this.$el) {
|
||||
this.$on('hook:mounted', this.initChart)
|
||||
} else {
|
||||
this.initChart()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.cahrt) {
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initChart () {
|
||||
if (!this.chart) {
|
||||
this.chart = echarts.init(this.$el)
|
||||
}
|
||||
this.chart.setOption(this.option)
|
||||
if(this.hasClick){
|
||||
this.chart.on('click', (param) => {
|
||||
this.pointClick(param);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
pointClick(param){
|
||||
if(param.name){
|
||||
this.$emit('barChange',param.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bar-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,7 @@
|
|||
import RenDeptTree from './src/ren-dept-tree'
|
||||
|
||||
RenDeptTree.install = function (Vue) {
|
||||
Vue.component(RenDeptTree.name, RenDeptTree)
|
||||
}
|
||||
|
||||
export default RenDeptTree
|
|
@ -0,0 +1,119 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-input v-model="showDeptName" :placeholder="placeholder" @focus="deptDialog">
|
||||
<el-button slot="append" icon="el-icon-search" @click="deptDialog"></el-button>
|
||||
</el-input>
|
||||
<el-input :value="value" style="display: none"></el-input>
|
||||
<el-dialog :visible.sync="visibleDept" width="30%" :modal="false" :title="placeholder" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form size="mini" :inline="true">
|
||||
<el-form-item :label="$t('keyword')">
|
||||
<el-input v-model="filterText"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- <el-button type="default">{{ $t('query') }}</el-button> -->
|
||||
<el-button type="default">{{ $t('query') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-tree
|
||||
class="filter-tree"
|
||||
:data="deptList"
|
||||
:default-expanded-keys="expandedKeys"
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
:highlight-current="true"
|
||||
node-key="id"
|
||||
ref="tree">
|
||||
</el-tree>
|
||||
<template slot="footer">
|
||||
<el-button type="default" @click="cancelHandle()" size="mini">{{ $t('cancel') }}</el-button>
|
||||
<el-button v-if="query" type="info" @click="clearHandle()" size="mini">{{ $t('clear') }}</el-button>
|
||||
<el-button type="primary" @click="commitHandle()" size="mini">{{ $t('confirm') }}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'RenDeptTree',
|
||||
data () {
|
||||
return {
|
||||
filterText: '',
|
||||
visibleDept: false,
|
||||
deptList: [],
|
||||
showDeptName: '',
|
||||
expandedKeys: null,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
value: [Number, String],
|
||||
deptName: String,
|
||||
query: Boolean,
|
||||
placeholder: String
|
||||
},
|
||||
watch: {
|
||||
filterText (val) {
|
||||
this.$refs.tree.filter(val)
|
||||
},
|
||||
deptName (val) {
|
||||
this.showDeptName = val
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
deptDialog () {
|
||||
this.expandedKeys = null
|
||||
if (this.$refs.tree) {
|
||||
this.$refs.tree.setCurrentKey(null)
|
||||
}
|
||||
this.visibleDept = true
|
||||
this.getDeptList(this.value)
|
||||
},
|
||||
filterNode (value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
getDeptList (id) {
|
||||
return this.$http.get('/sys/dept/list').then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.deptList = res.data
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.setCurrentKey(id)
|
||||
this.expandedKeys = [id]
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
cancelHandle () {
|
||||
this.visibleDept = false
|
||||
this.deptList = []
|
||||
this.filterText = ''
|
||||
},
|
||||
clearHandle () {
|
||||
this.$emit('input', '')
|
||||
this.$emit('update:deptName', '')
|
||||
this.showDeptName = ''
|
||||
this.visibleDept = false
|
||||
this.deptList = []
|
||||
this.filterText = ''
|
||||
},
|
||||
commitHandle () {
|
||||
const node = this.$refs.tree.getCurrentNode()
|
||||
if (!node) {
|
||||
this.$message.error(this.$t('dept.chooseerror'))
|
||||
return
|
||||
}
|
||||
this.$emit('input', node.id)
|
||||
this.$emit('update:deptName', node.name)
|
||||
this.showDeptName = node.name
|
||||
this.visibleDept = false
|
||||
this.deptList = []
|
||||
this.filterText = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,7 @@
|
|||
import RenProcessDetail from './src/ren-process-detail'
|
||||
|
||||
RenProcessDetail.install = function (Vue) {
|
||||
Vue.component(RenProcessDetail.name, RenProcessDetail)
|
||||
}
|
||||
|
||||
export default RenProcessDetail
|
|
@ -0,0 +1,94 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-11 16:30:04
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-06 13:14:02
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<!-- 流程图 -->
|
||||
<h4>{{ $t('process.flowImage') }}</h4>
|
||||
<img :src="getResourceURL()" class="image">
|
||||
<!-- 流转详情 -->
|
||||
<h4>{{ $t('process.circulation') }}</h4>
|
||||
<div class="mod-sys__dict">
|
||||
<el-table
|
||||
v-loading="dataListLoading"
|
||||
:data="dataList"
|
||||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;">
|
||||
<!-- 任务名称 -->
|
||||
<el-table-column prop="activityName" :label="$t('process.taskName')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 处理人 -->
|
||||
<el-table-column prop="assigneeName" :label="$t('process.assignee')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 流程开始时间 -->
|
||||
<el-table-column prop="startTime" :label="$t('task.startTime')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 流程结束时间 -->
|
||||
<el-table-column prop="endTime" :label="$t('task.endTime')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 审核意见 -->
|
||||
<el-table-column prop="comment" :label="$t('process.comment')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 任务时长(秒) -->
|
||||
<el-table-column prop="durationInSeconds" :label="$t('task.durationInSeconds')" header-align="center" align="center" width="180"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
v-if="dataForm.pid === '0'"
|
||||
: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>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<style scoped>
|
||||
.image {
|
||||
width: 60%;
|
||||
display: block;
|
||||
margin: 0 auto 30px auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
import qs from 'qs'
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
name: 'RenProcessDetail',
|
||||
data () {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/act/his/getTaskHandleDetailInfo',
|
||||
getDataListIsPage: false,
|
||||
createdIsNeed: false,
|
||||
deleteIsBatch: true,
|
||||
deleteIsBatchKey: 'deploymentId'
|
||||
},
|
||||
dataForm: {
|
||||
processInstanceId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.dataForm.processInstanceId = this.$route.params.processInstanceId
|
||||
this.getResourceURL()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 获取流程(xml/image)url地址
|
||||
getResourceURL () {
|
||||
const params = qs.stringify({
|
||||
token: Cookies.get('ucsToken'),
|
||||
processInstanceId: this.dataForm.processInstanceId
|
||||
})
|
||||
return `${window.SITE_CONFIG.apiURL}/act/his/getInstImage?${params}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,7 @@
|
|||
import RenProcessMultiple from './src/ren-process-multiple'
|
||||
|
||||
RenProcessMultiple.install = function (Vue) {
|
||||
Vue.component(RenProcessMultiple.name, RenProcessMultiple)
|
||||
}
|
||||
|
||||
export default RenProcessMultiple
|
|
@ -0,0 +1,97 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-11 16:30:04
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-04-13 10:39:43
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<!-- 启动 -->
|
||||
<ren-process-start v-if="startProcessVisible" :saveFormUrl="saveFormUrl" :updateInstanceIdUrl="updateInstanceIdUrl" :dataFormName="dataFormName" ref="renProcessStart"></ren-process-start>
|
||||
<!-- 审批 -->
|
||||
<ren-process-running v-if="runningHandleVisible" ref="renProcessRunning"></ren-process-running>
|
||||
<!-- 详情 -->
|
||||
<ren-process-detail v-if="processDetailVisible" ref="renProcessDetail"></ren-process-detail>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'RenProcessMultiple',
|
||||
data () {
|
||||
return {
|
||||
// 是否显示启动流程
|
||||
startProcessVisible: false,
|
||||
// 是否任务处理
|
||||
runningHandleVisible: false,
|
||||
// 是否显示流程处理详情
|
||||
processDetailVisible: false,
|
||||
// 用于区分流程启动(start)、任务处理(taskHandle)以及查看详情(null)
|
||||
showType: null,
|
||||
// 父级对象
|
||||
parentObj: null,
|
||||
dataForm: {
|
||||
processDefinitionKey: '',
|
||||
taskId: '',
|
||||
businessKey: '',
|
||||
processInstanceId: ''
|
||||
},
|
||||
// 回调函数
|
||||
callbacks: {
|
||||
// 启动成功回调
|
||||
startProcessSuccessCallback: null,
|
||||
// 启动失败回调
|
||||
startProcessErrorCallback: null,
|
||||
// 任务处理成功回调
|
||||
taskHandleSuccessCallback: null,
|
||||
// 任务处理失败回调
|
||||
taskHandleErrorCallback: null,
|
||||
// 表单保存成功回调
|
||||
formSaveSuccessCallback: null,
|
||||
// 表单保存失败回调
|
||||
formSaveErrorCallback: null
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(() => {
|
||||
if (!this.showType) {
|
||||
this.startProcessVisible = false
|
||||
this.runningHandleVisible = false
|
||||
this.processDetailVisible = true
|
||||
} else if (this.showType === 'start') {
|
||||
// 启动流程
|
||||
this.startProcessVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.renProcessStart.rootObj = this.parentObj
|
||||
this.$refs.renProcessStart.callbacks = this.callbacks
|
||||
this.$refs.renProcessStart.dataForm.processDefinitionKey = this.dataForm.processDefinitionKey
|
||||
})
|
||||
} else if (this.showType === 'taskHandle') {
|
||||
// 任务处理
|
||||
this.runningHandleVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.renProcessRunning.rootObj = this.parentObj
|
||||
this.$refs.renProcessRunning.dataForm.taskId = this.dataForm.taskId
|
||||
this.$refs.renProcessRunning.dataForm.processInstanceId = this.dataForm.processInstanceId
|
||||
this.$refs.renProcessRunning.callbacks = this.callbacks
|
||||
this.$refs.renProcessRunning.dataForm.businessKey = this.dataForm.businessKey
|
||||
this.$refs.renProcessRunning.dataForm.processDefinitionKey = this.dataForm.processDefinitionKey
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
props: {
|
||||
saveFormUrl: String,
|
||||
updateInstanceIdUrl: String,
|
||||
dataFormName: String
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,7 @@
|
|||
import RenProcessRunning from './src/ren-process-running'
|
||||
|
||||
RenProcessRunning.install = function (Vue) {
|
||||
Vue.component(RenProcessRunning.name, RenProcessRunning)
|
||||
}
|
||||
|
||||
export default RenProcessRunning
|
|
@ -0,0 +1,108 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- 通过 -->
|
||||
<el-button type="primary" @click="completeTask()">{{ $t('process.completeTask') }}</el-button>
|
||||
<!-- 驳回 -->
|
||||
<el-button type="warning" @click="rejectTask()">{{ $t('process.rejectTask') }}</el-button>
|
||||
<!-- 回退 -->
|
||||
<el-button type="success" @click="rollbackTask()">{{ $t('process.doBackRollback') }}</el-button>
|
||||
<!-- 委托 -->
|
||||
<el-button type="info" @click="entrustTask()">{{ $t('process.entrustTask') }}</el-button>
|
||||
<!-- 终止 -->
|
||||
<el-button type="danger" @click="terminationTask()">{{ $t('process.terminationTask') }}</el-button>
|
||||
<!-- 回退 -->
|
||||
<ren-task-back v-if="renTaskBackVisible" ref="renTaskBack"></ren-task-back>
|
||||
<!-- 委托 -->
|
||||
<ren-task-entrust v-if="renTaskEntrustVisible" ref="renTaskEntrust"></ren-task-entrust>
|
||||
<!-- 驳回理由 -->
|
||||
<ren-task-handle v-if="renTaskHandleVisible" ref="renTaskHandle"></ren-task-handle>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RenTaskBack from './ren-task-back'
|
||||
import RenTaskEntrust from './ren-task-entrust'
|
||||
import RenTaskHandle from './ren-task-handle'
|
||||
export default {
|
||||
name: 'RenProcessRunning',
|
||||
data () {
|
||||
return {
|
||||
// 是否显示退回窗口
|
||||
renTaskBackVisible: false,
|
||||
renTaskEntrustVisible: false,
|
||||
renTaskHandleVisible: false,
|
||||
parentObj: null,
|
||||
dataForm: {
|
||||
taskId: '',
|
||||
businessKey: '',
|
||||
processDefinitionKey: '',
|
||||
processInstanceId: ''
|
||||
},
|
||||
// 回调函数
|
||||
callbacks: {
|
||||
taskHandleSuccessCallback: null,
|
||||
taskHandleErrorCallback: null
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
RenTaskBack,
|
||||
RenTaskEntrust,
|
||||
RenTaskHandle
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(() => {
|
||||
})
|
||||
},
|
||||
props: {
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
methods: {
|
||||
completeTask () {
|
||||
this.renTaskHandleVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.renTaskHandle.dataForm.taskId = this.dataForm.taskId
|
||||
this.$refs.renTaskHandle.callbacks = this.callbacks
|
||||
this.$refs.renTaskHandle.handleType = 'complete'
|
||||
this.$refs.renTaskHandle.init()
|
||||
})
|
||||
},
|
||||
rejectTask () {
|
||||
this.renTaskHandleVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.renTaskHandle.dataForm.taskId = this.dataForm.taskId
|
||||
this.$refs.renTaskHandle.callbacks = this.callbacks
|
||||
this.$refs.renTaskHandle.handleType = 'reject'
|
||||
this.$refs.renTaskHandle.init()
|
||||
})
|
||||
},
|
||||
rollbackTask () {
|
||||
this.renTaskBackVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.renTaskBack.dataForm.taskId = this.dataForm.taskId
|
||||
this.$refs.renTaskBack.dataForm.processInstanceId = this.dataForm.processInstanceId
|
||||
this.$refs.renTaskBack.callbacks = this.callbacks
|
||||
this.$refs.renTaskBack.init()
|
||||
})
|
||||
},
|
||||
entrustTask () {
|
||||
this.renTaskEntrustVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.renTaskEntrust.dataForm.taskId = this.dataForm.taskId
|
||||
this.$refs.renTaskEntrust.callbacks = this.callbacks
|
||||
this.$refs.renTaskEntrust.init()
|
||||
})
|
||||
},
|
||||
terminationTask () {
|
||||
this.renTaskHandleVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.renTaskHandle.dataForm.taskId = this.dataForm.taskId
|
||||
this.$refs.renTaskHandle.callbacks = this.callbacks
|
||||
this.$refs.renTaskHandle.handleType = 'termination'
|
||||
this.$refs.renTaskHandle.init()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,85 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="visible" :title="$t('process.doBackRollback')" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
|
||||
<el-form-item :label="$t('process.comment')" prop="comment">
|
||||
<el-input type="textarea" v-model="dataForm.comment" :placeholder="$t('process.comment')"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template slot="footer">
|
||||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||
<el-button type="primary" @click="doBackRollback()">{{ $t('confirm') }}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from 'lodash/debounce'
|
||||
import qs from 'qs'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: '',
|
||||
comment: '',
|
||||
taskId: '',
|
||||
processInstanceId: ''
|
||||
},
|
||||
// 回调函数
|
||||
callbacks: {
|
||||
taskHandleSuccessCallback: null,
|
||||
taskHandleErrorCallback: null
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dataRule () {
|
||||
return {
|
||||
comment: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
})
|
||||
},
|
||||
doBackRollback: debounce(function () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
var params = qs.stringify({
|
||||
'taskId': this.dataForm.taskId,
|
||||
'processInstanceId': this.dataForm.processInstanceId,
|
||||
'comment': this.dataForm.comment
|
||||
})
|
||||
this.$http['post']('/act/task/backPreviousTask?', params).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
if (this.callbacks.taskHandleErrorCallback) {
|
||||
this.callbacks.taskHandleErrorCallback(res)
|
||||
}
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
if (this.callbacks.taskHandleSuccessCallback) {
|
||||
this.callbacks.taskHandleSuccessCallback(res)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}, 1000, { 'leading': true, 'trailing': false })
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="visible" :title="$t('process.entrustTask')" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
|
||||
<el-form-item :label="$t('process.assignee')">
|
||||
<el-input v-model="dataForm.entrustUserName" class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="selectUserInfo()"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template slot="footer">
|
||||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||
<el-button type="primary" @click="entrustTask()">{{ $t('confirm') }}</el-button>
|
||||
</template>
|
||||
<select-user v-if="selectUserVisible" ref="selectUser" ></select-user>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SelectUser from './select-user'
|
||||
import qs from 'qs'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
selectUserVisible: false,
|
||||
dataForm: {
|
||||
id: '',
|
||||
entrustUserId: '',
|
||||
entrustUserName: '',
|
||||
taskId: ''
|
||||
},
|
||||
// 回调函数
|
||||
callbacks: {
|
||||
taskHandleSuccessCallback: null,
|
||||
taskHandleErrorCallback: null
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dataRule () {
|
||||
return {
|
||||
entrustUserName: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
SelectUser
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
})
|
||||
},
|
||||
// 委托
|
||||
entrustTask () {
|
||||
if (!this.dataForm.entrustUserId) {
|
||||
this.$message.error(this.$t('process.entrustError'))
|
||||
return
|
||||
}
|
||||
var task = qs.stringify({
|
||||
taskId: this.dataForm.taskId,
|
||||
assignee: this.dataForm.entrustUserId
|
||||
})
|
||||
this.$http['post']('/act/task/entrust', task).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
if (this.callbacks.taskHandleErrorCallback) {
|
||||
this.callbacks.taskHandleErrorCallback(res)
|
||||
}
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
if (this.callbacks.taskHandleSuccessCallback) {
|
||||
this.callbacks.taskHandleSuccessCallback(res)
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
selectUserInfo () {
|
||||
this.selectUserVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.selectUser.dataForm.id = ''
|
||||
this.$refs.selectUser.init(this.setUserInfo)
|
||||
})
|
||||
},
|
||||
setUserInfo (userInfo) {
|
||||
this.dataForm.entrustUserId = userInfo.id
|
||||
this.dataForm.entrustUserName = userInfo.realName
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,175 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="visible" :title="handleTitle" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
|
||||
<el-form-item :label="$t('process.comment')" prop="comment">
|
||||
<el-input type="textarea" v-model="dataForm.comment" :placeholder="$t('process.comment')"></el-input>
|
||||
</el-form-item>
|
||||
</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>
|
||||
|
||||
<script>
|
||||
import debounce from 'lodash/debounce'
|
||||
import qs from 'qs'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
handleType: '',
|
||||
handleTitle: '',
|
||||
dataForm: {
|
||||
comment: '',
|
||||
taskId: ''
|
||||
},
|
||||
// 回调函数
|
||||
callbacks: {
|
||||
taskHandleSuccessCallback: null,
|
||||
taskHandleErrorCallback: null
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dataRule () {
|
||||
return {
|
||||
comment: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.visible = true
|
||||
if (this.handleType === 'complete') {
|
||||
this.handleTitle = this.$t('process.completeTask')
|
||||
} else if (this.handleType === 'reject') {
|
||||
this.handleTitle = this.$t('process.rejectTask')
|
||||
} else if (this.handleType === 'termination') {
|
||||
this.handleTitle = this.$t('process.terminationTask')
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle () {
|
||||
if (this.handleType === 'complete') {
|
||||
this.completeTask()
|
||||
} else if (this.handleType === 'reject') {
|
||||
this.rejectTask()
|
||||
} else if (this.handleType === 'termination') {
|
||||
this.terminationTask()
|
||||
}
|
||||
},
|
||||
// 驳回
|
||||
rejectTask: debounce(function () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
if (!this.dataForm.taskId) {
|
||||
return false
|
||||
}
|
||||
var params = qs.stringify({
|
||||
'taskId': this.dataForm.taskId,
|
||||
'comment': this.dataForm.comment
|
||||
})
|
||||
this.$http['post']('/act/task/backToFirst?', params).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
if (this.callbacks.taskHandleErrorCallback) {
|
||||
this.callbacks.taskHandleErrorCallback(res)
|
||||
}
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
if (this.callbacks.taskHandleSuccessCallback) {
|
||||
this.callbacks.taskHandleSuccessCallback(res)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}, 1000, { 'leading': true, 'trailing': false }),
|
||||
// 通过
|
||||
completeTask: debounce(function () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
if (!this.dataForm.taskId) {
|
||||
return false
|
||||
}
|
||||
var params = qs.stringify({
|
||||
'taskId': this.dataForm.taskId,
|
||||
'comment': this.dataForm.comment
|
||||
})
|
||||
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
if (this.callbacks.taskHandleErrorCallback) {
|
||||
this.callbacks.taskHandleErrorCallback(res)
|
||||
}
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
if (this.callbacks.taskHandleSuccessCallback) {
|
||||
this.callbacks.taskHandleSuccessCallback(res)
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
})
|
||||
}, 1000, { 'leading': true, 'trailing': false }),
|
||||
// 终止
|
||||
terminationTask: debounce(function () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
if (!this.dataForm.taskId) {
|
||||
return false
|
||||
}
|
||||
var task = qs.stringify({
|
||||
taskId: this.dataForm.taskId,
|
||||
comment: this.dataForm.comment
|
||||
})
|
||||
this.$http['post']('/act/task/endProcess', task).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
if (this.callbacks.taskHandleErrorCallback) {
|
||||
this.callbacks.taskHandleErrorCallback(res)
|
||||
}
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
if (this.callbacks.taskHandleSuccessCallback) {
|
||||
this.callbacks.taskHandleSuccessCallback(res)
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
})
|
||||
}, 1000, { 'leading': true, 'trailing': false })
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="visibleSelect" width="60%" :modal="false" :title="$t('user.select')" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" size="mini" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.username" :placeholder="$t('user.username')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="dataListLoading"
|
||||
:data="dataList"
|
||||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;" size="mini">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="username" :label="$t('user.username')" sortable="custom" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="deptName" :label="$t('user.deptName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="email" :label="$t('user.email')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="mobile" :label="$t('user.mobile')" sortable="custom" header-align="center" align="center"></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>
|
||||
</div>
|
||||
<template slot="footer">
|
||||
<el-button type="default" @click="cancelHandle()">{{ $t('cancel') }}</el-button>
|
||||
<el-button type="primary" @click="commitHandle()">{{ $t('confirm') }}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data () {
|
||||
return {
|
||||
visibleSelect: false,
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/sys/user/page',
|
||||
getDataListIsPage: true
|
||||
},
|
||||
dataForm: {
|
||||
username: ''
|
||||
},
|
||||
callback: null
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
init (callback) {
|
||||
this.visibleSelect = true
|
||||
this.callback = callback
|
||||
this.$nextTick(() => {
|
||||
this.getDataList()
|
||||
})
|
||||
},
|
||||
cancelHandle () {
|
||||
this.visibleSelect = false
|
||||
},
|
||||
commitHandle () {
|
||||
if (this.callback) {
|
||||
if (this.dataListSelections.length !== 1) {
|
||||
this.$message.error(this.$t('user.selecterror'))
|
||||
return
|
||||
} else {
|
||||
this.callback(this.dataListSelections[0])
|
||||
}
|
||||
}
|
||||
this.visibleSelect = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,7 @@
|
|||
import RenProcessStart from './src/ren-process-start'
|
||||
|
||||
RenProcessStart.install = function (Vue) {
|
||||
Vue.component(RenProcessStart.name, RenProcessStart)
|
||||
}
|
||||
|
||||
export default RenProcessStart
|
|
@ -0,0 +1,134 @@
|
|||
<template>
|
||||
<el-button type="primary" @click="processStartHandle()">{{ $t('process.createInstance') }}</el-button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import qs from 'qs'
|
||||
export default {
|
||||
name: 'RenProcessStart',
|
||||
data () {
|
||||
return {
|
||||
formUrl: '',
|
||||
instanceIdUrl: '',
|
||||
formName: null,
|
||||
rootObj: null,
|
||||
dataForm: {
|
||||
processDefinitionKey: ''
|
||||
},
|
||||
// 回调函数
|
||||
callbacks: {
|
||||
startProcessSuccessCallback: null,
|
||||
startProcessErrorCallback: null,
|
||||
formSaveSuccessCallback: null,
|
||||
formSaveErrorCallback: null
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(() => {
|
||||
this.formUrl = this.saveFormUrl
|
||||
this.instanceIdUrl = this.updateInstanceIdUrl
|
||||
this.formName = this.dataFormName
|
||||
})
|
||||
},
|
||||
props: {
|
||||
saveFormUrl: String,
|
||||
updateInstanceIdUrl: String,
|
||||
dataFormName: String
|
||||
},
|
||||
watch: {
|
||||
saveFormUrl (val) {
|
||||
this.formUrl = val
|
||||
},
|
||||
updateInstanceIdUrl (val) {
|
||||
this.instanceIdUrl = val
|
||||
},
|
||||
dataFormName (val) {
|
||||
this.formName = val
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 启动流程事件 processDefinitionKey 流程定义key businessKey
|
||||
processStartHandle () {
|
||||
if (!this.formUrl) {
|
||||
return this.$message.error(this.$t('process.formURLError'))
|
||||
}
|
||||
if (!this.dataForm.processDefinitionKey) {
|
||||
return this.$message.error(this.$t('process.keyError'))
|
||||
}
|
||||
if (!this.formName) {
|
||||
return this.$message.error(this.$t('process.formNameError'))
|
||||
}
|
||||
this.rootObj.$refs[this.formName].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
this.$http.get(`/act/process/lastestPage`, {
|
||||
params: {
|
||||
key: this.dataForm.processDefinitionKey
|
||||
}
|
||||
}).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
if (!res.data.list || res.data.list.length <= 0) {
|
||||
return this.$message.error(this.$t('process.notExistError'))
|
||||
}
|
||||
this.$http['post'](this.formUrl, this.rootObj[this.formName]).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
if (this.callbacks.formSaveErrorCallback) {
|
||||
this.callbacks.formSaveErrorCallback(res)
|
||||
}
|
||||
}
|
||||
if (this.callbacks.formSaveSuccessCallback) {
|
||||
this.callbacks.formSaveSuccessCallback(res)
|
||||
}
|
||||
if (!res.data.businessKey) {
|
||||
return this.$message.error(this.$t('process.businessKeyError'))
|
||||
// this.startProcess(this.dataForm.processDefinitionKey, null, this.rootObj[this.formName])
|
||||
} else {
|
||||
this.startProcess(this.dataForm.processDefinitionKey, res.data.businessKey, this.rootObj[this.formName])
|
||||
}
|
||||
}).catch(() => {})
|
||||
}).catch(() => {})
|
||||
})
|
||||
},
|
||||
// 启动流程
|
||||
startProcess (processDefinitionKey, businessKey, formData) {
|
||||
var data = {
|
||||
processDefinitionKey: processDefinitionKey,
|
||||
businessKey: businessKey,
|
||||
variables: formData
|
||||
}
|
||||
this.$http['post']('/act/running/startOfBusinessKey', data).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
if (this.callbacks.startProcessErrorCallback) {
|
||||
this.callbacks.startProcessErrorCallback(res.data)
|
||||
}
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
if (this.callbacks.startProcessSuccessCallback) {
|
||||
this.callbacks.startProcessSuccessCallback(res.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
if (this.instanceIdUrl) {
|
||||
var params = qs.stringify({
|
||||
processInstanceId: res.data.processInstanceId,
|
||||
processDefinitionKey: processDefinitionKey,
|
||||
businessKey: businessKey
|
||||
})
|
||||
this.$http['post'](this.instanceIdUrl + '?' + params).then(({ data: res }) => {})
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,7 @@
|
|||
import RenRadioGroup from './src/ren-radio-group'
|
||||
|
||||
RenRadioGroup.install = function (Vue) {
|
||||
Vue.component(RenRadioGroup.name, RenRadioGroup)
|
||||
}
|
||||
|
||||
export default RenRadioGroup
|