Explorar o código

信息采集儿童督导员权限

“hanlingqiang %!s(int64=2) %!d(string=hai) anos
pai
achega
5f0ffedb00

+ 8 - 0
src/views/weibao/components/vanFieldCheckbox.vue

@@ -145,7 +145,15 @@ export default {
             if (disabled !== undefined && disabled !== false) {
                 return false
             } else {
+                if(this.columnsData.length<=0) {
+                    // 如果展示的数据没有传过来就再去请求一次
+                    this.$emit('changeData')
+                    setTimeout(() => {
+                        this.columnsData = JSON.parse(JSON.stringify(this.columns))
+                    }, 300);
+                }
                 this.show = !this.show
+               
             }
         }
     },

+ 14 - 0
src/views/weibao/views/collect/index.vue

@@ -82,6 +82,7 @@
                         label-width="100"
                         :option="{label:'name', value:'id'}"
                         @confirm="onChildShowM"
+                        @changeData="onChangeChildData"
                         />
                     </van-col>
                 </van-row>
@@ -105,6 +106,7 @@
                         label-width="100"
                         :option="{label:'name', value:'id'}"
                         @confirm="onAssistShowM"
+                        @changeData="onChangeAssistData"
                         />
                     </van-col>
                 </van-row>
@@ -410,6 +412,9 @@ export default {
         }
     },
     created() {
+
+    },
+    activated() {
         this.userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
         this.directorLink = this.userInfo.roleIdStr == '14' ? false : true
         this.modelValue.directorTvalue = this.userInfo.roleIdStr == '14' ? this.userInfo.name :''
@@ -433,6 +438,7 @@ export default {
     methods: {
         async listAreaF() {
             let res = await listArea({ parentId: '' })
+            this.regionList = []
             res.data.forEach(item => {
                 item.items = null
                 this.regionList.push(item)
@@ -465,6 +471,10 @@ export default {
             this.form.typeDesc = e.name
             this.form.type = e.id
         },
+        // 更新儿童的数据
+        onChangeChildData() {
+            this.childTypeF()
+        },
         onChildShowM(label,value) {
             console.log('儿童类型::')
             this.form.typeDesc = label
@@ -475,6 +485,10 @@ export default {
             this.form.stationDesc = e.name
             this.form.stationId = e.id
         },
+        // 更新帮扶的数据
+        onChangeAssistData() {
+            this.organizationF()
+        },
         onAssistShowM(label,value) {
             console.log('帮扶单位::')
             this.form.stationDesc = label

+ 2 - 2
src/views/weibao/views/home/index.vue

@@ -11,8 +11,8 @@
     </van-swipe>
     <div class="category">
       <!-- roleIdStr: 14:儿童主任, 15:儿童督导员, 21:社工员工 11: 社工负责人-->
-      <!-- 儿童主任 社工组织 -->
-      <div v-if="roleIdStr==14 || roleIdStr==11 || roleIdStr==21"  class="" @click="$router.push({path:'/collect/index'})">
+      <!-- 儿童主任 社工组织 儿童督导员-->
+      <div v-if="roleIdStr==14 || roleIdStr==15 || roleIdStr==11 || roleIdStr==21"  class="" @click="$router.push({path:'/collect/index'})">
         <img src="../../assets/icon2.png" alt="">
         <div>信息采集</div>
       </div>