chuwu 6 år sedan
förälder
incheckning
fccad97491

+ 42 - 0
build/build.js

@@ -0,0 +1,42 @@
+require('./check-versions')()
+var server = require('pushstate-server')
+
+var ora = require('ora')
+var rm = require('rimraf')
+var path = require('path')
+var chalk = require('chalk')
+var webpack = require('webpack')
+var config = require('../config')
+var webpackConfig = require('./webpack.prod.conf')
+
+console.log(process.env.NODE_ENV)
+
+var spinner = ora('building for ' + process.env.NODE_ENV + '...')
+spinner.start()
+
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
+    if (err) throw err
+    webpack(webpackConfig, function(err, stats) {
+        spinner.stop()
+        if (err) throw err
+        process.stdout.write(stats.toString({
+            colors: true,
+            modules: false,
+            children: false,
+            chunks: false,
+            chunkModules: false
+        }) + '\n\n')
+
+        console.log(chalk.cyan('  Build complete.\n'))
+        if (process.env.npm_config_preview) {
+            const port = process.env.PORT
+            server.start({
+                port: port,
+                directory: './dist',
+                file: '/index.html'
+            });
+            console.log(`> Listening at ${process.env.BASE_URL}:${port}\
+                            n`)
+        }
+    })
+})

+ 48 - 0
build/check-versions.js

@@ -0,0 +1,48 @@
+var chalk = require('chalk')
+var semver = require('semver')
+var packageConfig = require('../package.json')
+var shell = require('shelljs')
+function exec (cmd) {
+  return require('child_process').execSync(cmd).toString().trim()
+}
+
+var versionRequirements = [
+  {
+    name: 'node',
+    currentVersion: semver.clean(process.version),
+    versionRequirement: packageConfig.engines.node
+  },
+]
+
+if (shell.which('npm')) {
+  versionRequirements.push({
+    name: 'npm',
+    currentVersion: exec('npm --version'),
+    versionRequirement: packageConfig.engines.npm
+  })
+}
+
+module.exports = function () {
+  var warnings = []
+  for (var i = 0; i < versionRequirements.length; i++) {
+    var mod = versionRequirements[i]
+    if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
+      warnings.push(mod.name + ': ' +
+        chalk.red(mod.currentVersion) + ' should be ' +
+        chalk.green(mod.versionRequirement)
+      )
+    }
+  }
+
+  if (warnings.length) {
+    console.log('')
+    console.log(chalk.yellow('To use this template, you must update following to modules:'))
+    console.log()
+    for (var i = 0; i < warnings.length; i++) {
+      var warning = warnings[i]
+      console.log('  ' + warning)
+    }
+    console.log()
+    process.exit(1)
+  }
+}

+ 9 - 0
build/dev-client.js

@@ -0,0 +1,9 @@
+/* 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()
+  }
+})

+ 91 - 0
build/dev-server.js

@@ -0,0 +1,91 @@
+require('./check-versions')()
+
+var config = require('../config')
+Object.entries(config.dev.env).forEach(item => {
+  if (!process.env[item[0]]) {
+    process.env[item[0]] = JSON.parse(item[1])
+  }
+})
+var opn = require('opn')
+var path = require('path')
+var express = require('express')
+var webpack = require('webpack')
+var proxyMiddleware = require('http-proxy-middleware')
+var webpackConfig = require('./webpack.dev.conf')
+
+// default port where dev server listens for incoming traffic
+var port = process.env.PORT
+  // automatically open browser, if not set will be false
+var autoOpenBrowser = !!config.dev.autoOpenBrowser
+  // Define HTTP proxies to your custom API backend
+  // https://github.com/chimurai/http-proxy-middleware
+var proxyTable = config.dev.proxyTable
+
+var app = express()
+var compiler = webpack(webpackConfig)
+
+var devMiddleware = require('webpack-dev-middleware')(compiler, {
+  publicPath: webpackConfig.output.publicPath,
+  quiet: true
+})
+
+var hotMiddleware = require('webpack-hot-middleware')(compiler, {
+    log: () => {}
+  })
+  // force page reload when html-webpack-plugin template changes
+compiler.plugin('compilation', function(compilation) {
+  compilation.plugin('html-webpack-plugin-after-emit', function(data, cb) {
+    hotMiddleware.publish({ action: 'reload' })
+    cb()
+  })
+})
+
+// proxy api requests
+Object.keys(proxyTable).forEach(function(context) {
+  var options = proxyTable[context]
+  if (typeof options === 'string') {
+    options = { target: options }
+  }
+  app.use(proxyMiddleware(options.filter || context, options))
+})
+
+// handle fallback for HTML5 history API
+app.use(require('connect-history-api-fallback')())
+
+// serve webpack bundle output
+app.use(devMiddleware)
+
+// enable hot-reload and state-preserving
+// compilation error display
+app.use(hotMiddleware)
+
+// serve pure static assets
+var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
+app.use(staticPath, express.static('./static'))
+
+var uri = `http://${process.env.HOST}:${port}`
+
+
+var _resolve
+var readyPromise = new Promise(resolve => {
+  _resolve = resolve
+})
+
+console.log('> Starting dev server...')
+devMiddleware.waitUntilValid(() => {
+  console.log(`> Listening at ${uri}\n`)
+    // when env is testing, don't need open it
+  if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
+    opn(uri)
+  }
+  _resolve()
+})
+
+var server = app.listen(port)
+
+module.exports = {
+  ready: readyPromise,
+  close: () => {
+    server.close()
+  }
+}

+ 71 - 0
build/utils.js

@@ -0,0 +1,71 @@
+var path = require('path')
+var config = require('../config')
+var ExtractTextPlugin = require('extract-text-webpack-plugin')
+
+exports.assetsPath = function (_path) {
+  var assetsSubDirectory = process.env.NODE_ENV === 'production'
+    ? config.build.assetsSubDirectory
+    : config.dev.assetsSubDirectory
+  return path.posix.join(assetsSubDirectory, _path)
+}
+
+exports.cssLoaders = function (options) {
+  options = options || {}
+
+  var cssLoader = {
+    loader: 'css-loader',
+    options: {
+      minimize: process.env.NODE_ENV === 'production',
+      sourceMap: options.sourceMap
+    }
+  }
+
+  // generate loader string to be used with extract text plugin
+  function generateLoaders (loader, loaderOptions) {
+    var loaders = [cssLoader]
+    if (loader) {
+      loaders.push({
+        loader: loader + '-loader',
+        options: Object.assign({}, loaderOptions, {
+          sourceMap: options.sourceMap
+        })
+      })
+    }
+
+    // Extract CSS when that option is specified
+    // (which is the case during production build)
+    if (options.extract) {
+      return ExtractTextPlugin.extract({
+        use: loaders,
+        fallback: 'vue-style-loader'
+      })
+    } else {
+      return ['vue-style-loader'].concat(loaders)
+    }
+  }
+
+  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
+  return {
+    css: generateLoaders(),
+    postcss: generateLoaders(),
+    less: generateLoaders('less'),
+    sass: generateLoaders('sass', { indentedSyntax: true }),
+    scss: generateLoaders('sass'),
+    stylus: generateLoaders('stylus'),
+    styl: generateLoaders('stylus')
+  }
+}
+
+// Generate loaders for standalone style files (outside of .vue)
+exports.styleLoaders = function (options) {
+  var output = []
+  var loaders = exports.cssLoaders(options)
+  for (var extension in loaders) {
+    var loader = loaders[extension]
+    output.push({
+      test: new RegExp('\\.' + extension + '$'),
+      use: loader
+    })
+  }
+  return output
+}

+ 12 - 0
build/vue-loader.conf.js

@@ -0,0 +1,12 @@
+var utils = require('./utils')
+var config = require('../config')
+var isProduction = process.env.NODE_ENV === 'production'
+
+module.exports = {
+  loaders: utils.cssLoaders({
+    sourceMap: isProduction
+      ? config.build.productionSourceMap
+      : config.dev.cssSourceMap,
+    extract: isProduction
+  })
+}

+ 71 - 0
build/webpack.base.conf.js

@@ -0,0 +1,71 @@
+var path = require('path')
+var utils = require('./utils')
+var config = require('../config')
+var vueLoaderConfig = require('./vue-loader.conf')
+const webpack = require('webpack')
+
+function resolve(dir) {
+    return path.join(__dirname, '..', dir)
+}
+
+const src = path.resolve(__dirname, '../src')
+
+module.exports = {
+    entry: {
+        app: './src/main.js'
+    },
+    output: {
+        path: config.build.assetsRoot,
+        filename: '[name].js',
+        publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath
+    },
+    resolve: {
+        extensions: ['.js', '.vue', '.json'],
+        alias: {
+            'vue$': 'vue/dist/vue.esm.js',
+            '@': resolve('src'),
+            'src': path.resolve(__dirname, '../src'),
+            'assets': path.resolve(__dirname, '../src/assets'),
+            'components': path.resolve(__dirname, '../src/components'),
+            'views': path.resolve(__dirname, '../src/views'),
+            'styles': path.resolve(__dirname, '../src/styles'),
+            'api': path.resolve(__dirname, '../src/api'),
+            'utils': path.resolve(__dirname, '../src/utils'),
+            'store': path.resolve(__dirname, '../src/store'),
+            'router': path.resolve(__dirname, '../src/router'),
+            // 'static': path.resolve(__dirname, '../static')
+            'jquery': 'jquery'
+        }
+    },
+    plugins: [
+        new webpack.ProvidePlugin({
+            $: 'jquery',
+            jQuery: 'jquery'
+        })
+    ],
+    module: {
+        rules: [{
+            test: /\.vue$/,
+            loader: 'vue-loader',
+            options: vueLoaderConfig
+        }, {
+            test: /\.js$/,
+            loader: 'babel-loader',
+            include: [resolve('src'), resolve('test')]
+        }, {
+            test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
+            loader: 'url-loader',
+            options: {
+                limit: 10000,
+                name: utils.assetsPath('img/[name].[hash:7].[ext]')
+            }
+        }, {
+            test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
+            loader: 'url-loader',
+            options: {
+                limit: 10000,
+                name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
+            }
+        }]
+    }
+}

+ 42 - 0
build/webpack.dev.conf.js

@@ -0,0 +1,42 @@
+var utils = require('./utils')
+var path = require('path')
+var webpack = require('webpack')
+var config = require('../config')
+var merge = require('webpack-merge')
+var baseWebpackConfig = require('./webpack.base.conf')
+var HtmlWebpackPlugin = require('html-webpack-plugin')
+var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
+
+// add hot-reload related code to entry chunks
+Object.keys(baseWebpackConfig.entry).forEach(function(name) {
+  baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
+})
+
+function resolveApp(relativePath) {
+  return path.resolve(relativePath);
+}
+
+module.exports = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
+  },
+  // cheap-module-eval-source-map is faster for development
+  devtool: '#cheap-module-eval-source-map',
+  plugins: [
+    new webpack.DefinePlugin({
+      'process.env': config.dev.env
+    }),
+    // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
+    new webpack.HotModuleReplacementPlugin(),
+    new webpack.NoEmitOnErrorsPlugin(),
+    // https://github.com/ampedandwired/html-webpack-plugin
+    new HtmlWebpackPlugin({
+      filename: 'index.html',
+      template: 'index.html',
+      favicon: resolveApp('favicon.ico'),
+      inject: true,
+      path: config.dev.staticPath
+    }),
+    new FriendlyErrorsPlugin()
+  ]
+})

+ 128 - 0
build/webpack.prod.conf.js

@@ -0,0 +1,128 @@
+var path = require('path')
+var utils = require('./utils')
+var webpack = require('webpack')
+var config = require('../config')
+var merge = require('webpack-merge')
+var baseWebpackConfig = require('./webpack.base.conf')
+var CopyWebpackPlugin = require('copy-webpack-plugin')
+var HtmlWebpackPlugin = require('html-webpack-plugin')
+var ExtractTextPlugin = require('extract-text-webpack-plugin')
+var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
+
+var env = config.build.env
+
+function resolveApp(relativePath) {
+    return path.resolve(relativePath);
+}
+
+var webpackConfig = merge(baseWebpackConfig, {
+    module: {
+        rules: utils.styleLoaders({
+            sourceMap: config.build.productionSourceMap,
+            extract: true
+        })
+    },
+    devtool: config.build.productionSourceMap ? '#source-map' : false,
+    output: {
+        path: config.build.assetsRoot,
+        filename: utils.assetsPath('js/[name].[chunkhash].js'),
+        chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
+    },
+    plugins: [
+        // http://vuejs.github.io/vue-loader/en/workflow/production.html
+        new webpack.DefinePlugin({
+            'process.env': env
+        }),
+        new webpack.optimize.UglifyJsPlugin({
+            compress: {
+                warnings: false
+            },
+            sourceMap: true
+        }),
+        // extract css into its own file
+        new ExtractTextPlugin({
+            filename: utils.assetsPath('css/[name].[contenthash].css')
+        }),
+        // Compress extracted CSS. We are using this plugin so that possible
+        // duplicated CSS from different components can be deduped.
+        new OptimizeCSSPlugin({
+            cssProcessorOptions: {
+                safe: true
+            }
+        }),
+        // generate dist index.html with correct asset hash for caching.
+        // you can customize output by editing /index.html
+        // see https://github.com/ampedandwired/html-webpack-plugin
+        new HtmlWebpackPlugin({
+            filename: config.build.index,
+            template: 'index.html',
+            inject: true,
+            favicon: resolveApp('favicon.ico'),
+            minify: {
+                removeComments: true,
+                collapseWhitespace: true,
+                removeRedundantAttributes: true,
+                useShortDoctype: true,
+                removeEmptyAttributes: true,
+                removeStyleLinkTypeAttributes: true,
+                keepClosingSlash: true,
+                minifyJS: true,
+                minifyCSS: true,
+                minifyURLs: true
+            },
+            // necessary to consistently work with multiple chunks via CommonsChunkPlugin
+            chunksSortMode: 'dependency'
+        }),
+        // split vendor js into its own file
+        new webpack.optimize.CommonsChunkPlugin({
+            name: 'vendor',
+            minChunks: function(module, count) {
+                // any required modules inside node_modules are extracted to vendor
+                return (
+                    module.resource &&
+                    /\.js$/.test(module.resource) &&
+                    module.resource.indexOf(
+                        path.join(__dirname, '../node_modules')
+                    ) === 0
+                )
+            }
+        }),
+        // extract webpack runtime and module manifest to its own file in order to
+        // prevent vendor hash from being updated whenever app bundle is updated
+        new webpack.optimize.CommonsChunkPlugin({
+            name: 'manifest',
+            chunks: ['vendor']
+        }),
+        // copy custom static assets
+        new CopyWebpackPlugin([{
+            from: path.resolve(__dirname, '../static'),
+            to: config.build.assetsSubDirectory,
+            ignore: ['.*']
+        }])
+    ]
+})
+
+if (config.build.productionGzip) {
+    var CompressionWebpackPlugin = require('compression-webpack-plugin')
+
+    webpackConfig.plugins.push(
+        new CompressionWebpackPlugin({
+            asset: '[path].gz[query]',
+            algorithm: 'gzip',
+            test: new RegExp(
+                '\\.(' +
+                config.build.productionGzipExtensions.join('|') +
+                ')$'
+            ),
+            threshold: 10240,
+            minRatio: 0.8
+        })
+    )
+}
+
+if (config.build.bundleAnalyzerReport) {
+    var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
+    webpackConfig.plugins.push(new BundleAnalyzerPlugin())
+}
+
+module.exports = webpackConfig

+ 6 - 0
config/dev.env.js

@@ -0,0 +1,6 @@
+const merge = require('webpack-merge')
+const prodEnv = require('./prod.env')
+module.exports = merge(prodEnv, {
+    NODE_ENV: '"development"',
+    BASE_URL: '"http://wetest.sagacloud.cn"',
+})

+ 65 - 0
config/index.js

@@ -0,0 +1,65 @@
+// see http://vuejs-templates.github.io/webpack for documentation.
+var path = require('path')
+var buildEnv = require('./prod.env')
+var devEnv = require('./dev.env')
+    //所有代理配置
+const proxyTable = {
+    '/physics': {
+        target: 'http://192.168.20.225:8080', //物理世界
+        changeOrigin: true,
+        pathRewrite: {
+            '^/physics': ''
+        }
+    },
+    '/echarts': {
+        target: 'http://101.201.234.108:28888', //echarts数据
+        changeOrigin: true,
+        pathRewrite: {
+            '^/echarts': ''
+        }
+    },
+    '/img': {
+        target: 'http://192.168.20.225:8080',
+        changeOrigin: true,
+        pathRewrite: {
+            '^/img': ''
+        }
+    }
+}
+
+module.exports = {
+    build: {
+        env: buildEnv,
+        index: path.resolve(__dirname, '../dist/index.html'),
+        assetsRoot: path.resolve(__dirname, '../dist'),
+        assetsSubDirectory: '',
+        assetsPublicPath: '/',
+        staticPath: './', //生产环境 staticPath:''
+        productionSourceMap: true,
+        // Gzip off by default as many popular static hosts such as
+        // Surge or Netlify already gzip all static assets for you.
+        // Before setting to `true`, make sure to:
+        // npm install --save-dev compression-webpack-plugin
+        productionGzip: false,
+        productionGzipExtensions: ['js', 'css'],
+        // Run the build command with an extra argument to
+        // View the bundle analyzer report after build finishes:
+        // `npm run build --report`
+        // Set to `true` or `false` to always turn it on or off
+        bundleAnalyzerReport: process.env.npm_config_report
+    },
+    dev: {
+        env: devEnv,
+        autoOpenBrowser: true,
+        assetsSubDirectory: '',
+        assetsPublicPath: '/',
+        staticPath: '/',
+        proxyTable: proxyTable,
+        // CSS Sourcemaps off by default because relative paths are "buggy"
+        // with this option, according to the CSS-Loader README
+        // (https://github.com/webpack/css-loader#sourcemaps)
+        // In our experience, they generally work as expected,
+        // just be aware of this issue when enabling this option.
+        cssSourceMap: false
+    }
+}

+ 8 - 0
config/prod.env.js

@@ -0,0 +1,8 @@
+module.exports = {
+    NODE_ENV: '"production"',
+    BASE_URL: '"http://172.16.0.189"',
+    PORT: '"8085"',
+    HOST: '"localhost"',
+    APPID: '"wxf567f6ab2b0ea642"',
+    SECRET: '"f9b02343e805703c59b162e29695a97d"'
+}

+ 11 - 0
src/App.vue

@@ -0,0 +1,11 @@
+<template>
+  <div id="app">
+    <router-view></router-view>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'app'
+}
+</script>

+ 6 - 0
src/api/config.js

@@ -0,0 +1,6 @@
+export const api = 'api';
+export const sass = 'sass';
+export const img = 'img';
+export const physics = 'physics';
+export const label = 'label';
+export const echarts = 'echarts';

+ 200 - 0
src/api/global.js

@@ -0,0 +1,200 @@
+import wx from 'weixin-js-sdk'
+import uuid from 'uuid'
+import crypto from 'crypto'
+import fetch from 'utils/sagaCloudFetch'
+import { getSpaceInfo } from './repair'
+import store from '../store'
+
+//通过config接口注入权限验证配置
+export function weChatConfig(fullPath) {
+  const timestamp = Number.parseInt((+new Date()) / 1000)
+    //	const timestamp = +new Date()
+  const nonceStr = uuid.v1()
+  let createSignature = (timestamp, nonceStr) => {
+    const jsapi_ticket = store.getters.jsapi_ticket
+    const str = `${process.env.BASE_URL}${fullPath}`
+    const url = str.split('#')[0]
+      //		const url = window.location.href.split('#')[0]
+    let string1 = `jsapi_ticket=${jsapi_ticket}&noncestr=${nonceStr}&timestamp=${timestamp}&url=${url}`
+      //对 string1 作 sha1 加密
+    let md5sum = crypto.createHash('sha1')
+    md5sum.update(string1, 'utf8')
+    const signature = md5sum.digest('hex')
+    return signature
+  }
+  wx.config({
+    debug: false, //调试模式
+    appId: process.env.APPID, // 必填,公众号的唯一标识
+    timestamp: timestamp, // 必填,生成签名的时间戳
+    nonceStr: nonceStr, // 必填,生成签名的随机串
+    signature: createSignature(timestamp, nonceStr), // 必填,签名
+    jsApiList: ['onMenuShareTimeline', 'chooseImage', 'previewImage', 'getLocalImgData', 'getLocation', 'scanQRCode', 'closeWindow'] // 必填,需要使用的JS接口列表
+      //chooseImage:拍照或从手机相册中选图接口
+      //previewImage:预览图片接口
+      //getLocalImgData:获取本地图片接口
+      //getLocation:获取地理位置接口
+      //scanQRCode:调起微信扫一扫接口
+      //closeWindow:关闭当前网页窗口接口
+  })
+  wx.ready(() => {
+    console.log(`wx is ready`)
+  })
+  wx.error(res => {
+    console.log(`wx.error: ${res.errMsg}`)
+  })
+}
+
+//权限验证结束执行
+export function weChatReady() {
+  return new Promise((resolve, reject) => {
+    wx.ready(() => {
+
+      console.log(`wx is ready`)
+      resolve()
+    })
+  })
+}
+
+//通过code换取网页授权access_token和openId
+export function getOpenId(code) {
+  return fetch({
+    method: 'GET',
+    url: `/sns/oauth2/access_token?appid=${process.env.APPID}&secret=${process.env.SECRET}&code=${code}&grant_type=authorization_code`
+  })
+}
+
+//获取用户信息
+export function getVerifyMes(data) {
+  const openId = data.openId
+  const access_token = data.access_token
+  return fetch({
+    method: 'GET',
+    url: `/cgi-bin/user/info?access_token=${access_token}&openid=${openId}&lang=zh_CN`
+  })
+}
+
+//拍照或从手机相册中选图接口
+export function chooseImage(count) {
+  return new Promise((resolve, reject) => {
+    wx.chooseImage({
+      count: count, // 默认9
+      sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
+      sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
+      success: res => {
+        //localIds的格式:["wxlocalResource://465437865486547686"] (苹果)
+        //						:["weixin://resourceid/2c1e43254343"]{安卓}
+        let localIds = res.localIds // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
+        resolve(localIds)
+      },
+      fail: err => {
+        reject(err)
+      }
+    })
+  })
+}
+
+//预览图片接口
+export function previewImage(curr, urls) {
+  wx.previewImage({
+    current: curr, // 当前显示图片的http链接
+    urls: urls // 需要预览的图片http链接列表
+  })
+}
+
+//获取本地图片接口
+export function getLocalImgData(localId) {
+  return new Promise((resolve, reject) => {
+    wx.getLocalImgData({
+      localId: localId,
+      success: res => {
+        let localData = res.localData
+        resolve(localData)
+      },
+      fail: err => {
+        reject(err)
+      }
+    })
+  })
+}
+
+//获取地理位置接口
+export function getLocation() {
+  return new Promise((resolve, reject) => {
+    wx.getLocation({
+      type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
+      success: res => {
+        // var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
+        // var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
+        // var speed = res.speed; // 速度,以米/每秒计
+        // var accuracy = res.accuracy; // 位置精度
+        resolve(res)
+      },
+      fail: err => {
+        reject(err)
+      }
+    })
+  })
+}
+//调起微信扫一扫接口
+export function scanQRCode() {
+  return new Promise((resolve, reject) => {
+    wx.scanQRCode({
+      needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果
+      scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
+      success: function(res) {
+        var result = res.resultStr // 当needResult 为 1 时,扫码返回的结果
+        if (result.length > 23) {
+          const paramStr = result.substring(23)
+          getSpaceInfo(paramStr).then(qrRes => {
+            resolve(qrRes.data.Content)
+          }).catch(err => {
+            reject(err)
+          })
+        } else {
+          reject('该二维码无效!')
+        }
+      },
+      fail: err => {
+        reject(err)
+      }
+    })
+  })
+}
+
+//关闭当前网页窗口接口
+export function closeWindow(time = 1000) {
+  setTimeout(() => {
+    wx.closeWindow()
+  }, time)
+}
+
+//分享朋友圈接口
+export function onMenuShareTimeline({
+  title,
+  link
+}) {
+  return new Promise((resolve, reject) => {
+    wx.ready(() => {
+      wx.onMenuShareTimeline({
+        title: title, // 分享标题
+        link: link, //
+        imgUrl: 'http://osjykr1v3.bkt.clouddn.com/FsarJolRzNMNKpv8TcyOOLa9WovE', // 分享图标
+        success: function(res) {
+          console.log(JSON.stringify(res))
+          resolve(res)
+        },
+        cancel: function(res) {
+          console.log(JSON.stringify(res))
+          resolve(res)
+            // 用户取消分享后执行的回调函数
+        },
+        fail: function(res) {
+          console.log(res)
+        },
+        trigger: function(res) {
+          console.log(JSON.stringify(res))
+        }
+      })
+    })
+  })
+}

+ 85 - 0
src/api/question.js

@@ -0,0 +1,85 @@
+/*
+  问卷调查的接口
+*/
+import fetch from 'utils/sagaCloudFetch'
+import tools from 'utils/tools'
+import { proxy } from 'api/config'
+//模拟请求
+export function mock() {
+  return new Promise((resolve, reject) => {
+    setTimeout(() => {
+      resolve(true)
+    }, 1000);
+  })
+}
+//添加调查问卷个人信息
+export function addQuestionnaireUser({ userName, sex, age, address, post }) {
+  let openId = tools.getCookie('openId')
+  let data = {
+    openId,
+    userName,
+    sex,
+    age,
+    address,
+    post
+  }
+  return fetch({
+    method: 'POST',
+    url: `${proxy}/addQuestionnaireUser`,
+    data
+  })
+}
+
+//获取第一部分调查问卷内容 
+export function getQuestionnaireList() {
+  let openId = tools.getCookie('openId')
+  let data = {}
+  return fetch({
+    method: 'POST',
+    url: `${proxy}/getQuestionnaireList?openId=${openId}`,
+    data
+  })
+}
+//添加第一部分调查记录
+export function addQuestionnaireList(data) {
+  let openId = tools.getCookie('openId')
+  return fetch({
+    method: 'POST',
+    url: `${proxy}/addQuestionnaireList?openId=${openId}`,
+    data
+  })
+}
+//--------------------------------------------------GET start
+//获取调查问卷状态 1-进入userInfo ,2-进入part1,3-进入part2,,4-进入result
+export function getQuestionnaireStatus(openId) {
+  return fetch({
+    method: 'GET',
+    url: `${proxy}/getQuestionnaireStatus?openId=${openId}`,
+  })
+}
+//第一部分调查结果report1
+export function getQuestionnaireAnswer() {
+  let sopenId = tools.getCookie('openId')
+  return fetch({
+    method: 'GET',
+    url: `${proxy}/getQuestionnaireAnswer?openId=${sopenId}`,
+  })
+}
+//第二部分查询记录
+export function getSecQuestionnaireAnswer() {
+  let openId = tools.getCookie('openId')
+  return fetch({
+    method: 'GET',
+    url: `${proxy}/getSecQuestionnaireAnswer?openId=${openId}`,
+  })
+}
+//--------------------------------------------------GET end
+//第二部分添加记录
+export function addSecQuestionnaireAnswer(data) {
+  let openId = tools.getCookie('openId')
+  return fetch({
+    method: 'POST',
+    url: `${proxy}/addSecQuestionnaireAnswer?openId=${openId}`,
+    data
+  })
+}

