Administrator %!s(int64=2) %!d(string=hai) anos
pai
achega
e84eddf6d3
Modificáronse 3 ficheiros con 128 adicións e 104 borrados
  1. 2 4
      pages/xunjian/xunjian.wxml
  2. 80 41
      pages/xunjiancz/xunjiancz.js
  3. 46 59
      pages/xunjiancz/xunjiancz.wxml

+ 2 - 4
pages/xunjian/xunjian.wxml

@@ -53,8 +53,7 @@
                 <text>整改前</text>
                 <view>
                   <image wx:for="{{item.picturesBefore}}" wx:for-index="pbk" wx:for-item="pbv" src="{{pbv.pic_value}}" class="vi_img">
-                    <i class="iconfont sc_img icon-31shanchu" bindtap="deletePic" data-picfrom="before"
-                    data-listid="{{item.listid}}" data-jibie="{{item.jibie}}" data-pickey="{{pbv.pic_key}}"></i>
+                    <i class="iconfont sc_img icon-31shanchu" bindtap="deletePic" data-picfrom="before" data-listid="{{item.listid}}" data-jibie="{{item.jibie}}" data-pickey="{{pbv.pic_key}}"></i>
                   </image>
                 </view>
                 <view class="iconfont icon-mn_shangchuantupian" data-listid="{{item.listid}}" data-jibie="{{item.jibie}}" data-picfrom="before" bindtap="takePicture">
@@ -66,8 +65,7 @@
                 <text>整改后</text>
                 <view>
                   <image wx:for="{{item.picturesAfter}}" wx:for-index="pak" wx:for-item="pav" src="{{pav.pic_value}}" class="vi_img">
-                    <i class="iconfont sc_img icon-31shanchu" bindtap="deletePic" data-picfrom="after"
-                    data-listid="{{item.listid}}" data-jibie="{{item.jibie}}" data-pickey="{{pav.pic_key}}"></i>
+                    <i class="iconfont sc_img icon-31shanchu" bindtap="deletePic" data-picfrom="after" data-listid="{{item.listid}}" data-jibie="{{item.jibie}}" data-pickey="{{pav.pic_key}}"></i>
                   </image>
                 </view>
                 <view class="iconfont icon-mn_shangchuantupian" data-listid="{{item.listid}}" data-jibie="{{item.jibie}}" data-picfrom="after" bindtap="takePicture"></view>

+ 80 - 41
pages/xunjiancz/xunjiancz.js

