浏览代码

静态完成

夜仔 3 年之前
父节点
当前提交
642da2bbed

+ 31 - 0
package-lock.json

@@ -4798,6 +4798,22 @@
         "safer-buffer": "^2.1.0"
       }
     },
+    "echarts": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.1.2.tgz",
+      "integrity": "sha512-okUhO4sw22vwZp+rTPNjd/bvTdpug4K4sHNHyrV8NdAncIX9/AarlolFqtJCAYKGFYhUBNjIWu1EznFrSWTFxg==",
+      "requires": {
+        "tslib": "2.0.3",
+        "zrender": "5.1.1"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "2.0.3",
+          "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
+          "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
+        }
+      }
+    },
     "ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -13084,6 +13100,21 @@
           "dev": true
         }
       }
+    },
+    "zrender": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.1.1.tgz",
+      "integrity": "sha512-oeWlmUZPQdS9f5hK4pV21tHPqA3wgQ7CkKkw7l0CCBgWlJ/FP+lRgLFtUBW6yam4JX8y9CdHJo1o587VVrbcoQ==",
+      "requires": {
+        "tslib": "2.0.3"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "2.0.3",
+          "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
+          "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
+        }
+      }
     }
   }
 }

+ 1 - 0
package.json

@@ -9,6 +9,7 @@
   },
   "dependencies": {
     "core-js": "^3.6.5",
+    "echarts": "^5.1.2",
     "element-ui": "^2.15.3",
     "file-saver": "^2.0.5",
     "vant": "^2.12.24",

+ 13 - 6
public/index.html

@@ -1,18 +1,25 @@
 <!DOCTYPE html>
 <html lang="">
-  <head>
+
+<head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, user-scalable=no">
     <meta name="format-detection" content="telephone=yes" />
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title><%= htmlWebpackPlugin.options.title %></title>
-  </head>
-  <body>
+    <title>
+        <%= htmlWebpackPlugin.options.title %>
+    </title>
+    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=8e266e1ac2ad2383c7773ff504ac248f"></script>
+    <script type="text/javascript" src="//webapi.amap.com/ui/1.1/main.js"></script>
+</head>
+
+<body>
     <noscript>
       <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
     </noscript>
     <div id="app"></div>
     <!-- built files will be auto injected -->
-  </body>
-</html>
+</body>
+
+</html>

+ 32 - 0
src/App.vue

@@ -4,6 +4,38 @@
   </div>
 </template>
 
+<script>
+export default {
+  data() {
+    return {
+      resizeTime: true,
+    };
+  },
+  mounted(){
+    this.getWeater()
+    window.addEventListener("resize", () => this.resizeTimeActions(), true);
+  },
+  methods:{
+    resizeTimeActions() {
+      if (!this.resizeTime) return;
+      this.resizeTime = false;
+      setTimeout(() => {
+        this.resizeTime = true;
+        this.$store.commit("changClient",  document.documentElement.clientWidth + document.documentElement.clientHeight);
+      }, 300);
+    },
+    async getWeater(){
+        let res = await this.$axios.get('/top/listWeather?'+this.$qs.stringify({
+        area: '上饶市'
+      }))
+      if(res.success){
+        this.$store.commit("changWeater", res.data.showapi_res_body.now);
+      }
+    }
+  }
+}
+</script>
+
 <style lang="scss">
 #app {
   width: 100%;

二进制
src/assets/image/bg.png


二进制
src/assets/image/bg1.png


二进制
src/assets/image/bg2.png


二进制
src/assets/image/boxTitle.png


二进制
src/assets/image/dc.png


二进制
src/assets/image/ewm.png


二进制
src/assets/image/header.png


二进制
src/assets/image/headerIcon.png


二进制
src/assets/image/icon.png


二进制
src/assets/image/jcIcon.png


二进制
src/assets/image/jg.png


二进制
src/assets/image/lxIcon.png


二进制
src/assets/image/mapBox.png


二进制
src/assets/image/title.png


二进制
src/assets/image/xh.png


二进制
src/assets/image/yc.png


二进制
src/assets/image/yuan.png


二进制
src/assets/image/yzt.png


二进制
src/assets/image/zcIcon.png


+ 1 - 1
src/main.js

@@ -7,7 +7,7 @@ import Vant from 'vant';
 import 'vant/lib/index.css';
 import querystring from 'querystring';
 import './plugins/element.js'
-document.title = '永天科技邀请函'
+document.title = '上饶智能窨井盖'
 Vue.use(Vant);
 Vue.config.productionTip = false
 Vue.prototype.$qs = querystring

+ 2 - 3
src/plugins/axios.js

@@ -3,7 +3,7 @@ import { Notify } from "vant";
 import Vue from 'vue';
 import axios from "axios";
 // Full config:  https://github.com/axios/axios#request-config
-axios.defaults.baseURL = 'http://121.40.217.77:8084/';
+axios.defaults.baseURL = 'http://121.40.217.77:8082/';
 // axios.defaults.baseURL = 'https://121.40.217.77:8084/';
 console.log(axios.defaults.baseURL)
     // axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
@@ -33,9 +33,8 @@ _axios.interceptors.request.use(
 _axios.interceptors.response.use(
     function(response) {
         // Do something with response data
-        console.log(response.data)
         if (!response.data.success) Notify({ type: 'danger', message: response.data.message })
-        return response;
+        return response.data;
     },
     function(error) {
         // Do something with response error

+ 5 - 24
src/router/index.js

@@ -4,30 +4,11 @@ import VueRouter from 'vue-router'
 Vue.use(VueRouter)
 
 const routes = [{
-        path: '/',
-        name: 'Home',
-        component: () =>
-            import ( /* webpackChunkName: "about" */ '../views/home')
-    },
-    {
-        path: '/subscribe-info',
-        name: 'subscribeInfo',
-        component: () =>
-            import ( /* webpackChunkName: "about" */ '../views/subscribe-info')
-    },
-    {
-        path: '/business-end',
-        name: 'business-end',
-        component: () =>
-            import ( /* webpackChunkName: "about" */ '../views/business-end')
-    },
-    {
-        path: '/back-stage-management',
-        name: 'back-stage-management',
-        component: () =>
-            import ( /* webpackChunkName: "about" */ '../views/back-stage-management')
-    },
-]
+    path: '/',
+    name: 'Home',
+    component: () =>
+        import ( /* webpackChunkName: "about" */ '../views/home')
+}, ]
 
 const router = new VueRouter({
     mode: 'hash',

+ 16 - 9
src/store/index.js

@@ -4,12 +4,19 @@ import Vuex from 'vuex'
 Vue.use(Vuex)
 
 export default new Vuex.Store({
-  state: {
-  },
-  mutations: {
-  },
-  actions: {
-  },
-  modules: {
-  }
-})
+    state: {
+        weaterRes: {},
+        windowWidth: 1920 + 1080,
+    },
+    mutations: {
+        changClient(state, val) {
+            state.windowWidth = val
+        },
+        changWeater(state, val) {
+            state.weaterRes = val
+            console.log(state.weaterRes)
+        }
+    },
+    actions: {},
+    modules: {}
+})

+ 0 - 81
src/views/back-stage-management/dialog-user.vue

@@ -1,81 +0,0 @@
-<template>
-    <el-dialog :before-close="() => { $emit('update:visible', false) }" :title="type==='add'?'新增接待人':'修改接待人'" :visible.sync="visible" width="400px" :close-on-click-modal="false">
-        <el-form ref="form" :model="form" :rules="rules" label-width="70px">
-            <el-form-item :label="'姓名'" prop="userName">
-                <el-input :maxlength="200" v-model.trim="form.userName" clearable></el-input>
-            </el-form-item>
-            <el-form-item :label="'手机号'" prop="phone">
-                <el-input :maxlength="200" v-model.trim="form.phone" clearable></el-input>
-            </el-form-item>
-            <el-form-item :label="'密码'" prop="passWord">
-                <el-input :maxlength="200" v-model.trim="form.passWord" clearable></el-input>
-            </el-form-item>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-            <el-button type="primary" :loading="submitLoading" @click="handleEvent">{{'确定'}}</el-button>
-            <el-button @click="$emit('update:visible', false)">{{'取消'}}</el-button>
-        </div>
-    </el-dialog>
-</template>
-
-<script>
-export default {
-    props:['visible', 'type', 'value',],
-        watch: {
-            visible: function(val) {
-                if (val) {
-                    switch (this.type) {
-                    case 'add':
-                        for (const key in this.form) {
-                            this.form[key] = '';
-                            console.log(this.form[key])
-                        }
-                        break;
-                    case 'edit':
-                        this.form = Object.assign({}, this.form, this.value);
-                        break;
-                    default:
-                        break;
-                    }
-                    this.$refs.form && this.$refs.form.resetFields();
-                }
-            },
-        },
-    data(){
-        return{
-            form:{
-                userName:'',
-                passWord:'',
-                phone:'',
-            },
-            submitLoading:false,
-            rules:{
-                phone: [
-                    {required: true, message: '请输入手机号', trigger: 'blur'}
-                ],
-                passWord: [
-                    {required: true, message: '请输入密码', trigger: 'blur'}
-                ],
-                userName: [
-                    {required: true, message: '请输入姓名', trigger: 'blur'}
-                ],
-            }
-        }
-    },
-    methods:{
-        async handleEvent() {
-            this.submitLoading = true
-            let res = await this.$axios.post((this.type==='add'? '/AF/addUserInfo' : '/AF/updateUserInfo') + "?" + this.$qs.stringify({ ...this.form}))
-            if(res.data.success){
-                this.$emit('getData');
-                this.$emit('update:visible', false);
-            }
-            this.submitLoading = false
-        }
-    }
-}
-</script>
-
-<style>
-
-</style>

+ 0 - 93
src/views/back-stage-management/dialog.vue

@@ -1,93 +0,0 @@
-<template>
-    <el-dialog :before-close="() => { $emit('update:visible', false) }" :title="type==='add'?'分配接待人':'重新分配接待人'" :visible.sync="visible" width="600" :close-on-click-modal="false">
-        <el-form inline ref="form"  :model="form" label-width="120px">
-            <el-form-item :label="'当前客户:'" prop="name">
-                {{value.name || ''}},{{value.phone || ''}}
-            </el-form-item>
-            <el-form-item :label="'当前接待人:'" prop="userName" v-if="type!=='add'">
-                {{value.userName || ''}},{{value.userPhone || ''}}
-            </el-form-item>
-        </el-form>
-        <div class="onSubmitBox">
-            <el-input v-model="input" placeholder="接待人/接待人手机号"></el-input>
-            <el-button @click="onSubmit">{{'查询'}}</el-button>
-        </div>
-         <el-table
-            :data="tableData"
-            border
-            height="400"
-            v-loading="loading"
-            style="width: 100%">
-            <el-table-column prop="userName" label="接待人"></el-table-column>
-            <el-table-column prop="phone" label="接待人手机号"></el-table-column>
-            <el-table-column label="操作">
-                <template slot-scope="scope">
-                    <el-button type="text" size="small" @click="distribution(scope.row)" :disabled="type!=='add' && value.phone === scope.row.phone">分配</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
-    </el-dialog>
-</template>
-
-<script>
-export default {
-    props:['visible', 'type', 'value','tableDataUser'],
-        watch: {
-            visible: function(val) {
-                if (val) {
-                    this.input = ''
-                    this.tableData = this.tableDataUser
-                    switch (this.type) {
-                    case 'add':
-                        break;
-                    case 'edit':
-                        break;
-                    default:
-                        break;
-                    }
-                }
-            },
-        },
-    data(){
-        return{
-            input:'',
-            submitLoading:false,
-            loading:false,
-            tableData:[],
-            form:{}
-        }
-    },
-    methods:{
-        async distribution(row){
-            this.loading = true
-            let res = await this.$axios.post('/AF/editRegisterInfo' + "?" + this.$qs.stringify({ ...this.value,userId:row.id}))
-            if(res.data.success){
-                this.$emit('getData');
-                this.$emit('update:visible', false);
-            }
-            this.loading = false
-        },
-        onSubmit(){
-            if(!this.input) return this.tableData = this.tableDataUser.map(val=> val)
-            this.tableData = this.tableDataUser.filter(val=> val.userName.indexOf(this.input) !== -1 || val.phone.indexOf(this.input) !== -1)
-        },
-    }
-}
-</script>
-
-<style scoped lang="scss">
-/deep/.el-dialog__body{
-    padding-top: 0;
-}
-.el-form-item{
-    width: 100%;
-    margin-bottom: 0;
-}
-.onSubmitBox{
-    display: flex;
-    margin-bottom: 10px;
-    .el-input{
-        margin-right: 20px;
-    }
-}
-</style>

+ 0 - 198
src/views/back-stage-management/index.vue

@@ -1,198 +0,0 @@
-<template>
-  <div class="mainBox">
-    <div class="title">
-      <span>{{activeName === 'first' ? '已预约人数:' + tableDataCustomer.length + '人' : '商务负责人:' + tableDataUser.length + '位'}}</span>永天科技-安博会人员信息管理
-    </div>
-    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-      <el-tab-pane label="客户信息" name="first"></el-tab-pane>
-      <el-tab-pane label="接待人信息" name="second"></el-tab-pane>
-    </el-tabs>
-    <div class="tableBox">
-      <el-form :inline="true" :model="formInline" class="demo-form-inline">
-        <el-form-item label="" v-if="activeName === 'first'">
-          <el-input v-model="formInline.customer" placeholder="客户姓名/联系电话"></el-input>
-        </el-form-item>
-        <el-form-item label="">
-          <el-input v-model="formInline.user" placeholder="接待人/接待人手机号"></el-input>
-        </el-form-item>
-        <el-form-item label="是否已分配" v-if="activeName === 'first'">
-            <el-select v-model="formInline.distribution" placeholder="">
-            <el-option label="全部" :value="0"></el-option>
-            <el-option label="已分配" :value="1"></el-option>
-            <el-option label="未分配" :value="2"></el-option>
-            </el-select>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="onSubmit()">查询</el-button>
-          <el-button type="primary" @click="exportExcel()">导出</el-button>
-          <el-button type="primary" @click="type = 'add';dialogUserVisible = true" v-if="activeName === 'second'">新增接待人</el-button>
-        </el-form-item>
-      </el-form>
-      <div class="tableList">
-        <el-table
-            :data="tableData"
-            border
-            height="100%"
-            id="userTable"
-            style="width: 100%">
-            <template v-if="activeName === 'first'">
-                <el-table-column prop="name" label="客户姓名" show-overflow-tooltip></el-table-column>
-                <el-table-column prop="phone" label="联系电话" show-overflow-tooltip></el-table-column>
-                <el-table-column prop="companyName" label="客户单位名称" show-overflow-tooltip></el-table-column>
-                <el-table-column prop="post" label="职位" show-overflow-tooltip></el-table-column>
-                <el-table-column prop="sf" label="省份" show-overflow-tooltip></el-table-column>
-                <el-table-column prop="dateOfVisit" label="到访日期" show-overflow-tooltip></el-table-column>
-                <el-table-column prop="accompany" label="随行人数" show-overflow-tooltip>
-                  <template slot-scope="scope">
-                    {{ scope.row.accompany === 1 ? '1-3人' : scope.row.accompany === 2 ? '3-7人' : '7人以上' }}
-                  </template>
-                </el-table-column>
-                <el-table-column prop="userName" label="接待人" show-overflow-tooltip></el-table-column>
-                <el-table-column prop="userPhone" label="接待人手机号" show-overflow-tooltip></el-table-column>
-            </template>
-            <template v-if="activeName === 'second'">
-                <el-table-column prop="userName" label="接待人"></el-table-column>
-                <el-table-column prop="phone" label="接待人手机号"></el-table-column>
-                <!-- <el-table-column prop="phone" label="登录账号"></el-table-column> -->
-                <!-- <el-table-column prop="zip" label="接待客户数(人)"></el-table-column> -->
-            </template>
-            <el-table-column label="操作" v-if="!isExportExcel">
-                <template slot-scope="scope">
-                    <template v-if="activeName === 'first'">
-                        <el-button type="text" size="small" v-if="!scope.row.userPhone" @click="type = 'add';currentRow = scope.row;dialogVisible = true">分配接待人</el-button>
-                        <el-button type="text" size="small" v-else @click="type = 'edit';currentRow = scope.row;dialogVisible = true">重新分配</el-button>
-                    </template>
-                    <template v-else-if="activeName === 'second'">
-                        <el-button type="text" size="small" @click="type = 'edit';currentRow = scope.row;dialogUserVisible = true">修改</el-button>
-                        <!-- <el-button type="text" size="small" style="color:red;" @click="deleteClick(scope.row)">删除</el-button> -->
-                    </template>
-                </template>
-            </el-table-column>
-        </el-table>
-      </div>
-    </div>
-    <el-dialog :visible.sync="dialogVisible" :type="type" v-model="currentRow" @getData="getDataCustomer" :tableDataUser="tableDataUser"></el-dialog>
-    <el-dialog-user :visible.sync="dialogUserVisible" :type="type" v-model="currentRow" @getData="getDataReception"></el-dialog-user>
-  </div>
-</template>
-
-<script>
-import elDialog from './dialog';
-import elDialogUser from './dialog-user';
-import FileSaver from 'file-saver'
-import XLSX from 'xlsx'
-export default {
-components: {
-    elDialog,
-    elDialogUser
-},
-data() {
-    return {
-      activeName: "first",
-      formInline: {
-        user: "",
-        customer: "",
-        distribution: 0,
-      },
-      tableData:[],
-      tableDataUser:[],
-      tableDataCustomer:[],
-      dialogVisible:false,
-      dialogUserVisible:false,
-      isExportExcel:false,
-      type:null,
-      currentRow:{}
-    };
-  },
-  mounted(){
-      this.getDataCustomer()
-      this.getDataReception()
-  },
-  methods: {
-    async getDataCustomer(){
-        let res = await this.$axios.post('/AF/listAppointment')
-        if(res.data.success){
-            this.tableDataCustomer = res.data.data
-        }
-        this.onSubmit()
-    },
-    async getDataReception(){
-        let res = await this.$axios.post('/AF/listUserInfo')
-        if(res.data.success){
-            this.tableDataUser = res.data.data
-        }
-        this.onSubmit()
-    },
-    handleClick(tab, event) {
-        console.log(tab, event);
-        this.onSubmit()
-    },
-    // deleteClick(row){
-
-    // },
-    exportExcel () {
-      this.isExportExcel = true
-      this.$nextTick(()=>{
-        //指定想要导出表格的id
-        let wb = XLSX.utils.table_to_book(document.querySelector('#userTable'))
-        wb.Sheets.Sheet1['!cols'] = [ {wpx: 100}, { wpx:100}, { wpx:100}, { wpx:100}, { wpx:100}, { wpx:100}, { wpx:100}, { wpx:100}, { wpx:100}, { wpx:100}, { wpx:100}, { wpx:100},]
-        console.log(wb)
-        //数据写入
-        let wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' })
-        // console.log(wbout)
-        try {
-          //表格的参数
-          FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), 'user.xlsx')
-        } catch (e) { 
-        if(typeof console !== 'undefined') console.log(e, wbout) 
-        }
-        this.isExportExcel = false
-        return wbout;
-      })
-    },
-    onSubmit() {
-        if(this.activeName === 'first'){
-            this.tableData = this.tableDataCustomer.filter(val=>{
-                return (!this.formInline.user || (val.userName && val.userName.indexOf(this.formInline.user) !== -1) || (val.userPhone && val.userPhone.indexOf(this.formInline.user) !== -1)) && 
-                (!this.formInline.customer || val.name.indexOf(this.formInline.customer) !== -1 || val.phone.indexOf(this.formInline.customer) !== -1) && 
-                (this.formInline.distribution === 0 || (this.formInline.distribution === 1 && !!val.userPhone) || (this.formInline.distribution === 2 && !val.userPhone)) 
-            })
-        } else if(this.activeName === 'second'){
-            this.tableData = this.tableDataUser.filter(val=>{
-                return (!this.formInline.user || (val.userName && val.userName.indexOf(this.formInline.user) !== -1) || (val.phone && val.phone.indexOf(this.formInline.user) !== -1)) 
-            })
-        } else{
-            this.tableData = []
-        }
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.mainBox {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  padding: 20PX;
-  box-sizing: border-box;
-  overflow: hidden;
-  .title {
-    text-align: center;
-    font-size: 20PX;
-    margin-bottom: 20PX;
-    span {
-      float: left;
-    }
-  }
-  .tableBox {
-    flex: 1;
-    display: flex;
-    flex-direction: column;
-    .tableList{
-        flex: 1;
-    }
-  }
-}
-</style>

+ 0 - 401
src/views/business-end/index.vue

@@ -1,401 +0,0 @@
-<template>
-  <div class="mianBox">
-    <template v-if="isLogin">
-      <div class="mianBoxF">
-        <div class="titleType">
-          <div>我的预约客户({{tableData.length}}人)</div>
-          <div>商务端</div>
-        </div>
-        <van-divider />
-        <van-form validate-trigger="onSubmit" class="formS" :submit-on-enter="false" ref="formS" :show-error="false">
-          <van-field v-model="searchForm.phone" size="tel" name="手机" type="tel" placeholder="客户姓名/联系电话"/>
-          <van-button plain block type="info" native-type="submit" @click="getData()">查询</van-button>
-        </van-form>
-        <div class="tableBox">
-          <el-table border fit :data="tableData" height="100%" style="width: 100%">
-            <el-table-column prop="name" label="客户姓名"> </el-table-column>
-            <el-table-column prop="phone" label="联系电话"> </el-table-column>
-            <el-table-column prop="companyName" label="单位名称"> </el-table-column>
-            <el-table-column prop="post" label="职位"> </el-table-column>
-            <el-table-column prop="sf" label="省份"> </el-table-column>
-            <el-table-column prop="dateOfVisit" label="到访日期"> </el-table-column>
-            <el-table-column prop="accompany" label="随行人数">
-              <template slot-scope="scope">
-                {{ scope.row.accompany === 1 ? '1-3人' : scope.row.accompany === 2 ? '3-7人' : '7人以上' }}
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </div>
-    </template>
-    <template v-else>
-      <img src="../../assets/image/title.png" alt="" class="title" />
-      <div class="ckyyxx">第20届上海国际社会</div> 
-      <div class="kjdl">公共安全展览会</div>
-      <div class="formBox">
-        <van-form
-          @submit="onSubmit"
-          validate-trigger="onSubmit"
-          :submit-on-enter="false"
-          ref="formT"
-          :show-error="false"
-        >
-          <van-field
-            v-model="form.phone"
-            name="手机"
-            type="tel"
-            placeholder="请输入你的手机号"
-            :rules="[
-              {
-                required: true,
-                pattern: /^1[345678]\d{9}$/,
-                message: '请输入正确的手机号',
-              },
-            ]"
-          />
-          <van-field
-            v-model="form.password"
-            name="密码"
-            type="password"
-            placeholder="请输入密码"
-            :rules="[{ required: true, message: '请输入密码' }]"
-          >
-          </van-field>
-          <div style="margin: 16px">
-            <van-button plain round block type="info" native-type="submit"
-              >立即登录</van-button
-            >
-          </div>
-        </van-form>
-      </div>
-    </template>
-  </div>
-</template>
-
-<script>
-// import { Notify } from "vant";
-export default {
-  data() {
-    return {
-      isLogin: false,
-      form: {
-        phone: "",
-        password: "",
-      },
-      searchForm: {
-        phone: "",
-      },
-      tableData:[],
-      tableDataList:[],
-    };
-  },
-  mounted() {
-  },
-  destroyed() {
-    this.isLogin = false;
-  },
-  methods: {
-    async getData() {
-      this.tableData = this.tableDataList.filter(val=>val.phone.indexOf(this.searchForm.phone)!==-1 || val.name.indexOf(this.searchForm.phone)!==-1)
-    },
-    async onSubmit() {
-      let res = await this.$axios.post(
-        "/AF/userLogin" +
-          "?" +
-          this.$qs.stringify({
-            ...this.form,
-          })
-      );
-      if (res.data.success) {
-        this.tableDataList = res.data.data
-        this.tableData = res.data.data
-        this.isLogin = true;
-        for (const key in this.form) {
-          this.form[key] = "";
-        }
-        this.$refs.formT.resetValidation();
-      }
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.mianBox {
-  width: 100vw;
-  height: 100vh;
-  background: url("../../assets/image/bg2.png");
-  background-size: 100% 100%;
-  font-family: PingFangSC-Medium, PingFang SC;
-  color: #ffffff;
-  position: relative;
-  overflow: hidden;
-  .mianBoxF {
-    width: 100%;
-    height: 100%;
-    display: flex;
-    flex-direction: column;
-  }
-  .titleType {
-    width: 100%;
-    display: flex;
-    justify-content: space-between;
-    align-items: flex-end;
-    padding: 0 30px;
-    height: 60px;
-    box-sizing: border-box;
-  }
-  .formS {
-    display: flex;
-    padding: 0 30px 20px;
-    width: 100%;
-    box-sizing: border-box;
-    align-items: flex-end;
-    /deep/ .van-field {
-      flex: 1;
-      margin-right: 20px;
-      font-size: 28px;
-      padding-left: 0;
-      background: transparent;
-      border: none;
-      border-bottom: 1px solid #fff;
-      padding: 10px;
-      .van-field__label {
-        color: #fff;
-      }
-      &::after {
-        display: none;
-      }
-      input {
-        color: #fff;
-      }
-      .van-field__button {
-        border-left: 1px solid #d8d8d8;
-      }
-      .hqyzm {
-        font-size: 24px;
-        font-weight: 400;
-        color: #ffc27b;
-        line-height: 33px;
-      }
-    }
-    .van-button {
-      height: 70px;
-      width: 150px;
-    }
-  }
-  .tableBox {
-    flex: 1;
-    padding: 20px 30px;
-    box-sizing: border-box;
-    /deep/.el-table {
-      background: transparent !important;
-      color: #fff;
-      border-color: rgba(0, 250, 251, 0.20);
-      &::before{
-          background: rgba(0, 250, 251, 0.20);
-      }
-      &::after{
-          background: rgba(0, 250, 251, 0.20);
-      }
-      table,
-      tr,
-      td,
-      th {
-        background: transparent !important;
-        color: #fff;
-        border-color: rgba(0, 250, 251, 0.20);
-      }
-      .el-table__empty-text {
-        background: transparent;
-        color: #fff;
-        border-color: rgba(0, 250, 251, 0.20);
-      }
-        .el-table__expand-icon {
-            color: #FFF;
-        }
-    }
-    /deep/ table {
-        tr,
-        td {
-            background: rgba(0, 251, 251, .051) !important;
-            color: #FFF;
-            border-color: rgba(0, 250, 251, 0.20);
-        }
-        tr {
-            margin-bottom: 1px;
-        }
-        th {
-            color: #FFF;
-            background: rgba(0, 250, 251, 0.20);
-            border-color: transparent;
-        }
-        thead {
-            th {
-                border-color: rgba(0, 250, 251, 0.20) !important;
-            }
-        }
-    }
-  }
-  .ckyyxx {
-    position: absolute;
-    top: 210px;
-    left: 55px;
-    height: 59px;
-    font-size: 42px;
-    font-weight: 500;
-    line-height: 59px;
-    letter-spacing: 1px;
-  }
-  .kjdl {
-    position: absolute;
-    left: 55px;
-    top: 283px;
-    height: 33px;
-    font-size: 24px;
-    font-weight: 400;
-    line-height: 33px;
-    letter-spacing: 1px;
-  }
-  .infoBtn {
-    position: absolute;
-    bottom: 100px;
-    left: 0;
-    right: 0;
-    margin: 0 auto;
-    width: 600px;
-  }
-  .van-steps {
-    margin-top: 50px;
-    background: transparent;
-    .van-step {
-      color: #fff;
-      font-size: 26px;
-      font-weight: 400;
-      color: #ffffff;
-      line-height: 37px;
-      letter-spacing: 1px;
-      span {
-        display: block;
-      }
-      &::after {
-        display: none;
-      }
-    }
-  }
-  .infoBox {
-    position: absolute;
-    top: 500px;
-    left: o;
-    padding: 0 50px 0 30px;
-    box-sizing: border-box;
-    width: 100vw;
-    height: auto;
-    .titleInfo {
-      display: flex;
-      align-items: center;
-      margin-left: 27px;
-      span {
-        width: 10px;
-        height: 40px;
-        background: linear-gradient(180deg, #0016ff 0%, #c724f8 100%);
-        display: inline-block;
-        margin-right: 20px;
-      }
-    }
-  }
-  .title {
-    position: absolute;
-    top: 54px;
-    right: 58px;
-    width: 110px;
-    height: 55px;
-  }
-  .gjsh {
-    position: absolute;
-    top: 200px;
-    left: 50px;
-    height: 43px;
-    font-size: 39px;
-    font-weight: 400;
-    line-height: 59px;
-    letter-spacing: 1px;
-  }
-  .ggaq {
-    position: absolute;
-    left: 50px;
-    top: 260px;
-    height: 86px;
-    font-size: 86px;
-    font-weight: bold;
-    line-height: 129px;
-    letter-spacing: 1px;
-  }
-  .ggaqEl {
-    position: absolute;
-    left: 55px;
-    top: 375px;
-    height: 38px;
-    font-size: 34px;
-    font-family: ArialMT;
-    line-height: 39px;
-    letter-spacing: 4px;
-    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
-  }
-  .formBox {
-    position: absolute;
-    top: 360px;
-    left: 0;
-    right: 0;
-    margin: auto;
-    width: 670px;
-    // height: 1069px;
-    border-radius: 8px;
-    margin: 0 auto;
-    margin-top: 40px;
-    padding: 40px;
-    box-sizing: border-box;
-    .van-form {
-      /deep/ .van-field {
-        font-size: 28px;
-        padding-left: 0;
-        margin-top: 25px;
-        background: transparent;
-        border: none;
-        border-bottom: 1px solid #fff;
-        .van-field__label {
-          color: #fff;
-        }
-        &::after {
-          display: none;
-        }
-        input {
-          color: #fff;
-        }
-        .van-field__button {
-          border-left: 1px solid #d8d8d8;
-        }
-        .hqyzm {
-          font-size: 24px;
-          font-weight: 400;
-          color: #ffc27b;
-          line-height: 33px;
-        }
-      }
-      .infoT {
-        font-size: 24px;
-        font-weight: 300;
-        color: #ffffff;
-        line-height: 33px;
-        text-align: right;
-        width: 100%;
-        display: block;
-        margin-top: 16px;
-      }
-      .van-button {
-        margin-top: 120px;
-      }
-    }
-  }
-}
-</style>

+ 103 - 0
src/views/home/echarts1.js

@@ -0,0 +1,103 @@
+import * as echarts from "echarts";
+export default function getData() {
+    let params = [
+        [20, 22, 11, 24, 20, 30, 10],
+        [20, 32, 19, 34, 19, 30, 20]
+    ]
+    console.log(params)
+    return {
+        color: ['rgba(77,237,255,1)', 'rgba(228,46,121,1)', ],
+        tooltip: {
+            trigger: 'axis',
+            axisPointer: {
+                type: 'cross',
+                label: {
+                    backgroundColor: '#6a7985'
+                }
+            }
+        },
+        toolbox: {},
+        grid: {
+            left: 0,
+            right: 10,
+            bottom: 0,
+            top: 20,
+            containLabel: true
+        },
+        xAxis: [{
+            type: 'category',
+            boundaryGap: false,
+            axisLabel: {
+                color: "#FFFFFF",
+            },
+            axisTick: {
+                show: false,
+            },
+            data: ['1', '2', '3', '4', '5', '6', '7']
+        }],
+        yAxis: [{
+            type: 'value',
+            axisLabel: {
+                color: "#FFFFFF",
+            },
+            axisTick: {
+                show: false,
+            },
+            splitLine: {
+                show: true,
+                lineStyle: {
+                    color: "rgba(44,90,101,.5)",
+                }
+            }
+        }],
+        series: [{
+                name: '离线警告',
+                type: 'line',
+                stack: '总量',
+                smooth: true,
+                lineStyle: {
+                    width: 0
+                },
+                // showSymbol: false,
+                areaStyle: {
+                    opacity: 0.8,
+                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                        offset: 0,
+                        color: 'rgba(77,237,255,1)'
+                    }, {
+                        offset: 1,
+                        color: 'rgba(77,237,255,.1)'
+                    }])
+                },
+                emphasis: {
+                    focus: 'series'
+                },
+                data: params[0]
+            },
+            {
+                name: '异常警告',
+                type: 'line',
+                stack: '总量',
+                smooth: true,
+                lineStyle: {
+                    width: 0
+                },
+                // showSymbol: false,
+                areaStyle: {
+                    opacity: 0.8,
+                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                        offset: 0,
+                        color: 'rgba(228,46,121,1)'
+                    }, {
+                        offset: 1,
+                        color: 'rgba(228,46,121,.1)'
+                    }])
+                },
+                emphasis: {
+                    focus: 'series'
+                },
+                data: params[1]
+            },
+        ]
+    };
+}