+ 126 - 0
src/api/repair.js

@@ -0,0 +1,126 @@
+import fetch from 'utils/sagaCloudFetch'
+import tools from 'utils/tools'
+import { api, sass, img, physics, echarts } from 'api/config'
+
+
+//获取label标签内容
+export function getEquipmentLabel(
+    code,
+    projectId
+) {
+    return fetch({ method: 'GET', url: `${physics}/data-platform-3/infocode/query_property?projectId=${projectId}&type=${code}&enrich=true` })
+        // return fetch({ method: 'GET', url: `${physics}/data-platform-3/infocode/query_property?type=${code}` })
+}
+//获取资产value内容
+export function getEquipmentValue(
+    FmId,
+    projectId,
+    secret
+) {
+    let data = {
+            "criterias": [
+                { "id": FmId }
+            ]
+        }
+        // return fetch({ method: 'POST', url: `${echarts}/data-platform-3/object/batch_query?projectId=${projectId}&secret=${secret}`, data })
+    return fetch({ method: 'POST', url: `${physics}/data-platform-3/property/id_query?projectId=${projectId}&secret=${secret}`, data })
+}
+
+//获取系统或岗位的value内容
+export function getwinValue(
+    id,
+    projectId,
+    secret
+) {
+    let data = {
+        "criterias": [
+            { "id": id }
+        ]
+    }
+    console.log(data)
+    return fetch({ method: 'POST', url: `${physics}/data-platform-3/object/batch_query?projectId=${projectId}&secret=${secret}`, data })
+}
+
+//通过分精度获取折线图
+export function getEcharts(
+    id,
+    code,
+    period,
+    FmId,
+    startTime,
+    endTime,
+    secret
+) {
+    let data = {
+        'criteria': {
+            'id': FmId, //perjectId
+            'code': code, //搜索的字符
+            'period': period, //搜索精度
+            'receivetime': {
+                '$gte': startTime, //搜索开始时间
+                '$lt': endTime //搜索结束时间
+            }
+        }
+    }
+
+    return fetch({ method: 'POST', url: `${echarts}/data-platform-3/hisdata/query_period_data?projectId=${id}&secret=${secret}`, data })
+}
+
+//获取动态参数,暂停使用
+export function getparameter(
+    arr,
+    perjectId,
+    secret
+) {
+    let data = {
+        "criterias": arr
+    }
+    return fetch({ method: 'POST', url: `${echarts}/data-platform-3/parameter/batch_query_param?projectId=${perjectId}&secret=${secret}`, data })
+}
+
+//获取表达式情况下的表号功能号
+
+export function getMarkNumber(
+    arr,
+    perjectId,
+    secret
+) {
+    let data = {
+        "criterias": arr
+    }
+    return fetch({ method: 'POST', url: `${echarts}/data-platform-3/object/query_part_info?projectId=${perjectId}&secret=${secret}`, data })
+}
+
+export function getNoPeriod(
+    id,
+    code,
+    FmId,
+    startTime,
+    endTime,
+    secret
+) {
+    let data = {
+        'criteria': {
+            'id': FmId, //perjectId
+            'code': code, //搜索的字符
+            'receivetime': {
+                '$gte': startTime, //搜索开始时间
+                '$lt': endTime //搜索结束时间
+            }
+        }
+    }
+
+    return fetch({ method: 'POST', url: `${echarts}/data-platform-3/hisdata/query_by_obj?projectId=${id}&secret=${secret}`, data })
+}
+
+//修改接口
+export function updateMess(param) {
+    let data = {
+        criterias: [{
+            id: param.id,
+            infos: param.data
+        }]
+    }
+    console.log(JSON.stringify(data))
+    return fetch({ method: 'POST', url: `${physics}/data-platform-3/object/batch_update?projectId=${param.perjectId}&secret=${param.secret}`, data })
+}

BIN
src/assets/arrow_R.png


+ 342 - 0
src/components/formInput.vue

