Kaynağa Gözat

Merge branch 'dev' of http://10.87.10.227:4000/jzyd_yyds/soc_app into dev

coys 2 yıl önce
ebeveyn
işleme
46addd6e43

+ 11 - 1
src/api/public.js

@@ -26,6 +26,16 @@ export function register(data) {
   })
 }
 
+// 获取菜单
+export function getMenu() {
+  return request({
+    url: '/system/menu/getRouters',
+    method: 'get',
+  })
+}
+
+
+
 // 刷新方法
 export function refreshToken() {
   return request({
@@ -86,7 +96,7 @@ export function getOrgPeople(orgId){
   return request({
     url: `/system/user/getByOrgId/${orgId}`,
     method: 'get',
-    
+
   })
 }
 

+ 9 - 2
src/components/TopBar.vue

@@ -2,7 +2,7 @@
   <div class="top-bar">
     <div class="top-box">
       <span>移动安全保卫管理平台</span>
-      <van-icon name="setting-o" size="26" />
+      <van-icon name="setting-o" size="26" @click="clickOutLogin" />
     </div>
     <div class="bottom-box">
       <div>
@@ -16,6 +16,7 @@
 <script>
 import { Icon } from 'vant';
 import {mapGetters} from "vuex";
+import {logout} from "@/api/public";
 export default {
   components: {
     [Icon.name]: Icon,
@@ -29,7 +30,13 @@ export default {
     ...mapGetters(['userName'])
   },
   methods: {
-
+    clickOutLogin(){
+      logout().then(res=>{
+        sessionStorage.clear();
+        this.$router.replace('/login');
+        this.$toast('退出登录');
+      })
+    },
   }
 }
 </script>

+ 1 - 1
src/components/dateCell/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="date-cell van-hairline--bottom" >
-    <van-cell v-if="disabled" :title="title" is-link :label="selected" />
+    <van-cell v-if="disabled" :title="title" :label="selected" />
     <van-cell v-else :title="title" is-link :label="selected" @click="clickItem">
       <template #right-icon>
         <van-icon name="underway-o" style="font-weight: 600;line-height: inherit;color:#008cd6;" />

+ 1 - 1
src/components/selectCell/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="date-cell">
-    <van-cell v-if="disabled" :title="title" :label="label" is-link/>
+    <van-cell v-if="disabled" :title="title" :label="label"/>
     <van-cell v-else :title="title" :label="label" is-link  @click="clickItem"/>
     <van-popup v-model="showPicker" round lazy-render position="bottom" :close-on-popstate="true" get-container="#app">
       <van-picker

+ 8 - 1
src/views/home/menu.vue

@@ -19,6 +19,7 @@
 <script>
 import TopBar from "@/components/TopBar";
 import { mapGetters } from 'vuex'
+import {getMenu} from "@/api/public";
 export default {
   components:{TopBar},
   data() {
@@ -134,9 +135,15 @@ export default {
     ...mapGetters(['userName'])
   },
   mounted() {
-
+    this.getMenuList()
   },
   methods: {
+    getMenuList(){
+      getMenu().then(res=>{
+        console.log(res,'res')
+        //this.menuList = res.data
+      })
+    },
     onclick(){
       this.$router.push('/workTime')
     },

+ 7 - 5
src/views/menu/LZRegister/edit.vue

@@ -95,7 +95,7 @@
 
 
       <!--  检查项目2    -->
-      <fieldset class="fieldset" disabled >
+      <fieldset class="fieldset"  >
         <div class="card" v-if="selectArea">
           <van-collapse v-model="activeNames" v-for="v in checkList" :key="v.itemid">
             <van-collapse-item :title="v.itemname" :name="v.itemname" >
@@ -123,15 +123,15 @@
                   <div class="upload-box" >
                     <uploader v-model="item.imgData"/>
                   </div>
-                  <select-cell title="整改期限" v-model="item.rectificationDeadline"  :dict="'rectification_deadline'" is-link/>
+                  <select-cell  title="整改期限" v-model="item.rectificationDeadline"  :dict="'rectification_deadline'" />
                 </van-cell-group>
                 <date-cell v-if="item.businessType === 1" v-for="(val,ind) in item.protectionVo" :title="val.protectionName"  v-model="val.statusUpdateTime" :key="val.id" date-type="datetime" />
               </div>
             </van-collapse-item>
           </van-collapse>
         </div >
-        <p class="warning-msg">需要完成所有区域的履职内容才能提交内容</p>
-        <div class="flex-box">
+        <p v-if="disabled" class="warning-msg">需要完成所有区域的履职内容才能提交内容</p>
+        <div v-if="disabled" class="flex-box">
           <van-button type="default" style="width: 28%;" plain  @click="goBack">取消</van-button>
           <van-button type="info" style="width: 28%;" plain hairline @click="saveData">保存</van-button>
           <van-button type="info" style="width: 28%;"  @click="submitData">提交</van-button>
@@ -178,10 +178,12 @@ export default {
       //区域下检查项数量
       checkNum:0,
       //nfc图片
-      nfcImage:[]
+      nfcImage:[],
+      disabled:false,
     }
   },
   mounted() {
+    this.disabled = this.$route.query.disabled;
     this.getData();
   },
   computed:{

+ 1 - 1
vue.config.js

@@ -85,7 +85,7 @@ module.exports = defineConfig({
         }
       },
       '/jwx': {
-        target: "http://10.87.11.152:8080",
+        target: "http://10.87.10.42:8080",
         // ws:true,
         changOrigin:true,
         pathRewrite:{