@@ -1,4 +1,4 @@
-// pages/xunjian/xunjian.js
+import http from '../../base/httputil'
 Page({
 
   /**
@@ -6,7 +6,11 @@ Page({
    */
   data: {
     //
-    busEnterpriseId : null,
+    busEnterpriseId: null,
+    xunjianItems: null,
+    items_first: null,
+    items_second: null,
+    items_third: null,
     //
     isFolded: true,
     hui: "block",
@@ -24,8 +28,7 @@ Page({
     listdatachild2: [],
     //未选中图标
     noselt: "noNo",
-    listdata: [
-      {
+    listdata: [{
         info: "建立安全防火制度,明确防火责任人及其职责",
         checked: true,
       },
@@ -34,8 +37,7 @@ Page({
         checked: true,
       },
     ],
-    listdata2: [
-      {
+    listdata2: [{
         info2: "安全出口、疏散指示标识、应急照明是否齐全、有效",
         checked: true
       },
@@ -52,15 +54,12 @@ Page({
         checked: true
       }
     ],
-    listdatachoose: [
-      {
+    listdatachoose: [{
         text: "饭点、小饮品店、小超市(食品、药品、水果蔬菜、文具、铁艺制品、生产资料等物资销售)、小诊所检查内容",
-        children: [
-          {
+        children: [{
             text: "安全管理",
             checked: true,
-            children: [
-              {
+            children: [{
                 text: "儿贼3级1",
                 checked: true,
                 value: '001',
@@ -76,8 +75,7 @@ Page({
           },
           {
             text: "现场",
-            children: [
-              {
+            children: [{
                 text: "儿贼3级1",
                 checked: true,
                 value: '003',
@@ -121,8 +119,7 @@ Page({
       }
     ],
 
-    listdata5: [
-      {
+    listdata5: [{
         text: "1、安全出口疏散标识"
       },
       {
@@ -132,11 +129,23 @@ Page({
   },
 
 
-  onLoad(e){
+  onLoad(e) {
     console.log(e.busEnterpriseId)
+    this.data.busEnterpriseId = e.busEnterpriseId
+    this.getXunjianczData()
+  },
+  getXunjianczData() {
+    let obj = new Object();
+    obj.busEnterpriseId = this.data.busEnterpriseId;
+    http.post("/system/AppXunjianController/getXunjianczData", obj, this.getXunjianczDataSuccess)
+  },
+  getXunjianczDataSuccess(res) {
+    console.log(res)
+    this.setData({
+      xunjianItems: res.xunjianItems,
+      items_first: res.items_first
+    })
   },
-
-
 
   changeme: function (e) {
     var flag = e.detail.value;
@@ -173,41 +182,71 @@ Page({
     })
   },
   change_color_1(e) {
-    let index = this.data.eIndex
-    index = e.currentTarget.dataset.index
+    let busitemsid = e.currentTarget.dataset.busitemsid
+    this.getSecondItems(busitemsid);
     // console.log(index)
     // console.log(this.data.listdatachoose[index].text)
-    let child1 = this.data.listdatachoose[index].text;
+    // let child1 = this.data.listdatachoose[index].text;
     this.setData({
-      myclick: e.currentTarget.dataset.index,
+      myclick: busitemsid,
       currentIndex: "1",
-      oneLL: child1,
-      listdatachild: this.data.listdatachoose[index].children,
+      // oneLL: child1,
+      // listdatachild: this.data.listdatachoose[index].children,
       twoL: "二类/未选择",
     })
-    if (this.data.listdatachoose[index].children == '') {
-      console.log('null')
-      this.setData({
-        listdatachild2: ''
-      })
-    }
+    // if (this.data.listdatachoose[index].children == '') {
+    //   console.log('null')
+    //   this.setData({
+    //     listdatachild2: ''
+    //   })
+    // }
+  },
+
+  getSecondItems(busitemsid) {
+    let obj = new Object();
+    obj.parentId = busitemsid
+    http.post("/system/AppXunjianController/getItems", obj, this.getSecondItemsSuccess)
+  },
+  getSecondItemsSuccess(res) {
+    console.log(res)
+    this.setData({
+      items_second: res.data
+    })
   },
 
   change_color_2(e) {
-    let click = e.currentTarget.dataset.index2
-    let index = this.data.eIndex
-    let index2 = this.data.eIndex2
-    index2 = e.currentTarget.dataset.index2
-    let child2 = this.data.listdatachoose[index].children[index2].text
-    console.log(this.data.listdatachoose[index].children[index2])
+    let busitemsid = e.currentTarget.dataset.busitemsid
+    this.getThirdItems(busitemsid)
+    // let index = this.data.eIndex
+    // let index2 = this.data.eIndex2
+    // index2 = e.currentTarget.dataset.index2
+    // let child2 = this.data.listdatachoose[index].children[index2].text
+    // console.log(this.data.listdatachoose[index].children[index2])
 
     this.setData({
-      myclick2: e.currentTarget.dataset.index2,
+      myclick2: busitemsid,
       currentIndex: "2",
-      listdatachild2: this.data.listdatachoose[index].children[index2].children,
-      twoL: child2,
+      // listdatachild2: this.data.listdatachoose[index].children[index2].children,
+      // twoL: child2,
     })
   },
+  getThirdItems(busitemsid) {
+    let obj = new Object();
+    obj.parentId = busitemsid
+    obj.busEnterpriseId = this.data.busEnterpriseId
+    http.post("/system/AppXunjianController/getItemsLast", obj, this.getThirdItemsSuccess)
+  },
+  getThirdItemsSuccess(res) {
+    this.setData({
+      items_third: res.data
+    })
+  },
+
+  checkThirdItem(e){
+    console.log(e)
+  },
+
+
   change_color_3(e) {
 
     let click = e.currentTarget.dataset.index2
@@ -244,7 +283,7 @@ Page({
     })
   },
   //收起弹层
-  updown(){
+  updown() {
     console.log('弹出收起')
     this.setData({
       isFolded: !this.data.isFolded,

+ 46 - 59
pages/xunjiancz/xunjiancz.wxml

@@ -1,88 +1,75 @@
 <!--pages/xunjiancz/xunjiancz.wxml-->
 <wxs src="../../base/subutil.wxs" module="tools" />
-<view class="container">
-  <view class="xj_nav">
-    <text class="nav_text1">安全管理</text>
-    <text class="iconfont icon-dian"></text>
-    <text class="nav_text2">饭店、小饮品店...</text>
-  </view>
-  <view class="txt_vi">
-     <view class="txt" wx:for="{{listdata}}" wx:key="index" >
-      <text class="{{hui}}" >{{item.info}}</text>
-      <!-- <text class="{{hui}}">1、建立安全防火制度,明确防火责任人及其职责</text> -->
-      <view class="iconfont icon-pinleishanchu"></view>
+<view class="container" >
+  <view wx:for="{{xunjianItems}}" wx:for-item="value">
+    <view class="xj_nav">
+      <text class="nav_text1">{{value[0][0]}}</text>
+      <text class="iconfont icon-dian"></text>
+      <text class="nav_text2">{{value[0][1]}}</text>
     </view>
-  </view>
-  <view class="xj_nav">
-    <text class="nav_text1">现场</text>
-    <text class="iconfont icon-dian"></text>
-    <text class="nav_text2">饭店、小饮品店...</text>
-  </view>
-  <view class="txt_vi">
-     <view class="txt" wx:for="{{listdata2}}" wx:key="index" >
-      <text class="{{hui}}" >{{item.info2}}</text>
-      <!-- <text class="{{hui}}">1、建立安全防火制度,明确防火责任人及其职责</text> -->
-      <view class="iconfont icon-pinleishanchu"></view>
+    <view class="txt_vi">
+      <view class="txt" wx:for="{{value[1]}}" wx:key="{{item.listid}}">
+        <text class="{{hui}}">{{item.info}}</text>
+        <view class="iconfont icon-pinleishanchu"></view>
+      </view>
     </view>
   </view>
-<!--底部菜单-->
-    <view class="nav_bottom {{isFolded?'':'hide'}}">
+  <!--底部菜单-->
+  <view class="nav_bottom {{isFolded?'':'hide'}}">
     <view class="nav_tit">
       <label class="checkbox">
-        <checkbox value="cb" checked="true"/>全选
+        <checkbox value="cb" checked="true" />全选
       </label>
-      <view class="iconfont icon-gengduo"  bindtap='updown'>{{isFolded?'收起':'展开'}}</view>
+      <view class="iconfont icon-gengduo" bindtap='updown'>{{isFolded?'收起':'展开'}}</view>
       <view class="delect">删除</view>
     </view>
     <view class="vi_txt">
       <view class='navBox'>
         <view class='titleBox' bindtap='titleClick' data-idx='0'>
-            <text class="{{0 == currentIndex ? 'fontColorBox' : ''}}" >{{tools.sub(oneLL)}}</text>
-            <hr class="{{0 == currentIndex ? 'lineBox' : 'notLineBox'}}" />
+          <text class="{{0 == currentIndex ? 'fontColorBox' : ''}}">{{tools.sub(oneLL)}}</text>
+          <hr class="{{0 == currentIndex ? 'lineBox' : 'notLineBox'}}" />
         </view>
         <view class='titleBox' bindtap='titleClick' data-idx='1'>
-            <text class="{{1 == currentIndex ? 'fontColorBox1' : ''}}">{{tools.sub(twoL)}}</text>
-            <hr class="{{1 == currentIndex ? 'lineBox' : 'notLineBox'}} " />
+          <text class="{{1 == currentIndex ? 'fontColorBox1' : ''}}">{{tools.sub(twoL)}}</text>
+          <hr class="{{1 == currentIndex ? 'lineBox' : 'notLineBox'}} " />
         </view>
         <view class='titleBox' bindtap='titleClick' data-idx='2'>
-            <text class="{{2 == currentIndex ? 'fontColorBox1' : ''}}" style="padding: 5rpx 15rpx; background:#f94b0e ;color: white; border-radius: 15rpx;">{{tools.sub(threeL)}}</text>
-            <hr class="{{2 == currentIndex ? 'lineBox' : 'notLineBox'}} " />
+          <text class="{{2 == currentIndex ? 'fontColorBox1' : ''}}" style="padding: 5rpx 15rpx; background:#f94b0e ;color: white; border-radius: 15rpx;">{{tools.sub(threeL)}}</text>
+          <hr class="{{2 == currentIndex ? 'lineBox' : 'notLineBox'}} " />
         </view>
-    </view>
-    <!-- 内容布局 -->
-    <swiper class='swiperTtemBox' bindchange='pagechange' current='{{currentIndex}}' >
+      </view>
+      <!-- 内容布局 -->
+      <swiper class='swiperTtemBox' bindchange='pagechange' current='{{currentIndex}}'>
         <swiper-item class='swiperTtemBox' data-swiper="0">
-            <view class="tab_vi">
-                <text wx:for="{{listdatachoose}}"  wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="change_color_1" data-index='{{index}}' class="{{myclick==index?selt:noselt}}" >{{index+1}}.{{item.text}}</text>
-            </view>
+          <view class="tab_vi">
+            <text wx:for="{{items_first}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="change_color_1" data-busitemsid='{{item.busItemsId}}' class="{{myclick==item.busItemsId?selt:noselt}}">{{index+1}}.{{item.busItemsName}}</text>
+          </view>
         </swiper-item>
         <swiper-item class='swiperTtemBox' data-swiper="2">
           <view class="tab_vi">
-            <text wx:for="{{listdatachild}}"   wx:for-item="item" wx:for-index="index2" wx:key="index2" bindtap="change_color_2" class="{{myclick2==index2?selt:noselt}}" data-index2='{{index2}}' >{{index2+1}}.{{item.text}}</text>
-            </view>
+            <text wx:for="{{items_second}}" wx:for-item="item" wx:for-index="index2" wx:key="index2" bindtap="change_color_2" data-busitemsid='{{item.busItemsId}}' class="{{myclick2==item.busItemsId?selt:noselt}}" data-index2='{{index2}}'>{{index2+1}}.{{item.busItemsName}}</text>
+          </view>
         </swiper-item>
         <swiper-item class='swiperTtemBox' data-swiper="3">
           <view class="tab_vi">
-          <checkbox-group bindchange="checkboxChange">
-          <label  style="display: flex; padding:30rpx; border-bottom: 1rpx solid white;" wx:for="{{listdatachild2}}" wx:key="{{item.value}}">
-            <view class="weui-cell__hd">
-              <checkbox value="{{item.value}}" checked="{{item.choose}}"/>
+            <checkbox-group bindchange="checkboxChange">
+              <label style="display: flex; padding:30rpx; border-bottom: 1rpx solid white;" wx:for="{{items_third}}" wx:key="{{item.value}}">
+                <view class="weui-cell__hd">
+                  <checkbox  bindtap="checkThirdItem" data-busitemsid="{{item.busItemsId}}"
+                  value="{{item.busItemsName}}" checked="{{item.checked}}" />
+                </view>
+                <view cclass="{{myclick3==item.busItemsId?selt:noselt}}">{{item.busItemsName}}</view>
+              </label>
+            </checkbox-group>
+            <view class="weui-cells weui-cells_after-title">
+
             </view>
-            <view cclass="{{myclick3==index3?selt:noselt}}">{{item.text}}</view>
-          </label>
-        </checkbox-group>
-      <view class="weui-cells weui-cells_after-title">
-        
-      </view>
-    </view>
+          </view>
         </swiper-item>
-    </swiper>
+      </swiper>
 
     </view>
-    </view>
-    <view class="float_btn iconfont" bindtap="bindViewXunJiancz">确定</view>
-    <view class="float_btn iconfont icon-gongju-" style="bottom: 280rpx;" bindtap="bindViewXunJiancz"></view>
-</view>
-
-
-
+  </view>
+  <view class="float_btn iconfont" bindtap="bindViewXunJiancz">确定</view>
+  <view class="float_btn iconfont icon-gongju-" style="bottom: 280rpx;" bindtap="bindViewXunJiancz"></view>
+</view>