@@ -0,0 +1,342 @@
+<!--
+A1	手工填写-单个-数字-无单位
+A2	手工填写-单个-数字-有单位
+A3	手工填写-多个-数字-无单位
+A4	手工填写-多个-数字-有单位
+A5	手工填写-单个-数字范围-无单位
+A6	手工填写-单个-数字范围-有单位
+A7	手工填写-多个-数字范围-无单位
+A8	手工填写-多个-数字范围-有单位
+B1	手工填写-单个-文本
+B2	手工填写-多个-文本
+C1	手工填写-单个-日期时间值
+C2	手工填写-单个-日期时间段
+C3	手工填写-多个-日期时间值
+C4	手工填写-多个-日期时间段
+C5	手工填写-单个-日期值
+C6	手工填写-单个-日期段
+C7	手工填写-多个-日期值
+C8	手工填写-多个-日期段
+C9	手工填写-单个-时间值
+C10	手工填写-单个-时间段
+C11	手工填写-多个-时间值
+C12	手工填写-多个-时间段
+D1	字典选择-单个-单选
+D2	字典选择-单个-多选
+D3	字典选择-多个-单选
+D4	字典选择-多个-多选
+E1	字典布尔选择-单个
+E2	字典布尔选择-多个
+F1	上传-单个文件 -->
+
+<template>
+    <el-form :label-position="'right'" :labelWidth="width + 'px'" :model="formLabelAlign" ref="form" @submit.native.prevent>
+        <el-form-item :label="label" :rules="isRule ? { required: true, message: '不能为空'} : {}">
+          <!-- 普通输入类型 -->
+            <el-input v-if="!isShow && (type == 'default' || type == 'B1')" v-model="formLabelAlign.name" style="width: 9rem;" @change="onSubmit" @keyup.enter.native="onSubmit">
+                <template slot="append" v-if="unit">{{unit}}</template>
+            </el-input>
+            <el-input type="number" v-if="!isShow && (type == 'A1' || type == 'A2')" v-model="formLabelAlign.name" style="width: 9rem;" @change="onSubmit" @keyup.enter.native="onSubmit">
+                <template slot="append" v-if="unit">{{unit}}</template>
+            </el-input>
+            <!-- date类型 -->
+            <el-date-picker
+              v-if="!isShow && (type == 'year' || type == 'C5')"
+              v-model="formLabelAlign.name"
+              type="date"
+              value-format="yyyy-MM-dd"
+              @change="onSubmit"
+              :clearable="false"
+              placeholder="选择日期">
+            </el-date-picker>
+            <!-- 级联选择 -->
+            <el-cascader
+            v-if="!isShow && (type == 'cascader' || type == 'D1')"
+            :options="typeArr"
+            v-model="formLabelAlign.name"
+            @change="onSubmit"
+            :props="props"
+            ></el-cascader>
+            <!-- 日期到分 -->
+            <el-date-picker
+              v-if="!isShow && type == 'C1'"
+              v-model="formLabelAlign.name"
+              type="datetime"
+              value-format="yyyy-MM-dd HH:MM"
+              @change="onSubmit"
+              :clearable="false"
+              placeholder="选择日期">
+            </el-date-picker>
+            <!-- 输入文本框 -->
+            <el-input
+              v-if="!isShow && type == 'B2'"
+              type="textarea"
+              :rows="2"
+              @change="onSubmit"
+              @keyup.enter.native="onSubmit"
+              placeholder="请输入内容"
+              v-model="formLabelAlign.name">
+            </el-input>
+            <!-- 日期 -->
+            <el-date-picker
+              v-if="!isShow && type == 'C6'"
+              v-model="formLabelAlign.name"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              value-format="yyyy-MM-dd"
+              @change="onSubmit"
+              :clearable="false"
+              placeholder="选择日期">
+            </el-date-picker>
+            <!-- 点击确定 -->
+            <i v-if="!isShow  && (type == 'default' || type == 'B1')" class="el-input__icon el-icon-check hover" @click="onSubmit"></i>
+            <!-- 显示基本内容 -->
+            <span  v-if="isShow" @click="changeItem" class="hover">{{ filterArr(formLabelAlign.name) }} {{unit}}<i class="el-icon-edit" v-if="editShow(type)"></i></span>
+            <slot name="mess"></slot>
+        </el-form-item>
+    </el-form>
+</template>
+
+<script>
+export default {
+  name: "ownerInput",
+  props: {
+    type: {
+      type: String,
+      default: "default"
+    }, //类型
+    value: [String, Array], //value值
+    label: String, //label值,从父级传入
+    isRule: Boolean, //是否需要规则
+    keys: String, //
+    myArr: [Array, String], //当其为级联或者下拉时传入
+    unit: {
+      //单位
+      type: String,
+      default: ""
+    },
+    width: {
+      type: Number,
+      default: 150
+    }
+  },
+
+  data() {
+    return {
+      formLabelAlign: {
+        name: ""
+      },
+      key: "",
+      isShow: true,
+      props: {
+        label: "name",
+        value: "code",
+        children: "content"
+      }, //修改默认数据格式
+      typeArr: []
+    };
+  },
+
+  methods: {
+    //点击确定或者url
+    onSubmit() {
+      if (this.formLabelAlign.name == "" || this.formLabelAlign.name == []) {
+        this.$message.error("请确定值不为空");
+      } else {
+        this.isShow = true;
+        if (this.type == "cascader" || this.type == "D1") {
+          let data = this.formLabelAlign.name;
+          this.$emit("change", data[data.length - 1], this.keys);
+        } else {
+          this.$emit("change", this.formLabelAlign.name, this.keys);
+        }
+      }
+    },
+
+    //点击文案出现输入
+    changeItem() {
+      if (
+        this.type == "X" ||
+        this.type == "L" ||
+        this.type == "N2" ||
+        this.type == "F2" ||
+        this.type == 'M'
+      ) {
+        this.$message("该信息点不支持编辑");
+        return;
+      } else {
+        this.isShow = false;
+      }
+    },
+
+    //对数组中的空数组去除
+    toMyNeed(arr) {
+      return arr.map(res => {
+        let param = {};
+        if (res.content && res.content.length != 0) {
+          param.content = this.toMyNeed(res.content);
+        }
+        param.name = res.name;
+        param.code = res.code;
+        return param;
+      });
+    },
+
+    //获取级联选中的值
+    getCascaderObj(val, opt) {
+      let data = this.getMyVal(val, opt, "name");
+      data.length > 1 ? (data = data.join("/")) : (data = data.join(""));
+      return data;
+    },
+
+    getMyVal(val, content, code) {
+      let data = [];
+      if (content && content.length) {
+        for (let i = 0; i < content.length; i++) {
+          if (content[i].code == val) {
+            data.push(content[i][code]);
+            break;
+          } else {
+            if (content[i].content && content.length) {
+              for (let j = 0; j < content[i].content.length; j++) {
+                if (content[i].content[j].code == val) {
+                  data.push(content[i][code]);
+                  data.push(content[i].content[j][code]);
+                  break;
+                } else {
+                  if (
+                    content[i].content[j].content &&
+                    content[i].content[j].content.length
+                  ) {
+                    for (
+                      let k = 0;
+                      k < content[i].content[j].content.length;
+                      k++
+                    ) {
+                      if (content[i].content[j].content[k].code == val) {
+                        data.push(content[i][code]);
+                        data.push(content[i].content[j][code]);
+                        data.push(content[i].content[j].content[k][code]);
+                        break;
+                      } else {
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+      if (!data.length) {
+        data = null;
+      }
+      return data;
+    },
+
+    getMap(val, opt) {
+      return opt.map(function(value, index, array) {
+        for (var itm of opt) {
+          if (itm.code == value.code) {
+            opt = itm.content;
+            return itm;
+          }
+        }
+        return null;
+      });
+    },
+
+    //数组过滤
+    filterArr(val) {
+      let value = ""; //最后输出的文案
+      let isNeedType = this.type == "cascader" || this.type == "D1";
+      if (this.type == "C6") {
+        if (val instanceof Array) {
+          value = val[0] + "至" + val[1];
+        } else {
+          value = "--";
+        }
+      } else if (this.type == "cascader" || this.type == "D1") {
+        if (val && val.length) {
+          value =
+            this.getCascaderObj(val[val.length - 1], this.typeArr, "name") ||
+            "--";
+        }
+      } else {
+        value = val || "--";
+      }
+      return value;
+    },
+
+    changeArray(arr) {
+      return arr.map(item => {
+        if (!!item.content && item.content.length) {
+          return {
+            code: item.code,
+            name: item.name,
+            content: this.changeArray(item.content)
+          };
+        } else {
+          return {
+            code: item.code,
+            name: item.name,
+            content: null
+          };
+        }
+      });
+    },
+
+    editShow(type) {
+      if (type == "X" || type == "L" || type == "N2" || type == "F2" || type == 'M' ) {
+        return false;
+      } else {
+        return true;
+      }
+    }
+  },
+
+  created() {
+    console.log(this.type)
+    if (this.myArr instanceof Array) {
+      this.typeArr = this.changeArray(this.myArr);
+    }
+    if (typeof this.typeArr == Object) {
+      this.typeArr = this.toMyNeed(this.typeArr);
+    }
+    if (this.type == "cascader" || this.type == "D1") {
+      if (this.value == "" || this.value == undefined) {
+        this.formLabelAlign.name = [];
+      } else {
+        this.formLabelAlign.name = this.getMyVal(
+          this.value,
+          this.typeArr,
+          "code"
+        );
+      }
+    } else {
+      this.formLabelAlign.name = this.value;
+    }
+    this.key = this.label;
+  },
+
+  watch: {
+    label() {}
+  }
+};
+</script>
+
+<style lang="less">
+.hover:hover {
+  cursor: pointer;
+  color: #409eff;
+}
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+  -webkit-appearance: none;
+}
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+</style>

+ 159 - 0
src/components/lineCharts.vue

@@ -0,0 +1,159 @@
+<template>
+<!-- 散点图 -->
+<div :ref="id" class="scatter">
+</div>
+</template>
+
+<script>
+import echarts from 'echarts'
+
+export default {
+  name: 'Scatter',
+  props: ['id', 'renderData', 'unit','title'],
+  data: function() { 
+    return { 
+      myChart: null,
+      clientWidth: document.body.Width,
+    }
+  },
+  watch: {
+    renderData: {
+      deep: true,
+      handler(val) {
+        if (!!val) {
+          this.drawScatter(val);
+        }
+      }
+    },
+  },
+  methods: {
+    drawScatter(renderData) {
+      let unit = this.unit
+    //   如果renderData为空,终止函数
+      if(!renderData){
+        return
+      }
+      //将时间转换成YYYY-MM-DD HH-MM-SS格式
+       function changeTime(time) {
+            var date_str = time.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/g,'$1-$2-$3 $4:$5:$6');
+            return date_str
+        }
+
+    //   横轴数据
+      var dataTime = renderData.map((item, index) => {
+        return changeTime(item.data_time)
+      }).reverse();
+    // y轴数据
+      var dataValue = renderData.map((item,index) => {
+          return item.data_value
+      }).reverse();
+      this.myChart.hideLoading();
+      let option = {
+           grid: { //位置
+                left: '3%',  
+                right: '4%',  
+                bottom: '3%',  
+                containLabel: true  
+            },  
+            tooltip: {//浮层
+                trigger: 'axis',
+                formatter: function (params) {
+                    return params[0].name + '<br/>' + params[0].value.toFixed(2) + unit
+                },
+                axisPointer: {
+                    animation: false
+                }
+            },
+            xAxis: {//x轴样式
+                type: 'category',
+                axisLabel:{
+                    show: true
+                },
+                data: dataTime,
+                axisTick: {  
+                    alignWithLabel: true  
+                }  
+            },
+            title: [{
+              left: 'left',
+              text: this.title,
+              subtext: '单位:' + unit,
+              textStyle:{
+                //文字颜色
+                color:'#000',
+                //字体风格,'normal','italic','oblique'
+                fontStyle:'normal',
+                //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
+                fontWeight:'normal',
+                //字体系列
+                fontFamily:'sans-serif',
+                //字体大小
+             fontSize:16
+              },
+              subtextStyle:{
+                //文字颜色
+                color:'#ccc',
+                //字体风格,'normal','italic','oblique'
+                fontStyle:'normal',
+                //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
+                fontWeight:'normal',
+                //字体系列
+                fontFamily:'sans-serif',
+                //字体大小
+             fontSize:12
+              }
+            }],
+            yAxis: {//y轴样式
+                type: 'value'
+            },
+            series: [{//实际数据
+                // data: dataValue,
+                // type: 'line',
+                // smooth: true,
+                name:'',  
+                type:'line',  
+                barWidth: '20%',  
+                data:dataValue
+            }]
+        };
+
+      this.myChart.setOption(option)
+    }
+  },
+  mounted() {
+    const Dom = this.$refs[this.id]
+    //初始化Dom
+    this.myChart = echarts.init(Dom)
+    this.drawScatter(this.renderData);
+    //当屏幕发生变化时触发重构
+    window.onresize = this.myChart.resize
+    //loading
+    // this.myChart.showLoading('default', {
+    //   text: 'loading...',
+    //   color: '#0090ff', //loading样式
+    //   textColor: '#fff', //loading文字样式
+    //   maskColor: '#161635', //整个loading背景色
+    //   zlevel: 0
+    // });
+  }
+}
+</script>
+<style lang="less">
+.echarts{
+    width: 100%;
+    height: 10rem;
+    &>div{
+      width: 100%;
+      height: 100%;
+    }
+}
+.scatter{
+    width: 100%;
+    height: 100%;
+}
+@media screen and (max-width:960px) {
+  .echarts{
+    height: 6rem;
+  }
+}
+</style>

+ 18 - 0
src/config/rem.js

@@ -0,0 +1,18 @@
+(function(doc, win) {
+  //做rem适配
+  var docEl = doc.documentElement,
+    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
+    recalc = function() {
+      var clientWidth = docEl.clientWidth;
+      if (!clientWidth) return;
+      var fs = clientWidth / 25;
+      docEl.style.fontSize = fs + 'px';
+      return fs
+    };
+  if (!doc.addEventListener) return;
+  win.addEventListener(resizeEvt, recalc, false);
+  doc.addEventListener('DOMContentLoaded', recalc, false);
+  module.exports = recalc();
+})(document, window);
+//不允许缩放
+//<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />

+ 27 - 0
src/main.js

@@ -0,0 +1,27 @@
+// 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 MintUI from 'mint-ui'
+import App from './App'
+import router from './router'
+import 'babel-polyfill'
+// import store from './store'
+import tools from 'utils/tools'
+import './../static/html5media.min.js'
+import axios from 'axios'
+import vueAxios from 'vue-axios'
+import './styles/cssreset.css' //cssreset
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css'
+Vue.use(ElementUI)
+
+Vue.use(vueAxios, axios)
+
+
+
+/* eslint-disable no-new */
+new Vue({
+    router,
+    // store,
+    render: h => h(App)
+}).$mount('#app')

+ 26 - 0
src/plugins/element.used.js

@@ -0,0 +1,26 @@
+import Vue from 'vue'
+import 'element-ui/lib/theme-chalk/index.css'
+import {
+  Button,
+  Select,
+  Option,
+  Form,
+  FormItem,
+  Input,
+  Radio,
+  RadioGroup,
+  Checkbox,
+  CheckboxGroup,
+} from 'element-ui'
+
+
+Vue.use(Button)
+Vue.use(Select)
+Vue.use(Option)
+Vue.use(Form)
+Vue.use(FormItem)
+Vue.use(Input)
+Vue.use(Radio)
+Vue.use(RadioGroup)
+Vue.use(Checkbox)
+Vue.use(CheckboxGroup)

+ 25 - 0
src/router/hook.js

@@ -0,0 +1,25 @@
+import {
+	getQuestionnaireStatus
+} from 'api/question'
+import tools from 'utils/tools'
+export function questionsurvey(to, from, next) {
+	let openId = tools.getCookie('openId')
+	if(!!openId) {
+		getQuestionnaireStatus(openId).then(res => {
+			let status = res.data.status
+			console.log('当前问卷调查进度:' + status)
+			if(!status || status == undefined || status == 1) {
+				next('/questionsurvey/introduce')
+			} else if(status == 2) {
+				next('/questionsurvey/firstpart')
+			} else if(status == 3) {
+				next('/questionsurvey/secondpart')
+			} else if(status == 4) {
+				next('/questionsurvey/questionresult')
+			}
+		})
+	}else{
+		console.log('openId不存在')
+		next()
+	}
+}

+ 39 - 0
src/router/index.js

@@ -0,0 +1,39 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+// import * as _ from './hook'
+/* mbiH5 */
+const mbiH5 = () =>
+    import ('views/mbiH5')
+const echarts = () =>
+    import ('views/echarts')
+const secondCharts = () =>
+    import ('views/secondCharts')
+const changeMess = () =>
+    import ("views/changeMess")
+Vue.use(Router)
+
+export const constantRouterMap = [{
+    path: '/details',
+    name: 'mbiH5',
+    component: mbiH5
+}, {
+    path: '/table',
+    name: echarts,
+    component: echarts
+}, {
+    path: '/secondCharts',
+    name: secondCharts,
+    component: secondCharts
+}, {
+    path: '/changeMess',
+    name: changeMess,
+    component: changeMess
+}]
+
+export default new Router({
+    // mode: 'history', //后端支持可开
+    scrollBehavior: () => ({
+        y: 0
+    }),
+    routes: constantRouterMap
+})

+ 27 - 0
src/store/getters.js

@@ -0,0 +1,27 @@
+import tools from 'utils/tools'
+const getters = {
+    openId: state => state.common.openId,
+    access_token: state => state.common.access_token,
+    jsapi_ticket: state => state.common.jsapi_ticket,
+    upload_token: state => state.common.upload_token,
+    buildingArr: state => state.repair.buildingArr,
+    buildingMes: state => {
+        let buildingMes = state.repair.buildingMes
+        if (!buildingMes) {
+            buildingMes = tools.getStorage('buildingMes')
+        }
+        return buildingMes
+    },
+    spaceArr: state => state.repair.spaceArr,
+    spaceMes: state => state.repair.spaceMes,
+    jobId: state => {
+        let jobId = state.repair.jobId
+        if (!jobId) {
+            jobId = tools.getStorage('jobId')
+
+        }
+        return jobId
+    },
+}
+
+export default getters

+ 16 - 0
src/store/index.js

@@ -0,0 +1,16 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+import common from './modules/common'
+import repair from './modules/repair'
+import getters from './getters'
+Vue.use(Vuex)
+
+const store = new Vuex.Store({
+    modules: {
+        common,
+        repair
+    },
+    getters
+});
+
+export default store

+ 57 - 0
src/store/modules/common.js

@@ -0,0 +1,57 @@
+import tools from 'utils/tools'
+import {
+  weChatConfig
+} from 'api/global'
+import { getAccessToken, getJsapiTicket, getUploadToken } from 'api/other'
+
+const common = {
+  state: {
+    openId: '',
+    access_token: '',
+    jsapi_ticket: '',
+    upload_token: ''
+  },
+  mutations: {
+    SET_ACCESS_TOKEN: (state, access_token) => {
+      state.access_token = access_token
+      tools.setCookie('access_token', access_token)
+    },
+    SET_JSAPI_TICKET: (state, jsapi_ticket) => {
+      state.jsapi_ticket = jsapi_ticket
+      tools.setCookie('jsapi_ticket', jsapi_ticket)
+    },
+    SET_OPENID: (state, openId) => {
+      state.openId = openId
+      tools.setCookie('openId', openId)
+    },
+    SET_UPLOAD_TOKEN: (state, upload_token) => {
+      state.upload_token = upload_token
+      tools.setCookie('upload_token', upload_token)
+    }
+  },
+  actions: {
+    async SetCommon({ commit }, fullPath) {
+      let { data: uploadToken } = await getUploadToken()
+      if (uploadToken.result === 'success') {
+        commit('SET_UPLOAD_TOKEN', uploadToken.upload_token)
+      }
+      let { data: accessToken } = await getAccessToken()
+      if (accessToken.result === 'success') {
+        commit('SET_ACCESS_TOKEN', accessToken.acesstoken)
+      }
+
+      let { data: jsApiTicket } = await getJsapiTicket()
+      if (jsApiTicket.result === 'success') {
+        //获取ticket
+        commit('SET_JSAPI_TICKET', jsApiTicket.ticket)
+          //利用当前的路径,获取权限
+        weChatConfig(fullPath)
+      }
+    },
+    SetOpenId: ({ commit }, openId) => {
+      commit('SET_OPENID', openId)
+    }
+  }
+}
+
+export default common

+ 145 - 0
src/store/modules/repair.js

@@ -0,0 +1,145 @@
+import tools from 'utils/tools'
+import { getBuildingArr, getRepairPlaceArr } from 'api/repair'
+
+const repair = {
+  state: {
+    buildingArr: [],
+    buildingMes: null,
+    spaceArr: [],
+    spaceMes: null,
+    jobId: 0
+  },
+  mutations: {
+    SAVE_BUILDING_ARR: (state, arr) => {
+      state.buildingArr = arr
+    },
+    SAVE_BUILDING_MES: (state, obj) => {
+      state.buildingMes = obj
+      tools.setStorage('buildingMes', obj)
+    },
+    SAVE_SPACE_ARR: (state, arr) => {
+      state.spaceArr = arr
+    },
+    SAVE_SPACE_MES: (state, obj) => {
+      state.spaceMes = obj
+    },
+    SAVE_JOB_ID: (state, id) => {
+      state.jobId = id
+      tools.setStorage('jobId', id)
+    }
+  },
+  actions: {
+    SaveBuildingArr: ({
+      commit
+    }, arr) => {
+      commit('SAVE_BUILDING_ARR', arr)
+    },
+    SaveBuildingMes: ({
+      commit
+    }, obj) => {
+      commit('SAVE_BUILDING_MES', obj)
+    },
+    GetRepairPlaceArr: ({
+      commit
+    }, id) => {
+      return new Promise((resolve, reject) => {
+        //id是projectId
+        getRepairPlaceArr(id).then(res => {
+          let rstObj = {
+              renderArr: [],
+              repairType: 'place',
+              left: '楼层',
+              right: '地点'
+            }
+            //在dialog页,用repairType作为区分要渲染的东西
+          if (!!res.data && !!res.data.Content && res.data.Content.length > 0 && res.data.result == "success") {
+            let renderArr = res.data.Content.map(item => {
+              return {
+                id: item.id,
+                name: item.name,
+                child: item.space
+              }
+            })
+            rstObj.renderArr = renderArr
+            commit('SAVE_SPACE_ARR', renderArr)
+          }
+          resolve(rstObj)
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    SaveSpaceMes: ({
+      commit
+    }, obj) => {
+      commit('SAVE_SPACE_MES', obj)
+    },
+    SelectBuildingAndRepair: ({
+      commit
+    }, obj) => {
+      console.log('params:' + JSON.stringify(obj))
+      return new Promise((resolve, reject) => {
+        getBuildingArr().then(res => { //获取建筑列表
+          let buildingArr = res.data.Content
+          commit('SAVE_BUILDING_ARR', buildingArr)
+            // state.buildingArr = buildingArr
+          let selectedBuildArr = buildingArr.filter(eachBuild => {
+            //链接中保存的projectId与建筑列表比对
+            return eachBuild.id == obj.projectId
+          })
+          if (selectedBuildArr.length > 0) {
+            let buildingMes = selectedBuildArr[0]
+              // state.buildingMes = buildingMes
+            commit('SAVE_BUILDING_MES', buildingMes)
+            getRepairPlaceArr(buildingMes.id).then(res => {
+              //在dialog页,用repairType作为区分要渲染的东西
+              if (!!res.data && !!res.data.Content && res.data.Content.length > 0 && res.data.result == "success") {
+                let renderArr = res.data.Content.map(item => {
+                  return {
+                    id: item.id,
+                    name: item.name,
+                    child: item.space
+                  }
+                })
+                console.log(buildingMes)
+                  // state.spaceArr = renderArr
+                commit('SAVE_SPACE_ARR', renderArr)
+                renderArr.forEach(eachFloor => {
+                  let spaceArr = eachFloor.child || []
+                  let filterSpaceArr = spaceArr.filter(eachSpace => {
+                    //eachSpace:{id:'spaceId123',name:'5层'}
+                    return eachSpace.id == obj.spaceId
+                  })
+                  if (filterSpaceArr.length > 0) {
+                    let spaceMes = {
+                        leftVal: eachFloor.name,
+                        rightVal: filterSpaceArr[0].name,
+                        wrapId: eachFloor.id,
+                        insetId: filterSpaceArr[0].id
+                      }
+                      // state.spaceMes = spaceMes
+                    commit('SAVE_SPACE_MES', spaceMes)
+                    resolve(spaceMes)
+                  }
+                })
+              }
+            }).catch(err => {
+              console.log(err)
+              reject(err)
+            })
+          }
+        }).catch(err => {
+          console.log(err)
+          reject(err)
+        })
+      })
+    },
+    SaveJobId: ({
+      commit
+    }, id) => {
+      commit('SAVE_JOB_ID', id)
+    }
+  }
+}
+
+export default repair

+ 126 - 0
src/styles/cssreset.css

@@ -0,0 +1,126 @@
+body,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+dl,
+dd,
+ul,
+ol,
+pre,
+form,
+textarea,
+th,
+td,
+select,
+input {
+    margin: 0;
+    padding: 0
+}
+
+em,
+i {
+    font-style: normal
+}
+
+b,
+strong {
+    font-weight: normal
+}
+
+li {
+    list-style: none
+}
+
+img {
+    border: none;
+    vertical-align: top
+}
+
+a {
+    text-decoration: none;
+    color: inherit
+}
+
+input {
+    outline: none
+}
+
+textarea {
+    resize: none;
+    overflow: auto;
+    outline: none
+}
+
+button {
+    border: none
+}
+
+
+/*清浮动*/
+
+.clear {
+    zoom: 1
+}
+
+.clear:after {
+    content: "";
+    clear: both
+}
+
+.fl {
+    float: left
+}
+
+.fr {
+    float: right
+}
+
+
+/*表格元素的默认样式重置*/
+
+table {
+    border-collapse: collapse;
+}
+
+
+/*移动端默认样式清除*/
+
+body {
+    font-family: Helvetica
+}
+
+body * {
+    -webkit-text-size-adjust: 100%;
+    box-sizing: border-box;
+}
+
+a,
+input,
+button {
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
+}
+
+input,
+button {
+    -webkit-appearance: none;
+    border-radius: 0
+}
+
+html {
+    height: 100%;
+}
+
+body {
+    background-color: #fff;
+    height: 100%;
+}
+
+#app {
+    position: relative;
+    z-index: 99;
+    height: 100%;
+}

+ 68 - 0
src/styles/mixin.less

@@ -0,0 +1,68 @@
+@blue: #3190e8;
+@bc: #e4e4e4;
+@fc:#fff;
+@rem: 30rem;
+// 背景图片地址和大小
+#bis(@url) {
+    background-image: url(@url);
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+}
+
+#borderRadius(@radius) {
+    -webkit-border-radius: @radius;
+    -moz-border-radius: @radius;
+    -ms-border-radius: @radius;
+    -o-border-radius: @radius;
+    border-radius: @radius;
+}
+
+//定位上下左右居中
+#center {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+}
+
+//定位上下居中
+#ct {
+    position: absolute;
+    top: 50%;
+    transform: translateY(-50%);
+}
+
+//定位左右居中
+#cl {
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%);
+}
+#ellipsis {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  
+//宽高
+#wh(@width, @height) {
+    width: @width;
+    height: @height;
+}
+
+//字体大小、行高、字体
+#font(@size, @line-height, @family: 'Microsoft YaHei') {
+    font: @size @line-height @family;
+}
+
+//字体大小,颜色
+#sc(@size, @color) {
+    font-size: @size;
+    color: @color;
+}
+
+//flex 布局和 子元素 对其方式
+#fj(@type: space-between) {
+    display: flex;
+    justify-content: @type;
+}

+ 38 - 0
src/utils/sagaCloudFetch.js

@@ -0,0 +1,38 @@
+import Vue from 'vue'
+import axios from 'axios'
+import vueAxios from 'vue-axios'
+// import store '../store'
+
+Vue.use(vueAxios, axios)
+    // 创建axios实例
+
+// const baseURL = process.env.NODE_ENV === "development" ? `http://localhost:${process.env.PORT}` : process.env.BASE_URL
+const service = axios.create({
+    // baseURL,
+    timeout: 30000, // 请求超时时间
+    withCredentials: true, //是否跨站点访问控制请求
+})
+
+// request拦截器
+service.interceptors.request.use(config => {
+    // Do something before request is sent
+    // if (store.getters.token) {
+    //   config.headers['X-Token'] = store.getters.token // 让每个请求携带token--['X-Token']为自定义key 请根据实际情况自行修改
+    // }
+    return config
+}, error => {
+    // Do something with request error
+    console.log(error) // for debug
+    Promise.reject(error)
+})
+
+// respone拦截器
+service.interceptors.response.use(
+    response => response,
+    error => {
+        console.log('err' + error) // for debug
+        return Promise.reject(error)
+    }
+)
+
+export default service

+ 309 - 0
src/utils/tools.js

@@ -0,0 +1,309 @@
+import Cookies from 'js-cookie'
+// import qiniu from 'qiniu'
+import router from '../router'
+
+const tools = {}
+
+tools.queryString = search => {
+    let rstObj = {}
+    if (!!search) {
+        let searchArr = search.substr(1).split('&')
+        searchArr.forEach(each => {
+            let item = each.split('=')
+            rstObj[item[0]] = item[1]
+        })
+    }
+    return rstObj
+}
+
+tools.goBeforeLoginUrl = () => {
+    let url = tools.getCookie('beforeLoginUrl')
+    if (!url || url.indexOf('/author') > -1) {
+        router.push({ path: '/' })
+    } else {
+        router.push({ path: url })
+        tools.setCookie('beforeLoginUrl', '')
+    }
+}
+
+tools.getCookie = (key) => {
+    const reg = /^\[|\]$/g
+    let rst = Cookies.get(key)
+    if (reg.test(rst)) {
+        return JSON.parse(rst)
+    } else {
+        return rst
+    }
+}
+
+tools.setCookie = (key, val) => {
+    if (typeof val === 'string') {
+        Cookies.set(key, val)
+    } else {
+        Cookies.set(key, JSON.stringify(val))
+    }
+}
+
+tools.rmCookie = (key) => {
+    Cookies.remove(key);
+}
+
+tools.getStorage = (key) => {
+    const re = /^\[|\{|\}|\]$/g //判断字符中是否有[]{}
+    let getIt = localStorage.getItem(key)
+    if (re.test(getIt)) {
+        return JSON.parse(getIt)
+    } else {
+        return getIt
+    }
+}
+
+tools.rmStorage = (key) => {
+    localStorage.removeItem(key);
+}
+
+tools.setStorage = (key, val) => {
+    if (typeof val == 'string') {
+        //如果传过来的是字符串,那么说明要保存的是id
+        localStorage.setItem(key, val)
+    } else {
+        //如果传过来的不是字符串,要保存数组
+        localStorage.setItem(key, JSON.stringify(val))
+    }
+}
+tools.verifyPhone = (val) => {
+    const re = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/
+    return re.test(val) ? val : false
+}
+tools.getDates = (times) => {
+    if (times) {
+        let thatTime = new Date(Number(times))
+        let add0 = tools.add0
+        return thatTime.getFullYear() + '.' + add0(thatTime.getMonth() + 1) + '.' + add0(thatTime.getDate()) + ' ' + add0(thatTime.getHours()) + ':' + add0(thatTime.getMinutes()) + ':' + add0(thatTime.getSeconds())
+    } else {
+        return 0
+    }
+
+}
+tools.add0 = num => {
+    return num < 10 ? ("0" + num) : ("" + num)
+}
+
+tools.getQueryString = name => {
+    let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)")
+    let r = window.location.search.substr(1).match(reg)
+    if (r != null) return unescape(r[2])
+    return null
+}
+
+//根据坐标计算两点距离(单位M,一般需求够用)
+tools.getGreatCircleDistance = (lat1, lng1, lat2, lng2) => {
+    const EARTH_RADIUS = 6378137.0 //单位M
+    const PI = Math.PI
+    let getRad = d => d * PI / 180
+
+    let radLat1 = getRad(lat1)
+    let radLat2 = getRad(lat2)
+
+    let a = radLat1 - radLat2
+    let b = getRad(lng1) - getRad(lng2)
+
+    let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)))
+    s = s * EARTH_RADIUS
+    s = Math.round(s * 10000) / 10000.0
+
+    return s
+}
+
+tools.cgetDistance = function(lat1, lng1, lat2, lng2) {
+    var radLat1 = Rad(lat1);
+    var radLat2 = Rad(lat2);
+    var a = radLat1 - radLat2;
+    var b = Rad(lng1) - Rad(lng2);
+    var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
+        Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
+    s = s * 6378.137; // EARTH_RADIUS;
+    s = Math.round(s * 10000) / 10000; //输出为公里
+    //s=s.toFixed(4);
+    function Rad(d) {
+        return d * Math.PI / 180.0; //经纬度转换成三角函数中度分表形式。
+    }
+    return s;
+}
+
+//根据坐标计算两点距离(单位M,修正公式)
+tools.getDistance = (lat1, lng1, lat2, lng2) => {
+    const EARTH_RADIUS = 6378137.0 //单位M
+    const PI = Math.PI
+    let getRad = d => d * PI / 180
+
+    let f = getRad((lat1 + lat2) / 2)
+    let g = getRad((lat1 - lat2) / 2)
+    let l = getRad((lng1 - lng2) / 2)
+
+    let sg = Math.sin(g)
+    let sl = Math.sin(l)
+    let sf = Math.sin(f)
+
+    let s, c, w, r, d, h1, h2
+    let a = EARTH_RADIUS
+    let fl = 1 / 298.257
+
+    sg = sg * sg
+    sl = sl * sl
+    sf = sf * sf
+
+    s = sg * (1 - sl) + (1 - sf) * sl
+    c = (1 - sg) * (1 - sl) + sf * sl
+
+    w = Math.atan(Math.sqrt(s / c))
+    r = Math.sqrt(s * c) / w
+    d = 2 * w * a
+    h1 = (3 * r - 1) / 2 / c
+    h2 = (3 * r + 1) / 2 / s
+
+    return d * (1 + fl * (h1 * sf * (1 - sg) - h2 * (1 - sf) * sg))
+}
+
+//七牛获取uploadToken
+// tools.getUploadToken = () => {
+//     const accessKey = 'PviQR6h2gQ7O2CW4l7L2SfwtZHATi6fdWooc5qyI'
+//     const secretKey = 'utyHxciZexS20sTWsWj_vRB_yztHafks7eKkiUBn'
+//     let mac = new qiniu.auth.digest.Mac(accessKey, secretKey)
+//     let options = {
+//         scope: 'sgagcloud-uber',
+//         expires: 7200
+//     }
+//     let putPolicy = new qiniu.rs.PutPolicy(options)
+//     let uploadToken = putPolicy.uploadToken(mac)
+//     return uploadToken
+// }
+
+//七牛base64编码图片上传
+tools.putb64 = (uploadToken, picBase) => {
+    return new Promise((resolve, reject) => {
+        //通过base64编码字符流计算文件流大小
+        try {
+            let getFileSize = (str) => {
+                let indexOf = str.indexOf('=')
+                if (indexOf > 0) {
+                    str = str.substring(0, indexOf)
+                }
+                let fsize = parseInt(str.length - (str.length / 8) * 2)
+                return fsize
+            }
+            picBase = picBase.substring(22)
+            let fsize = getFileSize(picBase)
+            let url = `http://upload-z1.qiniu.com/putb64/-1`
+            let xhr = new XMLHttpRequest()
+            xhr.onreadystatechange = () => {
+                if (xhr.readyState == 4) {
+                    let status = xhr.status
+                    if (status >= 200 && status < 300) {
+                        let keyText = eval(`(${xhr.responseText})`)
+                        let picUrl = `http://on90fbix8.bkt.clouddn.com/${keyText.key}`
+                        resolve(picUrl)
+                    } else {
+                        reject(status)
+                    }
+                }
+            }
+            xhr.open('POST', url, true)
+            xhr.setRequestHeader('Content-Type', 'application/octet-stream')
+            xhr.setRequestHeader('Authorization', `UpToken ${uploadToken}`)
+            xhr.send(picBase)
+        } catch (err) {
+            reject(err)
+        }
+    })
+}
+
+//获取图片链接
+tools.formatDate = time => {
+    return `${time.substring(0,4)}.${time.substring(4,6)}.${time.substring(6,8)} ${time.substring(8,10)}:${time.substring(10,12)}:${time.substring(12,14)}`
+}
+tools.arrayCnt = (arr) => {
+    let newArr = arr
+        .map(value => {
+            return value;
+        })
+        .reduce((pre, next, index) => {
+            //一级tag判断
+            if (!pre.some(value => {
+                    return value.firstTag === next.firstTag;
+                })) {
+                //如果是不重复的一级标签,放入pro
+                let pro = {
+                    firstTag: next.firstTag,
+                    details: [{
+                        dataSource: next.dataSource,
+                        secondTag: next.secondTag,
+                        infoPointCode: next.infoPointCode,
+                        infoPointName: next.infoPointName,
+                        inputMode: next.inputMode,
+                        dataType: next.dataType,
+                        unit: next.unit
+                    }]
+                };
+                pre.push(pro);
+                return pre;
+            } else {
+                //如果重复,将obj放入上一级标签中,使其属于一级标签
+                let obj = {
+                    dataSource: next.dataSource,
+                    secondTag: next.secondTag,
+                    infoPointCode: next.infoPointCode,
+                    infoPointName: next.infoPointName,
+                    inputMode: next.inputMode,
+                    dataType: next.dataType,
+                    unit: next.unit
+                };
+                let _index = pre.length - 1;
+                pre[_index].details.push(obj);
+                return pre;
+            }
+        }, []);
+    //二级标签处理
+    for (let i = 0; i < newArr.length; i++) {
+        // 将一级标签下的details转换成包含二级标签的数组
+        newArr[i].details = newArr[i].details
+            .map(item => {
+                return item;
+            })
+            .reduce((pre, next, index) => {
+                if (!pre.some(item => {
+                        return item.secondTag === next.secondTag;
+                    })) {
+                    // 为不重复二级标签,直接放入输出pro中
+                    let pro = {
+                        secondTag: next.secondTag,
+                        details: [{
+                            infoPointName: next.infoPointName,
+                            dataSource: next.dataSource,
+                            infoPointCode: next.infoPointCode,
+                            inputMode: next.inputMode,
+                            dataType: next.dataType,
+                            unit: next.unit
+                        }]
+                    };
+                    pre.push(pro);
+                    return pre;
+                } else {
+                    //重复的二级标签,直接放入details中
+                    let obj = {
+                        infoPointCode: next.infoPointCode,
+                        dataSource: next.dataSource,
+                        infoPointName: next.infoPointName,
+                        inputMode: next.inputMode,
+                        dataType: next.dataType,
+                        unit: next.unit
+                    };
+                    let _index = pre.length - 1;
+                    pre[_index].details.push(obj);
+                    return pre;
+                }
+            }, []);
+    }
+    return newArr;
+}
+export default tools

