Compare commits
17 Commits
prod-25-06
...
dee9cd779a
Author | SHA1 | Date | |
---|---|---|---|
dee9cd779a | |||
0b0749f04a | |||
61da53bfe0 | |||
d1d246d871 | |||
ee8fdb16c4 | |||
7ff13628b5 | |||
eae60d1000 | |||
3a1e4a6ae2 | |||
5bd9db3165 | |||
fbce498e94 | |||
6ab2e0b1d7 | |||
001683f215 | |||
bb13a6e34e | |||
16d4425e07 | |||
a73434fd4d | |||
75d20beb77 | |||
9a21834741 |
@ -11,7 +11,11 @@ const service = axios.create({
|
||||
})
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
let token = urlParams.get('token');
|
||||
if( token ) {
|
||||
localStorage.setItem('token', token);
|
||||
} else {
|
||||
localStorage.setItem('token', '');
|
||||
}
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
let reqUrl=config.url
|
||||
@ -21,12 +25,14 @@ service.interceptors.request.use(
|
||||
}
|
||||
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
||||
let token = localStorage.getItem('token');
|
||||
// let token='4099761587129c46b03c9316c9e866c9'
|
||||
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBTkNIQU5HIiwidXNlcklkIjo0NTY3MSwibmFtZSI6IuWuieeVhSIsInVzZXJOYW1lIjoiQU5DSEFORyIsInN1cHBsaWVySWQiOjExMjgsImlzWmQiOjAsImV4cCI6MTc1MjEzNDc2M30.q1O7C8thZzEMVKYDhBQ-N_14Fh9Bqejj7j11EKLF5Aw'
|
||||
// let token='eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJTSEhQWEIiLCJ1c2VySWQiOjU0NzI2LCJuYW1lIjoiI-a1i-ivleWwj-eZveeZvSIsInVzZXJOYW1lIjoiU0hIUFhCIiwic3VwcGxpZXJJZCI6MTAwMDE2NSwiZXhwIjoxNzQ0NTEwNzkwfQ.JPk0OA7slYJN3FIi_uhW4Y0CiWRvl6R1dK8MRTbyhD8'
|
||||
if(!(reqUrl=='/supplier/supplierTraining/trainingTask' || reqUrl=='/supplier/supplierTraining/normalList' || reqUrl=='/supplier/supplierTraining/trainingList')){
|
||||
if(token) {
|
||||
config.headers['Authorization'] = `${token}`;
|
||||
config.headers['token'] = `${token}`;
|
||||
}
|
||||
}
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
|
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchFun } from '@/utils/map'
|
||||
import { searchFun, getLocal, getAddress } from '@/utils/map'
|
||||
export default {
|
||||
name: "addressMap",
|
||||
data() {
|
||||
@ -31,6 +31,7 @@
|
||||
activeIndex: '',
|
||||
map: '',
|
||||
marker: null,
|
||||
cityCode: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -43,16 +44,22 @@
|
||||
await this.initMap()
|
||||
},
|
||||
methods: {
|
||||
initMap() { // 初始化地图
|
||||
async initMap() { // 初始化地图
|
||||
this.map = new AMap.Map('mapId', {
|
||||
viewMode: '2D', // 默认使用 2D 模式
|
||||
zoom:11, //初始化地图层级
|
||||
})
|
||||
let res = await getLocal(this.map);
|
||||
let lnglat = new AMap.LngLat(res?.lng, res?.lat);
|
||||
let location = await getAddress(this.map, lnglat)
|
||||
this.cityCode = location?.regeocode.addressComponent.adcode
|
||||
//location?.regeocode?.addressComponent?.city || location?.regeocode?.addressComponent?.province
|
||||
console.log('location', location);
|
||||
},
|
||||
async searchHandler() {
|
||||
this.activeIndex = null
|
||||
if( this.keyword ) {
|
||||
this.addressList = await searchFun(this.map, '', this.keyword)
|
||||
this.addressList = await searchFun(this.map, this.cityCode, this.keyword,)
|
||||
this.addressList = this.addressList.filter(item => !!item.location)
|
||||
} else {
|
||||
this.addressList = []
|
||||
|
@ -2,7 +2,10 @@
|
||||
<div class="wrap">
|
||||
<div class="service_title">
|
||||
<span class="name">{{orderInfo?.serviceName}}</span>
|
||||
<span class="status">{{orderInfo?.orderStatusString}}</span>
|
||||
<span class="status">
|
||||
{{orderInfo?.orderStatusString}}
|
||||
<span class="refresh_btn" @click="refreshHandler">刷新</span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <img class="report_line" src="@/assets/report/report_line.png" alt="">-->
|
||||
<div class="service_content">
|
||||
@ -25,6 +28,11 @@
|
||||
export default {
|
||||
name: "service-item",
|
||||
props: ['orderInfo'],
|
||||
methods: {
|
||||
refreshHandler() {
|
||||
this.$emit('refresh')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -58,6 +66,13 @@
|
||||
font-size: 13px;
|
||||
color: #F19028;
|
||||
}
|
||||
.refresh_btn {
|
||||
background-color: #267EF0;
|
||||
color: #fff;
|
||||
padding: 6px 12px;
|
||||
margin-left: 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
.service_content {
|
||||
padding: 11px 16px 18px;
|
||||
|
@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<!-- <van-pull-refresh v-model="isLoading" class="custom-pull-refresh safe-pull-refresh" @refresh="onRefresh">-->
|
||||
<div class="main_wrap">
|
||||
<div class="top_bg">
|
||||
<div class="title">报备中心</div>
|
||||
<div class="top_bg" :class="{'dispatch' : type == 1 , 'driver' : type != 1}">
|
||||
<!-- <div class="title">报备中心</div>-->
|
||||
</div>
|
||||
<div class="service_wrap">
|
||||
<service-item :order-info="orderInfo"></service-item>
|
||||
<service-item :order-info="orderInfo" @refresh="onRefreshHandler"></service-item>
|
||||
</div>
|
||||
<div class="chat_list" ref="chatList" >
|
||||
<!--ai对话框 s -->
|
||||
@ -55,9 +56,7 @@
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<report-list-item :report-list.sync="reportList" @getReport="getReportHandler" />
|
||||
|
||||
<van-popup ref="addReportModal" v-model="addReportShow" :close-on-click-overlay="false" closeable duration="0" round position="bottom">
|
||||
<div class="dialog_wrap">
|
||||
<img class="add_report_bg" src="@/assets/report/add_report_bg.png" alt="">
|
||||
@ -81,7 +80,7 @@
|
||||
<!--修改地址报备 s -->
|
||||
<div class="report_title">
|
||||
<img class="dot" src="@/assets/report/add_report_dot.png" alt="">
|
||||
<span>修改事发地</span>
|
||||
<span>修改地址</span>
|
||||
</div>
|
||||
<div class="report_time_content" @click="goPage('addressMap')">
|
||||
<div class="report_time_left">
|
||||
@ -97,10 +96,11 @@
|
||||
<span>补充报备内容</span>
|
||||
</div>
|
||||
<div class="report_common_content">
|
||||
<van-field
|
||||
v-model="remark"
|
||||
class="report_textarea"
|
||||
placeholder="点击这里输入补充报备内容" />
|
||||
<textarea class="report_textarea" id="text-input" rows="4" placeholder="点击这里输入补充报备内容" v-model.trim="remark"></textarea>
|
||||
<!-- <van-field-->
|
||||
<!-- v-model="remark"-->
|
||||
<!-- class="report_textarea"-->
|
||||
<!-- placeholder="点击这里输入补充报备内容" />-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="report_btn" @click="saveHandler">
|
||||
@ -115,11 +115,13 @@
|
||||
v-if="showDatetime"
|
||||
v-model="appointTime"
|
||||
type="datetime"
|
||||
:min-date="minDate"
|
||||
@confirm="onConfirm"
|
||||
@cancel="showDatetime = false"
|
||||
/>
|
||||
</van-popup>
|
||||
</div>
|
||||
<!-- </van-pull-refresh>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -139,6 +141,7 @@
|
||||
remark: '',
|
||||
showDatetime: false,
|
||||
appointTime: '',
|
||||
minDate: new Date(),
|
||||
address: '',
|
||||
lat: '',
|
||||
lng: '',
|
||||
@ -150,6 +153,8 @@
|
||||
userOrderId: '',
|
||||
userOrderCode: '',
|
||||
driverId: '',
|
||||
clickFlag: true,
|
||||
isLoading: false,
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -174,6 +179,19 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onRefreshHandler() {
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
this.recordList = [];
|
||||
await this.getReportList();
|
||||
await this.getDetail();
|
||||
await this.getRecordList();
|
||||
await this.scrollToBottom();
|
||||
} finally {
|
||||
this.isLoading = false; // 结束加载状态
|
||||
}
|
||||
}, 100)
|
||||
},
|
||||
// 添加滚动方法
|
||||
scrollToBottom() {
|
||||
this.$nextTick(() => {
|
||||
@ -191,6 +209,7 @@
|
||||
this.recordList = recordList.data;
|
||||
},
|
||||
async saveHandler() {
|
||||
if( this.clickFlag ) {
|
||||
let data = {
|
||||
source: Number(this.type),
|
||||
reportContent: this.remark,
|
||||
@ -223,6 +242,8 @@
|
||||
Toast('备注内容不能为空')
|
||||
return
|
||||
}
|
||||
this.clickFlag = false;
|
||||
try {
|
||||
await newOrderReporting(data)
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
@ -232,7 +253,12 @@
|
||||
this.addReportShow = false
|
||||
this.scrollToBottom();
|
||||
this.initDialogData();
|
||||
this.clickFlag = true
|
||||
});
|
||||
} finally {
|
||||
this.clickFlag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
initDialogData() {
|
||||
this.appointTime = '';
|
||||
@ -253,11 +279,16 @@
|
||||
this.scrollToBottom();
|
||||
},
|
||||
async getDetail(){ // 订单详情
|
||||
if(this.userOrderId) {
|
||||
let result = await getOrderInfo({
|
||||
userOrderId: this.userOrderId,
|
||||
userOrderCode: this.userOrderCode
|
||||
})
|
||||
this.orderInfo = result.data
|
||||
} else {
|
||||
this.orderInfo = {}
|
||||
}
|
||||
|
||||
},
|
||||
async getReportList() { // 报备大类
|
||||
let res = await getReportListByOrder({
|
||||
@ -272,37 +303,60 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.custom-pull-refresh {
|
||||
height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
#app {
|
||||
background: #F9FCFF !important;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.main_wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #F9FCFF !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// 添加以下样式确保正确的高度计算
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.top_bg {
|
||||
width: 100%;
|
||||
height: 162px;
|
||||
background: #334885;
|
||||
.title {
|
||||
height: 87px;
|
||||
/*.title {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding-top: 52px;
|
||||
font-size: 17px;
|
||||
line-height: 24px;
|
||||
}*/
|
||||
}
|
||||
.dispatch { // 调度app头部背景色
|
||||
background: #354683;
|
||||
}
|
||||
.driver { // 司机app头部背景色
|
||||
background: #334885;
|
||||
}
|
||||
.service_wrap {
|
||||
margin-top: -75px;
|
||||
margin-bottom: 20px;
|
||||
/*margin-bottom: 20px;*/
|
||||
}
|
||||
.chat_list {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
/*overflow: auto;*/
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
-webkit-overflow-scrolling: touch; // 为了iOS平滑滚动
|
||||
padding-top: 10px;
|
||||
/* 修复 iOS 滚动问题 */
|
||||
transform: translateZ(0);
|
||||
.top_tip_wrap {
|
||||
color: #7C8698;
|
||||
text-align: center;
|
||||
@ -490,6 +544,8 @@
|
||||
border-radius: 6px;
|
||||
min-height: 95px;
|
||||
border: 1px solid #E2EAF6;
|
||||
padding: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="headerWrap">
|
||||
<div v-if="isWebFunc()" style="opacity: 0;" class="back"></div>
|
||||
<img v-else class="back" @click="h5GoBack" src="@/assets/secondHandCar/back.png" />
|
||||
<span>{{detailInfo.status.code !== 6 ? '在售' : '已售出'}}</span>
|
||||
<span>{{detailInfo?.status?.code !== 6 ? '在售' : '已售出'}}</span>
|
||||
<div style="opacity: 0;" class="back"></div>
|
||||
</div>
|
||||
<van-loading v-show="!detailInfo" class="loadingWrap" type="spinner" color="#1989fa" />
|
||||
@ -136,6 +136,7 @@ export default {
|
||||
startTime: null, // 记录进入时间
|
||||
recordType:1,
|
||||
isList:false,//是否是首页列表跳转过来的
|
||||
recordResponseId:'',//信息记录获取的id,用于关闭界面掉接口所需参数
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -157,6 +158,7 @@ export default {
|
||||
queryType:this.queryType ,
|
||||
})
|
||||
this.detailInfo=res?.data
|
||||
// console.log("this.detailInfo",this.detailInfo)
|
||||
const municipalities = ['北京市', '天津市', '上海市', '重庆市'];
|
||||
const isMunicipality = municipalities.some(city => res.data.areaName.includes(city));
|
||||
this.detailInfo.areaName= isMunicipality ? res.data.areaName?.substring(0, 3) : res.data.areaName;
|
||||
@ -167,6 +169,9 @@ export default {
|
||||
this.imgSrcList.unshift(res?.data?.vehicleRearPhoto)
|
||||
}
|
||||
this.imgSrcList.unshift(res?.data?.vehicleAnglePhoto)
|
||||
let result=await saveRecord({type: 1, carInfoId: this.id, duration:'',id:''});
|
||||
// console.log('resultresult',result)
|
||||
this.recordResponseId=result?.data?.id
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
@ -197,7 +202,7 @@ export default {
|
||||
this.saveRecord(duration,type);
|
||||
},
|
||||
async saveRecord(duration,type){
|
||||
await saveRecord({type: type, carInfoId: this.id, duration})
|
||||
await saveRecord({type: type, carInfoId: this.id, duration,id:this.recordResponseId || ''})
|
||||
},
|
||||
handle(){
|
||||
this.getDuration(2)
|
||||
|
@ -72,6 +72,7 @@ export default {
|
||||
duration:'',
|
||||
startTime: null, // 记录进入时间
|
||||
isList:false,
|
||||
recordResponseId:'',//信息记录获取的id,用于关闭界面掉接口所需参数
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -92,6 +93,8 @@ export default {
|
||||
queryType: this.queryType,
|
||||
})
|
||||
this.detailInfo = res?.data
|
||||
let result=await saveRecord({type: 1, carInfoId: this.id, duration:'',id:''});
|
||||
this.recordResponseId=result?.data?.id
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
@ -104,7 +107,7 @@ export default {
|
||||
this.saveRecord(duration,type);
|
||||
},
|
||||
async saveRecord(duration,type){
|
||||
await saveRecord({type:type,carInfoId:this.id,duration})
|
||||
await saveRecord({type:type,carInfoId:this.id,duration,id:this.recordResponseId || ''})
|
||||
},
|
||||
handle(){
|
||||
this.getDuration(2)
|
||||
|
Reference in New Issue
Block a user