heyang 2 yıl önce
ebeveyn
işleme
1349b5c06e

+ 5 - 3
src/views/comprehensive/laboratoryManagement/accessAuthorization/lookImpower.vue

@@ -250,7 +250,7 @@ export default {
             name:"批量重试",//按钮名称 只有再状态 1 时需要
             type:"1", //按钮类型 1.按钮 2.导入 3.导出
             parameter:"batchAgain",//按钮字符用于返回方法时的判断
-            hasPermi:[''], // 权限字段 如果没有则传空字符 hasPermi:"",
+            hasPermi:"", // 权限字段 如果没有则传空字符 hasPermi:"",
             isHasPermi:false//判断是否需要使用权限字符
           },
         ],
@@ -744,12 +744,13 @@ export default {
     this.form.hardId=this.pageData.hardId;
     this.admittance=this.pageData.controlScope.search("1") != -1
     this.whiteList=this.pageData.controlScope.search("2") != -1
+
     if(!this.admittance){//安全准入-学生授权
       this.searchData.buttonList.unshift( {
         name:"新增学生授权",//按钮名称 只有再状态 1 时需要
         type:"1", //按钮类型 1.按钮 2.导入 3.导出
         parameter:"addStudent",//按钮字符用于返回方法时的判断
-        hasPermi:[''], // 权限字段 如果没有则传空字符 hasPermi:"",
+        hasPermi:"", // 权限字段 如果没有则传空字符 hasPermi:"",
         isHasPermi:false//判断是否需要使用权限字符
       })
     }
@@ -758,10 +759,11 @@ export default {
         name:"新增教职工授权",//按钮名称 只有再状态 1 时需要
         type:"1", //按钮类型 1.按钮 2.导入 3.导出
         parameter:"addTeacher",//按钮字符用于返回方法时的判断
-        hasPermi:[''], // 权限字段 如果没有则传空字符 hasPermi:"",
+        hasPermi:"", // 权限字段 如果没有则传空字符 hasPermi:"",
         isHasPermi:false//判断是否需要使用权限字符
       })
     }
+    console.log( this.searchData.buttonList)
     this.listDepartments();
     this.getHaikangQueryTypes()
     this.getList()

+ 104 - 103
src/views/comprehensive/laboratoryManagement/accessAuthorization/lookImpowerSearch.vue

