Browse Source

办理详情完成

master
是小王呀\24601 1 year ago
parent
commit
17dbbc4deb
  1. 1
      .env.production
  2. 26
      src/router/index.js
  3. 1
      src/utils/request.js
  4. 93
      src/views/Hotline/index.vue
  5. 154
      src/views/HotlineDetail/index.vue
  6. 7
      src/views/mine/index.vue

1
.env.production

@ -3,3 +3,4 @@ NODE_ENV='production'
VUE_APP_ENV = 'production' VUE_APP_ENV = 'production'
outputDir = 'epmet-work-h5-prod' outputDir = 'epmet-work-h5-prod'

26
src/router/index.js

@ -8,7 +8,6 @@ Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject) if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch(err => err)
} }
Vue.use(Router) Vue.use(Router)
const createRouter = () => const createRouter = () =>
@ -18,6 +17,31 @@ const createRouter = () =>
}) })
const router = createRouter() const router = createRouter()
function getQueryParams() {
const url = window.location.href
const paramArr = url.slice(url.indexOf('?') + 1).split('&')
const params = {}
paramArr.map(param => {
const [key, val] = param.split('=')
params[key] = decodeURIComponent(val)
})
return params
}
router.beforeEach((to, from, next) => {
let urlParams = getQueryParams()
if(urlParams.worktoken){
console.log(urlParams.worktoken,"Sdfsfdjhjh")
localStorage.setItem('token_work',urlParams.worktoken)
next({ path:'/Hotline'})
}else{
next()
console.log(urlParams.worktoken,"Sdfsfd")
}
})
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() { export function resetRouter() {

1
src/utils/request.js

@ -26,7 +26,6 @@ service.interceptors.request.use(
if (localStorage.getItem('token_work')) { if (localStorage.getItem('token_work')) {
config.headers['Token'] = localStorage.getItem('token_work') config.headers['Token'] = localStorage.getItem('token_work')
config.headers['Authorization'] = localStorage.getItem('token_work') config.headers['Authorization'] = localStorage.getItem('token_work')
} }
console.log(config,"sdfkjslf"); console.log(config,"sdfkjslf");
config.baseURL = config.baseURL + '/' config.baseURL = config.baseURL + '/'

93
src/views/Hotline/index.vue

@ -6,11 +6,16 @@
<van-search v-model="workOrderNum" class="no-margin" left-icon="false" shape="round" <van-search v-model="workOrderNum" class="no-margin" left-icon="false" shape="round"
placeholder="按工单号" /> placeholder="按工单号" />
<van-search v-model="mobile" class="no-margin" left-icon="false" shape="round" placeholder="手机号" /> <van-search v-model="mobile" class="no-margin" left-icon="false" shape="round" placeholder="手机号" />
<!-- <van-search v-model="operationType" class="no-margin" left-icon="false" <van-search v-model="operationTypeType" class="no-margin" left-icon="false" @click="showpicker1"
@focus="onOperationType" shape="round" placeholder="办理状态" /> --> shape="round" placeholder="办理状态" />
<van-dropdown-menu class="custom-dropdown-menu" > <van-popup v-model="showpicker2" position="bottom" :style="{ height: '40%' }">
<van-dropdown-item class="custom-dropdown-item" v-model="operationTypeName" :options="actions" @change="onOperationType"/> <van-picker show-toolbar title="标题" :columns="actions" @cancel="showPicker2 = false"
</van-dropdown-menu> @confirm="onConfirm" />
</van-popup>
<!-- <van-dropdown-menu class="custom-dropdown-menu" >
<van-dropdown-item v-model="operationTypeName" :options="actions"
@change="onOperationType" />
</van-dropdown-menu> -->
<van-button style="height: 35px;" @click="onQuery" round type="info">检索</van-button> <van-button style="height: 35px;" @click="onQuery" round type="info">检索</van-button>
<!-- <van-action-sheet v-model="status" :actions="actions" @select="onSelect" /> --> <!-- <van-action-sheet v-model="status" :actions="actions" @select="onSelect" /> -->
</div> </div>
@ -18,12 +23,12 @@
</div> </div>
<div class="container"> <div class="container">
<div class=" card m-top12" v-for="(item, index) in tableData" :key="index"> <div class=" card m-top12" v-for="(item, index) in tableData" :key="index" @click="onHandle(item)">
<div class="flex flex-certer1 flex-center2 flex-end "> <div class="flex flex-certer1 flex-center2 flex-end ">
<div class="workorder"> <div class="workorder">
工单号{{ item.workOrderNum }} 工单号{{ item.workOrderNum }}
</div> </div>
<div :class="getStatusClass(item.operationTypeName)"> <div :class="statusClass( item.operationTypeName)">
{{ item.operationTypeName }} {{ item.operationTypeName }}
</div> </div>
</div> </div>
@ -37,14 +42,16 @@
来电人{{item.name}} {{item.mobile}} 来电人{{item.name}} {{item.mobile}}
</div> </div>
<div> <div>
<van-button class="handle" round type="info" @click="onHandle(item)">办理</van-button> <van-button v-if=" item.operationType!=='11'&&item.operationType!=='12'" class="handle" round type="info" @click="onHandle(item)">办理</van-button>
</div> </div>
<van-action-sheet v-model="show" :actions="actions" @select="onSelect" />
</div> </div>
</div> </div>
</div> </div>
<div style="position: fixed;bottom: 0px;width: 100%;">
</div>
</div> </div>
</template> </template>
@ -56,6 +63,9 @@ import { Dialog } from 'vant';
export default { export default {
data() { data() {
return { return {
operationTypeType:"",
showpicker2:false,
showpicker:false,
workOrderNum:"", workOrderNum:"",
mobile:"", mobile:"",
operationType:"", operationType:"",
@ -108,6 +118,31 @@ export default {
}, },
methods: { methods: {
statusClass(item) {
console.log(item,"dklslksjvx");
return {
'status-red': item === '未联系当事人',
'lan': item === '已联系当事人',
'status-cycn': item === '办理中',
'status-orange': item === '已办结待审核',
'status-grey': item === '已审核归档' || item === '其他默认状态'
};
},
onConfirm(value) {
console.log(value,"iugui");
this.operationTypeType=value.text
this.operationType=value.value
// this.value = value;
this.showPicker2 = false;
console.log( this.showPicker2,"iugui");
this.$nextTick(() => {
console.log('Popup visibility status:', this.showpicker2);
});
},
showpicker1(){
console.log("fds ");
this.showpicker2=true
},
// //
async icEventList() { async icEventList() {
@ -150,36 +185,11 @@ export default {
console.log(item); console.log(item);
this.operationType=item this.operationType=item
}, },
getStatusClass(item){
console.log(item,"dsksvkj");
switch (item) {
case '未联系当事人':
return 'status-red';
case '已联系当事人':
return 'status-blue';
case '办理中':
return 'status-cyan';
case '已办结待审核':
return 'status-orange';
case '已审核归档':
case '其他默认状态':
return 'status-grey';
default:
return 'status-grey';
}
}
}, },
components: {}, components: {},
computed: { computed: {
statusClass() {
return {
'status-red': this.item.operationType === '未联系当事人',
'lan': this.item.operationType === '已联系当事人',
'status-cycn': this.item.operationType === '办理中',
'status-orange': this.item.operationType === '已办结待审核',
'status-grey': this.item.operationType === '已审核归档' || this.item.operationType === '其他默认状态'
};
},
onSelect(){ onSelect(){
console.log("dslkfkhlkadf lk"); console.log("dslkfkhlkadf lk");
@ -253,5 +263,14 @@ line-height: 40rpx;
.handle{ .handle{
height: 30px; height: 30px;
} }
.custom-dropdown-menu{
background-color: red; /* 背景颜色 */
border: 1px solid #ddd; /* 边框样式 */
border-radius: 8px; /* 圆角边框 */
padding: 10px; /* 内边距 */
z-index: 10;
}
.van-dropdown-menu__bar{
background-color: wheat;
}
</style> </style>

154
src/views/HotlineDetail/index.vue

@ -51,7 +51,7 @@
<img style="left: 0; height: 14px;" src="../../assets/images/block.png" alt=""> <img style="left: 0; height: 14px;" src="../../assets/images/block.png" alt="">
<div class="Dispatch">热线详情</div> <div class="Dispatch">热线详情</div>
</div> </div>
<div class="handleStatus"> {{ tableData.operationType }}</div> <div class="handleStatus"> {{ tableData.operationTypeName }}</div>
</div> </div>
<div class="context"> <div class="context">
{{ tableData.eventContent}} {{ tableData.eventContent}}
@ -150,11 +150,17 @@
<van-cell> <van-cell>
<div class="flex" is-link> <div class="flex" is-link>
<span style=" white-space: nowrap;">上传录音</span> <span style=" white-space: nowrap;">上传录音</span>
<van-uploader v-model="fileList" :after-read="afterRead" accept="audio/mp3">
<div class="flex flex-center2 m-left18">
<img style="width: 15px;height: 15px;" src="../../assets/images/uploand.png">
<span style=" white-space: nowrap;">选择文件</span>
</div></van-uploader>
</div> </div>
</van-cell> </van-cell>
<van-cell title="上传图片"> <van-cell title="上传图片">
<template #label> <template #label>
<van-uploader v-model="pictureList" :after-read="afterRead1" :max-count="3" <van-uploader v-model="pictureList" :after-read="afterRead" :max-count="3"
:max-size="10 * 1024 * 1024" /> :max-size="10 * 1024 * 1024" />
</template> </template>
</van-cell> </van-cell>
@ -170,33 +176,43 @@
@click="showreal = true" /> @click="showreal = true" />
<van-action-sheet v-if="showreal" v-model="verified" :actions="realList" @select="onreal" /> <van-action-sheet v-if="showreal" v-model="verified" :actions="realList" @select="onreal" />
<van-field v-if="operationType=='11'" v-model="returnVisitor" label="回访人" placeholder="请输入" /> <van-field v-if="operationType=='11'" v-model="returnVisitor" label="回访人" placeholder="请输入" />
<van-field v-if="operationType=='11'" readonly is-link v-model="returnTime" label="回访时间" placeholder="请选择" <van-field v-if="operationType === '11'" readonly is-link v-model="returnTime" label="回访时间"
@click="showtime = true" /> placeholder="请选择" @click="showtime = true" />
<van-datetime-picker v-if="showtime" v-model="returnTime" type="datetime" :min-date="minDate" <van-datetime-picker v-if="showtime" type="datetime" :min-date="minDate"
:max-date="maxDate" /> :max-date="maxDate" @confirm="handleConfirm" @cancel="handleCancel" />
<van-field v-if="operationType=='11'" readonly is-link v-model="loseContactName" label="联系当事人" placeholder="请选择" required
@click="showloseContact = true" /> <van-field v-if="operationType=='11'" readonly is-link v-model="loseContactName" label="联系当事人"
placeholder="请选择" required @click="showloseContact = true" />
<van-action-sheet v-if="showloseContact" v-model="loseContact" :actions="loseContactList" <van-action-sheet v-if="showloseContact" v-model="loseContact" :actions="loseContactList"
@select="onloseContact" /> @select="onloseContact" />
<van-field v-if="operationType=='11'" readonly is-link v-model="putThroughName" label="未接通电话" placeholder="请选择" required <van-field v-if="operationType=='11'" readonly is-link v-model="putThroughName" label="未接通电话"
@click="showputThrough = true" /> placeholder="请选择" required @click="showputThrough = true" />
<van-action-sheet v-if="showputThrough" v-model="putThrough" :actions="putThroughList" <van-action-sheet v-if="showputThrough" v-model="putThrough" :actions="putThroughList"
@select="onputThrough" /> @select="onputThrough" />
<van-field v-if="operationType=='11'" readonly is-link v-model="cooperateName" label="是否配合回访" placeholder="请选择" required <van-field v-if="operationType=='11'" readonly is-link v-model="cooperateName" label="是否配合回访"
@click="showcooperate = true" /> placeholder="请选择" required @click="showcooperate = true" />
<van-action-sheet v-if="showcooperate" v-model="cooperate" :actions="cooperateList" <van-action-sheet v-if="showcooperate" v-model="cooperate" :actions="cooperateList"
@select="oncooperate" /> @select="oncooperate" />
<van-field v-if="operationType=='11'" readonly is-link v-model="satisfactionName" label="服务都满意度" placeholder="请选择" required <van-field v-if="operationType=='11'" readonly is-link v-model="satisfactionName" label="服务都满意度"
@click="showsatisfaction = true" /> placeholder="请选择" required @click="showsatisfaction = true" />
<van-action-sheet v-if="showsatisfaction" v-model="satisfaction" :actions="satisfactionList" <van-action-sheet v-if="showsatisfaction" v-model="satisfaction" :actions="satisfactionList"
@select="onsatisfaction" /> @select="onsatisfaction" />
<van-field v-if="operationType=='11'" readonly is-link v-model="dissatisfyReasonName" label="不满意原因" placeholder="请选择" required
@click="showdissatisfyReason = true" />
<van-action-sheet v-if="showsdissatisfyReason" v-model="dissatisfyReason"
<van-field v-if="operationType=='11'" readonly is-link v-model="dissatisfyReasonName" label="不满意原因"
placeholder="请选择" required @click="showdissatisfyReason = true" />
<van-action-sheet v-if="showdissatisfyReason" v-model="dissatisfyReason"
:actions="dissatisfyReasonList" @select="onshowdissatisfyReason" /> :actions="dissatisfyReasonList" @select="onshowdissatisfyReason" />
<div class="textarea"> <div class="textarea">
<van-field v-if="operationType=='11'" type="textarea" v-model="visitComments" label="回访意见" placeholder="请输入内容" rows="2" <van-field v-if="operationType=='11'" type="textarea" v-model="visitComments" label="回访意见"
autosize show-word-limit required /> placeholder="请输入内容" rows="2" autosize show-word-limit required />
</div> </div>
</van-cell-group> </van-cell-group>
<div class="flex flex-x flex-mean" style="margin-top: 10px;"> <div class="flex flex-x flex-mean" style="margin-top: 10px;">
@ -247,6 +263,7 @@ export default {
pageSize: 20, pageSize: 20,
tableData:{}, tableData:{},
afterList:[], afterList:[],
minDate:new Date(),
actions: [ actions: [
{ name: '已联系当事人', value: "9" }, { name: '已联系当事人', value: "9" },
{ name: '办理中', value: "10" }, { name: '办理中', value: "10" },
@ -299,7 +316,7 @@ export default {
// //
verified: '', // 0 1 verified: '', // 0 1
returnVisitor: '',//访 returnVisitor: '',//访
returnTime: '',//访 returnTime: "",//访
loseContact: '',//0 1 loseContact: '',//0 1
putThrough: '',// 0 1 putThrough: '',// 0 1
cooperate: '',//访0 1 cooperate: '',//访0 1
@ -316,6 +333,7 @@ export default {
this.process() this.process()
}, },
mounted() { mounted() {
@ -325,7 +343,11 @@ export default {
}, },
methods: { methods: {
onshowdissatisfyReason(item){
this.dissatisfyReasonName=item.name
this.dissatisfyReason=item.value
this.showdissatisfyReason=false
},
oncooperate(item){ oncooperate(item){
this.cooperateName=item.name this.cooperateName=item.name
this.cooperate=item.value this.cooperate=item.value
@ -374,6 +396,7 @@ export default {
}).then(res => { }).then(res => {
this.tableData.push(res.agencyName) this.tableData.push(res.agencyName)
console.log(this.tableData,"skjlfhskdjfh"); console.log(this.tableData,"skjlfhskdjfh");
}).catch(err => { }).catch(err => {
}) })
@ -385,9 +408,13 @@ export default {
this.afterList=res.data this.afterList=res.data
console.log(this.afterList,"skjlfhskdjfh"); console.log(this.afterList,"skjlfhskdjfh");
}).catch(err => { }).catch(err => {
}) })
this.afterList.forEach(item=>{
item.processTime=this.formatDate1(new Date(item.processTime * 1000))
})
}, },
onOperationType(){ onOperationType(){
this.status=true this.status=true
@ -395,6 +422,7 @@ export default {
}, },
handlelist(){ handlelist(){
console.log("dslkfkhd"); console.log("dslkfkhd");
this.returnTime=this.formatDate1(new Date())
this.show=true this.show=true
}, },
showPicker1(){ showPicker1(){
@ -426,7 +454,7 @@ export default {
await reply({ await reply({
operationType:this.operationType, //[11,10,9] operationType:this.operationType, //[11,10,9]
content: this.content,// content: this.content,//
files: this.pictureList,// files: this.fileList.concat(this.pictureList),//
respondent: this.respondent,// respondent: this.respondent,//
respondentPhone: this.respondentPhone,// respondentPhone: this.respondentPhone,//
contacts: this.contacts,// contacts: this.contacts,//
@ -447,25 +475,81 @@ export default {
icEventId:this.icEventId icEventId:this.icEventId
}).then(res => { }).then(res => {
console.log(res,"skjlfhskdjfh"); console.log(res,"skjlfhskdjfh");
this.show=false
this.$toast.success('提交成功');
this.$router.push('/hotline')
}).catch(err => { }).catch(err => {
}) })
}, },
afterRead(file) {
file.status = 'uploading'
file.message = '上传中...'
uploadvariedfile(file.file)
.then(res => {
file.status = ''
file.attachmentUrl=res.data.url
file.attachmentType=file.file.type
file.attachmentName=file.file.name
file.attachmentFormat=file.file.name.split('.').pop()
console.log(this.fileList)
})
.catch(() => {
file.status = 'failed'
file.message = '上传失败'
})
console.log(file);
console.log(this.fileList,"sdf sdf ");
},
afterRead1(file) { afterRead1(file) {
// file.status = 'uploading'
this.fileList.push(file); file.message = '上传中...'
uploadvariedfile(file.file)
.then(res => {
file.status = ''
file.message = '上传成功'
file.url = res.data.url
console.log(this.fileList)
})
.catch(() => {
file.status = 'failed'
file.message = '上传失败'
})
}, },
beforeRead(file) {
// false // beforeRead(file) {
if (file.type.indexOf('audio') === -1) { // // false
this.$toast.fail('请上传音频文件'); // if (file.type.indexOf('audio') === -1) {
return false; // this.$toast.fail('');
} // return false;
return true; // }
// return true;
// },
// onDelete(file, index) {
// //
// this.fileList.splice(index, 1);
// },
handleConfirm(value) {
console.log(value);
this.returnTime = this.formatDate1(value);
console.log(this.returnTime);
this.showtime = false;
}, },
onDelete(file, index) { formatDate1(date) {
// console.log("data",date);
this.fileList.splice(index, 1); const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 01
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
handleCancel() {
this.showtime = false;
} }
}, },
@ -529,7 +613,6 @@ font-size: 16px;
color: #333333; color: #333333;
line-height: 21px; line-height: 21px;
padding-left: 20px; padding-left: 20px;
white-space: nowrap
} }
.Dispatch-right-red{ .Dispatch-right-red{
font-family: PingFang SC; font-family: PingFang SC;
@ -557,7 +640,6 @@ line-height: 23px;
} }
.HotlineDetails-left{ .HotlineDetails-left{
width: 66px; width: 66px;
height: 14px;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
font-size: 15px; font-size: 15px;

7
src/views/mine/index.vue

@ -22,12 +22,7 @@
<div class="z_right"><img src="@/assets/images/icon/right.png" class="z_img"></div> <div class="z_right"><img src="@/assets/images/icon/right.png" class="z_img"></div>
</div> </div>
</div> </div>
<div class="my_card">
<div class="my_zzz" @click="change()">
<div class="z_left"><img src="@/assets/images/icon/password.png" class="z_img">修改密码</div>
<div class="z_right"><img src="@/assets/images/icon/right.png" class="z_img"></div>
</div>
</div>
</div> </div>
<div style="position: fixed; bottom:41px;width: 100%;margin: 0 auto;"> <div style="position: fixed; bottom:41px;width: 100%;margin: 0 auto;">
<van-button type="info" round block style="width: calc(100% - 60px);margin: 0 auto;" <van-button type="info" round block style="width: calc(100% - 60px);margin: 0 auto;"

Loading…
Cancel
Save