+ 118 - 0
src/views/changeMess.vue

@@ -0,0 +1,118 @@
+<template>
+    <div id="changeMess">
+        <div v-for="item in message" v-if="item.firstTag != '能耗信息' && item.firstTag != '建筑文档'">
+            <h3 class="first-tag">{{item.firstTag}}</h3>
+            <div v-for="i in item.details">
+                <h4 class="second-tag">{{i.secondTag}}</h4>
+                <template v-for="detail in i.details">
+                        <form-input v-if="isShow(detail.inputMode)" :width="170" :type="detail.inputMode" :myArr="detail.dataSource" :value="value.infos[detail.infoPointCode]" :unit="detail.unit" @change="changed" :keys="detail.infoPointCode" :label="detail.infoPointName" :isRule="false"></form-input>
+</template>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+    import tools from "@/utils/tools";
+    import formInput from "@/components/formInput";
+    import {
+        getEquipmentLabel, //获取左侧label标签
+        getwinValue, //获取资产的对应value标签
+        updateMess
+    } from "api/repair";
+    export default {
+        components: {
+            formInput
+        },
+        data() {
+            return {
+                param: {
+                    perjectId: this.$route.query.perjectId,
+                    secret: this.$route.query.secret,
+                    id: this.$route.query.id,
+                    type: this.$route.query.type
+                },
+                message: [],
+                value: {}
+            };
+        },
+        created() {
+            this.getValue();
+        },
+        methods: {
+            isShow() {
+                return true;
+            },
+            getLabel() {
+                getEquipmentLabel(this.param.type, this.param.perjectId)
+                    .then(res => {
+                        if (res.data.Result == "success") {
+                            this.message = tools.arrayCnt(res.data.Content);
+                        } else {
+                            this.$message.error(res.data.ResultMsg);
+                        }
+                    })
+                    .catch(() => {
+                        this.$message.error("请求出错");
+                    });
+            },
+            getValue() {
+                getwinValue(this.param.id, this.param.perjectId, this.param.secret)
+                    .then(res => {
+                        if (res.data.Result == "success") {
+                            this.value = res.data.Content[0];
+                            this.getLabel();
+                        } else {
+                            this.$message.error(res.data.ResultMsg);
+                        }
+                    })
+                    .catch(() => {
+                        this.$message.error("请求出错");
+                    });
+            },
+            changed(val, key) {
+                let param = {
+                    id: this.param.id,
+                    data: {
+                        [key]: [{
+                            value: val
+                        }]
+                    },
+                    perjectId: this.param.perjectId,
+                    secret: this.param.secret
+                }
+                updateMess(param).then(res => {
+                    if (res.data.Result == 'success') {
+                        this.$message.success("修改成功")
+                    } else {
+                        this.$message.error(res.data.ResultMsg)
+                    }
+                }).catch(() => {
+                    this.$message.error("请求出错")
+                })
+            }
+        }
+    };
+</script>
+<style lang="less" scoped>
+    #changeMess {
+        font-size: 24px;
+    }
+    .first-tag {
+        line-height: 40px;
+        font-weight: 600;
+        margin-left: 5px;
+        font-size: 24px;
+    }
+    .second-tag {
+        font-size: 18px;
+        line-height: 40px;
+        font-weight: 500;
+        margin-left: 20px;
+        color: #6bcae2;
+    }
+    .font-right {
+        float: right;
+        margin-right: 30px;
+    }
+</style>