+ 95 - 0
src/views/home/echarts2.js

@@ -0,0 +1,95 @@
+import * as echarts from "echarts";
+export default function getData() {
+    let data = Array.from(Array(7)).map((val, ind) => {
+        let day = new Date(new Date().getTime() - (7 - ind - 1) * 24 * 60 * 60 * 1000)
+        return {
+            day: (day.getMonth() + 1) + "." + (day.getDate() < 10 ? "0" + day.getDate() : day.getDate()),
+            val: {
+                value: Math.ceil(Math.random() * 10),
+                itemStyle: {
+                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                        offset: 0,
+                        color: 'rgba(77,237,255,1)'
+                    }, {
+                        offset: 1,
+                        color: 'rgba(77,237,255,.1)'
+                    }])
+                },
+            }
+        }
+    })
+    return {
+        color: ["rgba(4,187,255,1)"],
+        xAxis: {
+            type: "category",
+            // data: data.map(val => val.day),
+            data: data.map((val, ind) => ind + 1),
+            axisLabel: {
+                color: "#FFFFFF",
+            },
+            axisTick: {
+                show: false,
+            },
+            axisLine: {
+                show: true,
+                lineStyle: {
+                    color: "rgba(44,90,101,1)",
+                }
+            },
+        },
+        yAxis: {
+            type: "value",
+            max: function(value) {
+                return value.max + value.max * 0.2;
+            },
+            axisLine: {
+                show: true,
+                lineStyle: {
+                    color: "rgba(44,90,101,1)",
+                }
+            },
+            axisLabel: {
+                color: "#FFFFFF",
+            },
+            axisTick: {
+                show: false,
+            },
+            splitLine: {
+                show: true,
+                lineStyle: {
+                    color: "rgba(44,90,101,.5)",
+                }
+            }
+        },
+        grid: {
+            top: 20,
+            left: 25,
+            right: 10,
+            bottom: 20,
+        },
+        series: [{
+            type: "pictorialBar",
+            barCategoryGap: "50%",
+            symbol: 'path://M0,10 L10,10 L5,0 L0,10 z',
+            label: {
+                normal: {
+                    show: true,
+                    position: "top",
+                    textStyle: {
+                        color: "#fff",
+                    }
+                }
+            },
+            showBackground: true,
+            backgroundStyle: {
+                color: "rgba(25,63,128,1)"
+            },
+            // markPoint: {
+            //     data: [
+            //         { type: 'max', name: '最大值', label: { color: "#fff", } },
+            //     ]
+            // },
+            data: data.map(item => item.val),
+        }, ],
+    }
+}

