فهرست منبع

Merge branch 'dev-online' into 'Private'

# Conflicts:
#   src/pages/DetailPage/CrowdDetail.vue
#   src/pages/Homepage/Homepage.vue
#   src/pages/HomepageSearch/AgencyList.vue
#   src/pages/HomepageSearch/AgencyResidentList.vue
#   src/pages/HomepageSearch/CompetitionList.vue
#   src/pages/HomepageSearch/CrowdList.vue
#   src/pages/HomepageSearch/ExpertList.vue
#   src/pages/HomepageSearch/ResourceList.vue
#   src/pages/HomepageSearch/UserList.vue
#   src/pages/Square/Square2.0.vue
#   src/pages/Technology/Technology2.0.vue
#   src/pages/Technology/TechnologyMore.vue
郭超 4 سال پیش
والد
کامیت
17698acd17
55فایلهای تغییر یافته به همراه1226 افزوده شده و 377 حذف شده
  1. 4 4
      build/build.js
  2. 8 2
      build/utils.js
  3. 3 1
      build/webpack.dev.conf.js
  4. 96 0
      build/webpack.private.dev.conf.js
  5. 156 0
      build/webpack.private.prod.conf.js
  6. 11 11
      config/dev.env.js
  7. 1 0
      config/index.js
  8. 2 10
      package-lock.json
  9. 4 3
      package.json
  10. 13 3
      src/App.vue
  11. BIN
      src/assets/image/police.png
  12. BIN
      src/assets/img/mooctest.png
  13. 337 270
      src/components/Mine.vue
  14. 13 1
      src/components/commons/Footer2.0.vue
  15. 8 9
      src/components/commons/Header2.0.vue
  16. 114 0
      src/components/commons/HomeSliceOnline.vue
  17. 44 29
      src/components/task/Task.vue
  18. 19 12
      src/components/task/TaskCloud.vue
  19. 8 2
      src/config/index.js
  20. 3 1
      src/js/api.js
  21. 3 0
      src/js/index.js
  22. 9 0
      src/js/taskService.js
  23. 2 3
      src/main.js
  24. 1 0
      src/pages/DetailPage/CrowdDetail.vue
  25. 5 1
      src/pages/DetailPage/NewAgencyDetail.vue
  26. 1 1
      src/pages/Homepage/BrandCard.vue
  27. 10 0
      src/pages/Homepage/Homepage.vue
  28. 288 0
      src/pages/Homepage/HomepagePrivate.vue
  29. 1 1
      src/pages/Homepage/HotAgency.vue
  30. 1 1
      src/pages/Homepage/HotContest.vue
  31. 1 1
      src/pages/Homepage/HotCrowd.vue
  32. 1 1
      src/pages/Homepage/HotUser.vue
  33. 1 1
      src/pages/Homepage/ResourceAndTool.vue
  34. 1 1
      src/pages/Homepage/TestCard.vue
  35. 1 0
      src/pages/HomepageSearch/AgencyList.vue
  36. 1 0
      src/pages/HomepageSearch/AgencyResidentList.vue
  37. 1 0
      src/pages/HomepageSearch/CompetitionList.vue
  38. 1 0
      src/pages/HomepageSearch/CrowdList.vue
  39. 1 0
      src/pages/HomepageSearch/ExpertList.vue
  40. 1 0
      src/pages/HomepageSearch/ResourceList.vue
  41. 2 0
      src/pages/HomepageSearch/UserList.vue
  42. 1 1
      src/pages/Square/PopularProject.vue
  43. 2 1
      src/pages/Square/PopularProjectAndTaskList.vue
  44. 1 1
      src/pages/Square/PopularTask.vue
  45. 1 0
      src/pages/Square/Square2.0.vue
  46. 1 1
      src/pages/Technology/HotActicle.vue
  47. 1 0
      src/pages/Technology/Technology2.0.vue
  48. 1 0
      src/pages/Technology/TechnologyMore.vue
  49. 4 1
      src/router/index.js
  50. 5 3
      src/style/main.scss
  51. 16 0
      src/style/online.scss
  52. 2 0
      src/style/private.scss
  53. 8 0
      tool4deploy-test/conf.d/nginx.conf
  54. 5 0
      tool4deploy/conf.d/nginx.conf
  55. 1 0
      tool4deploy/slider-type.js

+ 4 - 4
build/build.js

@@ -1,7 +1,7 @@
 'use strict'
 require('./check-versions')()
-
-process.env.NODE_ENV = 'production'
+console.log(process.env.NODE_ENV);
+// process.env.NODE_ENV = 'production'
 
 const ora = require('ora')
 const rm = require('rimraf')
@@ -9,8 +9,8 @@ const path = require('path')
 const chalk = require('chalk')
 const webpack = require('webpack')
 const config = require('../config')
-const webpackConfig = require('./webpack.prod.conf')
-
+const webpackConfig = process.env.NODE_ENV === 'private' ? require('./webpack.private.prod.conf') : require('./webpack.prod.conf')
+// console.log(webpackConfig);
 // const spinner = ora('building for production...')
 const spinner = ora('building for' + process.env.NODE_ENV + 'of' + process.env.env_config + 'mode...')
 spinner.start()

+ 8 - 2
build/utils.js

@@ -3,6 +3,8 @@ const path = require('path')
 const config = require('../config')
 const ExtractTextPlugin = require('extract-text-webpack-plugin')
 const packageConfig = require('../package.json')
+// console.log(process.env.NODE_ENV)
+let themeConfig = process.env.NODE_ENV === 'private' ? `@import "~@/style/private.scss";` : `@import "~@/style/online.scss";`;
 
 exports.assetsPath = function (_path) {
   const assetsSubDirectory = process.env.NODE_ENV === 'production'
@@ -60,8 +62,12 @@ exports.cssLoaders = function (options) {
     css: generateLoaders(),
     postcss: generateLoaders(),
     less: generateLoaders('less'),
-    sass: generateLoaders('sass', { indentedSyntax: true }),
-    scss: generateLoaders('sass'),
+    sass: generateLoaders('sass', {
+      indentedSyntax: true ,
+      data: themeConfig}),
+    scss: generateLoaders('sass', {
+      data: themeConfig,
+    }),
     stylus: generateLoaders('stylus'),
     styl: generateLoaders('stylus')
   }

+ 3 - 1
build/webpack.dev.conf.js

@@ -7,6 +7,7 @@ const path = require('path')
 const baseWebpackConfig = require('./webpack.base.conf')
 const CopyWebpackPlugin = require('copy-webpack-plugin')
 const HtmlWebpackPlugin = require('html-webpack-plugin')
+const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
 const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
 const portfinder = require('portfinder')
 
@@ -65,7 +66,8 @@ const devWebpackConfig = merge(baseWebpackConfig, {
         to: config.dev.assetsSubDirectory,
         ignore: ['.*']
       }
-    ])
+    ]),
+    new BundleAnalyzerPlugin()
   ]
 })
 

+ 96 - 0
build/webpack.private.dev.conf.js

@@ -0,0 +1,96 @@
+'use strict'
+const utils = require('./utils')
+const webpack = require('webpack')
+const config = require('../config')
+const merge = require('webpack-merge')
+const path = require('path')
+const baseWebpackConfig = require('./webpack.base.conf')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
+const portfinder = require('portfinder')
+// console.log(require('../config/private.env'));
+const HOST = process.env.HOST
+const PORT = process.env.PORT && Number(process.env.PORT)
+// console.log(process.env.NODE_ENV);
+const devWebpackConfig = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
+  },
+  // cheap-module-eval-source-map is faster for development
+  devtool: config.dev.devtool,
+
+  // these devServer options should be customized in /config/index.js
+  devServer: {
+    clientLogLevel: 'warning',
+    historyApiFallback: {
+      rewrites: [
+        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
+      ],
+    },
+    hot: true,
+    contentBase: false, // since we use CopyWebpackPlugin.
+    compress: true,
+    host: HOST || config.dev.host,
+    port: PORT || config.dev.port,
+    open: config.dev.autoOpenBrowser,
+    overlay: config.dev.errorOverlay
+      ? { warnings: false, errors: true }
+      : false,
+    publicPath: config.dev.assetsPublicPath,
+    proxy: config.dev.proxyTable,
+    quiet: true, // necessary for FriendlyErrorsPlugin
+    watchOptions: {
+      poll: config.dev.poll,
+    },
+    disableHostCheck: true, //  开发环境使用true方便开发,生产环境使用false
+  },
+  plugins: [
+    new webpack.DefinePlugin({
+      'process.env': require('../config/private.env')
+    }),
+    new webpack.HotModuleReplacementPlugin(),
+    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
+    new webpack.NoEmitOnErrorsPlugin(),
+    // https://github.com/ampedandwired/html-webpack-plugin
+    new HtmlWebpackPlugin({
+      filename: 'index.html',
+      template: 'index.html',
+      inject: true
+    }),
+    // copy custom static assets
+    new CopyWebpackPlugin([
+      {
+        from: path.resolve(__dirname, '../static'),
+        to: config.dev.assetsSubDirectory,
+        ignore: ['.*']
+      }
+    ])
+  ]
+})
+
+module.exports = new Promise((resolve, reject) => {
+  portfinder.basePort = process.env.PORT || config.dev.port
+  portfinder.getPort((err, port) => {
+    if (err) {
+      reject(err)
+    } else {
+      // publish the new Port, necessary for e2e tests
+      process.env.PORT = port
+      // add port to devServer config
+      devWebpackConfig.devServer.port = port
+
+      // Add FriendlyErrorsPlugin
+      devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
+        compilationSuccessInfo: {
+          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
+        },
+        onErrors: config.dev.notifyOnErrors
+        ? utils.createNotifierCallback()
+        : undefined
+      }))
+
+      resolve(devWebpackConfig)
+    }
+  })
+})

+ 156 - 0
build/webpack.private.prod.conf.js