+ 439 - 0
src/views/echarts/index.vue

@@ -0,0 +1,439 @@
+<template>
+  <div id="tableCharts">
+      <!-- 头部返回按钮,只在电脑端出现,考虑到revit -->
+      <div class="go_back" v-if="!isCollapse">
+          <span class="btn" @click="$router.go(-1)">返回</span>
+      </div>
+      <!-- 电脑端的选择时间精度 -->
+      <div class="web_view" v-if="!isCollapse">
+        <div class="ele_select">
+            <!-- 分精度 -->
+            <div class="inline_block" v-if="haveSelect">
+                <span>请选择精度:</span>
+                <el-select v-model="period" placeholder="请选择">
+                    <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                    </el-option>
+                </el-select>
+            </div>
+            <!-- 起止时间 -->
+            <div class="inline_block">
+                <span class="demonstration">起止时间:</span>
+                <el-date-picker
+                v-model="timeArr"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+                </el-date-picker>
+            </div>
+            <!-- 生成图表按钮 -->
+            <div class="inline_block">
+                <span class="btn mar4" @click="getChartsData">生成图表</span>           
+            </div>
+        </div>
+      </div>
+      <!-- 移动端的选择 -->
+    <div class="mobile_view" v-else>
+        <div class="mobile_select">
+            <div class="inline_block" v-if="haveSelect">
+                <span>选择精度:</span>
+                <select name="" id="" v-model="period">
+                    <option :value="item.value" v-for="item in options" placeholder="请选择精度0">{{item.label}}</option>
+                </select>
+            </div>
+            <div class="inline_block">
+                <span>开始时间:</span>
+                <input type="datetime-local" v-model="startDate">
+            </div>
+            <div class="inline_block">
+                <span>结束时间:</span>
+                <input type="datetime-local" v-model="endDate">
+            </div>
+            <span class="btn" @click="getIosDate()">生成图表</span>
+        </div>
+    </div>
+    <div class="echarts">
+        <!-- echarts表格 -->
+        <div v-if="renderData && renderData.length">
+            <echarts :id="echartsData.id" :renderData="renderData" :title="title" :unit="unit"></echarts>
+        </div>
+        <!-- 当没有数据时提供的提示 -->
+        <div v-else class="echarts_nodata">
+            {{msgData}}
+        </div>
+    </div>
+  </div>
+</template>
+<script>
+
+import echarts from '@/components/lineCharts'
+
+import {
+    getEcharts,//获取有明确精度表格数据
+    getNoPeriod //获取原始精度的表格数据
+} from 'api/repair'
+export default {
+    data () {
+        return {
+            isCollapse: true,//是否是移动端
+            period: 'no',//select选择结果
+            msgData: '暂无数据',
+            startDate: new Date((new Date()).getTime() - 24*60*60*1000).toISOString().slice(0, -5),//手机选择时间开始
+            endDate: new Date().toISOString().slice(0, -5),//手机选择时间结束
+            options: [{//select数据
+                value: '1min',
+                label: '1分钟'
+                }, {
+                value: '5min',
+                label: '5分钟'
+                }, {
+                value: '15min',
+                label: '15分钟'
+                }, {
+                value: '1h',
+                label: '1小时'
+                }, {
+                value: '1d',
+                label: '1天'
+                }, {
+                  value: 'no',
+                  label: '原始精度'  
+                }
+            ],
+            echartsData: {//echarts的数据
+                id: 'echarts1',
+                data: '',
+                unit: '111'
+            },
+            value: '',//动态数据
+            id: this.$route.query.id,//Pj1101010001
+            code: this.$route.query.code,//OutTdb
+            secret: this.$route.query.secret,//密码secret
+            FmId: this.$route.query.FmId,
+            unit: this.$route.query.unit,
+            haveSelect: Number(this.$route.query.haveSelect),
+            title: this.$route.query.markName, //表号功能号
+            timeArr: [new Date((new Date()).getTime() - 24*60*60*1000) ,new Date()],//时间数组,element-ui
+            renderData: []//echarts渲染数据
+        }
+    },
+    components: {
+        echarts
+    },
+    watch:{
+    },
+    methods:{
+
+        //手机点击按钮
+        getIosDate(){
+            let startDate = this.format(new Date(this.startDate),'yyyyMMddHHmmss')//转换为yyyyMMddHHmmss后台需要格式
+            let endDate = this.format(new Date(this.endDate),'yyyyMMddHHmmss')
+            //请求接口
+            if(startDate && endDate && this.period){
+                getEcharts(
+                    this.id,
+                    this.code,
+                    this.period,
+                    this.FmId,
+                    startDate,
+                    endDate,
+                    this.secret
+                ).then(
+                    result =>{
+                        this.renderData = result.data.Content
+                    }
+                )
+            }
+        },
+
+        //电脑点击按钮
+        getChartsData(){
+            if(this.period && this.timeArr.length){
+                //当period为no时请求原始数据接口
+                if(this.period == 'no'){
+                    getNoPeriod(
+                        this.id,
+                        this.code,
+                        this.FmId,
+                        this.format(this.timeArr[0], 'yyyyMMddHHmmss'),
+                        this.format(this.timeArr[1], 'yyyyMMddHHmmss'),
+                        this.secret
+                    ).then(
+                        result => {
+                            if(result.data.Result == 'success'){
+                                this.renderData = result.data.Content.map(
+                                    (item,index) => {
+                                        return {
+                                            'data_time': item.receivetime,
+                                            'data_value': item.data
+                                        }
+                                    }
+                                )
+                            }else{
+                                this.msgData = '暂无信息'
+                            }
+                        }
+                    )
+                }else{
+                    // 否则请求带分精度的接口
+                    getEcharts(
+                        this.id,
+                        this.code,
+                        this.period,
+                        this.FmId,
+                        this.format(this.timeArr[0], 'yyyyMMddHHmmss'),
+                        this.format(this.timeArr[1], 'yyyyMMddHHmmss'),
+                        this.secret
+                    ).then(
+                        result =>{
+                            if(result.data.Result == 'success'){
+                                this.renderData = result.data.Content
+                            }else{
+                                this.msgData = '暂无信息'
+                            }
+                        }
+                    )
+                }
+            }
+        },
+
+        //判断是移动端/pc端
+        browserRedirect() {  
+            var sUserAgent = navigator.userAgent.toLowerCase();  
+            var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";  
+            var bIsMidp = sUserAgent.match(/midp/i) == "midp";  
+            var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";  
+            var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";  
+            var bIsAndroid = sUserAgent.match(/android/i) == "android";  
+            var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";  
+            var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";  
+            if( bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {  
+                return true;//移动地址  
+            } else {  
+                return false;//PC地址  
+            }  
+        },
+        isMobile(){
+            if(this.browserRedirect()){
+                //是移动端
+                this.isCollapse = true
+            }else{
+                //是pc端
+                this.isCollapse = false
+            }
+        },
+        //工具函数,转换成需求的格式
+        format(time, format){
+            var t = new Date(time);
+            var tf = function(i){return (i < 10 ? '0' : '') + i};
+            return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a){
+                switch(a){
+                    case 'yyyy':
+                        return tf(t.getFullYear());
+                        break;
+                    case 'MM':
+                        return tf(t.getMonth() + 1);
+                        break;
+                    case 'mm':
+                        return tf(t.getMinutes());
+                        break;
+                    case 'dd':
+                        return tf(t.getDate());
+                        break;
+                    case 'HH':
+                        return tf(t.getHours());
+                        break;
+                    case 'ss':
+                        return tf(t.getSeconds());
+                        break;
+                }
+            })
+        }
+    },
+
+    created(){
+        document.title = this.$route.query.markName
+        // 是否有haveSelect,没有的花请求原始数据接口
+        if(this.$route.query.haveSelect){
+            this.options.pop()
+            this.period = '15min'
+        }else{
+        }
+        this.isMobile()
+        this.getChartsData()
+    }
+}
+</script>
+<style lang="less">
+#tableCharts{
+    padding: 10px 15px 0;
+    width: 100%;
+    overflow: hidden;
+    .btn{
+        padding: .2rem .4rem;
+        background-color: #409EFF;
+        color: #fff;
+        border-radius: .2rem;
+        cursor: pointer;
+    }
+    .go_back{
+        font-size: .4rem;
+        position:absolute;
+        // overflow: hidden;
+        height: .8rem;
+        top: 10px;
+        left: 15px;
+        span{
+            padding: 0.05rem 0.3rem;
+            border: .02rem solid #409EFF;
+            color: #409EFF;
+            background-color: #fff;
+            box-sizing: border-box;
+        }
+    }
+    .web_view{
+        margin-top: 1rem;
+        .el_picker,.ele_select{
+            .demonstration{
+                margin-left: .4rem;
+            }
+            .inline_block{
+                display: inline-block;
+                height: 1.2rem;
+            }
+            width: 100%;
+            font-size: .4rem;
+            .el-range-editor,.el-input__inner{
+                padding: 0 10px;
+                height: 32px;
+                line-height: 32px;
+            }
+            .mar4{
+                margin-left: .4rem;
+            }
+        }
+    }
+}
+.link_second{
+    width: 100%;
+    line-height: .6rem;
+    font-size: .4rem;
+    text-align: center;
+    color: #409EFF;
+    cursor: pointer;
+}
+.echarts_nodata{
+    width: 100%;
+    overflow: hidden;
+    text-align: center;
+    color: #ddd;
+    font-size: .5rem;
+    margin-top: .2rem;
+    // border: .02rem solid #ccc;
+    height: 1rem;
+}
+.unit{
+    height: .2rem;
+    font-size: .2rem;
+    color: #777;
+    margin-top: .1rem;
+}
+@media screen and (max-width:960px) {
+    #tableCharts{
+        padding: 10px 15px 0;
+        width: 100%;
+        overflow: hidden;
+        .go_back{
+            height: .6rem;
+            .btn{
+                font-size: .25rem;
+                padding: .05rem .2rem;
+            }
+        }
+        .web_view{
+            margin-top: .7rem;
+            .el_picker,.ele_select{
+                .demonstration{
+                    margin-left: 0rem;
+                }
+                width: 100%;
+                .inline_block{
+                    height: .7rem;
+                }
+                font-size: .2rem;
+                .el-range-editor,.el-input__inner{
+                    padding: 0 10px;
+                    height: 32px;
+                    line-height: 32px;
+                }
+                .btn{
+                    padding: .1rem .2rem;
+                    background-color: #409EFF;
+                    color: #fff;
+                    border-radius: .1rem;
+                    cursor: pointer;
+                }
+                .mar4{
+                    margin-left: .2rem;
+                }
+            }
+        }
+        .mobile_view{
+            font-size: .2rem;
+            .mobile_select,.mobile_picker{
+                line-height: .5rem;
+                input,select{
+                    width: 2.5rem;
+                    height: .4rem;
+                    border-radius: .05rem;
+                    line-height: .4rem;
+                    background-color: #fff;
+                }
+                .inline_block{
+                    display: inline-block;
+                    width: 100%;
+                    height: .6rem;
+                    line-height: .6rem;
+                    position: relative;
+                    left: 0;
+                    top: 0;
+                    right: 0;
+                    bottom: 0;
+                    margin-bottom: .1rem;
+                    input,select{
+                        height: 100%;
+                        border: .02rem solid #777;
+                        width: 100%;
+                        font-size: .3rem;
+                        -webkit-appearance: none;
+                        padding-left: 2.2rem;
+                    }
+                    input{
+                        padding-left: 1rem;
+                    }
+                }
+            }
+            .btn{
+                display: block;
+                width: 1.2rem;
+                height: .5rem;
+                line-height: .5rem;
+                text-align: center;
+                border-radius: .1rem;
+                background-color: #409EFF;
+                color: #fff;
+                padding: 0;
+                margin-top: .2rem;
+            }
+        }
+        .echarts_nodata{
+            font-size: .2rem;
+        }
+    }
+}
+</style>
+

