lyh 1 vuosi sitten
vanhempi
sitoutus
4d2cadebb0

+ 17 - 0
package-lock.json

@@ -15,6 +15,7 @@
         "echarts": "^5.4.2",
         "element-ui": "^2.15.13",
         "qs": "^6.11.2",
+        "screenfull": "^6.0.2",
         "sortablejs": "^1.15.0",
         "vue": "^2.6.14",
         "vue-router": "^3.5.1",
@@ -9526,6 +9527,17 @@
         "node": ">= 8.9.0"
       }
     },
+    "node_modules/screenfull": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/screenfull/-/screenfull-6.0.2.tgz",
+      "integrity": "sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw==",
+      "engines": {
+        "node": "^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
     "node_modules/select-hose": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/select-hose/-/select-hose-2.0.0.tgz",
@@ -18842,6 +18854,11 @@
         "ajv-keywords": "^3.5.2"
       }
     },
+    "screenfull": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/screenfull/-/screenfull-6.0.2.tgz",
+      "integrity": "sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw=="
+    },
     "select-hose": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/select-hose/-/select-hose-2.0.0.tgz",

+ 2 - 1
package.json

@@ -15,6 +15,7 @@
     "echarts": "^5.4.2",
     "element-ui": "^2.15.13",
     "qs": "^6.11.2",
+    "screenfull": "^6.0.2",
     "sortablejs": "^1.15.0",
     "vue": "^2.6.14",
     "vue-router": "^3.5.1",
@@ -30,7 +31,7 @@
     "@vue/cli-service": "~5.0.0",
     "eslint": "^7.32.0",
     "eslint-plugin-vue": "^8.0.3",
-	"less": "^4.2.0",
+    "less": "^4.2.0",
     "less-loader": "^11.1.3",
     "sass": "^1.32.7",
     "sass-loader": "^12.0.0",

+ 2 - 2
src/method/axios.js

@@ -2,8 +2,8 @@ import axios from "axios";
 // import { gettoken } from "../services/token";
 // axios.defaults.withCredentials=true;
 const instance = axios.create({
-  // baseURL: 'http://lhyt.zzly.vip:808', //请求的基础地址
-  baseURL: 'http://192.168.2.55:8022', //请求的基础地址
+  baseURL: 'http://lhyt.zzly.vip:808', //请求的基础地址
+  // baseURL: 'http://127.0.0.1:8000', //请求的基础地址
   timeout: 5000, //请求超时的时间
 });
 //发一个get请求

+ 3 - 1
src/servuces/prove.js

@@ -2,7 +2,9 @@ import {get,post} from '@/method/axios'
 
 
 //登录
-export const userloginInfo=(data)=>post("/foundation/dashboard/login/",data)
+export const userloginInfo=(data)=>post("/plugins/lhyt/login/",data)
+//退出登录
+export const userlogoutInfo=(data)=>post("/plugins/lhyt/logout/",data)
 //公司接口
 export const kcfxcompanInfo=(data)=>get('/plugins/lhyt/get_companies/',data)
 

+ 24 - 6
src/views/HomeView.vue

@@ -1,8 +1,11 @@
 <template>
-  <div class="home">
-    <div class="top">
-      <div class="time"><span class="iconfont icon-riqi"></span>&nbsp;&nbsp;{{ currentTime }}</div>
-    </div>
+  <div class="home" >
+      <div class="top">
+        <div @click="logout()" style="float: left;">
+        <img src="../assets/bargound/logout1.png" style="height: 20px; width: 20px; margin-left: 20px;" alt="" ><span style="color: rgb(174, 201, 222);">退出</span>
+        </div>
+        <div class="time"><span class="iconfont icon-riqi"></span>&nbsp;&nbsp;{{ currentTime }}</div>
+      </div>
     <div class="content">
       <div class="left">
         <div class="klfx modulbox leftbox1">
@@ -51,7 +54,8 @@ import JCPM from "../components/HomeChart/JCPM.vue";
 import BXCBHB from "../components/HomeChart/BXCBHB.vue";
 import KCFX from "../components/HomeChart/KCFX.vue";
 import BKFX from "../components/HomeChart/BKFX.vue"
-import {  kcfxcompanInfo } from "../servuces/prove";
+import {  kcfxcompanInfo, userlogoutInfo } from "../servuces/prove";
+import { settoken } from "../servuces/token";
 import { mapMutations } from "vuex";
 export default {
   name: 'HomeView',
@@ -95,6 +99,20 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
+    logout(){
+      userlogoutInfo().then(res => {
+
+        if (res.success) {
+          this.$router.replace('/login');
+          settoken('');
+        } else {
+          this.$vux.toast.show({
+            type: 'cancel',
+            text: res.errors
+          })
+        }
+      })
+    },
   },
   components: {
     KLFX, XSFX, FQYW, CZTJ, KYFX, JCPM, BXCBHB, KCFX, BKFX
@@ -109,7 +127,6 @@ export default {
   padding: 1% 0 0 0;
 
   .top {
-    display: flex;
     height: 7%;
     justify-content: flex-end;
     background-image: url(../assets/bargound/title.png);
@@ -118,6 +135,7 @@ export default {
     box-sizing: border-box;
 
     .time {
+      float: right;
       color: rgb(174, 201, 222);
       margin-right: 2%;
       font-size: 16px;

+ 1 - 1
src/views/LoginView.vue

@@ -43,7 +43,7 @@ export default {
           settoken(123654)
           this.$router.replace('/')
         } else {
-          alert('res.errors')
+           alert(res.errors);
         }
       })
     }

+ 10 - 3
src/views/TableDetail/KLFXtable.vue

@@ -84,8 +84,6 @@
           <el-table-column prop="wxldbzb" label="微信留档占比" width="130" sortable>
           </el-table-column>
         </el-table>
-
-        <!-- <el-tab-pane label=" 分渠道销量统计分析">配置管理</el-tab-pane> -->
       </el-tabs>
     </div>
   </div>
@@ -98,7 +96,7 @@ import { nowdaterange } from "../../servuces/getnowtime";
 export default {
   data() {
     return {
-      taheight: window.innerHeight - (window.innerHeight * 0.15),
+      taheight: window.innerHeight - 114,
       currentTime: "",
       company_ids: [],
       //表格各类属性
@@ -114,6 +112,7 @@ export default {
     if (data) {
       this.options = JSON.parse(data)
     }
+    window.addEventListener('resize', this.onresize);
   },
   mounted() {
     column(this);
@@ -125,6 +124,14 @@ export default {
     clearInterval(this.timer);
   },
   methods: {
+    onresize() {
+      let winFlag = window.innerHeight === window.screen.height;
+      if (winFlag) {
+        this.taheight = window.innerHeight;
+      }else{
+        this.taheight = window.innerHeight - 114;
+      }
+    },
     //查询
     searchBtn(value, value1) {
       const company_ids = value.join(',');

BIN
src/views/login/images/fd575dcaa8d34344bd83b71b4438600a~tplv-dy-aweme-images_q75.webp