Commit 465ea8ff by 肖小磊

HK

parents
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["istanbul"]
}
}
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
.project
\ No newline at end of file
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
// to edit target browsers: use "browserlist" field in package.json
"autoprefixer": {}
}
}
# gomax
> A Vue.js project
## width 90%
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
require('./check-versions')()
process.env.NODE_ENV = 'production'
var ora = require('ora')
var rm = require('rimraf')
var path = require('path')
var chalk = require('chalk')
var webpack = require('webpack')
var config = require('../config')
var webpackConfig = require('./webpack.prod.conf')
var spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, function (err, stats) {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n\n')
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
var chalk = require('chalk')
var semver = require('semver')
var packageConfig = require('../package.json')
var shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
var versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
},
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
var warnings = []
for (var i = 0; i < versionRequirements.length; i++) {
var mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (var i = 0; i < warnings.length; i++) {
var warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
/* eslint-disable */
require('eventsource-polyfill')
var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
hotClient.subscribe(function (event) {
if (event.action === 'reload') {
window.location.reload()
}
})
require('./check-versions')()
var config = require('../config')
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
}
var opn = require('opn')
var path = require('path')
var express = require('express')
var webpack = require('webpack')
var proxyMiddleware = require('http-proxy-middleware')
var webpackConfig = require('./webpack.dev.conf')
// default port where dev server listens for incoming traffic
var port = process.env.PORT || config.dev.port
// automatically open browser, if not set will be false
var autoOpenBrowser = !!config.dev.autoOpenBrowser
// Define HTTP proxies to your custom API backend
// https://github.com/chimurai/http-proxy-middleware
var proxyTable = config.dev.proxyTable
var app = express()
var compiler = webpack(webpackConfig)
var devMiddleware = require('webpack-dev-middleware')(compiler, {
publicPath: webpackConfig.output.publicPath,
quiet: true
})
var hotMiddleware = require('webpack-hot-middleware')(compiler, {
log: () => {}
})
// force page reload when html-webpack-plugin template changes
compiler.plugin('compilation', function (compilation) {
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
hotMiddleware.publish({ action: 'reload' })
cb()
})
})
// proxy api requests
Object.keys(proxyTable).forEach(function (context) {
var options = proxyTable[context]
if (typeof options === 'string') {
options = { target: options }
}
app.use(proxyMiddleware(options.filter || context, options))
})
// handle fallback for HTML5 history API
app.use(require('connect-history-api-fallback')())
// serve webpack bundle output
app.use(devMiddleware)
// enable hot-reload and state-preserving
// compilation error display
app.use(hotMiddleware)
// serve pure static assets
var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
app.use(staticPath, express.static('./static'))
var uri = 'http://localhost:' + port
var _resolve
var readyPromise = new Promise(resolve => {
_resolve = resolve
})
console.log('> Starting dev server...')
devMiddleware.waitUntilValid(() => {
console.log('> Listening at ' + uri + '\n')
// when env is testing, don't need open it
if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
opn(uri)
}
_resolve()
})
var server = app.listen(port)
module.exports = {
ready: readyPromise,
close: () => {
server.close()
}
}
var path = require('path')
var config = require('../config')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
exports.assetsPath = function (_path) {
var assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
var cssLoader = {
loader: 'css-loader',
options: {
minimize: process.env.NODE_ENV === 'production',
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
var loaders = [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
var output = []
var loaders = exports.cssLoaders(options)
for (var extension in loaders) {
var loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
var utils = require('./utils')
var config = require('../config')
var isProduction = process.env.NODE_ENV === 'production'
module.exports = {
loaders: utils.cssLoaders({
sourceMap: isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap,
extract: isProduction
})
}
var path = require('path')
var utils = require('./utils')
var config = require('../config')
var vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src')
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
}
}
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
})
module.exports = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
},
// cheap-module-eval-source-map is faster for development
devtool: '#cheap-module-eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
new FriendlyErrorsPlugin()
]
})
var path = require('path')
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var CopyWebpackPlugin = require('copy-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
var env = config.build.env
var webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true
})
},
devtool: config.build.productionSourceMap ? '#source-map' : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
sourceMap: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css')
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: {
safe: true
}
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
chunks: ['vendor']
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
var CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig
var merge = require('webpack-merge')
var prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: require('./prod.env'),
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
},
dev: {
env: require('./dev.env'),
port: 8094,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
}
}
module.exports = {
NODE_ENV: '"production"'
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>gomax</title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
</head>
<body>
<div id="app"></div>
</body>
</html>
{
"name": "gomax",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "wanzhou.li <wanzhou.li@freemud.cn>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"start": "node build/dev-server.js",
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.16.2",
"echarts": "^3.6.2",
"element-ui": "^1.3.7",
"vue": "^2.3.3",
"vue-router": "^2.3.1"
},
"devDependencies": {
"autoprefixer": "^6.7.2",
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.11.1",
"friendly-errors-webpack-plugin": "^1.1.3",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3",
"webpack-bundle-analyzer": "^2.2.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"opn": "^4.0.2",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"ora": "^1.2.0",
"rimraf": "^2.6.0",
"url-loader": "^0.5.8",
"vue-loader": "^12.1.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.3.3",
"webpack": "^2.6.1",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.18.0",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
<template>
<div id="app" class="app-body">
<router-view></router-view>
</div>
</template>
<style>
html, body, .app-body{
margin: 0;
padding: 0;
}
</style>
<template>
<div id="app">
<header class="header">
<el-row>
<el-col :span="24">
<el-menu theme="dark" class="el-menu-demo" mode="horizontal">
<span class="ComTiMenu ComTiMenu-name">GoMax</span>
<span class="ComTiMenu ComTiMenuright ComTiMenurightLast">【退出】</span>
<span class="ComTiMenu ComTiMenuright">【修改密码】</span>
<span class="ComTiMenu ComTiMenuright"> &nbsp;管理员</span>
<span class="ComTiMenu ComTiMenuright">欢迎您 : </span>
</el-menu>
</el-col>
</el-row>
</header>
<el-row :span="20" class="content">
<el-col :span="3" class="content_left">
<el-menu default-active="1" class="el-menu-vertical-demo" :router="true" @open="handleOpen" @close="handleClose" theme="dark">
<el-submenu index="1">
<template slot="title">数据报表</template>
<el-menu-item index="/dashboard">数据报表</el-menu-item>
</el-submenu>
<el-submenu index="2-1">
<template slot="title">任务管理</template>
<el-menu-item index="/task">添加任务</el-menu-item>
<el-menu-item index="/lookProcseelist">任务列表</el-menu-item>
</el-submenu>
<el-submenu index="2-2">
<template slot="title">终端监测</template>
<el-menu-item index="/Terminal">终端信息</el-menu-item>
</el-submenu>
<!--<el-submenu index="2-3">
<template slot="title">操作日志</template>
<el-menu-item index="/logActive">操作日志管理</el-menu-item>
</el-submenu>-->
<el-submenu index="2-4">
<template slot="title">权限管理</template>
<el-menu-item index="/addAuthor">角色管理</el-menu-item>
<el-menu-item index="/changeAuthor">账号管理</el-menu-item>
</el-submenu>
</el-menu>
</el-col>
<el-col :span="20" class="content_right">
<router-view></router-view>
</el-col>
</el-row>
<footer>
<el-row :span="24">
<el-col>
<el-menu theme="light" class="el-menu-demo footermenu" mode="horizontal">
技术支持:非码科技
</el-menu>
</el-col>
</el-row>
</footer>
</div>
</template>
<script>
export default {
name: 'app',
methods: {
handleOpen(key, keyPath) {
console.log(key, keyPath);
},
handleClose(key, keyPath) {
console.log(key, keyPath);
},
},
created: function () {
this.$router.push('/dashboard');
}
}
</script>
<style>
html,body,div,span,applet,object,iframe,h1, h2, h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,
del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,
aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
/*头部样式*/
.ComTiMenu {
float: left;
padding: 20px 0;
color: #ffffff;
font-size: 16px;
}
.ComTiMenu-name {
font-size: 26px;
padding-left: 2%;
}
.ComTiMenuright {
float: right;
padding-top: 25px;
}
.ComTiMenuright:hover {
cursor: pointer;
}
.ComTiMenurightLast {
padding-right: 30px;
}
/*内容页面*/
.content {
margin-top: 1px;
}
.content_left {
height: 720px;
margin-left: 0%;
background: #2c3e50;
text-align: left;
}
.content_right {
border: 1px solid #EAEDF1;
margin-left:10px;
margin-top:10px;
background: #eaeefb;
}
/*脚步*/
footer {
margin-top: 20px;
text-align: center;
font-size: 16px;
color: #000000;
}
.footermenu {
padding: 21px;
}
</style>
<template>
<el-row>
<el-col class="Addprocesslist">
<el-row>
<el-col :span="24" style="text-align: left;padding:20px;border-bottom: 2px solid #ffffff"> 运行任务列表 </el-col>
<el-col :span="24" style="margin-left:20px;margin-top: 20px">
<el-col :span="2">
<el-input v-model="formInline.user" placeholder="任务名称"></el-input>
</el-col>
<el-col :span="3" class="SelectMargin">
<el-select v-model="formInline.region" placeholder="任务类型">
<!--英文-->
<!--<el-option v-for="item in formInline.ETaskType" :label="item.text" :value="item.id"></el-option>-->
<!--中文-->
<el-option v-for="item in formInline.CTaskType" :label="item.text" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="3" class="SelectMargin">
<el-select v-model="formInline.AllSelect" placeholder="时间区间">
<el-option label="一周" value="7"></el-option>
<el-option label="一个月" value="30"></el-option>
<el-option label="三个月" value="90"></el-option>
<el-option label="六个月" value="180"></el-option>
<el-option label="全部" value="0"></el-option>
</el-select>
</el-col>
<el-col :span="3" class="SelectMargin">
<el-select v-model="formInline.Status" placeholder="执行状态">
<el-option label="执行状态" value=""></el-option>
<el-option label="待执行" value="0"></el-option>
<el-option label="执行中" value="1"></el-option>
<el-option label="已完成" value="2"></el-option>
<el-option label="执行失败" value="-1"></el-option>
<el-option label="暂停" value="-3"></el-option>
<el-option label="终止" value="-4"></el-option>
</el-select>
</el-col>
<el-col :span="2">
<el-button type="primary" @click="ClickSearch" icon="search">搜索</el-button>
</el-col>
<el-col :span="3" class="AdButton">
<el-button v-on:click="OpenUpShadow" type="primary" v-if="UploadTaskShow">添加上传任务
<i class="el-icon-upload el-icon--right"></i>
</el-button>
</el-col>
<el-col :span="3" class="AdButton">
<el-button v-on:click="OpenDownLoadShadow" type="primary" v-if="DownLoadTaskShow">添加下载任务
<i class="el-icon-upload el-icon--right"></i>
</el-button>
</el-col>
<!--
<el-col :span="2" class="AdButton">
<el-button type="primary">导出</el-button>
</el-col>-->
</el-col>
<tasklist ref="tasklist"></tasklist>
</el-row>
<el-row>
<createUpload ref="createUpload"></createUpload>
<ListDetail ref="listDetail"></ListDetail>
<createDownLoadTask ref="createDownLoadTask"></createDownLoadTask>
</el-row>
<!--添加上传任务-->
</el-col>
</el-row>
</template>
<script>
import createUpload from '../../components/task/createUpload'
import createDownLoadTask from '../../components/task/createDownLoadTask'
import tasklist from '../../components/task/list'
import ListDetail from '../../components/task/listDetail'
export default {
components: {
createUpload,
createDownLoadTask,
tasklist,
ListDetail
},
data() {
return {
UploadTaskShow: false,
DownLoadTaskShow: false,
isshow: false,
formInline: {
user: '',
region: '',
AllSelect: '',
Status: '',
ETaskType: [{
"id": -2,
"text": null
}, {
"id": 0,
"text": "flat files custom download"
}, {
"id": 1,
"text": "Key Setting Updating"
}, {
"id": 2,
"text": "COD"
}, {
"id": 3,
"text": "SOK Image download"
}, {
"id": 4,
"text": "Make POS/VXL Picture update"
}, {
"id": 5,
"text": "make SOK Picture effect"
}, {
"id": 6,
"text": "fork self-update"
}, {
"id": 7,
"text": "POS DB update"
}, {
"id": 9,
"text": "STLD upload"
}, {
"id": 999,
"text": "Key synchronization"
}],
CTaskType: [{
"id": '',
"text": "所有类型"
}, {
"id": 0,
"text": "普通文件自定义下放"
}, {
"id": 1,
"text": "键位更新"
}, {
"id": 2,
"text": "COD"
}, {
"id": 3,
"text": "SOK图片下放"
}, {
"id": 4,
"text": "POS/VXL图片更新"
}, {
"id": 5,
"text": "SOK图片生效"
},
{
"id": 6,
"text": "fork自更新"
},
{
"id": 15,
"text": "Linux Fork自更新"
}, {
"id": 7,
"text": "POSDB更新"
}, {
"id": 9,
"text": "STLD上传"
},
{
"id": 10,
"text": "Report"
},
// {
// "id": 11,
// "text": "Sos"
// },
// {
// "id": 12,
// "text": "Cashless"
// },
{
"id": 13,
"text": "Remforpos"
},
{
"id": 14,
"text": "NGCOD"
},
{
"id": 999,
"text": "键位同步"
}
]
},
}
},
methods: {
//打开上传任务
OpenUpShadow() {
console.log(this.$refs.createUpload);
this.$refs.createUpload.OpenUpShadow();
},
ClickSearch() {
this.$refs.tasklist.TaskName = this.formInline.user;
this.$refs.tasklist.TaskType = this.formInline.region;
this.$refs.tasklist.Allselected = this.formInline.AllSelect;
this.$refs.tasklist.Status = this.formInline.Status;
this.$refs.tasklist.GetList();
},
OpenDownLoadShadow() {
this.$refs.createDownLoadTask.OpenUpShadow();
},
UserHasUploadTaskPermission() {
var that = this;
this.ApiFun.account.UserHasPermission({
Code: "AddUploadTask",
success(res) {
that.UploadTaskShow = res.data;
}
})
},
UserHasDownLoadTaskPermission() {
var that = this;
this.ApiFun.account.UserHasPermission({
Code: "AddDownLoadTask",
success(res) {
that.DownLoadTaskShow = res.data;
}
})
}
},
created() {
this.UserHasUploadTaskPermission();
this.UserHasDownLoadTaskPermission();
var that = this;
setTimeout(function() {
that.$refs.tasklist.createUploadTask = that.$refs.createUpload;
that.$refs.tasklist.createDownLoadTask = that.$refs.createDownLoadTask;
}, 100)
// this.$refs.tasklist.createUploadTask=this.$refs.createUpload;
// this.$refs.tasklist.createDownLoadTask=this.$refs.createDownLoadTask;
}
}
</script>
<style>
.Addprocesslist {
padding-bottom: 80px;
border: 1px solid #999999;
}
.SelecTtimes {
width: 80%;
height: 60px;
border: 1px solid red;
margin-left: 110px;
}
.SelectMargin {
margin-left: 10px;
}
.AdButton {
text-align: left;
}
.el-table th {
text-align: center;
}
.el-icon-circle-close:hover {
cursor: pointer;
}
</style>
// 时间日期格式化
export function DateFormat() {
var date = new Date();
var sign1 = "-";
var sign2 = ":";
var year = date.getFullYear() // 年
var month = date.getMonth() + 1; // 月
var day = date.getDate(); // 日
var hour = date.getHours(); // 时
var minutes = date.getMinutes(); // 分
var seconds = date.getSeconds() //秒
var weekArr = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
var week = weekArr[date.getDay()];
// 给一位数数据前面加 “0”
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (day >= 0 && day <= 9) {
day = "0" + day;
}
if (hour >= 0 && hour <= 9) {
hour = "0" + hour;
}
if (minutes >= 0 && minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds >= 0 && seconds <= 9) {
seconds = "0" + seconds;
}
// var currentdate = year + sign1 + month + sign1 + day + " " + hour + sign2 + minutes + sign2 + seconds + " " + week;
var currentdate = {
'ymd': year + sign1 + month + sign1 + day,
'week': week,
'hmi': hour + sign2 + minutes + sign2 + seconds
};
return currentdate;
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
<template>
<div :class="className" ref="barEcharts">
</div>
</template>
<script>
import echarts from "echarts";
// 引入柱状图
import "echarts/lib/chart/bar";
// 引入提示框和标题组件
import "echarts/lib/component/tooltip";
import "echarts/lib/component/title";
import "echarts/lib/component/legend";
export default {
data() {
return {
refObj: null,
barFun: null
};
},
props: {
className: {
type: String,
default: "barChart"
},
barLegendName: {
type: String,
default: "Cashless"
},
barName: {
type: Array,
default: []
},
barValue: {
type: Array,
default: []
},
barTotal: {
type: Array,
default: []
}
},
watch: {
barName(val) {
this.initCharts();
}
},
methods: {
created() {},
setBarFun(fun) {
this.barFun = fun;
},
initCharts() {
var that = this;
this.chart = null;
this.chart = echarts.init(this.$refs.barEcharts);
this.setOptions();
this.chart.off("click");
this.chart.on("click", function(params) {
that.barFun(params);
});
},
setOptions() {
this.chart.setOption({
backgroundColor: "#FFFFFF",
color: ["#FF6600", "#24c5fb"],
textStyle: {
color: "#000000"
},
legend: {
itemWidth: 40,
textStyle: {
color: "#343434"
},
data: [this.barLegendName, "total"]
},
xAxis: [
{
type: "category",
axisTick: {
show: false
},
data: this.barName
}
],
yAxis: [
{
type: "value",
axisTick: {
show: false
},
axisLine: {
show: false
},
splitLine: {
lineStyle: {
color: "#CACACA"
}
}
}
],
tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "line" // 默认为直线,可选为:'line' | 'shadow'
}
},
series: [
{
name: this.barLegendName,
type: "bar",
barWidth: 10,
itemStyle: {
normal: {
barBorderRadius: 6
}
},
data: this.barValue
},
{
name: "total",
type: "bar",
barWidth: 15,
itemStyle: {
normal: {
barBorderRadius: 5
}
},
data: this.barTotal
}
]
});
}
}
};
</script>
<style scoped>
</style>
\ No newline at end of file
<template>
<div class="pie">
<div ref="pieEcharts" class="" style="width: 100%;height:200px;"></div>
</div>
</template>
<script>
import echarts from "echarts";
// 引入柱状图
import "echarts/lib/chart/pie";
import "echarts/lib/component/legend";
export default {
data() {
return {
refObj: null,
pieFun: null,
};
},
props: ["pieData"],
methods: {
initData() {
this.myChart = echarts.init(this.$refs.pieEcharts);
this.setOptions();
this.fetchLegend();
},
setOptions: function() {
const option = {
color: [
"#D51688",
"#2d66BB",
"#F3BB02",
"#a7e7ff",
"#79d9f1",
"#f2c955",
"#ec5845",
"#00acee",
"#52cdd5"
],
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: "vertical",
left: "left",
data: ["离线", "在线", "无客户端", "异常", "停止"]
},
series: [
{
name: "状态",
type: "pie",
radius: "55%",
center: ["50%", "60%"],
data: this.pieData,
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)"
}
}
}
]
};
this.myChart.setOption(option);
var that =this;
this.myChart.on("click", function(params) {
that.pieFun(params);
});
},
setPieFun(fun) {
this.pieFun = fun;
},
},
watch: {
pieData: function() {
this.initData();
}
},
created() {
this.initData();
}
};
</script>
<style>
.pie {
display: flex;
justify-content: center;
/* margin-top: 20px; */
}
</style>
<template>
<div class="my-dashboard">
<div class="my-header">
<el-row>
<el-col :span="24">
<el-menu theme="dark" class="el-menu-demo" mode="horizontal">
<span class="ComTiMenu ComTiMenu-name">GoMax</span>
<span class="ComTiMenu ComTiMenuright ComTiMenurightLast" @click="logout">【退出】</span>
<span class="ComTiMenu ComTiMenuright" @click="modifyPassword = true">【修改密码】</span>
<span class="ComTiMenu ComTiMenuright"> &nbsp;&nbsp;{{loginName}}</span>
<span class="ComTiMenu ComTiMenuright">欢迎您 : </span>
</el-menu>
</el-col>
</el-row>
</div>
<div class="content">
<el-row :span="24">
<el-col :span="3" class="content_left">
<el-menu default-active="1" class="el-menu-vertical-demo" :router="true" @open="handleOpen" @close="handleClose" theme="dark">
<div v-for="cate in FunctionList" :key="cate.id">
<el-submenu :index="cate.categoryEnName">
<template slot="title">{{cate.categoryName}}</template>
<el-menu-item :index="func.url" v-for="func in cate.functions" :key="func.id">{{func.functionName}}</el-menu-item>
</el-submenu>
</div>
</el-menu>
</el-col>
<el-col :span="21" class="content_right">
<router-view></router-view>
</el-col>
</el-row>
</div>
<div class="my-footer">
<el-row :span="24">
<el-col>
<el-menu theme="light" class="el-menu-demo footermenu" mode="horizontal">
技术支持:非码科技
</el-menu>
</el-col>
</el-row>
</div>
<!-- 退出登录的弹框 -->
<el-dialog :visible.sync="modifyPassword" size="tiny">
<el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-width="70px" label-position="left">
<el-form-item label="旧密码" prop="oldPass">
<el-input type="password" v-model="ruleForm2.oldPass" auto-complete="off"></el-input>
</el-form-item>
<el-form-item label="新密码" prop="newPass">
<el-input type="password" v-model="ruleForm2.newPass" auto-complete="off"></el-input>
</el-form-item>
<el-form-item label="确认密码" prop="checkPass">
<el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off" @keyup.enter.native="submitForm"></el-input>
</el-form-item>
<el-form-item label-width="100px">
<el-button type="primary" @click="submitForm">提交</el-button>
<div v-if="modifyError" class="logout-error">{{errorMessage}}</div>
</el-form-item>
</el-form>
</el-dialog>
<el-dialog :visible.sync="showNoClientPos">
<el-row>
<el-table ref="multipleTable" :data="NoClientPosList" border tooltip-effect="dark" style="width: 100%;">
<el-table-column prop="StoreID" label="门店编码" align="left">
</el-table-column>
<el-table-column prop="StoreName" label="门店名称" show-overflow-tooltip align="left">
</el-table-column>
<el-table-column prop="IP" label="地区" show-overflow-tooltip align="left">
</el-table-column>
<el-table-column prop="IP" label="门店地址" show-overflow-tooltip align="left">
</el-table-column>
</el-table>
</el-row>
</el-dialog>
</div>
</template>
<script>
import apiFun from '../../api.js'
import Axios from 'axios'
var ApiFun = new apiFun(Axios);
export default {
data() {
var validateForm2 = (rule, value, callback) => {
if (value === '' && rule.field === 'oldPass') {
callback(new Error('请输入旧密码'));
} else if (value === '' && rule.field === "newPass") {
callback(new Error('请输入新密码'));
} else if (value === '' && rule.field === "checkPass") {
callback(new Error('请输入确认密码'));
} else if (value !== '' && rule.field === 'newPass') {
this.$refs.ruleForm2.validateField('checkPass');
callback();
} else {
if (rule.field === 'checkPass' && value !== this.ruleForm2.newPass) {
callback(new Error('新密码和确认密码不一致'));
} else {
callback();
}
}
};
var validate2 = {
validator: validateForm2,
trigger: 'blur'
};
return {
errorMessage: '出错了',
loginName: '',
modifyPassword: false,
modifyError: false,
ruleForm2: {
oldPass: '',
newPass: '',
checkPass: ''
},
rules2: {
oldPass: [validate2],
newPass: [validate2],
checkPass: [validate2]
},
FunctionList: [],
showNoClientPos: false,
NoClientPosList: []
}
},
methods: {
handleOpen: function () {
},
handleClose: function () {
},
logout: function () {
localStorage.setItem('Token', "");
this.$router.push('/');
},
loadFunctions() {
var that = this;
ApiFun.account.UserFunction({
success: res => {
that.FunctionList = res.data;
}
});
},
loadNoClientPos() {
// var that = this;
// alert("loadNoClientPos");
// ApiFun.terminal.NoClientPos({
// data: { PageIndex: 1, PageSize: 20 },
// success: res => {
// alert("ss");
// showNoClientPos = true;
// that.NoClientPosList = res.data;
// }
// });
},
submitForm: function () {
this.$refs.ruleForm2.validate((valid) => {
if (valid) {
var modifyParams = {
password: this.ruleForm2.oldPass,
newPassword: this.ruleForm2.newPass
};
ApiFun.account.UpdatePassword({
data: modifyParams,
success: res => {
if (res.data) {
this.$router.push('/');
} else {
this.modifyError = true;
this.errorMessage = this.errorMessage;
}
}
})
} else {
return false;
}
});
}
},
created: function () {
this.loginName = this.$route.query.loginName;
this.loadFunctions();
this.loadNoClientPos();
}
}
</script>
<style>
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
/*头部样式*/
.ComTiMenu {
float: left;
padding: 20px 0;
color: #ffffff;
font-size: 16px;
}
.ComTiMenu-name {
font-size: 26px;
padding-left: 2%;
}
.ComTiMenuright {
float: right;
padding-top: 25px;
}
.ComTiMenuright:hover {
cursor: pointer;
}
.ComTiMenurightLast {
padding-right: 30px;
}
/*内容页面*/
.content {
width: 100%;
overflow-x: hidden;
position: absolute;
top: 68px;
bottom: 65px;
}
.el-row {
height: 100%;
}
.content_left {
height: 100%;
margin-left: 0%;
background: #2c3e50;
text-align: left;
}
.content_right {
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
}
/*脚步*/
.my-footer {
position: absolute;
width: 100%;
bottom: 0;
text-align: center;
font-size: 16px;
color: #000000;
}
.footermenu {
padding: 21px;
}
html,
body {
width: 100%;
height: 100%;
}
.my-header {
position: absolute;
width: 100%;
top: 0;
}
.my-dashboard {
width: 100%;
height: 100%;
}
.login-shadow .el-form-item__label {
padding-right: 10px;
}
.logout-error {
text-align: center;
color: #ff4949;
font-size: 12px;
line-height: 1;
padding-top: 10px;
}
</style>
<template>
<div class="login-body">
<el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-position="left" label-width="70px" class="demo-ruleForm login-container">
<h3 class="title">GoMax系统登录</h3>
<el-form-item prop="account" label="账号" class='letter-gap'>
<el-input type="text" v-model="ruleForm2.account" auto-complete="off"></el-input>
</el-form-item>
<el-form-item prop="checkPass" label="密码" class='letter-gap'>
<el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off"></el-input>
</el-form-item>
<el-checkbox v-model="checked" checked class="remember" >记住账号</el-checkbox>
<el-form-item style="width:100%;">
<el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit2" >登录</el-button>
<div v-if="loginError" class="login-error">{{errorMessage}}</div>
</el-form-item>
</el-form>
</div>
</template>
<script>
import apiFun from '../api.js'
import Axios from 'axios'
var ApiFun = new apiFun(Axios);
export default {
data() {
var validateform = (rule, value, callback) => {
if (value === '' && rule.field === 'account') {
new callback(new Error('请输入账号'));
} else if (value === '' && rule.field === 'checkPass') {
new callback(new Error('请输入密码'));
} else if (value === '' && rule.field === 'code') {
callback(new Error('请输入验证码'));
} else {
callback();
}
};
var tempValidate = {
validator: validateform,
trigger: 'blur'
};
return {
imgToken: '',
loginError: false,
myCode: null,
errorMessage: '',
ruleForm2: {
account: '',
checkPass: '',
code: ''
},
rules2: { //表单验证
account: [
tempValidate
],
checkPass: [
tempValidate
],
code: [
tempValidate
]
},
checked: true
};
},
methods: {
handleSubmit2(ev) {
this.$refs.ruleForm2.validate((valid) => {
if (valid) {
var loginParams = {
loginName: this.ruleForm2.account,
password: this.ruleForm2.checkPass,
validCode: this.ruleForm2.code,
validCodeToken: this.imgToken
};
ApiFun.account.Login({
data: loginParams,
success: res => {
if (res.data.loginSuccess) {//登陆成功跳转
//localStorage.clear();
localStorage.setItem('Token', res.data.token);
this.$router.push({
path: 'Dashboard',
query: {
loginName: this.ruleForm2.account
}
});
} else {//没有成功提示
this.getCode();
this.errorMessage = res.errorMessage;
this.loginError = true;
}
if (this.checked) {//存储当前账号
localStorage.setItem('loginAccount', this.ruleForm2.account);
}
}
})
} else {
return false;
}
});
},
getCode: function () {
ApiFun.account.getCode({
success: (res) => {
this.imgToken = res.data.imgToken;
this.myCode = res.data.img;
}
})
},
generateCode: function () {
this.getCode();
}
},
created: function () {
if (localStorage.getItem("loginAccount") && this.checked) {
this.ruleForm2.account = localStorage.getItem("loginAccount");
}
this.getCode();
}
}
</script>
<style>
.login-body{
width: 100%;
height: 100vh;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.login-container {
/*box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);*/
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
background-clip: padding-box;
width: 350px;
padding: 35px 35px 15px 35px;
background: #fff;
border: 1px solid #eaeaea;
box-shadow: 0 0 25px #cac6c6;
}
.title {
margin: 0px auto 40px auto;
text-align: center;
color: #505458;
font-size: 20px;
font-weight: bold;
}
.remember {
margin: 0px 0px 22px 0px;
float: left;
margin-left: 70px;
}
.my-code {
width: 30%;
height: 36px;
float: right;
}
.el-input__inner {
border-radius: 0;
}
.mycode-class {
width: 65% !important;
margin-right: 5%;
}
.el-form-item__label {
padding: 11px 0px 11px 0px;
}
.letter-gap .el-form-item__label{
letter-spacing: 14px;
}
.login-error{
text-align: center;
color: #ff4949;
font-size: 12px;
line-height: 1;
padding-top: 10px;
}
</style>
\ No newline at end of file
<template>
<div class="terminal" style="border:1px solid #EAEDF1">
<el-row>
<el-col :span="24" style="text-align: left; padding:20px; border-bottom: 1px solid #EAEDF1;background: #ffffff; font-weight:600; font-size:16px;"> 终端详情 </el-col>
<table width="100%" cellspacing="6" cellpadding="6" style="font-size:14px;">
<!--基础信息-->
<caption style="height: 50px;line-height: 50px;background: #e9f4fd;font-weight:600;font-size:14px;">基础信息</caption>
<tr class="Table-one">
<td class="Table-head">所在门店</td>
<td class="Table-cent">上海杨浦区五角场店</td>
<td class="Table-head">门店编号</td>
<td class="Table-cent">0000000000001</td>
<td class="Table-head">硬件序列表</td>
<td class="Table-cent">asdfghjklpoiuyttewq</td>
</tr>
<tr class="Table-one">
<td class="Table-head">终端端号</td>
<td class="Table-cent">100000000000</td>
<td class="Table-head">终端类型</td>
<td class="Table-cent">SOK</td>
<td class="Table-head">终端IP地址</td>
<td class="Table-cent">114.108.152.18</td>
</tr>
<tr class="Table-one">
<td class="Table-head">剩余内存</td>
<td class="Table-cent"></td>
<td class="Table-head">CPU使用率</td>
<td class="Table-cent"></td>
<td class="Table-head">剩余硬盘</td>
<td class="Table-cent"></td>
</tr>
<tr class="Table-one">
<td class="Table-head">系统产品名</td>
<td class="Table-cent"></td>
<td class="Table-head">系统版本</td>
<td class="Table-cent"></td>
<td class="Table-head">系统生产商</td>
<td class="Table-cent"></td>
</tr>
<tr class="Table-one">
<td class="Table-head">终端在线状态</td>
<td class="Table-cent"></td>
<td class="Table-head">当前登录账号</td>
<td class="Table-cent"></td>
<td class="Table-head">所属工作组</td>
<td class="Table-cent"></td>
</tr>
<tr class="Table-one">
<td class="Table-head" >是否是管理员</td>
<td colspan="5" class="Table-cent"></td>
</tr>
</table>
<!--软件版本-->
<table width="100%" class="TableMargin" cellspacing="6" cellpadding="6" >
<caption style="height: 50px;line-height: 50px;background: #e9f4fd;font-weight:600;font-size:14px;">软件版本</caption>
<tr class="Table-one">
<td class="Table-head">NP6 版本</td>
<td class="Table-cent">V1.0</td>
<td class="Table-head">NP6 APP版本</td>
<td class="Table-cent">V1.0</td>
<td class="Table-head">SOK图片版本</td>
<td class="Table-cent">V1.0</td>
</tr>
<tr class="Table-one">
<td class="Table-head">自有软件版本</td>
<td class="Table-cent"></td>
<td class="Table-head" >键位版本</td>
<td colspan="3" class="Table-cent"></td>
</tr>
</table>
<!--运行的服务器-->
<table width="100%" class="TableMargin" cellspacing="6" cellpadding="6" >
<caption style="height: 50px;line-height: 50px;background: #e9f4fd;font-weight:600;font-size:14px;">运行的服务器</caption>
<tr class="Table-one">
<td class="Table-head">服务名称</td>
<td class="Table-cent">V1.0</td>
</tr>
<tr class="Table-one">
<td class="Table-head">服务名称</td>
<td colspan="5" class="Table-cent"></td>
</tr>
</table>
<!--运行的服务器-->
<table width="100%" class="TableMargin" cellspacing="6" cellpadding="6" >
<caption style="height: 50px;line-height: 50px;background: #e9f4fd;font-weight:600;font-size:14px;">默认共享</caption>
<tr class="Table-one">
<td class="Table-head">文件网络路径</td>
<td class="Table-cent">V1.0</td>
</tr>
<tr class="Table-one">
<td class="Table-head">文件网络路径</td>
<td colspan="5" class="Table-cent"></td>
</tr>
</table>
<!--运行的服务器-->
<table width="100%" class="TableMargin" cellspacing="6" cellpadding="6" >
<caption style="height: 50px;line-height: 50px;background: #e9f4fd;font-weight:600;font-size:14px;">主动共享</caption>
<tr class="Table-one">
<td class="Table-head">文件网络路径</td>
<td class="Table-cent">V1.0</td>
</tr>
<tr class="Table-one">
<td class="Table-head">文件网络路径</td>
<td colspan="5" class="Table-cent"></td>
</tr>
</table>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
tableData: []
}
},
methods: {
formatter(row, column) {
return row.address;
},
//读取数据
GetData(){
}
},
created:function(){
console.log(this.$route)
}
}
</script>
<style>
.TableMargin{
margin-top: 30px;
}
.terminal{
padding:8px;
}
.el-table th>.cell {
text-align: center;
}
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 90px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 50%;
}
.Table-one {
height: 40px;
line-height: 40px;
padding: 0;
border: 1px solid #EAEDF1;
}
.Table-one th {
height: 20px;
padding: 0;
border: 1px solid #EAEDF1;
}
.Table-head {
width: 120px;
background: #afd4ee;
border-bottom :1px solid #ffffff;
}
/*美化样式*/
.content_right .terminal{
background-color:#fff;
}
.Table-head{
font-size:14px;
}
.Table-cent{
color:#2B2B2B;
font-size:14px;
}
</style>
<template>
<el-col :span="23" style="margin-left:20px;margin-top: 20px;text-align: center">
<el-row>
<el-col>
<el-button type="primary" @click="exportToExcel()" style="float: right;" v-if="DBMMonitorReportExportShow">导出</el-button>
</el-col>
</el-row>
<el-row>
<el-col>
<el-table :data="tableData" stripe style="width: 100%;">
<el-table-column prop="storeID" label="StoreID" width="100">
</el-table-column>
<el-table-column prop="posID" label="PosID" width="100">
</el-table-column>
<el-table-column prop="lastErrorTime" label="LastErrorTime" width="130" align="left">
</el-table-column>
<el-table-column prop="lastOkTime" label="LastOkTime" width="120">
</el-table-column>
<el-table-column prop="lastErrorFile" label="LastErrorFile" width="295">
</el-table-column>
<el-table-column prop="lastOkFile" label="LastOkFile" width="300">
</el-table-column>
<el-table-column prop="lastReportTime" label="LastReportTime" width="140">
</el-table-column>
<el-table-column prop="ip" label="IP" width="120">
</el-table-column>
<el-table-column prop="businessDate" label="BusinessDate" width="125">
</el-table-column>
<el-table-column prop="" label="initTLData " width="120">
</el-table-column>
</el-table>
</el-col>
</el-row>
<div class="block PageNum">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-sizes="PageSizes" :page-size="PageSize" layout="total,sizes, prev, pager, next" :total="Total">
</el-pagination>
</div>
<ListDetail ref="listDetail"></ListDetail>
</el-col>
</template>
<script>
import ListDetail from '../task/listDetail'
export default {
name: 'tasklist',
components: {
ListDetail
},
data() {
return {
PageSizes: [5, 10, 30],
PageSize: 10,
PageIndex: 1,
tableData: [],
Total: 0,
DBMMonitorReportExportShow: false
}
},
methods: {
//获取列表
GetList(tab, event) {
var that = this;
if (tab != null) {
that.index = tab.index;
}
if (this.PageSize != 1) {
that.PageSize = this.PageSize;
}
this.ApiFun.task.DBMMonitorReport({
data: {
pageSize: that.PageSize,//每页显示条数
pageIndex: that.PageIndex,//当前页码
},
success: function(data) {
var List = [];
for (var i = 0; i < data.data.dbmMonitors.length; i++) {
var obj = {};
obj.storeID = data.data.dbmMonitors[i].storeID;
obj.posID = data.data.dbmMonitors[i].posID;
obj.lastErrorTime = data.data.dbmMonitors[i].lastErrorTime;
obj.lastOkTime = data.data.dbmMonitors[i].lastOkTime;
obj.lastErrorFile = data.data.dbmMonitors[i].lastErrorFile;
obj.lastOkFile = data.data.dbmMonitors[i].lastOkFile;
obj.lastReportTime = data.data.dbmMonitors[i].lastReportTime;
obj.ip = data.data.dbmMonitors[i].ip;
obj.businessDate = data.data.dbmMonitors[i].businessDate;
List.push(obj);
}
that.tableData = List;
that.Total = data.data.total;
}
})
},
//分页动作
handleSizeChange(val) {
this.PageSize = Number(`${val}`);
this.PageIndex = 1;
this.GetList();
},
handleCurrentChange(val) {
this.PageIndex = Number(`${val}`);
this.GetList();
},
exportToExcel() {
var that = this;
this.ApiFun.task.DBMMonitorReportExcel({
success: function(data) {
window.location.href = data.data;
}
})
},
UserHasDBMMonitorReportExportPermission() {
var that = this;
this.ApiFun.account.UserHasPermission({
Code: "DBMMonitorReportExport",
success(res) {
that.DBMMonitorReportExportShow = res.data;
}
})
},
},
created() {
this.GetList();
this.UserHasDBMMonitorReportExportPermission();
}
}
</script>
<style>
.PageNum {
margin-top: 20px;
text-align: right;
}
</style>
<template>
<el-row class="ShopDetail" v-show="isshow3">
<el-row class="shadowBox">
<el-col :span="24" class="Lookprocess-title"> 门店更新详情
<span v-on:click="CloseShowDetail" style="float:right" class="el-icon-circle-close"></span>
</el-col>
<el-col :span="24" style="background: #ffffff;padding-bottom: 30px">
<el-col :span="22">
<el-form :inline="true" :model="SDformInline" class="demo-form-inline">
<el-form-item>
<el-input v-model="SDformInline.TerminalNum" placeholder="终端编号"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="SDformInline.Terminaltype" placeholder="终端类型"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="SDSearched" type="primary">搜索</el-button>
</el-form-item>
</el-form>
</el-col>
<el-col :span="22">
<el-table :data="SDtableData" stripe style="width: 100%;">
<el-table-column prop="TerminalNum" label="终端编号" width="180" align="center">
</el-table-column>
<el-table-column prop="Terminaltype" label="终端类型" width="180" align="center">
</el-table-column>
<el-table-column prop="OnlineStatus" label="在线状态" align="center">
</el-table-column>
<el-table-column prop="Address" label="IP" align="center">
</el-table-column>
<el-table-column prop="UpdateStatus" label="更新状态" align="center">
</el-table-column>
<el-table-column prop="ErrorMessage" label="执行信息" align="center">
</el-table-column>
</el-table>
</el-col>
<el-col :span="23" class="PageNum">
<div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-sizes="PageSizes" :page-size="PageSize" layout="total,sizes, prev, pager, next" :total="TaskPosCount">
</el-pagination>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
</template>
<script>
export default {
name: 'ShopDetail',
data() {
return {
isshow3: false,
isshow2: false,
Taskid: '',
SDformInline: {
TerminalNum: '',
Terminaltype: ''
},
SDtableData: [{
TerminalNum: '2016-05-02',
Terminaltype: '王小虎',
OnlineStatus: '',
Address: '上海市普陀区金沙江路 1518 弄',
UpdateStatus: '',
ErrorMessage: ''
}],
TerminalNname: '',
TerminalNnum: '',
TerminalNadd: '',
TaskPosCount: 1,
currentPage: 1,
PageSizes: [5, 10, 30],
PageSize: 10,
PageIndex: 1,
}
},
methods: {
GetTerminalList() {
var that = this;
this.ApiFun.task.TerminalSearch({
data: {
taskId: that.Taskid,
// Location:that.TerminalNadd,
pageIndex: that.PageIndex,
pageSize: that.PageSize,
storeId: that.TerminalNnum,
// storeName:that.TerminalNname,
posType: that.SDformInline.Terminaltype,
posId: that.SDformInline.TerminalNum
},
success: function(res) {
that.TaskPosCount = res.data.total;
console.log(res);
var NewTaskPosList = res.data.taskPosList;
console.log(NewTaskPosList);
var List = [];
for (var i = 0; i < NewTaskPosList.length; i++) {
var obj = [];
obj.TerminalNum = NewTaskPosList[i].posID;
obj.Terminaltype = NewTaskPosList[i].type;
if (NewTaskPosList[i].state == 1) {
obj.OnlineStatus = "在线";
} else if (NewTaskPosList[i].state == 0) {
obj.OnlineStatus = "离线";
} else if (NewTaskPosList[i].state == -1) {
obj.OnlineStatus = "异常";
} else if (NewTaskPosList[i].state == -2) {
obj.OnlineStatus = "停止";
}
else {
obj.OnlineStatus = NewTaskPosList[i].state;
}
obj.Address = NewTaskPosList[i].ip;
obj.ErrorMessage = NewTaskPosList[i].errorMsg;
if (NewTaskPosList[i].taskStatus == 0) {
obj.UpdateStatus = "待执行";
}
else if (NewTaskPosList[i].taskStatus == -1) {
obj.UpdateStatus = "执行失败";
}
else if (NewTaskPosList[i].taskStatus == 1) {
obj.UpdateStatus = "执行中";
}
else if (NewTaskPosList[i].taskStatus == 2) {
obj.UpdateStatus = "执行完成";
}
else if (NewTaskPosList[i].taskStatus == 3 || NewTaskPosList[i].taskStatus == -3) {
obj.UpdateStatus = "暂停";
}
else if (NewTaskPosList[i].taskStatus == -4 || NewTaskPosList[i].taskStatus == -4) {
obj.UpdateStatus = "终止";
}
else {
obj.UpdateStatus = "未知";
}
List.push(obj);
}
that.SDtableData = List;
console.log(that.SDtableData);
}
})
that.SDformInline.Terminaltype = '';
that.SDformInline.TerminalNum = '';
},
//分页动作
handleSizeChange(val) {
this.PageSize = Number(`${val}`);
this.PageIndex = 1;
this.GetTerminalList();
},
handleCurrentChange(val) {
this.PageIndex = Number(`${val}`);
this.GetTerminalList();
},
//搜索
SDSearched(tab, event) {
if (this.SDformInline.TerminalNum || SDformInline.Terminaltype != null) {
this.GetTerminalList();
}
},
//门店终端任务遮罩
OpenShopDetail() {
this.isshow3 = !this.isshow3;
},
CloseShowDetail() {
this.isshow3 = false;
}
},
created() {
}
}
</script>
<style scoped>
.el-dialog__body {
padding: 0;
}
.ShopDetail {
position: absolute;
top: -50px;
left: 0px;
width: 100%;
height: 100%;
z-index: 999;
background: rgba(0, 0, 0, 0.6);
}
.ShopDetail .shadowBox {
width: 100%;
height: 100%;
/* overflow-y: scroll; */
}
.Lookprocess-title {
text-align: left;
padding: 20px;
border-bottom: 2px solid #999999;
background: #ffffff;
}
.Lookprocess-content {
width: 80%;
/* margin-left: 10%; */
background: #ffffff;
}
.LShopDetail .Table-one {
height: 40px;
line-height: 40px;
padding: 0;
border: 1px solid #EAEDF1;
}
.Lookprocess-table {
margin-top: 10px;
border: 1px solid #ffffff;
}
.Lookprocess-table .Table-head {
width: 120px;
text-align: right;
padding-right: 10px;
}
.Lookprocess-table .Table-cent {
text-align: left;
padding-left: 10px;
}
.Lookprocess-table td {
border: 1px solid #ffffff;
border-bottom: 1px solid #ffffff;
}
.PageNum {
margin-top: 20px;
text-align: right;
}
.ShopDetail .demo-form-inline {
text-align: left;
margin-top: 30px;
padding-left: 60px;
}
</style>
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import Login from './components/Login'
import apiFun from './api.js'
import Axios from 'axios'
import Router from 'vue-router'
import routeConfig from './router.js'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
Vue.use(ElementUI)
Vue.use(Router)
var ApiFun=new apiFun(Axios);
Vue.prototype.ApiFun=ApiFun;
Vue.config.productionTip = false
const router = new Router({
routes: routeConfig
})
router.beforeEach((to,from,next)=>{
if(to.matched.some(res=>res.meta.requireAuth)){
if(localStorage.getItem('loginAccount')){
next();
} else{
next({
path:'/'
})
}
}else{
next()
}
})
/* eslint-disable no-new */
var vm = new Vue({
el: '#app',
router,
template: '<App/>',
//vue1.0的写法
components: { App },
//vue1.0的写法
// render:h=>h(App),
created: function() {
ApiFun.setVue(this);
}
})
Array.prototype.remove=function(n) {
 if(n<0) //如果n<0,则不进行任何操作。
return this;
 else
return this.slice(0,n).concat(this.slice(n+1,this.length));
}
//引入要使用的组件
import Login from './components/Login.vue'
import AddAuthor from './components/Authorization/AddAuthor/AddAuthor.vue'
import ChangeAuthor from './components/Authorization/ChangeAuthor/ChangeAuthor.vue'
import Dashboard from './components/Dashboard/Dashboard.vue'
import Databoard from './components/Dashboard/Databoard.vue'
import BasicMessage from './components/Terminal/BasicMessage.vue'
import SoftwareVersion from './components/Terminal/SoftwareVersion.vue'
import LookProcseelist from './components/ProcessList/LookProcseelist/LookProcess.vue'
import Terminal from './components/Terminal/Terminal'
import Task from './Pages/task/task.vue'
import DBMMonitorReport from './components/task/DBMMonitorReport.vue'
import BatLibrary from './components/CustomBat/BatLibrary.vue'
import CustomBat from './components/CustomBat/CustomBat.vue'
//自定义全局组件
export default [
{
path: '/', name: 'Login', component: Login
},
{
path: '/dashboard',
name: '',
meta: { requireAuth: true },
component: Dashboard,
children: [
{
path: '',
name: 'Databoard',
meta: { requireAuth: true },
component: Databoard
},
{
path: '/Task',
name: 'Task',
meta: { requireAuth: true },
component: Task
},
{
path: '/DBMMonitorReport',
name: 'DBMMonitorReport',
meta: { requireAuth: true },
component: DBMMonitorReport
}
, {
path: '/addAuthor',
name: 'AddAuthor',
meta: { requireAuth: true },
component: AddAuthor
}, {
path: '/changeAuthor',
name: 'ChangeAuthor',
meta: { requireAuth: true },
component: ChangeAuthor
}, {
path: '/lookProcseelist',
name: 'LookProcseelist',
meta: { requireAuth: true },
component: LookProcseelist
}, {
path: '/terminal',
name: 'Terminal',
meta: { requireAuth: true },
component: Terminal
}, {
path: '/SoftwareVersion',
name: 'SoftwareVersion',
meta: { requireAuth: true },
component: SoftwareVersion
}, {
path: '/BasicMessage',
name: 'BasicMessage',
meta: { requireAuth: true },
component: BasicMessage
}
, {
path: '/BatLibrary',
name: 'BatLibrary',
meta: { requireAuth: true },
component: BatLibrary
}
, {
path: '/CustomBat',
name: 'CustomBat',
meta: { requireAuth: true },
component: CustomBat
}
]
}
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment