Pārlūkot izejas kodu

2022.3.22钉钉环境下不显示一部分a标签

17613754660 3 gadi atpakaļ
vecāks
revīzija
4f6150723d

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -62,6 +62,7 @@
             };
         },
         created() {
+            this.isDingchg()
             if (localStorage.userInfo != null) {
                 var user = JSON.parse(localStorage.userInfo);
                 if (user.role == 3 ) {
@@ -115,6 +116,7 @@
                     if (url.indexOf(key) > 0) {
                         var corpId = url.substring(url.indexOf(key)+key.length,url.indexOf('#'));
                         dd.ready(function() {
+                            this.isDingchg()
                             dd.runtime.permission.requestAuthCode({
                                 corpId: corpId, // 企业id
                                 onSuccess: function (info) {
@@ -127,6 +129,9 @@
             }
         },
         methods: {
+            isDingchg() {
+                this.$store.commit('isDingFun')
+            },
              bindIfNessary() {
                 let href = window.location.href;
                 

+ 5 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -54,7 +54,7 @@
                     <el-form-item style="float:right;">
                         <el-link type="primary" :underline="false" @click="showExportDialog">导出人员</el-link>
                     </el-form-item>
-                    <el-form-item style="float:right;">
+                    <el-form-item style="float:right;" v-if="isDingShow == false">
                         <el-link type="primary" :underline="false" @click="openInsertDialog(null)">添加人员</el-link>
                     </el-form-item>
                     <!-- 原来的 -->
@@ -63,13 +63,13 @@
                             <el-link type="primary" :underline="false">批量导入</el-link>
                         </el-upload>
                     </el-form-item> -->
-                    <el-form-item style="float:right;">
+                    <el-form-item style="float:right;" v-if="isDingShow == false">
                         <el-upload ref="upload" action="#" :limit="1" :http-request="importUser" :show-file-list="false">
                             <el-link type="primary" :underline="false">批量导入</el-link>
                         </el-upload>
                     </el-form-item>
 
-                    <el-form-item style="float:right;">
+                    <el-form-item style="float:right;" v-if="isDingShow == false">
                         <el-link type="primary" :underline="false" href="./upload/人员导入模板.xlsx" download="人员导入模板.xlsx">模板下载</el-link>
                     </el-form-item>
                     <!-- <el-form-item  v-if="depData != null && depData.id != -1 && depData.id != 0" style="float:right;border: 0.5px solid #20a0ff;height: 27px;margin-top: 6px;">
@@ -392,6 +392,7 @@
     export default {
         data() {
             return {
+                isDingShow : false,
                 handleSelectionZzjgshow: false,
                 submitLoading:false,
                 deactiveUser:null,
@@ -1549,6 +1550,7 @@
             this.getUser();
             this.getCompanyTimeSetting();
             this.getUsers();
+            this.isDingShow = this.$store.state.isDing;
         }
     };
 </script>

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet/src/vuex/store.js

@@ -7,7 +7,8 @@ Vue.use(Vuex)
 
 // 应用初始状态
 const state = {
-    count: 10
+    count: 10,
+    isDing: false
 }
 
 // 定义所需的 mutations
@@ -17,6 +18,9 @@ const mutations = {
     },
     DECREMENT(state) {
         state.count--
+    },
+    isDingFun(state){
+        state.isDing = true
     }
 }