+ 234 - 258
src/views/home/index.scss

@@ -1,291 +1,267 @@
 .home {
-    background-image: url("../../assets/image/bg.png");
-    background-size: 100% 100%;
-    width: 750px;
-    // height: 3522px;
-    color: #fff;
-    overflow: hidden;
-    font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-    .title {
-        height: 54px;
+    height: 100%;
+    width: 100%;
+    background: #06162A;
+    color: #FFF;
+    .headerBox {
         width: 100%;
+        height: 80px;
+        background: url('../../assets/image/header.png');
+        background-size: 100% 100%;
         display: flex;
-        justify-content: space-between;
-        align-items: center;
-        box-sizing: border-box;
-        margin-top: 44px;
-        padding: 0 30px;
-        .logo {
+        .headerLeft,
+        .headerRight {
+            width: 620px;
+            // background: #000;
+            display: flex;
+            // justify-content: space-between;
+            align-items: center;
+            height: 50px;
+        }
+        .headerLeft {
+            padding: 0 20px;
+            box-sizing: border-box;
+            div {
+                margin-right: 20px;
+            }
+            .week {
+                margin-right: 70px;
+            }
             img {
-                width: 109px;
-                height: 54px;
+                width: 29px;
             }
         }
-        .yyInfo {
-            color: #ffc27b;
-            font-size: 24px;
-        }
-    }
-    .sh {
-        margin-top: 83px;
-        padding-left: 60px;
-        font-size: 39px;
-        letter-spacing: 1px;
-        font-weight: 400;
-    }
-    .gg {
-        font-size: 86px;
-        letter-spacing: 1px;
-        font-weight: bold;
-        text-align: center;
-        margin-top: 23px;
-    }
-    .ggEl {
-        height: 38px;
-        font-size: 34px;
-        font-family: ArialMT;
-        color: #ffffff;
-        line-height: 39px;
-        letter-spacing: 4px;
-        text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
-        text-align: center;
-    }
-    .blh {
-        font-size: 30px;
-        font-family: SourceHanSansCN-Normal, SourceHanSansCN;
-        font-weight: 400;
-        color: #ffffff;
-        line-height: 45px;
-        letter-spacing: 1px;
-        margin-top: 20px;
-        text-align: center;
-    }
-    .yqh {
-        margin-top: 640px;
-        font-size: 52px;
-        text-align: center;
-    }
-    .yqhEl {
-        font-family: FZYOUHS_504L--GB1-0, FZYOUHS_504L--GB1;
-        font-weight: normal;
-        color: #ffffff;
-        line-height: 24px;
-        letter-spacing: 10px;
-        text-align: center;
-        font-size: 22px;
-    }
-    .ghgl {
-        font-size: 30px;
-        font-family: SourceHanSansCN-Light, SourceHanSansCN;
-        font-weight: 300;
-        color: #ffffff;
-        line-height: 61px;
-        letter-spacing: 12px;
-        text-align: center;
-    }
-    .yyfs {
-        font-size: 35px;
-        font-family: PingFangSC-Medium, PingFang SC;
-        font-weight: 500;
-        color: #ffffff;
-        line-height: 49px;
-        text-align: center;
-        color: #ccc;
-        span {
-            color: #fff;
-            margin: 0 20px;
+        .headerCenter {
+            flex: 1;
         }
-    }
-    .yyfsEl {
-        font-size: 20px;
-        text-transform: Uppercase;
-        font-weight: normal;
-        color: #ffffff;
-        line-height: 23px;
-        letter-spacing: 3px;
-        text-align: center;
-    }
-    .formBox {
-        width: 670px;
-        // height: 1069px;
-        background: linear-gradient(360deg, #0f2471 0%, #171f44 100%);
-        box-shadow: 0px 5px 24px -14px #040414;
-        border-radius: 8px;
-        margin: 0 auto;
-        margin-top: 40px;
-        padding: 40px;
-        box-sizing: border-box;
-        .van-form {
-            /deep/ .van-field {
-                margin-top: 25px;
-                background: transparent;
-                border: 1px solid blue;
-                .van-field__label {
-                    color: #fff;
-                }
-                &::after {
-                    display: none;
-                }
-                input {
-                    color: #fff;
-                }
-                .van-field__button {
-                    border-left: 1px solid #d8d8d8;
-                }
-                .hqyzm {
-                    font-size: 24px;
-                    font-weight: 400;
-                    color: #ffc27b;
-                    line-height: 33px;
+        .headerRight {
+            justify-content: space-between;
+            padding-right: 30px;
+            box-sizing: border-box;
+            .boxBgRight {
+                width: 175px;
+                height: 50px;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                background: url('../../assets/image/boxTitle.png');
+                background-size: 100% 100%;
+                line-height: 18px;
+                img {
+                    margin-right: 5px;
+                    width: 18px;
+                    height: 18px;
                 }
             }
-            .infoT {
-                font-size: 24px;
-                font-weight: 300;
-                color: #ffffff;
-                line-height: 33px;
-                text-align: right;
-                width: 100%;
-                display: block;
-                margin-top: 16px;
-            }
         }
     }
-    .hdxxInfo {
-        width: 670px;
-        height: 233px;
-        background: linear-gradient(360deg, #0f2471 0%, #171f44 100%);
-        box-shadow: 0px 5px 24px -14px rgba(0, 0, 0, 0.14);
-        border-radius: 4px;
-        border: 1px solid rgba(81, 111, 255, 0.5);
-        border-radius: 8px;
-        margin: 0 auto;
-        margin-top: 40px;
-        padding: 40px;
+    .contentBox {
+        width: 100%;
+        height: calc(100% - 80px);
+        padding-bottom: 10px;
         box-sizing: border-box;
-    }
-    .hdxxInfoLable {
-        font-size: 26px;
-        font-weight: 400;
-        color: #ffffff;
-        line-height: 37px;
-        letter-spacing: 2px;
-        margin-bottom: 18px;
         display: flex;
-        align-items: center;
-        span {
-            width: 1px;
-            height: 28px;
-            background: #ffffff;
-            opacity: 0.5;
-            margin-right: 25px;
-            display: inline-block;
-        }
-        .boldColor {
-            color: #ffc27b;
-            font-style: inherit;
-            font-size: 32px;
-            margin: 0 4px;
-        }
-    }
-    .bottomBox {
-        display: flex;
-        justify-content: space-between;
-        padding: 80px 30px;
-        box-sizing: border-box;
-        .bottomBoxL {
+        .mapBox {
             flex: 1;
-            padding: 0 20px;
-            width: 63%;
-            .title1 {
-                height: 30px;
-                font-size: 22px;
-                font-weight: 300;
-                color: #ffffff;
-                line-height: 30px;
-            }
-            .title2 {
-                margin-top: 15px;
-                height: 58px;
-                font-size: 18px;
-                font-weight: 300;
-                color: #ffffff;
-                line-height: 35px;
+            padding: 0 10px;
+            box-sizing: border-box;
+            position: relative;
+            .Amap {
+                width: 100%;
+                height: 100%;
+                background: skyBlue;
             }
-            .title3 {
-                margin-top: 25px;
-                height: 87px;
-                font-size: 18px;
-                font-weight: 300;
-                color: #ffffff;
-                line-height: 35px;
+            .rightIconBox {
+                position: absolute;
+                right: 10px;
+                bottom: 0;
+                width: 115px;
+                height: 160px;
+                background: rgba(0, 69, 164, 0.4);
+                display: flex;
+                flex-direction: column;
+                flex-wrap: wrap;
+                // border: 1px solid #00d2ff;
+                span {
+                    // width: 80px;
+                    width: 100%;
+                    height: 1px;
+                    padding: 0;
+                    margin: 0 auto;
+                    background-image: linear-gradient( rgba(255, 255, 255, 0.1), #999, rgba(255, 255, 255, 0.1));
+                }
+                div {
+                    width: 100%;
+                    height: 50px;
+                    // border-bottom: 1px solid #ffffff;
+                    display: flex;
+                    justify-content: center;
+                    align-items: center;
+                    img {
+                        width: 27px;
+                        height: 32px;
+                        margin-right: 10px;
+                    }
+                    &:last-child {
+                        border: none;
+                    }
+                }
             }
         }
-        .bottomBoxR {
-            width: 37%;
+        .echartsBox {
+            width: 520px;
+            box-sizing: border-box;
             display: flex;
-            justify-content: flex-end;
             flex-direction: column;
-            align-items: center;
-            .bottomBoxRT {
-                font-size: 16px;
-                color: #ffffff;
-                text-align: center;
-                span {
-                    font-size: 14px;
+            &>div {
+                flex: 1;
+                width: 100%;
+                margin-bottom: 10px;
+                background: rgba(14, 37, 76, 1);
+                padding: 10px;
+                box-sizing: border-box;
+                max-height: 25%;
+                .titleBox {
+                    width: 100%;
+                    height: 23px;
+                    background: url('../../assets/image/title.png');
+                    background-size: 100% 100%;
+                    text-indent: 10px;
+                    font-size: 16px;
+                    font-weight: bold;
+                }
+                .echartsBoxList {
+                    height: calc(100% - 23px);
+                    width: 100%;
+                    display: flex;
+                    align-items: center;
+                }
+                .box1Left {
+                    width: 40%;
+                    height: 100%;
+                    display: flex;
+                    justify-content: center;
+                    align-items: center;
+                    flex-direction: column;
+                    img {
+                        height: 101px;
+                        width: 121px;
+                        margin-bottom: 15px;
+                    }
+                    span {
+                        background-image: linear-gradient(0deg, #6dbfff 0%, #fefeff 100%);
+                        -webkit-background-clip: text;
+                        -webkit-text-fill-color: transparent;
+                        font-size: 18px;
+                        font-family: Microsoft YaHei Regular, Microsoft YaHei Regular-Regular;
+                        font-weight: bold;
+                        text-align: left;
+                        color: #6ddaff;
+                    }
+                }
+                .box1Right {
+                    width: 60%;
+                    // height: 100%;
+                    display: flex;
+                    flex-wrap: wrap;
+                    justify-content: center;
+                    align-items: center;
+                    &>div {
+                        width: 50%;
+                        font-size: 16px;
+                        line-height: 44px;
+                        span {
+                            min-width: 50px;
+                            height: 30px;
+                            display: inline-block;
+                            vertical-align: middle;
+                            line-height: 30px;
+                            text-indent: 5px;
+                            background-image: linear-gradient(to right, #6dbfff26, transparent);
+                        }
+                    }
                 }
             }
-            img {
-                margin-top: 20px;
-                width: 158px;
-                height: 158px;
+            & div:last-child {
+                margin-bottom: 0;
             }
         }
     }
 }
 
-.successBox {
-    width: 550px;
-    height: 700px;
-    position: fixed;
-    left: 0;
-    top: 0;
-    bottom: 0;
-    right: 0;
-    margin: auto;
-    background: url("../../assets/image/bg1.png");
-    background-size: 100% 100%;
-    padding: 100px 60px 0;
-    box-sizing: border-box;
+.green {
+    color: rgba(75, 255, 105, 1);
+}
+
+.yellow {
+    color: rgba(255, 222, 0, 1);
+}
+
+.red {
+    color: rgba(255, 72, 8, 1);
+}
+
+.echartD {
+    width: 100%;
+    height: 100%;
     display: flex;
-    flex-direction: column;
-    align-items: center;
-    .iconSuccess {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        font-size: 48px;
-        font-weight: 500;
-        color: #ffffff;
-        line-height: 67px;
-        img {
-            width: 30px;
+    justify-content: center;
+}
+
+/deep/.el-table {
+    margin-top: 15px;
+    background: transparent;
+    color: #fff;
+    &::before {
+        display: none;
+    }
+    .tableHeaderClass,
+    .rowCalss {
+        height: 30px;
+        background: transparent;
+        color: #fff;
+        th,
+        td {
             height: 30px;
-            margin-right: 20px;
+            background: transparent;
+            color: #fff;
+            border-color: rgba(44, 90, 101, .5);
+        }
+        td {
+            padding: 10px 0;
+        }
+        .cell {
+            line-height: 15px;
+        }
+        .el-tag {
+            height: 20px;
+            line-height: 20px;
         }
     }
-    .tzxx {
-        height: 100px;
-        font-size: 30px;
-        font-weight: 300;
-        color: #FFFFFF;
-        line-height: 50px;
-        letter-spacing: 2px;
-        text-align: center;
-        margin-top: 35px;
+    .rowCalss {
+        &:hover {
+            background: transparent;
+            color: #fff;
+            th,
+            td {
+                background: transparent;
+                .cell {
+                    color: #6dbfff;
+                }
+            }
+        }
     }
-    .van-button {
-        margin-top: 100px;
-        width: 100%;
+    .el-table__body-wrapper {
+        scrollbar-width: none;
+        /* firefox */
+        -ms-overflow-style: none;
+        /* IE 10+ */
+        overflow-x: hidden;
+        overflow-y: auto;
+        &::-webkit-scrollbar {
+            display: none;
+            // opacity: 0;
+            /* Chrome Safari */
+        }
     }
 }

+ 464 - 188
src/views/home/index.vue

@@ -1,218 +1,494 @@
 <template>
   <div class="home">
-    <div class="title">
-      <div class="logo">
-        <img src="../../assets/image/title.png" alt="">
-      </div>
-      <div class="yyInfo" @click="$router.push('/subscribe-info')">预约信息</div>
-    </div>
-    <div class="sh">第20届上海国际社会</div>
-    <div class="gg">公共安全展览会</div>
-    <div class="ggEl">The 20th Shanghai CPSE Expo</div>
-    <div class="blh">暨上海国际警用及安防无人系统博览会</div>
-    <div class="yqh">邀请函</div>
-    <div class="yqhEl">INVITATION</div>
-    <div class="ghgl">永天科技诚挚地恭候您的光临!</div>
-    <van-divider dashed class="yyfs"><span>预约方式</span></van-divider>
-    <div class="yyfsEl">the appointment mode</div>
-    <div class="formBox">
-      <van-form @submit="onSubmit" validate-trigger="onSubmit" :submit-on-enter="false" ref="formT">
-        <van-field v-model="form.name" name="姓名" label="姓名*" type="text" placeholder="请输入你的姓名" :rules="[{ required:true, pattern: /^.{1,10}$/, message: '请输入姓名,不得超过10字' }]"/>
-        <span class="infoT">*请留真实信息,以便商务验证和联系您</span>
-        <van-field v-model="form.phone" name="手机*" label="手机" type="tel" placeholder="请输入你的手机号" :rules="[{ required:true, pattern: /^1[345678]\d{9}$/, message: '请输入正确的手机号' }]"/>
-        <van-field v-model="form.smsCode" name="验证码*" label="验证码" type="tel" placeholder="请输入验证码" :rules="[{ required:true, pattern: /^\d{6}$/, message: '请输入正确的验证码' }]">
-          <template #button> 
-            <van-loading v-if="smsCodeLoading"  color="#1989fa" />
-            <span class="hqyzm" v-else @click="getsmsCode">{{showsmsCode?'获取验证码':timesmsCode + 's'}}</span> 
-          </template>
-        </van-field>
-        <van-field v-model="form.companyName" name="单位名称*" label="单位名称" type="text" placeholder="请输入单位名称" :rules="[{ required:true, pattern: /^.{0,50}$/, message: '内容不得超过50字' }]"/>
-        <van-field v-model="form.post" name="职务" label="职务" type="text" placeholder="请输入单位职务" :rules="[{ required:false, pattern: /^.{0,30}$/, message: '内容不得超过30字' }]"/>
-        <van-field readonly clickable label="省份" :value="form.sf" placeholder="选择省份" @click="showPicker = true"/>
-        <van-popup v-model="showPicker" round position="bottom">
-          <van-picker show-toolbar :columns="columns" @cancel="showPicker = false" @confirm="onConfirm" />
-        </van-popup>
-
-        <van-field readonly clickable name="dateOfVisit" :value="form.dateOfVisit" label="到访日期" placeholder="点击选择到访日期" @click="showTimePicker = true" :rules="[{ required:true, message: '请选择到访日期' }]"/>
-        <van-popup v-model="showTimePicker" position="bottom">
-          <van-datetime-picker type="datetime" @confirm="onConfirmTime" @cancel="showTimePicker = false" :min-date="minDate" :max-date="maxDate" />
-        </van-popup>
-
-        <van-field readonly clickable label="随行人数" :value="form.accompanys" placeholder="选择随行人数" validate-trigger="onSubmit" @click="showacCompany = true"/>
-        <van-popup v-model="showacCompany" round position="bottom">
-          <van-picker show-toolbar :columns="columns2" @cancel="showacCompany = false" @confirm="onConfirmCompany" />
-        </van-popup>
-
-        <div style="margin: 16px;">
-          <van-button  plain round block type="info" native-type="submit">立即预约</van-button>
+    <div class="headerBox">
+      <div class="headerLeft">
+        <div>{{ dateDay }}</div>
+        <div class="time">{{ dataTime }}</div>
+        <div class="week">{{ timeWeek }}</div>
+        <div class="address">{{$store.state.weaterRes.aqiDetail.area}}</div>
+        <div class="weather">
+          <img :src="$store.state.weaterRes.weather_pic || ''" alt="" />
+        </div>
+        <div>
+          {{ $store.state.weaterRes.weather || "" }}
+          {{ $store.state.weaterRes.temperature || "" }}℃
         </div>
-      </van-form>
-    </div>
-    <van-divider dashed class="yyfs" style="margin-top:50px;"><span>活动信息</span></van-divider>
-    <div class="yyfsEl">the Activity information</div>
-    <div class="hdxxInfo">
-      <div class="hdxxInfoLable"><span></span>时间:2021.8.11-8.13</div>
-      <div class="hdxxInfoLable"><span></span>上海·世博馆<i class="boldColor">1</i> 号馆 展位号<i class="boldColor">E10</i></div>
-      <div class="hdxxInfoLable"><span></span>上海浦东新区国展路1099号</div>
-    </div>
-    <div class="bottomBox">
-      <div class="bottomBoxL">
-        <div class="title1">入场须知:</div>
-        <div class="title2">* 预约成功后将通过手机短信及电话回访的方式确认,请保持通话顺畅</div>
-        <div class="title3">* 如有疑问请咨询 :<br/> 电话:021-65376655<br/> 邮箱:yujia.chi@chinausky.com</div>
       </div>
-      <div class="bottomBoxR">
-        <div class="bottomBoxRT">FOLLOW US<br> <span>关注我们获取更多咨询</span></div>
-        <img src="../../assets/image/ewm.png" alt="">
+      <div class="headerCenter"></div>
+      <div class="headerRight">
+        <div class="boxBgRight">
+          <img src="../../assets/image/headerIcon.png" alt="" />巡检维保
+        </div>
+        <div>当前待处理:5</div>
       </div>
     </div>
-    <van-overlay :show="showSuccessBox">
-      <div class="successBox">
-        <div class="iconSuccess">
-          <img src="../../assets/image/icon.png" alt="">预约成功!
+    <div class="contentBox">
+      <div class="mapBox">
+        <div class="Amap" id="mapF"></div>
+        <div class="rightIconBox">
+          <div @click="isTypeMap('isNormal')"><img src="../../assets/image/zcIcon.png" alt="" />正常</div>
+          <span></span>
+          <div @click="isTypeMap('isWarning')"><img src="../../assets/image/jcIcon.png" alt="" />告警</div>
+          <span></span>
+          <div @click="isTypeMap('isLine')"><img src="../../assets/image/lxIcon.png" alt="" />离线</div>
         </div>
-        <div class="tzxx">我们会在24小时内联系您, 请保持手机通畅。</div>
-        <van-button plain round type="info" @click="showSuccessBoxC">知道了</van-button>
       </div>
-    </van-overlay>
+      <div class="echartsBox">
+        <div>
+          <div class="titleBox">整体情况</div>
+          <div class="echartsBoxList box1">
+            <div class="box1Left">
+              <img src="../../assets/image/jg.png" alt="" />
+              <span>井盖总数(100)</span>
+            </div>
+            <div class="box1Right">
+              <div>井盖在线数:<span class="green">90</span></div>
+              <div>在线率:<span class="green">90%</span></div>
+              <div>离线告警数:<span class="yellow">5</span></div>
+              <div>离线率:<span class="yellow">5%</span></div>
+              <div>异常告警数:<span class="red">5</span></div>
+              <div>告警率:<span class="red">5%</span></div>
+            </div>
+          </div>
+        </div>
+        <div>
+          <div class="titleBox">近7日告警情况统计</div>
+          <div class="echartsBoxList">
+            <div ref="echartD1" class="echartD"></div>
+          </div>
+        </div>
+        <div>
+          <div class="titleBox">近7日液位情况统计</div>
+          <div class="echartsBoxList">
+            <div ref="echartD2" class="echartD"></div>
+          </div>
+        </div>
+        <div>
+          <div class="titleBox">告警列表</div>
+          <el-table
+            :data="tableData"
+            style="width: 100%"
+            height="calc(100% - 38px)"
+            header-row-class-name="tableHeaderClass"
+            row-class-name="rowCalss"
+            fit
+            :highlight-current-row="false"
+          >
+            <el-table-column
+              prop="name"
+              label="设备编号"
+              :min-width="20"
+              show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column
+              prop="dpName"
+              label="告警类型"
+              :min-width="20"
+              show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column
+              prop="jf"
+              label="负责人"
+              :min-width="20"
+              show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column
+              prop="zl"
+              label="联系方式"
+              :min-width="20"
+              show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column
+              prop="je"
+              label="位置"
+              :min-width="20"
+              show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column
+              prop="time"
+              label="告警时间"
+              :min-width="20"
+              show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column
+              prop="time"
+              label="处理状态"
+              :min-width="20"
+              show-overflow-tooltip
+            >
+              <template #default="scope">
+                <el-tag
+                  :type="scope.$index > 2 ? 'success' : 'danger'"
+                  disable-transitions
+                  >{{ scope.$index > 2 ? "已处理" : "未处理" }}</el-tag
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
 <script>
 // @ is an alias to /src
-import { Notify } from 'vant';
+// import { Notify } from 'vant';
+import * as echarts from "echarts";
+import getDataE1 from "./echarts1";
+import getDataE2 from "./echarts2";
+import AMap from "AMap";
+import xh from "../../assets/image/xh.png";
+import dc from "../../assets/image/dc.png";
+import zcIcon from "../../assets/image/zcIcon.png";
+import jcIcon from "../../assets/image/jcIcon.png";
+import lxIcon from "../../assets/image/lxIcon.png";
 export default {
   data() {
     return {
-      form:{
-        name: '',//客户姓名
-        phone: '',//手机号
-        smsCode: '',//短信验证码
-        companyName: '',//单位名称
-        post: '',//职位
-        sf: '',//省份
-        dateOfVisit: '',//到访日期
-        accompany: '',//随行人数
-        remark: '',//备注
-        userId: '',//接待人ID
-        userName: '',//接待人姓名
-      },
-      minDate: new Date(2021, 7, 11 , 0,0,0),
-      maxDate: new Date(2021, 7, 13 , 23,59,59),
-      showTimePicker: false,
-      showacCompany: false,
-      showPicker: false,
-      showsmsCode:true,
-      timesmsCode:60,
-      showSuccessBox:false,
-      smsCodeLoading:false,
-      smsCodeInter:null,
-      columns: [
-        "北京市",
-        "天津市",
-        "河北省",
-        "山西省",
-        "内蒙古自治区",
-        "辽宁省",
-        "吉林省",
-        "黑龙江省",
-        "上海市",
-        "江苏省",
-        "浙江省",
-        "安徽省",
-        "福建省",
-        "江西省",
-        "山东省",
-        "河南省",
-        "湖北省",
-        "湖南省",
-        "广东省",
-        "广西省",
-        "海南省",
-        "重庆市",
-        "四川省",
-        "贵州省",
-        "云南省",
-        "西藏自治区",
-        "陕西省",
-        "甘肃省",
-        "青海省",
-        "宁夏回族自治区",
-        "新疆维吾尔自治区",
-        "台湾省",
-        "香港特别行政区",
-        "澳门特别行政区",
+      dateDay: "",
+      dataTime: "",
+      timeArea: "",
+      timeWeek: "",
+      weatherObj: {},
+      map: null,
+      echartsBox1: null,
+      echartsBox2: null,
+      dataWeekList: ["一", "二", "三", "四", "五", "六", "七"],
+      tableData: [
+        {
+          name: "0021",
+          dpName: "液位过高",
+          jf: "周文斌",
+          zl: "13571202367",
+          je: "江西省上饶市",
+          time: "15:23:26",
+        },
+        {
+          name: "0022",
+          dpName: "运行异常",
+          jf: "周文斌",
+          zl: "13571202367",
+          je: "江西省上饶市",
+          time: "15:22:00",
+        },
+        {
+          name: "0023",
+          dpName: "液位过高",
+          jf: "周文斌",
+          zl: "13571202367",
+          je: "江西省上饶市",
+          time: "15:21:00",
+        },
+        {
+          name: "0024",
+          dpName: "运行异常",
+          jf: "周文斌",
+          zl: "13571202367",
+          je: "江西省上饶市",
+          time: "15:20:00",
+        },
+        {
+          name: "0025",
+          dpName: "液位过高",
+          jf: "周文斌",
+          zl: "13571202367",
+          je: "江西省上饶市",
+          time: "15:19:00",
+        },
+        {
+          name: "0026",
+          dpName: "运行异常",
+          jf: "周文斌",
+          zl: "13571202367",
+          je: "江西省上饶市",
+          time: "15:18:00",
+        },
+        {
+          name: "0027",
+          dpName: "运行异常",
+          jf: "周文斌",
+          zl: "13571202367",
+          je: "江西省上饶市",
+          time: "15:17:00",
+        },
       ],
-      columns2: ['1-3人', '3-7人', '7人以上'],
-      infoForm:{
-
-      }
+      lnglats: [
+        { x: 118.004933, y: 28.47108, type: 1 },
+        { x: 118.004205, y: 28.470654, type: 2 },
+        { x: 118.005709, y: 28.471602, type: 3 },
+      ],
+      mapListType:{
+        isNormal: true,
+        isWarning: true,
+        isLine: true,
+      },
+      overlayGroupMap:[]
     };
   },
-  // components: {
-  // },
-  methods:{
-    showSuccessBoxC(){
-      this.$router.push({
-        path:'/subscribe-info',
-        query:{
-          ...this.form
-        }
-      })
-      this.showSuccessBox = false
-      for (const key in this.form) {
-        this.form[key] = "";
-      }
-      this.$refs.formT.resetValidation()
+  watch: {
+    "$store.state.windowWidth"() {
+      echarts.init(this.$refs.echartD1).resize();
+      echarts.init(this.$refs.echartD2).resize();
     },
-    async onSubmit(values) {
-      console.log('submit', values);
-      let res = await this.$axios.post('/AF/addRegister' + '?' +this.$qs.stringify({
-        ...this.form
-      }))
-      if(res.data.success){
-        this.showSuccessBox = true;
-        this.infoForm = res.data.data
+  },
+  created() {},
+  mounted() {
+    this.getData();
+    this.initMap();
+    setInterval(() => {
+      let day = new Date();
+      this.dateDay =
+        day.getFullYear() +
+        "-" +
+        (day.getMonth() + 1 < 10
+          ? "0" + (day.getMonth() + 1)
+          : "" + (day.getMonth() + 1)) +
+        "-" +
+        (day.getDate() < 10 ? "0" + day.getDate() : day.getDate());
+      this.timeWeek = " 星期" + this.dataWeekList[day.getDay()];
+      this.dataTime =
+        (day.getHours() < 10 ? "0" + day.getHours() : day.getHours()) +
+        ":" +
+        (day.getMinutes() < 10 ? "0" + day.getMinutes() : day.getMinutes()) +
+        ":" +
+        (day.getSeconds() < 10 ? "0" + day.getSeconds() : day.getSeconds());
+    }, 1000);
+  },
+  methods: {
+    isTypeMap(val){
+      console.log(val)
+      this.mapListType[val] = !this.mapListType[val]
+      let type = val === "isNormal" ? 1 : val === "isWarning" ? 2 : 3;
+      let markers = this.lnglats.filter(val=>val.type === type)
+      let marksList = this.overlayGroupMap.getOverlays().filter(element => element.getExtData().type === type);
+      if(this.mapListType[val]){
+        this.overlayGroupMap.addOverlays(this.addMarker(markers));
+      }else {
+        this.overlayGroupMap.removeOverlays(marksList);
       }
     },
-    async getsmsCode(){
-      if(!this.form.phone || !/^1[345678]\d{9}$/.test(this.form.phone)) return  Notify({ type: 'primary', message: '请输入正确的手机号' });
-      this.smsCodeLoading = true
-      let res = await this.$axios.get('/AF/msgTest' + '?' + this.$qs.stringify({
-        phone:this.form.phone
-      }))
-      if(res.data.success){
-        Notify({ type: 'success', message: '验证码已发送' })
-        this.showsmsCode = !this.showsmsCode
-        this.smsCodeInter = setInterval(()=>{
-          --this.timesmsCode
-          if(this.timesmsCode <= 0 ){
-             clearInterval(this.smsCodeInter)
-             this.showsmsCode = !this.showsmsCode
-          }
-        },1000)
-      } else{
-        Notify({ type: 'primary', message: res.message });
-      }
-      this.smsCodeLoading = false
+    async getData() {
+      this.echartsBox1 = echarts.init(this.$refs.echartD1);
+      this.echartsBox1.setOption(getDataE1());
+      this.echartsBox2 = echarts.init(this.$refs.echartD2);
+      this.echartsBox2.setOption(getDataE2());
     },
-    onConfirm(value) {
-      this.showPicker = false;
-      this.form.sf = value
+    async initMap() {
+      this.map = await new AMap.Map("mapF", {
+        mapStyle: "amap://styles/d0ddc09bd7cbd7331a8e8fa691e5b0da", //设置地图的显示样式
+        resizeEnable: true,
+        zoom: 13,
+        zooms: [3, 18],
+        // features: [] //清空背景道路等
+      });
+      AMap.plugin(["AMap.Geolocation"], () => {
+        var geolocation = new AMap.Geolocation({
+          showButton: true, //是否显示定位按钮
+          buttonPosition: "RT", //定位按钮的位置
+          /* LT LB RT RB */
+          buttonOffset: new AMap.Pixel(10, 20), //定位按钮距离对应角落的距离
+          zoomToAccuracy: false, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
+          showMarker: true, //是否显示定位点
+          markerOptions: {
+            //自定义定位点样式,同Marker的Options
+            offset: new AMap.Pixel(-18, -36),
+            content:
+              '<img src="https://a.amap.com/jsapi_demos/static/resource/img/user.png" style="width:36px;height:36px"/>',
+          },
+          showCircle: true, //是否显示定位精度圈
+          circleOptions: {
+            //定位精度圈的样式
+            strokeColor: "#0093FF",
+            noSelect: true,
+            strokeOpacity: 0.5,
+            strokeWeight: 1,
+            fillColor: "#02B0FF",
+            fillOpacity: 0.25,
+          },
+        });
+        this.map.addControl(geolocation);
+      });
+      this.overlayGroupMap = new AMap.OverlayGroup(this.addMarker())
+      this.map.add(this.overlayGroupMap);
+      this.map.setFitView(); // 根据所有点自适应
     },
-    onConfirmCompany(value,ind) {
-      this.showacCompany = false;
-      this.form.accompanys = value
-      this.form.accompany = ind === 1 ? 0 : ind + 1
+    addMarker(lnglats = this.lnglats, type) {
+      // 创建标点和点击事件
+      let icon = "";
+      return lnglats.map((val, ind) => {
+        if (type !== "water") {
+          icon =
+            val.type == 1
+              ? zcIcon
+              : val.type == 2
+              ? jcIcon
+              : val.type == 3
+              ? lxIcon
+              : zcIcon;
+        }
+        console.log(icon);
+        let marker = new AMap.Marker({
+          position: new AMap.LngLat(val.x, val.y),
+          icon: icon || "",
+          zIndex: 9,
+          extData: {
+            id: ind + 1,
+            type:val.type
+          },
+        });
+        marker.on("click", async () => {
+          await this.addMarkerInfo([val.x, val.y], val);
+        });
+        return marker;
+      });
     },
-    onConfirmTime(value) {
-      this.showTimePicker = false;
-      this.form.dateOfVisit = new Date(value).Format("yyyy-MM-dd hh:mm:ss")
+    // 添加标点
+    addMarkerInfo(position, value) {
+      // this.map.getIsOpen();
+      this.map.clearInfoWindow();
+      var infoWindow = new AMap.InfoWindow({
+        isCustom: true, //使用自定义窗体
+        closeWhenClickMap: true,
+        content: `
+                <div class="mapTab">
+                  <div class="closeInfo ${value.type === 1  ? 'green' : value.type === 2  ? 'red' : 'gray'}">${value.type === 1  ? '正常' : value.type === 2  ? '告警' : '离线'}</div>
+                  <div class="tableTitle">
+                    <img src="${xh}" alt="">
+                    <img src="${dc}" alt="">
+                    <div>98%</div>
+                    <div>3.6V</div>
+                  </div>    
+                  <div class="tableContent">
+                    <div class="yztBox ${value.type === 2  ? 'waning' : 'gray'}"">
+                      <div class="${value.type === 1  ? 'green' : value.type === 2  ? 'white' : 'gray'}">${value.type === 1  ? '正常' : value.type === 2  ? '水位过高' : '---'}</div>
+                      <div>实时水况</div>
+                    </div>
+                    <div><span>运行状态:</span><b class="${value.type === 1  ? 'green' : value.type === 2  ? 'red' : 'gray'}">${value.type === 1  ? '运行正常' : value.type === 2  ? '井盖打开' : '设备离线'}</b></div>
+                    <div><span>实时水位:</span>${value.type === 1  ? '1米' : value.type === 2  ? '10米' : '---'}</div>
+                    <div><span>负责人:</span>张三</div>
+                    <div><span>联系电话:</span>13666666666</div>
+                    <div><span>时间:</span>2021-08-19 15:12:12</div>
+                    <div><span>位置:</span>上海市青浦区徐乐路208号</div>
+                  </div>
+                  <div class="sbh">设备号:868646515</div>
+                </div>`,
+        offset: new AMap.Pixel(0, -30),
+      });
+      infoWindow.open(this.map, position);
     },
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-@import  './index';
+@import "./index";
 </style>
+<style lang="scss">
+.mapTab {
+  width: 300px;
+  height: 265px;
+  background: url("../../assets/image/mapBox.png");
+  background-size: 100% 100%;
+  padding: 10px 15px;
+  color: #fff;
+  position: relative;
+  .sbh {
+    position: absolute;
+    bottom: 9px;
+    left: 0;
+    right: 0;
+    margin: auto;
+    text-align: center;
+    font-weight: bold;
+    font-size: 14px;
+  }
+  .closeInfo {
+    position: absolute;
+    right: 13px;
+    top: 5px;
+    font-size: 16px;
+    font-weight: 700;
+  }
+  .tableTitle {
+    display: flex;
+    padding: 10px;
+    font-size: 12px;
+    font-weight: 400;
+    text-align: left;
+    img,
+    div {
+      margin-right: 10px;
+    }
+    img {
+      height: 14px;
+    }
+  }
+  .tableContent {
+    width: 100%;
+    height: 150px;
+    line-height: 27px;
+    font-weight: 400;
+    text-align: left;
+    font-size: 14px;
+    text-shadow: 2px 2px 0px 0px #004f8c;
+    padding-top: 20px;
+    box-sizing: border-box;
+    position: relative;
+    div {
+      display: block;
+      span {
+        width: 80px;
+        display: inline-block;
+        text-align: right;
+      }
+      b {
+        font-weight: normal;
+      }
+    }
+    .yztBox {
+      position: absolute;
+      right: 17px;
+      top: 20px;
+      width: 68px;
+      height: 104px;
+      background: url("../../assets/image/yzt.png");
+      background-size: 100% 100%;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      div {
+        font-size: 14px;
+        text-align: left;
+        line-height: 27px;
+      }
+    }
+    .waning{
+      background: url("../../assets/image/yc.png");
+    }
+  }
+  .green {
+    color: #01ff19;
+    font-weight: bold;
+  }
+  .red {
+    color: rgba(255, 1, 1, 1);
+    font-weight: bold;
+  }
+  .white{
+    color: #FFF;
+    font-weight: bold;
+  }
+  .gray {
+    color: #ccc;
+    font-weight: bold;
+  }
+}
+</style>

+ 0 - 305
src/views/subscribe-info/index.vue

@@ -1,305 +0,0 @@
-<template>
-  <div class="mianBox">
-    <img src="../../assets/image/title.png" alt="" class="title" />
-    <template v-if="isLogin">
-      <div class="gjsh">第20届上海国际社会</div>
-      <div class="ggaq">公共安全展览会</div>
-      <div class="ggaqEl">The 20th Shanghai CPSE Expo</div>
-      <div class="infoBox">
-        <div class="titleInfo"><span></span>预约信息</div>
-        <van-steps
-          direction="vertical"
-          :active="3"
-          active-color="#FFFFFF"
-          inactive-color="#FFFFFF"
-          active-icon="stop"
-          inactive-icon="stop"
-        >
-          <van-step> 预约人:{{infoForm.name || ''}} </van-step>
-          <van-step> 预约人联系方式:{{infoForm.phone || ''}} </van-step>
-          <van-step> 访问日期:{{infoForm.dateOfVisit || ''}} </van-step>
-          <van-step> 随行人数:{{infoForm.accompany && infoForm.accompany === 1 ?'1-3人':infoForm.accompany === 2 ? '3-7人': '7人以上'  || ''}} </van-step>
-          <van-step> 接待人:{{infoForm.userName || ''}} </van-step>
-          <van-step> 接待人联系方式:{{infoForm.userPhone || ''}} </van-step>
-          <van-step>
-            展会地址:上海世博会1号馆 展位号E10
-            <span>(上海浦东新区国展路1099号)</span>
-          </van-step>
-        </van-steps>
-      </div>
-      <van-button
-        plain
-        round
-        class="infoBtn"
-        type="info"
-        @click="callPhone()"
-        >联系接待人</van-button
-      >
-    </template>
-    <template v-else>
-      <div class="ckyyxx">查看预约信息</div>
-      <div class="kjdl">手机快捷登陆查看预约信息</div>
-      <div class="formBox">
-        <van-form @submit="onSubmit" validate-trigger="onSubmit" :submit-on-enter="false" ref="formT" :show-error="false">
-            <van-field v-model="form.phone" name="手机" type="tel" placeholder="请输入你的手机号" :rules="[{ required:true, pattern: /^1[345678]\d{9}$/, message: '请输入正确的手机号' }]"/>
-            <van-field v-model="form.code" name="验证码" type="tel" placeholder="请输入验证码" :rules="[{ required:true, pattern: /^\d{6}$/, message: '请输入正确的验证码' }]">
-            <template #button> 
-                <van-loading v-if="codeLoading"  color="#1989fa" />
-                <span class="hqyzm" v-else @click="getcode">{{showcode?'获取验证码':timecode + 's'}}</span> 
-            </template>
-            </van-field>
-            <div style="margin: 16px;">
-            <van-button plain round block type="info" native-type="submit">立即查看</van-button>
-            </div>
-        </van-form>
-        </div>
-    </template>
-  </div>
-</template>
-
-<script>
-import { Notify } from 'vant';
-export default {
-  data() {
-    return {
-      showSuccessBox: false,
-      isLogin: false,
-      showcode:true,
-      timecode:60,
-      codeInter:null,
-      codeLoading:false,
-      form:{
-          phone:'',
-          code:''
-      },
-      infoForm:{
-
-      }
-    };
-  },
-  mounted(){
-    if(this.$route.query.name){
-      this.infoForm = this.$route.query
-      this.isLogin = true
-    }
-  },
-  destroyed(){
-    this.isLogin = false;
-  },
-  methods: {
-    async onSubmit(values) {
-      console.log('submit', values);
-      let res = await this.$axios.post('/AF/listRegisterInfo' + '?' + this.$qs.stringify({
-        ...this.form
-      }))
-      if(res.data.success){
-          console.log(res.data)
-        this.infoForm = res.data.data[0] || {}
-        for (const key in this.form) {
-          this.form[key] = "";
-        }
-        this.$refs.formT.resetValidation()
-        this.isLogin = true;
-      }
-    },
-    async getcode(){
-      if(!this.form.phone || !/^1[345678]\d{9}$/.test(this.form.phone)) return  Notify({ type: 'primary', message: '请输入正确的手机号' });
-      this.codeLoading = true
-      let res = await this.$axios.get('/AF/msgTest' + '?' + this.$qs.stringify({
-        phone:this.form.phone
-      }))
-      if(res.data.success){
-        Notify({ type: 'success', message: '验证码已发送' })
-        this.showcode = !this.showcode
-        this.codeInter = setInterval(()=>{
-          --this.timecode
-          if(this.timecode <= 0 ){
-             clearInterval(this.codeInter)
-             this.showcode = !this.showcode
-          }
-        },1000)
-      } else{
-        Notify({ type: 'primary', message: res.message });
-      }
-      this.codeLoading = false
-    },
-    callPhone() {
-        if(!this.infoForm.userPhone) return
-        window.location.href = "tel://" + this.infoForm.userPhone;
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.mianBox {
-  width: 100vw;
-  height: 100vh;
-  background: url("../../assets/image/bg2.png");
-  background-size: 100% 100%;
-  font-family: PingFangSC-Medium, PingFang SC;
-  color: #ffffff;
-  position: relative;
-  overflow: hidden;
-  .ckyyxx {
-    position: absolute;
-    top: 210px;
-    left: 55px;
-    height: 59px;
-    font-size: 42px;
-    font-weight: 500;
-    line-height: 59px;
-    letter-spacing: 1px;
-  }
-  .kjdl {
-    position: absolute;
-    left: 55px;
-    top: 283px;
-    height: 33px;
-    font-size: 24px;
-    font-weight: 400;
-    line-height: 33px;
-    letter-spacing: 1px;
-  }
-  .infoBtn {
-    position: absolute;
-    bottom: 100px;
-    left: 0;
-    right: 0;
-    margin: 0 auto;
-    width: 600px;
-  }
-  .van-steps {
-    margin-top: 50px;
-    background: transparent;
-    .van-step {
-      color: #fff;
-      font-size: 26px;
-      font-weight: 400;
-      color: #ffffff;
-      line-height: 37px;
-      letter-spacing: 1px;
-      span {
-        display: block;
-      }
-      &::after {
-        display: none;
-      }
-    }
-  }
-  .infoBox {
-    position: absolute;
-    top: 450px;
-    left: o;
-    padding: 0 50px 0 30px;
-    box-sizing: border-box;
-    width: 100vw;
-    height: auto;
-    .titleInfo {
-      display: flex;
-      align-items: center;
-      margin-left: 27px;
-      span {
-        width: 10px;
-        height: 40px;
-        background: linear-gradient(180deg, #0016ff 0%, #c724f8 100%);
-        display: inline-block;
-        margin-right: 20px;
-      }
-    }
-  }
-  .title {
-    position: absolute;
-    top: 54px;
-    right: 58px;
-    width: 110px;
-    height: 55px;
-  }
-  .gjsh {
-    position: absolute;
-    top: 150px;
-    left: 50px;
-    height: 43px;
-    font-size: 39px;
-    font-weight: 400;
-    line-height: 59px;
-    letter-spacing: 1px;
-  }
-  .ggaq {
-    position: absolute;
-    left: 50px;
-    top: 210px;
-    height: 86px;
-    font-size: 86px;
-    font-weight: bold;
-    line-height: 129px;
-    letter-spacing: 1px;
-  }
-  .ggaqEl {
-    position: absolute;
-    left: 55px;
-    top: 325px;
-    height: 38px;
-    font-size: 34px;
-    font-family: ArialMT;
-    line-height: 39px;
-    letter-spacing: 4px;
-    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
-  }
-  .formBox {
-      position: absolute;
-      top: 360px;
-      left: 0;
-      right: 0;
-      margin: auto;
-    width: 670px;
-    // height: 1069px;
-    border-radius: 8px;
-    margin: 0 auto;
-    margin-top: 40px;
-    padding: 40px;
-    box-sizing: border-box;
-    .van-form {
-      /deep/ .van-field {
-          font-size: 28px;
-          padding-left: 0;
-        margin-top: 25px;
-        background: transparent;
-        border: none;
-        border-bottom: 1px solid #FFF;
-        .van-field__label {
-          color: #fff;
-        }
-        &::after {
-          display: none;
-        }
-        input {
-          color: #fff;
-        }
-        .van-field__button {
-          border-left: 1px solid #d8d8d8;
-        }
-        .hqyzm {
-          font-size: 24px;
-          font-weight: 400;
-          color: #ffc27b;
-          line-height: 33px;
-        }
-      }
-      .infoT {
-        font-size: 24px;
-        font-weight: 300;
-        color: #ffffff;
-        line-height: 33px;
-        text-align: right;
-        width: 100%;
-        display: block;
-        margin-top: 16px;
-      }
-      .van-button{
-          margin-top: 120px;
-      }
-    }
-  }
-}
-</style>

+ 18 - 3
vue.config.js

@@ -19,7 +19,7 @@ module.exports = {
         proxy: {
             // 配置多个跨域
             '/': {
-                target: 'http://172.16.120.92:8084/', //跨域接口的地址
+                target: 'http://172.16.120.92:8082/', //跨域接口的地址
                 changeOrigin: false,
                 pathRewrite: {
                     '': '/'
@@ -30,13 +30,28 @@ module.exports = {
             'Access-Control-Allow-Origin': '*',
         }
     },
+    //      *  分别为生成环境和开发环境配置
+    configureWebpack: config => {
+        if (process.env.NODE_ENV === 'production') {
+            // 为生产环境修改配置...
+            config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
+        } else {
+            // 为开发环境修改配置...
+        }
+        Object.assign(config, {
+            externals: {
+                'AMap': 'AMap',
+                'AMapUI': 'AMapUI'
+            }
+        })
+    },
     css: {
         loaderOptions: {
             postcss: {
                 plugins: [
                     require('postcss-px-to-viewport')({
                         unitToConvert: 'px', // 需要转换的单位,默认为"px"
-                        viewportWidth: 750, //  设计稿的视口宽度
+                        viewportWidth: 1920, //  设计稿的视口宽度
                         unitPrecision: 5, // 单位转换后保留的精度
                         propList: ['*'], // 能转化为vw的属性列表
                         viewportUnit: 'vw', //  希望使用的视口单位
@@ -49,7 +64,7 @@ module.exports = {
                         include: undefined, // 如果设置了include,那将只有匹配到的文件才会被转换,例如只转换 'src/mobile' 下的文件 (include: /\/src\/mobile\//)
                         landscape: false, // 是否添加根据 landscapeWidth 生成的媒体查询条件 @media (orientation: landscape)
                         landscapeUnit: 'vw', // 横屏时使用的单位
-                        landscapeWidth: 568 // 横屏时使用的视口宽度
+                        landscapeWidth: 1080 // 横屏时使用的视口宽度
                     })
                 ]
             }