智慧保安互联网APP
zengh
2022-06-21 4efeb31d5b4921d7e851c256009486ad86bc70e2
pages/securityStaff/information.vue
@@ -3,44 +3,45 @@
      <view class="head">
         <u-navbar :is-fixed="true" :border-bottom="false" :is-back="true" title="" :back-icon-color="'#fff'"
            :background="{ background: '#0BB9C8' }">
            <!-- <view class="search-input">
               <u-search height="50" placeholder="请输入保安员名字查询" @custom="customSearch" @change="changeSearch"
                  :show-action="true" v-model="searchName" :animation="true" :margin="'80rpx'"
                  :action-style="{ color: '#fff' }"></u-search>
            </view> -->
         </u-navbar>
         <view class="head-bg"></view>
      </view>
      <view class="bodys">
         <view class="once">
            照片:
         <view class="once sole">
            <i>照片</i>
            <!-- <image :src="datalist.imgSrc" mode=""></image> -->
            <u-image class="img" width="150rpx" height="150rpx" :src="datalist.avatar">
               <view slot="error" style="font-size: 24rpx;">暂无图片</view>
            <u-image class="img" width="136rpx" height="136rpx" :src="datalist.myPicture">
               <view slot="error" style="font-size: 24rpx;">暂无照片</view>
            </u-image>
         </view>
         <view class="once">
            姓名: {{datalist.realName}}
         </view>
         <!-- <view class="once">
            性别: {{datalist.age}}
         </view> -->
         <view class="once">
            组织: {{datalist.politicaloutlook}}
            <i>姓名</i> <span> {{ datalist.realName }} </span>
         </view>
         <view class="once">
            公司: {{datalist.obj}}
            <i>性别</i> <span> {{ datalist.sex == 2 ? '女' : datalist.sex == 1 ? '男' : ' ' }} </span>
         </view>
         <view class="once">
            荣誉: {{datalist.honor}}
            <i>籍贯</i> <span> {{ datalist.nativePlace }} </span>
         </view>
         <view class="once">
            违规: {{datalist.punishment}}
            <!-- <view class="title">
               违规:
            </view>
            <textarea name="" id=""  disabled="disabled" :placeholder="datalist.punishment"></textarea> -->
            <i>学历</i> <span> {{ datalist.education }} </span>
         </view>
         <view class="once">
            <i>出生日期</i> <span> {{ datalist.birthday }} </span>
         </view>
         <view class="once">
            <i>政治面貌</i> <span> {{ datalist.politicaloutlook }} </span>
         </view>
         <view class="once">
            <i>联系电话</i> <span> {{ datalist.phone }} </span>
         </view>
         <view class="once">
            <i>所属公司</i> <span> {{ datalist.deptName }} </span>
         </view>
         <view class="once">
            <i>入职时间</i> <span> {{ datalist.rtime }} </span>
         </view>
         <view class="once">
            <u-button class="ubut" type="success" @click="openCongye" size="medium" :ripple="true"
               ripple-bg-color="#fff">从业单位</u-button>
@@ -48,11 +49,9 @@
               ripple-bg-color="#fff">查看证件</u-button>
         </view>
      </view>
      <u-popup class="certificates" v-model="showi" mode="bottom" border-radius="10">
         <view class="certificatesnj" >
            <view class="titleonce" >
      <!--<u-popup class="certificates" v-model="showi" mode="bottom" border-radius="10">
          <view class="certificatesnj">
            <view class="titleonce">
               保安员证
            </view>
            <view class="once">
