tanyanfei 4 gadi atpakaļ
vecāks
revīzija
c98bf392bd
3 mainītis faili ar 9 papildinājumiem un 4 dzēšanām
  1. 5 1
      pages/post/post.js
  2. 2 1
      pages/post/post.wxml
  3. 2 2
      pages/post/post.wxss

+ 5 - 1
pages/post/post.js

@@ -210,12 +210,16 @@ Page({
         subject:-1,
         train:-1,
         device_cats: this.data.categoryArray[e.detail.value].device_cats,
-        dev: ''
       })
+
       if (this.data.categoryArray[e.detail.value].device_cats.length>0){
         this.setData({
           show_dev: true
         })
+      }else{
+        this.setData({
+          dev: ''
+        })
       }
     };
     if (e.target.dataset.name == 'subject') {

+ 2 - 1
pages/post/post.wxml

@@ -57,7 +57,8 @@
   </view>
   <view class="item" wx:if="{{type != 3}}">
       <label wx:if="{{z_type == '特种作业'}}">准操项目</label>
-      <label wx:else>资格类型</label>
+      <label wx:if="{{z_type != '特种作业' && device_cats.length==0}}">资格类型</label>
+      <label wx:else>项目代码</label>
       <picker  data-name='subject'  bindchange="pickerChange" value="{{subject}}" range="{{subjectArray}}" range-key="name">
         <view class="picker">
         <text wx:if="{{subject<0}}">请选择</text>

+ 2 - 2
pages/post/post.wxss

@@ -67,11 +67,11 @@ form{
   font-size: 24rpx;
 }
 .bg_dev{
-  position: absolute;
+  position: fixed;
   width: 100%;
   height: 100vh;
   background: rgba(0,0,0,.5);
-  z-index: 999;
+  z-index: 9999;
   top: 0;
   left: 0;
 }