Kaynağa Gözat

态势分析

sunyanqiang 3 yıl önce
ebeveyn
işleme
72709e2523

+ 9 - 69
src/api/phone/cabinet.js

@@ -1,73 +1,5 @@
-import request from '@/utils/request'
-import requests from '@/utils/requests'
-
-// 查询手机柜列表
-export function listCabinet(query) {
-  return request({
-    url: '/phone/cabinet/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询手机柜详细
-export function getCabinet(id) {
-  return request({
-    url: '/phone/cabinet/' + id,
-    method: 'get'
-  })
-}
-
-// 新增手机柜
-export function addCabinet(data) {
-  return request({
-    url: '/phone/cabinet',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改手机柜
-export function updateCabinet(data) {
-  return request({
-    url: '/phone/cabinet',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除手机柜
-export function delCabinet(id) {
-  return request({
-    url: '/phone/cabinet/' + id,
-    method: 'delete'
-  })
-}
 
-// 导出手机柜
-export function exportCabinet(query) {
-  return request({
-    url: '/phone/cabinet/export',
-    method: 'get',
-    params: query
-  })
-}
-// 查询详情手机柜列表
-export function shouJiGrid(query) {
-  return request({
-    url: '/phone/grid/getNumber',
-    method: 'get',
-    params: query
-  })
-}
-// 查询手机柜格子列表
-export function listGrid(query) {
-  return request({
-    url: '/phone/grid/list',
-    method: 'get',
-    params: query
-  })
-}
+import requests from '@/utils/requests'
 
 // 线上查询手机柜列表
 export function xianPhone(query) {
@@ -93,4 +25,12 @@ export function xianPhoneOppe(query) {
     method: 'get',
     params: query
   })
+}
+// 获取accessToken
+export function getToken(data) {
+  return requests({
+    url: '/wl/api/getAccessToken',
+    method: 'post',
+    data
+  })
 }

+ 4 - 3
src/utils/requests.js

@@ -7,13 +7,13 @@ import Cookies from "js-cookie";
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 配置公共的根路径
-const service = axios.create({
+const services = axios.create({
   baseURL: 'http://114.115.153.156:12090',
   // 超时
   timeout: 10000
 })
 // 请求拦截器
-service.interceptors.request.use(config => {
+services.interceptors.request.use(config => {
   // 是否需要设置 token
   const isToken = (config.headers || {}).isToken === false
   if (getToken() && !isToken) {
@@ -50,4 +50,5 @@ service.interceptors.request.use(config => {
 })
 
 
-export default service
+
+export default services

+ 5 - 9
src/views/phone/cabinet/index.vue

@@ -229,6 +229,7 @@
 </template>
 
 <script>
+import axios from "axios";
 import {
   getCabinet,
   delCabinet,
@@ -238,7 +239,10 @@ import {
   xianPhone,
   xianPhoneGeZi,
   xianPhoneOppe,
+  getToken,
 } from "@/api/phone/cabinet";
+import { from } from "../../../../public/assets/libs/moment/src/lib/moment/from";
+import Cookies from "js-cookie";
 
 export default {
   name: "Cabinet",
@@ -335,7 +339,6 @@ export default {
       //     this.loading = false;
       //   });
     },
-
     // 点击名字触发
     buttOn(row, data) {
       this.jiBen = row;
@@ -400,16 +403,9 @@ export default {
     /** 查询手机柜列表 */
     getList() {
       xianPhone().then((res) => {
-        console.log(res);
+        // console.log(res);
         this.cabinetList = res.data.infos;
       });
-      // axios
-      //   .get("http://114.115.153.156:12090/wl/api/v1/cabinets", {
-      //     headers: { Authorization: Cookies.get("accessToken") },
-      //   })
-      //   .then((res) => {
-      //     this.cabinetList = res.data.infos;
-      //   });
     },
     // 取消按钮
     cancel() {

+ 22 - 5
src/views/pt.vue

@@ -399,7 +399,7 @@
                       font-weight: 400;
                       margin-right: 10px;
                     "
-                    >[ {{ item.createTime}} ]</span
+                    >[ {{ item.createTime }} ]</span
                   >
                   {{ item.noticeTitle }}
                 </div>
@@ -732,6 +732,23 @@ export default {
     },
     // 手机柜线上地址
     xianShang() {
+      // var today = new Date();
+      // var h = today.getHours();
+      // var m = today.getMinutes();
+      // var s = today.getSeconds();
+      // h = h + 2;
+      // if (h < 10) {
+      //   h = "0" + h;
+      // }
+      // if (m < 10) {
+      //   m = "0" + m;
+      // }
+      // if (s < 10) {
+      //   s = "0" + s;
+      // }
+      // let csrftoken = h + ":" + m + ":" + s;
+      // console.log(csrftoken);
+      // document.cookie = "tiem" + "=" + new Date();
       axios
         .post("http://114.115.153.156:12090/wl/api/getAccessToken", {
           password: "super123fs456wl",
@@ -753,11 +770,11 @@ export default {
       listNotice().then((res) => {
         this.noticeList = res.data;
         console.log(this.noticeList);
-        this.noticeList.forEach(item=>{
+        this.noticeList.forEach((item) => {
           // var newDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(item.createTime)
-          var a=item.createTime.substring(0, 10).split('-')
-          return item.createTime=a[0]+'-'+a[1]+'-'+a[2]
-        })
+          var a = item.createTime.substring(0, 10).split("-");
+          return (item.createTime = a[0] + "-" + a[1] + "-" + a[2]);
+        });
       });
     },
     getworklist() {

+ 14 - 11
src/views/taishi/index.vue

@@ -245,11 +245,11 @@
             </div>
             <div class="center4_b">
               在位
-              <span style="color: #fde17b">{{ jclist.waichu }}</span>
+              <span style="color: #fde17b">{{ jclist.zaiwei }}</span>
             </div>
             <div class="center4_b">
               外出
-              <span style="color: #f0422a">{{ jclist.zaiwei }}</span>
+              <span style="color: #f0422a">{{ jclist.waichu }}</span>
             </div>
             <table class="center4_s">
               <tr>
@@ -307,11 +307,13 @@
                 <td
                   style="font-family: 'IMPACT'; font-size: 22px; color: #b4372a"
                 >
-                  1
+                  0
                 </td>
               </tr>
               <tr>
-                <td colspan="2" style="letter-spacing: 7px;font-size:13px">夜间进入</td>
+                <td colspan="2" style="letter-spacing: 7px; font-size: 13px">
+                  夜间进入
+                </td>
               </tr>
             </table>
 
@@ -323,11 +325,13 @@
                 <td
                   style="font-family: 'IMPACT'; font-size: 22px; color: #b4372a"
                 >
-                  1
+                  0
                 </td>
               </tr>
               <tr>
-                <td colspan="2" style="letter-spacing: 7px;font-size:13px">外来车辆</td>
+                <td colspan="2" style="letter-spacing: 7px; font-size: 13px">
+                  外来车辆
+                </td>
               </tr>
             </table>
           </div>
@@ -897,7 +901,7 @@
                 :key="index"
               >
                 <span style="color: #fff; font-size: 12px">
-                  {{ index }}
+                  {{ index + 1 }}
                 </span>
                 <span>{{ item.durgName }}</span>
                 <span>{{ item.amount }}</span>
@@ -1040,7 +1044,7 @@ import {
   getantiepidemic,
   antiepidemicArchivesList,
   getLeavlNumber,
-  zongjinrizhiban
+  zongjinrizhiban,
 } from "@/api/taishi/taishi";
 import * as echarts from "echarts";
 import vueSeamlessScroll from "vue-seamless-scroll";
@@ -1172,10 +1176,9 @@ export default {
               value: res.data[i],
             });
           } else if (i == "detachmentName") {
-            zongjinrizhiban().then(res=>{
+            zongjinrizhiban().then((res) => {
               this.jrzblist.push({ name: "值班总人数", value: res.data[1] });
-            })
-            
+            });
           }
         }
       }