Commit 6d4f5dc5 authored by yanghaitao's avatar yanghaitao

0816

parent 8bc03492
jingning_vue @ 740492ab
Subproject commit 740492aba65f2efce890f154e0ad4783d8dfb6cf
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
}
}
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
/build/
/config/
/dist/
/*.js
/test/unit/coverage/
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/test/unit/coverage/
/test/e2e/reports/
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
# sy
> A Vue.js project
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
{
test:/\.scss$/,
loader:'sass-loader!style-loader!css-loader'
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
favicon: ''
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = process.env.NODE_ENV === 'testing'
? require('../config/test.env')
: require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: process.env.NODE_ENV === 'testing'
? 'index.html'
: config.build.index,
template: 'index.html',
inject: true,
favicon: '',
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'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// 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',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/qt_web/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
// host: '192.168.68.105',
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/portal/001/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
'use strict'
module.exports = {
NODE_ENV: '"production"'
}
'use strict'
const merge = require('webpack-merge')
const devEnv = require('./dev.env')
module.exports = merge(devEnv, {
NODE_ENV: '"testing"'
})
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>景宁数字政府门户</title>
<script src="https://alidt.alicdn.com/alilog/mlog/aplus_cloud.js"></script>
<script src='https://wpk-gate.zjzwfw.gov.cn/static/wpk-jssdk.1.0.2/wpkReporter.js' crossorigin='true'></script>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script>
//稳定性监控代码
try {
const config = {
bid: 'syszzfmh_zzdpro',
signkey: '1234567890abcdef',
gateway: 'https://wpk-gate.zjzwfw.gov.cn'
};
const wpk = new wpkReporter(config);
wpk.installAll();
window._wpk = wpk;
} catch (err) {
console.error('WpkReporter init fail', err);
}
// 埋点初始化代码
(function (w, d, s, q, i) {
w[q] = w[q] || [];
var f = d.getElementsByTagName(s)[0], j = d.createElement(s);
j.async = true;
j.id = 'beacon-aplus';
j.src = 'https://alidt.alicdn.com/alilog/mlog/aplus_cloud.js';
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'aplus_queue');
//适配pad
var view_timer = null;
function viewPort(userAgent, pageWidth) {
var oView = document.getElementById('viewport');
if (oView) {
document.head.removeChild(oView);
}
if (!pageWidth) {
pageWidth = 1440;
}
var screen_w = parseInt(window.screen.width),
screen_h =parseInt(window.screen.height),
scale = screen_w / pageWidth;
if (/Android (\d+\.\d+)/.test(userAgent)) {
var creat_meta = document.createElement('meta');
creat_meta.name = 'viewport';
creat_meta.id = 'viewport';
var version = parseFloat(RegExp.$1);
if (version > 2.3) {
creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale + ',user-scalable=1, minimum-scale = ' + scale + ', maximum-scale = ' + scale + ', target-densitydpi=device-dpi';
} else {
creat_meta.content = '"width=' + pageWidth + ', target-densitydpi=device-dpi';
}
document.head.appendChild(creat_meta);
} else {
var creat_meta = document.createElement('meta');
creat_meta.name = 'viewport';
creat_meta.id = 'viewport';
if (window.orientation == '-90' || window.orientation == '90') {//判断移动设备横屏竖屏
scale = window.screen.height / pageWidth;
creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale*screen_w/screen_h + ' ,minimum-scale = ' + scale*screen_w/screen_h + ', maximum-scale = ' + scale*screen_w/screen_h + ', user-scalable=no, target-densitydpi=device-dpi';
}
else {
creat_meta.content = 'width=' + pageWidth + ', initial-scale = ' + scale + ' ,minimum-scale = ' + scale + ', maximum-scale = ' + scale + ', user-scalable=no, target-densitydpi=device-dpi';
}
document.head.appendChild(creat_meta);
}
}
viewPort(navigator.userAgent);
window.onresize = function () {
clearTimeout(view_timer);
view_timer = setTimeout(function () {
viewPort(navigator.userAgent);
}, 500);
}
</script>
</html>
\ No newline at end of file
This diff is collapsed.
{
"name": "sy",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "wangyile <wyl19980808@163.com>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"unit": "jest --config test/unit/jest.conf.js --coverage",
"e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e",
"lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.21.1",
"default-passive-events": "^2.0.0",
"echarts": "^5.1.0",
"element-ui": "^2.15.1",
"gdt-jsapi": "^1.9.10",
"vue": "^2.5.2",
"vue-router": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-jest": "^21.0.2",
"babel-loader": "^7.1.1",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^2.0.1",
"chromedriver": "^2.27.2",
"copy-webpack-plugin": "^4.0.1",
"cross-spawn": "^5.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"jest": "^22.0.4",
"jest-serializer-vue": "^0.3.0",
"nightwatch": "^0.9.12",
"node-notifier": "^5.1.2",
"node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"sass-loader": "^7.3.1",
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-jest": "^1.0.2",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: "App",
};
</script>
<style>
</style>
import axios from 'axios'
import { Base64 } from 'js-base64'
let base = 'https://szzf.songyang.gov.cn:8081';
let requestHead = {
headers: {
'Authorization': 'Basic ' + Base64.encode('98b8c111526e4b1eba5cde7669ab2228:y916a7f471944898ab68c8b256e0c1f2')
}
};
function get(url) {
return axios.get(base + url, requestHead)
.then(res => {
if (res.status !== 200) return null;
return res.data;
}).catch(err => {
console.error(err);
return err;
});
};
function post(url, data) {
return axios.post(base + url, data, requestHead)
.then(res => {
if (res.status !== 200) return null;
return res;
}).catch(err => {
console.error(err); //输出日志
return null;
})
};
function del(url) {
return axios.delete(base + url, requestHead)
.then(res => {
if (res.status !== 200) return null;
return res.data.data;
}).catch(err => {
console.error(err);
return null;
});
}
function put(url, data) {
return axios.put(base + url, data, requestHead)
.then(res => {
if (res.status !== 200) return null;
return res.data;
}).catch(err => {
console.error(err);
return null;
})
}
function getMyCityName()
{
return "景宁畲族自治县";
}
function getMyCity()
{
return "景宁畲族自治县";
}
// 获取搜索内容
export const getSearchCon = (a, b,c=1,d=10) => {
return get('/common/search/'+b+'/query?&searchKey=' + a + '&pageNum='+c+'&pageSize='+d);
};
//获取扫码登录后用户信息
export const getPortalUserinfo = (a) => {
return get('/api/portal/userinfo?area=sy&code=' + a);
};
//获取免登后用户信息和权限信息
export const getUserInfo = (a) => {
return get('/api/portal/qrinfo?area=sy&code=' + a);
}
//获取扫码登录后用户权限
export const getPortal2 = (a) => {
return get('/api/portal/qrinfo2?area=sy&account=' + a);
}
//获取任务项
export const getTask = () => {
return get('/api/Data/list?level=1');
}
* {
margin: 0;
padding: 0;
}
ul,li {
list-style-type: none;
}
#app {
width: 100%;
height: 100%;
background-color: #f2f3f5;
}
.c3 {
color: #333333;
}
.bold {
border-bottom: 5px solid #dddddd;
}
.bold1 {
border-bottom: 2px solid #dddddd;
}
.fs24 {
font-size: 24px;
}
.fs22 {
font-size: 22px;
}
.fs20 {
font-size: 20px;
}
.fs18 {
font-size: 18px;
}
.fs16 {
font-size: 16px;
}
.fs14 {
font-size: 14px;
}
.fs13 {
font-size: 13px;
}
.fs12 {
font-size: 12px;
}
.b {
font-weight: 600;
}
.flex {
display: flex;
}
.jcenter {
justify-content: center;
}
.jend {
justify-content: flex-end;
}
.aiend {
align-items: flex-end;
}
.between{
justify-content: space-between;
}
.around{
justify-content: space-around;
}
.wrap {
flex-wrap: wrap;
}
.column{
display: -webkit-flex;
display: -moz-flex;
display: flex;
flex-direction: column;
}
.acenter{
display: -webkit-flex;
display: -moz-flex;
display: flex;
align-items: center;
}
.wrap {
flex-wrap: wrap;
}
.textCenter {
text-align: center;
}
.flex1 {
flex-grow: 1;
}
.flex2 {
flex-grow: 2;
}
.c6 {
color: #666666;
}
.c9 {
color: #999999;
}
.c0 {
color: #000000;
}
.cf {
color: #fff;
}
.bgf {
background: #fff;
}
.bgf78 {
background: #f7f8fa;
}
.bgedf {
background: #edf4ff;
}
.bgf0f {
background: #F0FAF2;
}
.bgff5 {
background: #fff5ed;
}
.c6dd {
color: #6dd993;
}
.c15b {
color: #15be50;
}
.bg15b {
background: #15be50;
}
.c149 {
color: #1492ff;
}
.bg149 {
background: #1492ff;
}
.cff6 {
color: #acabab;
}
.bgff6 {
background: #ff6b00;
}
.bgff8 {
background: #ff8126;
}
.bgffc {
background: #ffc341;
}
.cd4 {
color: #d40000;
}
.bgffe {
background: #ffebeb;
}
/* hover时 */
.bg37c {
background: #37cc6a;
}
.c37c {
color: #37cc6a;
}
.c269 {
color: #2690f3;
}
.cff8 {
color: #ff8126;
}
.bradius4 {
border-radius: 4px;
}
.bradius2 {
border-radius: 2px;
}
.icon20 {
width: 20px;
height: 20px;
}
.icon18 {
width: 18px;
height: 18px;
}
.icon16 {
width: 16px;
height: 16px;
}
.icon14 {
width: 14px;
height: 14px;
}
.ml12 {
margin-left: 12px;
}
.ml20 {
margin-left: 20px;
}
.ml50 {
margin-left: 50px;
}
.ml40 {
margin-left: 40px;
}
.mr12 {
margin-right: 12px;
}
.mr20 {
margin-right: 20px;
}
.mr40 {
margin-right: 40px;
}
.mr60 {
margin-right: 60px;
}
.mr70 {
margin-right: 70px;
}
.mt12 {
margin-top: 12px;
}
.mt20 {
margin-top: 20px;
}
.mt30 {
margin-top: 30px;
}
.mt40 {
margin-top: 40px;
}
.mb20 {
margin-bottom: 20px;
}
.pb20 {
padding-bottom: 20px;
}
.p10 {
padding: 10px;
}
.p12 {
padding: 12px;
}
.pl20 {
padding-left: 20px;
}
.pr20 {
padding-right: 20px;
}
.pb12 {
padding-bottom: 12px;
}
.bg20d{
background: #20DBEE;
}
.bg369{
background: #3699F7;
}
.bga0f{
background: #AA00FF;
}
.fl{
float: left;
}
.fr{
float: right;
}
.clearfix,.clearfix::after{
content: '';
display: block;
clear: both;
}
.ellipsis{
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.p20 {
padding: 20px;
}
\ No newline at end of file
*{
margin: 0;
padding: 0;
}
body{
font-size: 16px;
}
ul {
list-style: none;
}
.module-tit{
font-size: 20px;
padding: 16px 0 12px 12px;
font-weight: 600;
position: relative;
}
.module-tit::before{
content: "";
position: absolute;
left: 0px;
top: 16px;
width: 4px;
height: 28px;
background-color: #1492ff;
}
.prompt-text {
color: #333;
line-height: 36px;
}
.prompt-text span,.prompt-text-6 span {
color: #1492ff;
font-weight: 600;
margin: 0 3px;
}
.prompt-text-6{
color: #666;
line-height: 36px;
}
.sy-tooltip{
color: #333;
padding: 5px 12px!important;
background-color: #fff;
/* transform: translateY(40px); */
font-size: 16px!important;
}
.unify-item{
box-sizing: border-box;
padding: 0 20px 12px;
background-color: #fff;
border-radius: 4px;
margin-bottom: 20px;
}
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
This diff is collapsed.
@font-face {
font-family: "iconfont"; /* Project id 2531829 */
src: url('iconfont.woff2?t=1623827017972') format('woff2'),
url('iconfont.woff?t=1623827017972') format('woff'),
url('iconfont.ttf?t=1623827017972') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-jinggao:before {
content: "\e663";
}
.icon-shangsheng:before {
content: "\e641";
}
.icon-gongyuzhuzhai:before {
content: "\e65c";
}
.icon-kongqiyouliang:before {
content: "\e601";
}
.icon-shanshui:before {
content: "\e615";
}
.icon-pm:before {
content: "\e74e";
}
.icon-hehu:before {
content: "\e6c3";
}
.icon-chengshi1:before {
content: "\e602";
}
.icon-yuan:before {
content: "\e6cc";
}
.icon-huanzhuangtu1:before {
content: "\e76d";
}
.icon-jingshi:before {
content: "\e600";
}
.icon-zhengchang:before {
content: "\e9a3";
}
.icon-zhihou:before {
content: "\e690";
}
.icon-56:before {
content: "\e69a";
}
.icon-nav:before {
content: "\e66b";
}
.icon-quyu:before {
content: "\e68c";
}
.icon-wenhua:before {
content: "\e608";
}
.icon-iconshuangzhaoshuangyin:before {
content: "\eb78";
}
.icon-xunhuan:before {
content: "\e624";
}
.icon-shangwu:before {
content: "\e61e";
}
.icon-yufangbaojianke:before {
content: "\e670";
}
.icon-huayuan:before {
content: "\e62a";
}
.icon-juxing:before {
content: "\e715";
}
.icon-shengtai:before {
content: "\e719";
}
.icon-gaige:before {
content: "\e613";
}
.icon-chengshi:before {
content: "\e605";
}
.icon-indexactive:before {
content: "\e625";
}
.icon-shengchanguanli:before {
content: "\e633";
}
.icon-xiangcun:before {
content: "\e760";
}
.icon-zhengfuxiaoneng:before {
content: "\e6fb";
}
.icon-minshengfuwu:before {
content: "\e626";
}
This diff is collapsed.
{
"id": "2531829",
"name": "sy",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "9387346",
"name": "警告",
"font_class": "jinggao",
"unicode": "e663",
"unicode_decimal": 58979
},
{
"icon_id": "3349898",
"name": "上升",
"font_class": "shangsheng",
"unicode": "e641",
"unicode_decimal": 58945
},
{
"icon_id": "910254",
"name": "公寓、住宅",
"font_class": "gongyuzhuzhai",
"unicode": "e65c",
"unicode_decimal": 58972
},
{
"icon_id": "7971759",
"name": "空气优良",
"font_class": "kongqiyouliang",
"unicode": "e601",
"unicode_decimal": 58881
},
{
"icon_id": "9465781",
"name": "山水",
"font_class": "shanshui",
"unicode": "e615",
"unicode_decimal": 58901
},
{
"icon_id": "9744793",
"name": "pm2.5",
"font_class": "pm",
"unicode": "e74e",
"unicode_decimal": 59214
},
{
"icon_id": "12633221",
"name": "河湖",
"font_class": "hehu",
"unicode": "e6c3",
"unicode_decimal": 59075
},
{
"icon_id": "15793920",
"name": "城市",
"font_class": "chengshi1",
"unicode": "e602",
"unicode_decimal": 58882
},
{
"icon_id": "6393453",
"name": "圆",
"font_class": "yuan",
"unicode": "e6cc",
"unicode_decimal": 59084
},
{
"icon_id": "8866376",
"name": "环状图",
"font_class": "huanzhuangtu1",
"unicode": "e76d",
"unicode_decimal": 59245
},
{
"icon_id": "17794830",
"name": "预警中心-警示",
"font_class": "jingshi",
"unicode": "e600",
"unicode_decimal": 58880
},
{
"icon_id": "19071106",
"name": "正常",
"font_class": "zhengchang",
"unicode": "e9a3",
"unicode_decimal": 59811
},
{
"icon_id": "21008704",
"name": "滞后",
"font_class": "zhihou",
"unicode": "e690",
"unicode_decimal": 59024
},
{
"icon_id": "392145",
"name": "信用卡",
"font_class": "56",
"unicode": "e69a",
"unicode_decimal": 59034
},
{
"icon_id": "1174321",
"name": "nav",
"font_class": "nav",
"unicode": "e66b",
"unicode_decimal": 58987
},
{
"icon_id": "2484452",
"name": "quyu",
"font_class": "quyu",
"unicode": "e68c",
"unicode_decimal": 59020
},
{
"icon_id": "3507250",
"name": "wenhua",
"font_class": "wenhua",
"unicode": "e608",
"unicode_decimal": 58888
},
{
"icon_id": "7901433",
"name": "icon双招双引",
"font_class": "iconshuangzhaoshuangyin",
"unicode": "eb78",
"unicode_decimal": 60280
},
{
"icon_id": "8281629",
"name": "循环",
"font_class": "xunhuan",
"unicode": "e624",
"unicode_decimal": 58916
},
{
"icon_id": "8504243",
"name": "商务",
"font_class": "shangwu",
"unicode": "e61e",
"unicode_decimal": 58910
},
{
"icon_id": "10268452",
"name": "预防保健科",
"font_class": "yufangbaojianke",
"unicode": "e670",
"unicode_decimal": 58992
},
{
"icon_id": "10314532",
"name": "花园",
"font_class": "huayuan",
"unicode": "e62a",
"unicode_decimal": 58922
},
{
"icon_id": "11082845",
"name": "科技",
"font_class": "juxing",
"unicode": "e715",
"unicode_decimal": 59157
},
{
"icon_id": "11829715",
"name": "生态",
"font_class": "shengtai",
"unicode": "e719",
"unicode_decimal": 59161
},
{
"icon_id": "13844908",
"name": "改革",
"font_class": "gaige",
"unicode": "e613",
"unicode_decimal": 58899
},
{
"icon_id": "15162653",
"name": "chengshi",
"font_class": "chengshi",
"unicode": "e605",
"unicode_decimal": 58885
},
{
"icon_id": "16370706",
"name": "index active",
"font_class": "indexactive",
"unicode": "e625",
"unicode_decimal": 58917
},
{
"icon_id": "17283208",
"name": "shengchanguanli ",
"font_class": "shengchanguanli",
"unicode": "e633",
"unicode_decimal": 58931
},
{
"icon_id": "19721623",
"name": "乡村",
"font_class": "xiangcun",
"unicode": "e760",
"unicode_decimal": 59232
},
{
"icon_id": "20639702",
"name": "政府效能",
"font_class": "zhengfuxiaoneng",
"unicode": "e6fb",
"unicode_decimal": 59131
},
{
"icon_id": "20923999",
"name": "minshengfuwu",
"font_class": "minshengfuwu",
"unicode": "e626",
"unicode_decimal": 58918
}
]
}
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#85A0C0" d="M856 615.3l-34.5-5.6c-4.5-0.7-9.1-1.1-13.6-1.1-14.5 0-28.9 3.7-41.6 11L588 720.3c-0.6 0.4-1.4 0.5-2.1 0.5-0.7 0-1.5-0.2-2.1-0.6l-54-31.2h45.5c21.6 0 39.1-17.5 39.1-39.1V627.2c0-21.6-17.5-39.1-39.1-39.1H368.1c-3.4 0-6.7 0.3-9.8 0.6-0.8 0.1-1.4 0.2-2.2 0.3-7.4 1.1-13.1 2.6-13.1 2.6l-184.5 54.2c-2.2 0.7-3.5 3-2.9 5.3l39.5 134.5c0.5 1.8 2.2 3 4.1 3 0.4 0 0.8-0.1 1.2-0.2l133.9-39.3c0.4-0.1 0.8-0.2 1.2-0.2 0.7 0 1.5 0.2 2.1 0.6l224.1 129.4c6.1 3.7 11.8 4.9 16.9 4.9 11.1 0 18.8-6 18.8-6L864 642c9.6-8.4 4.9-24.5-8-26.7z" /><path fill="#85A0C0" d="M332.6 555.7c2.9-0.8 18.4-5 35.5-5h207.2c36.5 0 67 25.6 74.7 59.8 71.4-45.3 118.9-124.8 118.9-215.6 0-141-114.3-255.3-255.3-255.3S258.3 253.9 258.3 394.9c0 62.9 22.8 120.4 60.5 164.9l13.8-4.1z m72.3-168.6l101-101c4.3-4.3 11.2-4.3 15.5 0l101 101c4.3 4.3 4.3 11.2 0 15.5l-101 101c-4.3 4.3-11.2 4.3-15.5 0l-101-101c-4.3-4.2-4.3-11.2 0-15.5z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#85A0C0" d="M779.93984 119.82848H422.7072l-178.62656 402.16576h154.23488l-109.568 397.23008 446.5664-479.06816h-163.77856L779.93984 119.82848z m0 0" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="198.83px" viewBox="0 0 1030 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#85A0C0" d="M530.330773 688.109001a44.528192 44.528192 0 0 1-23.451515-6.679229c-13.061603-8.015075-323.12625-202.009567-378.341209-452.554863a174.25366 174.25366 0 0 1 36.809972-148.427308A215.961734 215.961734 0 0 1 329.360197 0C400.753732 0 473.779968 45.418756 518.011306 107.906653 564.023772 45.715611 638.237426 0 709.185679 0A220.56298 220.56298 0 0 1 877.205392 84.158284a166.387013 166.387013 0 0 1 32.208726 146.349326c-72.284099 276.520075-344.499783 444.242934-356.22554 451.219017a44.528192 44.528192 0 0 1-22.857805 6.382374zM329.360197 89.056385a126.608494 126.608494 0 0 0-94.548195 47.051457 85.939412 85.939412 0 0 0-19.29555 73.471517C254.552834 387.09842 460.124656 541.759675 530.330773 590.146978 593.709233 545.321931 771.822003 405.503406 823.177852 207.798232a79.111755 79.111755 0 0 0-16.327004-69.315553A130.467604 130.467604 0 0 0 709.185679 89.056385c-59.370923 0-145.904044 72.432526-148.427308 143.677634a44.528192 44.528192 0 0 1-89.056385-1.484273v-2.226409C468.881867 158.223511 387.988984 89.056385 329.360197 89.056385z m537.010002 130.170749zM384.723583 838.762719C172.62096 838.762719 0 653.822293 0 426.580084a44.528192 44.528192 0 0 1 89.056385 0c0 178.11277 132.545586 323.12625 295.667198 323.12625a44.528192 44.528192 0 1 1 0 89.056385zM618.051312 824.95898a44.528192 44.528192 0 0 1 0-89.056385c178.11277 0 323.12625-132.545586 323.12625-295.518771a44.528192 44.528192 0 0 1 89.056385 0C1030.233947 653.080157 846.035657 824.95898 618.051312 824.95898z" /><path fill="#85A0C0" d="M340.195391 750.151616m44.528192 0l0 0q44.528192 0 44.528193 44.528193l0 184.791999q0 44.528192-44.528193 44.528192l0 0q-44.528192 0-44.528192-44.528192l0-184.791999q0-44.528192 44.528192-44.528193Z" /><path fill="#85A0C0" d="M573.523119 750.151616m44.528193 0l0 0q44.528192 0 44.528192 44.528193l0 184.791999q0 44.528192-44.528192 44.528192l0 0q-44.528192 0-44.528193-44.528192l0-184.791999q0-44.528192 44.528193-44.528193Z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#85A0C0" d="M157.538462 945.230769h708.923076v78.769231H157.538462v-78.769231z m354.461538-39.384615C275.692308 668.750769 157.538462 484.962462 157.538462 354.461538 157.538462 158.700308 316.238769 0 512 0s354.461538 158.700308 354.461538 354.461538c0 130.500923-118.153846 314.289231-354.461538 551.384616z m0-452.923077a98.461538 98.461538 0 1 0 0-196.923077 98.461538 98.461538 0 0 0 0 196.923077z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#85A0C0" d="M512 0C296.192 0 64 65.056 64 208v608C64 958.88 296.192 1024 512 1024c215.776 0 448-65.12 448-208v-608C960 65.056 727.744 0 512 0z m384 816c0 79.488-171.936 144-384 144-212.096 0-384-64.512-384-144v-119.552C194.112 764.576 353.6 800 512 800s317.888-35.424 384-103.552V816z m0-192h-0.128c0 0.32 0.128 0.672 0.128 0.992C896 704 724.064 768 512 768S128 704 128 624.992c0-0.32 0.128-0.672 0.128-0.992H128v-119.552C194.112 572.576 353.6 608 512 608s317.888-35.424 384-103.552V624z m0-192h-0.128c0 0.32 0.128 0.672 0.128 0.992C896 512 724.064 576 512 576S128 512 128 432.992c0-0.32 0.128-0.672 0.128-0.992H128v-109.952C211.872 385.952 365.6 416 512 416s300.128-30.048 384-93.952V432zM512 352C299.904 352 128 287.488 128 208 128 128.448 299.904 64 512 64c212.064 0 384 64.448 384 144 0 79.488-171.936 144-384 144z" /><path fill="#85A0C0" d="M800 832m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" /><path fill="#85A0C0" d="M800 640m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" /><path fill="#85A0C0" d="M800 448m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="188.58px" viewBox="0 0 1086 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#85A0C0" d="M83.356703 82.881939v638.107152c0 12.288 14.460121 33.450667 26.158545 38.912l431.817697 181.527273c-0.682667-0.682667 2.048 0.682667 2.048 0.682666s2.792727-0.682667 2.079031-0.682666l431.786666-181.527273c11.015758-4.096 26.189576-26.624 26.189576-38.912V82.881939L567.491491 212.557576l-23.396849 6.826666-23.427878-6.826666L83.356703 82.881939zM79.912339 3.04097l462.78594 130.327272 462.785939-130.327272C1048.895612-9.24703 1086.069915 16.694303 1086.069915 62.401939v657.221819c0 44.373333-34.443636 96.22497-76.427636 113.974303l-432.500364 182.892606c-12.412121 5.461333-24.110545 7.509333-34.443636 7.509333a95.26303 95.26303 0 0 1-34.443637-7.509333l-431.786666-181.527273C33.770279 817.214061 0.009309 765.362424 0.009309 720.989091V62.401939C-0.673358 17.37697 35.849309-9.24703 79.912339 3.04097zM309.3504 569.002667l-95.604364 50.765575 18.835394-107.737212L155.160824 435.2l107.737212-15.794424 47.135031-98.800485 47.786666 98.800485 107.737212 15.794424-78.103272 76.148364 18.835394 107.737212-96.938667-50.082909zM690.433552 443.42303l243.74303-83.00606c20.883394-6.857697 32.985212-30.875152 25.6-52.844606-7.447273-21.255758-30.316606-33.605818-51.851637-26.065455l-243.74303 83.006061c-20.883394 6.857697-32.985212 30.875152-25.6 52.844606 7.447273 21.969455 30.316606 33.605818 51.851637 26.065454z m0 165.391515l243.74303-83.03709c20.883394-6.888727 32.985212-30.875152 25.6-52.844607-7.447273-21.255758-30.316606-33.605818-51.851637-26.065454l-243.74303 83.006061c-20.883394 6.857697-32.985212 30.875152-25.6 52.844606a40.99103 40.99103 0 0 0 51.851637 26.065454z m0 164.646788l243.74303-83.037091c20.883394-6.826667 32.985212-30.875152 25.6-52.813575-7.447273-21.286788-30.316606-33.636848-51.851637-26.065455l-243.74303 83.006061c-20.883394 6.857697-32.985212 30.875152-25.6 52.844606 7.447273 21.938424 30.316606 33.605818 51.851637 26.065454z" /></svg>
\ No newline at end of file
This diff is collapsed.
<template>
<div class="breadcrumb">
<div class="br-top">
<el-breadcrumb
separator="/"
v-if="$route.path != '/index'"
separator-class="el-icon-arrow-right"
>
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>{{ breadData.page_name }}</el-breadcrumb-item>
</el-breadcrumb>
<div>
<i class="iconfont icon-chengshi"></i>
<span>牵头单位:{{ breadData.leading }}</span>
</div>
</div>
<div class="breadcrumb-text">
<div class="breadcrumb-title">
<img src="../assets/images/target.png" alt="" />
<span>年度目标 | </span>
{{ breadData.annual_target }}
</div>
</div>
</div>
</template>
<script>
export default {
name: "breadcrumb",
props: {
breadData: {
type: Object
},
}
};
</script>
<style lang='scss' scoped>
.breadcrumb {
width: 100%;
box-sizing: border-box;
background-color: #fff;
border-radius: 4px;
padding: 12px 20px;
margin-bottom: 20px;
>>> .el-breadcrumb {
font-size: 16px;
}
>>> .el-breadcrumb__inner {
color: #333;
font-weight: normal;
}
.br-top {
display: flex;
justify-content: space-between;
align-items: center;
}
.breadcrumb-title {
margin-top: 12px;
display: flex;
align-items: center;
span{
color: #1492ff;
margin-right: 8px;
font-size: 18px;
}
}
.breadcrumb-title img {
width: 28px;
height: auto;
}
.breadcrumb-title h2 {
font-weight: 600;
font-size: 24px;
margin-right: 20px;
}
}
</style>
\ No newline at end of file
<template>
<div class="nav">
<div class="nav-btn" @click="tabList">
<i v-if="!listShow" class="nav-btn-up el-icon-arrow-up"></i>
<i v-else class="nav-btn-down el-icon-arrow-down"></i>
导航
</div>
<div class="nav-tabs" :class="listShow?'nav-show':''">
<el-tabs v-model="activeName" v-if="navList.length">
<el-tab-pane
v-for="(item, index) in navList"
:key="index"
:label="item.title"
:name="item.name"
>
<ul class="list-item">
<li style="cursor: pointer" v-for="(citem, cindex) in item.children" :key="cindex" @click="navJump(citem.pc_url)">
{{ citem.title }}
</li>
</ul>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
export default {
data() {
return {
navList: [],
activeName: null,
listShow: false,
};
},
methods: {
tabList() {
this.listShow = !this.listShow;
},
navJump(pc_url){
window.location.href=pc_url
}
},
created(){
if(sessionStorage.navList){
this.navList = this.navList.concat(JSON.parse(sessionStorage.navList))
}
}
};
</script>
<style lang="scss" scoped>
.nav {
position: fixed;
width: 100%;
bottom: 0;
left: 50%;
transform: translateX(-50%);
z-index: 999;
.nav-btn {
width: 60px;
height: 60px;
border-radius: 50%;
font-size: 20px;
color: #fff;
background-color: #1492ff;
line-height: 60px;
text-align: center;
margin: 0 auto;
position: relative;
cursor: pointer;
.nav-btn-up,
.nav-btn-down {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.nav-btn-down {
bottom: 0;
}
}
.nav-tabs {
background: url(../assets/images/navbgi.png) no-repeat 50%;
background-size: 100%;
height: 0px;
position: relative;
transition: all .4s;
>>>.el-tabs{
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
font-size: 16px;
.el-tabs__item{
font-size: 16px;
color: #333;
}
.is-active{
color: #1492ff;
}
}
.list-item{
display: flex;
li{
margin-right: 20px;
}
}
}
.nav-show{
height: 90px;
}
}
</style>
\ No newline at end of file
<template>
<div class="index-input">
<el-input placeholder="请输入任务名称" v-model="searchText">
<el-select v-model="value" slot="prepend">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-button slot="append" @click="searchJump">
<i class="el-icon-search"></i>
搜索
</el-button>
</el-input>
</div>
</template>
<script>
export default {
name:'SearchIpt',
data() {
return {
searchText: "",
options: [
{
value: 'task',
label: "任务信息搜索",
},
{
value: 'quota',
label: "指标体系",
},
{
value: 'plan',
label: "工作体系",
},
{
value: 'policy',
label: "政策体系",
},
{
value: 'comment',
label: "评价体系",
},
{
value: 'all',
label: "全景信息",
},
],
value: this.$route.query.methodCode?this.$route.query.methodCode:'all',
};
},
created() {
this.searchText = this.$route.query.searchText?this.$route.query.searchText:'';
},
methods: {
searchJump() {
if (this.$route.path == "/search") {
this.$router.push(
"/search?searchText=" + this.searchText + "&methodCode=" + this.value
);
this.$router.go(0);
} else{
this.$router.push(
"/search?searchText=" + this.searchText + "&methodCode=" + this.value
);
}
},
},
};
</script>
<style lang="scss" scoped>
.index-input {
width: 50%;
margin: 45px auto 30px;
>>> .el-input-group__prepend {
width: 15%;
.el-input__inner {
padding-left: 10px;
padding-right: 25px;
}
}
>>> input {
height: 45px;
line-height: 45px;
font-size: 16px;
}
>>> .el-input-group__append {
text-align: center;
height: 44px;
width: 10%;
background-color: #1492ff;
border: 0;
color: #fff;
padding: 0;
font-size: 16px;
}
}
</style>
\ No newline at end of file
<template>
<div class="idx-top">
<div class="idx-top-wrap">
<div class="idx-top-left">
<img class="img-logo" src="../assets/images/logo.png" />
<h2 @click="goIndex">数字政府综合应用</h2>
<span class="idx-bj">|</span>
<span class="idx-area">云和</span>
</div>
<div class="idx-top-right">
<p>
<i class="el-icon-user-solid"></i>
<span class="username">{{ username }}</span>
,您好!
</p>
<div class="go-out" @click="goOut">退出登录</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
username: "",
};
},
methods: {
goIndex() {
if (this.$route.path !== "/index") {
this.$router.push("/index");
}
},
goOut() {
sessionStorage.removeItem("token");
this.$router.push("/login");
},
},
created() {
this.username = JSON.parse(sessionStorage.token).nickNameCn;
},
};
</script>
<style lang="scss" scoped>
.idx-top {
height: 72px;
line-height: 72px;
background-color: #1492ff;
color: #fff;
position: relative;
z-index: 999;
white-space: nowrap;
.idx-bj {
margin: 0 10px;
}
.idx-area {
margin-right: 30px;
}
.img-logo {
width: 20px;
height: 20px;
margin-right: 10px;
}
> div {
display: flex;
justify-content: space-between;
}
.idx-top-left {
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 20px;
h2 {
font-weight: 600;
cursor: pointer;
}
.el-input,
.el-input--suffix {
width: 350px;
height: 72px;
}
}
.idx-top-right {
margin-right: 20px;
position: relative;
>p{
display: flex;
align-items: center;
}
.username {
display: inline-block;
max-width: 80px;
overflow: hidden;
text-overflow: ellipsis;
margin-left: 10px;
}
.go-out {
position: absolute;
top: 50px;
left: 50%;
transform: translateX(-50%);
width: 100px;
height: 40px;
line-height: 40px;
color: #333;
background-color: #fff;
text-align: center;
opacity: 0;
visibility: hidden;
transition: all 0.4s;
cursor: pointer;
border-radius: 4px;
&:hover {
color: #1492ff;
}
}
&:hover .go-out {
opacity: 1;
visibility: inherit;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="tree">
<ul v-if="treeData && treeData.length">
<li v-for="(column, index) in treeData" :key="index">
<div class="root-div">
<span v-for="(item,index) in rootArr" :key="index" class="unify-root" :class="{'root':active==index}" @click="changeIdx(index)">{{item}}</span>
</div>
<ul v-if="column.children && column.children.length">
<li v-for="(childrenColumn, index) in column.children" :key="index">
<span>{{ childrenColumn.name }}</span>
<p v-if="childrenColumn.status=='正常'">
<i class="iconfont icon-zhengchang" style="color:#1492ff"></i>
正常
</p>
<p v-if="childrenColumn.status=='滞后'">
<i class="iconfont icon-zhihou" style="color:#D81E06"></i>
滞后
</p>
</li>
</ul>
</li>
</ul>
</div>
</template>
<script>
export default {
name: "transverseTree",
props: {
treeData: {
type: Array,
default: [],
},
},
data() {
return {
rootArr:['深化碧水行动','空气质量巩固提升行动','“无废城市”建设',"美丽河湖库"],
active:0
}
},
methods: {
changeIdx(i){
this.active = i
}
},
};
</script>
<style scope>
.tree {
position: relative;
margin: -16px auto 0;
min-height: 450px;
padding-left: 11px;
overflow: auto;
}
.tree ul {
width: 210px;
height: 100%;
position: absolute;
}
.tree ul ul {
left: 176px;
top: 0;
width: 360px;
}
.tree ul ul li {
width: 360px;
display: flex;
justify-content: space-between;
color: #333;
align-items: center;
}
.tree li {
float: left;
list-style-type: none;
position: relative;
padding: 16px 5px 0 5px;
}
.tree li .root-div {
margin: 30px 0 0;
}
.tree li .unify-root {
width: 150px;
padding: 8px 0;
font-size: 18px;
margin: 12px 0;
border: 1px solid #ddd;
cursor: pointer;
}
.tree li .root {
color: #1492ff;
}
.tree li span {
position: relative;
display: inline-block;
border-radius: 4px;
text-decoration: none;
color: #2d2d2d;
font-size: 16px;
line-height: 36px;
text-align: center;
padding: 0 12px;
}
.tree li::before {
box-sizing: inherit;
content: "";
position: absolute;
top: 33px;
left: -7px;
border-top: 2px solid #1492ff;
width: 12px;
}
.tree li::after {
box-sizing: inherit;
content: "";
position: absolute;
top: 8px;
left: -7px;
height: 100%;
border-left: 2px solid #1492ff;
}
.tree li:first-child::after {
height: 51%;
border-left: 2px solid #1492ff;
border-top: 2px solid #1492ff;
top: 33px;
width: 1px;
border-top-left-radius: 4px;
}
.tree li:last-child::after {
height: 25px;
border-left: 2px solid #1492ff;
border-bottom: 2px solid #1492ff;
top: 8px;
width: 1px;
border-bottom-left-radius: 4px;
}
.tree li:only-child::after,
.tree li:only-child::before {
display: none;
}
.tree ul ul li:only-child::before {
display: inline-block;
}
.tree ul ul li:only-child span::before {
display: inline-block;
}
.tree li:only-child span.root::before,
.tree li:only-child span.hasChild::before {
content: "";
position: absolute;
top: 50%;
transform: translateY(-50%);
right: -14px;
border-top: 2px solid #1492ff;
width: 14px;
}
.tree ul ul ul li:only-child span::before {
content: "";
position: absolute;
top: 17px;
left: -26px;
border-top: 2px solid #1492ff;
width: 26px;
}
</style>
\ No newline at end of file
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import './assets/css/reset.css'
import './assets/css/common.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/font/iconfont.css'
import * as echarts from 'echarts'
import 'default-passive-events'
Vue.prototype.$echarts = echarts
Vue.use(ElementUI)
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})
import Vue from 'vue'
import Router from 'vue-router'
import MyIndex from '../views/MyIndex.vue'
Vue.use(Router)
var router = new Router({
routes: [
{
path: '/',
name: 'Index',
component: MyIndex
},
{
path: '/xxczh',
name: 'NewUrbanization',
meta: { title: '新型城镇化' },
component: () => import('@/views/NewUrbanization')
},
{
path: '/msbz',
name: 'live',
meta: { title: '民生保障' },
component: () => import('@/views/Live')
},
{
path: '/qyxtfz',
name: 'region',
meta: { title: '区域协调发展' },
component: () => import('@/views/Region')
},
{
path: '/cyfz',
name: 'Cyfz',
meta: { title: '产业发展' },
component: () => import('@/views/Industry')
},
{
path: '/xczx',
name: 'Xczx',
meta: { title: '乡村振兴' },
component: () => import('@/views/Xczx')
},
{
path: '/aqsc',
name: 'Aqsc',
meta: { title: '安全生产' },
component: () => import('@/views/Aqsc')
},
{
path: '/sxh',
name: 'Sxh',
meta: { title: '双循环' },
component: () => import('@/views/Sxh')
},
{
path: '/kjcx',
name: 'Kjcx',
meta: { title: '科技创新' },
component: () => import('@/views/Kjcx')
},
{
path: '/yshj',
name: 'Yshj',
meta: { title: '营商环境' },
component: () => import('@/views/Yshj')
},
{
path: '/ctfy',
name: 'Ctfy',
meta: { title: '常态防疫' },
component: () => import('@/views/Epidemic')
},
{
path: '/stwm',
name: 'Stwm',
meta: { title: '生态文明' },
component: () => import('@/views/Ecology')
},
{
path: '/jfjb',
name: 'Jfjb',
meta: { title: '减负降本' },
component: () => import('@/views/Jfjb')
}
]
})
// 判断设备类型(用于判断埋点设备)
let u = navigator.userAgent;
let isAndroid = u.indexOf('Android') > -1;
let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
// 设备类型埋点编码(01:PC端,02:app端)
let devType = (isAndroid || isIOS) ? '02' : '01';
router.beforeEach((to, from, next) => {
// if (to.path == "/login"||to.path=="/nopower") {
next();
// } else {
// const token = sessionStorage.getItem("token");
// if (token) {
// next();
// } else {
// router.push("/login");
// }
// }
/*---------埋点代码开始 (路由切换执行)----------*/
// 单页应用 或 “单个页面”需异步补充PV日志参数还需进行如下埋点:
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['aplus-waiting', 'MAN'] });
// PV日志接收日志域名,必须按实际情况填写
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['aplus-rhost-v', 'alog.zjzwfw.gov.cn'] });
// 一般日志(如点击和曝光)接收日志域名
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['aplus-rhost-g', 'alog.zjzwfw.gov.cn'] });
// 判单设备设置appId
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['appId', isAndroid ? '28302650' : isIOS ? '28328447' : '47130293'] });
// 如采集用户信息是异步行为需要先执行这个BLOCK埋点
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['_hold', 'BLOCK'] });
aplus_queue.push({
'action': 'aplus.sendPV',
'arguments': [{
is_auto: false
}, {
//当前应用信息
sapp_id: '14053',
sapp_name: 'szzf-yh',
// 自定义PV参数key-value键值对(只能是这种平铺的json,不能做多层嵌套),除userName外(考虑安全原因暂时做废弃处理),其他为必填项。
dev_type: devType, // 设备类型
site_type: '101', // 站点类型 数字化改革门户100 数字政府101 党政机关整体智治102 数字社会103 数字经济104 数字法治105
is_digital_reform: '1', // 固定值传1,标识是否为数字化改革相关应用
is_workbench: '1', // 新增字段,标识是否为数字化改革工作台,取值 1或0,1代表是,0代表不是,不填该参数取默认值0
city_code: '331100', // 设区市编码
area_code: '331125', // 区县编码
page_name: '云和数字政府门户', // 页面名称
page_url: window.location.href,
page_id: window.location.hash,
_user_id: sessionStorage.token ? JSON.parse(sessionStorage.token).accountId : '', // 客户端用户ID(浙政钉2.0ID)
// _user_nick: '', // userName考虑安全原因暂时做废弃处理
}]
})
// 设置会员昵称
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["_user_nick", sessionStorage.token ? JSON.parse(sessionStorage.token).nickNameCn : '']
});
// 设置会员ID
aplus_queue.push({
action: "aplus.setMetaInfo",
arguments: ["_user_id", sessionStorage.token ? JSON.parse(sessionStorage.token).accountId : '']
});
// 如采集用户信息是异步行为,需要先设置完用户信息后再执行这个START埋点
// 此时被block住的日志会携带上用户信息逐条发出
aplus_queue.push({ action: 'aplus.setMetaInfo', arguments: ['_hold', 'START'] });
/*---------埋点代码结束----------*/
})
export default router
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment