提交 8e0aac02 编写于 作者: guangjun.yang's avatar guangjun.yang

协议管理中台

上级
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"],
"comments": false,
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
node_modules
dist/index.js
dist/authUseful.js
dist/stroke.js
dist/
/yqy/
node_modules/
.DS_Store
.vscode
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
\ No newline at end of file
基于dev-app-home-plugin-1115的改版的
Branch_tag-lecturer-rev-all-0115
\ No newline at end of file
// https://github.com/shelljs/shelljs
require('shelljs/global')
env.NODE_ENV = 'production'
var path = require('path')
var config = require('../config')
var ora = require('ora')
var webpack = require('webpack')
var webpackConfig = require('./webpack.prod.conf')
var spinner = ora('building for production...')
spinner.start()
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
rm('-rf', assetsPath)
mkdir('-p', assetsPath)
cp('-R', 'static/*', assetsPath)
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')
})
\ No newline at end of file
/* 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()
}
})
\ No newline at end of file
var config = require('../config')
if (!process.env.NODE_ENV) process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
var path = require('path')
var express = require('express')
var webpack = require('webpack')
var opn = require('opn')
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
// Define HTTP proxies to your custom API backend
// https://github.com/chimurai/http-proxy-middleware
var server = express()
var compiler = webpack(webpackConfig)
var devMiddleware = require('webpack-dev-middleware')(compiler, {
publicPath: webpackConfig.output.publicPath,
stats: {
colors: true,
chunks: false
}
})
var hotMiddleware = require('webpack-hot-middleware')(compiler)
// 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()
})
})
var context = config.dev.context
switch(process.env.NODE_ENV){
case 'local': var proxypath = 'http://localhost:8001'; break;
case 'online': var proxypath = 'http://yqy.cangdu.org'; break;
default: var proxypath = config.dev.proxypath;
}
var options = {
target: proxypath,
changeOrigin: true,
}
if (context.length) {
server.use(proxyMiddleware(context, options))
}
// handle fallback for HTML5 history API
server.use(require('connect-history-api-fallback')())
// serve webpack bundle output
server.use(devMiddleware)
// enable hot-reload and state-preserving
// compilation error display
server.use(hotMiddleware)
// serve pure static assets
var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
server.use(staticPath, express.static('./static'))
module.exports = server.listen(port, function(err) {
if (err) {
console.log(err)
return
}
var uri = 'http://localhost:' + port
console.log('Listening at ' + uri + '\n')
// when env is testing, don't need open it
if (process.env.NODE_ENV !== 'testing') {
opn(uri)
}
})
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 || {}
// generate loader string to be used with extract text plugin
function generateLoaders(loaders) {
var sourceLoader = loaders.map(function(loader) {
var extraParamChar
if (/\?/.test(loader)) {
loader = loader.replace(/\?/, '-loader?')
extraParamChar = '&'
} else {
loader = loader + '-loader'
extraParamChar = '?'
}
return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
}).join('!')
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
} else {
return ['vue-style-loader', sourceLoader].join('!')
}
}
// http://vuejs.github.io/vue-loader/en/configurations/extract-css.html
return {
css: generateLoaders(['css']),
postcss: generateLoaders(['css']),
less: generateLoaders(['css', 'less']),
sass: generateLoaders(['css', 'sass?indentedSyntax']),
scss: generateLoaders(['css', 'sass']),
stylus: generateLoaders(['css', 'stylus']),
styl: generateLoaders(['css', '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 + '$'),
loader: loader
})
}
return output
}
\ No newline at end of file
var path = require('path')
var config = require('../config')
var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../')
var env = process.env.NODE_ENV
// check env & config/index.js to decide weither to enable CSS Sourcemaps for the
// various preprocessor loaders added to vue-loader at the end of this file
var cssSourceMapDev = (env === 'development' && config.dev.cssSourceMap)
var cssSourceMapProd = (env === 'production' && config.build.productionSourceMap)
var useCssSourceMap = cssSourceMapDev || cssSourceMapProd
module.exports = {
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath,
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.vue', '.less', '.css', '.scss'],
fallback: [path.join(__dirname, '../node_modules')],
alias: {
'vue$': 'vue/dist/vue.common.js',
'src': path.resolve(__dirname, '../src'),
'assets': path.resolve(__dirname, '../src/assets'),
'components': path.resolve(__dirname, '../src/components'),
'@': path.resolve('src')
}
},
resolveLoader: {
fallback: [path.join(__dirname, '../node_modules')]
},
module: {
loaders: [{
test: /\.vue$/,
loader: 'vue'
}, {
test: /\.js$/,
loader: 'babel',
include: projectRoot,
exclude: /node_modules/
}, {
test: /\.json$/,
loader: 'json'
}, {
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url',
query: {
limit: 10000,
name: utils.assetsPath('img/[name].[ext]')
}
}, {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]'),
publicPath: '../../'
}
}]
},
vue: {
loaders: utils.cssLoaders({
sourceMap: useCssSourceMap
}),
postcss: [
require('autoprefixer')({
browsers: ['last 10 versions']
})
]
}
}
\ No newline at end of file
var config = require('../config')
var webpack = require('webpack')
var merge = require('webpack-merge')
var utils = require('./utils')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-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: {
loaders: utils.styleLoaders({
sourceMap: config.dev.cssSourceMap
})
},
// eval-source-map is faster for development
devtool: '#eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
favicon: 'favicon.ico',
inject: true
})
]
})
\ No newline at end of file
var path = require('path')
var config = require('../config')
var utils = require('./utils')
var webpack = require('webpack')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var env = config.build.env
console.log('@@@@@@@@@@@@@@@@@@@', env)
var webpackConfig = merge(baseWebpackConfig, {
module: {
loaders: 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].js?chunkhash=[chunkhash]'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash].min.js?chunkhash=[chunkhash]')
},
vue: {
loaders: utils.cssLoaders({
sourceMap: config.build.productionSourceMap,
extract: true
})
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurrenceOrderPlugin(),
// extract css into its own file
new ExtractTextPlugin(utils.assetsPath('css/[name].css')),
// 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',
favicon: 'favicon.ico',
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']
})
]
})
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
})
)
}
module.exports = webpackConfig
\ No newline at end of file
// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
module.exports = {
build: {
env: {
NODE_ENV: '"production"',
BUILD_ENV: '"' + process.env.BUILD_ENV + '"'
},
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: './static',
assetsPublicPath: './',
productionSourceMap: false,
// 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']
},
dev: {
env: {
NODE_ENV: '"development"',
BUILD_ENV: '"' + process.env.BUILD_ENV + '"'
},
port: 8010,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
// proxyTable: {
// '/': {
// target: 'http://test1-sc.yunqueyi.com/',
// changeOrigin: true
// }
// },
context: [ //代理路径
'/test'
],
proxypath: 'http://localhost:9000',
cssSourceMap: true
}
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="云鹊医,云鹊健康,消息中心,项目管理,教培项目,学情报告,随访管理,预约随访" name="keywords">
<meta content="消息中心。" name="description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
<meta name="screen-orientation" content="portrait"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="full-screen" content="yes">
<meta name="x5-fullscreen" content="true">
<title>消息中心</title>
</head>
<body id="appBody">
<div id="app">
<router-view></router-view>
</div>
<script src="https://unpkg.com/qiniu-js@2.2.0/dist/qiniu.min.js"></script>
</body>
</html>
因为 它太大了无法显示 源差异 。您可以改为 查看blob
{
"name": "yqy",
"version": "2.0.1",
"description": "vue2-yqy",
"author": "cangdu <1264889788@qq.com>",
"private": true,
"license": "GPL",
"scripts": {
"dev": "cross-env BUILD_ENV=development node build/dev-server.js",
"local": "cross-env BUILD_ENV=development node build/dev-server.js",
"build": "node build/build.js",
"build:dev": "cross-env BUILD_ENV=dev node build/build.js",
"build:test": "cross-env BUILD_ENV=test node build/build.js",
"build:uat": "cross-env BUILD_ENV=uat node build/build.js",
"build:pro": "cross-env BUILD_ENV=pro node build/build.js"
},
"dependencies": {
"@babel/polyfill": "^7.2.5",
"axios": "0.16.2",
"better-scroll": "^0.1.15",
"echarts": "^4.2.0-rc.2",
"element-ui": "^2.9.1",
"fastclick": "^1.0.6",
"iscroll": "^5.2.0",
"js-cookie": "^2.2.0",
"showdown": "^1.6.4",
"vue": "^2.1.0",
"vue-router": "^2.1.1",
"vuex": "^2.0.0"
},
"devDependencies": {
"autoprefixer": "^6.4.0",
"autoprefixer-loader": "^3.2.0",
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-register": "^6.0.0",
"babel-runtime": "^6.23.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.1.0",
"cross-env": "^5.0.0",
"css-loader": "^0.25.0",
"eventsource-polyfill": "^0.9.6",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.8.1",
"http-proxy-middleware": "^0.17.2",
"json-loader": "^0.5.4",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"node-gyp": "^3.4.0",
"node-sass": "^4.9.2",
"opn": "^4.0.2",
"ora": "^0.3.0",
"sass": "^0.5.0",
"sass-loader": "^4.1.1",
"scss": "^0.2.4",
"scss-loader": "0.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.4",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"vue-lazyload": "^1.2.6",
"vue-loader": "^10.0.0",
"vue-style-loader": "^1.0.0",
"vue-template-compiler": "^2.1.0",
"webpack": "^1.13.2",
"webpack-dev-middleware": "^1.8.3",
"webpack-dev-server": "^1.16.2",
"webpack-hot-middleware": "^2.12.2",
"webpack-merge": "^0.14.1"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
}
}
<template>
<div>
<v-header :userName="userName" :portrait="portrait" :idType="idType"></v-header>
<v-slidebar :authList="authList" :tokenValue="token"></v-slidebar>
<el-container>
<div class="content" id="body-content">
<transition name="router-fade" mode="out-in">
<keep-alive>
<router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
</transition>
<transition name="router-fade" mode="out-in">
<router-view v-if="!$route.meta.keepAlive"></router-view>
</transition>
<v-footer></v-footer>
</div>
</el-container>
</div>
</template>
<script>
import VHeader from './views/layout/header.vue'
import VSlidebar from './views/layout/slidebar.vue'
import VFooter from './views/layout/footer.vue'
import { base64decode, isNotEmptyUtils, getUrlParamsMap } from "./utils/utils.js"
import { mapActions, mapGetters } from 'vuex'
import { getLoginUrl } from './utils/index.js'
let vm = null
export default {
components:{
VHeader,
VSlidebar,
VFooter
},
data() {
return {
idType: 0,
token: '',
userName: '',
portrait: '',
authList: {}
}
},
computed:{
...mapGetters([
'_token'
])
},
created() {
vm = this
vm.getToken()
},
mounted() {
},
methods: {
// 解密token
getToken() {
let href = window.location.href
let offset = href.indexOf("?")
if(offset !== -1) {
let paramStr = href.substring(offset + 1, href.length)
let pars = base64decode(paramStr)
let paramMap = getUrlParamsMap(pars, "&")
if (isNotEmptyUtils(paramMap["token"])) {
vm.token = paramMap["token"]
localStorage.setItem('storageToken', vm.token)
vm.$router.push({ path: 'create-push' })
} else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return
}
}
}else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return
}
}
vm.changeToken(vm.token)
vm.getUserAuth(vm.token)
},
// 修改token
...mapActions([
'changeToken',
'changeIdType',
'changeMaster'
]),
// 获取用户权限
getUserAuth(token) {
let req = null
req = {
token: token
}
vm.GET('portal/common/v1/role',req).then((res) => {
if(res.code == '000000') {
vm.changeIdType(res.data.idType)
vm.changeMaster(res.data.masterAdministratorFlag)
localStorage.setItem('storageIdType', res.data.idType)
localStorage.setItem('storageMaster', res.data.masterAdministratorFlag)
localStorage.setItem("user_name", res.data.name);
vm.idType = res.data.idType
vm.userName = res.data.name
vm.portrait = res.data.imageUrl
vm.authList = res.data.auth
} else {
vm.$message.info(res.message)
}
})
}
}
}
</script>
<style lang="scss">
// @import './style/common';
@import './style/global';
@import './style/mixin.scss';
.router-fade-enter-active, .router-fade-leave-active {
transition: opacity .1s;
}
.router-fade-enter, .router-fade-leave-active {
opacity: 0;
}
.el-container {
margin-left: 255px;
overflow: hidden;
.content {
// background: #F0F2F5;
position: absolute;
left: 255px;
right: 0;
top: 64px;
bottom: 0;
width: auto;
box-sizing: border-box;
overflow-x: hidden;
overflow-y: scroll;
}
}
</style>
<template>
<div class="bread-crumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item>{{curmbFirst}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbSecond" :to="{ path: jumPathThird }">{{curmbSecond}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="curmbThird">{{curmbThird}}</el-breadcrumb-item>
</el-breadcrumb>
</div>
</template>
<script>
export default {
props: {
curmbFirst: {
type: String
},
curmbSecond: {
type: String
},
curmbThird: {
type: String
},
jumPathThird: {
type: String
}
}
}
</script>
<style lang="scss">
.bread-crumb {
position: fixed;
left: 255px;
top: 64px;
width: 100%;
background: #fff;
height: 61px;
padding: 20px 20px 30px;
z-index: 99;
border-top: 3px solid #F0F2F5;
.el-breadcrumb__inner {
font-size: 14px;
}
}
</style>
<template>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0;visibility:hidden">
<defs>
<symbol viewBox="0 0 60 60" id="eleme">
<path fill="#3CABFF" fill-rule="evenodd" d="M0 9.375A9.374 9.374 0 0 1 9.375 0h41.25A9.374 9.374 0 0 1 60 9.375v41.25A9.374 9.374 0 0 1 50.625 60H9.375A9.374 9.374 0 0 1 0 50.625V9.375zm35.94 30.204c-5.601 3.147-12.645 1.256-15.834-4.217-3.206-5.501-1.303-12.537 4.25-15.713 4.7-2.689 10.51-1.749 14.127 1.941L27.526 27.89a2.81 2.81 0 0 0-1.037 3.854 2.862 2.862 0 0 0 3.887 1.035l15.988-9.166a17.238 17.238 0 0 0-1.222-2.571c-4.777-8.198-15.358-11.007-23.632-6.275-8.275 4.734-11.11 15.217-6.332 23.415 4.77 8.184 15.322 10.997 23.59 6.297.877-.5 1.654-1.037 2.376-1.623l-1.31-2.248a2.868 2.868 0 0 0-3.893-1.028zm10.824-7.39l-1.418-2.425-4.911 2.798 2.835 4.846 2.454-1.399h.002a2.779 2.779 0 0 0 1.038-3.82z">
</path>
</symbol>
<symbol viewBox="0 0 28 33" id="user">
<path fill-rule="evenodd" d="M20.798 19.289c2.636-2.002 4.215-5.091 4.215-8.437 0-5.886-4.845-10.647-10.808-10.647S3.397 4.966 3.397 10.852c0 3.345 1.578 6.433 4.212 8.435l.264-2.678C4.358 18.32 1.591 21.403.168 25.187l1.478.556v-1.579c-1.485.73-1.485.73-1.501 1.079-.054.188-.054.188-.069.278a2.58 2.58 0 0 0-.026.229 9.112 9.112 0 0 0-.019.4c-.008.265-.014.617-.018 1.039-.005.511-.006 1.037-.006 1.451v.027c-.004 1.732 1.41 3.129 3.154 3.129h22.082a3.18 3.18 0 0 0 3.172-3.153l.011-1.305.008-.897.003-.296.001-.083v-.022-.006-.001l.002-.278-.093-.262c-1.385-3.918-4.203-7.122-7.812-8.88l.263 2.678zm-1.911-2.516l-2.045 1.553 2.309 1.125c2.856 1.392 5.106 3.949 6.218 7.093l-.09-.54V26.033l-.001.083-.003.296-.008.897-.011 1.305c0 .01-.011.021-.013.021H3.161c-.007 0 .005.011.005.032v-.031c0-.404.001-.92.006-1.418.004-.4.01-.732.017-.969.004-.121.008-.212.012-.262l-.006.043c-.009.06-.009.06-.058.229-.01.336-.01.336-1.49 1.063H2.74l.385-1.024c1.141-3.035 3.35-5.495 6.131-6.849l2.309-1.124-2.045-1.554c-1.859-1.412-2.964-3.576-2.964-5.92 0-4.129 3.418-7.488 7.649-7.488s7.649 3.359 7.649 7.488c0 2.344-1.106 4.509-2.966 5.921z" class="path1">
</path>
</symbol>
<symbol viewBox="0 0 32 31" id="shop">
<g fill-rule="evenodd">
<path d="M28.232 1.822C27.905.728 26.97.152 25.759.152H5.588c-1.252 0-1.867.411-2.397 1.415l-.101.243-.443 1.434-.975 3.154-.002.007C.837 9.101.294 10.854.26 10.956l-.059.259c-.231 1.787.337 3.349 1.59 4.448 1.159 1.017 2.545 1.384 3.865 1.384.07 0 .07 0 .132-.002-.01.001-.01.001.061.002 1.32 0 2.706-.367 3.865-1.384a4.96 4.96 0 0 0 .413-.407l-1.043-.946-1.056.931c1.033 1.171 2.51 1.792 4.21 1.801.04.002.088.004.173.004 1.32 0 2.706-.367 3.865-1.384.148-.13.287-.267.418-.411l-1.044-.944-1.057.93c1.033 1.174 2.511 1.796 4.213 1.806.04.002.088.004.173.004 1.32 0 2.706-.367 3.865-1.384.15-.131.29-.27.422-.416l-1.046-.943-1.058.929c1.033 1.177 2.513 1.801 4.218 1.811.04.002.088.004.173.004 1.32 0 2.706-.367 3.865-1.384 1.206-1.058 1.858-2.812 1.676-4.426-.069-.61-.535-2.207-1.354-4.785l-.109-.342a327.554 327.554 0 0 0-1.295-3.966l-.122-.366.014.043h.004zm-2.684.85l.12.361.318.962c.329.999.658 2.011.965 2.973l.108.338c.719 2.262 1.203 3.92 1.24 4.249.08.711-.233 1.553-.735 1.993-.553.485-1.308.685-2.008.685l-.098-.002c-.987-.007-1.695-.306-2.177-.854l-1.044-1.189-1.06 1.175a2.192 2.192 0 0 1-.188.185c-.553.485-1.308.685-2.008.685l-.098-.002c-.985-.007-1.693-.305-2.174-.852l-1.043-1.185-1.059 1.171c-.058.064-.12.125-.186.183-.553.485-1.308.685-2.008.685l-.098-.002c-.984-.007-1.692-.304-2.173-.85L9.101 12.2l-1.058 1.166a2.248 2.248 0 0 1-.184.181c-.553.485-1.307.685-2.008.685l-.061-.001-.131.001c-.701 0-1.455-.2-2.008-.685-.538-.472-.767-1.102-.654-1.971l-1.396-.18 1.338.44c.043-.13.552-1.775 1.425-4.599l.002-.007.975-3.155.443-1.434-1.345-.415 1.245.658c.054-.102.042-.085-.083-.001-.122.082-.143.086-.009.086H25.763c.053 0-.164-.133-.225-.339l.014.043-.004-.001zM5.528 19.48c.778 0 1.408.63 1.408 1.408v7.424a1.408 1.408 0 1 1-2.816 0v-7.424c0-.778.63-1.408 1.408-1.408z">
</path>
<path d="M.28 29.72c0-.707.58-1.28 1.277-1.28h28.155a1.28 1.28 0 0 1 .007 2.56H1.561A1.278 1.278 0 0 1 .28 29.72z">
</path>
<path d="M26.008 19.48c.778 0 1.408.63 1.408 1.408v7.424a1.408 1.408 0 1 1-2.816 0v-7.424c0-.778.63-1.408 1.408-1.408z">
</path>
</g>
</symbol>
<symbol viewBox="0 0 28 33" id="location">
<g fill-rule="evenodd">
<path d="M20.809 21.6L12.9 29.509h1.616l-7.992-7.992a13.003 13.003 0 0 1-.506-.478c-4.25-4.25-4.25-11.14 0-15.389s11.14-4.25 15.389 0c4.25 4.25 4.25 11.14 0 15.389a10.81 10.81 0 0 1-.543.508l-.056.052zm1.56 1.669c.225-.196.443-.401.656-.613 5.142-5.142 5.142-13.48 0-18.622s-13.48-5.142-18.622 0c-5.142 5.142-5.142 13.48 0 18.622.18.18.364.354.553.522l8.753 8.755 8.661-8.664z" class="path1">
</path>
<path d="M9.428 16.739a6.063 6.063 0 1 0 8.573-8.575 6.063 6.063 0 0 0-8.573 8.575zm1.616-1.616a3.776 3.776 0 1 1 5.34-5.341 3.776 3.776 0 0 1-5.34 5.341z" class="path2">
</path>
</g>
</symbol>
<symbol id="star" viewBox="0 0 32 32">
<path class="path1" d="M16 26.382l-8.16 4.992c-1.5 0.918-2.382 0.264-1.975-1.435l2.226-9.303-7.269-6.218c-1.337-1.143-0.987-2.184 0.755-2.322l9.536-0.758 3.667-8.835c0.674-1.624 1.772-1.613 2.442 0l3.667 8.835 9.536 0.758c1.753 0.139 2.082 1.187 0.755 2.322l-7.269 6.218 2.226 9.303c0.409 1.71-0.485 2.347-1.975 1.435l-8.16-4.992z">
</path>
</symbol>
<symbol viewBox="0 0 32 32" id="backtop">
<g fill-rule="evenodd">
<circle cx="16" cy="16" r="15" stroke="#999" stroke-width="0.6" fill="none"/>
<line x1="16" y1="10" x2="16" y2="21" style="stroke:#999;stroke-width:0.8"/>
<line x1="10" y1="10" x2="22" y2="10" style="stroke:#999;stroke-width:0.8"/>
<path d="M9.5 18 L16 10 L22.5 18" style="stroke:#999;stroke-width:0.8;fill:none"/>
<text x="10" y="27" style="font-size:6px;fill:#999;font-weight:700;">顶部</text>
</g>
</symbol>
<symbol viewBox="0 0 33 32" id="default">
<path fill="#3b87c8" d="M13.374 29.064a.94.94 0 0 1-.941-.941V6.476l-7.285 6.899a.942.942 0 0 1-1.299-1.364l8.876-8.424a.94.94 0 0 1 1.59.681v23.855a.94.94 0 0 1-.941.941zM20.904 29.355h-.008a.94.94 0 0 1-.375-.078.943.943 0 0 1-.559-.86V3.944a.94.94 0 1 1 1.882 0v22.287l7.238-6.842a.94.94 0 0 1 1.289 1.366l-8.818 8.338a.943.943 0 0 1-.649.264z">
</path>
</symbol>
<symbol viewBox="0 0 32 32" id="distance">
<path fill="#2a9bd3" d="M15.884 31.236l-.042.001a.888.888 0 0 1-.59-.224l-7.91-7.91a7.548 7.548 0 0 1-.498-.471 12.752 12.752 0 0 1-3.747-9.045C3.097 6.523 8.824.796 15.888.796s12.791 5.727 12.791 12.791c0 3.532-1.432 6.73-3.747 9.045-.196.196-.409.391-.613.578l-7.813 7.804a.886.886 0 0 1-.589.223l-.035-.001zm0-28.667C9.818 2.59 4.908 7.513 4.908 13.582c0 3.023 1.218 5.762 3.19 7.752l.461.435 7.316 7.316 7.2-7.2q.284-.249.551-.516a10.977 10.977 0 0 0 3.225-7.787c0-6.066-4.905-10.987-10.965-11.013z">
</path>
<path fill="#2a9bd3" d="M15.884 18.524a5.707 5.707 0 0 1-4.07-1.732l-.001-.001a5.76 5.76 0 1 1 4.119 1.734h-.05zm-2.817-2.942a3.982 3.982 0 1 0 0-5.626c-.726.717-1.175 1.713-1.175 2.813s.449 2.096 1.175 2.813z"></path>
</symbol>
<symbol viewBox="0 0 32 32" id="fengniao">
<path fill="#27a9e1" d="M5.953 2.793s-.117 1.801.857 3.56c.361.255 10.458 6.218 10.458 6.218L5.953 2.794z"></path>
<path fill="#b8e5fa" d="M9.604.889s-.333 1.404.069 3.147c.254.307 7.801 8.116 7.801 8.116L9.604.889z"></path>
<path fill="#0089cf" d="M29.282 14.601l-4.861-.361s-.133-.001-.147-.226h-.002a2.652 2.652 0 0 0-2.978-2.357h-.003l-.011.001-.12.019-.004.001c-.432.075-1.812.374-3.038 1.285 0 0-.167.121-.421.33L2.665 6.043s3.254 8.665 12.207 11.98c-1.6 2.849-7.407 13.48-7.407 13.48l2.446-1.306s.775-2.853 1.884-4.957c.609-.936 1.211-.992 1.498-1.141.291-.151 3.707-.765 6.431-4.339.897-1.166 1.244-2.666 1.723-4.261.28-.061 3.008-.651 3.789-.718 1.068-.092 4.045-.181 4.045-.181z"></path>
<path fill="#0089cf" d="M7.392 17.849c-1.567-1.368-2.199-3.219-2.035-5.217-.232-.288-.45-.572-.654-.851-.484 2.903.555 4.854 2.176 6.269 1.538 1.342 3.635 1.85 5.466 1.577-1.674.109-3.563-.565-4.953-1.778z"></path>
<path fill="#0089cf" d="M12.345 19.628h.002zm-7.642-7.846c.204.279.421.563.654.851-.164 1.998.468 3.849 2.035 5.217 1.292 1.128 3.016 1.79 4.597 1.79.12 0 .238-.004.356-.011a6.554 6.554 0 0 1-.975.071c-1.568 0-3.22-.54-4.49-1.648-1.621-1.415-2.66-3.366-2.176-6.269z"></path>
</symbol>
<symbol viewBox="0 0 23 32" id="hot">
<path fill="#f07373" d="M9.859 29.375c-3.489-.771-6.362-3.097-7.187-5.551-.882-2.623-1.029-6.873-.238-9.318l-1.727.037.001.002.001.004.004.01.011.029.038.091c.039.09.086.191.142.3.155.304.349.627.586.955a7.477 7.477 0 0 0 2.711 2.318c.583.153.583.153 1.087-.188.187-.263.187-.263.224-.39.028-.094.041-.176.05-.28.01-.109.016-.238.022-.47.063-2.219.162-3.38.562-4.943a10.05 10.05 0 0 1 .814-2.185c1.433-2.723 4.843-6.053 6.699-7.021l-1.325-.962c-.064.382-.127.992-.131 1.722-.008 1.252.169 2.393.616 3.329.261.547.525.968 1.132 1.862l.23.339c.86 1.281 1.161 1.986 1.069 2.653l-.009.125c.069.517.069.517.781.906.451-.026.451-.026.578-.104.144-.093.144-.093.19-.136.041-.037.079-.077.123-.125.068-.076.153-.178.245-.295.22-.279.458-.615.677-.963.648-1.028 1.045-1.988 1.037-2.845l-.914.009-.706.581c.295.358.809 1.075 1.33 1.936.826 1.363 1.492 2.791 1.898 4.209 1.1 3.845.3 9.288-2.245 11.75a9.652 9.652 0 0 1-1.659 1.29 10.232 10.232 0 0 1-3.471 1.332c-.794.151-1.385.191-2.064.191h-.009a2.75 2.75 0 0 1-.373-.03 6.007 6.007 0 0 1-.585-.115 7.765 7.765 0 0 1-.536-.15l-.578 1.735a9.182 9.182 0 0 0 1.445.341c.221.031.43.048.627.048h.009a12.546 12.546 0 0 0 2.407-.224 12.011 12.011 0 0 0 4.088-1.572c.699-.431 1.358-.94 1.971-1.533 3.098-2.998 4-9.132 2.731-13.567-.455-1.591-1.188-3.161-2.092-4.653-.569-.939-1.134-1.727-1.482-2.15l-1.645-1.998.024 2.588c.004.412-.281 1.1-.756 1.853a9.64 9.64 0 0 1-.569.809 4.528 4.528 0 0 1-.158.195c.028-.027.028-.027.16-.113.122-.075.122-.075.57-.101.71.388.71.388.778.902h-.914l.906.125c.174-1.262-.261-2.281-1.362-3.922l-.235-.347c-.554-.817-.787-1.189-.995-1.624-.306-.642-.444-1.53-.438-2.53a10.566 10.566 0 0 1 .107-1.431L14.44.304l-1.628.85c-2.18 1.138-5.862 4.733-7.471 7.791a11.873 11.873 0 0 0-.967 2.583 19.2 19.2 0 0 0-.511 3.147c-.036.423-.061.839-.079 1.273-.011.281-.019.531-.029.924-.005.191-.01.298-.015.354a.403.403 0 0 1 .019-.077c.027-.099.027-.099.203-.346.492-.332.492-.332 1.112-.157a5.745 5.745 0 0 1-2.54-2.496 3.456 3.456 0 0 1-.093-.197l-.018-.044-.002-.006v.001l.001.002v.002l-.915-2.473-.812 2.51c-.917 2.836-.757 7.485.245 10.463 1.042 3.099 4.442 5.852 8.526 6.754l.395-1.785z"></path>
</symbol>
<symbol viewBox="0 0 32 32" id="price">
<path fill="#e6b61a" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16zm0-2C8.268 30 2 23.732 2 16S8.268 2 16 2s14 6.268 14 14-6.268 14-14 14z"></path><path fill="#e6b61a" d="M23.14 6.06l-5.12 8.65h4.48v1.54h-5.49v2.43h5.49v1.54h-5.49v5.1h-2.02v-5.1H9.53v-1.54h5.46v-2.43H9.53v-1.54h4.45L8.8 6.06h2.24l4.99 8.48 4.93-8.48h2.18z"></path>
</symbol>
<symbol viewBox="0 0 33 32" id="rating">
<path fill="#eba53b" d="M27.087 31.84L16.8 25.553 6.504 31.84l2.824-11.727-9.186-7.878 12.019-.941L16.801.16l4.631 11.134 12.019.941-9.158 7.849zM16.8 23.369l7.407 4.527-2.014-8.471 6.588-5.647-8.659-.696L16.8 5.063l-3.341 8.019-8.659.696 6.588 5.647-2.014 8.471z"></path>
</symbol>
<symbol viewBox="0 0 38 32" id="selected">
<path fill="#3190e8" d="M32.291 2.327c.582-.582 1.455-.582 2.036 0l2.036 2.036c.582.582.582 1.455 0 2.036L13.818 29.09c-.582.582-1.455.582-2.036 0L1.455 18.908c-.582-.582-.582-1.455 0-2.036l2.036-2.036c.582-.582 1.455-.582 2.036 0l7.273 7.273L32.291 2.327z"></path>
</symbol>
<symbol viewBox="0 0 32 32" id="speed">
<path fill="#37c7b7" d="M16 32c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16zm0-2C8.268 30 2 23.732 2 16S8.268 2 16 2s14 6.268 14 14-6.268 14-14 14z"></path><path fill="#37c7b7" d="M15 7v11.002l5.678 4.882 1.304-1.517-5.33-4.583.348.758V6.999h-2z"></path>
</symbol>
<symbol viewBox="0 0 50 50" id="cart-minus">
<path fill-rule="evenodd" stroke-width="4" d="M22 0C9.8 0 0 9.8 0 22s9.8 22 22 22 22-9.8 22-22S34.2 0 22 0zm0 42C11 42 2 33 2 22S11 2 22 2s20 9 20 20-9 20-20 20z" clip-rule="evenodd"></path>
<path fill-rule="evenodd" d="M32 20c1.1 0 2 .9 2 2s-.9 2-2 2H12c-1.1 0-2-.9-2-2s.9-2 2-2h20z" clip-rule="evenodd"></path>
</symbol>
<symbol viewBox="0 0 50 50" id="cart-add">
<path fill="none" d="M0 0h44v44H0z"></path>
<path fill-rule="evenodd" d="M22 0C9.8 0 0 9.8 0 22s9.8 22 22 22 22-9.8 22-22S34.2 0 22 0zm10 24h-8v8c0 1.1-.9 2-2 2s-2-.9-2-2v-8h-8c-1.1 0-2-.9-2-2s.9-2 2-2h8v-8c0-1.1.9-2 2-2s2 .9 2 2v8h8c1.1 0 2 .9 2 2s-.9 2-2 2z" clip-rule="evenodd"></path>
</symbol>
<symbol viewBox="0 0 24 32" id="cart-remove">
<path fill="#bbb" fill-rule="evenodd" d="M21.5 10h-19c-1.1 0-1.918.896-1.819 1.992l1.638 18.016C2.419 31.104 3.4 32 4.5 32h15c1.1 0 2.081-.896 2.182-1.992l1.637-18.016A1.798 1.798 0 0 0 21.5 10zM8 28H5L4 14h4v14zm6 0h-4V14h4v14zm5 0h-3V14h4l-1 14zm2-24h-2.941l-.353-2.514C17.592.669 16.823 0 15.998 0H8c-.825 0-1.593.668-1.708 1.486L5.94 4H3a3 3 0 0 0-3 3v1h24V7a3 3 0 0 0-3-3zM8.24 2h7.52l.279 2H7.96l.28-2z"></path>
</symbol>
<symbol viewBox="0 0 14 16" id="cart">
<path fill="#FFF" fill-rule="evenodd" d="M12.364 2.998H2.088L1.816.687a.455.455 0 0 0-.478-.431L.431.303A.454.454 0 0 0 0 .78l1.256 10.893c.006.293.011 1.325.933 1.325h9.546a.455.455 0 0 0 .455-.454v-.881a.454.454 0 0 0-.455-.455H3.05l-.11-.937h8.606c.998 0 1.889-.724 1.989-1.616l.455-4.04c.1-.893-.628-1.617-1.626-1.617zm-.45 4.245c-.075.669-.317 1.212-1.066 1.212H2.727L2.3 4.812h8.821c.749 0 1.065.543.99 1.212l-.197 1.219zM2.416 15.79a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm9.092 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"></path>
</symbol>
<symbol viewBox="0 0 58 58" id="cart-icon">
<defs>
<filter id="a" width="200%" height="200%" x="-50%" y="-50%" filterUnits="objectBoundingBox"><feOffset in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur stdDeviation="1.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0" in="shadowBlurOuter1" result="shadowMatrixOuter1"/><feMerge><feMergeNode in="shadowMatrixOuter1"/><feMergeNode in="SourceGraphic"/></feMerge></filter><path id="b" d="M7.614 4.051c-1.066.086-1.452-.398-1.752-1.584C5.562 1.28.33 5.88.33 5.88l3.71 19.476c0 .148-1.56 7.515-1.56 7.515-.489 2.19.292 4.27 3.56 4.32 0 0 36.917.017 36.92.047 1.979-.012 2.981-.995 3.013-3.039.03-2.043-1.045-2.978-2.987-2.993L8.83 31.192s.86-3.865 1.077-3.865c0 0-5.788.122 32.065-1.956.606-.033 2.018-.764 2.298-1.848 1.113-4.317 4.008-13.26 4.458-15.64.932-4.925 2.061-8.558-4.28-7.405 0 0-35.768 3.487-36.833 3.573z"/>
</defs>
<g fill="none" fill-rule="evenodd" filter="url(#a)" transform="translate(3 2)">
<g transform="translate(5.038 7.808)"><mask id="c" fill="#fff"><use xlink:href="#b"/></mask><use fill="#FFF" xlink:href="#b"/><path fill="#2073C1" d="M53.962 7.774l-5.701 19.305-40.78 1.574z" opacity=".1" mask="url(#c)"/></g><path stroke="#FFF" stroke-width="6" d="M9.374 18.722S7.868 11.283 7.323 8.71C6.778 6.136 5.86 5.33 3.978 4.52 2.096 3.713.367 2.286.367 2.286" stroke-linecap="round"/><circle cx="46" cy="51" r="4" fill="#FFF"/><circle cx="12" cy="51" r="4" fill="#FFF"/>
</g>
</symbol>
<symbol viewBox="0 0 14 14" id="arrow-left">
<path d="M0 0 L8 7 L0 14" stroke="#fff" stroke-width="1" fill="none"/>
</symbol>
<symbol viewBox="0 0 1024 1024" id="res-well"><path fill="#7ED321" fill-rule="evenodd" d="M512 0C229.376 0 0 229.376 0 512s229.376 512 512 512 512-229.376 512-512S794.624 0 512 0zM247.808 402.432c0-36.864 39.936-93.184 93.184-93.184s93.184 56.32 93.184 93.184c0 11.264-9.216 20.48-20.48 20.48-11.264 0-20.48-9.216-20.48-20.48 0-16.384-24.576-52.224-52.224-52.224-27.648 0-52.224 35.84-52.224 52.224 0 11.264-9.216 20.48-20.48 20.48-11.264 0-20.48-9.216-20.48-20.48zM512 800.768c-132.096 0-239.616-96.256-239.616-215.04 0-11.264 9.216-20.48 20.48-20.48 11.264 0 20.48 9.216 20.48 20.48 0 96.256 89.088 174.08 198.656 174.08 109.568 0 198.656-77.824 198.656-174.08 0-11.264 9.216-20.48 20.48-20.48 11.264 0 20.48 9.216 20.48 20.48 0 117.76-107.52 215.04-239.616 215.04zm243.712-377.856c-11.264 0-20.48-9.216-20.48-20.48 0-17.408-24.576-52.224-52.224-52.224-28.672 0-52.224 34.816-52.224 52.224 0 11.264-9.216 20.48-20.48 20.48-11.264 0-20.48-9.216-20.48-20.48 0-36.864 39.936-93.184 93.184-93.184s93.184 56.32 93.184 93.184c0 11.264-9.216 20.48-20.48 20.48z"></path></symbol>
<symbol viewBox="0 0 1024 1024" id="res-bad"><path fill="#D0021B" fill-rule="evenodd" d="M512 0C230.326 0 0 230.326 0 512s230.573 512 512 512 512-230.326 512-512S793.674 0 512 0zM240.694 373.755l158.735-56.285 15.306 46.164L256 419.919l-15.306-46.164zm440.409 384.123c-10.122 0-20.49-10.122-25.674-20.49-10.122-10.122-61.47-25.674-148.366-25.674-86.896 0-138.245 15.306-148.366 25.674 0 10.122-10.122 20.49-25.674 20.49s-25.674-10.122-25.674-25.674c0-71.591 174.041-71.591 194.53-71.591 20.489 0 194.53 0 194.53 71.591 10.122 10.368 0 25.674-15.306 25.674zM768 419.919l-163.672-61.47 15.306-46.164 158.735 56.285-10.368 51.348-.001.001z"></path></symbol>
<symbol viewBox="0 0 122 122" id="avatar-default"><path fill="#DCDCDC" fill-rule="evenodd" d="M61 121.5c33.413 0 60.5-27.087 60.5-60.5S94.413.5 61 .5.5 27.587.5 61s27.087 60.5 60.5 60.5zm12.526-45.806c-.019 3.316-.108 6.052.237 9.825 3.286 8.749 18.816 9.407 28.468 17.891-1.833 1.998-6.768 6.788-15 10.848-7.02 3.463-16.838 6.416-24.831 6.416-17.366 0-32.764-7.149-42.919-17.264 9.713-8.407 25.49-9.173 28.769-17.891.345-3.773.258-6.509.24-9.825l-.004-.002c-1.903-.985-5.438-7.268-6.01-12.571-1.492-.12-3.843-1.561-4.534-7.247-.37-3.053 1.107-4.77 2.004-5.31-5.046-19.212 1.507-33.16 20.749-34.406 5.753 0 10.18 1.52 11.909 4.523 15.35 2.702 11.756 22.658 9.328 29.882.899.54 2.376 2.258 2.004 5.31-.689 5.687-3.042 7.127-4.534 7.248-.575 5.305-3.25 10.82-5.873 12.57l-.003.003zM61 120.5C28.14 120.5 1.5 93.86 1.5 61S28.14 1.5 61 1.5s59.5 26.64 59.5 59.5-26.64 59.5-59.5 59.5z"></path></symbol>
<symbol viewBox="0 0 655 1024" id="mobile"><path d="M0 122.501v778.998C0 968.946 55.189 1024 123.268 1024h408.824c68.52 0 123.268-54.846 123.268-122.501V122.501C655.36 55.054 600.171 0 532.092 0H123.268C54.748 0 0 54.846 0 122.501zM327.68 942.08c-22.622 0-40.96-18.338-40.96-40.96s18.338-40.96 40.96-40.96 40.96 18.338 40.96 40.96-18.338 40.96-40.96 40.96zM81.92 163.84h491.52V819.2H81.92V163.84z"></path></symbol>
<symbol viewBox="0 0 1024 1024" id="arrow-right" class="icon"><path d="M716.298 417.341l-.01.01L307.702 7.23l-94.295 94.649 408.591 410.117-408.591 410.137 94.295 94.639 502.891-504.76z" class="selected"></path></symbol>
<symbol viewBox="0 0 40 40" id="order"><path d="M31.5 3h-23C6 3 4 5.1 4 7.7v24.7C4 34.9 6 37 8.5 37h23c2.5 0 4.5-2.1 4.5-4.7V7.7C36 5.1 34 3 31.5 3zM11.8 28.2c-1.1 0-2-.9-2-2.1 0-1.1.9-2.1 2-2.1s2 .9 2 2.1c0 1.2-.9 2.1-2 2.1zm0-6.1c-1.1 0-2-.9-2-2.1 0-1.1.9-2.1 2-2.1s2 .9 2 2.1c0 1.1-.9 2.1-2 2.1zm0-6.2c-1.1 0-2-.9-2-2.1 0-1.1.9-2.1 2-2.1s2 .9 2 2.1c0 1.2-.9 2.1-2 2.1zm5.1 11.9h13.5v-2.6H16.9v2.6zm0-6.5h13.5v-2.6H16.9v2.6zm0-6.6h13.5v-2.6H16.9v2.6z"></path></symbol>
<symbol viewBox="0 0 40 40" id="point"><path d="M34.6 7.1c0-1.1-1-2.1-2.1-2.1h-24c-1.1 0-2 1-2.1 2.1l-1.6 25C4.6 34.3 6.3 36 8.5 36h24c2.2 0 3.9-1.7 3.7-3.9l-1.6-25zm-5.9 6.1c-.2 4.6-3.7 8.2-8.3 8.2-4.6 0-8.2-3.7-8.4-8.3-.3-.2-.5-.6-.5-1 0-.7.6-1.2 1.3-1.2s1.3.6 1.3 1.2c0 .5-.3.9-.7 1.1.2 3.8 3.2 6.8 7.1 6.8 3.9 0 6.8-3.1 7-6.9-.4-.2-.6-.6-.6-1.1 0-.7.6-1.2 1.3-1.2s1.3.6 1.3 1.2c-.2.6-.4 1-.8 1.2z"></path></symbol>
<symbol viewBox="0 0 40 40" id="vip"><path d="M7 33.4c0 1.1.9 1.6 2 1.6h22c1.1 0 2-.5 2-1.6V31H7v2.4z"></path><path d="M32.1 14.3c-.6 2.3-2.6 4-5.1 4-2.9 0-5.3-2.3-5.3-5.2v-.2c-.5.2-1 .3-1.6.3-.6 0-1.1-.1-1.7-.3v.2c0 2.9-2.4 5.2-5.3 5.2-2.5 0-4.6-1.7-5.1-4.1-.5.4-1.2.6-1.8.6-.3 0-.5.1-.8 0L7.2 29h26l1.7-14.2c-.3.1-.5.1-.8.1-.8 0-1.5-.2-2-.6z" class="st0"></path><ellipse cx="20.1" cy="8.2" rx="3.2" ry="3.2"></ellipse><ellipse cx="6.4" cy="10.5" rx="2.4" ry="2.4"></ellipse><ellipse cx="33.8" cy="10.5" rx="2.4" ry="2.4"></ellipse></symbol>
<symbol viewBox="0 0 40 40" id="download"><path d="M30 5H10c-2.8 0-5 2.2-5 5v20c0 2.8 2.2 5 5 5h20c2.8 0 5-2.2 5-5V10c0-2.8-2.2-5-5-5zm-3.9 22.7c-.1.2-.3.4-.6.5-4.3 2.8-10.1 1.6-13-2.8-2.8-4.3-1.6-10.2 2.8-13 4.3-2.8 10.2-1.6 13 2.8.2.2.3.5.4.8.1.2 0 .5-.2.7l-8.8 5.7c-.2.2-.6.1-.7-.2l-.5-.7c-.4-.6-.2-1.5.4-1.9l5.6-3.6c.2-.2.3-.5.2-.7l-.1-.1c-2.2-1.8-5.4-2.1-7.9-.4-3.1 2-4 6.1-2 9.2 2 3.1 6.1 4 9.2 2 .6-.4 1.3-.2 1.7.4l.3.7c.1.2.4.5.2.6zm3.1-4.4l-.9.6c-.2.2-.6.1-.7-.2L26.5 22c-.2-.2-.1-.6.2-.7l1.8-1.1c.2-.2.6-.1.7.2l.6.9c.3.6.1 1.5-.6 2z"></path></symbol>
<symbol viewBox="0 0 40 40" id="service"><g id="service_XMLID_1_"><path id="service_XMLID_6_" d="M32.2 9.5c-.2-.7-.1-.7-.4-.9-1.7-1.2-5.3.2-6.7 1.9-.8-3.8-3.8-6.1-4.7-5.9-.9-.2-4 2.1-4.8 5.9-1.3-1.7-5-3.1-6.7-1.9-.1.1-.5.6-.5.7C5.4 20.7 15 24.6 19 25.7v8.7c0 .7.3 1.2 1 1.2s1-.5 1-1.2v-8.6c4-1 14.2-4.8 11.2-16.3z"></path><path id="service_XMLID_7_" d="M6 25c-.9 0-1.6.7-1.6 1.5.1.8.7 1.5 1.6 1.5 3.1 0 6.5 1.5 8.5 3.7.3.3.7.6 1.1.6.4 0 .7-.1 1-.4.6-.6.6-1.6.1-2.3C14.1 26.8 10 25 6 25z"></path><path id="service_XMLID_8_" d="M34.6 25c-4 0-8.1 1.9-10.7 4.6-.6.6-.5 1.6.1 2.2.3.3.7.4 1 .4.4 0 .8-.3 1.1-.6 2-2.1 5.3-3.7 8.4-3.7h.1c.8 0 1.5-.7 1.5-1.5 0-.7-.7-1.4-1.5-1.4z"></path></g><path d="M0 0h40v40H0z" class="st1"></path></symbol>
<symbol viewBox="0 0 120 120" id="select"><circle cx="60" cy="60" r="60"></circle><path fill="#FFF" d="M63.84 84.678a1.976 1.976 0 0 1-.387.545l-7.975 7.976a1.996 1.996 0 0 1-2.829-.005L24.172 64.716a2.005 2.005 0 0 1-.005-2.828l7.976-7.976a1.996 1.996 0 0 1 2.828.005l19.015 19.015L91.498 35.42a1.991 1.991 0 0 1 2.823 0l7.976 7.977c.784.784.78 2.043 0 2.823L63.84 84.678z"></path></symbol>
<symbol xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 72 72" id="sdk_icon_zhifubao@2x"><defs><path d="M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36z" id="sdk_icon_zhifubao@2x_a"></path></defs><g fill="none" fill-rule="evenodd"><mask id="sdk_icon_zhifubao@2x_b" fill="#fff"><use xlink:href="#sdk_icon_zhifubao@2x_a"></use></mask><use fill="#00A1E9" xlink:href="#sdk_icon_zhifubao@2x_a"></use><path d="M33 21v-5h7v5h14v3H40v4h12c-.202.048-.408 3.223-2 7-1.32 4.134-2.683 6.15-2 6l23.6 8c-.2-.285-.848 2.3-2 4-.775 2.013-2 5-2 5L44 46c.237.162-3.79 4.674-8 7-4.002 1.645-8.717 2.88-14 1-4.93-.56-8.554-3.867-8-10 .693-6.083 7.138-8.19 13-8 4.739-.19 14.796 3.29 15 3-.204.29.642-1.628 2-4 .283-2.015.518-3.777 0-4H22v-3h11v-4H20v-3h13zm-7 30c-7.407 0-9-3.593-9-6 0-2.761 1.576-5.57 8-6 6.484-.383 15.2 4.436 15 4 .2.436-6.238 8-14 8z" fill="#FFF" mask="url(#sdk_icon_zhifubao@2x_b)"></path></g></symbol>
<symbol viewBox="0 0 72 72" id="weixin"><g fill="none" fill-rule="evenodd"><path d="M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36z" fill="#45C144"></path><path d="M29 40l-4-8c-.262-.292-.288-.398 0-1 .594-.228.743-.174 1 0l4 4c1.5 1.098 1.5 1.098 3 0l21-10c-3.668-4.964-10.11-8-17-8-12.33 0-22 8.12-22 18 0 5.6 2.91 10.518 7 14 1 .8 1.068.537 1 1 .068.185-.954 4.042-1 4-.027.316-.097.495 0 1-.097.075.225.4 1 0-.22.4 5-3 5-3 1.4.6 5.8 1 9 1 11.533 0 21.2-7.85 21-18 .2-2.899-.692-5.756-2-8L31 41c-1.5.5-2-1-2-1z" fill="#FFF"></path></g></symbol>
<symbol viewBox="0 0 46 46" id="human"><path fill="#ff7b52" d="M33.291 37.774c-.25.097-.504.175-.765.233-6.427 1.444-5.954-3.968-6-3.953 10.457-5.053 10.348-13.466 10-16.216-16.15-.041-22.943-7.063-22.943-7.063s-.176 1.733-2.933 4.996c-2.756 3.262-5.236 4.09-5.132 4.113.54 13.9 12.246 14.242 12.246 14.242-.762 4.662-4.357 4.33-4.357 4.33s-6.38.213-11.173-7.446c-.85-1.359-1.02-2.864-1.166-4.579-.217-2.542.14-4.643.312-7.2.271-4.064.96-6.269.96-6.269S7.13 0 21.4 0s17.828 12.508 17.828 12.508l-.035.074c.533.763.984 1.997 1.356 3.36A3.483 3.483 0 0 1 45 19.281v7.257a3.484 3.484 0 0 1-3.325 3.472c-2.009 4.537-6.657 12.185-15.241 12.457C26.023 44.485 24.269 46 22.168 46c-2.407 0-4.357-1.988-4.357-4.44 0-2.453 1.95-4.44 4.357-4.44 1.955 0 3.609 1.311 4.16 3.118 1.447.13 4.044-.094 6.963-2.464zM18.216 27.018s.99 3.08 3.705 3.08 3.807-1.875 3.807-2.906c.467-1.135 1.348-.541 1.482-.071.134.47-.763 4.67-5.24 4.67s-5.205-4.358-5.205-4.358.033-.97.702-.97c.669 0 .749.555.749.555zm10.052-2.332c.963 0 1.743-1.192 1.743-2.664 0-1.471-.78-2.664-1.743-2.664-.963 0-1.743 1.193-1.743 2.664 0 1.472.78 2.664 1.743 2.664zm-12.723 0c.962 0 1.743-1.192 1.743-2.664 0-1.471-.78-2.664-1.743-2.664-.963 0-1.743 1.193-1.743 2.664 0 1.472.78 2.664 1.743 2.664z"></path></symbol>
<symbol viewBox="0 0 46 46" id="phone"><path fill="#6ac20b" d="M15.433 30.568c9.342 9.342 17.708 12.15 18.871 12.316 1.163.167 3.07.542 5.837-2.225 3.24-3.24 3.566-4.94 1.783-6.724-1.783-1.783-6.212-4.48-7.416-5.176-1.206-.696-2.228-.472-3.097.133-.868.605-1.87 1.375-2.798 2.047-.927.671-2.087.955-3.332.167-1.245-.79-3.35-2.27-5.735-4.652-2.384-2.384-3.863-4.49-4.651-5.735-.789-1.245-.505-2.405.167-3.332.671-.928 1.441-1.93 2.046-2.798.605-.869.828-1.89.134-3.097-.696-1.204-3.394-5.633-5.177-7.416-1.783-1.783-3.484-1.457-6.724 1.783-2.766 2.766-2.391 4.674-2.226 5.837.167 1.164 2.976 9.53 12.318 18.872"></path></symbol>
<symbol viewBox="0 0 126 126" id="expired"><path fill="#9B9B9B" fill-rule="evenodd" d="M63 125.5c34.518 0 62.5-27.982 62.5-62.5S97.518.5 63 .5.5 28.482.5 63s27.982 62.5 62.5 62.5zM15.156 66.678l-3.073-1.258 2.868-1.674.248-3.31 2.478 2.21 3.225-.79-1.335 3.04 1.746 2.825-3.302-.33-2.147 2.533-.704-3.245zm4.07-24.55l-2.03-2.625 3.32-.015 1.87-2.744 1.04 3.153 3.187.93-2.677 1.964.1 3.32-2.695-1.94-3.124 1.122 1.01-3.163zm15.8-19.223l-.446-3.29 2.883 1.646 2.99-1.44-.674 3.25 2.294 2.4-3.3.363-1.573 2.924-1.363-3.027-3.267-.592 2.457-2.233zm23.296-8.75l1.258-3.072 1.674 2.868 3.31.248-2.21 2.478.79 3.225-3.04-1.335-2.825 1.746.33-3.302-2.533-2.147 3.245-.704zm24.55 4.072l2.625-2.032.015 3.32 2.744 1.87-3.153 1.04-.93 3.188-1.964-2.677-3.32.1 1.94-2.695-1.122-3.124 3.163 1.01zm27.972 39.095l3.073 1.258-2.868 1.674-.248 3.31-2.478-2.21-3.225.79 1.335-3.04-1.746-2.825 3.302.33 2.147-2.533.704 3.245zm-4.07 24.55l2.03 2.625-3.32.015-1.87 2.744-1.04-3.153-3.187-.93 2.677-1.964-.1-3.32 2.695 1.94 3.124-1.122-1.01 3.163zm-15.8 19.223l.446 3.29-2.883-1.646-2.99 1.44.674-3.25-2.294-2.4 3.3-.363 1.573-2.924 1.363 3.027 3.267.592-2.457 2.233zm-23.296 8.75l-1.258 3.072-1.674-2.868-3.31-.248 2.21-2.478-.79-3.225 3.04 1.335 2.825-1.746-.33 3.302 2.533 2.147-3.245.704zm-24.55-4.072l-2.625 2.032-.015-3.32-2.744-1.87 3.153-1.04.93-3.188 1.964 2.677 3.32-.1-1.94 2.695 1.122 3.124-3.163-1.01zM74.257 41.7a23.764 23.764 0 0 0-22.17.092 23.767 23.767 0 0 0-12.508 18.646l.995.1a22.767 22.767 0 0 1 11.983-17.863 22.764 22.764 0 0 1 21.238-.088l.462-.887zm11.387 22.436A22.764 22.764 0 0 1 74.313 82.1a22.767 22.767 0 0 1-21.5.696l-.44.897a23.767 23.767 0 0 0 22.44-.727A23.764 23.764 0 0 0 86.64 64.214l-.997-.078zM63 122.5C30.14 122.5 3.5 95.86 3.5 63S30.14 3.5 63 3.5s59.5 26.64 59.5 59.5-26.64 59.5-59.5 59.5zm14.127-71.148l1.14 1.975 3.388-1.956-1.14-1.974-3.388 1.956zm2.704-3.14l-1.055-1.83-3.388 1.956 1.056 1.83 3.388-1.957zm.237 8.232l3.388-1.956-1.14-1.974-3.388 1.956 1.14 1.974zm-6.89-8.715a24.73 24.73 0 0 0-.892-1.453 7.288 7.288 0 0 0-.79-.985c.31-.104.617-.227.924-.367a6.52 6.52 0 0 0 .842-.46c.13-.093.226-.12.285-.08.06.04.066.128.017.267a.653.653 0 0 0-.032.378c.03.113.09.253.187.42l.85 1.475 3.39-1.956a39.962 39.962 0 0 0-1.01-1.677c-.25-.383-.472-.665-.67-.847a13.33 13.33 0 0 0 1.857-.767c.19-.09.313-.107.374-.05.062.057.064.148.007.273-.09.2-.128.356-.117.47.01.114.06.247.147.4l.792 1.37c.24-.157.48-.318.718-.483a9.91 9.91 0 0 0 .673-.513l1.02 1.766c-.26.095-.52.204-.78.327-.262.123-.525.243-.79.36l4.655 8.063c.234-.17.46-.333.675-.486.217-.153.43-.318.643-.496l.912 1.58c-.21.085-.434.177-.672.278-.238.1-.534.243-.888.43-.354.185-.79.423-1.307.712a205.733 205.733 0 0 0-3.876 2.238c-.516.307-.943.567-1.28.78-.34.215-.615.402-.828.562-.212.16-.408.31-.586.45l-.912-1.58c.638-.24 1.29-.533 1.958-.882l-4.668-8.085a20.893 20.893 0 0 0-1.67 1.186l-1.02-1.767a21.623 21.623 0 0 0 1.862-.854zm14.762 2.285l3.387-1.956-2.124-3.68-3.388 1.956 2.124 3.68zm-1.45-10.332l-3.387 1.956 1.956 3.387 3.387-1.956-1.956-3.387zm2.11 11.67c.274.634.514 1.305.717 2.01.204.704.36 1.408.47 2.11.11.704.167 1.4.17 2.093a10.19 10.19 0 0 1-.17 1.94c-.51-.15-1.18-.14-2.008.024.213-.974.312-1.88.298-2.723a10.595 10.595 0 0 0-.37-2.558c-.23-.865-.573-1.77-1.028-2.72a48.398 48.398 0 0 0-1.714-3.208l-2.7-4.676a25.767 25.767 0 0 0-.875-1.42 21.753 21.753 0 0 0-.85-1.186c.525-.21 1.043-.45 1.554-.717.51-.267 1.112-.6 1.805-1a60.923 60.923 0 0 0 1.893-1.136 17.45 17.45 0 0 0 1.502-1.047c.137.364.325.787.565 1.267.24.48.517.99.83 1.53l7.535 13.054a6.1 6.1 0 0 1 .46.94.97.97 0 0 1-.036.756c-.115.25-.347.527-.698.832-.35.304-.864.688-1.54 1.15a3.186 3.186 0 0 0-.647-.858 4.97 4.97 0 0 0-1.038-.717 13.81 13.81 0 0 0 1.096-.55c.264-.152.45-.295.555-.43a.502.502 0 0 0 .108-.437 2.097 2.097 0 0 0-.243-.566l-2.172-3.762-3.47 2.004zm-1.954 7.223a6.16 6.16 0 0 0-1.466-.69 6.537 6.537 0 0 0-1.563-.332l.69-1.59a14.604 14.604 0 0 1 3.05.817l-.71 1.794zm-4.033-.027a2.137 2.137 0 0 0-.287.51 6.12 6.12 0 0 0-.26.872 23.78 23.78 0 0 0-.283 1.452c-.1.594-.225 1.34-.37 2.237a3.37 3.37 0 0 0-.92-.078 5.34 5.34 0 0 0-1.096.19 8.492 8.492 0 0 0 .812-2.41c.15-.843.175-1.782.077-2.816.39.034.75.034 1.08 0a8.61 8.61 0 0 0 1.06-.182c.14-.044.227-.04.26.017.03.056.007.126-.074.21zm-17.506-5.745c.68-.392 1.22-.72 1.624-.98.405-.26.798-.538 1.182-.834l1.044 1.81c-.426.19-.86.4-1.3.626a40.64 40.64 0 0 0-1.66.917l5.015 8.688c.21.36.354.684.435.97.082.285.043.584-.118.9-.16.313-.468.676-.924 1.086-.455.41-1.11.918-1.962 1.52a10.17 10.17 0 0 0-.84-.83 7.863 7.863 0 0 0-1.12-.836 20.7 20.7 0 0 0 1.457-.813c.36-.226.625-.43.797-.612.172-.183.262-.346.27-.49a.783.783 0 0 0-.117-.444l-4.68-8.105-4.448 2.568c-.846.488-1.512.886-2 1.195-.485.31-.936.6-1.35.877l-1.03-1.788c.236-.1.472-.204.706-.31.234-.108.484-.234.75-.38a93.69 93.69 0 0 0 2.035-1.132l4.45-2.568a106.39 106.39 0 0 0-1.3-2.202c-.33-.54-.576-.92-.74-1.138.35-.13.72-.29 1.105-.486.387-.194.696-.378.93-.55.192-.147.346-.176.462-.086.117.09.133.205.048.346a.79.79 0 0 0-.08.56c.044.186.098.335.162.446l1.2 2.08zm-1.79 11.537a25.633 25.633 0 0 0-1.934-1.475 35.97 35.97 0 0 0-2.03-1.31l1.267-1.644a38.25 38.25 0 0 1 2.034 1.195c.68.428 1.346.9 1.993 1.412l-1.33 1.822zm-12.53-7.01c.706.293 1.41.608 2.11.942.702.334 1.376.693 2.022 1.078l-1.13 2.12a56.81 56.81 0 0 0-2.01-1.152 41.097 41.097 0 0 0-2.06-1.044l1.067-1.945zM63 118.25c30.514 0 55.25-24.736 55.25-55.25S93.514 7.75 63 7.75 7.75 32.486 7.75 63 32.486 118.25 63 118.25zm-2.237-47.53c.262-.058.562-.097.9-.118.34-.02.753-.04 1.24-.063.52-.025 1.176-.163 1.964-.415.788-.25 1.72-.646 2.794-1.184 1.077-.536 2.303-1.235 3.682-2.096a87.9 87.9 0 0 0 4.634-3.133 10.2 10.2 0 0 0 .24 1.4c.098.378.23.74.394 1.09a321.96 321.96 0 0 1-4.068 2.362 69.403 69.403 0 0 1-3.052 1.65c-.88.445-1.643.802-2.29 1.074s-1.236.483-1.768.633c-.533.15-1.03.256-1.492.32-.462.063-.954.107-1.476.13-.62.046-1.087.126-1.4.24-.31.117-.536.344-.674.682-.123.33-.22.74-.286 1.232a18.89 18.89 0 0 0-.144 1.62 7.14 7.14 0 0 0-1.164-.31 9.118 9.118 0 0 0-1.23-.136c.132-.575.256-1.07.374-1.49.118-.42.23-.785.338-1.096.106-.31.212-.575.318-.793.105-.22.214-.407.326-.564l-3.66-6.34c-.582.337-1.08.634-1.495.892-.415.257-.75.498-1.01.722l-.972-1.684c.293-.132.648-.3 1.066-.505.42-.203.83-.42 1.23-.653a31.8 31.8 0 0 0 1.27-.775c.433-.277.775-.516 1.028-.718.14.4.292.778.46 1.134.17.355.413.81.733 1.364l3.193 5.53zm-15.907-.43l-2.712-4.7-5.425 3.133c-1.456.84-2.783 1.63-3.983 2.368-1.2.74-2.125 1.344-2.778 1.813l-1.237-2.14c.307-.14.708-.335 1.202-.583.494-.25 1.055-.54 1.684-.876a143.593 143.593 0 0 0 4.375-2.429 153.71 153.71 0 0 0 4.442-2.648c1.175-.734 2.054-1.315 2.638-1.745.15.357.367.813.652 1.37a42.88 42.88 0 0 0 1.05 1.915l1.848 3.2a32.46 32.46 0 0 0 1.93 2.96l-2.057 1.188-.72-1.247-9.395 5.424 3.072 5.32c.224.39.415.68.574.875.158.195.345.304.562.327.216.023.5-.045.853-.202.353-.157.838-.405 1.455-.743.876-.47 1.734-.942 2.577-1.42a68.054 68.054 0 0 0 2.465-1.465c.754-.453 1.335-.84 1.743-1.158.407-.318.686-.66.836-1.023.15-.364.185-.81.104-1.334a26.6 26.6 0 0 0-.45-2.124c.843.437 1.734.523 2.67.26.206 1.026.324 1.854.354 2.483.03.628-.083 1.184-.34 1.665-.258.48-.698.943-1.32 1.386-.623.443-1.495.988-2.617 1.636l-2.545 1.47c-.908.524-1.758.996-2.55 1.417-1.063.558-1.902.97-2.517 1.23-.615.264-1.123.368-1.524.313-.402-.055-.75-.274-1.045-.657-.297-.385-.652-.937-1.068-1.658l-3.444-5.965a27.726 27.726 0 0 0-1.155-1.855c-.337-.49-.602-.835-.793-1.04.37-.157.762-.342 1.176-.553.414-.212.79-.425 1.13-.64.185-.125.32-.144.41-.056.087.088.085.214-.005.377a.624.624 0 0 0-.105.394c.015.12.082.286.202.494l.384.665 9.396-5.424zM10.402 63c0-29.05 23.55-52.598 52.598-52.598 29.05 0 52.598 23.55 52.598 52.598 0 29.05-23.55 52.598-52.598 52.598-29.05 0-52.598-23.55-52.598-52.598z"></path></symbol>
</defs>
</svg>
</template>
\ No newline at end of file
import "@babel/polyfill";
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './router/router'
import store from './store/'
const mixins = require('@/utils/mixins');
import FastClick from 'fastclick'
import vueFilters from '@/utils/filter'
// 引入ElementUI
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';
// 可调试
// Vue.config.devtools = true;
// Vue.use(Logger, { prefix: new Date(), isDev: process.env.NODE_ENV === 'development', cLevel: 'debug' })
Vue.use(ElementUI)
// 注册所有公用过滤器
for(let key in vueFilters) {
Vue.filter(key, vueFilters[key])
}
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body);
}, false);
}
Vue.use(VueRouter)
const router = new VueRouter({
routes,
mode: 'hash',
strict: process.env.NODE_ENV !== 'production',
scrollBehavior (to, from, savedPosition) {
if (savedPosition) {
return savedPosition
} else {
if (from.meta.keepAlive) {
from.meta.savedPosition = document.body.scrollTop;
}
return { x: 0, y: to.meta.savedPosition || 0 }
}
}
})
// 加入混合
Vue.mixin({
...mixins
})
new Vue({
router,
store,
}).$mount('#app')
/**
* G-Logger
* version 1.0.0
* Author: Anndy Yang(Guang Jun)
* description: 模拟log4j的日志插件(Vue插件,同时支持浏览器环境)
*
* log4j提供了4种日志级别和2个日志开关。
官方网址: http://logging.apache.org/log4j/1.2/
DEBUG:输出调试信息;指出细粒度信息事件对调试应用程序是非常有帮助的。
INFO: 输出提示信息;消息在粗粒度级别上突出强调应用程序的运行过程。
WARN: 输出警告信息;表明会出现潜在错误的情形。
ERROR:输出错误信息;指出虽然发生错误事件,但仍然不影响系统的继续运行。
FATAL: 输出致命错误;指出每个严重的错误事件将会导致应用程序的退出。
ALL level:打开所有日志记录开关;是最低等级的,用于打开所有日志记录。
OFF level:关闭所有日志记录开关;是最高等级的,用于关闭所有日志记录。
按照范围从小到大排序:OFF level > FATAL > ERROR > WARN > INFO > DEBUG > ALL level;范围大的会包含范围小的。
例如日志设置为INFO级别,则FATAL、ERROR、WARN、INFO的日志开关都是打开的,而DEBUG的日志开关将是关闭的。
Log4j建议只使用四个级别,优先级从高到低分别是 ERROR、WARN、INFO、DEBUG。
*/
const gLogger = {}
gLogger.install = function (Vue, options) {
if (gLogger.installed) return
let logger = {
isDev: true,
cLevel: 'debug',
prefix: 'gLogger Says'
// levels: ['off', 'fatal', 'error', 'warn', 'info', 'debug', 'all']
}
if (options) {
for (const key of Object.keys(options)) {
logger[key] = options[key]
}
}
logger.levels = ['off', 'fatal', 'error', 'warn', 'info', 'debug', 'all']
for (const level of logger.levels) {
logger[level] = function () {
if (!this.isDev || typeof console === 'undefined') return
let levelIndex = logger.levels.indexOf(level)
// 如果是OFF级别,则不输出日志
if (levelIndex === 0) return
let cLevelIndex = logger.levels.indexOf(logger.cLevel)
// 如果当前级别底,则不输出日志
if(cLevelIndex < levelIndex) return
let args = Array.from(arguments)
args.unshift(`[${this.prefix} :: ${level}]`.toUpperCase())
console.log(...args)
}
}
Vue.prototype.$log = logger
if (window) window.logger = logger
}
export default gLogger
\ No newline at end of file
/**
* Swiper 3.4.1
* Most modern mobile touch slider and framework with hardware accelerated transitions
*
* http://www.idangero.us/swiper/
*
* Copyright 2016, Vladimir Kharlampidi
* The iDangero.us
* http://www.idangero.us/
*
* Licensed under MIT
*
* Released on: December 13, 2016
*/
!function(){"use strict";function e(e){e.fn.swiper=function(a){var s;return e(this).each(function(){var e=new t(this,a);s||(s=e)}),s}}var a,t=function(e,i){function r(e){return Math.floor(e)}function n(){var e=b.params.autoplay,a=b.slides.eq(b.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||b.params.autoplay),b.autoplayTimeoutId=setTimeout(function(){b.params.loop?(b.fixLoop(),b._slideNext(),b.emit("onAutoplay",b)):b.isEnd?i.autoplayStopOnLast?b.stopAutoplay():(b._slideTo(0),b.emit("onAutoplay",b)):(b._slideNext(),b.emit("onAutoplay",b))},e)}function o(e,t){var s=a(e.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var i;return s.parents().each(function(e,a){a===t&&(i=t)}),i?t:void 0}if(0!==s.length)return s[0]}function l(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){b.onResize(!0),b.emit("onObserverUpdate",b,e)})});s.observe(e,{attributes:"undefined"==typeof a.attributes||a.attributes,childList:"undefined"==typeof a.childList||a.childList,characterData:"undefined"==typeof a.characterData||a.characterData}),b.observers.push(s)}function p(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;if(!b.params.allowSwipeToNext&&(b.isHorizontal()&&39===a||!b.isHorizontal()&&40===a))return!1;if(!b.params.allowSwipeToPrev&&(b.isHorizontal()&&37===a||!b.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(b.container.parents("."+b.params.slideClass).length>0&&0===b.container.parents("."+b.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},i=window.innerWidth,r=window.innerHeight,n=b.container.offset();b.rtl&&(n.left=n.left-b.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+b.width,n.top],[n.left,n.top+b.height],[n.left+b.width,n.top+b.height]],l=0;l<o.length;l++){var p=o[l];p[0]>=s.left&&p[0]<=s.left+i&&p[1]>=s.top&&p[1]<=s.top+r&&(t=!0)}if(!t)return}b.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!b.rtl||37===a&&b.rtl)&&b.slideNext(),(37===a&&!b.rtl||39===a&&b.rtl)&&b.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&b.slideNext(),38===a&&b.slidePrev())}}function d(){var e="onwheel",a=e in document;if(!a){var t=document.createElement("div");t.setAttribute(e,"return;"),a="function"==typeof t[e]}return!a&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(a=document.implementation.hasFeature("Events.wheel","3.0")),a}function u(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=b.rtl?-1:1,s=c(e);if(b.params.mousewheelForceToAxis)if(b.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(b.params.mousewheelInvert&&(a=-a),b.params.freeMode){var i=b.getWrapperTranslate()+a*b.params.mousewheelSensitivity,r=b.isBeginning,n=b.isEnd;if(i>=b.minTranslate()&&(i=b.minTranslate()),i<=b.maxTranslate()&&(i=b.maxTranslate()),b.setWrapperTransition(0),b.setWrapperTranslate(i),b.updateProgress(),b.updateActiveIndex(),(!r&&b.isBeginning||!n&&b.isEnd)&&b.updateClasses(),b.params.freeModeSticky?(clearTimeout(b.mousewheel.timeout),b.mousewheel.timeout=setTimeout(function(){b.slideReset()},300)):b.params.lazyLoading&&b.lazy&&b.lazy.load(),b.emit("onScroll",b,e),b.params.autoplay&&b.params.autoplayDisableOnInteraction&&b.stopAutoplay(),0===i||i===b.maxTranslate())return}else{if((new window.Date).getTime()-b.mousewheel.lastScrollTime>60)if(a<0)if(b.isEnd&&!b.params.loop||b.animating){if(b.params.mousewheelReleaseOnEdges)return!0}else b.slideNext(),b.emit("onScroll",b,e);else if(b.isBeginning&&!b.params.loop||b.animating){if(b.params.mousewheelReleaseOnEdges)return!0}else b.slidePrev(),b.emit("onScroll",b,e);b.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function c(e){var a=10,t=40,s=800,i=0,r=0,n=0,o=0;return"detail"in e&&(r=e.detail),"wheelDelta"in e&&(r=-e.wheelDelta/120),"wheelDeltaY"in e&&(r=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(i=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(i=r,r=0),n=i*a,o=r*a,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||o)&&e.deltaMode&&(1===e.deltaMode?(n*=t,o*=t):(n*=s,o*=s)),n&&!i&&(i=n<1?-1:1),o&&!r&&(r=o<1?-1:1),{spinX:i,spinY:r,pixelX:n,pixelY:o}}function m(e,t){e=a(e);var s,i,r,n=b.rtl?-1:1;s=e.attr("data-swiper-parallax")||"0",i=e.attr("data-swiper-parallax-x"),r=e.attr("data-swiper-parallax-y"),i||r?(i=i||"0",r=r||"0"):b.isHorizontal()?(i=s,r="0"):(r=s,i="0"),i=i.indexOf("%")>=0?parseInt(i,10)*t*n+"%":i*t*n+"px",r=r.indexOf("%")>=0?parseInt(r,10)*t+"%":r*t+"px",e.transform("translate3d("+i+", "+r+",0px)")}function h(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof t))return new t(e,i);var g={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},f=i&&i.virtualTranslate;i=i||{};var v={};for(var w in i)if("object"!=typeof i[w]||null===i[w]||(i[w].nodeType||i[w]===window||i[w]===document||"undefined"!=typeof s&&i[w]instanceof s||"undefined"!=typeof jQuery&&i[w]instanceof jQuery))v[w]=i[w];else{v[w]={};for(var y in i[w])v[w][y]=i[w][y]}for(var x in g)if("undefined"==typeof i[x])i[x]=g[x];else if("object"==typeof i[x])for(var T in g[x])"undefined"==typeof i[x][T]&&(i[x][T]=g[x][T]);var b=this;if(b.params=i,b.originalParams=v,b.classNames=[],"undefined"!=typeof a&&"undefined"!=typeof s&&(a=s),("undefined"!=typeof a||(a="undefined"==typeof s?window.Dom7||window.Zepto||window.jQuery:s))&&(b.$=a,b.currentBreakpoint=void 0,b.getActiveBreakpoint=function(){if(!b.params.breakpoints)return!1;var e,a=!1,t=[];for(e in b.params.breakpoints)b.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s<t.length;s++)e=t[s],e>=window.innerWidth&&!a&&(a=e);return a||"max"},b.setBreakpoint=function(){var e=b.getActiveBreakpoint();if(e&&b.currentBreakpoint!==e){var a=e in b.params.breakpoints?b.params.breakpoints[e]:b.originalParams,t=b.params.loop&&a.slidesPerView!==b.params.slidesPerView;for(var s in a)b.params[s]=a[s];b.currentBreakpoint=e,t&&b.destroyLoop&&b.reLoop(!0)}},b.params.breakpoints&&b.setBreakpoint(),b.container=a(e),0!==b.container.length)){if(b.container.length>1){var S=[];return b.container.each(function(){S.push(new t(this,i))}),S}b.container[0].swiper=b,b.container.data("swiper",b),b.classNames.push(b.params.containerModifierClass+b.params.direction),b.params.freeMode&&b.classNames.push(b.params.containerModifierClass+"free-mode"),b.support.flexbox||(b.classNames.push(b.params.containerModifierClass+"no-flexbox"),b.params.slidesPerColumn=1),b.params.autoHeight&&b.classNames.push(b.params.containerModifierClass+"autoheight"),(b.params.parallax||b.params.watchSlidesVisibility)&&(b.params.watchSlidesProgress=!0),b.params.touchReleaseOnEdges&&(b.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(b.params.effect)>=0&&(b.support.transforms3d?(b.params.watchSlidesProgress=!0,b.classNames.push(b.params.containerModifierClass+"3d")):b.params.effect="slide"),"slide"!==b.params.effect&&b.classNames.push(b.params.containerModifierClass+b.params.effect),"cube"===b.params.effect&&(b.params.resistanceRatio=0,b.params.slidesPerView=1,b.params.slidesPerColumn=1,b.params.slidesPerGroup=1,b.params.centeredSlides=!1,b.params.spaceBetween=0,b.params.virtualTranslate=!0,b.params.setWrapperSize=!1),"fade"!==b.params.effect&&"flip"!==b.params.effect||(b.params.slidesPerView=1,b.params.slidesPerColumn=1,b.params.slidesPerGroup=1,b.params.watchSlidesProgress=!0,b.params.spaceBetween=0,b.params.setWrapperSize=!1,"undefined"==typeof f&&(b.params.virtualTranslate=!0)),b.params.grabCursor&&b.support.touch&&(b.params.grabCursor=!1),b.wrapper=b.container.children("."+b.params.wrapperClass),b.params.pagination&&(b.paginationContainer=a(b.params.pagination),b.params.uniqueNavElements&&"string"==typeof b.params.pagination&&b.paginationContainer.length>1&&1===b.container.find(b.params.pagination).length&&(b.paginationContainer=b.container.find(b.params.pagination)),"bullets"===b.params.paginationType&&b.params.paginationClickable?b.paginationContainer.addClass(b.params.paginationModifierClass+"clickable"):b.params.paginationClickable=!1,b.paginationContainer.addClass(b.params.paginationModifierClass+b.params.paginationType)),(b.params.nextButton||b.params.prevButton)&&(b.params.nextButton&&(b.nextButton=a(b.params.nextButton),b.params.uniqueNavElements&&"string"==typeof b.params.nextButton&&b.nextButton.length>1&&1===b.container.find(b.params.nextButton).length&&(b.nextButton=b.container.find(b.params.nextButton))),b.params.prevButton&&(b.prevButton=a(b.params.prevButton),b.params.uniqueNavElements&&"string"==typeof b.params.prevButton&&b.prevButton.length>1&&1===b.container.find(b.params.prevButton).length&&(b.prevButton=b.container.find(b.params.prevButton)))),b.isHorizontal=function(){return"horizontal"===b.params.direction},b.rtl=b.isHorizontal()&&("rtl"===b.container[0].dir.toLowerCase()||"rtl"===b.container.css("direction")),b.rtl&&b.classNames.push(b.params.containerModifierClass+"rtl"),b.rtl&&(b.wrongRTL="-webkit-box"===b.wrapper.css("display")),b.params.slidesPerColumn>1&&b.classNames.push(b.params.containerModifierClass+"multirow"),b.device.android&&b.classNames.push(b.params.containerModifierClass+"android"),b.container.addClass(b.classNames.join(" ")),b.translate=0,b.progress=0,b.velocity=0,b.lockSwipeToNext=function(){b.params.allowSwipeToNext=!1,b.params.allowSwipeToPrev===!1&&b.params.grabCursor&&b.unsetGrabCursor()},b.lockSwipeToPrev=function(){b.params.allowSwipeToPrev=!1,b.params.allowSwipeToNext===!1&&b.params.grabCursor&&b.unsetGrabCursor()},b.lockSwipes=function(){b.params.allowSwipeToNext=b.params.allowSwipeToPrev=!1,b.params.grabCursor&&b.unsetGrabCursor()},b.unlockSwipeToNext=function(){b.params.allowSwipeToNext=!0,b.params.allowSwipeToPrev===!0&&b.params.grabCursor&&b.setGrabCursor()},b.unlockSwipeToPrev=function(){b.params.allowSwipeToPrev=!0,b.params.allowSwipeToNext===!0&&b.params.grabCursor&&b.setGrabCursor()},b.unlockSwipes=function(){b.params.allowSwipeToNext=b.params.allowSwipeToPrev=!0,b.params.grabCursor&&b.setGrabCursor()},b.setGrabCursor=function(e){b.container[0].style.cursor="move",b.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",b.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",b.container[0].style.cursor=e?"grabbing":"grab"},b.unsetGrabCursor=function(){b.container[0].style.cursor=""},b.params.grabCursor&&b.setGrabCursor(),b.imagesToLoad=[],b.imagesLoaded=0,b.loadImage=function(e,a,t,s,i,r){function n(){r&&r()}var o;e.complete&&i?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},b.preloadImages=function(){function e(){"undefined"!=typeof b&&null!==b&&b&&(void 0!==b.imagesLoaded&&b.imagesLoaded++,b.imagesLoaded===b.imagesToLoad.length&&(b.params.updateOnImagesReady&&b.update(),b.emit("onImagesReady",b)))}b.imagesToLoad=b.container.find("img");for(var a=0;a<b.imagesToLoad.length;a++)b.loadImage(b.imagesToLoad[a],b.imagesToLoad[a].currentSrc||b.imagesToLoad[a].getAttribute("src"),b.imagesToLoad[a].srcset||b.imagesToLoad[a].getAttribute("srcset"),b.imagesToLoad[a].sizes||b.imagesToLoad[a].getAttribute("sizes"),!0,e)},b.autoplayTimeoutId=void 0,b.autoplaying=!1,b.autoplayPaused=!1,b.startAutoplay=function(){return"undefined"==typeof b.autoplayTimeoutId&&(!!b.params.autoplay&&(!b.autoplaying&&(b.autoplaying=!0,b.emit("onAutoplayStart",b),void n())))},b.stopAutoplay=function(e){b.autoplayTimeoutId&&(b.autoplayTimeoutId&&clearTimeout(b.autoplayTimeoutId),b.autoplaying=!1,b.autoplayTimeoutId=void 0,b.emit("onAutoplayStop",b))},b.pauseAutoplay=function(e){b.autoplayPaused||(b.autoplayTimeoutId&&clearTimeout(b.autoplayTimeoutId),b.autoplayPaused=!0,0===e?(b.autoplayPaused=!1,n()):b.wrapper.transitionEnd(function(){b&&(b.autoplayPaused=!1,b.autoplaying?n():b.stopAutoplay())}))},b.minTranslate=function(){return-b.snapGrid[0]},b.maxTranslate=function(){return-b.snapGrid[b.snapGrid.length-1]},b.updateAutoHeight=function(){var e,a=[],t=0;if("auto"!==b.params.slidesPerView&&b.params.slidesPerView>1)for(e=0;e<Math.ceil(b.params.slidesPerView);e++){var s=b.activeIndex+e;if(s>b.slides.length)break;a.push(b.slides.eq(s)[0])}else a.push(b.slides.eq(b.activeIndex)[0]);for(e=0;e<a.length;e++)if("undefined"!=typeof a[e]){var i=a[e].offsetHeight;t=i>t?i:t}t&&b.wrapper.css("height",t+"px")},b.updateContainerSize=function(){var e,a;e="undefined"!=typeof b.params.width?b.params.width:b.container[0].clientWidth,a="undefined"!=typeof b.params.height?b.params.height:b.container[0].clientHeight,0===e&&b.isHorizontal()||0===a&&!b.isHorizontal()||(e=e-parseInt(b.container.css("padding-left"),10)-parseInt(b.container.css("padding-right"),10),a=a-parseInt(b.container.css("padding-top"),10)-parseInt(b.container.css("padding-bottom"),10),b.width=e,b.height=a,b.size=b.isHorizontal()?b.width:b.height)},b.updateSlidesSize=function(){b.slides=b.wrapper.children("."+b.params.slideClass),b.snapGrid=[],b.slidesGrid=[],b.slidesSizesGrid=[];var e,a=b.params.spaceBetween,t=-b.params.slidesOffsetBefore,s=0,i=0;if("undefined"!=typeof b.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*b.size),b.virtualSize=-a,b.rtl?b.slides.css({marginLeft:"",marginTop:""}):b.slides.css({marginRight:"",marginBottom:""});var n;b.params.slidesPerColumn>1&&(n=Math.floor(b.slides.length/b.params.slidesPerColumn)===b.slides.length/b.params.slidesPerColumn?b.slides.length:Math.ceil(b.slides.length/b.params.slidesPerColumn)*b.params.slidesPerColumn,"auto"!==b.params.slidesPerView&&"row"===b.params.slidesPerColumnFill&&(n=Math.max(n,b.params.slidesPerView*b.params.slidesPerColumn)));var o,l=b.params.slidesPerColumn,p=n/l,d=p-(b.params.slidesPerColumn*p-b.slides.length);for(e=0;e<b.slides.length;e++){o=0;var u=b.slides.eq(e);if(b.params.slidesPerColumn>1){var c,m,h;"column"===b.params.slidesPerColumnFill?(m=Math.floor(e/l),h=e-m*l,(m>d||m===d&&h===l-1)&&++h>=l&&(h=0,m++),c=m+h*n/l,u.css({"-webkit-box-ordinal-group":c,"-moz-box-ordinal-group":c,"-ms-flex-order":c,"-webkit-order":c,order:c})):(h=Math.floor(e/p),m=e-h*p),u.css("margin-"+(b.isHorizontal()?"top":"left"),0!==h&&b.params.spaceBetween&&b.params.spaceBetween+"px").attr("data-swiper-column",m).attr("data-swiper-row",h)}"none"!==u.css("display")&&("auto"===b.params.slidesPerView?(o=b.isHorizontal()?u.outerWidth(!0):u.outerHeight(!0),b.params.roundLengths&&(o=r(o))):(o=(b.size-(b.params.slidesPerView-1)*a)/b.params.slidesPerView,b.params.roundLengths&&(o=r(o)),b.isHorizontal()?b.slides[e].style.width=o+"px":b.slides[e].style.height=o+"px"),b.slides[e].swiperSlideSize=o,b.slidesSizesGrid.push(o),b.params.centeredSlides?(t=t+o/2+s/2+a,0===e&&(t=t-b.size/2-a),Math.abs(t)<.001&&(t=0),i%b.params.slidesPerGroup===0&&b.snapGrid.push(t),b.slidesGrid.push(t)):(i%b.params.slidesPerGroup===0&&b.snapGrid.push(t),b.slidesGrid.push(t),t=t+o+a),b.virtualSize+=o+a,s=o,i++)}b.virtualSize=Math.max(b.virtualSize,b.size)+b.params.slidesOffsetAfter;var g;if(b.rtl&&b.wrongRTL&&("slide"===b.params.effect||"coverflow"===b.params.effect)&&b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}),b.support.flexbox&&!b.params.setWrapperSize||(b.isHorizontal()?b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}):b.wrapper.css({height:b.virtualSize+b.params.spaceBetween+"px"})),b.params.slidesPerColumn>1&&(b.virtualSize=(o+b.params.spaceBetween)*n,b.virtualSize=Math.ceil(b.virtualSize/b.params.slidesPerColumn)-b.params.spaceBetween,b.isHorizontal()?b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}):b.wrapper.css({height:b.virtualSize+b.params.spaceBetween+"px"}),b.params.centeredSlides)){for(g=[],e=0;e<b.snapGrid.length;e++)b.snapGrid[e]<b.virtualSize+b.snapGrid[0]&&g.push(b.snapGrid[e]);b.snapGrid=g}if(!b.params.centeredSlides){for(g=[],e=0;e<b.snapGrid.length;e++)b.snapGrid[e]<=b.virtualSize-b.size&&g.push(b.snapGrid[e]);b.snapGrid=g,Math.floor(b.virtualSize-b.size)-Math.floor(b.snapGrid[b.snapGrid.length-1])>1&&b.snapGrid.push(b.virtualSize-b.size)}0===b.snapGrid.length&&(b.snapGrid=[0]),0!==b.params.spaceBetween&&(b.isHorizontal()?b.rtl?b.slides.css({marginLeft:a+"px"}):b.slides.css({marginRight:a+"px"}):b.slides.css({marginBottom:a+"px"})),b.params.watchSlidesProgress&&b.updateSlidesOffset()}},b.updateSlidesOffset=function(){for(var e=0;e<b.slides.length;e++)b.slides[e].swiperSlideOffset=b.isHorizontal()?b.slides[e].offsetLeft:b.slides[e].offsetTop},b.currentSlidesPerView=function(){var e,a,t=1;if(b.params.centeredSlides){var s,i=b.slides[b.activeIndex].swiperSlideSize;for(e=b.activeIndex+1;e<b.slides.length;e++)b.slides[e]&&!s&&(i+=b.slides[e].swiperSlideSize,t++,i>b.size&&(s=!0));for(a=b.activeIndex-1;a>=0;a--)b.slides[a]&&!s&&(i+=b.slides[a].swiperSlideSize,t++,i>b.size&&(s=!0))}else for(e=b.activeIndex+1;e<b.slides.length;e++)b.slidesGrid[e]-b.slidesGrid[b.activeIndex]<b.size&&t++;return t},b.updateSlidesProgress=function(e){if("undefined"==typeof e&&(e=b.translate||0),0!==b.slides.length){"undefined"==typeof b.slides[0].swiperSlideOffset&&b.updateSlidesOffset();var a=-e;b.rtl&&(a=e),b.slides.removeClass(b.params.slideVisibleClass);for(var t=0;t<b.slides.length;t++){var s=b.slides[t],i=(a+(b.params.centeredSlides?b.minTranslate():0)-s.swiperSlideOffset)/(s.swiperSlideSize+b.params.spaceBetween);if(b.params.watchSlidesVisibility){var r=-(a-s.swiperSlideOffset),n=r+b.slidesSizesGrid[t],o=r>=0&&r<b.size||n>0&&n<=b.size||r<=0&&n>=b.size;o&&b.slides.eq(t).addClass(b.params.slideVisibleClass)}s.progress=b.rtl?-i:i}}},b.updateProgress=function(e){"undefined"==typeof e&&(e=b.translate||0);var a=b.maxTranslate()-b.minTranslate(),t=b.isBeginning,s=b.isEnd;0===a?(b.progress=0,b.isBeginning=b.isEnd=!0):(b.progress=(e-b.minTranslate())/a,b.isBeginning=b.progress<=0,b.isEnd=b.progress>=1),b.isBeginning&&!t&&b.emit("onReachBeginning",b),b.isEnd&&!s&&b.emit("onReachEnd",b),b.params.watchSlidesProgress&&b.updateSlidesProgress(e),b.emit("onProgress",b,b.progress)},b.updateActiveIndex=function(){var e,a,t,s=b.rtl?b.translate:-b.translate;for(a=0;a<b.slidesGrid.length;a++)"undefined"!=typeof b.slidesGrid[a+1]?s>=b.slidesGrid[a]&&s<b.slidesGrid[a+1]-(b.slidesGrid[a+1]-b.slidesGrid[a])/2?e=a:s>=b.slidesGrid[a]&&s<b.slidesGrid[a+1]&&(e=a+1):s>=b.slidesGrid[a]&&(e=a);b.params.normalizeSlideIndex&&(e<0||"undefined"==typeof e)&&(e=0),t=Math.floor(e/b.params.slidesPerGroup),t>=b.snapGrid.length&&(t=b.snapGrid.length-1),e!==b.activeIndex&&(b.snapIndex=t,b.previousIndex=b.activeIndex,b.activeIndex=e,b.updateClasses(),b.updateRealIndex())},b.updateRealIndex=function(){b.realIndex=parseInt(b.slides.eq(b.activeIndex).attr("data-swiper-slide-index")||b.activeIndex,10)},b.updateClasses=function(){b.slides.removeClass(b.params.slideActiveClass+" "+b.params.slideNextClass+" "+b.params.slidePrevClass+" "+b.params.slideDuplicateActiveClass+" "+b.params.slideDuplicateNextClass+" "+b.params.slideDuplicatePrevClass);var e=b.slides.eq(b.activeIndex);e.addClass(b.params.slideActiveClass),i.loop&&(e.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+b.realIndex+'"]').addClass(b.params.slideDuplicateActiveClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+b.realIndex+'"]').addClass(b.params.slideDuplicateActiveClass));var t=e.next("."+b.params.slideClass).addClass(b.params.slideNextClass);b.params.loop&&0===t.length&&(t=b.slides.eq(0),t.addClass(b.params.slideNextClass));var s=e.prev("."+b.params.slideClass).addClass(b.params.slidePrevClass);if(b.params.loop&&0===s.length&&(s=b.slides.eq(-1),s.addClass(b.params.slidePrevClass)),i.loop&&(t.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicateNextClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicateNextClass),s.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+s.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicatePrevClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+s.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicatePrevClass)),b.paginationContainer&&b.paginationContainer.length>0){var r,n=b.params.loop?Math.ceil((b.slides.length-2*b.loopedSlides)/b.params.slidesPerGroup):b.snapGrid.length;if(b.params.loop?(r=Math.ceil((b.activeIndex-b.loopedSlides)/b.params.slidesPerGroup),r>b.slides.length-1-2*b.loopedSlides&&(r-=b.slides.length-2*b.loopedSlides),r>n-1&&(r-=n),r<0&&"bullets"!==b.params.paginationType&&(r=n+r)):r="undefined"!=typeof b.snapIndex?b.snapIndex:b.activeIndex||0,"bullets"===b.params.paginationType&&b.bullets&&b.bullets.length>0&&(b.bullets.removeClass(b.params.bulletActiveClass),b.paginationContainer.length>1?b.bullets.each(function(){a(this).index()===r&&a(this).addClass(b.params.bulletActiveClass)}):b.bullets.eq(r).addClass(b.params.bulletActiveClass)),"fraction"===b.params.paginationType&&(b.paginationContainer.find("."+b.params.paginationCurrentClass).text(r+1),b.paginationContainer.find("."+b.params.paginationTotalClass).text(n)),"progress"===b.params.paginationType){var o=(r+1)/n,l=o,p=1;b.isHorizontal()||(p=o,l=1),b.paginationContainer.find("."+b.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(b.params.speed)}"custom"===b.params.paginationType&&b.params.paginationCustomRender&&(b.paginationContainer.html(b.params.paginationCustomRender(b,r+1,n)),b.emit("onPaginationRendered",b,b.paginationContainer[0]))}b.params.loop||(b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.isBeginning?(b.prevButton.addClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.disable(b.prevButton)):(b.prevButton.removeClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.enable(b.prevButton))),b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.isEnd?(b.nextButton.addClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.disable(b.nextButton)):(b.nextButton.removeClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.enable(b.nextButton))))},b.updatePagination=function(){if(b.params.pagination&&b.paginationContainer&&b.paginationContainer.length>0){var e="";if("bullets"===b.params.paginationType){for(var a=b.params.loop?Math.ceil((b.slides.length-2*b.loopedSlides)/b.params.slidesPerGroup):b.snapGrid.length,t=0;t<a;t++)e+=b.params.paginationBulletRender?b.params.paginationBulletRender(b,t,b.params.bulletClass):"<"+b.params.paginationElement+' class="'+b.params.bulletClass+'"></'+b.params.paginationElement+">";b.paginationContainer.html(e),b.bullets=b.paginationContainer.find("."+b.params.bulletClass),b.params.paginationClickable&&b.params.a11y&&b.a11y&&b.a11y.initPagination()}"fraction"===b.params.paginationType&&(e=b.params.paginationFractionRender?b.params.paginationFractionRender(b,b.params.paginationCurrentClass,b.params.paginationTotalClass):'<span class="'+b.params.paginationCurrentClass+'"></span> / <span class="'+b.params.paginationTotalClass+'"></span>',b.paginationContainer.html(e)),"progress"===b.params.paginationType&&(e=b.params.paginationProgressRender?b.params.paginationProgressRender(b,b.params.paginationProgressbarClass):'<span class="'+b.params.paginationProgressbarClass+'"></span>',b.paginationContainer.html(e)),"custom"!==b.params.paginationType&&b.emit("onPaginationRendered",b,b.paginationContainer[0])}},b.update=function(e){function a(){b.rtl?-b.translate:b.translate;s=Math.min(Math.max(b.translate,b.maxTranslate()),b.minTranslate()),b.setWrapperTranslate(s),b.updateActiveIndex(),b.updateClasses()}if(b)if(b.updateContainerSize(),b.updateSlidesSize(),b.updateProgress(),b.updatePagination(),b.updateClasses(),b.params.scrollbar&&b.scrollbar&&b.scrollbar.set(),e){var t,s;b.controller&&b.controller.spline&&(b.controller.spline=void 0),b.params.freeMode?(a(),b.params.autoHeight&&b.updateAutoHeight()):(t=("auto"===b.params.slidesPerView||b.params.slidesPerView>1)&&b.isEnd&&!b.params.centeredSlides?b.slideTo(b.slides.length-1,0,!1,!0):b.slideTo(b.activeIndex,0,!1,!0),t||a())}else b.params.autoHeight&&b.updateAutoHeight()},b.onResize=function(e){b.params.breakpoints&&b.setBreakpoint();var a=b.params.allowSwipeToPrev,t=b.params.allowSwipeToNext;b.params.allowSwipeToPrev=b.params.allowSwipeToNext=!0,b.updateContainerSize(),b.updateSlidesSize(),("auto"===b.params.slidesPerView||b.params.freeMode||e)&&b.updatePagination(),b.params.scrollbar&&b.scrollbar&&b.scrollbar.set(),b.controller&&b.controller.spline&&(b.controller.spline=void 0);var s=!1;if(b.params.freeMode){var i=Math.min(Math.max(b.translate,b.maxTranslate()),b.minTranslate());b.setWrapperTranslate(i),b.updateActiveIndex(),b.updateClasses(),b.params.autoHeight&&b.updateAutoHeight()}else b.updateClasses(),s=("auto"===b.params.slidesPerView||b.params.slidesPerView>1)&&b.isEnd&&!b.params.centeredSlides?b.slideTo(b.slides.length-1,0,!1,!0):b.slideTo(b.activeIndex,0,!1,!0);b.params.lazyLoading&&!s&&b.lazy&&b.lazy.load(),b.params.allowSwipeToPrev=a,b.params.allowSwipeToNext=t},b.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?b.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(b.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),b.touchEvents={start:b.support.touch||!b.params.simulateTouch?"touchstart":b.touchEventsDesktop.start,move:b.support.touch||!b.params.simulateTouch?"touchmove":b.touchEventsDesktop.move,end:b.support.touch||!b.params.simulateTouch?"touchend":b.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===b.params.touchEventsTarget?b.container:b.wrapper).addClass("swiper-wp8-"+b.params.direction),b.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",s="container"===b.params.touchEventsTarget?b.container[0]:b.wrapper[0],r=b.support.touch?s:document,n=!!b.params.nested;if(b.browser.ie)s[t](b.touchEvents.start,b.onTouchStart,!1),r[t](b.touchEvents.move,b.onTouchMove,n),r[t](b.touchEvents.end,b.onTouchEnd,!1);else{if(b.support.touch){var o=!("touchstart"!==b.touchEvents.start||!b.support.passiveListener||!b.params.passiveListeners)&&{passive:!0,capture:!1};s[t](b.touchEvents.start,b.onTouchStart,o),s[t](b.touchEvents.move,b.onTouchMove,n),s[t](b.touchEvents.end,b.onTouchEnd,o)}(i.simulateTouch&&!b.device.ios&&!b.device.android||i.simulateTouch&&!b.support.touch&&b.device.ios)&&(s[t]("mousedown",b.onTouchStart,!1),document[t]("mousemove",b.onTouchMove,n),document[t]("mouseup",b.onTouchEnd,!1))}window[t]("resize",b.onResize),b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.nextButton[a]("click",b.onClickNext),b.params.a11y&&b.a11y&&b.nextButton[a]("keydown",b.a11y.onEnterKey)),b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.prevButton[a]("click",b.onClickPrev),b.params.a11y&&b.a11y&&b.prevButton[a]("keydown",b.a11y.onEnterKey)),b.params.pagination&&b.params.paginationClickable&&(b.paginationContainer[a]("click","."+b.params.bulletClass,b.onClickIndex),b.params.a11y&&b.a11y&&b.paginationContainer[a]("keydown","."+b.params.bulletClass,b.a11y.onEnterKey)),(b.params.preventClicks||b.params.preventClicksPropagation)&&s[t]("click",b.preventClicks,!0);
},b.attachEvents=function(){b.initEvents()},b.detachEvents=function(){b.initEvents(!0)},b.allowClick=!0,b.preventClicks=function(e){b.allowClick||(b.params.preventClicks&&e.preventDefault(),b.params.preventClicksPropagation&&b.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},b.onClickNext=function(e){e.preventDefault(),b.isEnd&&!b.params.loop||b.slideNext()},b.onClickPrev=function(e){e.preventDefault(),b.isBeginning&&!b.params.loop||b.slidePrev()},b.onClickIndex=function(e){e.preventDefault();var t=a(this).index()*b.params.slidesPerGroup;b.params.loop&&(t+=b.loopedSlides),b.slideTo(t)},b.updateClickedSlide=function(e){var t=o(e,"."+b.params.slideClass),s=!1;if(t)for(var i=0;i<b.slides.length;i++)b.slides[i]===t&&(s=!0);if(!t||!s)return b.clickedSlide=void 0,void(b.clickedIndex=void 0);if(b.clickedSlide=t,b.clickedIndex=a(t).index(),b.params.slideToClickedSlide&&void 0!==b.clickedIndex&&b.clickedIndex!==b.activeIndex){var r,n=b.clickedIndex,l="auto"===b.params.slidesPerView?b.currentSlidesPerView():b.params.slidesPerView;if(b.params.loop){if(b.animating)return;r=parseInt(a(b.clickedSlide).attr("data-swiper-slide-index"),10),b.params.centeredSlides?n<b.loopedSlides-l/2||n>b.slides.length-b.loopedSlides+l/2?(b.fixLoop(),n=b.wrapper.children("."+b.params.slideClass+'[data-swiper-slide-index="'+r+'"]:not(.'+b.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){b.slideTo(n)},0)):b.slideTo(n):n>b.slides.length-l?(b.fixLoop(),n=b.wrapper.children("."+b.params.slideClass+'[data-swiper-slide-index="'+r+'"]:not(.'+b.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){b.slideTo(n)},0)):b.slideTo(n)}else b.slideTo(n)}};var C,z,M,E,P,I,k,L,D,B,H="input, select, textarea, button, video",G=Date.now(),X=[];b.animating=!1,b.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var Y,A;b.onTouchStart=function(e){if(e.originalEvent&&(e=e.originalEvent),Y="touchstart"===e.type,Y||!("which"in e)||3!==e.which){if(b.params.noSwiping&&o(e,"."+b.params.noSwipingClass))return void(b.allowClick=!0);if(!b.params.swipeHandler||o(e,b.params.swipeHandler)){var t=b.touches.currentX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s=b.touches.currentY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY;if(!(b.device.ios&&b.params.iOSEdgeSwipeDetection&&t<=b.params.iOSEdgeSwipeThreshold)){if(C=!0,z=!1,M=!0,P=void 0,A=void 0,b.touches.startX=t,b.touches.startY=s,E=Date.now(),b.allowClick=!0,b.updateContainerSize(),b.swipeDirection=void 0,b.params.threshold>0&&(L=!1),"touchstart"!==e.type){var i=!0;a(e.target).is(H)&&(i=!1),document.activeElement&&a(document.activeElement).is(H)&&document.activeElement.blur(),i&&e.preventDefault()}b.emit("onTouchStart",b,e)}}}},b.onTouchMove=function(e){if(e.originalEvent&&(e=e.originalEvent),!Y||"mousemove"!==e.type){if(e.preventedByNestedSwiper)return b.touches.startX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,void(b.touches.startY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY);if(b.params.onlyExternal)return b.allowClick=!1,void(C&&(b.touches.startX=b.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,b.touches.startY=b.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,E=Date.now()));if(Y&&b.params.touchReleaseOnEdges&&!b.params.loop)if(b.isHorizontal()){if(b.touches.currentX<b.touches.startX&&b.translate<=b.maxTranslate()||b.touches.currentX>b.touches.startX&&b.translate>=b.minTranslate())return}else if(b.touches.currentY<b.touches.startY&&b.translate<=b.maxTranslate()||b.touches.currentY>b.touches.startY&&b.translate>=b.minTranslate())return;if(Y&&document.activeElement&&e.target===document.activeElement&&a(e.target).is(H))return z=!0,void(b.allowClick=!1);if(M&&b.emit("onTouchMove",b,e),!(e.targetTouches&&e.targetTouches.length>1)){if(b.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,b.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,"undefined"==typeof P){var t;b.isHorizontal()&&b.touches.currentY===b.touches.startY||!b.isHorizontal()&&b.touches.currentX===b.touches.startX?P=!1:(t=180*Math.atan2(Math.abs(b.touches.currentY-b.touches.startY),Math.abs(b.touches.currentX-b.touches.startX))/Math.PI,P=b.isHorizontal()?t>b.params.touchAngle:90-t>b.params.touchAngle)}if(P&&b.emit("onTouchMoveOpposite",b,e),"undefined"==typeof A&&b.browser.ieTouch&&(b.touches.currentX===b.touches.startX&&b.touches.currentY===b.touches.startY||(A=!0)),C){if(P)return void(C=!1);if(A||!b.browser.ieTouch){b.allowClick=!1,b.emit("onSliderMove",b,e),e.preventDefault(),b.params.touchMoveStopPropagation&&!b.params.nested&&e.stopPropagation(),z||(i.loop&&b.fixLoop(),k=b.getWrapperTranslate(),b.setWrapperTransition(0),b.animating&&b.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),b.params.autoplay&&b.autoplaying&&(b.params.autoplayDisableOnInteraction?b.stopAutoplay():b.pauseAutoplay()),B=!1,!b.params.grabCursor||b.params.allowSwipeToNext!==!0&&b.params.allowSwipeToPrev!==!0||b.setGrabCursor(!0)),z=!0;var s=b.touches.diff=b.isHorizontal()?b.touches.currentX-b.touches.startX:b.touches.currentY-b.touches.startY;s*=b.params.touchRatio,b.rtl&&(s=-s),b.swipeDirection=s>0?"prev":"next",I=s+k;var r=!0;if(s>0&&I>b.minTranslate()?(r=!1,b.params.resistance&&(I=b.minTranslate()-1+Math.pow(-b.minTranslate()+k+s,b.params.resistanceRatio))):s<0&&I<b.maxTranslate()&&(r=!1,b.params.resistance&&(I=b.maxTranslate()+1-Math.pow(b.maxTranslate()-k-s,b.params.resistanceRatio))),r&&(e.preventedByNestedSwiper=!0),!b.params.allowSwipeToNext&&"next"===b.swipeDirection&&I<k&&(I=k),!b.params.allowSwipeToPrev&&"prev"===b.swipeDirection&&I>k&&(I=k),b.params.threshold>0){if(!(Math.abs(s)>b.params.threshold||L))return void(I=k);if(!L)return L=!0,b.touches.startX=b.touches.currentX,b.touches.startY=b.touches.currentY,I=k,void(b.touches.diff=b.isHorizontal()?b.touches.currentX-b.touches.startX:b.touches.currentY-b.touches.startY)}b.params.followFinger&&((b.params.freeMode||b.params.watchSlidesProgress)&&b.updateActiveIndex(),b.params.freeMode&&(0===X.length&&X.push({position:b.touches[b.isHorizontal()?"startX":"startY"],time:E}),X.push({position:b.touches[b.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),b.updateProgress(I),b.setWrapperTranslate(I))}}}}},b.onTouchEnd=function(e){if(e.originalEvent&&(e=e.originalEvent),M&&b.emit("onTouchEnd",b,e),M=!1,C){b.params.grabCursor&&z&&C&&(b.params.allowSwipeToNext===!0||b.params.allowSwipeToPrev===!0)&&b.setGrabCursor(!1);var t=Date.now(),s=t-E;if(b.allowClick&&(b.updateClickedSlide(e),b.emit("onTap",b,e),s<300&&t-G>300&&(D&&clearTimeout(D),D=setTimeout(function(){b&&(b.params.paginationHide&&b.paginationContainer.length>0&&!a(e.target).hasClass(b.params.bulletClass)&&b.paginationContainer.toggleClass(b.params.paginationHiddenClass),b.emit("onClick",b,e))},300)),s<300&&t-G<300&&(D&&clearTimeout(D),b.emit("onDoubleTap",b,e))),G=Date.now(),setTimeout(function(){b&&(b.allowClick=!0)},0),!C||!z||!b.swipeDirection||0===b.touches.diff||I===k)return void(C=z=!1);C=z=!1;var i;if(i=b.params.followFinger?b.rtl?b.translate:-b.translate:-I,b.params.freeMode){if(i<-b.minTranslate())return void b.slideTo(b.activeIndex);if(i>-b.maxTranslate())return void(b.slides.length<b.snapGrid.length?b.slideTo(b.snapGrid.length-1):b.slideTo(b.slides.length-1));if(b.params.freeModeMomentum){if(X.length>1){var r=X.pop(),n=X.pop(),o=r.position-n.position,l=r.time-n.time;b.velocity=o/l,b.velocity=b.velocity/2,Math.abs(b.velocity)<b.params.freeModeMinimumVelocity&&(b.velocity=0),(l>150||(new window.Date).getTime()-r.time>300)&&(b.velocity=0)}else b.velocity=0;b.velocity=b.velocity*b.params.freeModeMomentumVelocityRatio,X.length=0;var p=1e3*b.params.freeModeMomentumRatio,d=b.velocity*p,u=b.translate+d;b.rtl&&(u=-u);var c,m=!1,h=20*Math.abs(b.velocity)*b.params.freeModeMomentumBounceRatio;if(u<b.maxTranslate())b.params.freeModeMomentumBounce?(u+b.maxTranslate()<-h&&(u=b.maxTranslate()-h),c=b.maxTranslate(),m=!0,B=!0):u=b.maxTranslate();else if(u>b.minTranslate())b.params.freeModeMomentumBounce?(u-b.minTranslate()>h&&(u=b.minTranslate()+h),c=b.minTranslate(),m=!0,B=!0):u=b.minTranslate();else if(b.params.freeModeSticky){var g,f=0;for(f=0;f<b.snapGrid.length;f+=1)if(b.snapGrid[f]>-u){g=f;break}u=Math.abs(b.snapGrid[g]-u)<Math.abs(b.snapGrid[g-1]-u)||"next"===b.swipeDirection?b.snapGrid[g]:b.snapGrid[g-1],b.rtl||(u=-u)}if(0!==b.velocity)p=b.rtl?Math.abs((-u-b.translate)/b.velocity):Math.abs((u-b.translate)/b.velocity);else if(b.params.freeModeSticky)return void b.slideReset();b.params.freeModeMomentumBounce&&m?(b.updateProgress(c),b.setWrapperTransition(p),b.setWrapperTranslate(u),b.onTransitionStart(),b.animating=!0,b.wrapper.transitionEnd(function(){b&&B&&(b.emit("onMomentumBounce",b),b.setWrapperTransition(b.params.speed),b.setWrapperTranslate(c),b.wrapper.transitionEnd(function(){b&&b.onTransitionEnd()}))})):b.velocity?(b.updateProgress(u),b.setWrapperTransition(p),b.setWrapperTranslate(u),b.onTransitionStart(),b.animating||(b.animating=!0,b.wrapper.transitionEnd(function(){b&&b.onTransitionEnd()}))):b.updateProgress(u),b.updateActiveIndex()}return void((!b.params.freeModeMomentum||s>=b.params.longSwipesMs)&&(b.updateProgress(),b.updateActiveIndex()))}var v,w=0,y=b.slidesSizesGrid[0];for(v=0;v<b.slidesGrid.length;v+=b.params.slidesPerGroup)"undefined"!=typeof b.slidesGrid[v+b.params.slidesPerGroup]?i>=b.slidesGrid[v]&&i<b.slidesGrid[v+b.params.slidesPerGroup]&&(w=v,y=b.slidesGrid[v+b.params.slidesPerGroup]-b.slidesGrid[v]):i>=b.slidesGrid[v]&&(w=v,y=b.slidesGrid[b.slidesGrid.length-1]-b.slidesGrid[b.slidesGrid.length-2]);var x=(i-b.slidesGrid[w])/y;if(s>b.params.longSwipesMs){if(!b.params.longSwipes)return void b.slideTo(b.activeIndex);"next"===b.swipeDirection&&(x>=b.params.longSwipesRatio?b.slideTo(w+b.params.slidesPerGroup):b.slideTo(w)),"prev"===b.swipeDirection&&(x>1-b.params.longSwipesRatio?b.slideTo(w+b.params.slidesPerGroup):b.slideTo(w))}else{if(!b.params.shortSwipes)return void b.slideTo(b.activeIndex);"next"===b.swipeDirection&&b.slideTo(w+b.params.slidesPerGroup),"prev"===b.swipeDirection&&b.slideTo(w)}}},b._slideTo=function(e,a){return b.slideTo(e,a,!0,!0)},b.slideTo=function(e,a,t,s){"undefined"==typeof t&&(t=!0),"undefined"==typeof e&&(e=0),e<0&&(e=0),b.snapIndex=Math.floor(e/b.params.slidesPerGroup),b.snapIndex>=b.snapGrid.length&&(b.snapIndex=b.snapGrid.length-1);var i=-b.snapGrid[b.snapIndex];if(b.params.autoplay&&b.autoplaying&&(s||!b.params.autoplayDisableOnInteraction?b.pauseAutoplay(a):b.stopAutoplay()),b.updateProgress(i),b.params.normalizeSlideIndex)for(var r=0;r<b.slidesGrid.length;r++)-Math.floor(100*i)>=Math.floor(100*b.slidesGrid[r])&&(e=r);return!(!b.params.allowSwipeToNext&&i<b.translate&&i<b.minTranslate())&&(!(!b.params.allowSwipeToPrev&&i>b.translate&&i>b.maxTranslate()&&(b.activeIndex||0)!==e)&&("undefined"==typeof a&&(a=b.params.speed),b.previousIndex=b.activeIndex||0,b.activeIndex=e,b.updateRealIndex(),b.rtl&&-i===b.translate||!b.rtl&&i===b.translate?(b.params.autoHeight&&b.updateAutoHeight(),b.updateClasses(),"slide"!==b.params.effect&&b.setWrapperTranslate(i),!1):(b.updateClasses(),b.onTransitionStart(t),0===a||b.browser.lteIE9?(b.setWrapperTranslate(i),b.setWrapperTransition(0),b.onTransitionEnd(t)):(b.setWrapperTranslate(i),b.setWrapperTransition(a),b.animating||(b.animating=!0,b.wrapper.transitionEnd(function(){b&&b.onTransitionEnd(t)}))),!0)))},b.onTransitionStart=function(e){"undefined"==typeof e&&(e=!0),b.params.autoHeight&&b.updateAutoHeight(),b.lazy&&b.lazy.onTransitionStart(),e&&(b.emit("onTransitionStart",b),b.activeIndex!==b.previousIndex&&(b.emit("onSlideChangeStart",b),b.activeIndex>b.previousIndex?b.emit("onSlideNextStart",b):b.emit("onSlidePrevStart",b)))},b.onTransitionEnd=function(e){b.animating=!1,b.setWrapperTransition(0),"undefined"==typeof e&&(e=!0),b.lazy&&b.lazy.onTransitionEnd(),e&&(b.emit("onTransitionEnd",b),b.activeIndex!==b.previousIndex&&(b.emit("onSlideChangeEnd",b),b.activeIndex>b.previousIndex?b.emit("onSlideNextEnd",b):b.emit("onSlidePrevEnd",b))),b.params.history&&b.history&&b.history.setHistory(b.params.history,b.activeIndex),b.params.hashnav&&b.hashnav&&b.hashnav.setHash()},b.slideNext=function(e,a,t){if(b.params.loop){if(b.animating)return!1;b.fixLoop();b.container[0].clientLeft;return b.slideTo(b.activeIndex+b.params.slidesPerGroup,a,e,t)}return b.slideTo(b.activeIndex+b.params.slidesPerGroup,a,e,t)},b._slideNext=function(e){return b.slideNext(!0,e,!0)},b.slidePrev=function(e,a,t){if(b.params.loop){if(b.animating)return!1;b.fixLoop();b.container[0].clientLeft;return b.slideTo(b.activeIndex-1,a,e,t)}return b.slideTo(b.activeIndex-1,a,e,t)},b._slidePrev=function(e){return b.slidePrev(!0,e,!0)},b.slideReset=function(e,a,t){return b.slideTo(b.activeIndex,a,e)},b.disableTouchControl=function(){return b.params.onlyExternal=!0,!0},b.enableTouchControl=function(){return b.params.onlyExternal=!1,!0},b.setWrapperTransition=function(e,a){b.wrapper.transition(e),"slide"!==b.params.effect&&b.effects[b.params.effect]&&b.effects[b.params.effect].setTransition(e),b.params.parallax&&b.parallax&&b.parallax.setTransition(e),b.params.scrollbar&&b.scrollbar&&b.scrollbar.setTransition(e),b.params.control&&b.controller&&b.controller.setTransition(e,a),b.emit("onSetTransition",b,e)},b.setWrapperTranslate=function(e,a,t){var s=0,i=0,n=0;b.isHorizontal()?s=b.rtl?-e:e:i=e,b.params.roundLengths&&(s=r(s),i=r(i)),b.params.virtualTranslate||(b.support.transforms3d?b.wrapper.transform("translate3d("+s+"px, "+i+"px, "+n+"px)"):b.wrapper.transform("translate("+s+"px, "+i+"px)")),b.translate=b.isHorizontal()?s:i;var o,l=b.maxTranslate()-b.minTranslate();o=0===l?0:(e-b.minTranslate())/l,o!==b.progress&&b.updateProgress(e),a&&b.updateActiveIndex(),"slide"!==b.params.effect&&b.effects[b.params.effect]&&b.effects[b.params.effect].setTranslate(b.translate),b.params.parallax&&b.parallax&&b.parallax.setTranslate(b.translate),b.params.scrollbar&&b.scrollbar&&b.scrollbar.setTranslate(b.translate),b.params.control&&b.controller&&b.controller.setTranslate(b.translate,t),b.emit("onSetTranslate",b,b.translate)},b.getTranslate=function(e,a){var t,s,i,r;return"undefined"==typeof a&&(a="x"),b.params.virtualTranslate?b.rtl?-b.translate:b.translate:(i=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=i.transform||i.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),r=new window.WebKitCSSMatrix("none"===s?"":s)):(r=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=r.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?r.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?r.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),b.rtl&&s&&(s=-s),s||0)},b.getWrapperTranslate=function(e){return"undefined"==typeof e&&(e=b.isHorizontal()?"x":"y"),b.getTranslate(b.wrapper[0],e)},b.observers=[],b.initObservers=function(){if(b.params.observeParents)for(var e=b.container.parents(),a=0;a<e.length;a++)l(e[a]);l(b.container[0],{childList:!1}),l(b.wrapper[0],{attributes:!1})},b.disconnectObservers=function(){for(var e=0;e<b.observers.length;e++)b.observers[e].disconnect();b.observers=[]},b.createLoop=function(){b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass).remove();var e=b.wrapper.children("."+b.params.slideClass);"auto"!==b.params.slidesPerView||b.params.loopedSlides||(b.params.loopedSlides=e.length),b.loopedSlides=parseInt(b.params.loopedSlides||b.params.slidesPerView,10),b.loopedSlides=b.loopedSlides+b.params.loopAdditionalSlides,b.loopedSlides>e.length&&(b.loopedSlides=e.length);var t,s=[],i=[];for(e.each(function(t,r){var n=a(this);t<b.loopedSlides&&i.push(r),t<e.length&&t>=e.length-b.loopedSlides&&s.push(r),n.attr("data-swiper-slide-index",t)}),t=0;t<i.length;t++)b.wrapper.append(a(i[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass));for(t=s.length-1;t>=0;t--)b.wrapper.prepend(a(s[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass))},b.destroyLoop=function(){b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass).remove(),b.slides.removeAttr("data-swiper-slide-index")},b.reLoop=function(e){var a=b.activeIndex-b.loopedSlides;b.destroyLoop(),b.createLoop(),b.updateSlidesSize(),e&&b.slideTo(a+b.loopedSlides,0,!1)},b.fixLoop=function(){var e;b.activeIndex<b.loopedSlides?(e=b.slides.length-3*b.loopedSlides+b.activeIndex,e+=b.loopedSlides,b.slideTo(e,0,!1,!0)):("auto"===b.params.slidesPerView&&b.activeIndex>=2*b.loopedSlides||b.activeIndex>b.slides.length-2*b.params.slidesPerView)&&(e=-b.slides.length+b.activeIndex+b.loopedSlides,e+=b.loopedSlides,b.slideTo(e,0,!1,!0))},b.appendSlide=function(e){if(b.params.loop&&b.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a<e.length;a++)e[a]&&b.wrapper.append(e[a]);else b.wrapper.append(e);b.params.loop&&b.createLoop(),b.params.observer&&b.support.observer||b.update(!0)},b.prependSlide=function(e){b.params.loop&&b.destroyLoop();var a=b.activeIndex+1;if("object"==typeof e&&e.length){for(var t=0;t<e.length;t++)e[t]&&b.wrapper.prepend(e[t]);a=b.activeIndex+e.length}else b.wrapper.prepend(e);b.params.loop&&b.createLoop(),b.params.observer&&b.support.observer||b.update(!0),b.slideTo(a,0,!1)},b.removeSlide=function(e){b.params.loop&&(b.destroyLoop(),b.slides=b.wrapper.children("."+b.params.slideClass));var a,t=b.activeIndex;if("object"==typeof e&&e.length){for(var s=0;s<e.length;s++)a=e[s],b.slides[a]&&b.slides.eq(a).remove(),a<t&&t--;t=Math.max(t,0)}else a=e,b.slides[a]&&b.slides.eq(a).remove(),a<t&&t--,t=Math.max(t,0);b.params.loop&&b.createLoop(),b.params.observer&&b.support.observer||b.update(!0),b.params.loop?b.slideTo(t+b.loopedSlides,0,!1):b.slideTo(t,0,!1)},b.removeAllSlides=function(){for(var e=[],a=0;a<b.slides.length;a++)e.push(a);b.removeSlide(e)},b.effects={fade:{setTranslate:function(){for(var e=0;e<b.slides.length;e++){var a=b.slides.eq(e),t=a[0].swiperSlideOffset,s=-t;b.params.virtualTranslate||(s-=b.translate);var i=0;b.isHorizontal()||(i=s,s=0);var r=b.params.fade.crossFade?Math.max(1-Math.abs(a[0].progress),0):1+Math.min(Math.max(a[0].progress,-1),0);a.css({opacity:r}).transform("translate3d("+s+"px, "+i+"px, 0px)")}},setTransition:function(e){if(b.slides.transition(e),b.params.virtualTranslate&&0!==e){var a=!1;b.slides.transitionEnd(function(){if(!a&&b){a=!0,b.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],t=0;t<e.length;t++)b.wrapper.trigger(e[t])}})}}},flip:{setTranslate:function(){for(var e=0;e<b.slides.length;e++){var t=b.slides.eq(e),s=t[0].progress;b.params.flip.limitRotation&&(s=Math.max(Math.min(t[0].progress,1),-1));var i=t[0].swiperSlideOffset,r=-180*s,n=r,o=0,l=-i,p=0;if(b.isHorizontal()?b.rtl&&(n=-n):(p=l,l=0,o=-n,n=0),t[0].style.zIndex=-Math.abs(Math.round(s))+b.slides.length,b.params.flip.slideShadows){var d=b.isHorizontal()?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),u=b.isHorizontal()?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===d.length&&(d=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"left":"top")+'"></div>'),t.append(d)),0===u.length&&(u=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"right":"bottom")+'"></div>'),t.append(u)),d.length&&(d[0].style.opacity=Math.max(-s,0)),u.length&&(u[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){if(b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),b.params.virtualTranslate&&0!==e){var t=!1;b.slides.eq(b.activeIndex).transitionEnd(function(){if(!t&&b&&a(this).hasClass(b.params.slideActiveClass)){t=!0,b.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s<e.length;s++)b.wrapper.trigger(e[s])}})}}},cube:{setTranslate:function(){var e,t=0;b.params.cube.shadow&&(b.isHorizontal()?(e=b.wrapper.find(".swiper-cube-shadow"),0===e.length&&(e=a('<div class="swiper-cube-shadow"></div>'),b.wrapper.append(e)),e.css({height:b.width+"px"})):(e=b.container.find(".swiper-cube-shadow"),0===e.length&&(e=a('<div class="swiper-cube-shadow"></div>'),b.container.append(e))));for(var s=0;s<b.slides.length;s++){var i=b.slides.eq(s),r=90*s,n=Math.floor(r/360);b.rtl&&(r=-r,n=Math.floor(-r/360));var o=Math.max(Math.min(i[0].progress,1),-1),l=0,p=0,d=0;s%4===0?(l=4*-n*b.size,d=0):(s-1)%4===0?(l=0,d=4*-n*b.size):(s-2)%4===0?(l=b.size+4*n*b.size,d=b.size):(s-3)%4===0&&(l=-b.size,d=3*b.size+4*b.size*n),b.rtl&&(l=-l),b.isHorizontal()||(p=l,l=0);var u="rotateX("+(b.isHorizontal()?0:-r)+"deg) rotateY("+(b.isHorizontal()?r:0)+"deg) translate3d("+l+"px, "+p+"px, "+d+"px)";if(o<=1&&o>-1&&(t=90*s+90*o,b.rtl&&(t=90*-s-90*o)),i.transform(u),b.params.cube.slideShadows){var c=b.isHorizontal()?i.find(".swiper-slide-shadow-left"):i.find(".swiper-slide-shadow-top"),m=b.isHorizontal()?i.find(".swiper-slide-shadow-right"):i.find(".swiper-slide-shadow-bottom");0===c.length&&(c=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"left":"top")+'"></div>'),i.append(c)),0===m.length&&(m=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"right":"bottom")+'"></div>'),i.append(m)),c.length&&(c[0].style.opacity=Math.max(-o,0)),m.length&&(m[0].style.opacity=Math.max(o,0))}}if(b.wrapper.css({"-webkit-transform-origin":"50% 50% -"+b.size/2+"px","-moz-transform-origin":"50% 50% -"+b.size/2+"px","-ms-transform-origin":"50% 50% -"+b.size/2+"px","transform-origin":"50% 50% -"+b.size/2+"px"}),b.params.cube.shadow)if(b.isHorizontal())e.transform("translate3d(0px, "+(b.width/2+b.params.cube.shadowOffset)+"px, "+-b.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+b.params.cube.shadowScale+")");else{var h=Math.abs(t)-90*Math.floor(Math.abs(t)/90),g=1.5-(Math.sin(2*h*Math.PI/360)/2+Math.cos(2*h*Math.PI/360)/2),f=b.params.cube.shadowScale,v=b.params.cube.shadowScale/g,w=b.params.cube.shadowOffset;e.transform("scale3d("+f+", 1, "+v+") translate3d(0px, "+(b.height/2+w)+"px, "+-b.height/2/v+"px) rotateX(-90deg)")}var y=b.isSafari||b.isUiWebView?-b.size/2:0;b.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(b.isHorizontal()?0:t)+"deg) rotateY("+(b.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),b.params.cube.shadow&&!b.isHorizontal()&&b.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var e=b.translate,t=b.isHorizontal()?-e+b.width/2:-e+b.height/2,s=b.isHorizontal()?b.params.coverflow.rotate:-b.params.coverflow.rotate,i=b.params.coverflow.depth,r=0,n=b.slides.length;r<n;r++){var o=b.slides.eq(r),l=b.slidesSizesGrid[r],p=o[0].swiperSlideOffset,d=(t-p-l/2)/l*b.params.coverflow.modifier,u=b.isHorizontal()?s*d:0,c=b.isHorizontal()?0:s*d,m=-i*Math.abs(d),h=b.isHorizontal()?0:b.params.coverflow.stretch*d,g=b.isHorizontal()?b.params.coverflow.stretch*d:0;Math.abs(g)<.001&&(g=0),Math.abs(h)<.001&&(h=0),Math.abs(m)<.001&&(m=0),Math.abs(u)<.001&&(u=0),Math.abs(c)<.001&&(c=0);var f="translate3d("+g+"px,"+h+"px,"+m+"px) rotateX("+c+"deg) rotateY("+u+"deg)";if(o.transform(f),o[0].style.zIndex=-Math.abs(Math.round(d))+1,b.params.coverflow.slideShadows){var v=b.isHorizontal()?o.find(".swiper-slide-shadow-left"):o.find(".swiper-slide-shadow-top"),w=b.isHorizontal()?o.find(".swiper-slide-shadow-right"):o.find(".swiper-slide-shadow-bottom");0===v.length&&(v=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"left":"top")+'"></div>'),o.append(v)),0===w.length&&(w=a('<div class="swiper-slide-shadow-'+(b.isHorizontal()?"right":"bottom")+'"></div>'),o.append(w)),v.length&&(v[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(b.browser.ie){var y=b.wrapper[0].style;y.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},b.lazy={initialImageLoaded:!1,loadImageInSlide:function(e,t){if("undefined"!=typeof e&&("undefined"==typeof t&&(t=!0),0!==b.slides.length)){var s=b.slides.eq(e),i=s.find("."+b.params.lazyLoadingClass+":not(."+b.params.lazyStatusLoadedClass+"):not(."+b.params.lazyStatusLoadingClass+")");!s.hasClass(b.params.lazyLoadingClass)||s.hasClass(b.params.lazyStatusLoadedClass)||s.hasClass(b.params.lazyStatusLoadingClass)||(i=i.add(s[0])),0!==i.length&&i.each(function(){var e=a(this);e.addClass(b.params.lazyStatusLoadingClass);var i=e.attr("data-background"),r=e.attr("data-src"),n=e.attr("data-srcset"),o=e.attr("data-sizes");b.loadImage(e[0],r||i,n,o,!1,function(){if(i?(e.css("background-image",'url("'+i+'")'),e.removeAttr("data-background")):(n&&(e.attr("srcset",n),e.removeAttr("data-srcset")),o&&(e.attr("sizes",o),e.removeAttr("data-sizes")),r&&(e.attr("src",r),e.removeAttr("data-src"))),e.addClass(b.params.lazyStatusLoadedClass).removeClass(b.params.lazyStatusLoadingClass),s.find("."+b.params.lazyPreloaderClass+", ."+b.params.preloaderClass).remove(),b.params.loop&&t){var a=s.attr("data-swiper-slide-index");if(s.hasClass(b.params.slideDuplicateClass)){var l=b.wrapper.children('[data-swiper-slide-index="'+a+'"]:not(.'+b.params.slideDuplicateClass+")");b.lazy.loadImageInSlide(l.index(),!1)}else{var p=b.wrapper.children("."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+a+'"]');b.lazy.loadImageInSlide(p.index(),!1)}}b.emit("onLazyImageReady",b,s[0],e[0])}),b.emit("onLazyImageLoad",b,s[0],e[0])})}},load:function(){var e,t=b.params.slidesPerView;if("auto"===t&&(t=0),b.lazy.initialImageLoaded||(b.lazy.initialImageLoaded=!0),b.params.watchSlidesVisibility)b.wrapper.children("."+b.params.slideVisibleClass).each(function(){b.lazy.loadImageInSlide(a(this).index())});else if(t>1)for(e=b.activeIndex;e<b.activeIndex+t;e++)b.slides[e]&&b.lazy.loadImageInSlide(e);else b.lazy.loadImageInSlide(b.activeIndex);if(b.params.lazyLoadingInPrevNext)if(t>1||b.params.lazyLoadingInPrevNextAmount&&b.params.lazyLoadingInPrevNextAmount>1){var s=b.params.lazyLoadingInPrevNextAmount,i=t,r=Math.min(b.activeIndex+i+Math.max(s,i),b.slides.length),n=Math.max(b.activeIndex-Math.max(i,s),0);for(e=b.activeIndex+t;e<r;e++)b.slides[e]&&b.lazy.loadImageInSlide(e);for(e=n;e<b.activeIndex;e++)b.slides[e]&&b.lazy.loadImageInSlide(e)}else{var o=b.wrapper.children("."+b.params.slideNextClass);o.length>0&&b.lazy.loadImageInSlide(o.index());var l=b.wrapper.children("."+b.params.slidePrevClass);l.length>0&&b.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){b.params.lazyLoading&&(b.params.lazyLoadingOnTransitionStart||!b.params.lazyLoadingOnTransitionStart&&!b.lazy.initialImageLoaded)&&b.lazy.load()},onTransitionEnd:function(){b.params.lazyLoading&&!b.params.lazyLoadingOnTransitionStart&&b.lazy.load()}},b.scrollbar={isTouched:!1,setDragPosition:function(e){var a=b.scrollbar,t=b.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[b.isHorizontal()?"left":"top"]-a.dragSize/2,i=-b.minTranslate()*a.moveDivider,r=-b.maxTranslate()*a.moveDivider;s<i?s=i:s>r&&(s=r),s=-s/a.moveDivider,b.updateProgress(s),b.setWrapperTranslate(s,!0)},dragStart:function(e){var a=b.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),b.params.scrollbarHide&&a.track.css("opacity",1),b.wrapper.transition(100),a.drag.transition(100),b.emit("onScrollbarDragStart",b)},dragMove:function(e){var a=b.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),b.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),b.emit("onScrollbarDragMove",b))},dragEnd:function(e){var a=b.scrollbar;a.isTouched&&(a.isTouched=!1,b.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),b.emit("onScrollbarDragEnd",b),b.params.scrollbarSnapOnRelease&&b.slideReset())},draggableEvents:function(){return b.params.simulateTouch!==!1||b.support.touch?b.touchEvents:b.touchEventsDesktop}(),enableDraggable:function(){var e=b.scrollbar,t=b.support.touch?e.track:document;a(e.track).on(e.draggableEvents.start,e.dragStart),a(t).on(e.draggableEvents.move,e.dragMove),a(t).on(e.draggableEvents.end,e.dragEnd)},disableDraggable:function(){var e=b.scrollbar,t=b.support.touch?e.track:document;a(e.track).off(e.draggableEvents.start,e.dragStart),a(t).off(e.draggableEvents.move,e.dragMove),a(t).off(e.draggableEvents.end,e.dragEnd)},set:function(){if(b.params.scrollbar){var e=b.scrollbar;e.track=a(b.params.scrollbar),b.params.uniqueNavElements&&"string"==typeof b.params.scrollbar&&e.track.length>1&&1===b.container.find(b.params.scrollbar).length&&(e.track=b.container.find(b.params.scrollbar)),e.drag=e.track.find(".swiper-scrollbar-drag"),0===e.drag.length&&(e.drag=a('<div class="swiper-scrollbar-drag"></div>'),e.track.append(e.drag)),e.drag[0].style.width="",e.drag[0].style.height="",e.trackSize=b.isHorizontal()?e.track[0].offsetWidth:e.track[0].offsetHeight,e.divider=b.size/b.virtualSize,e.moveDivider=e.divider*(e.trackSize/b.size),e.dragSize=e.trackSize*e.divider,b.isHorizontal()?e.drag[0].style.width=e.dragSize+"px":e.drag[0].style.height=e.dragSize+"px",e.divider>=1?e.track[0].style.display="none":e.track[0].style.display="",b.params.scrollbarHide&&(e.track[0].style.opacity=0)}},setTranslate:function(){if(b.params.scrollbar){var e,a=b.scrollbar,t=(b.translate||0,a.dragSize);e=(a.trackSize-a.dragSize)*b.progress,b.rtl&&b.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),b.isHorizontal()?(b.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(b.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),b.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){b.params.scrollbar&&b.scrollbar.drag.transition(e)}},b.controller={LinearSpline:function(e,a){this.x=e,this.y=a,this.lastIndex=e.length-1;var t,s;this.x.length;this.interpolate=function(e){return e?(s=i(this.x,e),t=s-1,(e-this.x[t])*(this.y[s]-this.y[t])/(this.x[s]-this.x[t])+this.y[t]):0};var i=function(){var e,a,t;return function(s,i){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=i?a=t:e=t;return e}}()},getInterpolateFunction:function(e){b.controller.spline||(b.controller.spline=b.params.loop?new b.controller.LinearSpline(b.slidesGrid,e.slidesGrid):new b.controller.LinearSpline(b.snapGrid,e.snapGrid))},setTranslate:function(e,a){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-b.translate:b.translate,"slide"===b.params.controlBy&&(b.controller.getInterpolateFunction(a),r=-b.controller.spline.interpolate(-e)),r&&"container"!==b.params.controlBy||(i=(a.maxTranslate()-a.minTranslate())/(b.maxTranslate()-b.minTranslate()),r=(e-b.minTranslate())*i+a.minTranslate()),b.params.controlInverse&&(r=a.maxTranslate()-r),a.updateProgress(r),a.setWrapperTranslate(r,!1,b),a.updateActiveIndex()}var i,r,n=b.params.control;if(b.isArray(n))for(var o=0;o<n.length;o++)n[o]!==a&&n[o]instanceof t&&s(n[o]);else n instanceof t&&a!==n&&s(n)},setTransition:function(e,a){function s(a){
a.setWrapperTransition(e,b),0!==e&&(a.onTransitionStart(),a.wrapper.transitionEnd(function(){r&&(a.params.loop&&"slide"===b.params.controlBy&&a.fixLoop(),a.onTransitionEnd())}))}var i,r=b.params.control;if(b.isArray(r))for(i=0;i<r.length;i++)r[i]!==a&&r[i]instanceof t&&s(r[i]);else r instanceof t&&a!==r&&s(r)}},b.hashnav={onHashCange:function(e,a){var t=document.location.hash.replace("#",""),s=b.slides.eq(b.activeIndex).attr("data-hash");t!==s&&b.slideTo(b.wrapper.children("."+b.params.slideClass+'[data-hash="'+t+'"]').index())},attachEvents:function(e){var t=e?"off":"on";a(window)[t]("hashchange",b.hashnav.onHashCange)},setHash:function(){if(b.hashnav.initialized&&b.params.hashnav)if(b.params.replaceState&&window.history&&window.history.replaceState)window.history.replaceState(null,null,"#"+b.slides.eq(b.activeIndex).attr("data-hash")||"");else{var e=b.slides.eq(b.activeIndex),a=e.attr("data-hash")||e.attr("data-history");document.location.hash=a||""}},init:function(){if(b.params.hashnav&&!b.params.history){b.hashnav.initialized=!0;var e=document.location.hash.replace("#","");if(e)for(var a=0,t=0,s=b.slides.length;t<s;t++){var i=b.slides.eq(t),r=i.attr("data-hash")||i.attr("data-history");if(r===e&&!i.hasClass(b.params.slideDuplicateClass)){var n=i.index();b.slideTo(n,a,b.params.runCallbacksOnInit,!0)}}b.params.hashnavWatchState&&b.hashnav.attachEvents()}},destroy:function(){b.params.hashnavWatchState&&b.hashnav.attachEvents(!0)}},b.history={init:function(){if(b.params.history){if(!window.history||!window.history.pushState)return b.params.history=!1,void(b.params.hashnav=!0);b.history.initialized=!0,this.paths=this.getPathValues(),(this.paths.key||this.paths.value)&&(this.scrollToSlide(0,this.paths.value,b.params.runCallbacksOnInit),b.params.replaceState||window.addEventListener("popstate",this.setHistoryPopState))}},setHistoryPopState:function(){b.history.paths=b.history.getPathValues(),b.history.scrollToSlide(b.params.speed,b.history.paths.value,!1)},getPathValues:function(){var e=window.location.pathname.slice(1).split("/"),a=e.length,t=e[a-2],s=e[a-1];return{key:t,value:s}},setHistory:function(e,a){if(b.history.initialized&&b.params.history){var t=b.slides.eq(a),s=this.slugify(t.attr("data-history"));window.location.pathname.includes(e)||(s=e+"/"+s),b.params.replaceState?window.history.replaceState(null,null,s):window.history.pushState(null,null,s)}},slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,a,t){if(a)for(var s=0,i=b.slides.length;s<i;s++){var r=b.slides.eq(s),n=this.slugify(r.attr("data-history"));if(n===a&&!r.hasClass(b.params.slideDuplicateClass)){var o=r.index();b.slideTo(o,e,t)}}else b.slideTo(0,e,t)}},b.disableKeyboardControl=function(){b.params.keyboardControl=!1,a(document).off("keydown",p)},b.enableKeyboardControl=function(){b.params.keyboardControl=!0,a(document).on("keydown",p)},b.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},b.params.mousewheelControl&&(b.mousewheel.event=navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":d()?"wheel":"mousewheel"),b.disableMousewheelControl=function(){if(!b.mousewheel.event)return!1;var e=b.container;return"container"!==b.params.mousewheelEventsTarged&&(e=a(b.params.mousewheelEventsTarged)),e.off(b.mousewheel.event,u),!0},b.enableMousewheelControl=function(){if(!b.mousewheel.event)return!1;var e=b.container;return"container"!==b.params.mousewheelEventsTarged&&(e=a(b.params.mousewheelEventsTarged)),e.on(b.mousewheel.event,u),!0},b.parallax={setTranslate:function(){b.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,b.progress)}),b.slides.each(function(){var e=a(this);e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var a=Math.min(Math.max(e[0].progress,-1),1);m(this,a)})})},setTransition:function(e){"undefined"==typeof e&&(e=b.params.speed),b.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=a(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),t.transition(s)})}},b.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:b.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,i=e.targetTouches[1].pageY,r=Math.sqrt(Math.pow(s-a,2)+Math.pow(i-t,2));return r},onGestureStart:function(e){var t=b.zoom;if(!b.support.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(e)}return t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=a(this),0===t.gesture.slide.length&&(t.gesture.slide=b.slides.eq(b.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+b.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||b.params.zoomMax,0!==t.gesture.imageWrap.length)?(t.gesture.image.transition(0),void(t.isScaling=!0)):void(t.gesture.image=void 0)},onGestureChange:function(e){var a=b.zoom;if(!b.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(b.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scale<b.params.zoomMin&&(a.scale=b.params.zoomMin+1-Math.pow(b.params.zoomMin-a.scale+1,.5)),a.gesture.image.transform("translate3d(0,0,0) scale("+a.scale+")"))},onGestureEnd:function(e){var a=b.zoom;!b.support.gestures&&("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2)||a.gesture.image&&0!==a.gesture.image.length&&(a.scale=Math.max(Math.min(a.scale,a.gesture.zoomMax),b.params.zoomMin),a.gesture.image.transition(b.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(a.gesture.slide=void 0))},onTouchStart:function(e,a){var t=e.zoom;t.gesture.image&&0!==t.gesture.image.length&&(t.image.isTouched||("android"===e.device.os&&a.preventDefault(),t.image.isTouched=!0,t.image.touchesStart.x="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,t.image.touchesStart.y="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY))},onTouchMove:function(e){var a=b.zoom;if(a.gesture.image&&0!==a.gesture.image.length&&(b.allowClick=!1,a.image.isTouched&&a.gesture.slide)){a.image.isMoved||(a.image.width=a.gesture.image[0].offsetWidth,a.image.height=a.gesture.image[0].offsetHeight,a.image.startX=b.getTranslate(a.gesture.imageWrap[0],"x")||0,a.image.startY=b.getTranslate(a.gesture.imageWrap[0],"y")||0,a.gesture.slideWidth=a.gesture.slide[0].offsetWidth,a.gesture.slideHeight=a.gesture.slide[0].offsetHeight,a.gesture.imageWrap.transition(0),b.rtl&&(a.image.startX=-a.image.startX),b.rtl&&(a.image.startY=-a.image.startY));var t=a.image.width*a.scale,s=a.image.height*a.scale;if(!(t<a.gesture.slideWidth&&s<a.gesture.slideHeight)){if(a.image.minX=Math.min(a.gesture.slideWidth/2-t/2,0),a.image.maxX=-a.image.minX,a.image.minY=Math.min(a.gesture.slideHeight/2-s/2,0),a.image.maxY=-a.image.minY,a.image.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.image.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.image.isMoved&&!a.isScaling){if(b.isHorizontal()&&Math.floor(a.image.minX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x<a.image.touchesStart.x||Math.floor(a.image.maxX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x>a.image.touchesStart.x)return void(a.image.isTouched=!1);if(!b.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y<a.image.touchesStart.y||Math.floor(a.image.maxY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y>a.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentX<a.image.minX&&(a.image.currentX=a.image.minX+1-Math.pow(a.image.minX-a.image.currentX+1,.8)),a.image.currentX>a.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentY<a.image.minY&&(a.image.currentY=a.image.minY+1-Math.pow(a.image.minY-a.image.currentY+1,.8)),a.image.currentY>a.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,i=300,r=t.velocity.x*s,n=t.image.currentX+r,o=t.velocity.y*i,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(i=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,i);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,u=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-u/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(e,t){var s=e.zoom;if(s.gesture.slide||(s.gesture.slide=e.clickedSlide?a(e.clickedSlide):e.slides.eq(e.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+e.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var i,r,n,o,l,p,d,u,c,m,h,g,f,v,w,y,x,T;"undefined"==typeof s.image.touchesStart.x&&t?(i="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,r="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(i=s.image.touchesStart.x,r=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||e.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-i,p=o+T/2-r,c=s.gesture.image[0].offsetWidth,m=s.gesture.image[0].offsetHeight,h=c*s.scale,g=m*s.scale,f=Math.min(x/2-h/2,0),v=Math.min(T/2-g/2,0),w=-f,y=-v,d=l*s.scale,u=p*s.scale,d<f&&(d=f),d>w&&(d=w),u<v&&(u=v),u>y&&(u=y)):(d=0,u=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+u+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(e){var t=e?"off":"on";if(b.params.zoom){var s=(b.slides,!("touchstart"!==b.touchEvents.start||!b.support.passiveListener||!b.params.passiveListeners)&&{passive:!0,capture:!1});b.support.gestures?(b.slides[t]("gesturestart",b.zoom.onGestureStart,s),b.slides[t]("gesturechange",b.zoom.onGestureChange,s),b.slides[t]("gestureend",b.zoom.onGestureEnd,s)):"touchstart"===b.touchEvents.start&&(b.slides[t](b.touchEvents.start,b.zoom.onGestureStart,s),b.slides[t](b.touchEvents.move,b.zoom.onGestureChange,s),b.slides[t](b.touchEvents.end,b.zoom.onGestureEnd,s)),b[t]("touchStart",b.zoom.onTouchStart),b.slides.each(function(e,s){a(s).find("."+b.params.zoomContainerClass).length>0&&a(s)[t](b.touchEvents.move,b.zoom.onTouchMove)}),b[t]("touchEnd",b.zoom.onTouchEnd),b[t]("transitionEnd",b.zoom.onTransitionEnd),b.params.zoomToggle&&b.on("doubleTap",b.zoom.toggleZoom)}},init:function(){b.zoom.attachEvents()},destroy:function(){b.zoom.attachEvents(!0)}},b._plugins=[];for(var O in b.plugins){var N=b.plugins[O](b,b.params[O]);N&&b._plugins.push(N)}return b.callPlugins=function(e){for(var a=0;a<b._plugins.length;a++)e in b._plugins[a]&&b._plugins[a][e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},b.emitterEventListeners={},b.emit=function(e){b.params[e]&&b.params[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);var a;if(b.emitterEventListeners[e])for(a=0;a<b.emitterEventListeners[e].length;a++)b.emitterEventListeners[e][a](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);b.callPlugins&&b.callPlugins(e,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},b.on=function(e,a){return e=h(e),b.emitterEventListeners[e]||(b.emitterEventListeners[e]=[]),b.emitterEventListeners[e].push(a),b},b.off=function(e,a){var t;if(e=h(e),"undefined"==typeof a)return b.emitterEventListeners[e]=[],b;if(b.emitterEventListeners[e]&&0!==b.emitterEventListeners[e].length){for(t=0;t<b.emitterEventListeners[e].length;t++)b.emitterEventListeners[e][t]===a&&b.emitterEventListeners[e].splice(t,1);return b}},b.once=function(e,a){e=h(e);var t=function(){a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),b.off(e,t)};return b.on(e,t),b},b.a11y={makeFocusable:function(e){return e.attr("tabIndex","0"),e},addRole:function(e,a){return e.attr("role",a),e},addLabel:function(e,a){return e.attr("aria-label",a),e},disable:function(e){return e.attr("aria-disabled",!0),e},enable:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){13===e.keyCode&&(a(e.target).is(b.params.nextButton)?(b.onClickNext(e),b.isEnd?b.a11y.notify(b.params.lastSlideMessage):b.a11y.notify(b.params.nextSlideMessage)):a(e.target).is(b.params.prevButton)&&(b.onClickPrev(e),b.isBeginning?b.a11y.notify(b.params.firstSlideMessage):b.a11y.notify(b.params.prevSlideMessage)),a(e.target).is("."+b.params.bulletClass)&&a(e.target)[0].click())},liveRegion:a('<span class="'+b.params.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>'),notify:function(e){var a=b.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.a11y.makeFocusable(b.nextButton),b.a11y.addRole(b.nextButton,"button"),b.a11y.addLabel(b.nextButton,b.params.nextSlideMessage)),b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.a11y.makeFocusable(b.prevButton),b.a11y.addRole(b.prevButton,"button"),b.a11y.addLabel(b.prevButton,b.params.prevSlideMessage)),a(b.container).append(b.a11y.liveRegion)},initPagination:function(){b.params.pagination&&b.params.paginationClickable&&b.bullets&&b.bullets.length&&b.bullets.each(function(){var e=a(this);b.a11y.makeFocusable(e),b.a11y.addRole(e,"button"),b.a11y.addLabel(e,b.params.paginationBulletMessage.replace(/{{index}}/,e.index()+1))})},destroy:function(){b.a11y.liveRegion&&b.a11y.liveRegion.length>0&&b.a11y.liveRegion.remove()}},b.init=function(){b.params.loop&&b.createLoop(),b.updateContainerSize(),b.updateSlidesSize(),b.updatePagination(),b.params.scrollbar&&b.scrollbar&&(b.scrollbar.set(),b.params.scrollbarDraggable&&b.scrollbar.enableDraggable()),"slide"!==b.params.effect&&b.effects[b.params.effect]&&(b.params.loop||b.updateProgress(),b.effects[b.params.effect].setTranslate()),b.params.loop?b.slideTo(b.params.initialSlide+b.loopedSlides,0,b.params.runCallbacksOnInit):(b.slideTo(b.params.initialSlide,0,b.params.runCallbacksOnInit),0===b.params.initialSlide&&(b.parallax&&b.params.parallax&&b.parallax.setTranslate(),b.lazy&&b.params.lazyLoading&&(b.lazy.load(),b.lazy.initialImageLoaded=!0))),b.attachEvents(),b.params.observer&&b.support.observer&&b.initObservers(),b.params.preloadImages&&!b.params.lazyLoading&&b.preloadImages(),b.params.zoom&&b.zoom&&b.zoom.init(),b.params.autoplay&&b.startAutoplay(),b.params.keyboardControl&&b.enableKeyboardControl&&b.enableKeyboardControl(),b.params.mousewheelControl&&b.enableMousewheelControl&&b.enableMousewheelControl(),b.params.hashnavReplaceState&&(b.params.replaceState=b.params.hashnavReplaceState),b.params.history&&b.history&&b.history.init(),b.params.hashnav&&b.hashnav&&b.hashnav.init(),b.params.a11y&&b.a11y&&b.a11y.init(),b.emit("onInit",b)},b.cleanupStyles=function(){b.container.removeClass(b.classNames.join(" ")).removeAttr("style"),b.wrapper.removeAttr("style"),b.slides&&b.slides.length&&b.slides.removeClass([b.params.slideVisibleClass,b.params.slideActiveClass,b.params.slideNextClass,b.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),b.paginationContainer&&b.paginationContainer.length&&b.paginationContainer.removeClass(b.params.paginationHiddenClass),b.bullets&&b.bullets.length&&b.bullets.removeClass(b.params.bulletActiveClass),b.params.prevButton&&a(b.params.prevButton).removeClass(b.params.buttonDisabledClass),b.params.nextButton&&a(b.params.nextButton).removeClass(b.params.buttonDisabledClass),b.params.scrollbar&&b.scrollbar&&(b.scrollbar.track&&b.scrollbar.track.length&&b.scrollbar.track.removeAttr("style"),b.scrollbar.drag&&b.scrollbar.drag.length&&b.scrollbar.drag.removeAttr("style"))},b.destroy=function(e,a){b.detachEvents(),b.stopAutoplay(),b.params.scrollbar&&b.scrollbar&&b.params.scrollbarDraggable&&b.scrollbar.disableDraggable(),b.params.loop&&b.destroyLoop(),a&&b.cleanupStyles(),b.disconnectObservers(),b.params.zoom&&b.zoom&&b.zoom.destroy(),b.params.keyboardControl&&b.disableKeyboardControl&&b.disableKeyboardControl(),b.params.mousewheelControl&&b.disableMousewheelControl&&b.disableMousewheelControl(),b.params.a11y&&b.a11y&&b.a11y.destroy(),b.params.history&&!b.params.replaceState&&window.removeEventListener("popstate",b.history.setHistoryPopState),b.params.hashnav&&b.hashnav&&b.hashnav.destroy(),b.emit("onDestroy"),e!==!1&&(b=null)},b.init(),b}};t.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),i=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||i||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t<a.length;t++)if(a[t]in e)return!0}(),observer:function(){return"MutationObserver"in window||"WebkitMutationObserver"in window}(),passiveListener:function(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveListener",null,a)}catch(e){}return e}(),gestures:function(){return"ongesturestart"in window}()},plugins:{}};for(var s=(function(){var e=function(e){var a=this,t=0;for(t=0;t<e.length;t++)a[t]=e[t];return a.length=e.length,this},a=function(a,t){var s=[],i=0;if(a&&!t&&a instanceof e)return a;if(a)if("string"==typeof a){var r,n,o=a.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var l="div";for(0===o.indexOf("<li")&&(l="ul"),0===o.indexOf("<tr")&&(l="tbody"),0!==o.indexOf("<td")&&0!==o.indexOf("<th")||(l="tr"),0===o.indexOf("<tbody")&&(l="table"),0===o.indexOf("<option")&&(l="select"),n=document.createElement(l),n.innerHTML=a,i=0;i<n.childNodes.length;i++)s.push(n.childNodes[i])}else for(r=t||"#"!==a[0]||a.match(/[ .<>:~]/)?(t||document).querySelectorAll(a):[document.getElementById(a.split("#")[1])],i=0;i<r.length;i++)r[i]&&s.push(r[i])}else if(a.nodeType||a===window||a===document)s.push(a);else if(a.length>0&&a[0].nodeType)for(i=0;i<a.length;i++)s.push(a[i]);return new e(s)};return e.prototype={addClass:function(e){if("undefined"==typeof e)return this;for(var a=e.split(" "),t=0;t<a.length;t++)for(var s=0;s<this.length;s++)this[s].classList.add(a[t]);return this},removeClass:function(e){for(var a=e.split(" "),t=0;t<a.length;t++)for(var s=0;s<this.length;s++)this[s].classList.remove(a[t]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var a=e.split(" "),t=0;t<a.length;t++)for(var s=0;s<this.length;s++)this[s].classList.toggle(a[t]);return this},attr:function(e,a){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var t=0;t<this.length;t++)if(2===arguments.length)this[t].setAttribute(e,a);else for(var s in e)this[t][s]=e[s],this[t].setAttribute(s,e[s]);return this},removeAttr:function(e){for(var a=0;a<this.length;a++)this[a].removeAttribute(e);return this},data:function(e,a){if("undefined"!=typeof a){for(var t=0;t<this.length;t++){var s=this[t];s.dom7ElementDataStorage||(s.dom7ElementDataStorage={}),s.dom7ElementDataStorage[e]=a}return this}if(this[0]){var i=this[0].getAttribute("data-"+e);return i?i:this[0].dom7ElementDataStorage&&e in this[0].dom7ElementDataStorage?this[0].dom7ElementDataStorage[e]:void 0}},transform:function(e){for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransform=t.MsTransform=t.msTransform=t.MozTransform=t.OTransform=t.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e}return this},on:function(e,t,s,i){function r(e){var i=e.target;if(a(i).is(t))s.call(i,e);else for(var r=a(i).parents(),n=0;n<r.length;n++)a(r[n]).is(t)&&s.call(r[n],e)}var n,o,l=e.split(" ");for(n=0;n<this.length;n++)if("function"==typeof t||t===!1)for("function"==typeof t&&(s=arguments[1],i=arguments[2]||!1),o=0;o<l.length;o++)this[n].addEventListener(l[o],s,i);else for(o=0;o<l.length;o++)this[n].dom7LiveListeners||(this[n].dom7LiveListeners=[]),this[n].dom7LiveListeners.push({listener:s,liveListener:r}),this[n].addEventListener(l[o],r,i);return this},off:function(e,a,t,s){for(var i=e.split(" "),r=0;r<i.length;r++)for(var n=0;n<this.length;n++)if("function"==typeof a||a===!1)"function"==typeof a&&(t=arguments[1],s=arguments[2]||!1),this[n].removeEventListener(i[r],t,s);else if(this[n].dom7LiveListeners)for(var o=0;o<this[n].dom7LiveListeners.length;o++)this[n].dom7LiveListeners[o].listener===t&&this[n].removeEventListener(i[r],this[n].dom7LiveListeners[o].liveListener,s);return this},once:function(e,a,t,s){function i(n){t(n),r.off(e,a,i,s)}var r=this;"function"==typeof a&&(a=!1,t=arguments[1],s=arguments[2]),r.on(e,a,i,s)},trigger:function(e,a){for(var t=0;t<this.length;t++){var s;try{s=new window.CustomEvent(e,{detail:a,bubbles:!0,cancelable:!0})}catch(t){s=document.createEvent("Event"),s.initEvent(e,!0,!0),s.detail=a}this[t].dispatchEvent(s)}return this},transitionEnd:function(e){function a(r){if(r.target===this)for(e.call(this,r),t=0;t<s.length;t++)i.off(s[t],a)}var t,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],i=this;if(e)for(t=0;t<s.length;t++)i.on(s[t],a);return this},width:function(){return this[0]===window?window.innerWidth:this.length>0?parseFloat(this.css("width")):null},outerWidth:function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(e){return this.length>0?e?this[0].offsetHeight+parseFloat(this.css("margin-top"))+parseFloat(this.css("margin-bottom")):this[0].offsetHeight:null},offset:function(){if(this.length>0){var e=this[0],a=e.getBoundingClientRect(),t=document.body,s=e.clientTop||t.clientTop||0,i=e.clientLeft||t.clientLeft||0,r=window.pageYOffset||e.scrollTop,n=window.pageXOffset||e.scrollLeft;return{top:a.top+r-s,left:a.left+n-i}}return null},css:function(e,a){var t;if(1===arguments.length){if("string"!=typeof e){for(t=0;t<this.length;t++)for(var s in e)this[t].style[s]=e[s];return this}if(this[0])return window.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(t=0;t<this.length;t++)this[t].style[e]=a;return this}return this},each:function(e){for(var a=0;a<this.length;a++)e.call(this[a],a,this[a]);return this},html:function(e){if("undefined"==typeof e)return this[0]?this[0].innerHTML:void 0;for(var a=0;a<this.length;a++)this[a].innerHTML=e;return this},text:function(e){if("undefined"==typeof e)return this[0]?this[0].textContent.trim():null;for(var a=0;a<this.length;a++)this[a].textContent=e;return this},is:function(t){if(!this[0])return!1;var s,i;if("string"==typeof t){var r=this[0];if(r===document)return t===document;if(r===window)return t===window;if(r.matches)return r.matches(t);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector)return r.mozMatchesSelector(t);if(r.msMatchesSelector)return r.msMatchesSelector(t);for(s=a(t),i=0;i<s.length;i++)if(s[i]===this[0])return!0;return!1}if(t===document)return this[0]===document;if(t===window)return this[0]===window;if(t.nodeType||t instanceof e){for(s=t.nodeType?[t]:t,i=0;i<s.length;i++)if(s[i]===this[0])return!0;return!1}return!1},index:function(){if(this[0]){for(var e=this[0],a=0;null!==(e=e.previousSibling);)1===e.nodeType&&a++;return a}},eq:function(a){if("undefined"==typeof a)return this;var t,s=this.length;return a>s-1?new e([]):a<0?(t=s+a,new e(t<0?[]:[this[t]])):new e([this[a]])},append:function(a){var t,s;for(t=0;t<this.length;t++)if("string"==typeof a){var i=document.createElement("div");for(i.innerHTML=a;i.firstChild;)this[t].appendChild(i.firstChild)}else if(a instanceof e)for(s=0;s<a.length;s++)this[t].appendChild(a[s]);else this[t].appendChild(a);return this},prepend:function(a){var t,s;for(t=0;t<this.length;t++)if("string"==typeof a){var i=document.createElement("div");for(i.innerHTML=a,s=i.childNodes.length-1;s>=0;s--)this[t].insertBefore(i.childNodes[s],this[t].childNodes[0])}else if(a instanceof e)for(s=0;s<a.length;s++)this[t].insertBefore(a[s],this[t].childNodes[0]);else this[t].insertBefore(a,this[t].childNodes[0]);return this},insertBefore:function(e){for(var t=a(e),s=0;s<this.length;s++)if(1===t.length)t[0].parentNode.insertBefore(this[s],t[0]);else if(t.length>1)for(var i=0;i<t.length;i++)t[i].parentNode.insertBefore(this[s].cloneNode(!0),t[i])},insertAfter:function(e){for(var t=a(e),s=0;s<this.length;s++)if(1===t.length)t[0].parentNode.insertBefore(this[s],t[0].nextSibling);else if(t.length>1)for(var i=0;i<t.length;i++)t[i].parentNode.insertBefore(this[s].cloneNode(!0),t[i].nextSibling)},next:function(t){return new e(this.length>0?t?this[0].nextElementSibling&&a(this[0].nextElementSibling).is(t)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(t){var s=[],i=this[0];if(!i)return new e([]);for(;i.nextElementSibling;){var r=i.nextElementSibling;t?a(r).is(t)&&s.push(r):s.push(r),i=r}return new e(s)},prev:function(t){return new e(this.length>0?t?this[0].previousElementSibling&&a(this[0].previousElementSibling).is(t)?[this[0].previousElementSibling]:[]:this[0].previousElementSibling?[this[0].previousElementSibling]:[]:[])},prevAll:function(t){var s=[],i=this[0];if(!i)return new e([]);for(;i.previousElementSibling;){var r=i.previousElementSibling;t?a(r).is(t)&&s.push(r):s.push(r),i=r}return new e(s)},parent:function(e){for(var t=[],s=0;s<this.length;s++)e?a(this[s].parentNode).is(e)&&t.push(this[s].parentNode):t.push(this[s].parentNode);return a(a.unique(t))},parents:function(e){for(var t=[],s=0;s<this.length;s++)for(var i=this[s].parentNode;i;)e?a(i).is(e)&&t.push(i):t.push(i),i=i.parentNode;return a(a.unique(t))},find:function(a){for(var t=[],s=0;s<this.length;s++)for(var i=this[s].querySelectorAll(a),r=0;r<i.length;r++)t.push(i[r]);return new e(t)},children:function(t){for(var s=[],i=0;i<this.length;i++)for(var r=this[i].childNodes,n=0;n<r.length;n++)t?1===r[n].nodeType&&a(r[n]).is(t)&&s.push(r[n]):1===r[n].nodeType&&s.push(r[n]);return new e(a.unique(s))},remove:function(){for(var e=0;e<this.length;e++)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){var e,t,s=this;for(e=0;e<arguments.length;e++){var i=a(arguments[e]);for(t=0;t<i.length;t++)s[s.length]=i[t],s.length++}return s}},a.fn=e.prototype,a.unique=function(e){for(var a=[],t=0;t<e.length;t++)a.indexOf(e[t])===-1&&a.push(e[t]);return a},a}()),i=["jQuery","Zepto","Dom7"],r=0;r<i.length;r++)window[i[r]]&&e(window[i[r]]);var n;n="undefined"==typeof s?window.Dom7||window.Zepto||window.jQuery:s,n&&("transitionEnd"in n.fn||(n.fn.transitionEnd=function(e){function a(r){if(r.target===this)for(e.call(this,r),t=0;t<s.length;t++)i.off(s[t],a)}var t,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],i=this;if(e)for(t=0;t<s.length;t++)i.on(s[t],a);return this}),"transform"in n.fn||(n.fn.transform=function(e){for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransform=t.MsTransform=t.msTransform=t.MozTransform=t.OTransform=t.transform=e}return this}),"transition"in n.fn||(n.fn.transition=function(e){"string"!=typeof e&&(e+="ms");for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e;
}return this}),"outerWidth"in n.fn||(n.fn.outerWidth=function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=t}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper});
//# sourceMappingURL=maps/swiper.min.js.map
import App from '../App'
const home = r => require.ensure([], () => r(require('../views/home')), 'home')
const blank = r => require.ensure([], () => r(require('../views/blank')), 'blank')
const itemManager = r => require.ensure([], () => r(require('../views/education/item-manager.vue')), 'item-manager')
const itemComponent = r => require.ensure([], () => r(require('../views/education/item-component.vue')), 'item-component')
const createComponent = r => require.ensure([], () => r(require('../views/education/create-component.vue')),'create-component')
const roleManager = r => require.ensure([], () => r(require('../views/system/role.vue')),'role')
const addManager = r => require.ensure([], () => r(require('../views/education/add-manager.vue')), 'add-manager')
const itemRole = r => require.ensure([], () => r(require('../views/system/item-role.vue')), 'item-role')
const createPush = r => require.ensure([], () => r(require('../views/message/create-push.vue')), 'create-push')
const historyPush = r => require.ensure([], () => r(require('../views/message/history-push.vue')), 'history-push')
// 新增 策略管理、短信历史、黑名单、疲劳度控制
const strategyManage = r => require.ensure([], () => r(require('../views/message/strategy-manage.vue')), 'strategy-manage');
const msgHistory = r => require.ensure([], () => r(require('../views/message/msg-history.vue')), 'msg-history');
const blacklist = r => require.ensure([], () => r(require('../views/message/blacklist.vue')), 'blacklist');
const fatigueControl = r => require.ensure([], () => r(require('../views/message/fatigue-control.vue')), 'fatigue-control');
// const blacklist =
export default [{
path: '/',
component: App,
children: [
{
path: '',
redirect: '/create-push'
},{
path: '/index',
redirect: '/create-push'
},{
path: '/home',
// component: home
redirect: '/create-push'
},{
path: '/blank',
component: blank
},{
path: '/item-manager',
component: itemManager
},{
path: '/add-manager',
component: addManager
},{
path: '/item-component',
component: itemComponent
},{
path: '/role',
component: roleManager
},{
path: '/create-component',
component: createComponent
},{
path: '/item-role',
component: itemRole
},{
path: '/create-push',
component: createPush
},{
path: '/history-push',
component: historyPush
},{
path: '/strategy-manage',
component: strategyManage
},{
path: '/msg-history',
component: msgHistory
},{
path: '/blacklist',
component: blacklist
},{
path: '/fatigue-control',
component: fatigueControl
}
]
}]
\ No newline at end of file
const common = {
state: {
_token: '',
idType: '',
masterAdministratorFlag: false
},
mutations: {
CHANGE_TOKEN: (state, data) => {
state._token = data
},
CHANGE_IDTYPE: (state, data) => {
state.idType = data
},
CHANGE_MASTER: (state, data) => {
state.masterAdministratorFlag = data
}
},
actions: {
changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData)
},
changeIdType({ commit }, idTypeData) {
commit('CHANGE_IDTYPE', idTypeData)
},
changeMaster({ commit }, masterData) {
commit('CHANGE_MASTER', masterData)
}
}
}
export default common
\ No newline at end of file
const getters = {
_token: state => state.common._token,
idType: state => state.common.idType,
masterAdministratorFlag: state => state.common.masterAdministratorFlag
}
export default getters
import education from './education/getters'
import { containObject } from '../utils/utils'
const getters = containObject(education)
export default getters
\ No newline at end of file
import Vue from 'vue'
import Vuex from 'vuex'
import common from './education/common'
import getters from './getters'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
common
},
getters
})
img {
-webkit-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, li, a, p, h1, h2, h3, h4,h5, h6, i, b, textarea, button, input, select, figure, figcaption {
padding: 0;
margin: 0;
list-style: none;
font-style: normal;
text-decoration: none;
border: none;
// color: #333;
font-weight: normal;
font-family: "PingFangSC", "Microsoft Yahei";
box-sizing: border-box;
-webkit-tap-highlight-color:transparent;
-webkit-font-smoothing: antialiased;
// -webkit-overflow-scrolling : touch;
// overflow-scrolling : touch;
// overflow: auto;
&:hover{
outline: none;
}
}
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar
{
// width: 0px;
// height: 0px;
// background-color: #fff;
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
border-radius: 10px;
background-color: #fff;
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb
{
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #555;
}
input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] {
-webkit-appearance: none;
}
textarea { -webkit-appearance: none;}
html,body{
height: 100%;
width: 100%;
background-color: #fff;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
}
.clear:after{
content: '';
display: block;
clear: both;
}
.clear{
zoom:1;
}
.back_img{
background-repeat: no-repeat;
background-size: 100% 100%;
}
.margin{
margin: 0 auto;
}
.left{
float: left;
}
.right{
float: right;
}
.hide{
display: none;
}
.show{
display: block;
}
.ellipsis{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.paddingTop{
padding-top: 1.95rem;
}
@keyframes backOpacity{
0% { opacity: 1 }
25% { opacity: .5 }
50% { opacity: 1 }
75% { opacity: .5 }
100% { opacity: 1 }
}
.animation_opactiy{
animation: backOpacity 2s ease-in-out infinite;
}
// 屏幕适配
// @media screen and (min-width:1240px) and (max-width:1900px){
// .screenSet{
// // width: 163vh !important;
// // height: 66vh !important;
// // height: 430px !important;
// margin: 88px 30px 0px;
// overflow: auto;
// }
// }
// @media screen and (min-width:1900px){
// .screenSet{
// // width: 166vh !important;
// // height: 78vh !important;
// // height: 800px !important;
// overflow: auto;
// margin: 88px 30px 0px;
// }
// }
.word-size {
font-size: 12px;
}
// 字体大小
.el-form-item{
.el-form-item__label {
font-size: 12px;
}
}
// 表格分页
.pagination {
margin: 20px 0;
text-align: right;
.el-pagination {
white-space: nowrap;
padding: 2px 5px;
color: #303133;
font-weight: 700;
}
}
// 表格
.el-table thead th{
background: #fafafa;
}
//下拉框
.el-dropdown-menu .el-popper {
top: 48px;
}
// 消息推送
.el-notification.right {
top: 130px !important;
}
// 弹框按钮样式
.el-message-box {
width: 360px;
height: 160px;
.el-message-box__header {
text-align: center;
}
.el-message-box__status {
display: none;
}
.el-message-box__message {
text-align: center
}
.el-message-box__btns {
text-align: center !important;
button {
height: 32px;
width: 78px;
}
}
}
.el-button--primary {
line-height: 40px;
background: #449284 !important;
border: 1px solid #449284 !important;
}
.el-button.is-disabled {
background: #449284 !important;
border: 1px solid #449284 !important;
opacity: 0.5;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
background: #449284 !important;
}
// 主题样式修改
.el-radio__input.is-checked .el-radio__inner {
border-color: #449284 !important;
background: #449284 !important;
}
.el-radio__input.is-checked+.el-radio__label, .el-tabs__item.is-active {
color: #449284 !important;
}
// 面包屑导航
.el-breadcrumb__inner a, .el-breadcrumb__inner.is-link {
font-weight: 300 !important;
}
.el-breadcrumb__inner.is-link:hover {
color: #449284 !important;
}
// table的tooltip
.el-tooltip__popper {
max-width: 60%;
}
\ No newline at end of file
@import './common.scss';
//定位
.relative{
position: relative;
}
.flex{
display: flex;
}
.space-between{
display: flex;
justify-content: space-between;
}
.flex-start{
display: flex;
justify-content: flex-start;
}
.flex-end{
display: flex;
justify-content: flex-end;
}
.textLeft{
float: left;
}
.center{
text-align: center;
}
.mt10{
margin-top: 10px;
}
.mt20{
margin-top: 20px;
}
.mb10{
margin-bottom: 10px;
}
.mb20{
margin-bottom: 20px;
}
.pt10{
padding-top: 10px;
}
.pt20{
padding-top: 10px;
}
.pb10{
padding-bottom: 10px;
}
.pb20{
padding-bottom: 20px;
}
.mLR10{
margin: 0 10px;
}
.mLR20{
margin: 0 20px;
}
.mTB10{
margin: 10px 0;
}
.mTB20{
margin: 20px 0;
}
.pLR10{
padding: 0 10px;
}
.pLR20{
padding: 0 20px;
}
.pTB10{
padding: 10px 0;
}
.pTB20{
padding: 20px 0;
}
.fs10{
font-size: 10px;
}
.fs11{
font-size: 11px;
}
.fs12{
font-size: 12px;
}
.fs13{
font-size: 13px;
}
.fs14{
font-size: 14px;
}
.fs15{
font-size: 15px;
}
.fs16{
font-size: 16px;
}
.fs25{
font-size: 25px;
}
.fw{
font-weight: 600;
}
.bgWhite{
background-color: #fff;
}
.gray{
color: rgba(177, 181, 184, 1);
}
.white{
color: #fff;
}
.button-green {
color: #ffffff;
background: #449284;
border-color: #bfdad5;
border-radius: 2px;
}
.button-white {
color: #606266;
background: #ffffff;
border-color: #ecedf1;
border-radius: 2px;
}
$blue: #3190e8;
$bc: #e4e4e4;
$fc:#fff;
// 背景图片地址和大小
@mixin bis($url) {
background-image: url($url);
background-repeat: no-repeat;
background-size: 100% 100%;
}
@mixin borderRadius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
-o-border-radius: $radius;
border-radius: $radius;
}
//定位全屏
@mixin allcover{
position:absolute;
top:0;
right:0;
}
//定位上下左右居中
@mixin center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
//定位上下居中
@mixin ct {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
//定位左右居中
@mixin cl {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
//宽高
@mixin wh($width, $height){
width: $width;
height: $height;
}
//字体大小、行高、字体
@mixin font($size, $line-height, $family: 'Microsoft YaHei') {
font: #{$size}/#{$line-height} $family;
}
//字体大小,颜色
@mixin sc($size, $color){
font-size: $size;
color: $color;
}
//flex 布局和 子元素 对其方式
@mixin fj($type: space-between){
display: flex;
justify-content: $type;
}
// @function px2rem($px){
// $rem: 37.5px;
// @return ($px / $rem) + rem;
// }
\ No newline at end of file
/**
* 常量定义文件
*
*/
// 分页大小
export const PAGE_SIZE = 10
// 添加动作常量
export const ACTION_TYPE_ADD = 'ACTION_TYPE_ADD'
// 修改动作常量
export const ACTION_TYPE_UPDATE = 'ACTION_TYPE_UPDATE'
// 删除动作常量
export const ACTION_TYPE_DELETE = 'ACTION_TYPE_DELETE'
/* 是否使用Mock数据 */
export const IS_MOCK_DATAS = true
// 通用状态 全部/正常/停用
export const COMMON_STATUS_OPTIONS = [
{
value: '',
label: '启用状态'
}, {
value: 0,
label: '正常'
}, {
value: 1,
label: '停用'
}
]
// 识别状态 全部/未标记/正常/误识
export const RECORD_STATUS_OPTIONS = [
{
value: '',
label: '标记状态'
}, {
value: '0',
label: '未标记'
}, {
value: '1',
label: '正常'
}, {
value: '2',
label: '误识'
}
]
// 用户类型 全部/普通用户/VIP/黑名单
export const USER_TYPE_OPTIONS = [
{
value: '',
label: '用户类型'
}, {
value: 1,
label: '普通用户'
}, {
value: 2,
label: 'VIP'
}, {
value: 3,
label: '黑名单'
}
]
/**
* 环境变量配置文件
*/
export const envConfig = {
development: {
// baseUrl: 'https://dev-sc.yunqueyi.com/',
// // baseUrl: 'http://10.177.15.180:10202/',
// // baseUrl: 'http://192.168.140.14:10201/',
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
innerLoginUrl: 'http://localhost:8080/PICA_SSO_FE/html/pica_login.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
excelUrl: 'https://dev-sc.yunqueyi.com/raytheon/excel/template/1',
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
excelUrl: 'https://dev-sc.yunqueyi.com/raytheon/excel/template/1',
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
qiniuFileUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
excelUrl: 'https://test1-sc.yunqueyi.com/raytheon/excel/template/1',
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/',
qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://video.yunqueyi.com", // 视频
qiniuImgUrl: "https://files.yunqueyi.com",
loginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html',
excelUrl: 'https://uat-sc.yunqueyi.com/raytheon/excel/template/1',
},
pro: {
baseUrl: 'https://sc.yunqueyi.com/',
qiniuFileUrl: "https://sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://video.yunqueyi.com",
qiniuImgUrl: "https://files.yunqueyi.com",
loginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html',
excelUrl: 'https://sc.yunqueyi.com/raytheon/excel/template/1',
}
}
//api路径
import {isNotEmptyUtils} from "./utils";
export default async(url = '', data = {}, type = 'POST', method = 'fetch',server='CONTENT') => {
type = type.toUpperCase();
// url = (server==='WECHAT'?wechatUrl:baseUrl) + url;
if (url.match("^http") == null){
url = localStorage.getItem("Url") + url;
}
console.log("完整url:",url)
if (type == 'GET' && data) {
let dataStr = ''; //数据拼接字符串
Object.keys(data).forEach(key => {
dataStr += key + '=' + data[key] + '&';
})
if (dataStr !== '') {
dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
url = url + '?' + dataStr;
// url = encodeURI(url + '?' + dataStr, true);
}
}
if (window.fetch && method == 'fetch') {
let requestConfig = {
credentials: 'include',
method: type,
// mode: "cors",
headers: {
// 'Access-Control-Allow-Origin': '*',
'Accept': '*',
'Content-Type': 'application/json',
'sysCode':'2'
// 'token': localStorage.getItem('token') || null, //固定传header:
// 'system_code': 'todo' //固定传header:系统编号
},
}
if (type == 'POST' || type === 'PUT' || type === 'PATCH' || type === 'DELETE' && data) {
Object.defineProperty(requestConfig, 'body', {
value: JSON.stringify(data)
})
}
try {
const response = await fetch(url, requestConfig);
const responseJson = await response.json();
return responseJson
} catch (error) {
throw new Error(error)
}
} else {
return new Promise((resolve, reject) => {
let requestObj;
if (window.XMLHttpRequest) {
requestObj = new XMLHttpRequest();
} else {
requestObj = new ActiveXObject;
}
let sendData = '';
if (type == 'POST' || type == 'DELETE' || type == 'PUT') {
sendData = JSON.stringify(data);
}
requestObj.open(type, url, true);
requestObj.setRequestHeader("Content-Type", "application/json");
requestObj.setRequestHeader("sysCode", "3");
requestObj.send(sendData);
requestObj.onreadystatechange = () => {
if (requestObj.readyState == 4) {
if (requestObj.status == 200) {
let obj = requestObj.response
if (typeof obj !== 'object' && isNotEmptyUtils(obj)) {
obj = JSON.parse(obj);
}
resolve(obj)
} else {
reject(requestObj)
}
}
}
})
}
}
import axios from 'axios'
import store from '../store'
// import { getHostnameAndPort } from '../utils'
// axios.defaults.withCredentials = true
const service = axios.create({
// baseURL: process.env.BASE_API
timeout: 600000,
withCredentials: false
})
// request拦截器
service.interceptors.request.use(config => {
config.headers['sysCode'] = 12
config.headers['token'] = localStorage.getItem('storageToken')
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
// if (config.data && config.data.setEntry) {
// config.headers['sysCode'] = config.data.sysCode || 10
// if(config.data.token){
// config.headers['token'] = config.data.token || '63C3FA92AF8A45A48B31EB7FD97B95EB'
// }
// config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
// }
return config
}, error => {
// logger.debug('service.interceptors.request: ', error)
Promise.reject(error)
})
// respone拦截器
service.interceptors.response.use(
response => {
const res = response.data
/*
baseUrl时,返回000000为成功
apiUrl时,返回200为成功
*/
// if (res.code !== '000000') {
// return Promise.reject('error')
// } else {
return response.data
// }
},
error => {
// logger.error('err' + error)
return Promise.reject(error)
}
)
export default service
const vueFilter = {
dateFilter: (value) => {
if (!value) return '';
return new Date(value).format("yyyy-MM-dd hh:mm:ss");
},
getPushWay: (value) => {
if (value == 1) {
return '模板推送'
} else if (value == 2) {
return '手动推送'
}
},
getPushStatus: (value) => {
if (value == 1) {
return '推送中'
} else if (value == 2) {
return '推送完成 '
} else if (value == 3) {
return '任务中断'
}
},
getToValue: (value) => {
let toValue = value.toCount + ' | ' + Math.round(value.toProportion*10000)/10000 + '%';
return toValue;
},
getClickValue: (value) => {
let clickValue = value.clickCount + ' | ' + Math.round(value.clickProportion*10000)/10000 + '%';
return clickValue;
},
getFailedValue: (value) => {
let failedValue = value.failedCount + ' | ' + Math.round(value.failedProportion*10000)/10000 + '%';
return failedValue;
},
getNotice: (value) => {
if (value == 1) {
return '否'
} else if (value == 2) {
return '是'
}
},
}
export default vueFilter
\ No newline at end of file
/**
* Created by Anndy Yang on 18/09/18.
*/
import { envConfig } from '@/utils/env-config'
export function setEventByModuleCode(itemData){
let modeCode = itemData.appModuleInfo.code || '';
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if( modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
}else if( modeCode === 'M100' || modeCode === 'M300' ) {
let urlPara = getUrlParmByCode(paramList);
paramList[0] && (paramList[0].value += urlPara);
}else if( modeCode === 'M400') {
let path = paramList[0]['key'];
let v = paramList[0]['value'];
let query = setRouterParm(paramList);
}
if(typeof paramList === 'string' && !paramList){
paramList = []
}
return paramList;
}
function getUrlParmByCode(paramList) {
if ( paramList.length <= 1) {
return ''
}
let dataStr = ''
let list = [];
for( let i = 1; i < paramList.length; i ++) {
list.push(paramList[i].key + '=' + paramList[i].value)
}
dataStr = list.join('&')
if (dataStr !== '') {
return '?' + dataStr
}
return ''
}
// 计算高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'sidebarWrapperId',
containerHeightId = 'appContainerId', innerHeightId = 'elTableId'){
if (!p_getElm(refHeightId) || !p_getElm(containerHeightId) || !p_getElm(innerHeightId)) {
// window.onresize = null
logger.warn('No certain dom id!!!');
}
let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if(p_getElm('elTableIdInner')){
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
window.onresize = function() {
containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if (p_getElm('elTableIdInner')) {
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
}
}
function p_getElm(elmId) {
return document.getElementById(elmId)
}
export function deepCopy(obj) {
var result = Array.isArray(obj) ? [] : {};
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
if (typeof obj[key] === 'object') {
result[key] = deepCopy(obj[key]); //递归复制
} else {
result[key] = obj[key];
}
}
}
return result;
}
/**
*
* @param {Array} originData 初始数据
* @param {Boolean} isUp true: 升序 false: 降序
* @param {String} sortField 排序字段,如果没有,则直接排序
* @param {Function} converFun 字段对应的数值转换函数
*/
export function arraySort(originData, isUp = true, sortedField, converFun) {
// debugger
let sortedData = originData.slice(), swap, sourceA, sourceB;
for(let i = 0; i < sortedData.length - 1; i ++) {
for(let j = 0; j < sortedData.length - i -1; j++) {
sourceA = sortedData[j]
sourceB = sortedData[j + 1]
if(sortedField && !converFun) {
sourceA = sourceA[sortedField]
sourceB = sourceB[sortedField]
} else if(sortedField && converFun && typeof converFun === 'function'){
if(!sourceA[sortedField] || !sourceB[sortedField]) {
sourceA = 0
sourceB = 0
} else {
sourceA = converFun(sourceA[sortedField])
sourceB = converFun(sourceB[sortedField])
}
}
// if(!sourceA || !sourceB) {
// sourceA = 0
// sourceB = 0
// }
if(isUp) {
if((sourceA - 0) > (sourceB - 0)) {
swap = sortedData[j]
sortedData[j] = sortedData[j + 1]
sortedData[j + 1] = swap
}
} else {
if((sourceA - 0) < (sourceB - 0)) {
swap = sortedData[j]
sortedData[j] = sortedData[j + 1]
sortedData[j + 1] = swap
}
}
}
}
return sortedData
}
export function sortParmData(originData, orderCol, index) {
return originData.sort((a, b) => {
return (a[orderCol] - b[orderCol] ) * -1
})
}
// 获取SC服务器域名地址
export function getBaseUrl(url) {
return getConfigByEnvType('baseUrl') + url
}
// 获取七牛token
export function getQiniuToken1() {
return getConfigByEnvType('qiniuFileUrl')
}
// 登录URL
export function getLoginUrl(param) {
return getConfigByEnvType('loginUrl') + param
}
export function getInnerLoginUrl() {
return getConfigByEnvType('innerLoginUrl')
}
// 云鹊医首页
export function getYunQueYiUrl() {
return getConfigByEnvType('yuequeyiIndexUrl')
}
// 七牛上传视频和图片
export function uploadVideo() {
return getConfigByEnvType('qiniuResourceUrl')
}
export function uploadImg() {
return getConfigByEnvType('qiniuImgUrl')
}
// Excel模板地址
export function getExcel() {
return getConfigByEnvType('excelUrl')
}
// 根据不同环境,生成URL
function getConfigByEnvType(urlType) {
return envConfig[process.env.BUILD_ENV][urlType]
}
import fetch from '@/utils/fetch'
import { getBaseUrl } from '@/utils/index'
module.exports = {
data: function () {
return {
token: null
}
},
created: function () {
// let query = this.$router.query
// this.token = this.getUrlSearch(location.href, 'token') || (query && query.token) || null
// this.token = this.getUrlKey('token') || (query && query.token) || null
},
mounted: function() {
},
methods: {
getUrlPara(obj) {
let dataStr = ''
let list = [];
for (let attr in obj) {
if (obj.hasOwnProperty(attr) && attr != 'data') {
list.push(attr + '=' + obj[attr])
}
}
dataStr = list.join('&')
if (dataStr !== '') {
return '?' + dataStr
}
return ''
},
setRouterParm(paramList){
let parm = {};
if(paramList.length<=1){
return '';
}
for(let i=1;i<paramList.length;i++){
parm[paramList[i].key] = paramList[i].value;
}
return parm;
},
// 拼接多个参数
getUrlParmByCode(paramList) {
if ( paramList.length <= 1) {
return ''
}
let dataStr = ''
let list = [];
for( let i = 1; i < paramList.length; i ++) {
list.push(paramList[i].key + '=' + paramList[i].value)
}
dataStr = list.join('&')
if (dataStr !== '') {
return '?' + dataStr
}
return ''
},
//处理五分钟数据 初始化播放状态
handelFive(d) {
for (let i = 0; i < d.length; i++) {
d[i].play = '0';
}
return d;
},
// 根据条件排序
async searchForOrder(searchCategory = '1', searchValue = '', sortItem = 1, pageSize = 10, sourceData = []) {
if(pageSize <=0 ) return;
let str2 = (searchValue || '').replace(/[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]/g, '');// 去掉特殊字符
let _this = this,
para = {
searchCategory: searchCategory,
searchValue: str2,
keywordColor: 'rgba(244,122,72,1)',
sortItem: sortItem,
pageNo: 1,
pageSize: pageSize,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
let csourceData = await this.GET(url, para).then(res => {
// _this.searchText = ''
if (res.code == '000000') {
// 课程
if(searchCategory.indexOf('1') >= 0) {
sourceData = (res.data && res.data.contentAppModels) || []
}
if(searchCategory.indexOf('2') >= 0) {
// sourceData = []
sourceData = this.handelFive(res.data.fiveMinutesMedicalContentList || [])
}
if(searchCategory.indexOf('3') >= 0) {
sourceData = (res.data && res.data.pCourseDoctorModels) || []
}
if(searchCategory.indexOf('4') >= 0) {
sourceData = res.data.educationContents
}
}
return sourceData || []
})
return csourceData
},
setEventByModuleCode(itemData){
let modeCode = itemData.appModuleInfo.code || '';
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if( modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
}else if( modeCode === 'M100' || modeCode === 'M300' ) {
// 支持多个参数
let urlPara = this.getUrlParmByCode(paramList);
if(paramList[0]){
if( paramList[0].value.indexOf("?") == -1){
paramList[0].value += urlPara
}
}
} else if (modeCode === 'M400') {
debugger
let path = paramList[0]['key'];
let v = paramList[0]['value'];
let query = this.setRouterParm(paramList);
paramList = [{
url:v,
query:query
}]
this.$router.push({
path: v,
query: query
})
//alert(this.token);
return 'NO'
}
if(typeof paramList === 'string' && !paramList){
paramList = []
}
return paramList;
},
// 通用GET请求
GET(api, para, callback,str) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
let url = api + this.getUrlPara(para)
url = encodeURI(url);
return fetch({
url: getBaseUrl(url),
method: 'get',
data: para
})
},
// 通用DELETE请求
DELETE(api, para, callback,str) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
let url = api + this.getUrlPara(para)
return fetch({
url: getBaseUrl(url),
method: 'delete',
data: para
})
},
// 通用POST请求
POST(api, para, callback) {
// para.token = para.token || this.token || "343BCABC890349ACAF357FA79122F9FE"
return fetch({
url: getBaseUrl(api),
method: 'post',
data: para
})
},
// 从html参数
getUrlKey(name) {
if (decodeURIComponent && location.href) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
} else {
return null
}
},
getUrlSearch(url, name) {
if (typeof name == 'undefined') {
name = url
url = location.href
}
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = url.slice(url.indexOf('?') + 1).match(reg);
if (r != null) {
try {
return decodeURIComponent(r[2]);
} catch (_e) {
return null
}
}
return null
}
}
}
let tableOrganization = [{
name: "上海市第一人民医院",
grade: "一甲医院",
province: "上海市",
city: "上海市",
district: "浦东新区",
street: "张江街道"
}, {
name: "上海市第二人民医院",
grade: "二甲医院",
province: "上海市",
city: "上海市",
district: "浦东新区",
street: "张江街道"
}, {
name: "上海市第三人民医院",
grade: "三甲医院",
province: "上海市",
city: "上海市",
district: "浦东新区",
street: "张江街道"
}];
let tablePerson = [{
name: "云小鹊",
hospital: "上海市第一人民医院",
department: "全科",
province: "上海市",
city: "上海市",
district: "浦东新区"
}, {
name: "云小鹊",
hospital: "上海市第二人民医院",
department: "全科",
province: "上海市",
city: "上海市",
district: "长宁区"
}, {
name: "云小鹊",
hospital: "上海市第三人民医院",
department: "全科",
province: "上海市",
city: "上海市",
district: "南汇区"
}];
let treeData = [
{
id: 11,
name: "一级 1",
label: "一级 1",
isLeaf: "true",
children: [
{
id: 1,
label: "一级 1",
isLeaf: "true",
children: [
{
id: 4,
label: "二级 1-1",
children: [
{
id: 9,
label: "三级 1-1-1"
},
{
id: 10,
label: "三级 1-1-2"
}
]
}
]
},
{
id: 2,
label: "一级 2",
children: [
{
id: 5,
label: "二级 2-1",
children: [],
},
{
id: 6,
label: "二级 2-2",
isLeaf: false,
}
]
},
{
id: 4,
label: "一级 4",
isLeaf: false,
},
{
id: 3,
label: "一级 3",
children: [
{
id: 7,
label: "二级 3-1"
},
{
id: 8,
label: "二级 3-2"
}
]
}
]
}
];
// 按钮type类型: 0-编辑
// 1-暂存 2-完成 3-上架 4-通过 5-下架 6-拒绝
// 7- 提醒审核 8(2)-取消审核 9-删除
let buttonStatusIn = [
//L1 内部管理员 L2项目负责人 L3次级负责人
//草稿
{ L1: "09", L2: "", L3: "" },
//未上架
{ L1: "039", L2: "039", L3: "0" },
//待审核、审批中
{ L1: "46", L2: "78", L3: "" },
//已上架
{ L1: "05", L2: "05", L3: "0" },
//已下架
{ L1: "039", L2: "039", L3: "0" },
//已拒绝/未上架
{ L1: "039", L2: "039", L3: "0" },
];
let buttonStatusOut = [
//L1 内部管理员 L2项目负责人 L3次级负责人
//草稿
{ L1: "", L2: "09", L3: "" },
//未上架
{ L1: "09", L2: "039", L3: "0" },
//待审核、审批中
{ L1: "46", L2: "78", L3: "" },
//已上架
{ L1: "05", L2: "05", L3: "0" },
//已下架
{ L1: "039", L2: "039", L3: "0" },
//已拒绝/未上架
{ L1: "09", L2: "039", L3: "0" },
];
export function returnData() {
let data = {};
data.tableOrganization = tableOrganization;
data.tablePerson = tablePerson;
data.treeData = treeData;
data.buttonStatusIn = buttonStatusIn;
data.buttonStatusOut = buttonStatusOut;
return data;
}
\ No newline at end of file
//求并集
export function getUnion(a, b) {
if (a.constructor === Array && b.constructor === Array) {
let set1 = new Set(a);
let set2 = new Set(b);
return Array.from(new Set([...set1, ...set2]));
}
return null;
}
//求差集
export function getDifference(a, b) {
if (a.constructor === Array && b.constructor === Array) {
let set1 = new Set(a);
let set2 = new Set(b);
return Array.from(new Set([...set1].filter(x => !set2.has(x))));
}
return null;
}
//求交集
export function getIntersect(a, b) {
if (a.constructor === Array && b.constructor === Array) {
let set1 = new Set(a);
let set2 = new Set(b);
return Array.from(new Set([...set1].filter(x => set2.has(x))));
}
return null;
}
//获取id的list
export function getIdList(data) {
let list = [];
if(typeof data === 'undefined') {
return list;
}
if (data.constructor === Array) {
for (let i = 0; i < data.length; i++) {
list.push(data[i].id);
}
}
return list;
}
//区域
export function getDivision(data) {
if (data === null || data == 'NaN') {
let empty = [];
return empty;
}
let list = data.split('|');
let num = [];
for (let i = 0; i < list.length; i++) {
num[i] = parseInt(list[i]);
}
//console.log(list);
return num;
}
export function getLevelList(data) {
let level = [];
level[0] = {
id: '-1',
label: '全部医院等级',
}
for (let i = 0; i < data.length; i++) {
let obj = {
id: data[i].no,
label: data[i].value,
}
level.push(obj);
}
//console.log(level);
return level;
}
function inTags(id, tags) {
let flag = false;
for (let i = 0; i < tags.length; i++) {
if (tags[i].key == id) {
flag = true;
}
}
return flag;
}
export function inOrganization(list, id) {
let flag = false;
if (list.length == 0) {
flag = true;
}
for (let i = 0; i < list.length; i++) {
if (list[i].id != id) {
flag = true;
}
}
return flag;
}
export function initTags(value) {
let tags = [];
for (let j = 0; j < value.length; j++) {
let tagsComponent = {};
tagsComponent.value = value.value;
tagsComponent[j].name = this.optionsComponent[j].label;
}
return tags;
}
//机构列表
export function getOrganizationList(data) {
let list = [];
list[0] = {
value: '0',
label: '全部机构',
};
for (let i = 0; i < data.length; i++) {
let obj = {
value: data[i].key,
label: data[i].name,
}
list.push(obj);
}
return list;
}
//机构列表
export function getHospitalList(data) {
let list = [];
list[0] = {
value: 0,
label: '全部医院',
};
for (let i = 0; i < data.length; i++) {
let obj = {
value: data[i].id,
label: data[i].name,
}
list.push(obj);
}
//console.log(list);
return list;
}
//拼树
export function changeTags(option) {
let list = [];
// for(let i=0;i<option.length;i++) {
// console.log(option[i].label);
// let obj = {
// name: option[i].name,
// key: option[i].key,
// }
// list.push(obj);
// }
console.log(option);
return option;
}
// 递归删除多余的节点
function handlerAction(treeData, selData) {
treeData.forEach((elem, index) => {
if (!isValuable(elem.value, selData)) {
treeData.splice(index, 1)
handlerAction(treeData, selData)
} else {
if (elem.children) {
handlerAction(elem.children, selData)
}
}
})
return treeData;
}
function isValuable(val, selData) {
for (let i = 0; i < selData.length; i++) {
if (selData[i]['value'].indexOf(val) >= 0) {
return true
}
}
return false
}
function changeTreeKey(oData, orgKey, targetKey) {
oData = [...oData]
oData.forEach(elem => {
elem[targetKey] = elem[orgKey]
delete elem[orgKey]
if (elem.children) {
changeTreeKey(elem.children, orgKey, targetKey)
}
})
return oData
}
function deleteTreeKey(oData, delKeys) {
oData = [...oData]
oData.forEach(elem => {
delKeys.forEach(key => {
delete elem[key]
})
if (elem.children) {
deleteTreeKey(elem.children, delKeys)
}
})
return oData
}
function deleteEmptyChild(oData) {
oData = [...oData]
oData.forEach(elem => {
if (elem.children && elem.children.length == 0) {
delete elem.children
} else if (elem.children) {
deleteEmptyChild(elem.children)
}
})
return oData
}
function addEmpty(data) {
let after = [];
after[0] = {
label: "全部地区",
value: "0",
}
for(let i=0;i<data.length;i++) {
after.push(data[i]);
}
return after;
}
export function treeHandler(treeData, selData) {
//console.log('treeData',treeData,'selData',selData);
treeData = deleteTreeKey(treeData, ['status', 'disabled'])
treeData = changeTreeKey(treeData, 'id', 'value')
selData = changeTreeKey(selData, 'name', 'label')
selData = changeTreeKey(selData, 'key', 'value')
let endData = deleteEmptyChild(handlerAction(treeData, selData));
// console.log(treeData, selData)
//return handlerAction(treeData, selData);
let returnData = addEmpty(endData);
return returnData;
}
//小生态
export function getEcologyList() {
let dataList = [{
id: '123',
name: '上海第一人民医院',
hospitalLevelName: '二甲医院',
provinceName: '上海市',
cityName: '上海市',
countyName: '浦东新区',
townName: '--',
},{
id: '124',
name: '上海第二人民医院',
hospitalLevelName: '二甲医院',
provinceName: '上海市',
cityName: '上海市',
countyName: '浦东新区',
townName: '--',
},{
id: '125',
name: '上海第三人民医院',
hospitalLevelName: '二甲医院',
provinceName: '上海市',
cityName: '上海市',
countyName: '浦东新区',
townName: '--',
}]
return dataList;
}
export function getEcologySelect (data) {
// let ecologyist = [{
// label: '上海小生态',
// value: '1',
// },{
// label: '北京小生态',
// value: '2',
// }];
let ecologyist = [];
for(let i=0;i<data.length;i++) {
let obj = {
label: data[i].name,
value: data[i].id,
}
ecologyist.push(obj);
}
return ecologyist;
}
\ No newline at end of file
import {isEmptyUtils, isNotEmptyUtils, subString} from "./utils";
import fetchQiniu from './fetch-qiniu.js';
import { getQiniuToken1, uploadVideo, uploadImg } from './index'
let fileApiUrl = getQiniuToken1()
//该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
let subscription = null;
//上传返回结果
let result = {
key: null,//文件保存在空间中的资源名
path: null,//保存到db的路径(不带域名)
fullPath: null,//文件网络路径(文件url)
size: null,//资源尺寸,单位为字节
name: null,//原始文件名
ext: null//上传资源的后缀名,通过自动检测的mimeType 或者原文件的后缀来获取
};
//上传状态
// var status = false;
//FIXME 请注意vue里面不要使用全局变量
let domain = uploadVideo() // 视频
let domain1 = uploadImg() // 图片
let errorCode = new Map([
[298,'部分操作执行成功'],
[400,'请求报文格式错误'],
[401,'认证授权失败'],
[403,'权限不足,拒绝访问。'],
[404,'资源不存在'],
[405,'请求方式错误'],
[406,'上传的数据 CRC32 校验错误'],
[413,'请求资源大小大于指定的最大值'],
[419,'用户账号被冻结'],
[478,'镜像回源失败'],
[502,'错误网关'],
[503,'服务端不可用'],
[504,'服务端操作超时'],
[573,'单个资源访问频率过高'],
[579,'上传成功但是回调失败'],
[599,'服务端操作失败'],
[608,'资源内容被修改'],
[612,'指定资源不存在或已被删除'],
[614,'目标资源已存在'],
[630,'已创建的空间数量达到上限,无法创建新空间。'],
[631,'指定空间不存在'],
[640,'调用列举资源(list)接口时,指定非法的marker参数。'],
[701,'在断点续上传过程中,后续上传接收地址不正确或ctx信息已过期。']
]);
let qiniuErrorCheck = function (code) {
errorCode.forEach(function (value, key, map) {
if (code === key){
console.error(key+':'+value)
}
})
}
//用来限制上传文件类型,为 null 时表示不对文件类型限制;限制类型放到数组里: ["image/png", "image/jpeg", "image/gif"]
let mimeTypeArray = null;
export const createFilePath = (file, fileName) => {
if (isEmptyUtils(file)) {
return null;
}
let arr = fileName.split('_');
if(arr.length != 4){
alert('上传视频文件名格式不正确');
return null;
}
let arr4 = arr[3].split('.');
//文件全路径(文件路径 + 文件名) 扩展名​/年/月/日/
let filePath = arr[0] + "/" + arr[1] + "/" + arr[2] + "_" + arr4[0] + '.'+arr4[1];
console.log(filePath);
return filePath;
};
/**
* 获取七牛上传凭证
*
* @return {Promise} token 七牛上传凭证
* */
const doQiniuAction1 = (fileType) => {
console.log('send---'+fileApiUrl);
return new Promise(function (resolve, reject) {
// if(isEmptyUtils(localStorage.getItem('qiniuToken'))){
fetchQiniu(fileApiUrl, {"fileType": fileType}, 'GET').then(function (result) {
let token = null;
if (isNotEmptyUtils(result) && result.code == "000000") {
token = result.data.qiniuToken;
resolve(token);
console.log('七牛临时授权成功');
localStorage.setItem('qiniuToken',token);
} else {
reject(result);
console.error('七牛临时授权失败:', result);
}
}).catch(function (error) {
reject();
console.error('七牛临时授权失败:', error);
});
// }else{
// console.log('从localStorage获取token:'+localStorage.getItem('qiniuToken'))
// resolve(localStorage.getItem('qiniuToken'));
// }
});
};
/**
*
* @param self
* @param file
* @param filePath
* @param previewId
* @param progressId
* @returns {Promise}
*/
export const qiniuUpload = (self, file, filePath, previewId, progressId) => {
// var deferred = $q.defer();
return new Promise(function (resolve, reject) {
if (isEmptyUtils(file) || isEmptyUtils(filePath)) {
console.error('七牛上传失败:非法参数');
reject();
}
let key = filePath ? filePath : getFilePath(file);
//修改状态为上传
self.qiniuUploadStatus = true;
// let token = "BRVB4TpxVFA5Wo6lIpfltmWKOltzGar46tvC3BlR:UHn0LDElwjP4jEZTXdq_1qV6_hw=:eyJzY29wZSI6InBpY2EtdGVzdCIsInJldHVybkJvZHkiOiJ7XCJrZXlcIjpcIiQoa2V5KVwiLFwiaGFzaFwiOlwiJChldGFnKVwiLFwiYnVja2V0XCI6XCIkKGJ1Y2tldClcIixcImZzaXplXCI6JChmc2l6ZSksXCJmbmFtZVwiOiQoZm5hbWUpLFwiZXh0XCI6JChleHQpfSIsImRlYWRsaW5lIjoxNTI5NDk0MTc1fQ==";
doQiniuAction().then(function (token) {
let putExtra = {
fname: file.name, //原文件名
params: {}, //用来放置自定义变量
mimeType: mimeTypeArray || null //null || array,用来限制上传文件类型,为 null 时表示不对文件类型限制;限制类型放到数组里: ["image/png", "image/jpeg", "image/gif"]
};
let config = {
useCdnDomain: true, //表示是否使用 cdn 加速域名,为布尔值,true 表示使用,默认为 false。
region: null //选择上传域名区域;当为 null 或 undefined 时,自动分析上传域名区域
};
/*
* qiniu.upload 返回一个 observable 对象用来控制上传行为,observable 对像通过 subscribe 方法可以被 observer 所订阅,
* 订阅同时会开始触发上传,同时返回一个 subscription 对象,该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
* */
let observable = qiniu.upload(file, key, token, putExtra, config);
/**
* 接收上传进度信息,res 参数是一个带有 total 字段的 object,包含loaded、total、percent三个属性,提供上传进
* total.loaded: number,已上传大小,单位为字节。
* total.total: number,本次上传的总量控制信息,单位为字节,注意这里的 total 跟文件大小并不一致。
* total.percent: number,当前上传进度,范围:0~100
* */
let next = function (res) {
//res值{"total":{"loaded":18184,"size":18185,"percent":99.99450096233159}}
//获取百分比进度
let progress = res.total.percent.toFixed(2);
self.uploadProgress = Number(progress);
console.log('Progress: ' + progress);
//如果有进度条
/*if (isNotEmptyUtils(progressId)) {
let obj = $("#" + progressId);
//开始上传时,显示进度条
if (isNotEmptyUtils(obj.parent())) {
//修改状态为上传
// status = true;
self.qiniuUploadStatus = true;
obj.parent().removeClass("hidden");
obj.fadeIn("fast");
}
obj.css("width", progress + '%');
obj.text(progress + '%');
//上传完成,2秒后淡出进度条
if (progress === "100.00") {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = true;
obj.fadeOut(2000);
}
}*/
};
/**
* 接收上传完成后的后端返回信息,res 参数为一个 object, 为上传成功后后端返回的信息
* ,具体返回结构取决于后端sdk的配置,可参考上传策略(https://developer.qiniu.com/kodo/manual/1206/put-policy)
* */
let complete = function (res) {
console.log("七牛上传完成");
setTimeout(function(){
result.key = res.key;
result.path = '/' + res.key;
result.fullPath = domain + '/' + res.key + '?v=' + new Date().getTime();
result.size = res.fsize;
result.name = res.fname ;
result.ext = res.ext;
// deferred.resolve(result);
resolve(result);
// self.model.qCloudUrl = result.fullPath;
// $("#introVideoLecture").attr("src", self.model.qCloudUrl);
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false;
if (isNotEmptyUtils(previewId)) {
let address = domain + result.path;
console.log('文件路径: ' + address);
//显示图片
let $img = $('<img>').attr("src", address);
let obj = $("#" + previewId);
obj.empty().append($img);
obj.css('max-width', '100%');
}
},2000);
};
/**
* 上传错误后触发,当不是 xhr 请求错误时,会把当前错误产生原因直接抛出,诸如 JSON 解析异常等;当产生 xhr 请求错误时,参数 err 为一个包含 code、message、isRequestError 三个属性的 object:
* err.isRequestError: 用于区分是否 xhr 请求错误;当 xhr 请求出现错误并且后端通过 HTTP 状态码返回了错误信息时,该参数为 true;否则为 undefined 。
* err.reqId: string,xhr请求错误的 X-Reqid。
* err.code: number,请求错误状态码,只有在 err.isRequestError 为 true 的时候才有效,可查阅码值对应说明。
* err.message: string,错误信息,包含错误码,当后端返回提示信息时也会有相应的错误信息。
* */
let error = function (err) {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false
localStorage.removeItem('qiniuToken');
console.log("七牛上传失败,详细信息请参考:https://developer.qiniu.com/kodo/api/3928/error-responses");
//输出简略错误信息
if (err.isRequestError){
qiniuErrorCheck(err.code)
}else {
console.error(err);
}
/*modalClick("提示", "上传失败!", "确定", function () {
$('#model-modify').modal('hide');
}, "", null);*/
// deferred.reject(new Error('七牛上传失败'));
// return deferred.promise;
return reject(new Error('七牛上传失败'));
};
// 上传开始
subscription = observable.subscribe(next, error, complete);
});
// return deferred.promise;
});
};
/**
* 获取时间戳
* @param {Date} [date]日期对象,为空时,返回当前时间戳
* @return {String} timeStamp时间戳 格式:yyyyMMddhhmmssS
*/
const timeStamp = (date) => {
if (isEmptyUtils(date)) {
return new Date().format('yyyyMMddhhmmssS');
}
return date.format('yyyyMMddhhmmssS');
}
/**
* 获取全局唯一标识符(GUID,Globally Unique Identifier)
* @return {String} guid
*/
const guid = () => {
/**
* @return {String}
*/
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
};
/**
* 文件重命名--七牛图片 2018 11
* @param {File} [file] 上传文件对象
* @param {String} [fileName] 指定文件名
* @param {String} [folder] 指定文件夹
* @return {String} fileName
*/
export const getFilePath = (file,fileName,folder) => {
if (isEmptyUtils(file)) {
return null;
}
//文件类型
var ext = file.type;
//后缀名
var suffix = file.name.substring(file.name.lastIndexOf(".") + 1);
//若为空则从name中获取---对wps格式的文件获取不到file.type
if (isEmptyUtils(ext)) {
ext = suffix;
}
//获取当前日期对象
var date = new Date();
if (isEmptyUtils(fileName)) {
//重命名后的文件名
fileName = timeStamp(date) + "-" + subString(guid(), 8) + "." + suffix;
}
//文件全路径(文件路径 + 文件名) 扩展名​/年/月/日/
// var filePath = ext + "/" + date.format('yyyy/MM/dd') + "/" + (isEmptyUtils(folder) ? "" : (folder + "/")) + fileName;
//var filePath = ext + "/" + "common/" + file.name.split('.')[0] + '-' + timeStamp(date) + "." + suffix;
var filePath = ext + "/" + "protal/project/" + timeStamp(date) + "." + suffix;
console.log('filePath==============',filePath);
return filePath;
}
/**
*七牛上传图片、视频、文件 2018 11 hws
* @param self
* @param file
* @param filePath
* @param previewId
* @param progressId
* @param fileType 1--图片和文件 空为视频
* @returns {Promise}
*/
export const doUpload = (self,file, filePath, previewId,progressId, fileType) => {
// var deferred = $q.defer();
return new Promise(function (resolve, reject) {
if (isEmptyUtils(file) || isEmptyUtils(filePath)) {
console.error('七牛上传失败:非法参数');
reject();
}
let key = filePath ? filePath : getFilePath(file);
//修改状态为上传
self.qiniuUploadStatus = true;
// let token = "BRVB4TpxVFA5Wo6lIpfltmWKOltzGar46tvC3BlR:UHn0LDElwjP4jEZTXdq_1qV6_hw=:eyJzY29wZSI6InBpY2EtdGVzdCIsInJldHVybkJvZHkiOiJ7XCJrZXlcIjpcIiQoa2V5KVwiLFwiaGFzaFwiOlwiJChldGFnKVwiLFwiYnVja2V0XCI6XCIkKGJ1Y2tldClcIixcImZzaXplXCI6JChmc2l6ZSksXCJmbmFtZVwiOiQoZm5hbWUpLFwiZXh0XCI6JChleHQpfSIsImRlYWRsaW5lIjoxNTI5NDk0MTc1fQ==";
doQiniuAction1(fileType).then(function (token) {
let putExtra = {
fname: file.name, //原文件名
params: {}, //用来放置自定义变量
mimeType: mimeTypeArray || null //null || array,用来限制上传文件类型,为 null 时表示不对文件类型限制;限制类型放到数组里: ["image/png", "image/jpeg", "image/gif"]
};
let config = {
useCdnDomain: true, //表示是否使用 cdn 加速域名,为布尔值,true 表示使用,默认为 false。
region: null //选择上传域名区域;当为 null 或 undefined 时,自动分析上传域名区域
};
/*
* qiniu.upload 返回一个 observable 对象用来控制上传行为,observable 对像通过 subscribe 方法可以被 observer 所订阅,
* 订阅同时会开始触发上传,同时返回一个 subscription 对象,该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
* */
let observable = qiniu.upload(file, key, token, putExtra, config);
/**
* 接收上传进度信息,res 参数是一个带有 total 字段的 object,包含loaded、total、percent三个属性,提供上传进
* total.loaded: number,已上传大小,单位为字节。
* total.total: number,本次上传的总量控制信息,单位为字节,注意这里的 total 跟文件大小并不一致。
* total.percent: number,当前上传进度,范围:0~100
* */
let next = function (res) {
//res值{"total":{"loaded":18184,"size":18185,"percent":99.99450096233159}}
//获取百分比进度
let progress = res.total.percent.toFixed(2);
self.uploadProgress = Number(progress);
if(progressId == 'uploadProgress1') {
self.uploadProgress1 = Number(progress);
}
if(progressId == 'uploadProgress2') {
self.uploadProgress2 = Number(progress);
}
console.log('Progress: ' + progress);
//如果有进度条
/*if (isNotEmptyUtils(progressId)) {
let obj = $("#" + progressId);
//开始上传时,显示进度条
if (isNotEmptyUtils(obj.parent())) {
//修改状态为上传
// status = true;
self.qiniuUploadStatus = true;
obj.parent().removeClass("hidden");
obj.fadeIn("fast");
}
obj.css("width", progress + '%');
obj.text(progress + '%');
//上传完成,2秒后淡出进度条
if (progress === "100.00") {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = true;
obj.fadeOut(2000);
}
}*/
};
/**
* 接收上传完成后的后端返回信息,res 参数为一个 object, 为上传成功后后端返回的信息
* ,具体返回结构取决于后端sdk的配置,可参考上传策略(https://developer.qiniu.com/kodo/manual/1206/put-policy)
* */
let complete = function (res) {
console.log("七牛上传完成");
setTimeout(function(){
result.key = res.key;
result.path = '/' + res.key;
// result.fullPath = domain + '/' + res.key + '_' + new Date().getTime();
if(!fileType) { // 图片 文件
result.fullPath = domain + '/' + res.key;
}else{ // 视频
result.fullPath = domain1 + '/' + res.key;
}
result.size = res.fsize;
result.name = res.fname ;
result.ext = res.ext;
// deferred.resolve(result);
resolve(result);
// self.model.qCloudUrl = result.fullPath;
// $("#introVideoLecture").attr("src", self.model.qCloudUrl);
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false;
// if (isNotEmptyUtils(previewId)) {
// let address = domain + result.path;
// console.log('文件路径: ' + address);
// //显示图片
// let uplodImg = $('<img>').attr("src", address);
// let obj = $("#" + previewId);
// obj.empty().append(uplodImg);
// obj.css('max-width', '100%');
// }
},500);
};
/**
* 上传错误后触发,当不是 xhr 请求错误时,会把当前错误产生原因直接抛出,诸如 JSON 解析异常等;当产生 xhr 请求错误时,参数 err 为一个包含 code、message、isRequestError 三个属性的 object:
* err.isRequestError: 用于区分是否 xhr 请求错误;当 xhr 请求出现错误并且后端通过 HTTP 状态码返回了错误信息时,该参数为 true;否则为 undefined 。
* err.reqId: string,xhr请求错误的 X-Reqid。
* err.code: number,请求错误状态码,只有在 err.isRequestError 为 true 的时候才有效,可查阅码值对应说明。
* err.message: string,错误信息,包含错误码,当后端返回提示信息时也会有相应的错误信息。
* */
let error = function (err) {
//修改状态为非上传
// status = false;
self.qiniuUploadStatus = false
localStorage.removeItem('qiniuToken');
console.log("七牛上传失败,详细信息请参考:https://developer.qiniu.com/kodo/api/3928/error-responses");
//输出简略错误信息
if (err.isRequestError){
qiniuErrorCheck(err.code)
}else {
console.error(err);
}
/*modalClick("提示", "上传失败!", "确定", function () {
$('#model-modify').modal('hide');
}, "", null);*/
// deferred.reject(new Error('七牛上传失败'));
// return deferred.promise;
return reject(new Error('七牛上传失败'));
};
// 上传开始
subscription = observable.subscribe(next, error, complete);
});
// return deferred.promise;
});
};
(function(doc, win) {
var docEl = doc.documentElement || doc.body,
htmlDom = doc.getElementsByTagName('html')[0],
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function() {
var clientWidth = docEl.clientWidth
if (!clientWidth) return
// docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
htmlDom.style.fontSize = clientWidth / 10 + 'px'
};
if (!doc.addEventListener) return
win.addEventListener(resizeEvt, recalc, false)
doc.addEventListener('DOMContentLoaded', recalc, false)
})(document, window)
\ No newline at end of file
import axios from 'axios';
// 对象的合并
export const containObject = function(...obj1) {
let obj = Object.assign(...obj1)
return obj
}
// 获取页面自适应高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container',
containerHeightId = 'screenSet'){
let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
window.onresize = function() {
containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
}
}
function p_getElm(elmId){
return document.getElementById(elmId)
}
//共通函数
Array.prototype.contains = function (obj) {
if (this.length > 0) {
for (let i = 0; i < this.length; i++) {
if (obj === this[i]) {
return true;
}
}
}
return false;
};
Array.prototype.remove = function (obj) {
if (this.contains(obj)) {
for (let i = 0; i < this.length; i++) {
if (obj === this[i]) {
this.splice(i, 1);
break;
}
}
}
return this;
};
// 时间处理
Date.prototype.format = function (fmt) { // author: meizz
let o = {
"M+": this.getMonth() + 1, // 月份
"d+": this.getDate(), // 日
"h+": this.getHours(), // 小时
"m+": this.getMinutes(), // 分
"s+": this.getSeconds(), // 秒
"q+": Math.floor((this.getMonth() + 3) / 3), // 季度
"S": this.getMilliseconds()
// 毫秒
};
if (/(y+)/.test(fmt))
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "")
.substr(4 - RegExp.$1.length));
for (let k in o)
if (new RegExp("(" + k + ")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
};
/**
* base64编码
* @param {Object} str
*/
export const base64encode = (str) => {
let base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
let out, i, len;
let c1, c2, c3;
len = str.length;
i = 0;
out = "";
while (i < len) {
c1 = str.charCodeAt(i++) & 0xff;
if (i == len) {
out += base64EncodeChars.charAt(c1 >> 2);
out += base64EncodeChars.charAt((c1 & 0x3) << 4);
out += "==";
break;
}
c2 = str.charCodeAt(i++);
if (i == len) {
out += base64EncodeChars.charAt(c1 >> 2);
out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
out += base64EncodeChars.charAt((c2 & 0xF) << 2);
out += "=";
break;
}
c3 = str.charCodeAt(i++);
out += base64EncodeChars.charAt(c1 >> 2);
out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
out += base64EncodeChars.charAt(c3 & 0x3F);
}
return out;
};
/**
* base64解码
* @param {Object} str
*/
export const base64decode = (str) => {
let base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
let c1, c2, c3, c4;
let i, len, out;
len = str.length;
i = 0;
out = "";
while (i < len) {
/* c1 */
do {
c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
}
while (i < len && c1 == -1);
if (c1 == -1)
break;
/* c2 */
do {
c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
}
while (i < len && c2 == -1);
if (c2 == -1)
break;
out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
/* c3 */
do {
c3 = str.charCodeAt(i++) & 0xff;
if (c3 == 61)
return out;
c3 = base64DecodeChars[c3];
}
while (i < len && c3 == -1);
if (c3 == -1)
break;
out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
/* c4 */
do {
c4 = str.charCodeAt(i++) & 0xff;
if (c4 == 61)
return out;
c4 = base64DecodeChars[c4];
}
while (i < len && c4 == -1);
if (c4 == -1)
break;
out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
}
return out;
};
/**
* 时间秒数格式化
* @param s 时间戳(单位:秒)
* @returns {*} 格式化后的时分秒
*/
export const secToTime = (s) => {
let t = "";
if (s > -1) {
// let hour = Math.floor(s/3600);
let min = Math.floor(s / 60) % 60;
let sec = s % 60;
// if(hour < 10) {
// t = '0'+ hour + ":";
// } else {
// t = hour + ":";
// }
if (min < 10) {
t += "0";
}
t += min + ":";
if (sec < 10) {
t += "0";
}
t += sec.toFixed(0);
}
return t;
};
/**
* 校验对象是否为空
* */
export const isNotEmptyUtils = (obj) => {
if ("" == obj || null == obj || undefined == obj || "null" == obj) {
return false;
}
return true;
};
/**
* 校验对象是否为空
* */
export const isEmptyUtils = (obj) => {
return !isNotEmptyUtils(obj);
};
/**
* 校验数组是否为空
* */
export const isEmptyList = (list) => {
return (isEmptyUtils(list) || !(list instanceof Array) || list.length === 0);
};
/**
* 校验数组是否为空
* */
export const isNotEmptyList = (list) => {
return !isEmptyList(list);
};
/**
* 校验对象是否只包含数字0~9
* * @param {String} [obj] 校验对象
* */
export const isNumber = (obj) => {
return (obj != null && obj.toString().match('^[0-9]*$') != null);
};
// 获取用户系统信息start
const detectOS = () => {
let sUserAgent = navigator.userAgent;
let isWin = (navigator.platform == "Win32")
|| (navigator.platform == "Windows");
let isMac = (navigator.platform == "Mac68K")
|| (navigator.platform == "MacPPC")
|| (navigator.platform == "Macintosh")
|| (navigator.platform == "MacIntel");
if (isMac)
return "Mac";
let isUnix = (navigator.platform == "X11") && !isWin && !isMac;
if (isUnix)
return "Unix";
let isLinux = (String(navigator.platform).indexOf("Linux") > -1);
if (isLinux)
return "Linux";
let isIos = (sUserAgent.indexOf("Mac OS X") > -1);
if (isIos)
return "Mac";
if (isWin) {
let isWinXP = sUserAgent.indexOf("Windows NT 5.1") > -1
|| sUserAgent.indexOf("Windows XP") > -1;
if (isWinXP)
return "WinXP";
let isWinVista = sUserAgent.indexOf("Windows NT 6.0") > -1
|| sUserAgent.indexOf("Windows Vista") > -1;
if (isWinVista)
return "WinVista";
let isWin7 = sUserAgent.indexOf("Windows NT 6.1") > -1
|| sUserAgent.indexOf("Windows 7") > -1;
if (isWin7)
return "Win7";
let isWin8_1 = sUserAgent.indexOf("Windows NT 6.2") > -1
|| sUserAgent.indexOf("Windows 8") > -1;
let isWin8_2 = sUserAgent.indexOf("Windows NT 6.3") > -1
|| sUserAgent.indexOf("Windows 8.1") > -1;
if (isWin8_1 || isWin8_2)
return "Win8";
let isWin10_1 = sUserAgent.indexOf("Windows NT 6.4") > -1
|| sUserAgent.indexOf("Windows 10") > -1;
let isWin10_2 = sUserAgent.indexOf("Windows NT 10.0") > -1
|| sUserAgent.indexOf("Windows 10") > -1;
if (isWin10_1 || isWin10_2)
return "Win10";
}
return "other";
};
// 获取用户浏览器信息
const getBrowser = () => {
// let OsObject = "未知";
// if (navigator.userAgent.indexOf("MSIE") > 0) {
// return "IE";
// }
// if (navigator.userAgent.indexOf("Firefox") > 0) {
// return "Firefox";
// }
// if (navigator.userAgent.indexOf("Chrome") > 0) {
// return "Chrome";
// }
// if (navigator.userAgent.indexOf("Safari") > 0) {
// return "Safari";
// }
// if (navigator.userAgent.indexOf("Gecko") > 0) {
// return "Gecko";
// }
return navigator.userAgent;
};
const GetLocalIPAddress = () => {
// let url ='http://counter.sina.com.cn/ip/';
// let url ='http://chaxun.1616.net/s.php?type=ip&output=json&callback=?&_='+Math.random();
// let ip = "";
// $.getJSON(url, function(data){
// localStorage.setItem("ipAddress",data.Ip);
// // check();
// });
// $.getScript('http://pv.sohu.com/cityjson?ie=utf-8', function () {
return returnCitySN["cip"];
// });
// return ip;
};
// 获取用户终端信息
const getTerminalType = () => {
let brow = "未知";
// alert(navigator.userAgent);
if (navigator.userAgent.indexOf('iPad') > -1) {
// alert("iPad");
return brow = "iPad";
}
if (navigator.userAgent.indexOf('Android') > -1
|| navigator.userAgent.indexOf('Linux') > -1) {
// alert("Android");
return brow = "android手机";
}
if (navigator.userAgent.indexOf('iPhone') > -1
// || navigator.userAgent.indexOf('Mac') > -1
) {
// alert("iPhone");
return brow = "iPhone手机";
}
if (navigator.userAgent.indexOf('Trident') > -1) {
// alert("Trident");
return brow = "电脑";
}
if (navigator.userAgent.indexOf('Presto') > -1) {
// alert("Presto");
return brow = "电脑";
}
if (navigator.userAgent.indexOf('Chrome') > -1) {
// alert("Chrome");
return brow = "电脑";
}
if (navigator.userAgent.indexOf('AppleWebKit') > -1) {
// alert("AppleWebKit");
return brow = "iPad";
}
if (navigator.userAgent.indexOf('Gecko') > -1
&& navigator.userAgent.indexOf('KHTML') == -1) {
// alert("Gecko");
return brow = "电脑";
}
if (navigator.userAgent.indexOf("Mac OS X") > -1) {
// alert("ios");
return brow = "ios";
}
if (navigator.userAgent.indexOf('Safari') == -1) {
// alert("Safari");
return brow = "电脑";
}
return brow;
};
const initEnvironment = () => {
let OS = detectOS();
let browser = getBrowser();
let ip = GetLocalIPAddress();
let terminalType = getTerminalType();
localStorage.setItem("OS", OS);
localStorage.setItem("browser", browser);
localStorage.setItem("ipAddress", ip);
localStorage.setItem("terminalType", terminalType);
};
/**
* str数据字符串,split分隔符
* @param {String} [str] 当前vue对象
* @param {String} [split] 当前vue对象
* @return{Array} [array]
* */
export const stringToArr = (str, split) => {
if (isEmptyUtils(str) || isEmptyUtils(split) || str.indexOf(split) === -1) {
return [str];
} else {
return str.split(split);
}
};
//单点登录--start
/**
* str数据字符串,split分隔符
* @param {String} [str] url参数部分
* @param {String} [split] 分隔符
* @return{Array} [parArr] 返回键值对list
* */
const getUrlParams = (str, split) => {
let parArr = [];
if (isEmptyUtils(str) || isEmptyUtils(split) || str.indexOf(split) === -1) {
return parArr;
} else {
let parMapArray = str.split(split);
if (parMapArray.length > 0) {
for (let i = 0; i < parMapArray.length; i++) {
if (parMapArray[i].indexOf("=") > -1) {
let item = parMapArray[i].split("=");
let par = {};
par[item[0]] = item[1];
parArr.push(par);
}
}
}
return parArr;
}
};
/**
* str数据字符串,split分隔符
* @param {String} [str] url参数部分
* @param {String} [split] 分隔符
* @return{Map} [parMap] 返回键值对Map
* */
export const getUrlParamsMap = (str, split) => {
let parMap = new Map();
if (isEmptyUtils(str) || isEmptyUtils(split) || str.indexOf(split) === -1) {
return parMap;
} else {
let parMapArray = str.split(split);
if (parMapArray.length > 0) {
for (let i = 0; i < parMapArray.length; i++) {
if (parMapArray[i].indexOf("=") > -1) {
let item = parMapArray[i].split("=");
parMap[item[0]] = item[1];
}
}
}
return parMap;
}
};
export const ssoLogin = (href, paramMap) => {
console.log("ssoLogin开始");
if (isNotEmptyUtils(paramMap)) {
if (isNotEmptyUtils(paramMap)) {
for (var param in paramMap) {
localStorage.setItem(param, paramMap[param]);
}
}
//获取用户系统信息
initEnvironment();
}
};
//单点登录--end
//退出登录,跳转到登录页面
export const logout = () => {
let url = localStorage.getItem("Url");
let logoutUrl = localStorage.getItem("logoutUrl");
let ssoLoginUrl = localStorage.getItem("ssoLogin");
let ssoOriginUrl = localStorage.getItem("ssoOrigin");
console.log('logoutUrl:'+logoutUrl)
/* alert("ssoLogin Url:"+ ssoLoginUrl)
alert("logOut url:" + logoutUrl)
alert("ssoOrigin url:" + ssoOriginUrl);*/
localStorage.clear();
localStorage.setItem("Url", url);
localStorage.setItem("logoutUrl", logoutUrl);
localStorage.setItem("ssoLogin", ssoLoginUrl);
localStorage.setItem("ssoOrigin", ssoOriginUrl);
if (isEmptyUtils(logoutUrl)) {
if(isEmptyUtils(ssoLoginUrl)){
window.location.href = localStorage.getItem("ssoOrigin")
+ "/PICA_SSO_FE/html/pica_login.html";
}else{
window.location.href = localStorage.getItem("ssoLogin");
}
} else {
// window.location.href = logoutUrl;
window.location.href = localStorage.getItem("ssoOrigin")
+ "/PICA_SSO_FE/html/pica_login.html";
}
};
/**
* 消息提示 确定或取消
* @param {Object} [self] 当前vue对象
* @param {String} [title] 标题
* @param {String} [content] 内容
* @param {String} [confirmButton] 确认按钮文字
* @param {Function} [confirmFunction] 按下确按钮认时,执行的函数
* @param {String} [cancelButton] 取消按钮文字
* @param {Function} [cancelFunction] 按取消按钮认时,执行的函数
* @param {String} [messageType] 消息类型 success,info,warning,error
* */
export const messageBox = (self, title, content, confirmButton, confirmFunction, cancelButton, cancelFunction, messageType) => {
let titleText = title ? title : '提示';
let contentText = content ? content : '';
let confirmButtonText = confirmButton ? confirmButton : '确定';
let type = messageType ? messageType : 'info';
let typeArray = ["error", "warning", "info", "success"];
if (!typeArray.contains(type)) {
type = "info";
}
if (isNotEmptyUtils(cancelButton)) {
self.$confirm(contentText, titleText, {
confirmButtonText: confirmButtonText,
cancelButtonText: cancelButton,
type: type
}).then(() => {
// self.$message({
// type: 'success',
// message: '删除成功!'
// });
if (confirmFunction instanceof Function) {
confirmFunction();
}
}).catch(() => {
// self.$message({
// type: 'info',
// message: '已取消删除'
// });
if (cancelFunction instanceof Function) {
cancelFunction();
}
});
} else {
self.$alert(contentText, titleText, {
confirmButtonText: confirmButtonText,
type: type,
callback: action => {
// self.$message({
// type: 'info',
// message: `action: ${ action }`
// });
if (confirmFunction instanceof Function) {
confirmFunction();
}
}
});
}
};
/**
* 消息提示(支持html内容) 确定或取消
* @param {Object} [self] 当前vue对象
* @param {String} [title] 标题
* @param {String} [content] 内容
* @param {String} [confirmButton] 确认按钮文字
* @param {Function} [confirmFunction] 按下确按钮认时,执行的函数
* @param {String} [cancelButton] 取消按钮文字
* @param {Function} [cancelFunction] 按取消按钮认时,执行的函数
* @param {String} [messageType] 消息类型 success,info,warning,error
* */
export const htmlMessageBox = (self, title, content, confirmButton, confirmFunction, cancelButton, cancelFunction, messageType) => {
let titleText = title ? title : '提示';
let contentText = content ? content : '';
let confirmButtonText = confirmButton ? confirmButton : '确定';
let type = messageType ? messageType : 'info';
let typeArray = ["error", "warning", "info", "success"];
if (!typeArray.contains(type)) {
type = "info";
}
// debugger
if (isNotEmptyUtils(cancelButton)) {
self.$confirm(contentText, titleText, {
confirmButtonText: confirmButtonText,
cancelButtonText: cancelButton,
dangerouslyUseHTMLString: true,//是否将 message 属性作为 HTML 片段处理
type: type
}).then(() => {
if (confirmFunction instanceof Function) {
confirmFunction();
}
}).catch(() => {
if (cancelFunction instanceof Function) {
cancelFunction();
}
});
} else {
self.$alert(contentText, titleText, {
confirmButtonText: confirmButtonText,
dangerouslyUseHTMLString: true,//是否将 message 属性作为 HTML 片段处理
type: type,
callback: action => {
// self.$message({
// type: 'info',
// message: `action: ${ action }`
// });
if (confirmFunction instanceof Function) {
confirmFunction();
}
}
});
}
};
/**
*请求失败时判断
*
* @param {Object} [error] 后台返回的信息
* @param {Object} [self] 当前vue对象
* */
export const errorResponseCheck = (error, self) => {
closeLoading(self);
console.log(error);
setTimeout(function () {
let code = error ? (error.response ? error.response.data : 0) : 0;
// console.log("请求失败:%s", code);
if (code == '40011') {
messageBox(self, "登录", "登录失效,请重新登录!", "是", function () {
logout();
}, "", null);
setTimeout(function () {
logout();
}, 2000);
} else if (code == '40013') {
messageBox(self, "提示", "刷新太过频繁,休息一下!", "是", function () {
}, "", null);
// setTimeout(function () {
//
// }, 2000);
} else {
//sendErrorReport(code);
// messageBox(self, "提示", "操作失败!", "确定", function () {
//
// }, "", null, "error");
self.$message.error("操作失败");
}
}, 100)
};
//截位
export const subString = (obj, int) => {
if (isEmptyUtils(obj) || isEmptyUtils(int)) {
return "";
}
if (obj.length <= int) {
return obj;
} else {
obj = obj.substring(0, int);
}
return obj;
};
/**
* 打开loading
* @param {Object} [self] 当前this对象
* @return 当前loading对象
* */
export const openLoading = (self, customClass) => {
const options = {
lock: true,
text: 'Loading',
// target:'#bodyContent',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
};
if(customClass){
options.customClass = customClass;
}
self.elLoadingId = self.$loading(options);
return self.elLoadingId;
};
/**
* 关闭loading
* @param {Object} [self] 当前this对象
* @return 当前loading对象
* */
export const closeLoading = (self) => {
if (self.elLoadingId) {
self.elLoadingId.close();
}
};
/**
* 获取常量集合
*
*
* @param {Object} [self] 当前this对象
* @param {Object} [codeObject] 例如:codeObject={list1:"P097",list2:"P097"}
* */
export const getConstantList = (self, codeObject) => {
if (!codeObject instanceof Object) {
return;
}
let req = {
params: {
numMap: JSON.stringify(codeObject)
}
};
self.$axios.get(
localStorage.getItem("msUrl") + "constants"
, req
).then(function (res) {
let map = JSON.parse(JSON.stringify(res.data.data));//通过这个实现深拷贝
for (let key in map) {
self[key] = map[key];
}
});
};
export const initDepartment = (self, obj, type) => {
if (!obj instanceof Object) {
return;
}
var num = {
id: obj,
type: type
}
axios.create().post(
localStorage.getItem("kfUrl") + "PICAAddressHospitalServiceImpl/postDepartmentList",
num
).then(function (res) {
let list = JSON.parse(JSON.stringify(res.data.departmentList));//通过这个实现深拷贝
if (obj == -1) {
self.departmentListP = list;
} else {
self.departmentList = list;
}
if (type == 'childGetChildList') {
self.departmentPid = getPdepartmentId(self,'model','departmentId');
}
});
};
export const getPdepartmentId = (self) =>{
if(isNotEmptyList(self.model.departmentId)
|| !self.departmentList instanceof Array) {
return null;
}
if(self.departmentList.length>0) {
return self.departmentList[0].parent_id;
}else{
return -1;
}
};
export const getObjectIdsStr = (list, key) => {
if (isEmptyUtils(list)) {
return ''
}
let strRet = '';
for (let temp of list) {
strRet = strRet + temp[key] + ',';
}
return strRet;
}
export const getPositionList = (provinceId,cityId,countyId,townId) => {
return new Promise(function (resolve, reject) {
var num = {
provinceId,
cityId,
countyId,
townId
}
axios.create().post(
localStorage.getItem("kfUrl") + "combineHospital/getPositionList",
num
).then(function (res) {
resolve(res);
}).then(function (res) {
reject(res);
});
});
};
export const setOptionLabel = (self,selfModel,selfEId,selfEName,list,listEId,listEName) => {
if (isEmptyList(list) || isEmptyUtils(listEId) || isEmptyUtils(listEName)) {
return ;
}
for (let i = 0; i < list.length; i++) {
if(list[i][listEId] == self[selfModel][selfEId]){
self[selfModel][selfEName] = list[i][listEName];
break;
}
}
return;
};
/**
* 添加自定义的验证规则
*/
export function isvalidUsername(str) {
const valid_map = ['admin', 'editor']
return valid_map.indexOf(str.trim()) >= 0
}
/* 合法uri*/
export function validateURL(textval) {
const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
return urlregex.test(textval)
}
/* 小写字母*/
export function validateLowerCase(str) {
const reg = /^[a-z]+$/
return reg.test(str)
}
/* 大写字母*/
export function validateUpperCase(str) {
const reg = /^[A-Z]+$/
return reg.test(str)
}
/* 大小写字母*/
export function validatAlphabets(str) {
const reg = /^[A-Za-z]+$/
return reg.test(str)
}
// 2-150个中英文字符
export function validateWord150(rule, value, callback, message) {
if(!/^[\u4e00-\u9fffa-zA-Z]{2,150}$/.test(value)) {
callback(new Error(message))
} else {
callback()
}
}
// 考试30个中英文字符
export function validateWord30(value,message) {
if(!/^[\u4e00-\u9fffa-zA-Z]{0,30}$/.test(value)) {
callback(new Error('考试名称长度不超过30个中文字符长度'))
} else {
callback()
}
}
/* 通用密码验证(数字、字母、下划线或特殊字符且长度为0-150位) */
export function isValidPassword(rule, value, callback, message) {
if (!/^(?:\d+|[a-zA-Z]+|[!@#$%^&*]+){0,150}$/.test(value)) {
callback(new Error(message))
} else {
callback()
}
}
\ No newline at end of file
<template>
<div id="screenSet" class="blank-wrap screenSet">
<div class="blank-content">
<img src="../assets/image/no-content.png"/>
<p>很抱歉,您暂时还没开通工作站功能</p>
</div>
</div>
</template>
<script>
import * as commonUtil from '../utils/utils'
export default {
data() {
return {
}
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight(100)
}
}
</script>
<style lang="scss">
.blank-wrap {
background: #fff;
margin: 20px !important;
position: relative;
text-align: center;
.blank-content {
position: absolute;
top: 50%;
left: 50%;
width: 400px;
height: 100px;
margin-top: -50px;
margin-left: -200px;
p {
margin-top: 20px;
font-size: 20px;
color: #999;
}
img {
width: 100px;
}
}
}
</style>
因为 它太大了无法显示 源差异 。您可以改为 查看blob
<template>
<div class="create-component-wrap">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond"
:curmbThird="curmbThird"
:jumPathThird="jumPathThird">
</bread-crumb>
<div class="create-content screenSet" id="screenSet">
<div class="step-content">
<el-steps :active="stepNum" simple>
<span class="step-one" :class="stepNum == 1 ? 'class-1' : 'class-2'">1</span>
<el-step title="基础信息" :class="stepNum == 1 ? 'class-1-text' : 'class-2-text'"></el-step>
<span class="step-two" :class="stepNum == 2 ? 'class-1' : 'class-2'">2</span>
<el-step title="选择模块" :class="stepNum == 2 ? 'class-1-text' : 'class-2-text'"></el-step>
</el-steps>
<div class="btn-container">
<el-button v-if="stepNum == 1 && (componentStatus == 1 || !componentStatus)" @click="storageAndNext(1)" type="default" size="small">暂存</el-button>
<el-button v-if="stepNum == 1" @click="storageAndNext(2)" type="primary" size="small" style="margin-left:0;">下一步</el-button>
<el-button v-if="stepNum == 2 && (componentStatus == 1 || !componentStatus)" :disabled="conditionSelect" @click="finishConponent(1)" type="default" size="small">暂存</el-button>
<el-button v-if="stepNum == 2" @click="finishConponent(2)" :disabled="conditionSelect" type="primary" size="small" style="margin-left:0;">完成</el-button>
</div>
</div>
<div class="first-step" v-if="stepNum == 1">
<el-form ref="basicInfoForm" class="basic-form" :model="portalComponent" :rules="rules" label-width="125px" label-suffix=":" size="small" style="margin-bottom:30px;">
<el-form-item label="组件名称" prop="name">
<el-input type="text" v-model="portalComponent.name" @blur="componentName" size="small" placeholder="请输入组件名称" style="width:30%;"></el-input>
<span class="word-num">{{(portalComponent.name).replace(/\s+/g,"").length}}/20</span>
<p class="component-name" v-if="isStorage">输入组件名称</p>
</el-form-item>
<el-form-item label="组件简介" prop="introduce">
<el-input type="textarea" rows="4" cols="10" v-model="portalComponent.introduce" size="small" placeholder="请输入组件简介" style="width:37%;"></el-input>
<span class="word-num">{{(portalComponent.introduce).replace(/\s+/g,"").length}}/150</span>
</el-form-item>
<div class="basic-item-icon">
<span class="require">*</span>
<el-form-item label="组件图片" prop="imageUrl">
<el-upload
v-model="portalComponent.imageUrl"
class="bg-uploader"
action="#"
:show-file-list="false"
:before-upload="beforeAvatarUpload">
<img v-if="portalComponent.imageUrl" @mouseover.stop="imgMouseOver=true" :src="portalComponent.imageUrl" class="bg-img">
<img v-if="!portalComponent.imageUrl" class="bg-img" src="../../assets/image/small.png">
<div class="img-delete" v-show="imgMouseOver" @click.stop="deleteImg" @mouseout.stop="imgMouseOver=false"><i class="el-icon-delete"></i></div>
<div class="limit-text">
<p>尺寸大小:750*420</p>
<p>限制大小: 2.0 Mb</p>
<p>支持.jpg,.png格式</p>
</div>
</el-upload>
</el-form-item>
<p class="upload-message" v-if="uploadImgMessage">请上传组件图片</p>
</div>
<el-row>
<el-col :span="6">
<div class="basic-item-icon">
<span class="require">*</span>
<el-form-item label="配置证书">
<el-radio-group v-model="certificateLable" @change="selectCertificate" :disabled="componentStatus == 3 || componentStatus == 4">
<el-radio label="是"></el-radio>
<el-radio label="否"></el-radio>
</el-radio-group>
</el-form-item>
</div>
</el-col>
<el-col :span="10" v-if="hasCertificate">
<el-form-item label="选择证书" prop="certificateId">
<el-select v-model="portalComponent.certificateId" @change="selectChange" :disabled="componentStatus == 3 || componentStatus == 4" placeholder="请选择证书" style="width: 352px;">
<el-option
v-for="(item,index) in certificateIdSelect"
:key="index"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item v-if="hasCertificate" label="组件完成(%)" prop="certificateCondition">
<el-input-number
v-model="portalComponent.certificateCondition"
controls-position="right"
@change="handleChange"
:disabled="componentStatus == 3 || componentStatus == 4"
:step="10"
:min="10"
:max="100">
</el-input-number>
</el-form-item>
</el-form>
</div>
<div class="" v-if="stepNum == 2">
<div class="model-btn">
<el-button v-if="idType == 1" :disabled="conditionSelect" type="primary" size="small" @click="addModule">添加空白模块</el-button>
<el-button :disabled="conditionSelect" type="primary" size="small" @click="addFromModule" style="margin-left:0;">从预设模块添加</el-button>
</div>
<div class="tab-content">
<el-tabs type="card" v-model="firstTab" :closable="!conditionSelect" @tab-remove="removeTab">
<el-tab-pane v-for="(item,index) in componentList.moduleModelList" :key="index" :label="'模块' + parseInt(index + 1)" :name='"" + parseInt(index + 1)'>
<div>
<el-form ref="moduleForm" :model="item" :rules="moduleRules" label-suffix=":" label-width="130px" style="width:100%;">
<el-row>
<el-col :span="10">
<el-form-item label="模块名称" prop="name">
<el-input v-model="item.name" @blur="moduleNameValidate(index)" :disabled="conditionSelect || idType == 2 || item.moduleType == 2 || (item.id != '' && item.openFlag == 2)" size="small" placeholder="请选择模块名称" style="width:288px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="10" v-if="idType == 1">
<el-form-item label="是否对外开放" prop="openFlag">
<el-radio-group v-model="item.openFlag" @change="selectIsOpen(index)" :disabled="conditionSelect || item.moduleType == 2 || (item.id != '' && item.openFlag == 2)">
<el-radio :label="2"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="template-btn" v-if="idType == 1">
<span class="word-size">添加一个模板</span>
<el-button
:disabled="conditionSelect || item.moduleType == 2 || (item.id != '' && item.openFlag == 2)"
v-for="(_item,_index) in templateDataList"
:key="_index"
type="primary"
size="small"
@click="addTemplate(_item,index)"
style="margin-right:0px;">{{_item.name}}</el-button>
</div>
<div v-for="(item1,index1) in item.templetModelList" :key="index1">
<el-form ref="templateForm" :model="item1" label-suffix=":" label-width="110px" style="width:100%;">
<div class="template-content">
<div class="template-content-div">
<div class="title">
{{item1.name}}
<span v-if="conditionAnd && item.moduleType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1)) && idType == 1">
变更顺序:
<i class="el-icon-caret-bottom" @click="sortUp(index,index1)" style="font-size:17px;"></i>
<i class="el-icon-caret-top" @click="sortDown(index,index1)" style="font-size:17px;"></i>
<i class="el-icon-delete" @click="deleteTemplate(index,index1)" style="color:red;"></i>
</span>
</div>
<div v-for="(item2,index2) in item1.partModelList" :key="index2">
<!-- 考试 -->
<div v-if="item2.type == 1">
<div class="partText" v-if="index2 > 0">{{item2.introduce}}</div>
<div v-for="(item3,index3) in item2.partContentModelList" :key="index3">
<el-row>
<el-col :span="10" class="item-icon">
<span class="require">*</span>
<el-form-item label="考试名称">
<el-input v-model="item3.content1" :disabled="conditionSelect || item.moduleType == 2 || (item.id != '' && item.openFlag == 2) || idType == 2" size="small" maxlength='30' placeholder="请输入考试名称" style="width:288px;"></el-input>
<span v-if="conditionAnd && item2.numFlag == 2 && index3 == 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"><i class="el-icon-circle-plus" @click="addMatterCourse(index,index1,index2)" style="color:#449284;"></i></span>
<span v-if="conditionAnd && item2.numFlag == 2 && index3 > 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"><i class="el-icon-delete" @click="deleteMatterCourse(index,index1,index2,index3)" style="color:red;"></i></span>
</el-form-item>
</el-col>
<el-col :span="10" class="item-icon">
<span class="require">*</span>
<el-form-item label="关联考试">
<el-select v-model="item3.content2" @focus="examIDfocus(index,index1,index2,index3)" @change="changeExamID" :disabled="conditionSelect || item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)" size="small" placeholder="请选择考试ID" style="width:288px;">
<el-option
v-for="(itemTest,indexTest) in testIdSelect"
:key="indexTest"
:label="itemTest.onlineExamName"
:value="itemTest.id + ''">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10" class="item-icon">
<span class="require">*</span>
<el-form-item label="配置证书">
<el-radio-group v-model="item3.certificateFlag" :disabled="conditionSelect || item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)">
<el-radio :label="2"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="10" v-if="item3.certificateFlag == 2" class="item-icon">
<span class="require">*</span>
<el-form-item label="选择证书">
<el-select v-model="item3.content4" :disabled="conditionSelect || item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)" size="small" placeholder="请选择证书" style="width:288px;">
<el-option
v-for="(itemCertificate,indexCertificate) in certificateIdSelect"
:key="indexCertificate"
:label="itemCertificate.name"
:value="itemCertificate.id + ''">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<!-- 课程 -->
<div v-if="item2.type == 2">
<div class="partText" v-if="index2 > 0">{{item2.introduce}}</div>
<el-row v-for="(item3,index3) in item2.partContentModelList" :key="index3">
<el-col :span="10" class="item-icon">
<span class="require">*</span>
<el-form-item label="课程名称">
<el-input v-model="item3.content1" :disabled="conditionSelect || item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)" size="small" maxlength='30' placeholder="请输入课程名称" style="width:288px;"></el-input>
<span v-if="conditionAnd && item2.numFlag == 2 && index3 == 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"><i class="el-icon-circle-plus" @click="addMatterCourse(index,index1,index2)" style="color:#449284;"></i></span>
<span v-if="conditionAnd && item2.numFlag == 2 && index3 > 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"><i class="el-icon-delete" @click="deleteMatterCourse(index,index1,index2,index3)" style="color:red;"></i></span>
</el-form-item>
</el-col>
<el-col :span="10" class="item-icon">
<span class="require">*</span>
<el-form-item label="关联课程">
<el-select v-model="item3.content2" @focus="courseIDfocus(index,index1,index2,index3)" @change="changeCourseID" :disabled="conditionSelect || item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)" size="small" placeholder="请选择课程ID" style="width:288px;">
<el-option
v-for="(itemCourse,indexCourse) in courseIdSelect"
:key="indexCourse"
:label="itemCourse.name"
:value="itemCourse.id + ''">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
</div>
</div>
</el-form>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<el-dialog :title="dialogTitle" :visible.sync="columnFormVisible" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form ref="resourceForm" class="creat-form" :model="selectResource" label-width="145px" label-suffix=":" size="small">
<el-form-item label="请选择一个模块" prop="">
<el-select v-model="selectResource.resourceModuleSelect" @change="selectChange" placeholder="请选择资源包" style="width:60%;">
<el-option
v-for="(item,index) in resourceArray"
:key="index"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="default-module" v-for="(item,index) in dialogData.templetModelList" :key="index">
<el-form ref="dialogEmplateForm" label-suffix=":" label-width="80px" style="width:100%;">
<div class="dialog-template-content">
<div v-for="(item1,index1) in item.partModelList" :key="index1">
<!-- 考试 -->
<div v-if="item1.type == 1">
<div v-for="(item2,index2) in item1.partContentModelList" :key="index2">
<el-row>
<el-col :span="10">
<el-form-item label="考试名称">
<span>{{item2.content1}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="配置证书">
<span v-if="item2.certificateFlag == 2"></span>
<span v-else></span>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<!-- 课程 -->
<div v-if="item1.type == 2">
<el-row v-for="(item2,index2) in item1.partContentModelList" :key="index2">
<el-col :span="10">
<el-form-item label="课程名称">
<span>{{item2.content1}}</span>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
</div>
</el-form>
</div>
<span slot="footer" class="dialog-footer dialog-foot">
<el-button type="default" size="small" @click="columnFormVisible = false">取 消</el-button>
<el-button type="primary" size="small" @click="submitDialog">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import BreadCrumb from '../../components/breadcrumb.vue'
import { doUpload, getFilePath } from "../../utils/qiniu-util"
// import { validateWord150 } from "../../utils/validate.js"
import { mapGetters } from 'vuex'
import { openLoading, closeLoading, isNotEmptyUtils, isEmptyList, isNotEmptyList } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
let vm = null
// 判断组件是否重名
let validateRepeatWord = function(rule, value, callback, message) {
let req = {
token: vm._token,
name: value,
idType: vm.idType, // 1内部 2外部
id: null || vm.componentId
}
if(vm.itemName != value) {
vm.GET('portal/portalComponent/checkComponentName',req).then((res) => {
if(res.code == '000000') {
if(res.data.resultFlag == 2) {
callback(new Error(message))
}else {
callback()
}
}
})
}else {
callback()
}
}
// 判断模块是否重名(对外开放时候验证)
let validateModuleName = function(rule, value, callback, message) {
for(let i = 0;i<vm.componentList.moduleModelList.length;i++) {
if(vm.firstTab == parseInt(i + 1)) {
vm.GET('portal/portalComponent/checkModuleName',{name: value,openFlag: vm.componentList.moduleModelList[i].openFlag}).then((res) => {
if(res.code == '000000') {
if(res.data > 0) {
vm.componentList.moduleModelList[i].name = ''
callback(new Error(message))
return
}else {
callback()
}
}
})
break
}
}
}
export default {
components: {
BreadCrumb
},
data() {
return {
columnFormVisible: false,
uploadImgMessage: false,
imgMouseOver: false,
itemName: '',
examName: '',
examIndex: '',
examIndex1: '',
examIndex2: '',
examIndex3: '',
courseName: '',
courseIndex: '',
courseIndex1: '',
courseIndex2: '',
courseIndex3: '',
stepNum: 1,
componentId: '',
componentStatus: '',
resultFlag: '',
conditionSelect: false,
conditionAnd: true,
isStorage: false,
dialogTitle: '选择模板',
curmbFirst: '教培项目',
curmbSecond: '项目组件',
curmbThird: '新增项目组件',
jumPathThird: '/item-component',
firstTab: '1',
hasCertificate: false,
certificateLable: '否',
portCertificateLable: '否',
moduleIndex: '',
editableTabs: [{
title: '模块 1',
name: '1'
}],
templateDataList: [],
templetIndex: 0,
testIdSelect: [], // 考试ID下拉列表
certificateIdSelect: [], // 证书下拉列表
courseIdSelect: [], // 课程下拉列表
dialogData: [],
portalComponent: {
idType: '',
organizationId: '',
name: '',
id: '',
introduce: '',
imageUrl:'',
seqNo: '',
certificateId: '', // 0 没有证书,配置证书为否
certificateCondition: '60', // 证书完成率
status: ''
},
componentList: {
moduleModelList: [{
id: '',
name: '',
openFlag: '', // 1 否 不开放 2 是 开放
templetModelList: []
}]
},
resourceArray: [],
selectResource: {
resourceModuleSelect: ''
},
rules: {
"name": [
{ required: true, message: '输入组件名称', trigger: 'blur' },
{ min: 2, max: 20, message: '输入长度为2-20个字符', trigger: 'blur' },
{ validator: function(rule, value, callback) {
validateRepeatWord(rule, value, callback, '该组件名称已存在,请使用一个新的组件名称')
},
trigger: 'blur' }
],
"introduce": [
{ required: true, message: '请输入组件简介', trigger: 'blur' },
{ min: 1, max: 150, message: '超出可输入的最大长度', trigger: 'blur' }
],
"certificateId": [
{ required: true, message: '请选择证书', trigger: 'blur' },
],
"certificateCondition": [
{ required: true, message: '请选择获得证书完成率', trigger: 'blur' },
]
},
moduleRules: {
"name": [
{ required: true, message: '请输入模块名称', trigger: 'blur' },
{ min: 2, max: 20, message: '输入长度为2-20个字符', trigger: 'blur' },
{ validator: function(rule, value, callback) {
validateModuleName(rule, value, callback, '模块名称已存在,请修改名称后保存')
},
trigger: 'blur' }
],
"openFlag": [
{ required: true, message: '请选择是否对外开放', trigger: 'blur' }
]
}
}
},
computed: {
...mapGetters([
'_token',
'idType'
])
},
created() {
vm = this
vm.componentId = vm.$route.query.id
vm.componentStatus = vm.$route.query.status // 3 启用 4 禁用
vm.resultFlag = vm.$route.query.resultFlag // 判断可编辑范围是基础信息还是全部信息 1 为全部 2 为基础
vm.getCertificateList() // 获取证书列表
vm.componentBasicInfo() // 根据ID查询组件基本信息
vm.conditionSelect = vm.resultFlag == 2 || vm.componentStatus == 3 || vm.componentStatus == 4
if(vm.componentStatus && vm.resultFlag) {
vm.conditionAnd = vm.resultFlag == 1 && vm.componentStatus != 3 && vm.componentStatus != 4
}
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 根据ID查询组件基本信息
componentBasicInfo() {
if(vm.componentId) {
openLoading(vm)
vm.GET('portal/portalComponent/queryPortalComponentById',{id: vm.componentId}).then((res) => {
closeLoading(vm)
if( res.code == '000000') {
vm.portalComponent = res.data.portalComponent
vm.itemName = vm.portalComponent.name
if(!vm.portalComponent.certificateId) {
vm.hasCertificate = false
vm.certificateLable = '否'
} else {
vm.hasCertificate = true
vm.certificateLable = '是'
}
}
})
}
},
// 删除图片
deleteImg() {
vm.portalComponent.imageUrl = ''
vm.imgMouseOver = false
},
// 是否配置证书
selectCertificate(val) {
vm.portalComponent.certificateId = ''
if(val == '否') {
vm.hasCertificate = false
vm.portalComponent.certificateCondition = 0
}else{
vm.hasCertificate = true
vm.portalComponent.certificateCondition = 60
}
},
// 获取组件完成率
handleChange(value) {
vm.portalComponent.certificateCondition = value
},
// 获取证书下拉列表
getCertificateList() {
vm.GET('portal/portalComponent/CertificateList').then((res) => {
if( res.code == '000000') {
vm.certificateIdSelect = res.data.certificateList
}else {
vm.$message.info(res.message)
}
})
},
// 暂存(下一步)
storageAndNext(flag) {
if(vm.componentId) { // 编辑
vm.submitBasicData(flag,'portal/portalComponent/updatePortalComponent')
}else{ // 新增
vm.submitBasicData(flag,'portal/portalComponent/insertPortalComponent')
}
},
submitBasicData(flag,url) {
if(flag == 1) { // 暂存
vm.portalComponent.status = 1
if(!vm.portalComponent.name) {
vm.isStorage = true
return
}else{
vm.isStorage = false
}
vm.submitBasic(flag,url)
}else{ // 下一步
vm.isStorage = false
if(!vm.componentId) {
vm.portalComponent.status = 1
}
if(!vm.portalComponent.imageUrl) {
vm.uploadImgMessage = true
return
} else {
vm.uploadImgMessage = false
}
vm.$refs.basicInfoForm.validate((valid) => {
if (valid) {
vm.submitBasic(flag,url)
} else {
return false
}
})
}
},
componentName() {
vm.isStorage = false
},
submitBasic(flag,url) {
let req = {
token: vm._token,
name: vm.portalComponent.name,
idType: vm.idType, // 1内部 2外部
id: null || vm.componentId
}
if(vm.portalComponent.name != vm.itemName) {
vm.GET('portal/portalComponent/checkComponentName',req).then((res) => {
if(res.code == '000000') {
if(res.data.resultFlag == 2) {
vm.$message.info("该组件名称已存在,请使用一个新的组件名称")
return
}else {
vm.portalComponent.idType = vm.idType
vm.portalComponent.id = vm.componentId
vm.POST(url,{ model: vm.portalComponent }).then((res) => {
if( res.code == '000000') {
if(!vm.componentId) {
vm.componentId = res.data
}
if(flag == 2) {
vm.stepNum = 2
vm.getTemplateData()
vm.getModuleData()
vm.getTestListData()
vm.getCourseData()
} else {
vm.$message.info("暂存成功!")
}
}
})
}
} else {
vm.$message.info(res.message)
}
})
}else {
vm.portalComponent.idType = vm.idType
vm.portalComponent.id = vm.componentId
vm.POST(url,{ model: vm.portalComponent }).then((res) => {
if( res.code == '000000') {
if(!vm.componentId) {
vm.componentId = res.data
}
if(flag == 2) {
vm.stepNum = 2
vm.getTemplateData()
vm.getModuleData()
vm.getTestListData()
vm.getCourseData()
} else {
vm.$message.info("暂存成功!")
}
}
})
}
},
// 上传组件图片
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg'
const isPNG = file.type === 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
if ( !isJPG && !isPNG && !isLt2M ) {
vm.$message.error('图片不符合规范,请根据规范上传图片')
return;
}
let _img = new FileReader()
_img.readAsDataURL(file)
_img.onload = function(theFile) {
let image = new Image()
image.src = theFile.target.result
image.onload = function() {
let _this = this
if(_this.width != 750 || _this.height != 420) {
vm.$message.info('图片不符合规范,请根据规范上传图片')
}else {
openLoading(vm)
doUpload(vm,file, getFilePath(file,null), 'preview4', 'progress1', 1).then(function (path) {
closeLoading(vm)
vm.portalComponent.imageUrl = path.fullPath
vm.uploadImgMessage = false
});
}
}
}
},
// 获取考试下拉列表
getTestListData() {
vm.GET('portal/portalComponent/OnlineExamList').then((res) => {
if( res.code == '000000') {
vm.testIdSelect = res.data.onlineExamList
}else {
vm.$message.info(res.message)
}
})
},
// 根据考试ID填充考试名称
changeExamID(value) {
let examName = ''
for(let i = 0;i<vm.testIdSelect.length;i++) {
if(value == vm.testIdSelect[i].id) {
examName = vm.testIdSelect[i].onlineExamName
}
}
if(!vm.componentList.moduleModelList[vm.examIndex].templetModelList[vm.examIndex1].partModelList[vm.examIndex2].partContentModelList[vm.examIndex3].content1) {
vm.componentList.moduleModelList[vm.examIndex].templetModelList[vm.examIndex1].partModelList[vm.examIndex2].partContentModelList[vm.examIndex3].content1 = examName
}
},
examIDfocus(index,index1,index2,index3) {
vm.examIndex = index
vm.examIndex1 = index1
vm.examIndex2 = index2
vm.examIndex3 = index3
},
// 获取课程下拉列表
getCourseData() {
vm.GET('portal/portalComponent/CourseList').then((res) => {
if( res.code == '000000') {
vm.courseIdSelect = res.data.courseList
}else {
vm.$message.info(res.message)
}
})
},
// 根据课程ID填充课程名称
changeCourseID(value) {
let courseName = ''
for(let i = 0;i<vm.courseIdSelect.length;i++) {
if(value == vm.courseIdSelect[i].id) {
courseName = vm.courseIdSelect[i].name
}
}
if(!vm.componentList.moduleModelList[vm.courseIndex].templetModelList[vm.courseIndex1].partModelList[vm.courseIndex2].partContentModelList[vm.courseIndex3].content1) {
vm.componentList.moduleModelList[vm.courseIndex].templetModelList[vm.courseIndex1].partModelList[vm.courseIndex2].partContentModelList[vm.courseIndex3].content1 = courseName
}
},
courseIDfocus(index,index1,index2,index3) {
vm.courseIndex = index
vm.courseIndex1 = index1
vm.courseIndex2 = index2
vm.courseIndex3 = index3
},
// 获取默认模板
getTemplateData() {
vm.GET('portal/portalComponent/TempletConfigList').then((res) => {
if( res.code == '000000') {
vm.templateDataList = res.data.templetConfigModelList
}else {
vm.$message.info(res.message)
}
})
},
// 通过编辑获取模块信息
getModuleData() {
vm.GET('portal/portalComponent/ModuleList',{componentId: vm.componentId}).then((res) => {
if( res.code == '000000') {
vm.componentList.moduleModelList = res.data.moduleModelList
}else {
vm.$message.info(res.message)
}
})
},
// 模块是否对外开放
selectIsOpen(index) {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(index == i) {
if(vm.componentList.moduleModelList[i].name) {
vm.GET('portal/portalComponent/checkModuleName',{name: vm.componentList.moduleModelList[i].name,openFlag: vm.componentList.moduleModelList[i].openFlag}).then((res) => {
if(res.code == '000000') {
if(res.data > 0) {
vm.componentList.moduleModelList[i].name = ''
vm.$message.info("模块名称已存在,请修改名称后保存")
}
}
})
}
break
}
}
},
// 删除tab
removeTab(targetName) {
for(let i = 0;i<vm.componentList.moduleModelList.length;i++) {
if((targetName - 1) == i) {
if(isNotEmptyUtils(vm.componentList.moduleModelList[i].templetModelList)) { // 模板不为空
vm.$confirm('删除模块会将改模块下已有模板同时删除,确认需要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if(vm.componentList.moduleModelList[i].id != '' && vm.componentList.moduleModelList[i].moduleType == 1) {
vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模块!')
}
vm.getModuleData()
vm.firstTab = i + ''
})
}else {
vm.componentList.moduleModelList.splice(i,1)
vm.firstTab = i + ''
}
}).catch(() => {
vm.$message({
type: 'info',
message: '已取消删除'
})
})
}else {
if(vm.componentList.moduleModelList[i].id) {
vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模块!')
}
vm.getModuleData()
vm.firstTab = i + ''
})
}else {
vm.componentList.moduleModelList.splice(i,1)
vm.firstTab = i + ''
}
}
break
}
}
},
// 添加空白模块
addModule() {
vm.componentList.moduleModelList.push({
id: '',
name: '',
openFlag: 1, // 1不开放 2开放
moduleType: 1, // 2为从预设模块中添加
templetModelList: []
})
},
// 添加模板
addTemplate(item,index) {
vm.templetIndex = vm.componentList.moduleModelList[index].templetModelList.length
vm.componentList.moduleModelList[index].templetModelList.push({
name: item.name,
type: item.type,
partModelList: []
})
for(let i = 0; i < item.partConfigModelList.length; i++) {
if(item.partConfigModelList[i].type == 1) { // 考试
vm.componentList.moduleModelList[index].templetModelList[vm.templetIndex].partModelList.push({
titleName: '',
type: 1, // 1考试 2课程
name: '',
id: '', // 新增时为空
seqNo: '',
conditionFlag: item.partConfigModelList[i].conditionFlag, // 1为没有限制 2有限制
numFlag: item.partConfigModelList[i].numFlag, // 1为单个 2为可以无限添加
templetSeqNo: '',
introduce: item.partConfigModelList[i].introduce,
partContentModelList: [{
certificateFlag: 1, // 是否有证书 1无 2有
id: '',
seqNo: '',
content1: '',
content2: '',
content3: '',
content4: ''
}]
})
}else if(item.partConfigModelList[i].type == 2) { // 课程
vm.componentList.moduleModelList[index].templetModelList[vm.templetIndex].partModelList.push({
titleName: '',
type: 2, // 1考试 2课程
name: '',
id: '', // 新增时为空
seqNo: '',
conditionFlag: item.partConfigModelList[i].conditionFlag, // 1为没有限制 2有限制
numFlag: item.partConfigModelList[i].numFlag, // 1为单个 2为可以无限添加
templetSeqNo: '',
introduce: item.partConfigModelList[i].introduce,
partContentModelList: [{
id: '',
seqNo: '',
content1: '',
content2: ''
}]
})
}
}
vm.templetIndex ++
},
// 删除模板
deleteTemplate(index,index1) {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(index == i) {
if(vm.componentList.moduleModelList[i].templetModelList[index1].id) {
vm.GET('portal/portalComponent/deletePortalTemplateById',{id: vm.componentList.moduleModelList[i].templetModelList[index1].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模板!')
vm.getModuleData()
}
})
} else {
vm.componentList.moduleModelList[i].templetModelList.splice(index1,1)
}
break
}
}
},
// 添加多个课程
addMatterCourse(index,index1,index2) {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(index == i) {
for(let j = 0; j < vm.componentList.moduleModelList[i].templetModelList.length; j++) {
if(index1 == j) {
for(let q = 0; q < vm.componentList.moduleModelList[i].templetModelList[j].partModelList.length;q++){
if(index2 == q) {
vm.componentList.moduleModelList[i].templetModelList[j].partModelList[q].partContentModelList.push({
id: '',
seqNo: '',
content1: '',
content2: ''
})
break
}
}
break
}
}
break
}
}
},
// 删除多个课程(多个考试)元件
deleteMatterCourse(index,index1,index2,index3) {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(index == i) {
for(let j = 0; j < vm.componentList.moduleModelList[i].templetModelList.length; j++) {
if(index1 == j) {
for(let q = 0; q < vm.componentList.moduleModelList[i].templetModelList[j].partModelList.length;q++){
if(index2 == q) {
if(vm.componentList.moduleModelList[i].templetModelList[j].partModelList[q].partContentModelList[index3].id) {
vm.GET('portal/portalComponent/deletePortalPartById',{id: vm.componentList.moduleModelList[i].templetModelList[j].partModelList[q].partContentModelList[index3].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模板元件内容!')
vm.getModuleData()
}
})
}else{
vm.componentList.moduleModelList[i].templetModelList[j].partModelList[q].partContentModelList.splice(index3,1)
}
break
}
}
break
}
}
break
}
}
},
// 模板下移
sortUp(index,index1) {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(index == i) {
if(index1 != vm.componentList.moduleModelList[i].templetModelList.length - 1) { // 判断是最后一个不能下移
let temp = vm.componentList.moduleModelList[i].templetModelList[index1]
vm.$set(vm.componentList.moduleModelList[i].templetModelList,index1,vm.componentList.moduleModelList[i].templetModelList[index1 + 1])
vm.$set(vm.componentList.moduleModelList[i].templetModelList,parseInt(index1+1),temp)
}
break
}
}
},
// 模板下移
sortDown(index,index1) {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(index == i) {
if(index1 != 0) { // 判断是第一个不能上移
let temp = vm.componentList.moduleModelList[i].templetModelList[index1]
vm.$set(vm.componentList.moduleModelList[i].templetModelList,index1,vm.componentList.moduleModelList[i].templetModelList[index1 - 1])
vm.$set(vm.componentList.moduleModelList[i].templetModelList,parseInt(index1-1),temp)
}
break
}
}
},
// 模块名称失去焦点校验
moduleNameValidate(index) {
let moduleValue = vm.componentList.moduleModelList[index].name
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(index != i && vm.componentList.moduleModelList[i].name != '') {
if(moduleValue == vm.componentList.moduleModelList[i].name) {
vm.componentList.moduleModelList[index].name = ''
vm.$message.info('模块名称已存在,请修改名称后保存')
}
}
}
},
// 完成(暂存)
finishConponent(flag) {
let req = null
if(flag == 2) {
req = {
id: vm.componentId,
status: 2
}
}else {
req = {
id: vm.componentId,
status: 1
}
}
if(vm.componentList.moduleModelList && vm.componentList.moduleModelList.length > 0) {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(flag == 2) { // 完成
if(!vm.componentList.moduleModelList[i].name) {
vm.$message.info("请输入模块名称")
return
}
if(isEmptyList(vm.componentList.moduleModelList[i].templetModelList)) {
vm.$message.info("模块内容不能为空")
return
}
for(let j = 0; j < vm.componentList.moduleModelList[i].templetModelList.length; j++) {
for(let k = 0; k < vm.componentList.moduleModelList[i].templetModelList[j].partModelList.length; k++) {
// 考试
if(vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].type == 1) {
if(!vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content1 || !vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content2) {
vm.$message.info( vm.componentList.moduleModelList[i].templetModelList[j].name + "中考试为空,请添加考试保存")
return
}
} else {
if(!vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content1 || !vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content2) {
vm.$message.info( vm.componentList.moduleModelList[i].templetModelList[j].name + "中课程为空,请添加课程保存")
return
}
}
}
}
}
vm.componentList.moduleModelList[i].componentId = vm.componentId
}
vm.finishModule(req,flag)
}else {
if(flag == 2) {
vm.$message.info("模块内容不能为空")
return
}else {
vm.finishModule(req,flag)
}
}
},
finishModule(req, flag) {
if(isNotEmptyList(vm.componentList.moduleModelList)) {
for(let i=0;i<vm.componentList.moduleModelList.length;i++) {
if(isNotEmptyList(vm.componentList.moduleModelList[i].templetModelList)) {
for(let j = 0;j<vm.componentList.moduleModelList[i].templetModelList.length;j++) {
for(let k=0;k<vm.componentList.moduleModelList[i].templetModelList[j].partModelList.length;k++) {
if(vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].type == 1) { // 考试
if(vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content4) {
for(let q = 0; q < vm.certificateIdSelect.length;q++) {
if(vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content4 == vm.certificateIdSelect[q].id) {
vm.componentList.moduleModelList[i].templetModelList[j].partModelList[k].partContentModelList[0].content3 = vm.certificateIdSelect[q].name
}
}
}
}
}
}
}
}
}
vm.$nextTick(() => {
for(let i=0;i<vm.componentList.moduleModelList.length;i++) {
if(!vm.componentList.moduleModelList[i].name) {
return
}else {
vm.POST('portal/portalComponent/insertOrUpdatePortalModule',{model: vm.componentList.moduleModelList,status: flag}).then((res) => {
if( res.code == '000000') {
vm.enableComponent(req, flag)
}
})
}
}
})
},
// 启用
enableComponent(req, flag) {
vm.GET('portal/portalComponent/disableOrStart',req).then((res) => {
if(res.code == "000000") {
if(flag == 2) {
vm.$router.push({ path: 'item-component' })
} else {
vm.$message.info("暂存成功!")
}
} else {
vm.$message({
message: res.message,
type: 'warning'
});
}
})
},
// 从资源包中添加模块
addFromModule() {
vm.columnFormVisible = true
vm.GET('portal/portalComponent/ModuleList',{openFlag: 2}).then((res) => {
if( res.code == '000000') {
vm.resourceArray = res.data.moduleModelList
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
vm.compareArray(vm.componentList.moduleModelList[i].id)
}
}
})
},
compareArray(id) {
for(let j = 0; j < vm.resourceArray.length; j++) {
if( id == vm.resourceArray[j].id) {
vm.resourceArray.splice(j,1)
}
}
},
// 选择资源包
selectChange(val) {
if(vm.resourceArray && vm.resourceArray.length > 0) {
for(let i = 0; i < vm.resourceArray.length; i++) {
if(val == vm.resourceArray[i].id) {
vm.dialogData = vm.resourceArray[i]
break
}
}
}
},
// 确定选择预设模块
submitDialog() {
vm.columnFormVisible = false
if(isNotEmptyUtils(vm.dialogData)) {
vm.dialogData.moduleType = 2
vm.dialogData.mappingId = null
vm.componentList.moduleModelList.push(vm.dialogData)
vm.firstTab = vm.componentList.moduleModelList.length + ''
vm.dialogData = []
vm.selectResource.resourceModuleSelect = ''
}
}
}
}
</script>
<style lang="scss">
.create-component-wrap {
.create-content {
background: #fff;
}
.first-step {
padding-top: 20px;
.el-form-item {
margin-bottom: 25px;
}
.bg-img {
width: 84px;
height: 100px;
}
.word-num {
font-size: 12px;
color: #999;
padding-top: 5px;
}
.bg-uploader {
img {
float: left;
}
.limit-text {
float: left;
margin-left: 10px;
padding-top: 20px;
p {
font-size: 12px;
color: #999;
}
}
}
.component-name {
color: #F56C6C;
font-size: 12px;
line-height: 1;
padding-top: 1px;
position: absolute;
top: 100%;
left: 0;
}
.basic-item-icon {
position: relative;
.require {
position: absolute;
left: 51px;
top: 4px;
color: #F56C6C;
}
.upload-message {
position: absolute;
left: 128px;
top: 105px;
font-size: 12px;
color: #F56C6C;
}
.img-delete {
position: absolute;
left: 0px;
top: 0px;
width: 84px;
height: 100px;
background: #000;
opacity: 0.7;
z-index: 999;
i {
color: #fff;
margin-top: 39px;
margin-left: 0px;
}
}
}
}
.step-content {
overflow: hidden;
height: 60px;
border-bottom: 1px solid #efefef;
.el-step.is-simple .el-step__head {
display: none;
}
.class-1 {
color: #449284;
border: 1px solid #449284 !important;
}
.class-2 {
color: #999;
border: 1px solid #999 !important;
}
.class-1-text .el-step__title{
color: #449284 !important;
}
.class-2-text .el-step__title{
color: #999 !important;
}
.el-steps--simple {
float: left;
padding: 20px 0 0 5%;
width: 350px;
background: #fff;
.el-step__icon {
display: none;
}
.el-step__title {
font-size: 12px;
}
.el-step.is-simple .el-step__arrow::after, .el-step.is-simple .el-step__arrow::before {
height: 11px;
}
.step-one, .step-two {
display: block;
font-size: 12px;
border: 1px solid #ccc;
border-radius: 50%;
width: 34px;
height: 18px;
margin-top: 3px;
margin-right: 10px;
text-align: center;
}
}
.btn-container {
float: right;
margin: 12px 20px 0;
span {
display: inline-block;
width: 40px;
line-height: 12px;
}
button:nth-child(2) span {
color: #fff;
}
}
}
.model-btn {
padding: 20px;
span {
color: #fff;
}
}
.tab-content {
.el-tabs__header {
margin-left: 20px;
.el-tabs__item {
font-size: 12px;
}
}
.template-btn {
background: #F3F3F3;
padding: 10px;
}
.template-content-div {
margin: 20px;
border-bottom: 1px dotted #ccc;
.title {
margin-bottom: 20px;
span {
float: right;
color: #666;
font-size: 12px;
}
}
.item-icon {
position: relative;
span.require {
position: absolute;
left: 37px;
top: 12px;
color: #F56C6C;
}
}
}
.matter-test,.train-test, .matter-train-test{
.tip {
font-size: 12px;
color: #aaa;
margin-left: 57px;
margin-bottom: 20px;
}
}
.partText {
font-size: 12px;
margin-left: 44px;
color: #999;
padding: 0px 0 15px;
}
}
.module-form {
.el-input__inner {
border: none;
}
.el-select .el-input__inner{
border: 1px solid #dcdfe6;
}
}
.el-dialog {
.el-dialog__header {
padding: 15px;
border-bottom: 1px solid #e1e1e1;
.el-dialog__title {
color: #449284;
font-size: 16px;
}
}
.el-dialog__footer {
text-align: center;
padding-top: 30px;
// border-top: 1px solid #e1e1e1;
}
.default-module {
border-bottom: 1px dotted #e1e1e1;
.dialog-template-content {
input {
border: none;
}
.el-form-item {
margin-bottom: 0px;
}
span {
font-size: 12px;
}
}
}
}
}
</style>
<template>
<div class="item-component-wrap">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond">
</bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="search-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="serchForm" :model="searchParam" label-width="75px" style="width:100%;">
<el-col :span="6">
<el-form-item label="组件名称:">
<el-input v-model="searchParam.name" size="small" placeholder="请输入组件名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="发布状态:">
<el-select v-model="searchParam.status" size="small" style="width: 100%;" placeholder="请选择发布状态">
<el-option
v-for="(item,index) in statuSelect"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" style="padding:0;text-align:right;padding-right:15px;">
<el-button type="primary" size="small" @click="search(1)">查询</el-button>
<el-button type="default" size="small" @click="reseat" style="margin-left:0;">重置</el-button>
</el-col>
</el-form>
</el-row>
<el-row :gutter="10" class="row create-button" style="margin-right:0;">
<el-button type="primary" size="small" :disabled="idType == 2 && masterAdministratorFlag == 'false'" @click="createComponent">新建项目组件</el-button>
</el-row>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column prop="id" label="ID编号" min-width="100" align="center"></el-table-column>
<el-table-column prop="name" label="组件名称" min-width="200" align="center"></el-table-column>
<el-table-column prop="createdName" label="发起人" min-width="100" align="center"></el-table-column>
<el-table-column prop="status" label="状态" min-width="80" align="center">
<template slot-scope="scope">
<span>{{ scope.row.status | statusFileter }}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editComponentList(scope.row)">编辑</el-button>
<el-button type="primary" v-if="scope.row.status == 2 || scope.row.status == 4" size="small" @click="enableAndDisable(scope.row,1)">启用</el-button>
<el-button type="primary" v-if="scope.row.status == 3" size="small" @click="enableAndDisable(scope.row,2)">禁用</el-button>
<el-button type="primary" v-if="scope.row.status == 1 || scope.row.status == 2" size="small" @click="deleteComponent(scope.row)">删除</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png" />
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
<!-- 分页 -->
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchParam.pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]"
:page-size="searchParam.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from '../../components/breadcrumb.vue'
import { doUpload, getFilePath } from "../../utils/qiniu-util"
import { validateWord } from "../../utils/validate.js"
import { mapGetters } from 'vuex'
import { openLoading, closeLoading } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
let vm = null
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: '教培项目',
curmbSecond: '项目组件',
idType:'',
masterAdministratorFlag: false,
searchParam: {
idType: '',
name: '',
status: '',
pageNo: 1,
pageSize: 15
},
statuSelect: [
{
label: '草稿',
value: '1'
},{
label: '未启用',
value: '2'
},{
label: '已启用',
value: '3'
},{
label: '已禁用',
value: '4'
}
],
tableData: [],
totalRows: 0,
basicRule: {
"name": [
{ required: true, message: '输入长度为2-20个中文', trigger: 'blur' },
{ validator: function(rule, value, callback) {
validateWord(rule, value, callback, '输入长度为2-20个中文')
},
trigger: 'blur' }
],
"introduce": [
{ required: true, message: '请输入组件简介', trigger: 'blur' },
],
}
}
},
computed: {
...mapGetters([
'_token',
// 'idType',
// 'masterAdministratorFlag'
])
},
created() {
vm = this
vm.search()
vm.idType = localStorage.getItem('storageIdType')
vm.masterAdministratorFlag = localStorage.getItem('storageMaster')
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 列表查询
search(flag) {
if(flag) vm.searchParam.pageNo = 1
vm.searchParam.idType = vm.idType
openLoading(vm)
vm.GET('portal/portalComponent/queryPortalComponent',vm.searchParam).then((res) => {
closeLoading(vm)
if( res.code == '000000' ) {
vm.tableData = res.data.queryList
vm.totalRows = res.data.total
}else {
vm.$message.info(res.message)
}
})
},
// 重置
reseat() {
vm.searchParam = Object.assign({},{
idType: '',
name: '',
status: '',
pageNo: 1,
pageSize: 15
})
vm.search()
},
// 新建组件
createComponent() {
vm.$router.push({path: 'create-component'})
},
// 编辑(验证可编辑范围)
editComponentList(row) {
let req = {
token: vm._token,
componentId: row.id
}
vm.GET('portal/portalComponent/componentEditRange',req).then((res) => {
if(res.code == "000000") {
vm.$router.push({path: 'create-component',query: {id:row.id,status: row.status,resultFlag: res.data.resultFlag}})
}else {
vm.$message.info(res.message)
}
})
},
// 启用(禁用)
enableAndDisable(row,flag) {
let req = null
let text = ''
if(flag == 1) { // 启用
req = {
id: row.id,
status: 3
}
text = '组件一经启用,将无法进行修改,确定启用吗?'
}else if(flag == 2) { // 禁用
req = {
id: row.id,
status: 4
}
text = '确定禁用吗?'
}
vm.$confirm(text, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vm.GET('portal/portalComponent/disableOrStart',req).then((res) => {
if(res.code == "000000") {
vm.$message({
type: 'success',
message: '操作成功!'
});
vm.search()
if(res.message != 'success') {
vm.$message({
message: res.message,
type: 'warning'
})
}
}else {
vm.$message.info(res.message)
}
}).catch(function (error) {
vm.$message.error(error);
});
}).catch(() => {
vm.$message({
type: 'info',
message: '已取消'
});
});
},
// 删除
deleteComponent(row) {
vm.$confirm('确定要删除该组件吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vm.GET('portal/portalComponent/deleteComponentById',{id: row.id}).then((res) => {
if(res.code == "000000") {
vm.$message({
type: 'success',
message: '删除成功!'
});
vm.search()
} else {
vm.$message.info(res.message)
}
}).catch(function (error) {
vm.$message.error(error);
});
}).catch(() => {
vm.$message({
type: 'info',
message: '已取消'
})
})
},
handleSizeChange(value) {
vm.searchParam.pageSize = value
vm.search()
},
handleCurrentChange(value) {
vm.searchParam.pageNo = value
vm.search()
}
}
}
</script>
<style lang="scss">
.item-component-wrap {
.component-content {
padding: 10px;
background: #fff;
// margin: 84px 20px 20px;
.search-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.create-button {
padding: 0 0 15px;
margin-top: 0 !important;
text-align: right;
}
.table-empty {
img{
width: 100px;
}
p {
margin-top: -50px;
}
}
}
}
</style>
<template>
<div class="item-manager-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="header-title">项目管理</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="formInline" :model="formInline" label-width="75px" style="width:100%;">
<el-col :span="5">
<el-form-item label="项目名称:">
<el-input v-model="formInline.projectName" size="small" placeholder="请输入项目名称"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item label="项目时间:">
<el-date-picker
v-model="formInline.duringTime"
size="small"
type="daterange"
start-placeholder="请选择开始时间"
end-placeholder="请选择结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
</el-col>-->
<el-col :span="6">
<el-form-item label="项目时间:">
<el-date-picker
v-model="formInline.projectBegintime"
size="small"
type="datetime"
placeholder="请选择开始时间"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions0"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="~">
<el-date-picker
v-model="formInline.projectEndtime"
size="small"
type="datetime"
placeholder="请选择结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions1"
default-time="23:59:59"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" style="padding:0;text-align:right;padding-right:15px;">
<el-button type="primary" size="small" @click="searchList">查询</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">重置</el-button>
</el-col>
</el-form>
</el-row>
<el-row>
<el-col :span="5">
<el-form ref="formInline" :model="formInline" label-width="75px" style="width:100%;">
<el-form-item label="发布状态:">
<el-select size="small" v-model="formInline.projectStatus" placeholder="请选择发布状态">
<el-option
v-for="item in optionStatus"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-form :model="formInline" class="demo-form-inline">
<el-form-item>
<el-button class="add-button" :disabled="idType == 2 && masterAdministratorFlag == 'false'" size="small" type="primary" @click="toPage()">新建项目</el-button>
</el-form-item>
</el-form>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="id" label="ID编号" min-width="100" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdName" label="创建人" align="center"></el-table-column>
<el-table-column
prop="projectIntro"
label="项目简介"
align="center"
min-width="100"
show-overflow-tooltip
></el-table-column>
<el-table-column prop="projectBegintime" label="项目开始时间" min-width="90" align="center"></el-table-column>
<el-table-column prop="projectEndtime" label="项目结束时间" min-width="90" align="center"></el-table-column>
<el-table-column prop="projectStatus" label="状态" align="center">
<template slot-scope="scope">
<span>{{ [scope.row.projectStatus , idType] | statusProject }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="200" align="center">
<template slot-scope="scope">
<el-button
@click="changeStatus(scope.row,0)"
v-show="showButton(scope.row,0)"
type="primary"
size="small"
>编辑</el-button>
<el-button
@click="changeStatus(scope.row,1)"
v-show="showButton(scope.row,1)"
type="primary"
size="small"
>暂存</el-button>
<el-button
@click="changeStatus(scope.row,2)"
v-show="showButton(scope.row,2)"
type="primary"
size="small"
>完成</el-button>
<el-button
@click="changeStatus(scope.row,3)"
v-show="showButton(scope.row,3)"
type="primary"
size="small"
>上架</el-button>
<el-button
@click="changeStatus(scope.row,4)"
v-show="showButton(scope.row,4)"
type="primary"
size="small"
>通过</el-button>
<el-button
@click="changeStatus(scope.row,5)"
v-show="showButton(scope.row,5)"
type="primary"
size="small"
>下架</el-button>
<el-button
@click="changeStatus(scope.row,7)"
v-show="showButton(scope.row,7)"
type="primary"
size="small"
:disabled="scope.row.checkStatus==1"
>提醒审核</el-button>
<el-button
@click="changeStatus(scope.row,8)"
v-show="showButton(scope.row,8)"
type="primary"
size="small"
>取消审核</el-button>
<el-button
@click="changeStatus(scope.row,6)"
v-show="showButton(scope.row,6)"
type="primary"
size="small"
>拒绝</el-button>
<el-button
@click="delItem(scope.row,9)"
v-show="showButton(scope.row,9)"
type="primary"
size="small"
>删除</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formInline.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="formInline.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain";
import { mapGetters } from 'vuex'
import { returnData } from "../../utils/mock";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
import { setTimeout } from 'timers';
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
idValue: '',
curmbFirst: "教培项目",
curmbSecond: "项目管理",
searchParam: {
name: "",
status: "",
pageNo: 1,
pageSize: 10
},
optionStatus: [
{
value: 1,
label: "草稿"
},
{
value: 2,
label: "未上架"
},
{
value: 3,
label: "审核中/待审核"
},
{
value: 4,
label: "已上架"
},
{
value: 5,
label: "已下架"
},
{
value: 6,
label: "已拒绝/未上架"
}
],
tableData: [],
totalRows: 0,
loading: true,
timingTime: "",
currentPage: 1,
formInline: {
projectName: "",
projectBegintime: "",
projectEndtime: "",
projectStatus: "",
pageNo: 1,
pageSize: 10
},
pickerOptions0: {
disabledDate: time => {
if (this.formInline.projectEndtime != "" && this.formInline.projectEndtime !=null) {
return (
time.getTime() >
new Date(this.formInline.projectEndtime).getTime()
);
}
}
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() <
new Date(this.formInline.projectBegintime).getTime()
); //减去一天的时间代表可以选择同一天;
}
},
idType: '',
masterAdministratorFlag: false
};
},
computed: {
...mapGetters([
"_token",
// "idType",
// "masterAdministratorFlag"
])
},
created() {
vm = this;
vm.idType = localStorage.getItem('storageIdType');
vm.masterAdministratorFlag = localStorage.getItem('storageMaster');
console.log('idType:',vm.idType);
this.$nextTick(function() {;
this.getProjectList();
});
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
toPage() {
this.$router.push("add-manager");
},
searchList() {
this.formInline.pageNo = 1;
this.getProjectList();
},
//查询项目列表
getProjectList() {
let req = {};
req = this.formInline;
openLoading(vm);
vm.GET("portal/portalInfo/getProjectList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data.data;
//console.log(vm.tableData);
vm.totalRows = res.data.totalRows;
}
});
},
//按钮展示情况
showButton(row, type) {
// 按钮type类型: 0-编辑
// 1-暂存 2-完成 3-上架 4-通过 5-下架 6-拒绝
// 7- 提醒审核 8(2)-取消审核 9-删除
let projectStatus = row.projectStatus;
let idType = row.idType;
let level = row.level;
let flag = false;
let typeStr = parseInt(type);
//console.log("状态:"+projectStatus+ "等级:" + level + " 按钮类型:" + type);
//console.log('idType',idType);
let buttonStatus = "";
if (idType == 1) {
//内部项目
buttonStatus = returnData().buttonStatusIn;
} else {
//外部项目
buttonStatus = returnData().buttonStatusOut;
}
if (level != null) {
let statusSet = buttonStatus[projectStatus - 1][level];
let flagValue = statusSet.indexOf(typeStr);
if (flagValue >= 0) {
flag = true;
} else {
flag = false;
}
}
//flag = true;
return flag;
},
//改变状态
changeStatus(row, type) {
let projectId = row.id;
let level = row.level;
if (type === 0) {
//编辑
this.$router.push("add-manager?projectId=" + projectId +"&level="+level);
} else if (type === 7) {
//提醒审核
let req = {
portalProjectId: projectId,
warnType: 1
};
vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
vm.$message.info(res.message);
vm.getProjectList();
if (res.code == "000000") {
console.log(res);
//vm.getProjectList();
}
});
} else {
if (type === 8) {
//取消审批值对应2
type = 2;
let req = {
portalProjectId: projectId,
warnType: 5
};
vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
console.log(res);
vm.getProjectList();
}
});
}
if (type == 4 || type == 6) {
//发送消息
let warnType = "";
if (type == 4) {
warnType = 3;
} else if (type == 6) {
warnType = 4;
}
let req = {
portalProjectId: projectId,
warnType: warnType
};
vm.GET("portal/portalCheck/remindPortalCheck", req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
console.log(res);
vm.getProjectList();
}
});
}
let req = {
projectId: projectId,
changeStatus: type
};
vm.POST("portal/portalInfo/changeStatus", req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
console.log(res);
vm.getProjectList();
}
});
}
},
//删除项目
delItem(row) {
let req = {};
console.log(row);
vm.DELETE("portal/portalInfo/delete/" + row.id, req).then(res => {
vm.$message.info(res.message);
if (res.code == "000000") {
console.log(res);
vm.getProjectList();
}
});
},
//重置表单
resetForm() {
vm.formInline = Object.assign(
{},
{
projectName: "",
projectBegintime: "",
projectEndtime: "",
projectStatus: "",
pageNo: 1,
pageSize: 10,
duringTime: ""
}
);
vm.getProjectList();
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.formInline.pageSize = val;
this.handleCurrentChange(this.searchParam.pageNo);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.formInline.pageNo = val;
this.getProjectList();
//需要判断是否检索
// if (!this.flag) {
// this.currentChangePage(this.tableDataEnd);
// } else {
// this.currentChangePage(this.filterTableDataEnd);
// }
}, //组件自带监控当前页码
currentChangePage(list) {
let from = (this.currentPage - 1) * this.pageSize;
let to = this.currentPage * this.pageSize;
this.tableDataEnd = [];
for (; from < to; from++) {
if (list[from]) {
this.tableDataEnd.push(list[from]);
}
}
}
}
};
</script>
<style lang="scss">
.item-manager-wrap {
.component-content {
background: #fff;
//margin-top: 88px;
padding: 10px;
.header-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
// .table-option span {
// color: #409eff;
// }
.add-button {
float: right;
}
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="home-wrap">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="message-content">
<el-row>
<el-col class="visitor" :span="24" v-if="tableData.length > 0">
<div class="visitor-title">
<div class="title">今日随访:<span style="color:#449284;">10人</span></div>
<span class="visitor-more" @click="lookMore">查看更多</span>
</div>
<div class="visitor-info">
<el-table
:data="tableData"
style="width: 100%">
<el-table-column prop="date" label="预约时间" min-width="30"></el-table-column>
<el-table-column prop="name" label="姓名" min-width="20"></el-table-column>
<el-table-column prop="style" label="随访方式" min-width="30"></el-table-column>
<el-table-column prop="content" label="随访内容"></el-table-column>
</el-table>
</div>
</el-col>
<el-col class="message screenSet" :span="24" id="screenSet">
<div class="message-title">系统消息 <span>今日消息:{{count}}</span></div>
<div class="message-info" v-if="messageList.length > 0">
<div class="message-item" v-for="(item,index) in messageList" :key="index">
<div class="text-top">
<img :src="item.url"/>
<span>{{item.menuName}}</span>
<span>{{item.portalTime}}</span>
</div>
<div class="text-bottom">{{item.content}}</div>
</div>
</div>
<div class="no-message" v-else>
<div>
<img src="../assets/image/noData.png"/>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import BreadCrumb from '../components/breadcrumb.vue'
import { setTimeout, setInterval } from 'timers'
import { mapGetters } from 'vuex'
import * as commonUtil from '../utils/utils'
let vm = null
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: '数据总览',
spanFirstNum: 12,
spanSecondNum: 12,
tableData: [],
count: 0,
messageList:[]
}
},
created() {
vm = this
vm.getSystemData()
},
computed: {
...mapGetters([
'_token'
])
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight()
},
methods: {
// 查看更多
lookMore() {
},
// 获取系统消息数据
getSystemData() {
vm.GET('portal/portalMessage/queryPortalMessageInfo',{token: vm._token, pageNo: 1, pageSize: 15}).then((res) => {
if( res.code == '000000') {
vm.messageList = res.data.portalMessageModels
vm.count = res.data.count
} else {
vm.$message.info(res.message)
}
})
}
}
}
</script>
<style lang="scss">
.home-wrap {
.message-content {
.visitor {
padding: 0 25px 30px;
margin-bottom: 20px;
background: #fff;
// min-height: 348px;
.visitor-title {
height: 80px;
line-height: 80px;
margin-right: 20px;
text-align: right;
.title {
float: left;
font-size: 20px;
}
.visitor-more {
font-size: 12px;
color: #449284;
border: 1px solid rgba(68,146,132,0.3);
padding: 5px 14px;
border-radius: 3px;
background: rgba(68,146,132,0.06);
}
}
.visitor-info {
margin-right: 20px;
}
}
.message {
padding: 0 25px 30px;
background: #fff;
// min-height: 436px;
.message-title {
font-size: 20px;
height: 80px;
line-height: 80px;
span {
font-size: 14px;
color: #717377;
margin-left: 8px;
}
}
.message-info {
padding: 7px;
.message-item {
padding: 10px 10px 15px;
border-bottom: 1px solid #EBEEF5;
.text-top {
img {
float: left;
width: 16px;
margin-top: 3px;
}
span:nth-child(2) {
padding: 10px;
}
span:nth-child(3) {
font-size: 12px;
color: #999;
}
}
.text-bottom {
font-size: 14px;
color: #666;
margin-top: 15px;
}
}
}
}
.no-message {
text-align: center;
img {
width: 100px;
margin-top: 17%;
}
}
}
}
</style>
<template>
<div class="footer-wrap">
<span>Copyright© 2019 云鹊医疗科技 (上海) 有限公司</span>
<span>沪ICP:16018581号-1</span>
<span><img src="../../assets/image/footer-icon.png"/>京ICP备:14044861号</span>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss">
.footer-wrap {
text-align: center;
height: 75px;
line-height: 75px;
font-size: 12px;
color: #838486;
span {
padding: 0 10px;
}
img {
width: 12px;
padding-right: 5px;
}
}
</style>
<template>
<div class="header-container">
<div class="logo">
<img src="../../assets/image/index_logoicon.png"/>
<p>消息中心</p>
</div>
<div class="user-info">
<el-dropdown trigger="click" @command="handleCommand">
<div class="el-dropdown-link">
<img class="user-logo" :src="portrait">
<span id="headName">{{userName}}</span><i class="el-icon-caret-bottom"></i>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="logout">注销</el-dropdown-item>
<!-- <el-dropdown-item command="forward">返回云鹊医首页</el-dropdown-item> -->
</el-dropdown-menu>
</el-dropdown>
</div>
<!--导航-->
<div class="user-info">
<el-dropdown trigger="click" @command="handleCommand">
<span class="el-dropdown-link">
{{'系统切换'}}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item in systemInfoList" :key="item.id">
<span class="menu-item" @click="forward(item)">{{item.systemName}}</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</template>
<script>
import { getLoginUrl,getInnerLoginUrl, getYunQueYiUrl } from '../../utils/index.js'
import { mapGetters } from 'vuex'
import { base64encode, openLoading, closeLoading, logout, errorResponseCheck } from "../../utils/utils";
let vm = null
export default {
props: {
portrait: {
type: String
},
userName: {
type: String
},
idType: {
type: Number
}
},
data() {
return {
name: '',
systemInfoList: []
}
},
computed: {
...mapGetters([
'_token'
])
},
created() {
vm = this;
this.getSystemType();
},
methods: {
removeToken(data){
return vm.POST("contents/login/forward_page", data)
},
handleCommand(command) {
if (command === 'logout') {
// let req = {token: localStorage.getItem("storageToken")};
// let logOutPromise = vm.removeToken(req);
// logOutPromise.then(function (res) {
// logout();
// }).catch(function (error) {
// console.log('登出失败:'+error);
// logout();
// });
localStorage.removeItem('storageToken')
if(vm.idType == 1) { // 内部
window.location.href = getInnerLoginUrl()
} else {
window.location.href = getInnerLoginUrl()
// window.location.href = getLoginUrl('?from=work&type=logout')
}
}
if(command === 'forward') {
window.location.href = getYunQueYiUrl()
}
},
async getSystemType() {
let self = this;
//请求参数
let req = {
// system_type: localStorage.getItem("system_type"),
system_type: 27,
};
let headers = {
headers: {
'token': localStorage.getItem('token') || null
}
};
vm.POST("contents/login/header", req).then(res => {
if(res.code === '201550'){
/*messageBox(self, "登录", "登录失效,请重新登录!", "是", function () {
logout();
}, "", null);*/
}else{
self.systemInfoList = res.data.systemInfoList;
localStorage.setItem("user_name", res.data.userName);
if(document.getElementById('headName').innerText == undefined ||
document.getElementById('headName').innerText == ''){
document.getElementById('headName').innerText =localStorage.getItem("user_name")
}
}
});
},
forwardPage(data,self){
let headers = {
headers: {
'token': localStorage.getItem('token') || null
// header('Access-Control-Allow-Origin:*')
}
};
return vm.POST("contents/login/forward_page", data)
},
forward(obj) {
let self = this;
if (obj.systemNameAbbreviation.toLowerCase() === "sso") {
window.location.href = obj.domainName + "pica_index.html";
} else {
let req = {
// token: localStorage.getItem("token"),
system_type: obj.id
};
openLoading(self);
let promise = vm.forwardPage(req,self)
promise.then(function (data) {
closeLoading(self);
let forwardData = JSON.parse(JSON.stringify(data));//通过这个实现深拷贝
console.log('forwardPage值:',forwardData)
let url = forwardData.data.picapMenuModels[0].url;
if (url.length > 1) {
// window.location.href = url;
} else {
url = forwardData.data.picapMenuModels[0].picapSecondMenus[0].url;
if (url.length > 1) {
// window.location.href = url;
} else {
url = forwardData.data.picapMenuModels[0].picapSecondMenus[0].picapThirdMenus[0].url;
}
}
let param = "token=" + localStorage.getItem("storageToken") + "&ssoOrigin=" + localStorage.getItem("ssoOrigin") + "&system_type=" + obj.id;
window.location.href = obj.domainName + url + "?" + base64encode(param);
}, function (error) {
errorResponseCheck(error, self);
});
}
},
}
}
</script>
<style lang="scss">
.header-container {
position: relative;
left: 0;
top: 0;
box-sizing: border-box;
height: 64px;
width: 100%;
// z-index: 99999; // 这个值太大了,导致头像错误的浮在弹层上面,故调整成下面的值
z-index: 900;
font-size: 22px;
line-height: 64px;
color: #fff;
// background-color: #242f42;
.logo {
float: left;
width: 255px;
text-align: center;
color: #fff;
background: #0B2F3F;
img{
width: 24px;
float: left;
margin-left: 24px;
margin-top: 21px;
}
p {
text-align: left;
margin-left: 60px;
}
}
.user-info {
float: right;
padding-right: 50px;
font-size: 16px;
color: #838683;
.el-dropdown-link {
position: relative;
display: inline-block;
padding-left: 50px;
color: #838683;
cursor: pointer;
vertical-align: middle;
font-size: 14px;
}
.user-logo {
position: absolute;
left: 16px;
top: 20px;
width: 24px;
height: 24px;
border-radius: 50%;
}
.el-icon--right, #headName,.line, #login-out{
font-size: 14px;
}
.line {
display: inline-block;
padding: 0 10px;
}
}
}
.el-dropdown-menu__item {
text-align: center;
}
.menu-item {
font-size: 14px;
font-weight: 300;
color: #606266;
}
</style>
<template>
<div id="slidebar-container" class="slidebar-container">
<el-menu :default-active="onRoutes" class="el-menu-vertical-demo" theme="dark" unique-opened router>
<template v-for="(item,_index) in items">
<template v-if="item.subs">
<el-submenu :index=" 'index_' + _index" :key="item.index">
<template slot="title"><i :class="item.icon"></i>{{item.title}}</template>
<el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="subItem.index">
<i class="sub-icon" :class="subItem.icon"></i>
{{subItem.title}}
</el-menu-item>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i>{{ item.title }}
</el-menu-item>
</template>
</template>
</el-menu>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { setTimeout } from 'timers'
import { isNotEmptyUtils } from '../../utils/utils'
let vm = null
export default {
props: {
tokenValue: {
type: String
},
authList: {
type: Object,
default: () => {}
}
},
data() {
return {
items: [
// {
// title: 'APP推送',
// icon: 'el-icon-message',
// index: 'item',
// subs: [
// {
// title: '创建APP推送',
// icon: 'el-icon-message',
// index: 'create-push'
// },
// {
// title: 'APP推送历史',
// icon: 'el-icon-message',
// index: 'history-push'
// },
// ]
// },
{
title: '创建APP推送',
icon: 'el-icon-document-add',
index: 'create-push'
},{
title: 'APP推送历史',
icon: 'el-icon-history-push',
index: 'history-push'
},{
title: '策略管理',
icon: 'el-icon-stratety-manage',
index: 'strategy-manage'
},{
title: '短信历史',
icon: 'el-icon-chat-line-square',
index: 'msg-history'
},{
title: '黑名单',
icon: 'el-icon-blacklist',
index: 'blacklist'
},{
title: '疲劳度控制',
icon: 'el-icon-set-up',
index: 'fatigue-control'
}
]
}
},
computed: {
onRoutes() {
return this.$route.path.replace('/', '');
}
},
created() {
vm = this
},
watch: {
authList(newVal, oldVal){
if(!newVal.P001) { // 项目管理
vm.items[1].subs[1].index = 'blank'
}
if(!newVal.P002) { // 组件管理
vm.items[1].subs[0].index = 'blank'
}
if(!newVal.P003) { // 角色管理
vm.items[2].subs[0].index = 'blank'
}
}
},
methods: {
}
}
</script>
<style lang="scss">
@mixin el-icon-config{
width: 18px;
height: 18px;
margin: 0 8px 0 3px ;
background-size: 18px 18px;
}
.slidebar-container {
display: block;
position: absolute;
left: 0;
top: 64px;
bottom: 0;
width: 255px;
background: #06232C;
.el-menu {
background: #06232C;
border-right: none;
.sub-icon {
font-size: 12px;
}
.el-menu-item, .el-submenu__title {
color: #8FA4AC;
}
.el-menu-item.is-active {
color: #fff;
background: #509284 !important
}
.el-menu-item:hover,
.el-submenu__title:hover,
.slidebar-container .el-menu .el-menu-item:hover,
.slidebar-container .el-menu .el-submenu__title:hover {
color: #fff;
background: #06232C;
}
// .el-menu-item:focus, .el-menu-item:hover {
// background: #06232C !important;
// }
// APP推送历史
.el-icon-history-push{
background: url('../../assets/image/history-push.png');
@include el-icon-config;
}
.is-active .el-icon-history-push{
background: url('../../assets/image/history-push-selected.png');
@include el-icon-config;
}
// 策略管理
.el-icon-stratety-manage{
background: url('../../assets/image/stratety-manage.png');
@include el-icon-config;
}
.is-active .el-icon-stratety-manage{
background: url('../../assets/image/stratety-manage-selected.png');
@include el-icon-config;
}
// 黑名单
.el-icon-blacklist{
background: url('../../assets/image/blacklist.png');
@include el-icon-config;
}
.is-active .el-icon-blacklist{
background: url('../../assets/image/blacklist-selected.png');
@include el-icon-config;
}
}
}
</style>
<template>
<div class="blacklist-wrap">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<el-form ref="searchReq" :model="searchReq" :rules="searchReqRules" label-width="77px" style="overflow: hidden;">
<el-form-item label="手机号" prop="aimNo" style="width: 200px; float: left;">
<el-input v-model.number="searchReq.aimNo" placeholder="请输入手机号" maxlength="11"></el-input>
</el-form-item>
<el-form-item label="恶意行为" style="width: 200px; float: left;">
<el-input v-model="searchReq.remark" placeholder="请输入" ></el-input>
</el-form-item>
<el-form-item label="记录时间" style="width: 470px; float: left;">
<el-date-picker
v-model="duringTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<div style="float: right; margin-right: 28px;">
<el-button type="primary" style="float: left; margin: 0 10px 10px 0;" @click="handleSearch('searchReq')">搜索</el-button>
<el-button type="primary" style="float: left; margin: 0 10px 10px 0;" @click="handleRefresh">刷新</el-button>
</div>
<div style="overflow: hidden; clear: both; float: right; margin-right: 28px;">
<el-button type="primary" style="float: left; margin: 0 10px 10px 0;" @click="showAddModal">添加</el-button>
</div>
</el-form>
<div style="padding: 0 40px;">
<el-table
:data="tableData"
border
style="width: 100%;">
<el-table-column
align="center"
prop="aimNo"
label="手机号"
>
</el-table-column>
<el-table-column
align="center"
prop="remark"
label="恶意行为"
>
</el-table-column>
<el-table-column
align="center"
prop="modifyTime"
label="记录时间"
>
<template slot-scope="scope">
{{ returnModifyTime(scope.row.modifyTime) }}
</template>
</el-table-column>
<el-table-column
align="center"
prop="modifyName"
label="操作人"
>
</el-table-column>
<el-table-column
align="center"
label="操作"
>
<template slot-scope="scope">
<el-button
@click.native.prevent="showDeleteModal(scope.row)"
type="text">
移除
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchReq.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="searchReq.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
<el-dialog
title="添加黑名单"
:visible.sync="centerDialogVisible"
:close-on-click-modal="false"
width="700px"
@close="handleCancelAdd"
center>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="手机号" prop="aimNo" style="width: 600px;">
<el-input v-model.number="ruleForm.aimNo" placeholder="请输入" maxlength="11" show-word-limit></el-input>
</el-form-item>
<el-form-item label="恶意行为" prop="remark" style="width: 600px;">
<el-input v-model="ruleForm.remark" placeholder="请输入" maxlength="30" show-word-limit></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCancelAdd">取 消</el-button>
<el-button type="primary" @click="confirmAddBlacklist('ruleForm')">确 定</el-button>
</span>
</el-dialog>
<!-- 删除 弹窗 -->
<el-dialog
:visible.sync="deleteDialogVisible"
:close-on-click-modal="false"
width="400px"
center>
<span>确认移除?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="deleteDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="confirmDeleteRow">确 定</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "../../components/breadcrumb.vue";
export default {
components: {
BreadCrumb,
},
data() {
var checkPhone = (type, value, callback) => {
// debugger;
if (!Number.isInteger(value)) {
if( type == 'search' ){
this.searchReq.aimNo = '';
}else{
this.ruleForm.aimNo = '';
}
callback(new Error('手机号必须是以1开头的11位纯数字'));
} else{
value += '';
let arr = value.split('');
if(value.length >= 1){
if( arr[0] != '1' ){
callback(new Error('手机号必须是以1开头的11位纯数字'));
}else{
if( value.length != 11 ){
callback(new Error('手机号必须是以1开头的11位纯数字'));
}else{
callback();
}
}
}else{
callback();
}
}
};
var checkUnnecessaryMobile = (rule, value, callback) => {
if (value) {
checkPhone('search', value, callback);
}else{
if(typeof value != 'undefined' && value === 0){
return callback(new Error('手机号必须是以1开头的11位纯数字'));
};
callback();
}
};
var checkMobile = (rule, value, callback) => {
// debugger;
if(!value){
if(typeof value != 'undefined' && value === 0){
return callback(new Error('手机号必须是以1开头的11位纯数字'));
};
return callback(new Error('请填写手机号'));
}else{
checkPhone('addBlackList', value, callback);
}
};
return {
curmbFirst: "黑名单",
duringTime: "",
centerDialogVisible: false,
tableData: [],
searchReqRules: {
aimNo: [
{ validator: checkUnnecessaryMobile }
],
},
rules: {
aimNo: [
{ required: true, message: '请填写手机号', trigger: 'blur' },
{ validator: checkMobile }
],
remark: [
{ required: true, message: '请填写恶意行为', trigger: 'blur' },
],
},
ruleForm: {
aimNo: '',
remark: '',
},
totalRows: 0,
searchReq: {
aimNo: '', // 手机号
remark: '', // 恶意行为
startTime: '',
endTime: '',
pageNo: 1,
pageSize: 10,
},
deleteDialogVisible: false,
}
},
created() {
this.getBlackList();
},
methods: {
showAddModal() {
this.centerDialogVisible = true ;
},
handleCancelAdd() {
this.centerDialogVisible = false;
this.resetForm('ruleForm');
},
confirmAddBlacklist(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.handleEditSave();
} else {
console.log('error submit!!');
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
handleEditSave() {
// request
let req = this.ruleForm;
openLoading(this);
this.POST('raytheon/black/save', req).then((res) => {
closeLoading(this);
if( res && res.code && res.code == '000000') {
// console.log('>>>>>> 移除当前行数据 OK ', req);
this.centerDialogVisible = false;
this.getBlackList();
this.resetForm('ruleForm');
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
})
},
handleSearch(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.getBlackList();
} else {
console.log('error submit!!');
return false;
}
});
},
// 刷新
handleRefresh() {
let options = {
isRefresh: true
};
this.getBlackList( options );
},
getBlackList(options) {
if( options && options.isRefresh ){ // 刷新 请求参数置为默认
this.searchReq = {
aimNo: '', // 手机号
remark: '', // 恶意行为
startTime: '',
endTime: '',
pageNo: 1,
pageSize: 10,
};
this.duringTime = '';
}else{
// 时间获取
// console.log('this.duringTime',this.duringTime);
if(this.duringTime!=='' && this.duringTime!==null) {
this.searchReq.startTime = this.duringTime[0].getTime();
this.searchReq.endTime = this.duringTime[1].getTime();
} else {
this.searchReq.startTime = '';
this.searchReq.endTime = '';
}
}
let req = this.searchReq;
openLoading(this);
this.GET("raytheon/black/list", req).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
// console.log('get blackList>>>>> ', res);
if( res && res.data ){
this.totalRows = res.data.total || 0;
this.tableData = res.data.list || [];
}
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
handleSizeChange(val){
this.searchReq.pageSize = val;
this.getBlackList();
},
handleCurrentChange(val) {
this.searchReq.pageNo = val;
this.getBlackList();
},
returnModifyTime(modifyTime) {
if( modifyTime ){
return modifyTime.year + '-' + modifyTime.monthValue + '-' + modifyTime.dayOfMonth ;
}else{
return '-';
}
},
showDeleteModal(rowData) {
this.deleteDialogVisible = true;
this.rowData = rowData;
},
confirmDeleteRow() {
let req = {
id: this.rowData.id
};
openLoading(this);
this.POST('raytheon/black/delete', req).then((res) => {
closeLoading(this);
if( res && res.code && res.code == '000000') {
// console.log('>>>>>> 移除当前行数据 OK ', req);
this.deleteDialogVisible = false;
this.getBlackList();
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
})
},
},
}
</script>
<style lang="scss">
.blacklist-wrap{
.el-form-item .el-form-item__label{
font-size: 14px;
}
.component-content{
margin-top: 60px;
padding: 10px;
background: #fff;
}
.el-date-editor--daterange.el-input__inner{
width: 380px !important;
}
}
</style>
\ No newline at end of file
<template>
<div class="create-push">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="header-title"></div>
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="ruleForm"
>
<el-form-item label="推送应用" prop="resource">
<el-radio-group v-model="ruleForm.appId">
<el-radio label="yunqueyi">云鹊医app</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="目标人群" prop="people">
<el-col :span="24">
<el-radio-group v-model="ruleForm.isAll" @change="handleTargetChoose">
<el-radio :label="1">全部</el-radio>
<el-radio :label="2">导入推送名单</el-radio>
<el-radio :label="3">用户筛选</el-radio>
<div class="user-select" v-if="ruleForm.isAll == 3">
<div class="select-btn" @click="showUserChooseModal">选择用户名单</div>
<div class="numbers"><span class="choosed">{{userChooseCount}}</span> | {{allUserCount}}</div>
</div>
</el-radio-group>
</el-col>
<!-- <el-col :span="14">
<el-upload
v-if="ruleForm.isAll == 2"
class="upload-demo"
accept=".xlsx"
:action="actionUrl"
:headers = "headers"
v-model="fileName"
:http-request="httpRequest"
:before-upload="beforeUpload"
:disabled="ruleForm.isAll == 1"
>
<el-input class="update-input" placeholder="文件大小不能超过10M" :disabled="true" v-model="fileName" autocomplete="off"></el-input>
<el-button class="update-item" size="small" type="primary">选择文件</el-button>
<div slot="tip" class="el-upload__tip" @click="download">模板.xlsx</div>
<div slot="tip" class="tip-text" >备注:单次任务建议不要超过10w行</div>
</el-upload>
</el-col> -->
</el-form-item>
<el-form-item label="">
<el-upload
v-if="ruleForm.isAll == 2"
class="upload-demo"
accept=".xlsx"
:action="actionUrl"
:headers = "headers"
v-model="fileName"
:http-request="httpRequest"
:before-upload="beforeUpload"
:disabled="ruleForm.isAll == 1"
>
<el-input class="update-input" placeholder="文件大小不能超过10M" :disabled="true" v-model="fileName" autocomplete="off"></el-input>
<el-button class="update-item" size="small" type="primary">选择文件</el-button>
<div slot="tip" class="el-upload__tip" @click="download">模板.xlsx</div>
<div slot="tip" class="tip-text" >备注:单次任务建议不要超过10w行</div>
</el-upload>
</el-form-item>
<el-form-item label="推送标题" prop="title">
<el-input v-model="ruleForm.title" maxlength="30" show-word-limit></el-input>
</el-form-item>
<el-form-item label="推送介绍" prop="content">
<el-input type="textarea" maxlength="60" :rows="3" v-model="ruleForm.content" show-word-limit></el-input>
</el-form-item>
<el-form-item label="页面去向" prop="url">
<el-input type="textarea" :rows="3" v-model="ruleForm.url" maxlength="250" placeholder="H5链接" show-word-limit></el-input>
</el-form-item>
<el-form-item label="系统通知" prop="noticeFlag">
<el-radio-group v-model="ruleForm.noticeFlag">
<el-radio :label="2"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="APP接收窗口" prop="pushType">
<el-radio-group v-model="ruleForm.pushType">
<el-radio label="03">活动提醒</el-radio>
<el-radio label="04">内容提醒</el-radio>
<el-radio label="02">居民管理</el-radio>
<el-radio label="01">系统消息</el-radio>
<el-radio label="05">直播</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">提交预览</el-button>
</el-form-item>
</el-form>
<el-dialog title="推送预览" :visible.sync="dialogFormVisible">
<div>
<span>主题: {{ ruleForm.title }} </span>
<p style="display: inline-block; float: right;">
<span style="margin-left: 0px">目标对象:</span>
<span v-if="ruleForm.isAll == 2" style="color: #449284"> {{ objNum }} </span>
<span v-if="ruleForm.isAll == 3" style="color: #449284"> {{ userChooseCount }} </span>
<span v-else>全部</span>
</p>
</div>
<hr>
<el-form :model="ruleForm" class="rule-form">
<el-form-item label="APP推送:" >
云鹊医
</el-form-item>
<el-form-item label="推送标题:" >
{{ ruleForm.title }}
</el-form-item>
<el-form-item label="推送介绍:" >
<p style="white-space: pre-line">{{ ruleForm.content }}</p>
</el-form-item>
<!-- <p style="white-space: pre-line">{{ ruleForm.content }}</p> -->
<el-form-item label="页面去向:" >
{{ ruleForm.url }}
</el-form-item>
<el-form-item label="系统通知:" >
{{ ruleForm.noticeFlag | getNotice }}
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="pushSend()">确 定</el-button>
</div>
</el-dialog>
<el-dialog title="用户筛选" :visible.sync="isUserChooseModalShow" class="user-choose-modal">
<el-form :inline="true" :model="userChooseForm">
<el-form-item label="行政区划:">
<el-select
class="select-choose"
v-model="finalChooseData.provinceId" placeholder="省"
@change="handleProvinceChange(finalChooseData.provinceId)"
clearable
>
<el-option
v-for="item in userChooseForm.address.provinceList"
:key="item.provinceId"
:label="item.provinceName"
:value="item.provinceId">
</el-option>
</el-select>
<el-select
class="select-choose"
v-model="finalChooseData.cityId" placeholder="市"
@change="handleCityChange(finalChooseData.cityId)"
clearable
>
<el-option
v-for="item in userChooseForm.address.cityList"
:key="item.cityId"
:label="item.cityName"
:value="item.cityId">
</el-option>
</el-select>
<el-select
class="select-choose"
v-model="finalChooseData.countyId" placeholder="区"
@change="handleCountyChange"
clearable
>
<el-option
v-for="item in userChooseForm.address.countyList"
:key="item.countyId"
:label="item.countyName"
:value="item.countyId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="技术职称:" class="block-item">
<el-select v-model="finalChooseData.doctorTitle" multiple placeholder="不限" @change="handleDoctorTitleChange">
<el-option
v-for="item in userChooseForm.techTitleList"
:key="item.titleId"
:label="item.name"
:value="item.titleId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属机构等级:" class="block-item">
<el-select v-model="finalChooseData.hospitalLevel" multiple placeholder="不限" @change="handleHospitalLevelChange">
<el-option
v-for="item in userChooseForm.hospitalLevelList"
:key="item.no"
:label="item.value"
:value="item.no">
</el-option>
</el-select>
</el-form-item>
<div class="user-number">
<p class="title">目标用户 | 用户总量</p>
<p class="number">
<el-button v-if="!isSeeUserNumBtnClicked" class="target-num" type="primary" @click="getCurrentUserCount" size="mini">查看目标数</el-button>
<template v-else>
<span class="choosed">{{userChooseCount}}</span> <el-button class="target-num" type="primary" @click="getCurrentUserCount" size="mini">刷新目标数</el-button>
</template>
| {{allUserCount}}
</p>
</div>
<p class="click-refresh-tips" >
<template v-if="isSeeUserNumBtnClicked">筛选条件变更后,需重新点击"刷新目标数"按钮获取最新数据</template></p>
<el-button class="user-choose-submit" type="primary" @click="handleChooseSubmit">确认筛选</el-button>
</el-form>
</el-dialog>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
import axios from 'axios';
import { getBaseUrl , getExcel } from '@/utils/index';
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
// curmbFirst: "APP推送",
// curmbSecond: "创建APP推送",
curmbFirst: "创建APP推送",
ruleForm: {
appId: "yunqueyi",
isAll: 1,
title: "",
content: "",
url: "",
noticeFlag: 2,
pushType: '03',
},
actionUrl: getBaseUrl('raytheon/excel/upload'),
fileName: '',
objNum: 0,
sendKey: '',
dialogFormVisible: false,
headers: {
sysCode: 12,
token: localStorage.getItem('storageToken'),
},
rules: {
appId: [
{ required: true, message: "请选择推送应用", trigger: "change" }
],
title: [
{ required: true, message: "请输入推送标题", trigger: "blur" },
{ min: 0, max: 30, message: "长度在 0 到 30 个字符", trigger: "blur" }
],
content: [
{ required: true, message: "请输入推送介绍", trigger: "blur" },
{ min: 0, max: 250, message: "长度在 0 到 250 个字符", trigger: "blur" }
]
},
isUserChooseModalShow: false,
userChooseCount: 0, // 用户筛选的最终num
allUserCount: 0, // 总num
userChooseForm: {
address: {
provinceList: [],
cityList: [],
countyList: [],
},
techTitleList: [],
hospitalLevelList: [],
},
finalChooseData: {
provinceId: '',
cityId: '',
countyId: '',
doctorTitle: [],
hospitalLevel: [],
},
isSeeUserNumBtnClicked: false,
};
},
computed: {
...mapGetters(["_token"])
},
created() {
vm = this;
vm.idType = localStorage.getItem("storageIdType");
console.log("idType:", vm.idType);
},
// 挂载到Dom完成时
mounted: function() {
// commonUtil.resizeHeight();
},
methods: {
submitForm(formName) {
if(this.ruleForm.isAll == 3 && this.userChooseCount == 0){
vm.$message('请先选择用户');
return;
}
this.$refs[formName].validate((valid) => {
if (valid) {
// vm.pushSend();
if(vm.ruleForm.isAll == 2) {
if(vm.fileName == '') {
vm.$message('请先导入名单');
} else {
vm.dialogFormVisible = true;
}
} else {
vm.dialogFormVisible = true;
}
} else {
console.log('error submit!!');
return false;
}
});
},
pushSend() {
let req = {};
req = this.ruleForm;
if(req.isAll == 2 || req.isAll == 3) {
req.key = vm.sendKey;
}
req.createdName = localStorage.getItem('user_name');
// openLoading(vm);
vm.POST("raytheon/push/send", req).then(res => {
// closeLoading(vm);
vm.$message(res.message);
if(res.code == '000000') {
vm.ruleForm = {
appId: "yunqueyi",
isAll: 1,
title: "",
content: "",
url: "",
noticeFlag: 2,
pushType: '03',
};
}
});
vm.dialogFormVisible = false;
vm.fileName = '';
vm.sendKey = '';
},
download() {
let xlsxUrl = getExcel();
console.log('下载模板'+xlsxUrl);
setTimeout(() => {
window.open(xlsxUrl);
}, 500);
},
beforeUpload(file) {
// console.log(file);
let self = this;
const isLt = file.size / 1024 / 1024 < 10;
if(!isLt) {
this.$message.error("文件大小不能超过10M");
return;
} else {
vm.fileName = file.name;
}
},
httpRequest (options) {
// console.log(options,options.file)
let file = options.file
let reader = new FileReader()
if (file) {
reader.readAsDataURL(file)
}
reader.onload = (e) => {
let base64Str = e.target.result.split(',')[1]
// console.log('e的值',e);
// let base64Str = e.target.result.substr(e.target.result.indexOf("base64,") + 7)
// vm.POST("raytheon/excel/upload", base64Str).then(res => {
// console.log(res);
// })
openLoading(vm);
axios({
headers: {
sysCode: 12,
token: localStorage.getItem('storageToken'),
'content-type': 'text/html'
},
url: getBaseUrl('raytheon/excel/upload'),
method: 'post',
data: base64Str,
}).then(function (response) {
// console.log(response);
closeLoading(vm);
vm.objNum = response.data.data.count;
vm.sendKey = response.data.data.key;
console.log('vm.objNum ',vm.objNum);
})
}
},
handleTargetChoose() {
if( this.ruleForm.isAll == 3 ){
// 初始化
this.isSeeUserNumBtnClicked = false;
this.userChooseCount = 0;
this.allUserCount = 0;
this.userChooseForm = {
address: {
provinceList: [],
cityList: [],
countyList: [],
},
techTitleList: [],
hospitalLevelList: [],
};
this.finalChooseData = {
provinceId: '',
cityId: '',
countyId: '',
doctorTitle: [],
hospitalLevel: [],
};
// 获取总数量
this.getCurrentUserCount({ getAll: true });
}
},
getCurrentUserCount(params) {
if(!(params && params.getAll)){
if(this.finalChooseData.provinceId == ''
&& this.finalChooseData.cityId == ''
&& this.finalChooseData.countyId == ''
&& this.finalChooseData.doctorTitle.length == 0
&& this.finalChooseData.hospitalLevel.length == 0
){
this.isSeeUserNumBtnClicked = true;
this.userChooseCount = 0;
return;
}
}
openLoading(vm, 'topIndex');
let req = this.finalChooseData;
vm.POST("raytheon/push/screenUserCount", req).then(res => {
closeLoading(vm);
if(res.code == '000000'){
if(params && params.getAll){
this.allUserCount = res.data;
}else{
this.isSeeUserNumBtnClicked = true;
this.userChooseCount = res.data;
}
}else{
vm.$message.info(res.message)
}
});
},
showUserChooseModal() {
this.isUserChooseModalShow = true;
this.getProvinceList();
this.getTechTitleList();
this.getHospitalLevelList();
},
getProvinceList() {
let req = {};
openLoading(vm);
vm.GET("raytheon/constants/region", req).then(res => {
closeLoading(vm);
if(res.code == '000000'){
this.userChooseForm.address.provinceList = res.data.provinceList;
}else{
vm.$message.info(res.message)
}
});
},
getCityList(params) {
openLoading(vm);
vm.GET("raytheon/constants/region", params).then(res => {
closeLoading(vm);
if(res.code == '000000'){
this.userChooseForm.address.cityList = res.data.cityList;
}else{
vm.$message.info(res.message)
}
});
},
getCountyList(params) {
openLoading(vm);
vm.GET("raytheon/constants/region", params).then(res => {
closeLoading(vm);
if(res.code == '000000'){
this.userChooseForm.address.countyList = res.data.countyList;
}else{
vm.$message.info(res.message)
}
});
},
handleProvinceChange(id) {
this.finalChooseData.cityId = '';
this.finalChooseData.countyId = '';
// 清空省,则移除市、区列表
if( id == '' ){
this.userChooseForm.address.cityList = [];
this.userChooseForm.address.countyList = [];
return;
}
let params = { provinceId: id };
this.getCityList(params);
// this.getCurrentUserCount();
},
handleCityChange(id) {
this.finalChooseData.countyId = '';
// 清空市,则移除区列表
if( id == '' ){
this.userChooseForm.address.countyList = [];
return;
}
let params = { cityId: id };
this.getCountyList(params);
// this.getCurrentUserCount();
},
handleCountyChange() {
// this.getCurrentUserCount();
},
handleDoctorTitleChange() {
// this.getCurrentUserCount();
},
handleHospitalLevelChange() {
// this.getCurrentUserCount();
},
getTechTitleList() {
openLoading(vm);
vm.GET("raytheon/constants/doctor/title", {}).then(res => {
closeLoading(vm);
if(res.code == '000000'){
this.userChooseForm.techTitleList = res.data;
}else{
vm.$message.info(res.message)
}
});
},
getHospitalLevelList() {
openLoading(vm);
vm.GET("raytheon/constants/hospital/level", {}).then(res => {
closeLoading(vm);
if(res.code == '000000'){
this.userChooseForm.hospitalLevelList = res.data;
}else{
vm.$message.info(res.message)
}
});
},
// 确认筛选
handleChooseSubmit() {
this.getCurrentUserCount();
openLoading(vm);
vm.sendKey = '';
let req = this.finalChooseData;
vm.POST("raytheon/push/screenUser", req).then(res => {
closeLoading(vm);
if(res.code == '000000'){
vm.isUserChooseModalShow = false;
vm.sendKey = res.data;
}else{
vm.$message.info(res.message)
}
});
},
}
};
</script>
<style lang="scss">
.topIndex{
z-index: 10000 !important;
}
.create-push {
.component-content {
margin-top: 20px;
padding: 10px;
background: #fff;
.header-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.ruleForm {
width: 70%;
margin-left: 50px;
}
.rule-form {
margin-top: 20px;
margin-left: 30px;
.el-form-item__content {
font-size: 12px;
}
}
.update-input {
width: 200px;
}
.update-item {
/* float: left; */
margin-right: 5px;
}
.el-upload__tip {
// margin-top: -10px;
// margin-left: 205px;
margin-top: -40px;
margin-left: 290px;
cursor: pointer;
width: 60px;
color: #449284;
}
.tip-text {
margin-top: -40px;
margin-left: 380px;
width: 260px;
color: red;
}
.el-upload-list {
display: none;
}
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
.user-select{
display: inline-block;
height: auto;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 4px;
.select-btn{
display: inline-block;
font-size: 14px;
padding: 5px;
border-radius: 4px;
background: #449284 !important;
border: 1px solid #449284 !important;
color: #FFF;
cursor: pointer;
}
.numbers{
font-size: 14px;
margin-left: 10px;
display: inline-block;
.choosed{
color: #449284;
}
}
}
.user-choose-modal{
.el-form-item__label{
width: 120px;
font-size: 14px;
}
.select-choose{
width: 150px;
}
.block-item{
display: block;
}
.user-number{
margin: 40px auto 0;
text-align: center;
width: 70%;
height:34px;
line-height: 34px;
border-radius: 4px;
border: 1px solid #DCDFE6;
.title{
display: inline-block;
}
.number{
display: inline-block;
margin-left: 50px;
.target-num{
padding: 7px;
}
.choosed{
color: #449284;
}
}
}
.click-refresh-tips{
text-align: center;
margin: 5px auto 20px;
height: 20px;
color: #e6a23c;
}
.user-choose-submit{
margin: 0 auto;
display: block;
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="fatigue-control-wrap">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<el-form ref="form" :model="searchReq" label-width="80px" style="overflow: hidden;">
<el-form-item label="策略名称" prop="startDate" class="diagnose-select-style" style="float: left;">
<el-select v-model="searchReq.strategyCode" filterable placeholder="请选择">
<el-option
v-for="item in options"
:key="item.strategyCode"
:label="item.name"
:value="item.strategyCode">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="修改时间" style="width: 470px; float: left;">
<el-date-picker
v-model="duringTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<div style="float: right; margin-right: 28px;">
<el-button type="primary" style="float: left; margin: 0 10px 10px 0;" @click="handleSearchClick">搜索</el-button>
<el-button type="primary" style="float: left; margin: 0 10px 10px 0;" @click="handleRefresh">刷新</el-button>
</div>
<div style="overflow: hidden; clear: both; float: right; margin-right: 28px;">
<el-button type="primary" style="float: left; margin: 0 10px 10px 0;" @click="handleAddOrEdit('add')">添加</el-button>
</div>
</el-form>
<div style="padding: 0 40px;">
<el-table
:data="tableData"
border
style="width: 100%;">
<el-table-column
align="center"
prop="name"
label="名称"
>
</el-table-column>
<el-table-column
align="center"
prop="toLimit"
label="频次控制"
>
<template slot-scope="scope">
{{scope.row.toLimit + '次/天' }}
</template>
</el-table-column>
<el-table-column
align="center"
label="修改时间"
>
<template slot-scope="scope">
{{scope.row.modifyTime ? scope.row.modifyTime.year + '-' + scope.row.modifyTime.monthValue + '-' + scope.row.modifyTime.dayOfMonth : '-'}}
</template>
</el-table-column>
<el-table-column
align="center"
prop="modifyName"
label="操作人"
>
</el-table-column>
<el-table-column
align="center"
prop="strategyNameShow"
label="策略组"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
align="center"
label="操作"
>
<template slot-scope="scope">
<el-button @click="handleAddOrEdit('edit', scope.row)" type="text" >编辑</el-button>
<el-button @click="showDeleteModal(scope.row)" type="text" >删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchReq.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="searchReq.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
<!-- 添加modal 弹窗 -->
<el-dialog
:visible.sync="centerDialogVisible"
:close-on-click-modal="false"
v-if="centerDialogVisible"
width="700px"
@close="handleCancel"
center>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="名称" prop="name" style="width: 600px;">
<el-input
type="text"
placeholder="请输入"
maxlength="30"
show-word-limit
v-model="ruleForm.name">
</el-input>
</el-form-item>
<el-form-item label="频次" prop="toLimit" style="width: 600px;">
<el-input
v-model.number="ruleForm.toLimit"
type="text"
maxlength="3"
placeholder="请输入"
style="width: 100px;">
</el-input>
<p style="display: inline-block; margin-left: 10px;">次/天</p>
</el-form-item>
<el-form-item label="策略组" prop="strategyCodeList">
<el-select
v-model="ruleForm.strategyCodeList"
multiple
placeholder="请选择策略组名称(多选)" style="width: 500px;">
<el-option v-for="item in strategyList" :key="item.code" :label="item.name" :value="item.code"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCancel">取 消</el-button>
<el-button type="primary" @click="confirmAddOrEdit('ruleForm')">确 定</el-button>
</span>
</el-dialog>
<!-- 删除 弹窗 -->
<el-dialog
title="删除"
:close-on-click-modal="false"
:visible.sync="deleteDialogVisible"
width="400px"
center>
<span>确认删除?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="deleteDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="confirmDelete">确 定</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "../../components/breadcrumb.vue";
export default {
components: {
BreadCrumb,
},
data() {
var checkToLimit = (rule, value, callback) => {
if(typeof value != 'undefined' && value == 0){
return callback(new Error('频次范围:1-100'));
};
if (!value) {
return callback(new Error('频次不能为空'));
}else{
if (!Number.isInteger(value)) {
this.ruleForm.toLimit = '';
callback(new Error('频次必须为数字值'));
} else {
if (value < 1 || value > 100) {
callback(new Error('频次范围:1-100'));
} else {
callback();
}
}
}
};
return {
curmbFirst: "疲劳度控制",
duringTime: "",
ruleForm: { // 新增/编辑 数据
name: '', // 名称
toLimit: '', // 频次
strategyCodeList: '', // 策略组(策略组 codelist)
},
rules: {
name: [
{ required: true, message: '请填写名称', trigger: 'blur' },
],
toLimit: [
{ required: true, message: '请填写频次', trigger: 'blur' },
{ validator: checkToLimit },
],
strategyCodeList: [
{ required: true, message: '请选择策略组', trigger: 'blur' },
]
},
isCreate: true,
centerDialogVisible: false,
tableData: [],
totalRows: 0, // 总页数
inputSearchName: '',
searchReq: { // 疲劳度列表 请求参数
strategyCode: '',
pageNo: 1,
pageSize: 10,
startTime: '',
endTime: '',
},
strategyList: [],
deleteDialogVisible: false,
rowData: {},
loading: false,
options: [],
}
},
created() {
this.getStrategyNameList();
this.getList();
},
methods: {
getStrategyNameList() {
openLoading(this);
this.GET("raytheon/strategy/pullSelect", {}).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
// console.log('get 策略下拉列表>>>>> ', res);
this.options = res.data;
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
handleCancel() {
this.resetForm('ruleForm');
this.centerDialogVisible = false;
this.initRuleFormData();
},
initRuleFormData() {
this.ruleForm = {
name: '', // 名称
toLimit: '', // 频次
strategyCodeList: '', // 策略组(策略组 codelist)
};
},
confirmAddOrEdit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if(this.isCreate == true){ // 创建策略时
this.handleAddSave();
}else{ // 编辑时
this.handleEditSave();
}
} else {
console.log('error submit!!');
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
handleAddSave() {
let req = this.ruleForm;
openLoading(this);
this.POST('raytheon/fatigueControlInfo/save', req).then((res) => {
closeLoading(this);
if( res && res.code && res.code == '000000') {
// console.log('>>>>>> 新增 编辑 OK ', req);
this.getList();
this.centerDialogVisible = false;
this.initRuleFormData();
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
})
},
handleEditSave() {
let req = this.ruleForm;
openLoading(this);
this.POST('raytheon/fatigueControlInfo/update', req).then((res) => {
closeLoading(this);
if( res && res.code && res.code == '000000') {
// console.log('>>>>>> 新增 编辑 OK ', req);
this.getList();
this.centerDialogVisible = false;
this.initRuleFormData();
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
})
},
handleSearchClick() {
this.searchReq.pageNo = 1;
this.getList();
},
handleRefresh() {
let options = {
isRefresh: true
};
this.getList(options);
},
handleSizeChange(val){
this.searchReq.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.searchReq.pageNo = val;
this.getList();
},
getList(options) {
if( options && options.isRefresh ){ // 刷新 请求参数置为默认
this.searchReq = {
strategyCode: '',
pageNo: 1,
pageSize: 10,
startTime: '',
endTime: '',
};
this.duringTime = '';
}else{
// 时间获取
// console.log('this.duringTime',this.duringTime);
if(this.duringTime!=='' && this.duringTime!==null) {
this.searchReq.startTime = this.duringTime[0].getTime();
this.searchReq.endTime = this.duringTime[1].getTime();
} else {
this.searchReq.startTime = '';
this.searchReq.endTime = '';
}
}
let req = this.searchReq;
openLoading(this);
this.GET("raytheon/fatigueControlInfo/list", req).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
// console.log('get 策略列表>>>>> ', res);
if (res.data) {
this.totalRows = res.data.total;
}
if(res.data && res.data.list && res.data.list.length > 0){
this.tableData = res.data.list;
}else{
this.tableData = [];
}
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
handleAddOrEdit(status, rowData) {
// isCreate
this.centerDialogVisible = true;
let req = {};
if(status && status == 'add'){ // 添加
this.isCreate = true;
this.ruleForm = {
name: '', // 名称
toLimit: '', // 频次
strategyCodeList: '', // 策略组(策略组 codelist)
};
req = {
code: '0' // 添加时 code传0
};
}else{ // 编辑
this.isCreate = false;
const { code, name, toLimit, strategyCodeList } = rowData;
this.ruleForm = {
code, // 编辑时 多传一个code
name,
toLimit,
strategyCodeList,
};
req = {
code,
};
}
openLoading(this);
this.GET("raytheon/strategy/pullList", req).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
console.log('获取疲劳度策略组下拉列表>>> ', res.data)
this.strategyList = res.data;
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
showDeleteModal(rowData) {
this.deleteDialogVisible = true;
this.rowData = rowData;
},
confirmDelete() {
let req = {
code: this.rowData.code
};
openLoading(this);
this.POST('raytheon/fatigueControlInfo/delete', req).then((res) => {
closeLoading(this);
if( res && res.code && res.code == '000000') {
console.log('>>>>>> 新增 编辑 OK ', req);
this.deleteDialogVisible = false;
this.getList();
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
})
},
},
}
</script>
<style lang="scss">
.fatigue-control-wrap{
.el-form-item .el-form-item__label{
font-size: 14px;
}
.component-content{
margin-top: 60px;
padding: 10px;
background: #fff;
}
.el-date-editor--daterange.el-input__inner{
width: 380px !important;
}
.pagination{
margin: 20px 0;
text-align: right;
}
}
</style>
\ No newline at end of file
<template>
<div class="history-push">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="header-title"></div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="formInline" :model="formInline" label-width="75px" style="width:100%;">
<el-col :span="4">
<el-form-item label="状态">
<el-select v-model="formInline.status" placeholder="请选择">
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="推送类型">
<el-select v-model="formInline.pushWay" placeholder="请选择">
<el-option
v-for="item in pushWayList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="标题">
<el-input v-model="formInline.title" placeholder="推送标题"></el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="推送日期">
<el-date-picker
v-model="duringTime"
type="datetimerange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="5" style="padding:0;text-align:right;padding-right:15px;">
<el-button type="primary" size="small" @click="searchList">搜索</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">刷新</el-button>
</el-col> -->
</el-form>
</el-row>
<el-row>
<el-col :span="24" style="padding:0;text-align:right;padding-right:35px;margin-bottom:15px">
<el-button type="primary" size="small" @click="searchList">搜索</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">重置</el-button>
</el-col>
</el-row>
<el-table :data="tableData" style="width: 100%" >
<el-table-column prop="title" label="推送标题" min-width="100" align="left" show-overflow-tooltip></el-table-column>
<el-table-column prop="pushWay" label="推送类型" min-width="100" align="left">
<template slot-scope="scope">
<span>{{ scope.row.pushWay | getPushWay }}</span>
</template>
</el-table-column>
<el-table-column
prop="content"
label="推送介绍"
min-width="130"
align="left"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-button style="" type="text" size="small" @click="showDetail(scope.row)">{{ scope.row.content }}</el-button>
<!-- <span >{{ scope.row.content }}</span> -->
<!-- <el-button style="margin-left: 15px;" type="text" size="small" @click="showDetail(scope.row)">详情</el-button> -->
</template>
</el-table-column>
<el-table-column prop="createdName" label="操作人" align="left" min-width="100"></el-table-column>
<el-table-column prop="status" label="状态" align="left">
<template slot-scope="scope">
<span>{{ scope.row.status | getPushStatus }}</span>
</template>
</el-table-column>
<el-table-column prop="createdTime" label="创建时间" min-width="95" align="left">
<template slot-scope="scope">
<span>{{ scope.row.createdTime }}</span>
</template>
</el-table-column>
<el-table-column prop="startPushTime" label="开始推送时间" min-width="95" align="left">
<template slot-scope="scope">
<span>{{ scope.row.startPushTime }}</span>
</template>
</el-table-column>
<el-table-column prop="totalCount" label="推送目标" align="left" min-width="100"></el-table-column>
<el-table-column fixed="right" label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.status == 1" @click="pushStatistics(scope.row)">推送统计</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formInline.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="formInline.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
<el-dialog title :visible.sync="dialogVisible" width="30%" center>
<p style="white-space: pre-line">{{ introduce }}</p>
<p style="margin-top: 20px">
<span>页面去向:</span>
<el-link type="primary" :href="toUrl" target="_blank" >{{ toUrl }}</el-link>
</p>
</el-dialog>
<el-dialog title="" :visible.sync="dialogTableVisible" center class="push-census" width="68%">
<el-table :data="statistics">
<el-table-column align="center" property="totalCount" label="目标用户" min-width="150">
<template slot-scope="scope">
<p>目标总量:{{ scope.row.totalCount }}</p>
<p>僵尸用户:{{ scope.row.zombieDeviceCount }}</p>
</template>
</el-table-column>
<el-table-column align="center" property="totalDevice" label="设备数" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.totalDevice }}</span>
<div class="under-tips">单个目标用户可能会存在多个设备</div>
</template>
</el-table-column>
<el-table-column align="center" property="toCount" label="送达数/率" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row | getToValue }}</span>
<div class="under-tips">送达率:送达数/设备数</div>
</template>
</el-table-column>
<el-table-column align="center" property="clickCount" label="点击数/率" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row | getClickValue }}</span>
<div class="under-tips">点击率:点击数/设备数</div>
</template>
</el-table-column>
<el-table-column align="center" property="failedCount" label="提交失败" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row | getFailedValue }}</span>
<div class="under-tips">提交失败率:失败人数/目标用户数</div>
<el-button v-if="failedExcelUrl !== null" style="margin-top: 20px;right: 0" type="primary" size="small" @click="download(scope.row)">导出失败名单</el-button>
</template>
</el-table-column>
</el-table>
<!-- <el-button style="margin-top: 20px;right: 0" type="primary" size="small" @click="download(scope.row)">导出失败名单</el-button> -->
<span slot="footer" class="dialog-footer">
<el-button @click="dialogTableVisible = false">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
import { getBaseUrl } from '@/utils/index';
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
// curmbFirst: "APP推送",
// curmbSecond: "APP推送历史",
curmbFirst: "APP推送历史",
tableData: [],
currentPage: 1,
duringTime: 0,
totalRows: 0,
formInline: {
status: "",
pushWay: "",
startTime: "",
endTime: "",
title: "",
pageNo: 1,
pageSize: 10
},
duringTime: "",
dialogVisible: false,
introduce: "",
link: "www.baidu.com",
statistics: [{
totalCount: "",
toCount: "",
toProportion: "",
clickCount: "",
clickProportion: "",
failedCount: "",
failedProportion: "",
failedExcelUrl: null
}],
dialogTableVisible: false,
toUrl: '',
failedExcelUrl: null,
statusList: [
{
value: 1,
label: "推送中"
},
{
value: 2,
label: "推送完成"
},
{
value: 3,
label: "任务中断"
}
],
pushWayList: [
{
value: '',
label: "全部"
},
{
value: 2,
label: "手动推送"
},
{
value: 1,
label: "模板推送"
},
]
};
},
computed: {
...mapGetters(["_token"])
},
created() {
vm = this;
vm.idType = localStorage.getItem("storageIdType");
console.log("idType:", vm.idType);
this.search();
},
// 挂载到Dom完成时
mounted: function() {
// commonUtil.resizeHeight();
},
methods: {
searchList() {
this.formInline.pageNo = 1;
console.log('this.duringTime',this.duringTime);
if(this.duringTime!=='' && this.duringTime!==null) {
this.formInline.startTime = this.duringTime[0].getTime();
this.formInline.endTime = this.duringTime[1].getTime();
} else {
this.formInline.startTime = '';
this.formInline.endTime = '';
}
console.log('formInline',this.formInline);
this.search();
},
search() {
let req = {};
req = this.formInline;
openLoading(vm);
vm.GET("raytheon/pushLog/list", req).then(res => {
closeLoading(vm);
vm.tableData = res.data.list;
vm.totalRows = res.data.total;
});
},
resetForm() {
vm.formInline = Object.assign(
{},
{
status: "",
pushWay: "",
startTime: "",
endTime: "",
title: "",
pageNo: 1,
pageSize: 10
}
);
vm.duringTime = '';
vm.search();
},
pushStatistics(row) {
let req = {};
vm.failedExcelUrl = null;
openLoading(vm);
vm.GET("raytheon/pushLog/statistics/"+row.batchNo, req).then(res => {
closeLoading(vm);
console.log(res.data);
vm.dialogTableVisible = true;
vm.statistics = [];
vm.statistics[0] = res.data;
vm.failedExcelUrl = res.data.failedExcelUrl;
});
},
showDetail(row) {
vm.dialogVisible = true;
vm.introduce = row.content;
vm.toUrl = row.url;
},
download() {
let downUrl = getBaseUrl(vm.failedExcelUrl);
console.log('导出失败名单',downUrl);
setTimeout(() => {
window.open(downUrl);
}, 500);
},
handleSizeChange(val) {
this.formInline.pageSize = val;
this.search();
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
this.formInline.pageNo = val;
this.search();
console.log(`当前页: ${val}`);
}
}
};
</script>
<style lang="scss">
.history-push {
.component-content {
margin-top: 20px;
padding: 10px;
background: #fff;
.header-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
}
.push-census{
.el-table td{
vertical-align: top;
}
.under-tips{
margin-top: 6px;
color: #909399;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="msg-history-wrap">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<el-form ref="searchReq" :rules="rules" :model="searchReq" label-width="100px" style="margin-bottom: 20px;">
<el-row>
<el-col style="width:270px;">
<el-form-item label="手机号" prop="mobile">
<el-input v-model.number="searchReq.mobile" placeholder="请输入手机号" maxlength="11"></el-input>
</el-form-item>
</el-col>
<el-col style="width:290px;">
<el-form-item label="内容关键字" prop="content">
<el-input v-model="searchReq.content" placeholder="请输入内容关键字" ></el-input>
</el-form-item>
</el-col>
<el-col style="width: 200px; margin-left: 60px;">
<el-button type="primary" @click="handleSearchClick('searchReq')">搜索</el-button>
</el-col>
</el-row>
</el-form>
<div style="padding: 0 40px;">
<el-table
:data="tableData"
border
style="width: 100%;">
<el-table-column
align="center"
prop="mobile"
label="手机号"
>
</el-table-column>
<el-table-column
align="center"
prop="content"
label="内容"
>
</el-table-column>
<el-table-column
align="center"
label="发送时间"
>
<template slot-scope="scope">
{{ returnSendTime(scope.row.creatTime) }}
</template>
</el-table-column>
<el-table-column
align="center"
label="统计"
>
<template slot-scope="scope">
<p :class="returnStatusStyle(scope.row.code)">{{ returnStatusText(scope.row.code) }}</p>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchReq.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="searchReq.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
</div>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "../../components/breadcrumb.vue";
export default {
components: {
BreadCrumb,
},
data() {
var checkMobiles = (rule, value, callback) => {
// debugger;
if (value) {
if (!Number.isInteger(value)) {
this.searchReq.mobile = '';
callback(new Error('手机号必须是以1开头的11位纯数字'));
} else{
value += '';
let arr = value.split('');
if(value.length >= 1){
if( arr[0] != '1' ){
callback(new Error('手机号必须是以1开头的11位纯数字'));
}else{
if( value.length != 11 ){
callback(new Error('手机号必须是以1开头的11位纯数字'));
}else{
callback();
}
}
}else{
callback();
}
}
}else{
if(typeof value != 'undefined' && value === 0){
callback(new Error('手机号必须是以1开头的11位纯数字'));
};
callback();
}
};
return {
curmbFirst: "短信历史",
searchReq: {
mobile: '',
content: '',
pageNo: 1,
pageSize: 10,
},
totalRows: 0,
tableData: [],
rules: {
mobile: [
{ validator: checkMobiles }
],
},
}
},
created() {
this.getSMSList();
},
methods: {
getSMSList() {
let req = this.searchReq;
openLoading(this);
this.GET("raytheon/sms/list", req).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
// console.log('get SMS列表>>>>> ', res);
if( res && res.data ){
this.totalRows = res.data.total || 0;
this.tableData = res.data.list || [];
}
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
handleSearchClick(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.searchReq.pageNo = 1;
this.getSMSList();
} else {
console.log('error submit!!');
return false;
}
});
},
handleSizeChange(val){
this.searchReq.pageSize = val;
this.getSMSList();
},
handleCurrentChange(val) {
this.searchReq.pageNo = val;
this.getSMSList();
},
returnSendTime(creatTime){
if( creatTime ){
return creatTime.year + '-' + creatTime.monthValue + '-' + creatTime.dayOfMonth + ' ' + creatTime.hour + ':' + creatTime.minute ;
}else{
return '-';
}
},
returnStatusText(code){
if(typeof code != 'undefined'){
if(code == 0 || code == 3){
return '成功';
}else if(code == 1){
return '处理中';
}else if(code == 2 || code == 4){
return '失败';
}else{
return '失败';
}
}else{
return '-';
}
},
returnStatusStyle(code){
let basic = 'status-tj ';
if(typeof code != 'undefined'){
if(code == 0 || code == 3){
basic += 'success';
}else if(code == 1){
basic += 'pending';
}else if(code == 2 || code == 4){
basic += 'fail';
}else{
basic += 'fail';
}
}else{
basic += '';
}
return basic;
}
},
}
</script>
<style lang="scss">
.msg-history-wrap{
.el-form-item .el-form-item__label{
font-size: 14px;
}
.component-content{
margin-top: 60px;
padding: 10px;
background: #fff;
}
.pagination{
margin: 20px 0;
text-align: right;
}
.status-tj{
&.success{
color: #409EFF;
}
}
}
</style>
<template>
<div class="strategy-manage-wrap">
<bread-crumb :curmbFirst="curmbFirst"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<!-- 顶部输入框 -->
<div>
<el-form label-width="80px" style="overflow: hidden;">
<el-form-item label="策略名称" style="width: 300px; float: left;">
<el-input v-model="stratetyRequest.name" placeholder="请输入名称" ></el-input>
</el-form-item>
<el-button type="primary" style="margin-left: 50px;" @click="handleSearchClick">搜索</el-button>
</el-form>
</div>
<!-- 策略列表 -->
<div class="table-wrap">
<el-button type="primary" style="float: right;" @click="handleCreateStrategy">创建策略</el-button>
<el-table
:data="tableData"
border
style="width: 100%; margin-top: 70px;">
<el-table-column
align="center"
prop="name"
label="策略名称"
>
</el-table-column>
<el-table-column
align="center"
prop="code"
label="策略编码"
>
<template slot-scope="scope">
<span :id="returnCopyClass(scope.$index)">{{scope.row.code}}</span>
<span style="color: #409EFF; cursor:pointer;" @click="copyCode(scope.row.code, scope.$index)">复制</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="APP系统推送">
<template slot-scope="scope">
<el-button
@click.native.prevent="editTemplate(scope)"
type="text">
{{ scope && scope.row && scope.row.templateCode ? '编辑模板' : '新建模板' }}
</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
label="修改时间"
>
<template slot-scope="scope">
{{ returnModifyTime(scope.row.modifyTime) }}
</template>
</el-table-column>
<el-table-column
align="center"
prop="modifyName"
label="操作人"
>
</el-table-column>
<el-table-column
align="center"
label="操作"
>
<template slot-scope="scope">
<el-button
@click.native.prevent="editRow(scope.$index, tableData)"
type="text">
编辑
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="stratetyRequest.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="stratetyRequest.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows">
</el-pagination>
</div>
</div>
<!-- 创建/编辑策略 弹窗 -->
<el-dialog
:visible.sync="stragetyDialogVisible"
width="700px"
:close-on-click-modal="false"
@close="handleCancelCreateOrEdit"
center>
<el-form :model="createOrEditRequest" :rules="rules" ref="createOrEditRequest" label-width="100px" class="demo-ruleForm">
<el-form-item label="策略名称" prop="name" style="width: 600px;">
<el-input
type="text"
placeholder="请输入"
v-model="createOrEditRequest.name"
maxlength="30"
show-word-limit
>
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCancelCreateOrEdit">取 消</el-button>
<el-button type="primary" @click="handleConfirmCreateOrEdit('createOrEditRequest')">确 定</el-button>
</span>
</el-dialog>
<!-- 新增/编辑模板 弹窗 -->
<el-dialog
class="template-modal-wrap"
title="APP推送"
:visible.sync="templateDialogVisible"
:close-on-click-modal="false"
width="800px"
@close="handleCloseTemplateModal"
center>
<el-form :model="templateRuleForm" :rules="templateRules" ref="templateRuleForm" label-width="120px" class="demo-ruleForm">
<el-form-item label="APP" prop="channel" class="app-channel-item">
<el-radio-group v-model="templateRuleForm.channel">
<el-radio label="4">云鹊医</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="APP接收窗口" prop="parentPushType">
<el-radio-group v-model="templateRuleForm.parentPushType">
<el-radio label="01">系统消息</el-radio>
<el-radio label="02">居民管理</el-radio>
<el-radio label="03">活动提醒</el-radio>
<el-radio label="04">内容提醒</el-radio>
<el-radio label="05">直播</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="系统通知" prop="noticeFlag">
<el-radio-group v-model="templateRuleForm.noticeFlag">
<el-radio :label="2"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<!-- pushtype 4位数字,需写校验***************************************************************************** -->
<el-form-item label="PushType" prop="pushType" style="width: 650px;">
<el-input
type="text"
placeholder="请输入"
v-model="templateRuleForm.pushType"
maxlength="4"
show-word-limit
>
</el-input>
<p style="position: absolute; right:-70px; top: 0; color: #449284; cursor: pointer;" @click="showPushTypeRule(true)">填写规则</p>
</el-form-item>
<el-form-item label="标题" prop="title" style="width: 650px;">
<el-input
type="text"
placeholder="请输入"
v-model="templateRuleForm.title"
maxlength="30"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item label="摘要" style="width: 650px;">
<el-input
type="textarea"
placeholder="请输入"
v-model="templateRuleForm.summary"
maxlength="60"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item label="内容" prop="content" style="width: 650px;">
<el-input
type="textarea"
placeholder="请输入"
v-model="templateRuleForm.content"
maxlength="60"
show-word-limit
>
</el-input>
</el-form-item>
</el-form>
<div class="bottom-tips">变量占位符用%s标识<span>示例:您的管理者权限,已从【%s】更改至【%s】</span></div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseTemplateModal">关闭</el-button>
<el-button type="primary" @click="submitForm('templateRuleForm')">确 认</el-button>
</span>
</el-dialog>
<!-- 填写规则 弹窗 -->
<el-dialog
class="input-rule-wrap"
title="填写规则"
:visible.sync="inputRuleTableVisible"
:close-on-click-modal="false"
width="800px"
center>
<el-table
:data="inputRuleTableData"
border
style="width: 100%; margin-top: 70px;">
<el-table-column
align="center"
label="系统提醒"
>
<template slot-scope="scope">
<span :class="isCurrentExist(scope.row.activityTips, existPushTypeList) ? 'active' : 'not-active'">
{{ scope.row.activityTips }}
</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="居民管理提醒"
>
<template slot-scope="scope">
<span :class="isCurrentExist(scope.row.contentTips, existPushTypeList) ? 'active' : 'not-active'">
{{ scope.row.contentTips }}
</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="活动提醒"
>
<template slot-scope="scope">
<span :class="isCurrentExist(scope.row.patientsManager, existPushTypeList) ? 'active' : 'not-active'">
{{ scope.row.patientsManager }}
</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="内容提醒"
>
<template slot-scope="scope">
<span :class="isCurrentExist(scope.row.systemInfo, existPushTypeList) ? 'active' : 'not-active'">
{{ scope.row.systemInfo }}
</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="直播提醒"
>
<template slot-scope="scope">
<span :class="isCurrentExist(scope.row.liveVideo, existPushTypeList) ? 'active' : 'not-active'">
{{ scope.row.liveVideo }}
</span>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<p class="input-bottom-tips">
说明:01、02、03、04、05开头的编码分别表示消息落地的接收窗为:系统提醒、居民管理提醒、活动提醒、内容提醒、直播提醒,高亮的编码表示已经被使用的编码,黑色表示可以使用的编码
</p>
<!-- <el-button @click="inputRuleTableVisible = false">关闭</el-button>
<el-button type="primary">确 认</el-button> -->
<div style="width:100%; height: 40px;"></div>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import { openLoading, closeLoading } from "../../utils/utils";
let vm = null;
import BreadCrumb from "../../components/breadcrumb.vue";
export default {
components: {
BreadCrumb,
},
data() {
var checkPushType = (rule, value, callback) => {
// debugger;
if (!value) {
return callback(new Error('PushType不能为空'));
}else{
if(value.length != 4){ // 必须长度为4
callback(new Error('必须是以 01/02/03/04/05 开头的四位纯数字'));
}else{
let arr = value.split('');
let beginReg = /[1-5]/g
if( arr[0] != '0' || !beginReg.test( parseInt(arr[1]) ) ){ // 判断是以01-05开头
callback(new Error('必须是以 01/02/03/04/05 开头的四位纯数字'));
}
for(let i=0; i<arr.length; i++){ // 必须四位都是纯数字
let reg = /\d/g;
if( !reg.test( parseInt(arr[i]) ) ){
callback(new Error('必须是以 01/02/03/04/05 开头的四位纯数字'));
}
}
callback();
}
}
};
return {
curmbFirst: "策略管理",
tableData: [],
stragetyDialogVisible: false,
// 创建/编辑 策略 请求参数
createOrEditRequest: {
name: '',
},
rules: {
name: [
{ required: true, message: '请输入策略名称', trigger: 'blur' },
],
},
// 模板弹窗
templateDialogVisible: false,
initTemplateRuleForm: {
channel: '4',
parentPushType: '',
noticeFlag: '',
pushType: '',
title:'',
summary: '',
content: '',
strategyId: null, //策略id
id: null, // 模板id
},
templateRuleForm: {
channel: '4',
parentPushType: '',
noticeFlag: '',
pushType: '',
title:'',
summary: '',
content: '',
strategyId: null, //策略id
id: null, // 模板id
},
// 分页
totalRows: 0,
templateRules: {
channel: [
{ required: true, message: '请选择APP', trigger: 'blur' },
],
parentPushType: [
{ required: true, message: '请选择APP接收窗口', trigger: 'blur' },
],
noticeFlag: [
{ required: true, message: '请选择系统通知', trigger: 'blur' },
],
pushType: [
{ required: true, message: '请输入PushType值' },
{ validator: checkPushType}
],
title: [
{ required: true, message: '请填写标题', trigger: 'blur' },
],
content: [
{ required: true, message: '请填写内容', trigger: 'blur' },
],
},
stratetyRequest: { // 策略列表 请求参数
pageNo: 1,
pageSize: 10,
name: '',
},
isCreate: true,
rowData: {},
inputRuleTableVisible: false, // 填写规则 弹窗
inputRuleTableData: [
// { //demo
// activityTips: 0100,
// contentTips: 0200,
// patientsManager: 0300,
// systemInfo: 0400,
// liveVideo: 0500,
// },
],
existPushTypeList: [], // 已存在的 pushType list (高亮回显用)
}
},
created() {
vm = this;
this.getStrategyList();
},
methods: {
returnCopyClass(index) {
// console.log('>>>>>>>>>index ', index)
return 'copyCode_' + index;
},
returnModifyTime(modifyTime){
if( modifyTime ){
return modifyTime.year + '-' + modifyTime.monthValue + '-' + modifyTime.dayOfMonth ;
}else{
return '-';
}
},
handleCreateStrategy() {
this.isCreate = true;
this.createOrEditRequest.name = ''; // 清空input
this.stragetyDialogVisible = true;
},
handleCancelCreateOrEdit() {
this.resetForm('createOrEditRequest');
this.stragetyDialogVisible = false
},
handleSizeChange(val){
this.stratetyRequest.pageSize = val;
this.getStrategyList();
},
handleCurrentChange(val) {
this.stratetyRequest.pageNo = val;
this.getStrategyList();
},
handleConfirmCreateOrEdit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let req = {};
if(this.isCreate == true){ // 创建策略时
req = {
bizCode: '',
channel: '',
code: '',
name: this.createOrEditRequest.name,
sysCode: '',
templateCode: '',
};
this.goToSaveStrategy(req, () => {
this.getStrategyList()
});
}else{ // 编辑时
req.id = this.rowData.id;
req.name = this.createOrEditRequest.name;
this.goToEditStrategy(req, () => {
this.getStrategyList()
})
}
this.stragetyDialogVisible = false; // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< success 才关闭?????
// empty input value
} else {
console.log('error submit!!');
return false;
}
});
},
// 创建 策略
goToSaveStrategy(req, cb) {
openLoading(this);
this.POST('raytheon/strategy/save', req).then((res) => {
closeLoading(this);
if( res && res.code && res.code == '000000') {
// console.log('>>>>>> 新增 编辑 OK ', req)
cb && cb();
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
})
},
goToEditStrategy(req, cb) {
openLoading(this);
this.POST('raytheon/strategy/update', req).then((res) => {
closeLoading(this);
if( res && res.code && res.code == '000000') {
// console.log('>>>>>> 新增 编辑 OK ', req)
cb && cb();
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
})
},
editRow(index, list) {
this.rowData = {};
this.isCreate = false;
this.createOrEditRequest.name = list[index].name;
this.stragetyDialogVisible = true;
this.rowData = list[index];
},
editTemplate(scope) {
this.templateRuleForm = JSON.parse(JSON.stringify(this.initTemplateRuleForm));
this.templateDialogVisible = true;
// console.log('scope.row >>>> ', scope.row)
this.templateRuleForm.strategyId = scope.row.id;
if( scope.row.templateCode ){ // 编辑,请求接口回显
let req = {
templateCode: scope.row.templateCode
};
this.getTemplateDetail(req);
}else{ // 新增
this.templateRuleForm.id = null;
}
// 获取填写规则
this.getInputRuleData();
},
// 搜索
handleSearchClick() {
this.stratetyRequest.pageNo = 1;
this.getStrategyList();
},
// 复制功能
copyCode(code, index) {
let elementID = 'copyCode_' + index;
var text = document.getElementById(elementID);
// debugger;
if (document.body.createTextRange) {
var range = document.body.createTextRange();
range.moveToElementText(text);
range.select();
} else if (window.getSelection) {
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(text);
selection.removeAllRanges();
selection.addRange(range);
}else{
this.$message({
message: '策略编码 复制失败',
type: 'warning'
});
return;
}
document.execCommand('Copy');
this.$message({
message: '策略编码 复制成功!',
type: 'success'
});
},
// 获取 模板详细 回显
getTemplateDetail(req) {
openLoading(this);
this.GET("raytheon/msgTemplateInfo/getByCode", req).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
// console.log('>>>>> g获取模板详细 ', res)
if(res.data){
let data = res.data;
// 回显处理 其他key
// channel: 4,
// parentPushType: '',
// noticeFlag: '',
// pushType: '',
// title:'',
// summary: '',
// content: '',
// strategyId: null, //策略id
// id: null, // 模板id
this.templateRuleForm.channel = data.channel;
this.templateRuleForm.parentPushType = data.parentPushType;
this.templateRuleForm.noticeFlag = data.noticeFlag;
this.templateRuleForm.pushType = data.pushType;
this.templateRuleForm.title = data.title;
this.templateRuleForm.summary = data.summary;
this.templateRuleForm.content = data.content;
this.templateRuleForm.id = data.id;
}
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
// 获取 策略列表
getStrategyList() {
let req = this.stratetyRequest;
openLoading(this);
this.GET("raytheon/strategy/list", req).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
// console.log('get 策略列表>>>>> ', res);
if (res.data ) {
this.totalRows = res.data.total;
}
if(res.data && res.data.list && res.data.list.length > 0){
this.tableData = res.data.list;
}else{
this.tableData = [];
}
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
showPushTypeRule(status) {
// 计算出 table 列表
this.inputRuleTableVisible = true;
},
getInputRuleData() {
let tempArr = [];
for( let i=0; i<100; i++ ) { // 行 0-99
let index = i<10 ? '0'+i : i;
let obj = {
activityTips: '01' + index,
contentTips: '02' + index,
patientsManager: '03' + index,
systemInfo: '04' + index,
liveVideo: '05' + index,
};
tempArr.push(obj);
}
this.inputRuleTableData = tempArr;
// 请求已存在的 pushType list
this.getExistPushTypeList()
},
// 获取 策略列表
getExistPushTypeList(req) {
req = req || {};
openLoading(this);
this.GET("raytheon/msgTemplateInfo/pushTypelist", req).then(res => {
closeLoading(this);
if(res && res.code && res.code == '000000'){
if(res.data && res.data.length > 0){
this.existPushTypeList = res.data;
}
}else{
this.$message({
message: '接口请求失败',
type: 'warning'
});
}
});
},
// 是否存在
isCurrentExist(item, arr) {
let has = false;
if(arr && arr.length>0){
for(let i=0; i<arr.length; i++){
if(arr[i].pushType == item){
return true;
}
}
return false;
}else{
return false;
}
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let req = this.templateRuleForm;
this.goToSaveTemplate(req, () => {
// 恢复 模板默认传参 && 关闭弹窗
this.templateRuleForm = JSON.parse(JSON.stringify(this.initTemplateRuleForm));
this.templateDialogVisible = false;
this.getStrategyList()
})
} else {
console.log('error submit!!');
return false;
}
});
},
// 模板 保存
goToSaveTemplate(req, cb) {
openLoading(this);
this.POST('raytheon/msgTemplateInfo/save', req).then((res) => {
closeLoading(this);
if( res && res.code && res.code == '000000') {
cb && cb();
}else{
this.$message({
message: res.message || '接口请求失败',
type: 'warning'
});
}
})
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
handleCloseTemplateModal() {
this.resetForm('templateRuleForm');
this.templateDialogVisible = false;
}
}
}
</script>
<style lang="scss">
.strategy-manage-wrap{
.pagination{
margin: 20px 0;
text-align: right;
}
.el-form-item .el-form-item__label{
font-size: 14px;
}
.component-content{
margin-top: 60px;
padding: 10px;
background: #fff;
}
.table-wrap{
padding: 0 80px; overflow: hidden;
}
.template-modal-wrap{
.el-dialog--center{
margin-top: 3vh !important;
}
.el-dialog__header{
text-align: left;
}
.el-dialog__body{
padding-top: 0;
padding-bottom: 15px;
.app-channel-item{
margin-bottom: 0;
}
.el-textarea__inner{
padding: 5px 42px 5px 15px;
}
}
}
.bottom-tips{
text-indent: 120px;
margin-top: 28px;
span{
color: #449284;
margin-left: 20px;
}
}
.input-rule-wrap{
.el-dialog--center{
margin-top: 3vh !important;
}
.el-dialog__body{
height: 400px;
overflow: hidden;
overflow-y: scroll;
padding-bottom: 0;
.el-table{
margin-top: 0 !important;
.el-table__row{
.active{
color: #409EFF;
}
.not-active{
color: #606266;
}
}
}
}
.el-dialog__footer{
.input-bottom-tips{
color: red;
text-align: left;
margin: 12px 0;
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="item-role-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="header-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form :model="formInline" ref="formInline" label-width="75px" class="form-inline">
<el-col :span="5">
<el-form-item label="姓名:">
<el-input size="small" v-model="formInline.userName" placeholder="请输入名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="角色:">
<el-select size="small" v-model="formInline.projeceRole" placeholder="请选择角色">
<el-option
v-for="(item, index) in roleList"
:key="index"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="所属机构:">
<el-select size="small" v-model="formInline.organizationName" placeholder="请选择所属机构">
<el-option
v-for="(item, index) in organizationList"
:key="index"
:label="item"
:value="item"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="所属科室:">
<el-select size="small" v-model="formInline.departmentsName" placeholder="请选择所属科室">
<el-option
v-for="(item, index) in departmentsList"
:key="index"
:label="item"
:value="item"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" style="padding:0;text-align:right;padding-right:10px;">
<el-button type="primary" size="small" @click="searchList()">查询</el-button>
<el-button
type="default"
size="small"
@click="resetForm('formInline')"
style="margin-left:0;"
>重置</el-button>
</el-col>
</el-form>
</el-row>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="userId" label="用户ID" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column prop="projeceRole" label="角色" align="center">
<template slot-scope="scope">
<span>{{ scope.row.projeceRole | projeceRoleType }}</span>
</template>
</el-table-column>
<el-table-column prop="organizationName" label="所属机构" align="center"></el-table-column>
<el-table-column prop="departmentsName" label="科室" align="center"></el-table-column>
<el-table-column fixed="right" label="操作" width="300" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="small"
v-show="showButton(scope.row,'L2')"
@click="openDialog(scope.row,'L2')"
>升级项目负责人</el-button>
<el-button
type="primary"
size="small"
v-show="showButton(scope.row,'L3')"
@click="openDialog(scope.row,'L3')"
>升级次级负责人</el-button>
<el-button
type="primary"
size="small"
v-show="showButton(scope.row,'L0')"
@click="openDialog(scope.row,'L0')"
>降为普通用户</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formInline.pageNo"
:page-sizes="[10, 20, 30, 100]"
:page-size="formInline.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
<el-dialog title :visible.sync="dialog.show" width="30%" center>
<p v-if="numL3 > 1" class="dialog-p">
确认将{{ dialog.role }}
<span class="user-name">"{{ dialog.name }}"</span>
{{ dialog.option }}吗?"
</p>
<p v-else >该用户为此机构仅有的次级负责人,确认需要降级吗?</p>
<span slot="footer" class="dialog-footer">
<el-button type="default" size="small" @click="dialog.show = false">取消</el-button>
<el-button type="primary" size="small" @click="changeRole()">确定</el-button>
</span>
</el-dialog>
<el-dialog title :visible.sync="dialogFull" width="30%" center>
<p class="dialog-p">
无法操作,项目负责人已满
<span class="user-name">5人</span>
</p>
<span slot="footer" class="dialog-footer">
<el-button type="default" size="small" @click="dialogFull = false">取消</el-button>
<el-button type="primary" size="small" @click="dialogFull = false">确定</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain";
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from '../../utils/utils'
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
const item = {
userId: "298490",
userName: "李雪",
projeceRole: "L0",
organizationName: "浙江省人民医院",
departmentsName: "外科"
};
return {
curmbFirst: "系统管理",
curmbSecond: "角色管理",
curmbThird: "项目角色",
tableData: [],
loading: true,
timingTime: "",
totalRows: 0,
currentPage: 1,
formInline: {
portalProjectId: "",
pageNo: 1,
pageSize: 10,
departmentsName: "",
organizationName: "",
projeceRole: "",
userName: ""
},
departmentsList: [],
organizationList: [],
roleList: [
{
label: "内部管理员",
value: "L1"
},
{
label: "项目负责人",
value: "L2"
},
{
label: "次级负责人",
value: "L3"
},
{
label: "普通用户",
value: "L0"
}
],
numL2: 0,
numL3: 0,
dialog: {
show: false,
role: "项目负责人",
name: "李雷",
option: "升级为项目负责人",
full: false
},
dialogFull: false,
scopeRow: {},
activeUser: '',
};
},
created() {
vm = this;
this.queryRoleList();
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
searchList() {
this.formInline.pageNo = 1;
this.queryRoleList();
},
//查询用户列表
queryRoleList() {
this.formInline.portalProjectId = vm.getUrlSearch(
window.location.href,
"portalProjectId"
);
if (this.formInline.portalProjectId == null) {
this.formInline.portalProjectId = "";
}
let req = {};
req = this.formInline;
openLoading(vm);
vm.GET("portal/portalProjectOrRole/queryRoleList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data.projectRoleInfoModels;
vm.totalRows = res.data.total;
vm.activeUser = res.data.activeUser;
console.log('activeUser',vm.activeUser);
//this.roleList = setRoleList(res.data.roleList);
this.organizationList = res.data.organizationList;
this.departmentsList = res.data.departmentsList;
this.numL2 = res.data.numL2;
this.numL3 = res.data.numL3;
}
});
},
//改变等级
changeRole() {
let req = {
portalProjectId: this.formInline.portalProjectId,
updateL: this.scopeRow.updateL,
userId: this.scopeRow.userId,
numL2: this.numL2,
nowL: this.scopeRow.projeceRole
};
vm.GET("portal/portalProjectOrRole/roleLevelUpdate", req).then(res => {
this.dialog.show = false;
if (res.code == "000000") {
console.log(res);
this.queryRoleList();
}
vm.$message({
type: 'info',
message: res.message,
})
});
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.formInline.pageSize = val;
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.formInline.pageNo = val;
this.queryRoleList();
},
//重置表单
resetForm() {
vm.formInline = Object.assign(
{},
{
portalProjectId: "",
pageNo: 1,
pageSize: 10,
departmentsName: "",
organizationName: "",
projeceRole: "",
userName: ""
}
);
vm.queryRoleList();
},
//按钮展示情况
showButton(row, projeceRole) {
let flag = false;
if(vm.activeUser == "L1") {
//当前内部管理员
if (row.projeceRole == "L2") {
if (projeceRole == "L0") {
flag = true;
}
} else if (row.projeceRole == "L3") {
if (projeceRole == "L2" || projeceRole == "L0") {
flag = true;
}
} else if (row.projeceRole == "L0") {
if (projeceRole == "L2" || projeceRole == "L3") {
flag = true;
}
}
} else if (vm.activeUser == "L2") {
//当前项目负责人
if (row.projeceRole == "L3") {
if (projeceRole == "L2" || projeceRole == "L0") {
flag = true;
}
} else if (row.projeceRole == "L0") {
if (projeceRole == "L2" || projeceRole == "L3") {
flag = true;
}
}
} else if (vm.activeUser == "L3") {
//当前次级负责人
if (row.projeceRole == "L0") {
if (projeceRole == "L3") {
flag = true;
}
}
}
return flag;
},
//打开弹出框
openDialog(row, projeceRole) {
console.log(row);
if (projeceRole == "L2" && this.numL2 >= 5) {
this.dialogFull = true;
} else {
this.dialog.show = true;
}
this.dialog.name = row.userName;
this.scopeRow = row;
this.scopeRow.updateL = projeceRole;
if (row.projeceRole == "L2") {
this.dialog.role = "项目负责人";
if (projeceRole == "L0") {
this.dialog.option = "降级为普通用户";
}
} else if (row.projeceRole == "L3") {
this.dialog.role = "次级负责人";
if (projeceRole == "L2") {
this.dialog.option = "升级为项目负责人";
} else if (projeceRole == "L0") {
this.dialog.option = "降级为普通用户";
}
} else if (row.projeceRole == "L0") {
this.dialog.role = "普通用户";
if (projeceRole == "L2") {
this.dialog.option = "升级为项目负责人";
} else if (projeceRole == "L3") {
this.dialog.option = "升级为次级负责人";
}
}
}
}
};
</script>
<style lang="scss">
.item-role-wrap {
.component-content {
padding: 10px;
background: #fff;
.form-inline {
margin-left: 30px;
}
.header-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.dialog-p {
text-align: center;
span {
color: #449284;
}
}
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="role-wrap">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond"></bread-crumb>
<div class="component-content screenSet" id="screenSet">
<div class="header-title">查询条件</div>
<el-row :gutter="30" class="row" type="flex" style="margin-top: 10px;">
<el-form ref="formInline" :model="formInline" label-width="75px" style="width:100%;">
<el-col :span="6">
<el-form-item label="项目名称:">
<el-input v-model="formInline.projectName" size="small" placeholder="请输入项目名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="项目时间:">
<el-date-picker
v-model="formInline.projectBegintime"
size="small"
type="datetime"
placeholder="请选择开始时间"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions0"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="~">
<el-date-picker
v-model="formInline.projectEndtime"
size="small"
type="datetime"
placeholder="请选择结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions1"
default-time="23:59:59"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" style="padding:0;text-align:right;padding-right:15px;">
<el-button type="primary" size="small" @click="searchList">查询</el-button>
<el-button type="default" size="small" @click="resetForm" style="margin-left:0;">重置</el-button>
</el-col>
</el-form>
</el-row>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="id" label="ID编号" min-width="100" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="createdName" label="创建人" align="center"></el-table-column>
<el-table-column prop="projectIntro" label="项目简介" align="center" min-width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="projectBegintime" label="项目开始时间" align="center"></el-table-column>
<el-table-column prop="projectEndtime" label="项目结束时间" align="center"></el-table-column>
<el-table-column prop="projectStatus" label="状态" align="center">
<template slot-scope="scope">
<span>{{ [scope.row.projectStatus , idType] | statusProject }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="toPage(scope.row)">查看项目人员</el-button>
</template>
</el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="formInline.pageNo"
:page-sizes="[10, 30, 50, 100]"
:page-size="formInline.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"
></el-pagination>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain";
import { mapGetters } from 'vuex'
import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils";
let vm = null;
export default {
components: {
BreadCrumb
},
data() {
return {
curmbFirst: "系统管理",
curmbSecond: "角色管理",
tableData: [],
loading: false,
timingTime: "",
currentPage: 1,
duringTime: 0,
totalRows: 0,
formInline: {
projectName: "",
projectBegintime: "",
projectEndtime: "",
pageNo: 1,
pageSize: 10,
type: 2
},
pickerOptions0: {
disabledDate: time => {
if (this.formInline.projectEndtime != "" && this.formInline.projectEndtime !=null) {
return (
time.getTime() >
new Date(this.formInline.projectEndtime).getTime()
);
}
}
},
pickerOptions1: {
disabledDate: time => {
return (
time.getTime() <
new Date(this.formInline.projectBegintime).getTime()
); //减去一天的时间代表可以选择同一天;
}
}
};
},
computed: {
...mapGetters(["_token"])
},
created() {
vm = this;
vm.idType = localStorage.getItem('storageIdType');
console.log('idType:',vm.idType);
this.search();
},
// 挂载到Dom完成时
mounted: function() {
commonUtil.resizeHeight();
},
methods: {
searchList() {
this.formInline.pageNo = 1;
this.search();
},
search() {
let req = {};
//console.log(this.formInline);
req = this.formInline;
openLoading(vm);
vm.GET("portal/portalInfo/getProjectList", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.tableData = res.data.data;
vm.totalRows = res.data.totalRows;
}
});
},
resetForm() {
vm.formInline = Object.assign(
{},
{
projectName: "",
projectBegintime: "",
projectEndtime: "",
duringTime: "",
pageNo: 1,
pageSize: 10
}
);
vm.search();
},
toPage(row) {
this.$router.push("item-role?portalProjectId=" + row.id);
},
handleSizeChange(val) {
this.formInline.pageSize = val;
this.search();
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
this.formInline.pageNo = val;
this.search();
console.log(`当前页: ${val}`);
}
}
};
</script>
<style lang="scss">
.role-wrap {
.component-content {
padding: 10px;
background: #fff;
.header-title {
padding: 10px 12px;
font-size: 12px;
color: #449284;
border-bottom: 1px solid #efefef;
}
.to-right {
float: right;
}
.add-button {
float: right;
}
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
}
}
</style>
\ No newline at end of file
Stack trace:
Frame Function Args
00000010002 0018006021E (00180241C10, 001802340B9, 00000010002, 000FFFFBA00)
00000010002 00180048859 (00000000002, 0018032A0D0, 00000000002, 0018032A0D0)
00000010002 00180048892 (00000000002, 0018032A3E0, 00000010002, 00000000008)
00000010002 001800598BC (001800C0322, 2D5C745C695C675C, 6F5C6C5C705C755C, 705C2D5C645C615C)
000FFFFCCD0 00180059960 (00100460280, 0018020B860, 3F736865FF677272, 705C615C2D5C625C)
000FFFFCCD0 00180048FE1 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 00180047963 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 00180047A14 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册