@@ -0,0 +1,156 @@
+'use strict'
+const path = require('path')
+const utils = require('./utils')
+const webpack = require('webpack')
+const config = require('../config')
+const merge = require('webpack-merge')
+const baseWebpackConfig = require('./webpack.base.conf')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
+const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
+
+// const env = require('../config/prod.env')
+const env = config.build[process.env.env_config + 'Env']
+const webpackConfig = merge(baseWebpackConfig, {
+  module: {
+    rules: utils.styleLoaders({
+      sourceMap: config.build.productionSourceMap,
+      extract: true,
+      usePostCSS: true
+    })
+  },
+  devtool: config.build.productionSourceMap ? config.build.devtool : false,
+  output: {
+    path: config.build.assetsRoot,
+    filename: utils.assetsPath('js/[name].[chunkhash].js'),
+    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
+  },
+  plugins: [
+    // http://vuejs.github.io/vue-loader/en/workflow/production.html
+    new webpack.DefinePlugin({
+      'process.env': env
+    }),
+    new UglifyJsPlugin({
+      // uglifyOptions: {
+      //   compress: {
+      //     warnings: false
+      //   }
+      // },
+      // sourceMap: config.build.productionSourceMap,
+      // parallel: true
+      parallel: 4,
+      uglifyOptions: {
+        output: {
+          comments: false,
+          beautify: false,
+        },
+        compress: {
+          warnings: false
+        },
+      },
+      cache: true,
+    }),
+    // extract css into its own file
+    new ExtractTextPlugin({
+      filename: utils.assetsPath('css/[name].[contenthash].css'),
+      // Setting the following option to `false` will not extract CSS from codesplit chunks.
+      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
+      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
+      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
+      allChunks: true,
+    }),
+    // Compress extracted CSS. We are using this plugin so that possible
+    // duplicated CSS from different components can be deduped.
+    new OptimizeCSSPlugin({
+      cssProcessorOptions: config.build.productionSourceMap
+        ? { safe: true, map: { inline: false } }
+        : { safe: true }
+    }),
+    // generate dist index.html with correct asset hash for caching.
+    // you can customize output by editing /index.html
+    // see https://github.com/ampedandwired/html-webpack-plugin
+    new HtmlWebpackPlugin({
+      filename: config.build.index,
+      template: 'index.html',
+      inject: true,
+      minify: {
+        removeComments: true,
+        collapseWhitespace: true,
+        removeAttributeQuotes: true
+        // more options:
+        // https://github.com/kangax/html-minifier#options-quick-reference
+      },
+      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
+      chunksSortMode: 'dependency'
+    }),
+    // keep module.id stable when vendor modules does not change
+    new webpack.HashedModuleIdsPlugin(),
+    // enable scope hoisting
+    new webpack.optimize.ModuleConcatenationPlugin(),
+    // split vendor js into its own file
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'vendor',
+      minChunks (module) {
+        // any required modules inside node_modules are extracted to vendor
+        return (
+          module.resource &&
+          /\.js$/.test(module.resource) &&
+          module.resource.indexOf(
+            path.join(__dirname, '../node_modules')
+          ) === 0
+        )
+      }
+    }),
+    // extract webpack runtime and module manifest to its own file in order to
+    // prevent vendor hash from being updated whenever app bundle is updated
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'manifest',
+      minChunks: Infinity
+    }),
+    // This instance extracts shared chunks from code splitted chunks and bundles them
+    // in a separate chunk, similar to the vendor chunk
+    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
+    new webpack.optimize.CommonsChunkPlugin({
+      name: 'app',
+      async: 'vendor-async',
+      children: true,
+      minChunks: 3
+    }),
+
+    // copy custom static assets
+    new CopyWebpackPlugin([
+      {
+        from: path.resolve(__dirname, '../static'),
+        to: config.build.assetsSubDirectory,
+        ignore: ['.*']
+      }
+    ])
+  ]
+})
+
+if (config.build.productionGzip) {
+  const CompressionWebpackPlugin = require('compression-webpack-plugin')
+
+  webpackConfig.plugins.push(
+    new CompressionWebpackPlugin({
+      asset: '[path].gz[query]',
+      algorithm: 'gzip',
+      test: new RegExp(
+        '\\.(' +
+        config.build.productionGzipExtensions.join('|') +
+        ')$'
+      ),
+      threshold: 10240,
+      minRatio: 0.8
+    })
+  )
+}
+
+if (config.build.bundleAnalyzerReport) {
+  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
+  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
+}
+
+module.exports = webpackConfig

+ 11 - 11
config/dev.env.js

@@ -3,18 +3,18 @@
 const merge = require('webpack-merge')
 const prodEnv = require('./prod.env')
 
-// module.exports = {
-//   NODE_ENV: '"development"',
-//   ENV_CONFIG: "'dev'",
-//   API_ROOT: '"//crowd.dev.mooctest.net"',
-//   LOGIN_URL: '"http://user.mooctest.net:8081/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome"',
-//   REGISTER_URL: '"http://user.mooctest.net:8081/page/register"'
-// }
-
 module.exports = {
   NODE_ENV: '"development"',
   ENV_CONFIG: "'dev'",
-  API_ROOT: '"//127.0.0.1"',
-  LOGIN_URL: '"http://127.0.0.1:8081/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome"',
-  REGISTER_URL: '"http://127.0.0.1:8081/page/register"'
+  API_ROOT: '"//crowd.dev.mooctest.net"',
+  LOGIN_URL: '"http://user.mooctest.net:8081/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome"',
+  REGISTER_URL: '"http://user.mooctest.net:8081/page/register"'
 }
+
+// module.exports = {
+//   NODE_ENV: '"development"',
+//   ENV_CONFIG: "'dev'",
+//   API_ROOT: '"//127.0.0.1"',
+//   LOGIN_URL: '"http://127.0.0.1:8081/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome"',
+//   REGISTER_URL: '"http://127.0.0.1:8081/page/register"'
+// }

+ 1 - 0
config/index.js

@@ -46,6 +46,7 @@ module.exports = {
   build: {
     devEnv: require('./dev.env'),
     testEnv: require('./test.env'),
+    privateEnv: require('./private.env'),
     prodEnv: require('./prod.env'),
     // Template for index.html
     index: path.resolve(__dirname, '../dist/index.html'),

+ 2 - 10
package-lock.json

@@ -4829,7 +4829,7 @@
         },
         "json-schema-traverse": {
           "version": "0.4.1",
-          "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz?cache=0&sync_timestamp=1608000211395&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-schema-traverse%2Fdownload%2Fjson-schema-traverse-0.4.1.tgz",
+          "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz",
           "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=",
           "dev": true
         },
@@ -13443,7 +13443,7 @@
         },
         "json-schema-traverse": {
           "version": "0.4.1",
-          "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz?cache=0&sync_timestamp=1608000211395&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-schema-traverse%2Fdownload%2Fjson-schema-traverse-0.4.1.tgz",
+          "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz",
           "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=",
           "dev": true
         },
@@ -13525,14 +13525,6 @@
       "resolved": "https://registry.npm.taobao.org/v-dropdown/download/v-dropdown-2.1.1.tgz",
       "integrity": "sha1-XhpJ1hwpE6ar3aPMtGLiZH+dae0="
     },
-    "v-region": {
-      "version": "2.2.2",
-      "resolved": "https://registry.npm.taobao.org/v-region/download/v-region-2.2.2.tgz",
-      "integrity": "sha1-WrswXysE8P/ZoCW4TACCHaJzCKU=",
-      "requires": {
-        "v-dropdown": "2.1.1"
-      }
-    },
     "validate-npm-package-license": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",

+ 4 - 3
package.json