@@ -81,7 +81,7 @@ searchClick(type,data){
         </el-select>
         <el-date-picker v-if="item.type == 3" v-model="item.value" :clearable="false" value-format="yyyy-MM-dd"
                         :style="item.width?'width:'+item.width+'px;':'width: 240px;'"
-          type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
+                        type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
         </el-date-picker>
       </el-form-item>
       <el-form-item>
@@ -92,7 +92,8 @@ searchClick(type,data){
         <p class="advanced-button" @click="stateSwitch">高级搜索</p>
       </el-form-item>
       <el-form-item style="float: right" v-for="item in searchData.buttonList" >
-        <p v-if="item.type == 1" class="inquire-button-one" v-hasPermi="item.hasPermi" style="width:120px;" @click="buttonClick(item.parameter)">{{item.name}}</p>
+        <p v-if="item.type == 1 && !item.hasPermi" class="inquire-button-one" style="width:120px;" @click="buttonClick(item.parameter)">{{item.name}}</p>
+        <p v-if="item.type == 1 && item.hasPermi" class="inquire-button-one" v-hasPermi="item.hasPermi" style="width:120px;" @click="buttonClick(item.parameter)">{{item.name}}</p>
         <div style="float: right;" v-if="item.type == 2">
           <el-dropdown @command="commandButton" v-hasPermi="item.hasPermi">
             <div class="form-dropdown-box">
@@ -179,127 +180,127 @@ searchClick(type,data){
 </template>
 
 <script>
-  export default {
-    name: "advancedSearch",
-    props:{
-      searchData:{}
-    },
-    data() {
-      return {
-        searchState:false,
-      }
-    },
-    created() {
+export default {
+  name: "advancedSearch",
+  props:{
+    searchData:{}
+  },
+  data() {
+    return {
+      searchState:false,
+    }
+  },
+  created() {
 
-    },
-    mounted(){
+  },
+  mounted(){
 
+  },
+  methods: {
+    //普通/高级状态切换
+    stateSwitch(){
+      this.searchState = !this.searchState;
+    },
+    //导出/导入按钮
+    commandButton(data){
+      this.$parent.searchClick(data.item.parameter,data.command);
     },
-    methods: {
-      //普通/高级状态切换
-      stateSwitch(){
-        this.searchState = !this.searchState;
-      },
-      //导出/导入按钮
-      commandButton(data){
-        this.$parent.searchClick(data.item.parameter,data.command);
-      },
-      //按钮方法
-      buttonClick(type){
-        let self = this;
-        if(type == '1'){
-          //查找
-          let obj = {};
-          for(let i=0;i<self.searchData.searchList.length;i++){
-            if(self.searchState){
-              //高级搜索
+    //按钮方法
+    buttonClick(type){
+      let self = this;
+      if(type == '1'){
+        //查找
+        let obj = {};
+        for(let i=0;i<self.searchData.searchList.length;i++){
+          if(self.searchState){
+            //高级搜索
+            obj[self.searchData.searchList[i].key] = self.searchData.searchList[i].value;
+          }else{
+            //普通搜索
+            if(self.searchData.searchList[i].level == '1'){
               obj[self.searchData.searchList[i].key] = self.searchData.searchList[i].value;
-            }else{
-              //普通搜索
-              if(self.searchData.searchList[i].level == '1'){
-                obj[self.searchData.searchList[i].key] = self.searchData.searchList[i].value;
-              }
             }
           }
-          self.$parent.searchClick(type,obj);
-        }else if(type == '2'){
-          //返回
-          for(let i=0;i<self.searchData.searchList.length;i++){
-            self.searchData.searchList[i].value = '';
-          }
-          self.$parent.searchClick(type);
-        }else{
-          self.$parent.searchClick(type);
         }
-      },
-    }
+        self.$parent.searchClick(type,obj);
+      }else if(type == '2'){
+        //返回
+        for(let i=0;i<self.searchData.searchList.length;i++){
+          self.searchData.searchList[i].value = '';
+        }
+        self.$parent.searchClick(type);
+      }else{
+        self.$parent.searchClick(type);
+      }
+    },
   }
+}
 </script>
 
 <style lang="scss" scoped>
-  .advancedSearchMaxBigBox{
+.advancedSearchMaxBigBox{
+  margin:0 20px;
+  .advanced-button{
     margin:0 20px;
-    .advanced-button{
-      margin:0 20px;
-      cursor: pointer;
-      line-height:40px;
-      font-weight:500;
-      font-size:14px;
-      color:#0183FA;
+    cursor: pointer;
+    line-height:40px;
+    font-weight:500;
+    font-size:14px;
+    color:#0183FA;
+  }
+  .advanced-max-big-box{
+    display: flex;
+    padding-bottom:20px;
+    padding-right:10px;
+    font-size:14px;
+    .left-advanced-box{
+      flex:1;
     }
-    .advanced-max-big-box{
-      display: flex;
-      padding-bottom:20px;
-      padding-right:10px;
-      font-size:14px;
-      .left-advanced-box{
-        flex:1;
-      }
-      .center-advanced-box{
+    .center-advanced-box{
 
-      }
-      .right-advanced-box{
-        flex:1;
-        .ordinary-button{
-          margin:0 20px;
-          cursor: pointer;
-          line-height:40px;
-          font-weight:500;
-          font-size:14px;
-          color:#0183FA;
-        }
-      }
     }
-    .form-dropdown-box{
-      display: flex;
-      margin:0;
-      padding:0 10px;
-      cursor: pointer;
-      height:40px;
-      img:nth-child(1){
-        width:16px;
-        height:16px;
-        margin-top:12px;
-      }
-      p{
-        width:47px;
-        text-align: center;
-        font-size:14px;
-        margin:0;
+    .right-advanced-box{
+      flex:1;
+      .ordinary-button{
+        margin:0 20px;
+        cursor: pointer;
         line-height:40px;
+        font-weight:500;
+        font-size:14px;
+        color:#0183FA;
       }
-      img:nth-child(3){
-        width:10px;
-        height:6px;
-        margin-top:17px;
-      }
     }
   }
+  .form-dropdown-box{
+    display: flex;
+    margin:0;
+    padding:0 10px;
+    cursor: pointer;
+    height:40px;
+    img:nth-child(1){
+      width:16px;
+      height:16px;
+      margin-top:12px;
+    }
+    p{
+      width:47px;
+      text-align: center;
+      font-size:14px;
+      margin:0;
+      line-height:40px;
+    }
+    img:nth-child(3){
+      width:10px;
+      height:6px;
+      margin-top:17px;
+    }
+  }
+}
 </style>
 <style lang="scss">
-  .advancedSearchMaxBigBox{
-    .el-range-editor--medium.el-input__inner{
-      height:40px;
-    }
+.advancedSearchMaxBigBox{
+  .el-range-editor--medium.el-input__inner{
+    height:40px;
   }
+}
 </style>