#
whycq
2023-10-19 efd62e7e5729cbd5c052837cf4c264fc7cef4ab6
pages/business/cstmr/csmtr.vue
@@ -1,5 +1,15 @@
<template>
   <view>
      <uni-nav-bar left-icon="left" title="甲方单位" @clickLeft="back" @clickRight="scan">
         <block slot="right">
            <view class="city">
               <view>
                  <text class="uni-nav-bar-text">角色</text>
               </view>
               <uni-icons type="arrowdown" color="#333333" size="20" />
            </view>
         </block>
       </uni-nav-bar>
      <!-- 搜索框 -->
      <view class="search-bg">
         <uni-search-bar placeholder="客户代号/名称" bgColor="#f4f4f4"  @confirm="search" />
@@ -21,7 +31,9 @@
            </view>
         </view>
      </view>
      <uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
      <!-- <uni-load-more :status="status" :icon-size="16" :content-text="contentText" /> -->
      <u-empty v-if="true" icon="../../../static/image/emptyList.png"  />
   </view>
</template>
@@ -39,7 +51,6 @@
               contentrefresh: '加载中',
               contentnomore: '没有更多'
            },
         }
      },
      // 新建按钮事件
@@ -61,7 +72,48 @@
         this.status = 'more';
         this.getCsmtr()
      },
      mounted() {
         // this.getUserTree()
         // this.columns = [['aa','bb']]
      },
      methods: {
         open() {
            this.show = true
            console.log(this.columns);
         },
         getUserTree() {
            let _this = this
            uni.request({
               url: 'http://127.0.0.1:9528/dept/user/tree/auth',
               method: 'POST',
               header: {'token' : uni.getStorageSync('token'),},
            }).then((res)=>{
               console.log(res);
            })
            // success(res) {
            //    res = res.data
            //    res.data[0].childern
            //    let sel1 = []
            //    for (let k of res.data[0].children) {
            //       res.data[0].children
            //       sel1.push(k.title)
            //    }
            //    // _this.columns[0] = sel1
            // }
         },
         back() {
            uni.navigateBack({
            })
         },
         scan() {
            uni.navigateTo({
               url: '/pages/authority/authority'
            })
         },
         getCsmtr1(e) {
            let that = this
            that.csmtrList = []
@@ -158,6 +210,14 @@
</script>
<style>
   .city {
      display: flex;
      align-items: center;
      margin-right: 4px;
   }
   .uni-nav-bar-text {
      font-size: 12px;
   }
   .c-list {
      width: 96%;
      min-height: 100rpx;