@@ -62,15 +61,33 @@
               性别:<view class="o-once"> {{datalist.sex == 1 ? '男' : '女'}}</view>
            </view>
            <view class="once">
               编号:<view class="o-once"> {{datalist.baoanzheng}}</view>
               编号:<view class="o-once"> {{datalist.securitynumber}}</view>
            </view>
            <view class="once" style="margin-bottom: 1rem; display: flex;">
               <view style='flex: 1'>发证机关:<view class="o-once"> {{datalist.fzobj}}</view></view>
               <view style='flex: 1'>发证日期:<view class="o-once">{{datalist.fztime}}</view></view>
            <view class="once">
               发证机关:<view class="o-once"> 南昌市公安局 </view>
            </view>
            <view class="once">
               发证日期:<view class="o-once"> {{datalist.updateTime}}</view>
            </view>
            <u-image class="img" width="150rpx" height="150rpx" :src="datalist.avatar">
               <view slot="error" style="font-size: 1rem;">暂无图片</view>
               <view slot="error" style="font-size: 1rem;">暂无证件</view>
            </u-image>
         </view>
      </u-popup>-->
      <u-popup class="certificates-ourScreen" :closeable="true" v-model="showi" mode="bottom" border-radius="50">
         <view class="certificates-screen-in">
            <view class="se-sc-in-head">
               <image class="se-sc-in-img" src="./sers.png" mode=""></image>
            </view>
            <view class="c-s-in-once" v-for="(item,index) in sfxx" :key="item.value +index">
               <view class="c-s-in-o-title">
                  {{item.label}}
               </view>
               <view class="c-s-in-o-center">
                  {{item.value}}
               </view>
            </view>
         </view>
      </u-popup>
      <u-popup v-model="showc" mode="bottom" border-radius="10">
@@ -91,7 +108,7 @@
                  <template v-slot:content>
                     <view>
                        <view class="u-order-title">在职时间:<view class="titles">
                              {{item.entryTime.slice(0,11)}}至 {{item.departureTime.slice(0,11)}}
                              {{item.entrytime}}至 {{item.departuretime}}
                           </view>
                        </view>
                        <view class="u-order-desc">公司名称:{{item.companyname}}</view>
@@ -121,21 +138,90 @@
      data() {
         return {
            datalist: {
               realName: '原俊袆',
               age: '男',
               obj: '适普科技',
               honor: '扶老奶奶过马路',
               punishment: '不看红绿灯',
               avatar: "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
               cardid: 342,
               baoanzheng: "赣06284538",
               fzobj: '南昌市公安局',
               fztime: "2014.04.20",
               politicaloutlook: '党员'
               // realName: '原俊袆',
               // age: '男',
               // obj: '适普科技',
               // honor: '扶老奶奶过马路',
               // punishment: '不看红绿灯',
               // avatar: "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
               // cardid: 342,
               // baoanzheng: "赣06284538",
               // fzobj: '南昌市公安局',
               // fztime: "2014.04.20",
               // politicaloutlook: '党员'
            },
            showi: false,
            showc: false,
            cylist: []
            cylist: [],
            sfxx: [{
               label: '姓名:',
               prop: 'realName',
               value: "",
            }, {
               label: '性别:',
               prop: 'sex',
               value: ""
            }, {
               label: '联系电话:',
               prop: 'phone',
               value: ""
            }, {
               label: '身份证号:',
               prop: 'cardid',
               value: ""
            }, {
               label: '出身日期:',
               prop: 'birthday',
               value: ""
            }, {
               label: '年龄:',
               prop: 'age',
               value: ""
            }, {
               label: '发证机关:',
               prop: 'fazheng',
               value: ""
            }, {
               label: '保安证编号:',
               prop: 'securitynumber',
               value: ""
            }, {
               label: '公司名称:',
               prop: 'deptName',
               value: ""
            }, {
               label: '派遣单位名称:',
               prop: 'dispatchUnitName',
               value: ""
            }, {
               label: '派遣开始时间:',
               prop: 'dispatchStartTime',
               value: ""
            }, {
               label: '派遣结束时间:',
               prop: 'dispatchEndTime',
               value: ""
            }]
         }
      },
      onLoad(event) {
         var that = this;
         this.datalist = JSON.parse(decodeURIComponent(event.detailData))
         // console.log(this.datalist)
         let num = this.sfxx.length;
         for (let k = 1; k < num; k++) {
            if (this.datalist[this.sfxx[k].prop]) {
               if (this.sfxx[k].prop == "sex") {
                  this.sfxx[k].value = this.datalist[this.sfxx[k].prop] == 1 ? "男" : "女"
               } else {
                  this.sfxx[k].value = this.datalist[this.sfxx[k].prop]
               }
            } else if (this.sfxx[k].prop == "fazheng") {
               let frist = this.datalist.securitynumber.split("")[0];
               this.sfxx[k].value = frist == "赣" ? "南昌市公安局" : "";
            }
         }
      },
      methods: {
@@ -146,29 +232,30 @@
            this.showc = true;
         },
         getcongye() {
            var url = this.$store.state.piAPI + '/experience/selectExperienceInfo',
            var url = this.$store.state.piAPI + '/experience/page',
               data = {
                  cardid: this.datalist.cardid
                  securityid: this.datalist.id
               },
               that = this;
               uni.request({
                  url: url,
                  data: data,
                  method:'get',
                  success: (res) => {
                     var d = res.data.data;
                     var a = []
                     // for(var k = 1 ;k < 30; k++){
                     a.push(...d)
                     // }
                     console.log(d);
                     that.cylist = a;
                  }
               })
            uni.request({
               url: url,
               data: data,
               method: 'get',
               success: (res) => {
                  var d = res.data.data.records;
                  var a = []
                  // for(var k = 1 ;k < 30; k++){
                  a.push(...d)
                  // }
                  that.cylist = a;
                  // console.log(that.cylist, 456)
               }
            })
            // axios({
            //    url: url,
            //    params: data
@@ -184,10 +271,7 @@
         }
      },
      mounted() {
         if (this.$route.query.data != undefined) {
            this.datalist = JSON.parse(this.$route.query.data);
            console.log(this.datalist)
         }
         this.getcongye();
      }
