Browse Source

update conf

wangJJ 4 years ago
parent
commit
2935dc411b

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

@@ -90,6 +90,11 @@ module.exports = {
     tls: 'empty',
     child_process: 'empty'
   },
+  externals: {
+    'vue': 'Vue',
+    // 'vue-router': 'VueRouter',
+    'axios': 'axios',
+  }
   // externals: {
   //   'vue': 'Vue',
   //   'vue-router': 'VueRouter'

+ 5 - 1
index.html

@@ -6,7 +6,11 @@
     <title>crowd-test-service</title>
   </head>
   <body>
-    <div id="app"></div>
+  <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.20.0/axios.min.js"></script>
+  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.5.2/vue.js"></script>
+  <script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.11.0/index.js"></script>
+<!--  <script src="https://cdn.bootcdn.net/ajax/libs/vue-router/3.0.6/vue-router.min.js"></script>-->
+  <div id="app"></div>
     <!-- built files will be auto injected -->
   </body>
 </html>

+ 2 - 2
package.json

@@ -14,7 +14,7 @@
   },
   "dependencies": {
     "axios": "latest",
-    "echarts": "^4.2.1",
+    "echarts": "^4.9.0",
     "element-ui": "^2.11.0",
     "font-awesome": "^4.7.0",
     "mockjs": "^1.0.1-beta3",
@@ -22,7 +22,7 @@
     "querystring": "^0.2.0",
     "v-region": "^2.2.2",
     "vue": "^2.5.2",
-    "vue-router": "^3.0.1",
+    "vue-router": "^3.0.6",
     "vue-waterfall": "^1.0.6",
     "vue-waterfall-easy": "^2.4.4",
     "vuex": "^3.1.1",

+ 1 - 0
src/components/commons/Header2.0.vue

@@ -96,6 +96,7 @@
   import Http from '@/js/http.js'
   import Apis from '@/js/api.js'
   import {mapActions} from 'vuex'
+  import {notify} from '@/constants/index'
 
   export default {
     name: "Header2.0",

+ 1 - 0
src/constants/index.js

@@ -1,3 +1,4 @@
+
 import {Notification} from 'element-ui'
 
 export const timeChange = (dateString, formdate) => {

+ 5 - 1
src/main.js

@@ -1,6 +1,6 @@
 // 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 Vue from 'vue'
 import App from './App'
 import router from './router'
 import 'font-awesome/css/font-awesome.css'
@@ -12,6 +12,10 @@ import moment from 'moment'
 import vRegion from 'v-region'
 import echarts from "echarts";
 
+
+const Vue = require('vue')
+
+
 import {
   Avatar,
   Alert,

+ 1 - 1
src/pages/Statistics/StatisticsReport.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="statistics-container container">
-    <el-card shadow="hover" class="project-statistics-card" v-for="item in agencyList">
+    <el-card shadow="hover" class="project-statistics-card" v-for="item in agencyList " :key="Object.keys(item)[0]">
       <div class="project-statistics-card-title">{{Object.keys(item)[0]}}</div>
       <div class="project-statistics-card-number">{{item[Object.keys(item)[0]]}}</div>
     </el-card>

+ 3 - 1
src/router/index.js

@@ -1,4 +1,6 @@
-import Vue from 'vue'
+// import Vue from 'vue'
+const Vue = require('vue')
+
 import Router from 'vue-router'
 import Home from '@/components/Home'
 // import Square from '@/components/Square'