@@ -5,12 +5,14 @@
   "author": "yuinii1215 <qi1215e_mail@163.com>",
   "private": true,
   "scripts": {
-    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
+    "dev": "NODE_ENV=development webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
     "start": "npm run dev",
+    "private": "NODE_ENV=private webpack-dev-server --inline --progress --config build/webpack.private.dev.conf.js",
     "lint": "eslint --ext .js,.vue src",
     "build--dev": "NODE_ENV=production env_config=dev node build/build.js",
     "build--test": "NODE_ENV=production env_config=test node build/build.js",
-    "build--prod": "NODE_ENV=production env_config=prod node build/build.js"
+    "build--prod": "NODE_ENV=production env_config=prod node build/build.js",
+    "build--private": "NODE_ENV=private env_config=private node build/build.js"
   },
   "dependencies": {
     "axios": "^0.21.1",
@@ -21,7 +23,6 @@
     "mockjs": "^1.1.0",
     "moment": "^2.29.1",
     "querystring": "^0.2.0",
-    "v-region": "^2.2.2",
     "vue": "^2.6.12",
     "vue-router": "^3.4.9",
     "vue-waterfall": "^1.0.6",

+ 13 - 3
src/App.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="body-content">
-    <home-slice v-if="showSlice"/>
+    <home-slice v-if="showSlice && this.$env === 'private'"/>
+    <home-slice-online v-else/>
     <header-container/>
     <div class="container-wrapper">
       <slot>
@@ -18,12 +19,14 @@ import Http from '@/js/http.js'
 import HeaderContainer from '@/components/commons/Header2.0'
 import FooterContainer from '@/components/commons/Footer2.0'
 import HomeSlice from '@/components/commons/HomeSlice'
+import HomeSliceOnline from '@/components/commons/HomeSliceOnline'
 import {getCurrentUser, storageGet, storageSave} from '@/js/index'
 import {setConfig} from '../src/config/index'
+import {slice_type} from "../tool4deploy/slider-type";
 
 export default {
   name: 'App',
-  components: {HeaderContainer, FooterContainer, HomeSlice},
+  components: {HeaderContainer, FooterContainer, HomeSlice ,HomeSliceOnline},
   data(){
     return {
       // showSlice:false
@@ -80,7 +83,8 @@ export default {
 }
 </script>
 
-<style>
+<style lang="scss">
+
   .body-content{
     width:100%;
     min-width: 1300px;
@@ -95,4 +99,10 @@ export default {
     margin: 0 auto;
     padding-bottom: 30px;
   }
+  .home-slice {
+    width: 100%;
+    height: 170px;
+    background-image: url("./assets/img/homeSlice.png");
+    background-size: 100% 100%
+  }
 </style>

BIN
src/assets/image/police.png


BIN
src/assets/img/mooctest.png


+ 337 - 270
src/components/Mine.vue

@@ -4,26 +4,26 @@
     <div class="project-statistics">
       <el-card shadow="hover" v-if="showAcceptData" class="project-statistics-card">
         <div class="project-statistics-card-title">未完成任务数</div>
-        <div class="project-statistics-card-number">{{statisticData.unfinishedTaskCount || 0}}</div>
+        <div class="project-statistics-card-number">{{ statisticData.unfinishedTaskCount || 0 }}</div>
       </el-card>
       <el-card shadow="hover" v-if="showAcceptData" class="project-statistics-card">
         <div class="project-statistics-card-title">已完成任务数</div>
-        <div class="project-statistics-card-number">{{statisticData.finishedTaskCount || 0}}</div>
+        <div class="project-statistics-card-number">{{ statisticData.finishedTaskCount || 0 }}</div>
       </el-card>
       <el-card shadow="hover" v-if="showCreateData" class="project-statistics-card">
         <div class="project-statistics-card-title">我的项目数</div>
-        <div class="project-statistics-card-number">{{statisticData.myProjectCount || 0}}</div>
+        <div class="project-statistics-card-number">{{ statisticData.myProjectCount || 0 }}</div>
       </el-card>
       <el-card shadow="hover" v-if="showCreateData" class="project-statistics-card">
         <div class="project-statistics-card-title">处理中项目数</div>
-        <div class="project-statistics-card-number">{{statisticData.handlingProjectCount || 0}}</div>
+        <div class="project-statistics-card-number">{{ statisticData.handlingProjectCount || 0 }}</div>
       </el-card>
       <el-card shadow="hover" v-if="showCreateData" class="project-statistics-card">
         <div class="project-statistics-card-title">可接收项目数</div>
-        <div class="project-statistics-card-number">{{statisticData.acceptableProjectCount || 0}}</div>
+        <div class="project-statistics-card-number">{{ statisticData.acceptableProjectCount || 0 }}</div>
       </el-card>
     </div>
-    <div class="mine-body" style="text-align: center;">
+    <div class="mine-body" style="text-align: center;position: relative">
       <el-tabs value="myProject" @tab-click="handleTabClick" v-loading="loading" style="width: 90%;margin-left: 5%">
         <el-tab-pane name="unFinishedTask">
           <span slot="label">
@@ -59,8 +59,6 @@
           <task-item v-if="finishedTaskList != null || finishedTaskList.length > 0"
                      v-for="(item,index2) in finishedTaskList" :key="index2" :task="item"/>
         </el-tab-pane>
-
-
         <el-tab-pane name="myProject">
 
           <span slot="label">
@@ -100,7 +98,7 @@
           </el-row>
           <span v-if="handlingProjects == null || handlingProjects.length == 0"> 暂无项目 </span>
           <project-item v-if="handlingProjects != null || handlingProjects.length > 0"
-                        v-for="(item,index4) in handlingProjects" :key="index4" :projectItem="item"/>
+                        v-for="(item,index4) in handlingProjects" :key="item.id" :projectItem="item"/>
         </el-tab-pane>
         <el-tab-pane name="acceptableProject">
           <span slot="label">
@@ -123,303 +121,372 @@
                         v-for="(item,index) in acceptableProjects" :key="index" :projectItem="item"/>
         </el-tab-pane>
       </el-tabs>
+
+      <el-button type="primary" size='mini' class="input-task-btn" @click="showImportTaskModal = true">导入任务</el-button>
+      <el-dialog
+        title="上传任务资源包"
+        :visible.sync="showImportTaskModal"
+        width="500"
+      >
+        <el-upload
+          drag
+          class="upload-demo"
+          action=""
+          :limit="1"
+          :before-upload="beforeFileUpload"
+          :http-request="uploadRequireDoc"
+          :file-list="taskJson"
+          multiple
+          >
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+          <div class="el-upload__tip" slot="tip">只能上传Json文件,且不超过100MB</div>
+        </el-upload>
+        <span slot="footer" class="dialog-footer">
+        <el-button @click="showImportTaskModal = false">取 消</el-button>
+        <el-button type="primary" @click="showImportTaskModal = false">确 定</el-button>
+        </span>
+      </el-dialog>
+
     </div>
   </div>
 </template>
 
 <script>
-  import TaskItem from '@/components/commons/TaskItem'
-  import ProjectItem from '@/components/commons/ProjectItem'
-  import Http from '@/js/http.js'
-  import Apis from '@/js/api.js'
-  import {notify} from '@/constants/index'
-  import {defaultValue, storageGet} from '@/js/index'
-  import echarts from 'echarts'
+import TaskItem from '@/components/commons/TaskItem'
+import ProjectItem from '@/components/commons/ProjectItem'
+import Http from '@/js/http.js'
+import Apis from '@/js/api.js'
+import {notify} from '@/constants/index'
+import {defaultValue, storageGet} from '@/js/index'
+import echarts from 'echarts'
 
-  export default {
-    name: 'Mine',
-    components: {TaskItem, ProjectItem},
-    watch: {
-      user(val) {
-        this.user = val
+export default {
+  name: 'Mine',
+  components: {TaskItem, ProjectItem},
+  watch: {
+    user(val) {
+      this.user = val
+    },
+    rolesPermissions(val) {
+      this.rolesPermissions = val
+    },
+    deep: true
+  },
+  data() {
+    return {
+      statisticData: {},
+      showImportTaskModal:false,
+      loading: false,
+      unFinishedTaskList: [],
+      finishedTaskList: [],
+      appliedProjectList: [],
+      myProjects: [],
+      handlingProjects: [],
+      acceptableProjects: [],
+      defaultValue: defaultValue,
+      myProjectNoticeCount: 0,
+      processProjectNoticeCount: 0,
+      acceptableProjectNoticeCount: 0,
+      rolesPermissions: {
+        isRegionManager: false,
+        isIndividualUser: false,
+        isEnterpriseUser: false,
+        isAgency: false,
+        isSystemAdministrator: false
       },
-      rolesPermissions(val) {
-        this.rolesPermissions = val
+      user: {
+        userVO: {
+          id: '',
+          name: '',
+          photo: '',
+          roleList: []
+        }
       },
-      deep: true
+      isLogin: false,
+      showCreateData: false,
+      showAcceptData: false,
+      taskJson:[]
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.init();
+      this.checkCreateProjectAuth();
+      this.checkAcceptTaskAuth()
+    })
+  },
+  methods: {
+    init() {
+      this.setUserInfo()
+      this.setRolesPermissions()
+      this.loadData()
+      // this.setEcharts()
+      // storageGet('user').then((res)=>{
+      //   this.user = res;
+      //   this.setRolesPermissions()
+      //   this.loadData()
+      // })
+
     },
-    data() {
-      return {
-        statisticData: {},
-        loading: false,
-        unFinishedTaskList: [],
-        finishedTaskList: [],
-        appliedProjectList: [],
-        myProjects: [],
-        handlingProjects: [],
-        acceptableProjects: [],
-        defaultValue: defaultValue,
-        myProjectNoticeCount: 0,
-        processProjectNoticeCount: 0,
-        acceptableProjectNoticeCount: 0,
-        rolesPermissions: {
-          isRegionManager: false,
-          isIndividualUser: false,
-          isEnterpriseUser: false,
-          isAgency: false,
-          isSystemAdministrator: false
-        },
-        user: {
-          userVO: {
-            id: '',
-            name: '',
-            photo: '',
-            roleList: []
-          }
-        },
-        isLogin: false,
-        showCreateData: false,
-        showAcceptData: false
+    loadData() {
+      this.showLoading()
+      Http.get(Apis.PAGE.MY_CROWD_TEST_PAGE.replace('{userId}', this.user.userVO.id)).then((res) => {
+        this.hideLoading()
+        this.statisticData = res;
+        this.processProjectNoticeCount = res.processProjectNoticeCount == null ? 0 : res.processProjectNoticeCount
+        this.myProjectNoticeCount = res.myProjectNoticeCount == null ? 0 : res.myProjectNoticeCount
+        this.acceptableProjectNoticeCount = res.acceptableProjectNoticeCount == null ? 0 : res.acceptableProjectNoticeCount
+        if (res.unfinishedTasks != null && res.unfinishedTasks.length > 0) {
+          this.unFinishedTaskList = res.unfinishedTasks
+        }
+        if (res.finishedTasks != null && res.finishedTasks.length > 0) {
+          this.finishedTaskList = res.finishedTasks
+        }
+        if (res.myProjects != null && res.myProjects.length > 0) {
+          this.myProjects = res.myProjects
+        }
+        if (res.handlingProjects != null && res.handlingProjects.length > 0) {
+          this.handlingProjects = res.handlingProjects
+        }
+        if (res.acceptableProjects != null && res.acceptableProjects.length > 0) {
+          this.acceptableProjects = res.acceptableProjects
+        }
+        // if (res.userVO != null && res.userVO.length > 0) {
+        //   this.user = res.userVO
+        // }
+      }).catch((error) => {
+        this.hideLoading()
+        notify('error', '加载失败,请稍后重试')
+      })
+    },
+
+    beforeFileUpload(file) {
+      const isJSON = file.type === 'application/json'
+      if (!isJSON) {
+        this.$message.error('上传文件只能是 JSON 格式!')
+      }
+      if( file.size > 100 * 1024 * 1024){
+        this.$message.error('上传文件不超过100MB !')
       }
+      return isJSON
     },
-    mounted() {
-      this.$nextTick(() => {
-        console.log('nexttick')
-        this.init();
-        this.checkCreateProjectAuth();
-        this.checkAcceptTaskAuth()
+    uploadRequireDoc(param) {
+      this.showLoading()
+      const formData = new FormData()
+      let config = {
+        //添加请求头
+        headers: {'Content-Type': 'multipart/form-data'},
+      }
+      formData.append('file', param.file)
+      Http.upload(Apis.FILE.TASK_IMPORT, formData, config).then((res) => {
+        this.hideLoading()
+        notify('success', '导入任务成功')
+        this.taskJson.push(res.data)
+        this.showImportTaskModal = false;
+        this.loadData()
+      }).catch((error) => {
+        this.hideLoading()
+        notify('error', '导入任务失败:' + error.data)
       })
     },
-    methods: {
-      init() {
-        this.setUserInfo()
-        this.setRolesPermissions()
-        this.loadData()
-        // this.setEcharts()
-        // storageGet('user').then((res)=>{
-        //   this.user = res;
-        //   this.setRolesPermissions()
-        //   this.loadData()
-        // })
 
-      },
-      loadData() {
-        this.showLoading()
-        Http.get(Apis.PAGE.MY_CROWD_TEST_PAGE.replace('{userId}', this.user.userVO.id)).then((res) => {
-          this.hideLoading()
-          this.statisticData = res;
-          this.processProjectNoticeCount = res.processProjectNoticeCount == null ? 0 : res.processProjectNoticeCount
-          this.myProjectNoticeCount = res.myProjectNoticeCount == null ? 0 : res.myProjectNoticeCount
-          this.acceptableProjectNoticeCount = res.acceptableProjectNoticeCount == null ? 0 : res.acceptableProjectNoticeCount
-          if (res.unfinishedTasks != null && res.unfinishedTasks.length > 0) {
-            this.unFinishedTaskList = res.unfinishedTasks
-          }
-          if (res.finishedTasks != null && res.finishedTasks.length > 0) {
-            this.finishedTaskList = res.finishedTasks
-          }
-          if (res.myProjects != null && res.myProjects.length > 0) {
-            this.myProjects = res.myProjects
-          }
-          if (res.handlingProjects != null && res.handlingProjects.length > 0) {
-            this.handlingProjects = res.handlingProjects
-          }
-          if (res.acceptableProjects != null && res.acceptableProjects.length > 0) {
-            this.acceptableProjects = res.acceptableProjects
-          }
-          // if (res.userVO != null && res.userVO.length > 0) {
-          //   this.user = res.userVO
-          // }
-        }).catch((error) => {
-          this.hideLoading()
-          notify('error', '加载失败,请稍后重试')
-        })
-      },
-      setUserInfo() {
-        if (storageGet('user') != null) {
-          this.isLogin = true;
-          this.user = storageGet('user')
-        }
-      },
-      setRolesPermissions() {
-        this.rolesPermissions = storageGet('rolesPermissions')
-      },
-      setEcharts() {
-        // 基于准备好的dom,初始化echarts实例
-        let myChart = echarts.init(document.getElementById('myChart'))
-        // 绘制图表
-        var option = {
-          title: {
-            text: ''
-          },
-          tooltip: {
-            //trigger: 'axis'
-          },
-          legend: {
-            data: ['接收项目数量', '完成项目数量', '接收任务数量', '完成任务数量', '发布项目数量']
+    setUserInfo() {
+      if (storageGet('user') != null) {
+        this.isLogin = true;
+        this.user = storageGet('user')
+      }
+    },
+    setRolesPermissions() {
+      this.rolesPermissions = storageGet('rolesPermissions')
+    },
+    setEcharts() {
+      // 基于准备好的dom,初始化echarts实例
+      let myChart = echarts.init(document.getElementById('myChart'))
+      // 绘制图表
+      var option = {
+        title: {
+          text: ''
+        },
+        tooltip: {
+          //trigger: 'axis'
+        },
+        legend: {
+          data: ['接收项目数量', '完成项目数量', '接收任务数量', '完成任务数量', '发布项目数量']
+        },
+        grid: {
+          left: '5%',
+          right: '8%',
+          bottom: '3%',
+          top: '10%',
+          containLabel: true
+        },
+        toolbox: {
+          feature: {
+            saveAsImage: {
+              title: '保存为图片',
+              name: '我的众测'
+            }
           },
-          grid: {
-            left: '5%',
-            right: '8%',
-            bottom: '3%',
-            top: '10%',
-            containLabel: true
+          right: '20px'
+        },
+        xAxis: {
+          type: 'category',
+          boundaryGap: false,
+          data: ['2020年1月', '2020年2月', '2020年3月', '2020年4月', '2020年5月', '2020年6月', '2020年7月']
+        },
+        yAxis: {
+          type: 'value'
+        },
+        series: [
+          {
+            name: '接收项目数量',
+            type: 'line',
+            stack: '总量',
+            data: [2, 3, 3, 2, 4, 5, 6]
           },
-          toolbox: {
-            feature: {
-              saveAsImage: {
-                title: '保存为图片',
-                name: '我的众测'
-              }
-            },
-            right: '20px'
+          {
+            name: '完成项目数量',
+            type: 'line',
+            stack: '总量',
+            data: [2, 3, 3, 2, 4, 5, 6]
           },
-          xAxis: {
-            type: 'category',
-            boundaryGap: false,
-            data: ['2020年1月', '2020年2月', '2020年3月', '2020年4月', '2020年5月', '2020年6月', '2020年7月']
+          {
+            name: '接收任务数量',
+            type: 'line',
+            stack: '总量',
+            data: [22, 33, 41, 14, 55, 33, 41]
           },
-          yAxis: {
-            type: 'value'
+          {
+            name: '完成任务数量',
+            type: 'line',
+            stack: '总量',
+            data: [21, 33, 31, 14, 39, 33, 32]
           },
-          series: [
-            {
-              name: '接收项目数量',
-              type: 'line',
-              stack: '总量',
-              data: [2, 3, 3, 2, 4, 5, 6]
-            },
-            {
-              name: '完成项目数量',
-              type: 'line',
-              stack: '总量',
-              data: [2, 3, 3, 2, 4, 5, 6]
-            },
-            {
-              name: '接收任务数量',
-              type: 'line',
-              stack: '总量',
-              data: [22, 33, 41, 14, 55, 33, 41]
-            },
-            {
-              name: '完成任务数量',
-              type: 'line',
-              stack: '总量',
-              data: [21, 33, 31, 14, 39, 33, 32]
-            },
-            {
-              name: '发布项目数量',
-              type: 'line',
-              stack: '总量',
-              data: [2, 3, 1, 0, 1, 2, 2]
-            }
-          ]
-        }
-        myChart.setOption(option)
-      },
-      showLoading() {
-        this.loading = true
-      },
-      hideLoading() {
-        this.loading = false
-      },
-      handleTabClick(event) {
-        if (event.name == 'myProject') {
-          //this.myProjectNoticeCount = 0
-        }
-        if (event.name == 'handlingProject') {
-          //this.processProjectNoticeCount = 0
-        }
-        console.log(event)
-      },
-      //检查是否有发包权限
-      checkCreateProjectAuth() {
-        if (this.isLogin) {
-          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.userVO.id)).then((res) => {
-            if (res) {
-              this.showCreateData = true;
-            }
-          }).catch((error) => {
-            // notify('error', error)
-          })
-        }
-      },
-      //检查是否有接包权限
-      checkAcceptTaskAuth() {
-        if (this.isLogin) {
-          Http.get(Apis.USER.IS_AGENCY.replace('{userId}', this.user.userVO.id)).then((res) => {
-            if (res) {
-              this.showAcceptData = true;
-            }
-          }).catch((error) => {
-            // notify('error', error)
-          })
-        }
-      },
+          {
+            name: '发布项目数量',
+            type: 'line',
+            stack: '总量',
+            data: [2, 3, 1, 0, 1, 2, 2]
+          }
+        ]
+      }
+      myChart.setOption(option)
     },
-    created: function () {
-
+    showLoading() {
+      this.loading = true
     },
-  }
+    hideLoading() {
+      this.loading = false
+    },
+    handleTabClick(event) {
+      if (event.name == 'myProject') {
+        //this.myProjectNoticeCount = 0
+      }
+      if (event.name == 'handlingProject') {
+        //this.processProjectNoticeCount = 0
+      }
+      console.log(event)
+    },
+    //检查是否有发包权限
+    checkCreateProjectAuth() {
+      if (this.isLogin) {
+        Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.userVO.id)).then((res) => {
+          if (res) {
+            this.showCreateData = true;
+          }
+        }).catch((error) => {
+          // notify('error', error)
+        })
+      }
+    },
+    //检查是否有接包权限
+    checkAcceptTaskAuth() {
+      if (this.isLogin) {
+        Http.get(Apis.USER.IS_AGENCY.replace('{userId}', this.user.userVO.id)).then((res) => {
+          if (res) {
+            this.showAcceptData = true;
+          }
+        }).catch((error) => {
+          // notify('error', error)
+        })
+      }
+    },
+  },
+  created: function() {
+
+  },
+}
 </script>
 
 <style lang="scss" scoped>
-  .mine-container {
-    padding: 0 80px 40px 80px;
-  }
+.mine-container {
+  padding: 0 80px 40px 80px;
+}
 
-  .mine-top-wrapper {
-    height: 350px;
-    background-color: #fff;
-  }
+.mine-top-wrapper {
+  height: 350px;
+  background-color: #fff;
+}
 
-  [class*="el-col-"] {
-    height: 100%;
-  }
+[class*="el-col-"] {
+  height: 100%;
+}
 
-  .advertise-imgs {
-    height: 100%;
-  }
+.advertise-imgs {
+  height: 100%;
+}
 
-  .advertise-imgs img {
-    width: 100%;
-    height: 100%;
-  }
+.advertise-imgs img {
+  width: 100%;
+  height: 100%;
+}
 
-  .user-banner {
-    text-align: center;
-    display: inline-table;
-    height: 100%;
-    width: 100%;
-    margin-top: 40px;
-  }
+.user-banner {
+  text-align: center;
+  display: inline-table;
+  height: 100%;
+  width: 100%;
+  margin-top: 40px;
+}
+
+.mine-body {
+  margin-top: 30px;
 
-  .mine-body {
-    margin-top: 30px;
+  .input-task-btn {
+    position: absolute;
+    right: 5%;
+    top: 10px
   }
+}
 
-  .project-statistics {
-    margin: 20px 5%;
-    display: flex;
-    .project-statistics-card{
-      justify-content: space-between;
-      flex: 1;
-      margin-right: 10px;
+.project-statistics {
+  margin: 20px 5%;
+  display: flex;
 
-      .project-statistics-card-title {
-        text-align: center;
-        font-size: 16px;
-      }
-      .project-statistics-card-number {
-        margin: 10px auto;
-        text-align: center;
-        font-weight: bolder;
-        font-size: 28px;
-      }
+  .project-statistics-card {
+    justify-content: space-between;
+    flex: 1;
+    margin-right: 10px;
+
+    .project-statistics-card-title {
+      text-align: center;
+      font-size: 16px;
     }
-    .project-statistics-card:last-child{
-      margin-right: 0;
+
+    .project-statistics-card-number {
+      margin: 10px auto;
+      text-align: center;
+      font-weight: bolder;
+      font-size: 28px;
     }
+  }
 
+  .project-statistics-card:last-child {
+    margin-right: 0;
   }
+
+
+}
 </style>
 

+ 13 - 1
src/components/commons/Footer2.0.vue

@@ -14,7 +14,9 @@
         <el-col :span="19" style="padding-left: 15%">
           <div class="copyright-block pull-left" style="margin: 12px 0">
             版权所有©信息产品及科技服务集成化众测服务平台与应用项目组<br/>
-            <a href="http://www.beian.miit.gov.cn/" style="color: white; font-size: 16px">{{ footer_provider_number }}</a><br/>
+            <img src="@/assets/image/police.png" style="width: 20px;height: 20px;vertical-align:middle;">
+            <span style="vertical-align: middle;height: 20px;line-height: 20px">粤公网安备 44011602000570号</span><br/>
+            <a :href="footer_provider_number_url" style="color: white; font-size: 16px">{{ footer_provider_number }}</a><br/>
             电话:{{ footer_mobile }}  传真:{{ footer_fax }}1<br/>
             电子邮箱:{{ footer_email }}
           </div>
@@ -43,6 +45,7 @@ export default {
       footer_fax:CONFIG.footer_fax,
       footer_email:CONFIG.footer_email,
       footer_QRcode:CONFIG.footer_QRcode,
+      footer_provider_number_url: CONFIG.footer_provider_number_url
     }
   }
 }
@@ -50,6 +53,7 @@ export default {
 
 <style scoped lang="scss">
   @import "../../style/main";
+
   .footer-nav{
     height: 120px;
     background:$--color-primary;
@@ -58,6 +62,14 @@ export default {
     font-size: 14px;
     font-family:Source Han Sans CN;
   }
+  .footer-nav-online{
+    height: 120px;
+    background:$__color-primary;
+    color: $--color-title-color;
+    padding: 30px 0;
+    font-size: 14px;
+    font-family:Source Han Sans CN;
+  }
   .nav-title{
     display: inline-block;
   }

+ 8 - 9
src/components/commons/Header2.0.vue

@@ -55,18 +55,17 @@
               </router-link>
             </li>
 
-<!--            <span v-if="isLogin&&rolesPermissions.isSystemAdministrator">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>-->
-
-<!--            <li v-if="isLogin&&rolesPermissions.isSystemAdministrator">-->
-<!--              <router-link v-if="isLogin" to="/statistics">-->
-<!--                <span>机构统计</span>-->
-<!--              </router-link>-->
-<!--            </li>-->
-
             <span v-if="isLogin&&rolesPermissions.isSystemAdministrator">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
             <li v-if="isLogin&&rolesPermissions.isSystemAdministrator">
-              <a :href="manage_url" v-if="manage_url">后台管理</a>
+              <router-link v-if="isLogin" to="/statistics">
+                <span>机构统计</span>
+              </router-link>
             </li>
+
+<!--            <span v-if="isLogin&&(rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionManager)">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>-->
+<!--            <li v-if="isLogin&&(rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionManager)">-->
+<!--              <a :href="manage_url" v-if="manage_url">后台管理</a>-->
+<!--            </li>-->
           </ul>
         </div>
     </div>

+ 114 - 0
src/components/commons/HomeSliceOnline.vue

@@ -0,0 +1,114 @@
+<template>
+  <div class="home-slice">
+    <!--    <el-row style="padding-top: 40px" v-loading="loading" element-loading-text="权限检查中...">-->
+    <el-row style="padding-top: 40px">
+      <el-col :span="14">
+        <div class="slice-wrapper" style="padding-left: 20%">
+          <div class="slice-title"><img src="../../assets/img/homeslice1.png" alt="slice1"></div>
+          <div class="slice-info">1分钟带你玩转众测服务平台</div>
+          <div class="slice-btn" @click="goToCreateProject" style="cursor: pointer">立即进入<img src="../../assets/img/home-btn1.png" style="margin-left: 5px"></div>
+        </div>
+      </el-col>
+      <el-col :span="10">
+        <div class="slice-wrapper">
+          <div class="slice-title"><img src="../../assets/img/homeslice2.png" alt="slice2"></div>
+          <div class="slice-info">入住众测服务平台流程</div>
+          <div class="slice-btn" @click="goToCreateTask" style="cursor: pointer">立即进入<img src="../../assets/img/home-btn2.png" style="margin-left: 5px"></div>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import Apis from '@/js/api'
+import Http from '@/js/http'
+import {storageGet} from '@/js/index.js'
+import {notify} from "../../constants";
+
+export default {
+  name: 'HomeSlice',
+  data() {
+    return {
+      user: {},
+      isLogin: false,
+      loading:false
+    }
+  },
+  methods: {
+    showLoading() {
+      this.loading = true
+    },
+    hideLoading() {
+      this.loading = false
+    },
+    loadData(){
+      if (storageGet('user') != null) {
+        this.isLogin = true;
+        this.user = storageGet('user').userVO;
+      }
+    },
+    checkCreateProjectAuth() {
+      if (!this.isLogin) {
+        console.log("请登录后访问");
+        notify('warning', '请登录后访问');
+      }
+      else if(this.isLogin){
+        this.showLoading();
+        Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+          console.log(res)
+          this.hideLoading()
+          this.$router.push('/project/create');
+        }).catch((error) => {
+          this.hideLoading()
+          notify('error', error.data)
+        })
+      }
+    },
+    checkCreateTaskAuth() {
+      if (!this.isLogin) {
+        console.log("请登录后访问");
+        notify('warning', '请登录后访问');
+      }
+      else if(this.isLogin){
+        this.showLoading();
+        Http.get(Apis.USER.IS_AGENCY.replace('{userId}', this.user.id)).then((res) => {
+          console.log(res)
+          this.hideLoading()
+          this.$router.push('/square');
+        }).catch((error) => {
+          this.hideLoading()
+          notify('error', error.data)
+        })
+
+      }
+    },
+    goToCreateProject(){
+      this.checkCreateProjectAuth();
+    },
+    goToCreateTask(){
+      this.checkCreateTaskAuth();
+    },
+  },
+  mounted() {
+    this.loadData();
+  }
+}
+</script>
+
+<style scoped lang="less">
+.slice-info {
+  font-size: 16px;
+  font-family: Source Han Sans CN;
+  color: rgba(243, 224, 10, 1);
+}
+
+.slice-btn {
+  display: flex;
+  margin-top: 5px;
+  line-height: 30px;
+  color: white;
+  font-weight: 400;
+}
+
+</style>

+ 44 - 29
src/components/task/Task.vue

@@ -32,9 +32,9 @@
             <!--</el-form-item>-->
             <el-form-item label="测试类型" prop="serviceType">
               <el-radio-group v-if="isModifyMode" v-model="task.serviceType" @change="handleTestTypeChange">
-            <span v-for="(item,index) in serviceType" :key="index">
-              <el-radio :label="item.code" name="serviceType">{{item.name}}</el-radio>
-            </span>
+                <span v-for="(item,index) in serviceType" :key="index">
+                  <el-radio :label="item.code" name="serviceType">{{item.name}}</el-radio>
+                </span>
               </el-radio-group>
               <span class="badge" v-if="!isModifyMode">{{serviceName}}</span>
             </el-form-item>
@@ -63,7 +63,7 @@
                     <el-radio
                       :label="item"
                       name="type"
-                      v-for="item,index in institutionArray"
+                      v-for="(item,index) in institutionArray"
                       :key="index"
                     >{{item.evaluationAgencyName}}
                     </el-radio>
@@ -208,9 +208,18 @@
               <el-button v-if="taskOperationControl.taskRecommend" type="primary" size="mini" @click="recommendTask()">任务推荐
               </el-button>
 
+
+<!--              <el-button v-if="taskOperationControl.exportTask && task.exportUrl != null && task.exportUrl != ''" type="primary" size="mini">-->
+<!--                <a :href="task.exportUrl" style="color:white">导出任务</a>-->
+<!--              </el-button>-->
+              <el-button v-if="taskOperationControl.exportTask" type="primary" size="mini" @click="toExportTask()">
+                导出任务
+              </el-button>
+
               <el-button v-if="taskOperationControl.uploadReport" type="primary" size="mini" @click="toCreateReport()">
                 上传报告
               </el-button>
+
               <el-button v-if="taskOperationControl.taskDemonstrate" type="success" size="mini" @click="gotoDataboard()">
                 任务面板
               </el-button>
@@ -271,6 +280,7 @@ import Apis from '@/js/api.js'
 import {notify} from '@/constants/index'
 import {
   ensureEndTask,
+  exportTask,
   getAllAgencies,
   getAllServiceTypes,
   getFormalTimeFromDate,
@@ -284,6 +294,7 @@ import {
   updateTask,
   getTaskWordCloud
 } from '@/js/index'
+import {AxiosInstance as axios} from "axios";
 
 export default {
   name: 'Task',
@@ -300,8 +311,7 @@ export default {
       showBD: true,
       rolesPermissions: {},
       loading: false,
-      isModifyMode: false,
-      institutionArray: [],
+      isModifyMode: false,      institutionArray: [],
       tabPosition: 'top',
       resourceType: ResourceType,
       serviceType: [],
@@ -315,9 +325,11 @@ export default {
         uploadReport: false,
         writeReport: false,
         taskDemonstrate: false,
-        taskRecommend: false
+        taskRecommend: false,
+        exportTask: false
       },
       crowdReportUrl: '',
+      exportTaskUrl: '',
       wordCloud:[],
       task: {
         agencyId: '',
@@ -334,6 +346,7 @@ export default {
         doc: [],
         requireDocUrl: '',
         participantCount: 1,
+        exportUrl: '',
         title: '',
         description: '',
         endPoint: {
@@ -427,24 +440,6 @@ export default {
     serviceType(val) {
       this.serviceType = val
     },
-    // 'task.institution' () {
-    //   if (this.task.institution) {
-    //     //this.$refs.addFormProvince.resetProviceCity()
-    //     this.task.location = {provinceCode: '', cityCode: ''}
-    //   }
-    // },
-    // 'task.location' () {
-    //   if (this.task.location.provinceCode || this.task.location.cityCode) {
-    //     this.task.institution = ''
-    //   }
-    // },
-    // 'task.resource' () {
-    //   if (this.task.resource == '广场') {
-    //     this.$refs.addFormProvince.resetProviceCity()
-    //     this.task.institution = ''
-    //     this.task.location = {provinceCode: '', cityCode: ''}
-    //   }
-    // },
     deep: true
   },
   mounted() {
@@ -605,6 +600,7 @@ export default {
       this.task.doc = []
       this.task.requireDocUrl = res.crowdTaskVO.requirementFile
       this.task.agencyId = res.crowdTaskVO.agencyId
+      this.task.exportUrl = res.crowdTaskVO.exportUrl
       this.task.status = res.crowdTaskVO.status
       this.task.statusVO = res.crowdTaskVO.statusVO
       this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {
@@ -701,7 +697,7 @@ export default {
       this.task.title = res.crowdTaskVO.title
       this.task.description = res.crowdTaskVO.description
       this.task.serviceType = res.crowdTaskVO.serviceType
-      this.task.resource = res.crowdTaskVO.resource
+      this.task.resource = res.crowdTaskVO.resource.toString()
       this.task.location = res.crowdTaskVO.location == null ? {
         provinceCode: 3200,
         cityCode: 3201
@@ -722,7 +718,8 @@ export default {
       this.crowdReportUrl = res.crowdTaskVO.writeReportUrl;
       this.acceptedUserList = res.acceptedUserList
       this.handleTestTypeChange(res.crowdTaskVO.serviceType);
-      this.serviceName = this.getServiceByCode(res.crowdTaskVO.serviceType);
+      this.serviceName = this.getServiceByCode(res.crowdTaskVO.serviceType)
+      this.getWordCloud()
       this.hideLoading()
       notify('success', '修改成功')
     },
@@ -817,8 +814,9 @@ export default {
         "createTime": this.task.createTime,
         "datetime": this.task.datetime
       };
-      Http.post('/recommendationtest/querywithparam',task).then((res)=>{
-        window.open('http://59.42.10.54:7477/userinformation.html');
+      Http.post('/recommendationtest/query',task).then((res)=>{
+        console.log("recommend")
+        window.open('http://8.134.39.104:7477/userinformation.html');
       })
     },
 
@@ -905,6 +903,23 @@ export default {
       this.hideLoading()
       notify('error', '结束任务失败:' + error.data)
     },
+    // 导出任务
+    toExportTask(){
+      exportTask(this.projectId, this.taskId, this.exportTaskSuccess, this.exportTaskFail);
+    },
+    // 导出任务成功时的回调函数
+    exportTaskSuccess(res){
+      this.hideLoading()
+      console.log(res.data)
+      this.exportTaskUrl = res.data;
+      window.open(this.exportTaskUrl, "_self");
+      notify('success', '任务导出成功!')
+    },
+    // 导出任务失败时的回调函数
+    exportTaskFail(error){
+      this.hideLoading()
+      notify('error', '导出任务失败:' + error.data)
+    },
     //跳转到创建项目报告页面
     toCreateReport() {
       this.$router.push({

+ 19 - 12
src/components/task/TaskCloud.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id='taskWordCloud' style="height: 457px;width: 100%" ></div>
+  <div id='taskWordCloud' style="height: 457px;width: 100%"></div>
 </template>
 
 <script>
@@ -14,9 +14,16 @@ export default {
   props: ['info'],
   data() {
     return {
-      chart: null
+      chart: null,
+      words: this.info,
     };
   },
+  watch: {
+    info(nv){
+      this.words = nv;
+      this.initChart();
+    }
+  },
   mounted() {
     this.initChart();
   },
@@ -29,7 +36,7 @@ export default {
   },
   methods: {
     initChart() {
-      this.chart = echarts.init(document.getElementById('taskWordCloud'),{width:'auto',height:'500px'});
+      this.chart = echarts.init(document.getElementById('taskWordCloud'), {width: 'auto', height: '500px'});
       const option = {
         backgroundColor: "#fff",
         // tooltip: {
@@ -53,7 +60,7 @@ export default {
             // maskImage: maskImage,
             textStyle: {
               normal: {
-                color: function() {
+                color: function () {
                   return (
                     "rgb(" +
                     Math.round(Math.random() * 255) +
@@ -66,13 +73,13 @@ export default {
                 }
               }
             },
-            grid:{
-              x:10,
-              y:10,
-              x2:10,
-              y2:10,
-              height:"500px",
-              width:"100%"
+            grid: {
+              x: 10,
+              y: 10,
+              x2: 10,
+              y2: 10,
+              height: "500px",
+              width: "100%"
             },
             //位置相关设置
             // Folllowing left/top/width/height/right/bottom are used for positioning the word cloud
@@ -84,7 +91,7 @@ export default {
             width: "100%",
             height: "100%",
             //数据
-            data: this.info
+            data: this.words
           }
         ]
       };

+ 8 - 2
src/config/index.js

@@ -133,6 +133,12 @@ export let CONFIG = {};
 export const setConfig = (conf) => {
   CONFIG = conf;
 }
+export const login_url = 'http://user.mooctest.net:8081/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome'
+export const register_url = 'http://user.mooctest.net:8081/page/register'
 
-export const login_url = '/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome'
-export const  register_url = '/page/register'
+// 线上环境
+// export const login_url = 'http://user.cofortest.com:8081/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fhome'
+// export const register_url = 'http://user.cofortest.com:8081/page/register'
+
+// export const login_url = 'http://59.42.10.53/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fhome'
+// export const  register_url = 'http://59.42.10.53/page/register'

+ 3 - 1
src/js/api.js

@@ -23,6 +23,7 @@ export default {
     REJECT_TASK: '/api/project/{projectId}/task/{taskId}/status/reject',
     SUBMIT_TASK: '/api/project/{projectId}/task/{taskId}/status/commit',
     END_TASK: '/api/project/{projectId}/task/{taskId}/status/finished',
+    EXPORT_TASK: '/api/project/{projectId}/task/{taskId}/export',
     MORE_HOT_TASK: '/api/square/hotTasks/list',
     GET_TASK_CLOUD:'/api/project/{projectId}/task/{taskId}/word'
   },
@@ -42,7 +43,8 @@ export default {
     UPLOAD_REPORT_FILE: '/api/files/report/{userId}/',
     UPLOAD_EXCEL: '',
     UPLOAD_IMAGE: '/api/files/image/{userId}/',
-    GET_TEMPLATE_EXCEL_FILE: ''
+    GET_TEMPLATE_EXCEL_FILE: '' ,
+    TASK_IMPORT: '/api/project/task/import'
   },
   USER: {
     ADD_AGENCY: '/api/greenChannel/agency/',

+ 3 - 0
src/js/index.js

@@ -35,6 +35,7 @@ import {
   createTask,
   deleteTask,
   ensureEndTask,
+  exportTask,
   getTask,
   receiveTaskRequest,
   rejectTask,
@@ -144,6 +145,8 @@ export {
   deleteTask,
   //区域管理员确认结束项目
   ensureEndTask,
+  //区域管理员、已接包的测试人员或机构导出测试任务
+  exportTask,
   //查看任务信息
   getTask,
   //测评机构接收任务

+ 9 - 0
src/js/taskService.js

@@ -76,3 +76,12 @@ export const ensureEndTask = (projectId, taskId, endTaskSuccess, endTaskFail) =>
     endTaskFail(error)
   })
 }
+
+//区域管理员、已接包的测试人员或机构导出测试任务
+export const exportTask = (projectId, taskId, exportTaskSuccess, exportTaskFail) => {
+  Http.get(Apis.TASK.EXPORT_TASK.replace('{projectId}', projectId).replace('{taskId}', taskId), {}).then((res) => {
+    exportTaskSuccess(res)
+  }).catch((error) => {
+    exportTaskFail(error)
+  })
+}

+ 2 - 3
src/main.js

@@ -9,7 +9,6 @@ import {getAuthUrls, getCurrentUser, getRolesPermissions, storageGet, storageSav
 import {notify} from '@/constants/index'
 import store from './store'
 import moment from 'moment'
-import vRegion from 'v-region'
 import echarts from "echarts";
 import Http from '@/js/http.js'
 import {configToJson} from './utils/filters'
@@ -207,8 +206,8 @@ Vue.prototype.$notify = Notification
 Vue.prototype.$message = Message
 
 Vue.config.productionTip = false
-
-
+Vue.prototype.$env = process.env.NODE_ENV
+// console.log(process.env);
 Http.get('/api/common/configuration').then((res) => {
   let config = res.data&&res.data.configurationList;
   let configData = configToJson(config);

+ 1 - 0
src/pages/DetailPage/CrowdDetail.vue

@@ -84,6 +84,7 @@
     data() {
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         user: {},
         loading: false,
         isLogin: false,

+ 5 - 1
src/pages/DetailPage/NewAgencyDetail.vue

@@ -35,9 +35,13 @@
         <!--          </span>-->
         <!--        </el-form-item>-->
 
-        <el-form-item label="接包数量" prop="taskCount" v-if="this.type == 0">
+        <el-form-item label="接包数量" prop="taskCount" v-if="this.type == 0 && authentication.taskCount">
           <span>{{authentication.taskCount}}</span>
         </el-form-item>
+
+        <el-form-item label="接包数量" prop="taskCount" v-if="this.type == 0 && !authentication.taskCount">
+          <span>0</span>
+        </el-form-item>
         <el-form-item label="认证时间" prop="checkTime">
           <span>{{dateFormat(new Date(authentication.checkTime),'yyyy-MM-dd HH:mm:ss')}}</span>
         </el-form-item>

+ 1 - 1
src/pages/Homepage/BrandCard.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="clearfix test-card-header">
       <span>入驻品牌机构</span>
       <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMoreAgency()">
-        more>>
+        >>
       </el-button>
     </div>
     <div>

+ 10 - 0
src/pages/Homepage/Homepage.vue

@@ -60,6 +60,16 @@
           <el-row style="margin-top: 10px" v-if="HOME_DISPLAY.resource_and_tool">
             <ResourceAndTool :resourceList="homeDataNoCache.toolList && homeDataNoCache.toolList"></ResourceAndTool>
           </el-row>
+          <el-row>
+            <BrandCard :residentAgencyList=homeData.residentAgencyList></BrandCard>
+          </el-row>
+        </el-col>
+        <el-col :span="5" class="homepage-right-modules">
+          <LoginCard v-if="HOME_DISPLAY.login_card"/>
+          <HotCrowd :applicationTypeRank="homeDataNoCache.applicationTypeRank" v-if="HOME_DISPLAY.hot_crowd"/>
+          <HotAgency :agencyRank="homeDataNoCache.agencyRank" v-if="HOME_DISPLAY.hot_agency"/>
+          <HotUser :userRank="homeDataNoCache.userRank" v-if="HOME_DISPLAY.hot_user"/>
+          <HotContest :competitionList="homeData.competitionList" v-if="HOME_DISPLAY.hot_contest"/>
         </el-col>
       </el-row>
       <InstitutionCard v-if="HOME_DISPLAY.institution_card"></InstitutionCard>

+ 288 - 0
src/pages/Homepage/HomepagePrivate.vue

@@ -0,0 +1,288 @@
+<template>
+  <div class="home-wrapper">
+    <div class="nav" stype="height:500px">
+      <!--搜索框-->
+      <el-row class="search-nav" style="padding: 30px 0 20px 0">
+        <el-col :span="6">
+          <div class="pull-left" @click="handleLogoClick">
+            <img class="logo-img" :src="logo_transparent" :to="'/home'"/>
+            <span class="logo-title">{{ logoTitle }}</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="search-nav">
+            <div id="search-block ">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                <el-tab-pane v-for="item in searchTypeArr" v-if="item.value!=='all'" :label="item.name"
+                             :name="item.value" :key="item.value"></el-tab-pane>
+              </el-tabs>
+              <div class="search-input">
+                <el-input ref="searchInput" placeholder="请输入内容" v-model="searchVal" class="input-with-select">
+                  <el-button class="search-button" slot="append" type="primary" @click="handleSearchData">搜索</el-button>
+                </el-input>
+              </div>
+            </div>
+          </div>
+
+        </el-col>
+        <el-col :span="6">
+          <el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
+        </el-col>
+      </el-row>
+      <!--TabNav-->
+      <el-tabs v-model="currTab" @tab-click="handleTabClick" class="square-tab">
+        <el-tab-pane v-for="item in homeTabArr.menuArr1" :label="item.label" :name="item.name"
+                     :key="item.name"></el-tab-pane>
+        <el-tab-pane v-for="item in homeTabArr.menuArr2" :label="item.name" :name="item.code"
+                     :key="item.code"></el-tab-pane>
+        <el-tab-pane v-for="item in homeTabArr.menuArr3" :label="item.label" :name="item.name"
+                     :key="item.name"></el-tab-pane>
+      </el-tabs>
+      <div>
+      </div>
+    </div>
+
+    <div class="home-page container">
+      <el-row :gutter="15">
+        <el-col :span="5" class="homepage-right-modules">
+          <LoginCard v-if="HOME_DISPLAY.login_card"/>
+          <HotCrowd :applicationTypeRank="homeDataNoCache.applicationTypeRank" v-if="HOME_DISPLAY.hot_crowd"/>
+          <HotAgency :agencyRank="homeDataNoCache.agencyRank" v-if="HOME_DISPLAY.hot_agency"/>
+          <HotUser :userRank="homeDataNoCache.userRank" v-if="HOME_DISPLAY.hot_user"/>
+          <HotContest :competitionList="homeData.competitionList" v-if="HOME_DISPLAY.hot_contest"/>
+        </el-col>
+        <el-col :span="19" class="test-type-wrapper">
+          <TestMenu :testTypeList="homeData.testTypeList" v-if="HOME_DISPLAY.test_menu && homeData.testTypeList"></TestMenu>
+          <TestCard :applicationTypeList="homeData.applicationTypeList" v-if="HOME_DISPLAY.test_card && homeData.applicationTypeList"></TestCard>
+          <el-row style="margin-top: 10px" v-if="HOME_DISPLAY.resource_and_tool">
+            <ResourceAndTool :resourceList="homeDataNoCache.toolList && homeDataNoCache.toolList"></ResourceAndTool>
+          </el-row>
+          <el-row>
+            <BrandCard :residentAgencyList=homeData.residentAgencyList></BrandCard>
+          </el-row>
+        </el-col>
+      </el-row>
+      <InstitutionCard v-if="HOME_DISPLAY.institution_card"></InstitutionCard>
+    </div>
+  </div>
+</template>
+
+<script>
+// import commonData from '../../constants/tabMenu'
+import SearchBar from '../../components/commons/SearchBar'
+import TestMenu from './TestMenu'
+import LoginCard from './LoginCard'
+import BrandCard from './BrandCard'
+import ResourceAndTool from './ResourceAndTool'
+import TestCard from './TestCard'
+import InstitutionCard from './InstitutionCard'
+import HotCrowd from './HotCrowd'
+import HotAgency from './HotAgency'
+import HotUser from './HotUser'
+import HotContest from './HotContest'
+import PopularProject from '../Square/PopularProject'
+import Http from '@/js/http.js'
+import {mapGetters} from 'vuex'
+import Waterfall from 'vue-waterfall/lib/waterfall'
+import WaterfallSlot from 'vue-waterfall/lib/waterfall-slot'
+import {getAllFields, storageGet} from '@/js/index.js'
+import {notify} from "../../constants";
+import Apis from '@/js/api'
+import {CONFIG} from "../../config";
+
+// console.log(commonData);
+export default {
+  name: 'Homepage',
+  components: {
+    HotCrowd,
+    HotContest,
+    HotUser,
+    HotAgency,
+    InstitutionCard,
+    SearchBar,
+    TestMenu,
+    PopularProject,
+    LoginCard,
+    TestCard,
+    BrandCard,
+    ResourceAndTool,
+    Waterfall,
+    WaterfallSlot
+    // vueWaterfallEasy
+  },
+  data() {
+    return {
+      logoTitle:CONFIG.logoTitle,
+      HOME_DISPLAY:CONFIG.HOME_DISPLAY,
+      logo_transparent:CONFIG.logo_transparent,
+      user: {},
+      isLogin: false,
+      searchType: CONFIG.home_searchType,
+      searchTypeArr: CONFIG.home_searchTypeArr,
+      searchVal: '',
+      homeTabArr: {
+        menuArr1: CONFIG.home_homeTabArr_left,
+        menuArr2: [{code: '', name: ''}],
+        menuArr3: CONFIG.home_homeTabArr_right
+      },
+      homeData: {},
+      homeDataNoCache: {},
+      currTab: CONFIG.home_homeTabArr_default
+    }
+  },
+  computed: {
+    ...mapGetters(['getUserInfo'])
+  },
+  methods: {
+    loadData() {
+      this.showLoading();
+      if (storageGet('user') != null) {
+        this.isLogin = true;
+      }
+      this.setFields();
+      let p1 = new Promise((resolve, reject) => {
+        Http.get('/api/common/index/info/cache').then((res) => {
+          this.homeData = res.data;
+          // this.homeData.applicationTypeList.map((item)=>{
+          //   item.height = (item.testTypeList.length / 2) * 24 + 100;
+          //   return item;
+          // })
+          resolve(res.data);
+        }).catch((error) => {
+          notify('error', error.data)
+          reject(error)
+        })
+      });
+      let p2 = new Promise((resolve, reject) => {
+        Http.get('/api/common/index/info/nocache').then((res) => {
+          this.homeDataNoCache = res.data;
+          resolve(res.data);
+        }).catch((error) => {
+          notify('error', error.data)
+          reject(error)
+        })
+      });
+      Promise.all([p1, p2]).then((result) => {
+        this.hideLoading();
+      }).catch((error) => {
+        notify('error', error.data)
+      })
+    },
+    setFields() {
+      getAllFields().then((res) => {
+        this.homeTabArr.menuArr2 = res
+      })
+    },
+    checkLogin() {
+      this.checkCreateProjectAuth();
+    },
+    handleLogoClick(){
+      location.reload();
+    },
+    checkCreateProjectAuth() {
+      if (!this.isLogin) {
+        notify('warning', '请登录后访问');
+      } else if (this.isLogin) {
+        Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+          this.$router.push('/project/create');
+        }).catch((error) => {
+          notify('error', error)
+        })
+      }
+    },
+    handleTabClick(tab) {
+      this.currTab = tab.name;
+      // console.log(this.currTab +  "  "  + tab.index +  "  "  + tab.name );
+      for (let i = 0; i < this.homeTabArr.menuArr3.length; i++) {
+        if (this.currTab === this.homeTabArr.menuArr3[i].name) {
+          this.$router.push(this.homeTabArr.menuArr3[i].linkTo);
+        }
+      }
+
+      for (let i = 0; i < this.homeTabArr.menuArr2.length; i++) {
+        if (this.currTab === this.homeTabArr.menuArr2[i].code) {
+          this.$router.push('/field/detail');
+        }
+      }
+      this.$router.push(this.homeTabArr.menuArr1[Number(tab.index)] && this.homeTabArr.menuArr1[Number(tab.index)].linkTo);
+    },
+    handleTypeClick(tab, e) {
+      this.searchType = tab.name;
+      // e.target.style.backgroundColor = $color-primary
+      this.$refs.searchInput.focus()
+    },
+    handleSearchData() {
+      if (this.searchType == 0) {
+        this.$router.push({
+          name: 'Square',
+          params: {searchVal: this.searchVal, searchType: "project", currTab: "project"}
+        });
+      } else if (this.searchType == 1) {
+        this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
+      } else if (this.searchType == 2) {
+        this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
+      } else if (this.searchType == 3) {
+        this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
+      }
+    },
+    showLoading() {
+      this.loading = true
+    },
+    hideLoading() {
+      this.loading = false
+    },
+    setUserInfo() {
+      this.user = storageGet('user') && storageGet('user').userVO;
+    }
+  },
+  mounted() {
+    this.setUserInfo();
+    this.loadData();
+  },
+  watch: {
+    getUserInfo(val) {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+@import "../../style/search-nav.scss";
+
+.home-wrapper {
+  /deep/ .square-tab .el-tabs__item {
+    font-size: 16px !important;
+    margin-right: 0px !important;
+  }
+
+  /deep/ .login-card .popular-list {
+    padding: 0 10px !important;
+  }
+
+  .home-page {
+    padding: 15px 0;
+  }
+
+  .test-type-wrapper {
+    padding-right: 15px;
+    margin-bottom: 15px;
+  }
+
+  .homepage-right-modules {
+    .login-card .el-card__body {
+      padding: 10px !important;
+    }
+
+    .popular-card .el-card__header {
+      padding: 10px !important;
+    }
+
+    .popular-card .el-card__body {
+      padding: 10px !important;
+    }
+  }
+}
+
+</style>

+ 1 - 1
src/pages/Homepage/HotAgency.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/agency.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">测评机构排行榜</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMoreAgency()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMoreAgency()">>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in agencyRank" :key="item.id">

+ 1 - 1
src/pages/Homepage/HotContest.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/crowd-contest.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">众测大赛</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in competitionList" :key="item.id">

+ 1 - 1
src/pages/Homepage/HotCrowd.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/HotCrowd.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">热门众测</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in applicationTypeRank" :key="item.id" @click.native="goToDetail(item.code)">

+ 1 - 1
src/pages/Homepage/HotUser.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/userRank.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">众测人员排行榜</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in userRank" :key="item.id">

+ 1 - 1
src/pages/Homepage/ResourceAndTool.vue

@@ -2,7 +2,7 @@
   <el-card class="test-card">
     <div slot="header" class="clearfix test-card-header">
       <span>众测工具</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">>></el-button>
     </div>
     <div>
       <el-row>

+ 1 - 1
src/pages/Homepage/TestCard.vue

@@ -8,7 +8,7 @@
               <span>{{ item && item.name }}</span>
             </el-col>
             <el-col :span="6">
-              <el-button style="float: right;line-height: 25px;padding:0" type="text"  @click="getMore()">more>></el-button>
+              <el-button style="float: right;line-height: 25px;padding:0" type="text"  @click="getMore()">>></el-button>
             </el-col>
           </el-row>
         </div>

+ 1 - 0
src/pages/HomepageSearch/AgencyList.vue

@@ -104,6 +104,7 @@
     data() {
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         user: {},
         isLogin: false,
         loading: false,

+ 1 - 0
src/pages/HomepageSearch/AgencyResidentList.vue

@@ -99,6 +99,7 @@
     data() {
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         user: {},
         isLogin: false,
         searchType: '0',

+ 1 - 0
src/pages/HomepageSearch/CompetitionList.vue

@@ -97,6 +97,7 @@
     data() {
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         user: {},
         isLogin: false,
         loading: false,

+ 1 - 0
src/pages/HomepageSearch/CrowdList.vue

@@ -95,6 +95,7 @@
     data() {
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         user: {},
         isLogin: false,
         loading: false,

+ 1 - 0
src/pages/HomepageSearch/ExpertList.vue

@@ -72,6 +72,7 @@
     data() {
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         user: {},
         isLogin: false,
         loading: false,

+ 1 - 0
src/pages/HomepageSearch/ResourceList.vue

@@ -107,6 +107,7 @@
     data() {
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         user: {},
         isLogin: false,
         loading: false,

+ 2 - 0
src/pages/HomepageSearch/UserList.vue

@@ -99,6 +99,7 @@
   import {defaultValue, storageGet} from '@/js/index.js'
   import {notify} from "../../constants";
   import Apis from '@/js/api';
+  import {CONFIG} from "../../config";
 
   export default {
     name: "UserList",
@@ -108,6 +109,7 @@
       return {
         user: {},
         isLogin: false,
+        logo_transparent:CONFIG.logo_transparent,
         id: 0,
         // searchVal: '',
         searchType: '0',

+ 1 - 1
src/pages/Square/PopularProject.vue

@@ -4,7 +4,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/popular-project.png" alt="popular-project" class="popular-header-img"/>
       <span class="popular-header-title">热门项目</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">>></el-button>
     </div>
     <div v-if="!hotCrowdTestProjectVOs.length" style="text-align: center;padding: 5px 0"><span>暂无项目</span></div>
     <div class="popular-list" v-else>

+ 2 - 1
src/pages/Square/PopularProjectAndTaskList.vue

@@ -5,7 +5,7 @@
       <el-row class="search-nav" style="padding: 30px 0 20px 0">
         <el-col :span="6">
           <div class="pull-left" @click="gotoHome" style="cursor: pointer">
-            <img class="logo-img" src="../../assets/image/logo-transparent.png"/>
+            <img class="logo-img" :src="logo_transparent"/>
             <span class="logo-title">{{logoTitle}}</span>
           </div>
         </el-col>
@@ -112,6 +112,7 @@
     data() {
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         loading: false,
         isLogin: false,
         searchType: 'project',

+ 1 - 1
src/pages/Square/PopularTask.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/popularTask.png" alt="popular-project" class="popular-header-img"/>
       <span class="popular-header-title">热门任务</span>
-      <el-button style="float: right; padding: 3px 0" type="text" class="pull-right"  @click="goToMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0" type="text" class="pull-right"  @click="goToMore()">>></el-button>
     </div>
     <div v-if="!hotCrowdTaskVOs.length" style="text-align: center;padding: 5px 0"><span>暂无任务</span></div>
     <div class="popular-list" v-else>

+ 1 - 0
src/pages/Square/Square2.0.vue

@@ -83,6 +83,7 @@
         logoTitle:CONFIG.logoTitle,
         logo_transparent:CONFIG.logo_transparent,
         SQUARE_DISPLAY:CONFIG.SQUARE_DISPLAY,
+        logo_transparent:CONFIG.logo_transparent,
         user: {},
         isLogin: false,
         searchType:CONFIG.square_searchType,

+ 1 - 1
src/pages/Technology/HotActicle.vue

@@ -4,7 +4,7 @@
       <div slot="header" class="popular-header">
         <img src="../../assets/img/hot-article.jpg" alt="hot-crowd" class="popular-header-img"/>
         <span class="popular-header-title">热门文章</span>
-        <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">more>></el-button>
+        <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">>></el-button>
       </div>
       <div class="popular-list">
         <el-row class="popular-list-item" v-for="(item,index) in articleArr" :key="item.id" v-if="index<7">

+ 1 - 0
src/pages/Technology/Technology2.0.vue

@@ -96,6 +96,7 @@
         logoTitle:CONFIG.logoTitle,
         logo_transparent:CONFIG.logo_transparent,
         TECHNOLOGY_DISPLAY:CONFIG.TECHNOLOGY_DISPLAY,
+        logo_transparent:CONFIG.logo_transparent,
         loading: false,
         isLogin: false,
         searchVal: '',

+ 1 - 0
src/pages/Technology/TechnologyMore.vue

@@ -80,6 +80,7 @@
     data(){
       return {
         logoTitle:CONFIG.logoTitle,
+        logo_transparent:CONFIG.logo_transparent,
         loading: false,
         isLogin: false,
         searchVal: '',

+ 4 - 1
src/router/index.js

@@ -14,6 +14,7 @@ import ProjectAdd from '@/components/cheat/ProjectAdd'
 import AgencyAdd from '@/components/cheat/AgencyAdd'
 
 Vue.use(Router)
+const $env = process.env.NODE_ENV;
 
 export default new Router({
   linkActiveClass: 'active',
@@ -21,7 +22,9 @@ export default new Router({
     {
       path: '/',
       name: 'Home',
-      component: resolve => require(['@/pages/Homepage/Homepage'], resolve),
+      component: resolve => {
+        return $env === 'private' ? require(['@/pages/Homepage/HomepagePrivate'],resolve) : require(['@/pages/Homepage/Homepage'], resolve)
+      },
       meta: {
         title: '',
         requireAuth: false,

+ 5 - 3
src/style/main.scss

@@ -1,4 +1,5 @@
-@import "./basic";
+//@import "online";
+//@import "private";
 
 /* 改变主题色变量 */
 $--color-primary: $color-primary;
@@ -10,6 +11,8 @@ $--color-publish-background: $color-publish-background;
 $--color-participate-background: $color-participate-background;
 //配置slice title文本颜色
 $--color-title-color: $color-title-color;
+//配置footer灰色背景色
+$--color-footer-background:$color-footer-background;
 
 /* 改变 icon 字体路径变量,必需 */
 $--font-path: '~element-ui/lib/theme-chalk/fonts';
@@ -38,7 +41,6 @@ html, body {
   padding: 0;
 }
 
-
 .el-notification .el-icon-info {
   color: rgb(112, 179, 255);
 }
@@ -374,7 +376,7 @@ a {
 }
 
 .col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto {
-  position: relative;
+  //position: relative;
   width: 100%;
   padding-right: 15px;
   padding-left: 15px

+ 16 - 0
src/style/online.scss

@@ -0,0 +1,16 @@
+//配置主题色
+$color-primary: #4a90e2;
+//配置浅色主题背景色
+$color-primary-background:#e9f0fa;
+//配置发布按钮背景色
+$color-publish-background:#FFE400;
+//配置参与按钮背景色
+$color-participate-background:#FF1800;
+//配置slice title文本颜色
+$color-title-color:#FFFFFF;
+//配置footer灰色背景色
+$color-footer-background:#2f3030;
+
+.el-input-group__append {
+  border-radius: 0 !important;
+}

+ 2 - 0
src/style/basic.scss → src/style/private.scss

@@ -8,6 +8,8 @@ $color-publish-background:#FFE400;
 $color-participate-background:#FF1800;
 //配置slice title文本颜色
 $color-title-color:#FFFFFF;
+//配置footer灰色背景色
+$color-footer-background:#2f3030;
 
 .el-input-group__append {
   border-radius: 0 !important;

+ 8 - 0
tool4deploy-test/conf.d/nginx.conf

@@ -28,6 +28,14 @@ server {
             proxy_send_timeout 1200s;
         }
 
+        location /page {
+            proxy_pass http://crowd_user:8081;
+        }
+
+        location  ~ ^/(js|vendor|css|fonts|images)/.*$ {
+            proxy_pass http://crowd_user:8081;
+        }
+
         #error_page  404              /404.html;
 
         # redirect server error pages to the static page /50x.html

+ 5 - 0
tool4deploy/conf.d/nginx.conf

@@ -28,6 +28,11 @@ server {
             proxy_send_timeout 1200s;
         }
 
+        location /recommendationtest {
+            proxy_pass http://taskRecommend:7477;
+        }
+
+
         #error_page  404              /404.html;
 
         # redirect server error pages to the static page /50x.html

+ 1 - 0
tool4deploy/slider-type.js

@@ -0,0 +1 @@
+export const  slice_type =  0 // 0:online , 1:private