+ 155 - 0
src/views/excelExp/index.vue

@@ -0,0 +1,155 @@
+<template>
+  <div>
+      <div id="example-container" class="wrapper">
+      <!-- <HotTable :root="root" :settings="hotSettings"></HotTable> -->
+    </div>
+  </div>
+
+</template>
+<script>
+//   import moment from 'moment'; //引入handsontable依赖的插件
+//   import numbro from 'numbro';
+//   import pikaday from 'pikaday'; //日期插件
+//   import Zeroclipboard from 'zeroclipboard';
+//   import Handsontable from 'handsontable';
+//   import HotTable from 'vue-handsontable-official';
+//   import Vue from 'vue';
+
+//   export default {
+//     data: function () {
+//       return {
+//         root: 'test-hot',
+//         hotSettings: {
+//           data: [        //数据,可以是数据,对象
+//             ['20080101', 10, 11, 12, 13,true],
+//             ['20090101', 20, 11, 14, 13,true],
+//             ['20010101', 30, 15, 12, 13,true],
+//             ['20010101', 32, 213, 21, 312,true],
+//             ['20010201', 32, 213, 21, 312,true],
+//             ['20010301', 32, 213, 21, 312,true],
+//             ['20010401', 32, 213, 21, 312,true],
+//             ['20010501', 32, 213, 21, 312,true],
+//             ['20010601', 32, 213, 21, 312,true]
+//           ],
+//           startRows: 11,//行列范围
+//           startCols: 6,
+//           minRows: 5,  //最小行列
+//           minCols: 5,
+//           maxRows: 20,  //最大行列
+//           maxCols: 20,
+//           rowHeaders: true,//行表头
+//           colHeaders:   ['时间', 'Kia', 'Nissan', 'Toyota', 'Honda','123'],//自定义列表头or 布尔值
+//           minSpareCols: 2, //列留白
+//           minSpareRows: 2,//行留白
+//           currentRowClassName: 'currentRow', //为选中行添加类名,可以更改样式
+//           currentColClassName: 'currentCol',//为选中列添加类名
+//           autoWrapRow: true, //自动换行
+//           contextMenu: {   //自定义右键菜单,可汉化,默认布尔值
+//             items: {
+//               "row_above": {
+//                 name:'上方插入一行'
+//               },
+//               "row_below": {
+//                 name:'下方插入一行'
+//               },
+//               "col_left": {
+//                 name:'左方插入列'
+//               },
+//               "col_right": {
+//                 name:'右方插入列'
+//               },
+//               "hsep1": "---------", //提供分隔线
+//               "remove_row": {
+//                 name: '删除行',
+//               },
+//               "remove_col": {
+//                 name: '删除列',
+//               },
+//               "make_read_only": {
+//                 name: '只读',
+//               },                     
+//               "borders": {
+//                 name: '表格线',
+//               },
+//               "commentsAddEdit": {
+//                 name: '添加备注',
+//               },
+//               "commentsRemove": {
+//                 name: '取消备注',
+//               },
+//               "freeze_column": {
+//                 name: '固定列',
+//               },
+//               "unfreeze_column": {
+//                 name: '取消列固定',
+//               },
+//               "hsep2": "---------",
+//                        }
+//           },//右键效果
+//           fillHandle: true, //选中拖拽复制 possible values: true, false, "horizontal", "vertical"
+//           fixedColumnsLeft: 0,//固定左边列数
+//           fixedRowsTop: 0,//固定上边列数
+//           mergeCells: [   //合并
+//              {row: 1, col: 1, rowspan: 3, colspan: 3},  //指定合并,从(1,1)开始行3列3合并成一格
+//              {row: 3, col: 4, rowspan: 2, colspan: 2}
+//           ],
+//           columns: [     //添加每一列的数据类型和一些配置
+//             {
+//               type: 'date',   //时间格式
+//               dateFormat: 'YYYYMMDD',
+//               correctFormat: true,
+//               defaultDate: '19000101'
+//             },
+//             {
+//               type: 'dropdown', //下拉选择
+//               source: ['BMW', 'Chrysler', 'Nissan', 'Suzuki', 'Toyota', 'Volvo'],
+//               strict: false   //是否严格匹配
+//             },
+//             {type: 'numeric'},  //数值
+//             {type: 'numeric',
+//               readOnly: true  //设置只读
+//             },
+//             { type: 'numeric',
+//               format: '$ 0,0.00'},  //指定的数据格式
+//             {type: 'checkbox'},  //多选框
+//           ],
+//           manualColumnFreeze: true, //手动固定列
+//           manualColumnMove: true, //手动移动列
+//           manualRowMove: true,   //手动移动行
+//           manualColumnResize: true,//手工更改列距
+//           manualRowResize: true,//手动更改行距
+//           comments: true, //添加注释
+//           cell: [
+//             {row: 1, col: 1, comment: {value: 'this is test'}},
+//           ],
+//           customBorders:[],//添加边框
+//           columnSorting: true,//排序
+//           stretchH: 'all',//根据宽度横向扩展,last:只扩展最后一列,none:默认不扩展
+
+//         }
+//       };
+//     },
+//     name: 'SampleApp',
+//     components: {
+//       HotTable
+//     }
+//   }
+</script>
+
+<style>
+  button{
+    margin: 20px 20px;
+  }
+  .handsontable .currentRow {
+    background-color: #E7E8EF;
+  }
+
+  .handsontable .currentCol {
+    background-color: #F9F9FB;
+  }
+  #test-hot {
+    width: 800px;
+    height: 800px;
+    overflow: hidden;
+  }
+</style>

+ 31 - 0
src/views/lendExcel/index.vue

@@ -0,0 +1,31 @@
+<template>
+  <div class="vue_xlsx">
+    <h1>vue-xlsx-table</h1>
+    <vue-xlsx-table @on-select-file="handleOk">on-select-file</vue-xlsx-table>
+  </div>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+
+        }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    },
+    methods: {
+        handleOk (convertedData) {
+            console.log(convertedData)
+        }
+    }
+}
+</script>
+
+<style lang="less">
+
+</style>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1041 - 0
src/views/mbiH5/index.vue


+ 221 - 0
src/views/secondCharts/index.vue

