123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <template>
- <view class="container">
- <uni-navbar title="路线详情"></uni-navbar>
- <view class="box commonMt" style="overflow: hidden;">
- <view class="topMap">
- <mapPreview :startPoint='form.startPoint' :endPoint='form.endPoint' v-show="isMap"
- :mtRoutePointList='form.mtRoutePointList'></mapPreview>
- </view>
- <view class="box3">
- <view class="reject-box commonBj commonMt">
- <view class="reject-box-top">
- <view class="top-left">
- <image src="../../static/images/path/location.png" mode="widthFix"></image>
- <text class="listTitle">路线信息</text>
- </view>
- </view>
- <view class="reject-box-bottom">
- <!-- <view class="map">
- <mapImg :startPoint='form.startPoint' :endPoint='form.endPoint' :mtRoutePointList='form.mtRoutePointList'></mapImg>
- </view> -->
- <view class="state-icon">
- <view class="flexAlignCenter">
- <view class="greenCircle">
- </view>
- <text class="itemText">开始地址:</text>
- </view>
- <view class="flexAlignCenter">
- <text class="infoText">{{form.startName}}</text>
- </view>
- </view>
- <view class="state-icon">
- <view class="flexAlignCenter">
- <view class="greenCircle">
- </view>
- <text class="itemText">结束地址:</text>
- </view>
- <view class="flexAlignCenter">
- <text class="infoText">{{form.endName}}</text>
- </view>
- </view>
- <view class="state-icon">
- <view class="flexAlignCenter">
- <view class="greenCircle">
- </view>
- <text class="itemText">发起部门:</text>
- </view>
- <view class="flexAlignCenter">
- <text class="infoText">{{form.startDept}}</text>
- </view>
- </view>
- <view class="state-icon mb0">
- <view class="flexAlignCenter">
- <view class="greenCircle">
- </view>
- <text class="itemText">发起时间:</text>
- </view>
- <view class="flexAlignCenter">
- <text class="infoText">{{form.createTime}}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 审批状态 -->
- <view :class="'reject-box mt28 commonMb '+ (isPass?'commonGreenBj':'commonRedBj')">
- <view :class="'reject-box-top just-content-start '+(isPass?'bg-color-green':'bg-color-red')">
- <image src="../../static/images/car/yunshu.png" mode="widthFix"></image>
- <text class="listTitle">审批状态</text>
- </view>
- <view class="reject-box-bottom pb0">
- <view class="state-icon">
- <view class="flexAlignCenter">
- <view :class="'greenCircle '+(isPass?'':'bg-color-red') ">
- </view>
- <text class="itemText">审批状态:</text>
- </view>
- <view class="flexAlignCenter">
- <u-icon :color="isPass?'#017D3E':'#FB5637'" style="margin-right: 12rpx;"
- :name="isPass?'checkmark-circle-fill':'close-circle-fill'"></u-icon>
- <text :class="isPass?'greenText':'redText'">{{isPass?'通过':'驳回'}}</text>
- </view>
- </view>
- <!-- <view :class="isPass?'border-style mb':'border-style2'"></view> -->
- <view class="state-icon" v-if="!isPass">
- <view class="flexAlignCenter">
- <view class="redCircle">
- </view>
- <text class="itemText">驳回原因:</text>
- </view>
- <view class="flexAlignCenter">
- <text class="redText">汽车行驶证过期,需重新上传</text>
- </view>
- </view>
- <!-- <view v-if="!isPass" class="border-style2 mb"></view> -->
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- routeInfo
- } from "@/api/company/path.js"
- export default {
- data() {
- return {
- //通过或者驳回
- isPass: true,
- form: {
- id: null,
- endPoint: '',
- startName: '',
- endName: '',
- name: '',
- startDept: '',
- endPoint: '',
- startPoint: '',
- mtRoutePointList: [],
- auditTime: '',
- },
- isMap: true,
- }
- },
- methods: {
- // 4326转3857
- WGS84ToMercator(lonlat) {
- const coord = {
- lat: 0,
- lng: 0
- };
- const earthRad = 6378137.0; //地球半径
- coord.lat = lonlat.lng * Math.PI / 180 * earthRad;
- const param = lonlat.lat * Math.PI / 180;
- coord.lng = earthRad / 2 * Math.log((1.0 + Math.sin(param)) / (1.0 - Math.sin(param)));
- return coord;
- },
- // 3857转4326
- mercatorToWGS84(data) {
- let list = data.split(',');
- let lonlat = {
- lng: list[1],
- lat: list[0]
- };
- const coord = {
- lat: 0,
- lng: 0
- };
- const lat = lonlat.lat / 20037508.34 * 180;
- let lng = lonlat.lng / 20037508.34 * 180;
- lng = 180 / Math.PI * (2 * Math.atan(Math.exp(lng * Math.PI / 180)) - Math.PI / 2);
- coord.lat = lat;
- coord.lng = lng;
- return coord.lat + ',' + coord.lng
- },
- routeInfo(id) {
- this.isMap = false;
- routeInfo(id).then(res => {
- console.log(res);
- this.form = res.data;
- this.form.createTime = this.form.createTime.slice(0, -3).replace('-', '年').replace('-', '月')
- .replace(' ', '日 ')
- this.isMap = true;
- // this.form.startPoint =this.mercatorToWGS84(res.data.startPoint);
- // this.form.endPoint =this.mercatorToWGS84(res.data.endPoint);
- // this.form.mtRoutePointList=res.data.mtRoutePointList.map(item=>{
- // return {pointCoordinate:this.mercatorToWGS84(item.pointCoordinate)}
- // })
- // console.log(this.form,'this.form');
- })
- },
- },
- onLoad: function(option) {
- if (option.id) {
- this.routeInfo(option.id)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .reject-box {
- .reject-box-top {
- width: 100%;
- height: 69rpx;
- background: #7FB5FF;
- border-radius: 26rpx 26rpx 0px 0px;
- display: flex;
- justify-content: space-between;
- uni-image {
- width: 50rpx;
- margin-left: 32rpx;
- vertical-align: middle;
- }
- }
- .reject-box-bottom {
- padding: 40rpx;
- .state-icon {
- display: flex;
- margin: 70rpx 0;
- }
- .state-icon:nth-child(1) {
- margin: 0 0 40rpx;
- }
- .border-style {
- border-top: 1rpx dashed #F98803;
- width: 90%;
- margin: 0 auto;
- }
- .border-style2 {
- border-top: 1rpx dashed #FB5637;
- width: 90%;
- margin: 0 auto;
- }
- }
- }
- .reject-box-bottom:nth-child(2) {
- padding: 40rpx 40rx 20rpx !important;
- }
- .block {
- display: block !important;
- }
- .border {
- border: 1rpx solid #495B93;
- }
- .box-size {
- width: 598rpx;
- height: 198rpx;
- }
- .mt30 {
- margin-top: 30rpx;
- }
- .radius15 {
- border-radius: 15rpx;
- }
- .state-box-size {
- width: 180rpx;
- height: 180rpx;
- }
- .state-box-size-video {
- width: 175rpx !important;
- height: 175rpx !important;
- }
- .space-between {
- justify-content: space-between;
- }
- .just-content-start {
- justify-content: flex-start !important;
- align-items: center;
- }
- .bg-color-green {
- background: #36C372 !important;
- }
- .bg-color-red {
- background: #FB5637 !important;
- }
- .fontTongGuo {
- font-size: 26rpx !important;
- font-weight: bold !important;
- color: #007C3C !important;
- }
- .fontColor {
- color: #FC5536 !important;
- }
- .mb {
- margin-bottom: 53rpx !important;
- }
- .pb0 {
- padding-bottom: 0 !important;
- }
- .mt28 {
- margin-top: 40rpx;
- }
- .mb0 {
- margin-bottom: 0rpx !important;
- }
- .map {
- height: 469rpx;
- background: #FFFFFF;
- border: 2rpx solid #495B93;
- border-radius: 15rpx;
- margin-top: 20rpx;
- }
- </style>
|