fei.wang
2025-04-30 722da005a5ec126bedf752ac6bd5c5c7f6172155
components/personBox.vue
@@ -6,18 +6,22 @@
               
               <image src="../static/user.png" style="width:50px;height:50px;"></image>
            </view>
            <view class="userinfo-value-box" style="width: 40%;">
            <view class="userinfo-value-box" style="width: 80%;">
               <view class="user-nickname">{{perlist.personname}}</view>
               <view class="user-company">{{perlist.department}} |卡号: {{perlist.tagid}} </view>
            </view>
               <view class="user-company">{{perlist.department}} |卡号: {{perlist.tagid}}
                   <tn-button v-if="perlist.type=='吊车'" size="sm" style="margin-left: 3%;" backgroundColor="#00aaff" @click="calibration(perlist.height)">校准</tn-button></view>
            
            <view style="width: 40%;">
               <!-- <button plain @click="refresh" style="width:20px;"> -->
                  <image src="../static/refresh.png" class="icon-image" @click="refresh" style="margin-left: 53%;margin-top: -5px;width:20px;height:20px;"></image>
               <!-- </button> -->
               <image src="../static/close.png" style="width:20px;height:20px;float: right" @click="closeinfo">
               </image>
            </view>
            <span v-if="perlist.type=='吊车'" style="position: absolute;right:100px;top:10px;height:20px;">
               高度:{{ jisuan(perlist.height) }}m
            </span>
            <!-- <view style="position: absolute;right:10px;top:10px;"> -->
               <!-- <button plain @click="refresh" style="width:20px;"> -->
                  <image src="../static/refresh.png" class="icon-image" @click="refresh" style="position: absolute;right:40px;top:10px;width:20px;height:20px;"></image>
               <!-- </button> -->
               <image src="../static/close.png" style="position: absolute;right:10px;top:10px;width:20px;height:20px;" @click="closeinfo">
               </image>
            <!-- </view> -->
         </view>
         <view class="content-box">
            <span style="margin-left: 3%;">
@@ -34,7 +38,7 @@
            </view>
            <view style="margin-top: 3%;">
               <span style="margin-left: 3%;">
                  高程:{{perlist.height}}
                  海拔:{{perlist.height}}
                  
               </span>
               {{perlist.encryption}}
@@ -67,7 +71,8 @@
      mixins: [minLogin],
      data() {
         return {
            jiaozhungao:0,
            gao:0,
         }
      },
      props: {
@@ -78,7 +83,28 @@
            }
         }
      },
         mounted() {
            console.log(this.perlist);
            },
      methods: {
         calibration(e){
            this.jiaozhungao = e
            this.jisuan()
         },
         jisuan(e){
            if (this.jiaozhungao=='') {
               this.gao =0
            } else{
               this.gao =(parseFloat(e) - parseFloat(this.jiaozhungao)).toFixed(2)
            }
            return this.gao
            console.log(this.gao);
            // setTimeout(() => {
            //    this.jisuan()
            // }, 1000)
         },
         getGpsStatusText(status) {
            console.log(status);
            switch (status) {