@@ -0,0 +1,221 @@
+<template>
+  <div id="tableCharts">
+      <!-- 返回按钮,目前只有电脑端会出现 -->
+      <div class="go_back" v-if="!isCollapse">
+          <span class="btn" @click="$router.go(-1)">返回</span>
+      </div>
+      <!-- 电脑端的时间选择器 -->
+      <div class="web_view" v-if="!isCollapse">
+        <div class="ele_select">
+            <div class="inline_block">
+                <span>请选择精度:</span>
+                <el-select v-model="period" placeholder="请选择">
+                    <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="inline_block">
+                <span class="demonstration">起止时间:</span>
+                <el-date-picker
+                v-model="timeArr"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+                </el-date-picker>
+            </div>
+            <div class="inline_block">
+                <span class="btn mar4" @click="getChartsData">生成图表</span>           
+            </div>
+      </div>
+      </div>
+      <!-- 手机端的时间选择器 -->
+    <div class="mobile_view" v-else>
+        <div class="mobile_select">
+            <span>选择精度:</span>
+            <select name="" id="" v-model="period">
+                <option :value="item.value" v-for="item in options">{{item.label}}</option>
+            </select>
+            <div class="inline_block">
+                <span>开始时间:</span>
+                <input type="datetime-local" v-model="startDate">
+            </div>
+            <div class="inline_block">
+                <span>结束时间:</span>
+                <input type="datetime-local" v-model="endDate">
+            </div>
+            <span class="btn" @click="getIosDate()">生成图表</span>
+        </div>
+    </div>
+    <!-- 生成的echarts -->
+    <div class="echarts">
+        <echarts v-if="renderData && renderData.length" :id="echartsData.id" :renderData="renderData" :units="echartsData.units"></echarts>
+        <div v-else class="echarts_nodata">
+            {{msgData}}
+        </div>
+    </div>
+  </div>
+</template>
+<script>
+
+import echarts from '@/components/lineCharts'
+
+import {
+    getEcharts//获取表格数据
+} from 'api/repair'
+export default {
+    data () {
+        return {
+            isCollapse: true,//判断是否为移动端参数
+            period: '',//select选择结果
+            msgData: '暂无数据',//显示的数据内容
+            startDate: '',//手机选择时间开始
+            endDate: '',//手机选择时间结束
+            options: [{//options选择数据
+                value: '1min',
+                label: '1分钟'
+                }, {
+                value: '5min',
+                label: '5分钟'
+                }, {
+                value: '15min',
+                label: '15分钟'
+                }, {
+                value: '1h',
+                label: '1小时'
+                }, {
+                value: '1d',
+                label: '1天'
+                }
+            ],
+            echartsData: {//echarts数据
+                id: 'echarts2',
+                data: '',
+                units: '111'
+            },
+            value: '',//
+            id: this.$route.query.id,//Pj1101010001,网页传项目id
+            code: this.$route.query.secondCode,//OutTdb,网页所传code,请求参数
+            secret: this.$route.query.secret,//网页传来的参数secret
+            FmId: this.$route.query.FmId,
+            timeArr: [],//element-ui选择时间数据
+            renderData: []//echarts的renderData
+        }
+    },
+    components: {
+        echarts
+    },
+    watch:{
+    },
+    methods:{
+        //手机点击按钮
+        getIosDate(){
+            let startDate = this.format(new Date(this.startDate),'yyyyMMddHHmmss')//转换为yyyyMMddHHmmss后台需要格式
+            let endDate = this.format(new Date(this.endDate),'yyyyMMddHHmmss')
+            if(startDate && endDate && this.period){
+                getEcharts(
+                    this.id,
+                    this.code,
+                    this.period,
+                    this.FmId,
+                    startDate,
+                    endDate,
+                    this.secret
+                ).then(
+                    result =>{
+                        if(result.data.Result == 'success'){
+                            this.renderData = result.data.Content
+                        }else{
+                            console.log(result.data)
+                            this.msgData = '暂无信息'
+                        }
+                    }
+                )
+            }
+        },
+        //电脑点击按钮
+        getChartsData(){
+            if(this.period && this.timeArr.length){
+                getEcharts(
+                    this.id,
+                    this.code,
+                    this.period,
+                    this.FmId,
+                    this.format(this.timeArr[0], 'yyyyMMddHHmmss'),
+                    this.format(this.timeArr[1], 'yyyyMMddHHmmss'),
+                    this.secret
+                ).then(
+                    result =>{
+                        if(result.data.Result == 'success'){
+                            this.renderData = result.data.Content
+                        }else{
+                            console.log(result.data)
+                            this.msgData = '暂无信息'
+                        }
+                    }
+                )
+            }
+        },
+        //判断是移动端/pc端
+        browserRedirect() {  
+            var sUserAgent = navigator.userAgent.toLowerCase();  
+            var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";  
+            var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";  
+            var bIsMidp = sUserAgent.match(/midp/i) == "midp";  
+            var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";  
+            var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";  
+            var bIsAndroid = sUserAgent.match(/android/i) == "android";  
+            var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";  
+            var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";  
+            if(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {  
+                return true;//移动地址  
+            } else {  
+                return false;//PC地址  
+            }  
+        },
+        isMobile(){
+            if(this.browserRedirect()){
+                //是移动端
+                this.isCollapse = true
+            }else{
+                //是pc端
+                this.isCollapse = false
+            }
+        },
+        //工具函数,转换成需求的格式
+        format(time, format){
+            var t = new Date(time);
+            var tf = function(i){return (i < 10 ? '0' : '') + i};
+            return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a){
+                switch(a){
+                    case 'yyyy':
+                        return tf(t.getFullYear());
+                        break;
+                    case 'MM':
+                        return tf(t.getMonth() + 1);
+                        break;
+                    case 'mm':
+                        return tf(t.getMinutes());
+                        break;
+                    case 'dd':
+                        return tf(t.getDate());
+                        break;
+                    case 'HH':
+                        return tf(t.getHours());
+                        break;
+                    case 'ss':
+                        return tf(t.getSeconds());
+                        break;
+                }
+            })
+        },
+    },
+    mounted(){
+        this.isMobile()
+    }
+}
+</script>

+ 0 - 0
static/.gitkeep


+ 1 - 0
static/MP_verify_Ovj0lU5B5Ea1Uudi.txt

@@ -0,0 +1 @@
+Ovj0lU5B5Ea1Uudi

+ 576 - 0
static/html5media.min.js