@@ -204,12 +288,38 @@
         width: 100%;
         margin: 0 auto;
         .sole.once {
            line-height: 154rpx;
            height: 154rpx;
            position: relative;
            .img {
               position: absolute;
               top: 0;
               bottom: 0;
               margin: auto;
            }
            img {
               vertical-align: middle;
            }
         }
         .once {
            width: 100%;
            height: auto;
            background-color: #fff;
            line-height: 44px;
            padding: 0 2.5% 0 2.5%;
            i {
               font-style: normal;
               margin-right: 20rpx;
            }
            span {
               color: #999;
            }
         }
         .img {
@@ -222,12 +332,8 @@
            margin: 10px 0 10px 0;
         }
         .once:nth-child(6),
         .once:nth-child(5) {
            height: 88px;
         }
         .once:nth-child(7) {
         .once:last-child {
            background-color: transparent;
            display: flex;
            align-items: center;
@@ -236,13 +342,13 @@
      }
      .certificatesnj {
         padding: 0.6rem 1.6rem 1.6rem 1.6rem;
         background-image: url(../../static/images/salf/bazbj.png);
         background-size: 100% 100%;
         height: 100%;
      }
      .certificates {
         .img {
            position: absolute;
            top: 3rem;
@@ -263,14 +369,68 @@
         .once {
            width: 100%;
            height: auto;
            line-height: 2rem;
            font-size: 0.8rem;
            padding: 0 2.5% 0 2.5%;
            line-height: 1.6rem;
            font-size: 0.72rem;
            .o-once {
               display: inline-block;
               font-size: 0.72rem;
               font-weight: 600;
            }
         }
      }
      .certificates-ourScreen {
         width: 100%;
         height: 100%;
         .certificates-screen-in {
            border-radius: 40px;
            width: 100%;
            height: 100%;
            // border: 1px solid red;
            // background-color: #fff;
            .se-sc-in-head {
               margin-top: 20px;
               width: 100%;
               height: 140px;
               display: flex;
               align-items: center;
               justify-content: center;
               // border: 1px solid red;
               .se-sc-in-img {
                  width: 80%;
                  height: 120px;
               }
            }
            .c-s-in-once {
               width: 100%;
               height: auto;
               padding: 12px 15px;
               border-bottom: 1px solid rgba(220, 220, 220, 0.4);
               display: flex;
               align-items: center;
               justify-content: space-between;
               // font-size: 16px;
               font-weight: 500;
               color: #939393;
               .c-s-in-o-title {
                  width: 35%;
                  font-size: 0.8rem;
                  font-weight: 550;
                  // margin-left: 4%;
                  // border: 1px solid red;
               }
               .c-s-in-o-center {
                  width: 65%;
                  font-size: 0.85rem;
                  // border: 1px solid red;
                  text-align: right;
               }
            }
         }
      }