@@ -0,0 +1,576 @@
+(function() {
+    function B(a) { console.log("$f.fireEvent", [].slice.call(a)) }
+
+    function y(a) { if (!a || typeof a != "object") return a; var d = new a.constructor; for (var c in a)
+            if (a.hasOwnProperty(c)) d[c] = y(a[c]);
+        return d }
+
+    function o(a, d) { if (a) { var c, p = 0,
+                f = a.length; if (f === undefined)
+                for (c in a) { if (d.call(a[c], c, a[c]) === false) break } else
+                    for (c = a[0]; p < f && d.call(c, p, c) !== false; c = a[++p]); return a } }
+
+    function s(a) { return document.getElementById(a) }
+
+    function w(a, d, c) {
+        if (typeof d != "object") return a;
+        a && d && o(d, function(p, f) {
+            if (!c ||
+                typeof f != "function") a[p] = f
+        });
+        return a
+    }
+
+    function z(a) { var d = a.indexOf("."); if (d != -1) { var c = a.substring(0, d) || "*",
+                p = a.substring(d + 1, a.length),
+                f = [];
+            o(document.getElementsByTagName(c), function() { this.className && this.className.indexOf(p) != -1 && f.push(this) }); return f } }
+
+    function E(a) { a = a || window.event; if (a.preventDefault) { a.stopPropagation();
+            a.preventDefault() } else { a.returnValue = false;
+            a.cancelBubble = true } return false }
+
+    function i(a, d, c) { a[d] = a[d] || [];
+        a[d].push(c) }
+
+    function v() {
+        return "_" + ("" + Math.random()).substring(2,
+            10)
+    }
+
+    function n(a, d, c) {
+        function p() {
+            function g(k) {!f.isLoaded() && f._fireEvent("onBeforeClick") !== false && f.load(); return E(k) }
+            if ($f(a)) { $f(a).getParent().innerHTML = "";
+                F = $f(a).getIndex();
+                t[F] = f } else { t.push(f);
+                F = t.length - 1 }
+            L = parseInt(a.style.height, 10) || a.clientHeight;
+            if (typeof d == "string") d = { src: d };
+            A = a.id || "fp" + v();
+            G = d.id || A + "_api";
+            d.id = G;
+            c.playerId = A;
+            if (typeof c == "string") c = { clip: { url: c } };
+            if (typeof c.clip == "string") c.clip = { url: c.clip };
+            c.clip = c.clip || {};
+            if (a.getAttribute("href", 2) && !c.clip.url) c.clip.url =
+                a.getAttribute("href", 2);
+            h = new e(c.clip, -1, f);
+            c.playlist = c.playlist || [c.clip];
+            var q = 0;
+            o(c.playlist, function() { var k = this; if (typeof k == "object" && k.length) k = { url: "" + k };
+                o(c.clip, function(u, C) { if (C !== undefined && k[u] === undefined && typeof C != "function") k[u] = C });
+                c.playlist[q] = k;
+                k = new e(k, q, f);
+                j.push(k);
+                q++ });
+            o(c, function(k, u) { if (typeof u == "function") { h[k] ? h[k](u) : i(x, k, u);
+                    delete c[k] } });
+            o(c.plugins, function(k, u) { if (u) r[k] = new l(k, u, f) });
+            if (!c.plugins || c.plugins.controls === undefined) r.controls = new l("controls",
+                null, f);
+            r.canvas = new l("canvas", null, f);
+            d.bgcolor = d.bgcolor || "#000000";
+            d.version = d.version || [9, 0];
+            d.expressInstall = "http://www.flowplayer.org/swf/expressinstall.swf";
+            D = a.innerHTML;
+            if (D.replace(/\s/g, "") !== "")
+                if (a.addEventListener) a.addEventListener("click", g, false);
+                else a.attachEvent && a.attachEvent("onclick", g);
+            else { a.addEventListener && a.addEventListener("click", E, false);
+                f.load() }
+        }
+        var f = this,
+            m = null,
+            D, h, j = [],
+            r = {},
+            x = {},
+            A, G, F, J, M, L;
+        w(f, {
+            id: function() { return A },
+            isLoaded: function() { return m !== null },
+            getParent: function() { return a },
+            hide: function(g) { if (g) a.style.height = "0px"; if (m) m.style.height = "0px"; return f },
+            show: function() { a.style.height = L + "px"; if (m) m.style.height = M + "px"; return f },
+            isHidden: function() { return m && parseInt(m.style.height, 10) === 0 },
+            load: function(g) { if (!m && f._fireEvent("onBeforeLoad") !== false) { o(t, function() { this.unload() }); if ((D = a.innerHTML) && !flashembed.isSupported(d.version)) a.innerHTML = "";
+                    flashembed(a, d, { config: c }); if (g) { g.cached = true;
+                        i(x, "onLoad", g) } } return f },
+            unload: function() {
+                if (D.replace(/\s/g, "") !== "") {
+                    if (f._fireEvent("onBeforeUnload") ===
+                        false) return f;
+                    try { if (m) { m.fp_close();
+                            f._fireEvent("onUnload") } } catch (g) {}
+                    m = null;
+                    a.innerHTML = D
+                }
+                return f
+            },
+            getClip: function(g) { if (g === undefined) g = J; return j[g] },
+            getCommonClip: function() { return h },
+            getPlaylist: function() { return j },
+            getPlugin: function(g) { var q = r[g]; if (!q && f.isLoaded()) { var k = f._api().fp_getPlugin(g); if (k) { q = new l(g, k, f);
+                        r[g] = q } } return q },
+            getScreen: function() { return f.getPlugin("screen") },
+            getControls: function() { return f.getPlugin("controls") },
+            getConfig: function(g) { return g ? y(c) : c },
+            getFlashParams: function() { return d },
+            loadPlugin: function(g, q, k, u) { if (typeof k == "function") { u = k;
+                    k = {} } var C = u ? v() : "_";
+                f._api().fp_loadPlugin(g, q, k, C);
+                q = {};
+                q[C] = u;
+                u = new l(g, null, f, q); return r[g] = u },
+            getState: function() { return m ? m.fp_getState() : -1 },
+            play: function(g, q) {
+                function k() { g !== undefined ? f._api().fp_play(g, q) : f._api().fp_play() }
+                m ? k() : f.load(function() { k() }); return f },
+            getVersion: function() { if (m) { var g = m.fp_getVersion();
+                    g.push("flowplayer.js 3.1.4"); return g } return "flowplayer.js 3.1.4" },
+            _api: function() {
+                if (!m) throw "Flowplayer " + f.id() +
+                    " not loaded when calling an API method";
+                return m
+            },
+            setClip: function(g) { f.setPlaylist([g]); return f },
+            getIndex: function() { return F }
+        });
+        o("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","), function() { var g = "on" + this; if (g.indexOf("*") != -1) { g = g.substring(0, g.length - 1); var q = "onBefore" + g.substring(2);
+                f[q] = function(k) { i(x, q, k); return f } }
+            f[g] = function(k) { i(x, g, k); return f } });
+        o("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed".split(","),
+            function() { var g = this;
+                f[g] = function(q, k) { if (!m) return f; var u = null;
+                    u = q !== undefined && k !== undefined ? m["fp_" + g](q, k) : q === undefined ? m["fp_" + g]() : m["fp_" + g](q); return u === "undefined" || u === undefined ? f : u } });
+        f._fireEvent = function(g) {
+            if (typeof g == "string") g = [g];
+            var q = g[0],
+                k = g[1],
+                u = g[2],
+                C = g[3],
+                H = 0;
+            c.debug && B(g);
+            if (!m && q == "onLoad" && k == "player") { m = m || s(G);
+                M = m.clientHeight;
+                o(j, function() { this._fireEvent("onLoad") });
+                o(r, function(N, K) { K._fireEvent("onUpdate") });
+                h._fireEvent("onLoad") }
+            if (!(q == "onLoad" && k != "player")) {
+                if (q ==
+                    "onError")
+                    if (typeof k == "string" || typeof k == "number" && typeof u == "number") { k = u;
+                        u = C }
+                if (q == "onContextMenu") o(c.contextMenu[k], function(N, K) { K.call(f) });
+                else if (q == "onPluginEvent") { if (C = r[k.name || k]) { C._fireEvent("onUpdate", k);
+                        C._fireEvent(u, g.slice(3)) } } else {
+                    if (q == "onPlaylistReplace") { j = []; var O = 0;
+                        o(k, function() { j.push(new e(this, O++, f)) }) }
+                    if (q == "onClipAdd") { if (k.isInStream) return;
+                        k = new e(k, u, f);
+                        j.splice(u, 0, k); for (H = u + 1; H < j.length; H++) j[H].index++ }
+                    var I = true;
+                    if (typeof k == "number" && k < j.length) {
+                        J = k;
+                        if (g =
+                            j[k]) I = g._fireEvent(q, u, C);
+                        if (!g || I !== false) I = h._fireEvent(q, u, C, g)
+                    }
+                    o(x[q], function() { I = this.call(f, k, u);
+                        this.cached && x[q].splice(H, 1); if (I === false) return false;
+                        H++ });
+                    return I
+                }
+            }
+        };
+        typeof a == "string" ? flashembed.domReady(function() { var g = s(a); if (g) { a = g;
+                p() } else throw "Flowplayer cannot access element: " + a; }) : p()
+    }
+
+    function b(a) { this.length = a.length;
+        this.each = function(d) { o(a, d) };
+        this.size = function() { return a.length } }
+    var e = function(a, d, c) {
+            var p = this,
+                f = {},
+                m = {};
+            p.index = d;
+            if (typeof a == "string") a = { url: a };
+            w(this,
+                a, true);
+            o("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","), function() { var h = "on" + this; if (h.indexOf("*") != -1) { h = h.substring(0, h.length - 1); var j = "onBefore" + h.substring(2);
+                    p[j] = function(r) { i(m, j, r); return p } }
+                p[h] = function(r) { i(m, h, r); return p }; if (d == -1) { if (p[j]) c[j] = p[j]; if (p[h]) c[h] = p[h] } });
+            w(this, {
+                onCuepoint: function(h, j) {
+                    if (arguments.length == 1) { f.embedded = [null, h]; return p }
+                    if (typeof h == "number") h = [h];
+                    var r = v();
+                    f[r] = [h, j];
+                    c.isLoaded() &&
+                        c._api().fp_addCuepoints(h, d, r);
+                    return p
+                },
+                update: function(h) { w(p, h);
+                    c.isLoaded() && c._api().fp_updateClip(h, d); var j = c.getConfig();
+                    w(d == -1 ? j.clip : j.playlist[d], h, true) },
+                _fireEvent: function(h, j, r, x) {
+                    if (h == "onLoad") { o(f, function(F, J) { J[0] && c._api().fp_addCuepoints(J[0], d, F) }); return false }
+                    x = x || p;
+                    if (h == "onCuepoint") { var A = f[j]; if (A) return A[1].call(c, x, r) }
+                    if (j && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(h) != -1) {
+                        w(x, j);
+                        if (j.metaData)
+                            if (x.duration) x.fullDuration = j.metaData.duration;
+                            else x.duration =
+                                j.metaData.duration
+                    }
+                    var G = true;
+                    o(m[h], function() { G = this.call(c, x, j, r) });
+                    return G
+                }
+            });
+            if (a.onCuepoint) { var D = a.onCuepoint;
+                p.onCuepoint.apply(p, typeof D == "function" ? [D] : D);
+                delete a.onCuepoint }
+            o(a, function(h, j) { if (typeof j == "function") { i(m, h, j);
+                    delete a[h] } });
+            if (d == -1) c.onCuepoint = this.onCuepoint
+        },
+        l = function(a, d, c, p) {
+            var f = {},
+                m = this,
+                D = false;
+            p && w(f, p);
+            o(d, function(h, j) { if (typeof j == "function") { f[h] = j;
+                    delete d[h] } });
+            w(this, {
+                animate: function(h, j, r) {
+                    if (!h) return m;
+                    if (typeof j == "function") { r = j;
+                        j = 500 }
+                    if (typeof h ==
+                        "string") { var x = h;
+                        h = {};
+                        h[x] = j;
+                        j = 500 }
+                    if (r) { var A = v();
+                        f[A] = r }
+                    if (j === undefined) j = 500;
+                    d = c._api().fp_animate(a, h, j, A);
+                    return m
+                },
+                css: function(h, j) { if (j !== undefined) { var r = {};
+                        r[h] = j;
+                        h = r }
+                    d = c._api().fp_css(a, h);
+                    w(m, d); return m },
+                show: function() { this.display = "block";
+                    c._api().fp_showPlugin(a); return m },
+                hide: function() { this.display = "none";
+                    c._api().fp_hidePlugin(a); return m },
+                toggle: function() { this.display = c._api().fp_togglePlugin(a); return m },
+                fadeTo: function(h, j, r) {
+                    if (typeof j == "function") { r = j;
+                        j = 500 }
+                    if (r) {
+                        var x =
+                            v();
+                        f[x] = r
+                    }
+                    this.display = c._api().fp_fadeTo(a, h, j, x);
+                    this.opacity = h;
+                    return m
+                },
+                fadeIn: function(h, j) { return m.fadeTo(1, h, j) },
+                fadeOut: function(h, j) { return m.fadeTo(0, h, j) },
+                getName: function() { return a },
+                getPlayer: function() { return c },
+                _fireEvent: function(h, j) {
+                    if (h == "onUpdate") {
+                        var r = c._api().fp_getPlugin(a);
+                        if (!r) return;
+                        w(m, r);
+                        delete m.methods;
+                        if (!D) {
+                            o(r.methods, function() { var x = "" + this;
+                                m[x] = function() { var A = [].slice.call(arguments);
+                                    A = c._api().fp_invoke(a, x, A); return A === "undefined" || A === undefined ? m : A } });
+                            D = true
+                        }
+                    }
+                    if (r = f[h]) { r.apply(m, j);
+                        h.substring(0, 1) == "_" && delete f[h] }
+                }
+            })
+        },
+        t = [];
+    window.flowplayer = window.$f = function() {
+        var a = null,
+            d = arguments[0];
+        if (!arguments.length) { o(t, function() { if (this.isLoaded()) { a = this; return false } }); return a || t[0] }
+        if (arguments.length == 1)
+            if (typeof d == "number") return t[d];
+            else { if (d == "*") return new b(t);
+                o(t, function() { if (this.id() == d.id || this.id() == d || this.getParent() == d) { a = this; return false } }); return a }
+        if (arguments.length > 1) {
+            var c = arguments[1],
+                p = arguments.length == 3 ? arguments[2] : {};
+            if (typeof d == "string")
+                if (d.indexOf(".") != -1) { var f = [];
+                    o(z(d), function() { f.push(new n(this, y(c), y(p))) }); return new b(f) } else { var m = s(d); return new n(m !== null ? m : d, c, p) }
+            else if (d) return new n(d, c, p)
+        }
+        return null
+    };
+    w(window.$f, { fireEvent: function() { var a = [].slice.call(arguments),
+                d = $f(a[0]); return d ? d._fireEvent(a.slice(1)) : null }, addPlugin: function(a, d) { n.prototype[a] = d; return $f }, each: o, extend: w });
+    if (typeof jQuery == "function") jQuery.prototype.flowplayer = function(a, d) {
+        if (!arguments.length || typeof arguments[0] ==
+            "number") { var c = [];
+            this.each(function() { var p = $f(this);
+                p && c.push(p) }); return arguments.length ? c[arguments[0]] : new b(c) }
+        return this.each(function() { $f(this, y(a), d ? y(d) : {}) })
+    }
+})();
+(function() {
+    function B() { if (n.done) return false; var b = document; if (b && b.getElementsByTagName && b.getElementById && b.body) { clearInterval(n.timer);
+            n.timer = null; for (b = 0; b < n.ready.length; b++) n.ready[b].call();
+            n.ready = null;
+            n.done = true } }
+
+    function y(b, e) { if (e)
+            for (key in e)
+                if (e.hasOwnProperty(key)) b[key] = e[key];
+        return b }
+
+    function o(b) {
+        switch (s(b)) {
+            case "string":
+                b = b.replace(new RegExp('(["\\\\])', "g"), "\\$1");
+                b = b.replace(/^\s?(\d+)%/, "$1pct");
+                return '"' + b + '"';
+            case "array":
+                return "[" + w(b, function(t) { return o(t) }).join(",") +
+                    "]";
+            case "function":
+                return '"function()"';
+            case "object":
+                var e = [];
+                for (var l in b) b.hasOwnProperty(l) && e.push('"' + l + '":' + o(b[l]));
+                return "{" + e.join(",") + "}"
+        }
+        return String(b).replace(/\s/g, " ").replace(/\'/g, '"')
+    }
+
+    function s(b) { if (b === null || b === undefined) return false; var e = typeof b; return e == "object" && b.push ? "array" : e }
+
+    function w(b, e) { var l = []; for (var t in b)
+            if (b.hasOwnProperty(t)) l[t] = e(b[t]);
+        return l }
+
+    function z(b, e) {
+        var l = y({}, b),
+            t = document.all;
+        b = '<object width="' + l.width + '" height="' + l.height + '"';
+        if (t &&
+            !l.id) l.id = "_" + ("" + Math.random()).substring(9);
+        if (l.id) b += ' id="' + l.id + '"';
+        if (l.cachebusting) l.src += (l.src.indexOf("?") != -1 ? "&" : "?") + Math.random();
+        b += l.w3c || !t ? ' data="' + l.src + '" type="application/x-shockwave-flash"' : ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
+        b += ">";
+        if (l.w3c || t) b += '<param name="movie" value="' + l.src + '" />';
+        l.width = l.height = l.id = l.w3c = l.src = null;
+        for (var a in l)
+            if (l[a] !== null) b += '<param name="' + a + '" value="' + l[a] + '" />';
+        a = "";
+        if (e) {
+            for (var d in e)
+                if (e[d] !== null) a += d + "=" +
+                    (typeof e[d] == "object" ? o(e[d]) : e[d]) + "&";
+            a = a.substring(0, a.length - 1);
+            b += '<param name="flashvars" value=\'' + a + "' />"
+        }
+        b += "</object>";
+        return b
+    }
+
+    function E(b, e, l) {
+        var t = flashembed.getVersion();
+        y(this, { getContainer: function() { return b }, getConf: function() { return e }, getVersion: function() { return t }, getFlashvars: function() { return l }, getApi: function() { return b.firstChild }, getHTML: function() { return z(e, l) } });
+        var a = e.version,
+            d = e.expressInstall,
+            c = !a || flashembed.isSupported(a);
+        if (c) {
+            e.onFail = e.version = e.expressInstall =
+                null;
+            b.innerHTML = z(e, l)
+        } else if (a && d && flashembed.isSupported([6, 65])) { y(e, { src: d });
+            l = { MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title };
+            b.innerHTML = z(e, l) } else if (b.innerHTML.replace(/\s/g, "") === "") {
+            b.innerHTML = "<h2>Flash version " + a + " or greater is required</h2><h3>" + (t[0] > 0 ? "Your version is " + t : "You have no flash plugin installed") + "</h3>" + (b.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");
+            if (b.tagName == "A") b.onclick = function() { location.href = "http://www.adobe.com/go/getflashplayer" }
+        }
+        if (!c && e.onFail) { a = e.onFail.call(this); if (typeof a == "string") b.innerHTML = a }
+        if (document.all) window[e.id] = document.getElementById(e.id)
+    }
+    var i = typeof jQuery == "function",
+        v = { width: "100%", height: "100%", allowfullscreen: true, allowscriptaccess: "always", quality: "high", version: null, onFail: null, expressInstall: null, w3c: false, cachebusting: false };
+    if (i) {
+        jQuery.tools = jQuery.tools || {};
+        jQuery.tools.flashembed = {
+            version: "1.0.4",
+            conf: v
+        }
+    }
+    var n = i ? jQuery : function(b) { if (n.done) return b(); if (n.timer) n.ready.push(b);
+        else { n.ready = [b];
+            n.timer = setInterval(B, 13) } };
+    window.attachEvent && window.attachEvent("onbeforeunload", function() { __flash_unloadHandler = function() {};
+        __flash_savedUnloadHandler = function() {} });
+    window.flashembed = function(b, e, l) { if (typeof b == "string") { var t = document.getElementById(b); if (t) b = t;
+            else { n(function() { flashembed(b, e, l) }); return } } if (b) { if (typeof e == "string") e = { src: e };
+            t = y({}, v);
+            y(t, e); return new E(b, t, l) } };
+    y(window.flashembed, {
+        getVersion: function() {
+            var b = [0, 0];
+            if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { var e = navigator.plugins["Shockwave Flash"].description; if (typeof e != "undefined") { e = e.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+                    b = parseInt(e.replace(/^(.*)\..*$/, "$1"), 10);
+                    e = /r/.test(e) ? parseInt(e.replace(/^.*r(.*)$/, "$1"), 10) : 0;
+                    b = [b, e] } } else if (window.ActiveXObject) {
+                try { e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7") } catch (l) {
+                    try {
+                        e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+                        b = [6, 0];
+                        e.AllowScriptAccess = "always"
+                    } catch (t) { if (b[0] == 6) return b }
+                    try { e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash") } catch (a) {}
+                }
+                if (typeof e == "object") { e = e.GetVariable("$version"); if (typeof e != "undefined") { e = e.replace(/^\S+\s+(.*)$/, "$1").split(",");
+                        b = [parseInt(e[0], 10), parseInt(e[2], 10)] } }
+            }
+            return b
+        },
+        isSupported: function(b) { var e = flashembed.getVersion(); return e[0] > b[0] || e[0] == b[0] && e[1] >= b[1] },
+        domReady: n,
+        asString: o,
+        getHTML: z
+    });
+    if (i) jQuery.fn.flashembed = function(b, e) {
+        var l = null;
+        this.each(function() {
+            l =
+                flashembed(this, b, e)
+        });
+        return b.api === false ? this : l
+    }
+})();
+(function() {
+    function B() { if (!i) { i = true; if (v) { for (var n = 0; n < v.length; n++) v[n].call(window, []);
+                v = [] } } }
+
+    function y(n) { var b = window.onload;
+        window.onload = typeof window.onload != "function" ? n : function() { b && b();
+            n() } }
+
+    function o() {
+        if (!E) {
+            E = true;
+            document.addEventListener && !z.opera && document.addEventListener("DOMContentLoaded", B, false);
+            z.msie && window == top && function() { if (!i) { try { document.documentElement.doScroll("left") } catch (b) { setTimeout(arguments.callee, 0); return }
+                    B() } }();
+            z.opera && document.addEventListener("DOMContentLoaded",
+                function() { if (!i) { for (var b = 0; b < document.styleSheets.length; b++)
+                            if (document.styleSheets[b].disabled) { setTimeout(arguments.callee, 0); return }
+                        B() } }, false);
+            if (z.safari) {
+                var n;
+                (function() {
+                    if (!i)
+                        if (document.readyState != "loaded" && document.readyState != "complete") setTimeout(arguments.callee, 0);
+                        else {
+                            if (n === undefined) { for (var b = document.getElementsByTagName("link"), e = 0; e < b.length; e++) b[e].getAttribute("rel") == "stylesheet" && n++;
+                                b = document.getElementsByTagName("style");
+                                n += b.length }
+                            document.styleSheets.length !=
+                                n ? setTimeout(arguments.callee, 0) : B()
+                        }
+                })()
+            }
+            y(B)
+        }
+    }
+    var s = window.DomReady = {},
+        w = navigator.userAgent.toLowerCase(),
+        z = { version: (w.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], safari: /webkit/.test(w), opera: /opera/.test(w), msie: /msie/.test(w) && !/opera/.test(w), mozilla: /mozilla/.test(w) && !/(compatible|webkit)/.test(w) },
+        E = false,
+        i = false,
+        v = [];
+    s.ready = function(n) { o();
+        i ? n.call(window, []) : v.push(function() { return n.call(window, []) }) };
+    o()
+})();
+(function(B, y) {
+    function o(i, v) { for (var n = [], b = 0; b < i.length; b++) n.push(i[b]); for (b = 0; b < n.length; b++) v(n[b]) }
+
+    function s() { o(y.getElementsByTagName("video"), function(i) { var v = true; if (i.canPlayType)
+                if (i.src && i.canPlayType(w(i.src))) v = false;
+                else o(i.getElementsByTagName("source"), function(n) { if (i.canPlayType(w(n.src, n.type))) v = false });
+            v && s.createVideoFallback(i) }) }
+
+    function w(i, v) {
+        if (v) return v;
+        return {
+            avi: s.H264_FORMAT,
+            mp4: s.H264_FORMAT,
+            mkv: s.H264_FORMAT,
+            h264: s.H264_FORMAT,
+            "264": s.H264_FORMAT,
+            avc: s.H264_FORMAT,
+            m4v: s.H264_FORMAT,
+            "3gp": s.H264_FORMAT,
+            "3gpp": s.H264_FORMAT,
+            "3g2": s.H264_FORMAT,
+            ogg: s.THEORA_FORMAT,
+            ogv: s.THEORA_FORMAT
+        }[i.split(".").slice(-1)[0]] || s.assumedFormat
+    }
+
+    function z(i, v) { i = i.getAttribute(v); return i == true || typeof i == "string" }
+    y.createElement("video").canPlayType || o(["abbr", "article", "aside", "audio", "canvas", "details", "figcaption", "figure", "footer", "header", "hgroup", "mark", "menu", "meter", "nav", "output", "progress", "section", "summary", "time", "video", "source"], function(i) { y.createElement(i) });
+    var E = "";
+    o(y.getElementsByTagName("script"), function(i) { i = i.src; if (i.substr(i.length - 17) == "html5media.min.js") E = i.split("/").slice(0, -1).join("/") + "/" });
+    s.flowplayerSwf = E + "flowplayer.swf";
+    s.flowplayerControlsSwf = E + "flowplayer.controls.swf";
+    s.H264_FORMAT = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"';
+    s.THEORA_FORMAT = 'video/ogg; codecs="theora, vorbis"';
+    s.assumedFormat = s.H264_FORMAT;
+    s.createVideoFallback = function(i) {
+        function v(c) { if (c.substr(0, 1) == "/") return n + c; return c }
+        var n = B.location.protocol + "//" +
+            B.location.host,
+            b = v(i.getAttribute("poster") || ""),
+            e = i.getAttribute("src");
+        e || o(i.getElementsByTagName("source"), function(c) { if (w(c.getAttribute("src"), c.getAttribute("type")).substr(0, 9) == "video/mp4") e = c.getAttribute("src") });
+        e = v(e || "");
+        var l = y.createElement("span");
+        l.id = i.id;
+        l.className = i.className;
+        l.title = i.title;
+        l.style.display = "block";
+        l.style.width = i.getAttribute("width") + "px";
+        l.style.height = i.getAttribute("height") + "px";
+        i.parentNode.replaceChild(l, i);
+        var t = (i.getAttribute("preload") || "").toLowerCase(),
+            a = null;
+        if (z(i, "controls")) a = { url: s.flowplayerControlsSwf, fullscreen: false, autoHide: "always" };
+        var d = [];
+        b && d.push({ url: b });
+        if (e) d.push({ url: e, autoPlay: z(i, "autoplay"), autoBuffering: z(i, "autobuffer") || z(i, "preload") && (t == "" || t == "auto"), onBeforeFinish: function() { return !z(i, "loop") } });
+        flowplayer(l, s.flowplayerSwf, { play: null, playlist: d, clip: { scaling: "fit", fadeInSpeed: 0, fadeOutSpeed: 0 }, plugins: { controls: a } })
+    };
+    DomReady.ready(s);
+    B.html5media = s
+})(this, document);