From 17dbbc4deb5f2415979e7272c35583df841768e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Thu, 8 Aug 2024 17:57:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9E=E7=90=86=E8=AF=A6=E6=83=85=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 1 + src/router/index.js | 26 ++++- src/utils/request.js | 1 - src/views/Hotline/index.vue | 93 +++++++++++------- src/views/HotlineDetail/index.vue | 158 +++++++++++++++++++++++------- src/views/mine/index.vue | 7 +- 6 files changed, 203 insertions(+), 83 deletions(-) diff --git a/.env.production b/.env.production index 8deecc0..ba3bac5 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,5 @@ NODE_ENV='production' # must start with VUE_APP_ VUE_APP_ENV = 'production' outputDir = 'epmet-work-h5-prod' + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 5889228..55f819a 100644 --- a/src/router/index.js +++ b/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) return originalPush.call(this, location).catch(err => err) } - Vue.use(Router) const createRouter = () => @@ -18,6 +17,31 @@ const 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 export function resetRouter() { diff --git a/src/utils/request.js b/src/utils/request.js index 3ae8f19..842153f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -26,7 +26,6 @@ service.interceptors.request.use( if (localStorage.getItem('token_work')) { config.headers['Token'] = localStorage.getItem('token_work') config.headers['Authorization'] = localStorage.getItem('token_work') - } console.log(config,"sdfkjslf"); config.baseURL = config.baseURL + '/' diff --git a/src/views/Hotline/index.vue b/src/views/Hotline/index.vue index 01df2c2..f0c7dde 100644 --- a/src/views/Hotline/index.vue +++ b/src/views/Hotline/index.vue @@ -6,11 +6,16 @@ - - - - + + + + + 检索 @@ -18,12 +23,12 @@
-
+
工单号:{{ item.workOrderNum }}
-
+
{{ item.operationTypeName }}
@@ -37,14 +42,16 @@ 来电人:{{item.name}} {{item.mobile}}
- 办理 + 办理
- +
+
+
@@ -56,6 +63,9 @@ import { Dialog } from 'vant'; export default { data() { return { + operationTypeType:"", + showpicker2:false, + showpicker:false, workOrderNum:"", mobile:"", operationType:"", @@ -108,6 +118,31 @@ export default { }, 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() { @@ -150,36 +185,11 @@ export default { console.log(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: {}, 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(){ console.log("dslkfkhlkadf lk"); @@ -253,5 +263,14 @@ line-height: 40rpx; .handle{ 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; +} diff --git a/src/views/HotlineDetail/index.vue b/src/views/HotlineDetail/index.vue index 16d4663..91968fb 100644 --- a/src/views/HotlineDetail/index.vue +++ b/src/views/HotlineDetail/index.vue @@ -51,7 +51,7 @@
热线详情
-
{{ tableData.operationType }}
+
{{ tableData.operationTypeName }}
{{ tableData.eventContent}} @@ -150,11 +150,17 @@
上传录音 + +
+ + 选择文件 +
+
@@ -170,33 +176,43 @@ @click="showreal = true" /> - - - + + + + - + - + - + - - + -
- + + + + + + +
+
@@ -247,6 +263,7 @@ export default { pageSize: 20, tableData:{}, afterList:[], + minDate:new Date(), actions: [ { name: '已联系当事人', value: "9" }, { name: '办理中', value: "10" }, @@ -299,7 +316,7 @@ export default { //不合规诉求类型 verified: '', //办理真实度是否属实 0:属实 1:不属实 returnVisitor: '',//回访人 - returnTime: '',//回访时间 + returnTime: "",//回访时间 loseContact: '',//联系当事人0:已联系 1:未取得联系 putThrough: '',//接通电话 0:接通 1:未接通 cooperate: '',//是否配合回访0:配合 1:不配合 @@ -314,6 +331,7 @@ export default { this.icEventId =this.$route.query.icEventId; this.icEventList() this.process() + }, @@ -325,7 +343,11 @@ export default { }, methods: { - + onshowdissatisfyReason(item){ + this.dissatisfyReasonName=item.name + this.dissatisfyReason=item.value + this.showdissatisfyReason=false + }, oncooperate(item){ this.cooperateName=item.name this.cooperate=item.value @@ -374,6 +396,7 @@ export default { }).then(res => { this.tableData.push(res.agencyName) console.log(this.tableData,"skjlfhskdjfh"); + }).catch(err => { }) @@ -384,10 +407,14 @@ export default { }).then(res => { this.afterList=res.data console.log(this.afterList,"skjlfhskdjfh"); + }).catch(err => { }) + this.afterList.forEach(item=>{ + item.processTime=this.formatDate1(new Date(item.processTime * 1000)) + }) }, onOperationType(){ this.status=true @@ -395,6 +422,7 @@ export default { }, handlelist(){ console.log("dslkfkhd"); + this.returnTime=this.formatDate1(new Date()) this.show=true }, showPicker1(){ @@ -426,7 +454,7 @@ export default { await reply({ operationType:this.operationType, //处理方式[11已办结,10办理中,9联系当事人] content: this.content,//办理情况 - files: this.pictureList,//附件 + files: this.fileList.concat(this.pictureList),//附件 respondent: this.respondent,//答复人 respondentPhone: this.respondentPhone,//答复人电话 contacts: this.contacts,//联系人 @@ -447,25 +475,81 @@ export default { icEventId:this.icEventId }).then(res => { console.log(res,"skjlfhskdjfh"); + this.show=false + this.$toast.success('提交成功'); + this.$router.push('/hotline') + }).catch(err => { }) }, - afterRead1(file) { - // 文件读取后的处理逻辑 - this.fileList.push(file); + 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 "); }, - beforeRead(file) { - // 这里可以做一些文件的预处理,如果需要返回false则会阻止文件上传 - if (file.type.indexOf('audio') === -1) { - this.$toast.fail('请上传音频文件'); - return false; - } - return true; + afterRead1(file) { + file.status = 'uploading' + 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则会阻止文件上传 + // if (file.type.indexOf('audio') === -1) { + // this.$toast.fail('请上传音频文件'); + // return false; + // } + // 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) { - // 删除文件的处理逻辑 - this.fileList.splice(index, 1); + formatDate1(date) { + console.log("data",date); + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需加1 + 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; line-height: 21px; padding-left: 20px; -white-space: nowrap } .Dispatch-right-red{ font-family: PingFang SC; @@ -557,7 +640,6 @@ line-height: 23px; } .HotlineDetails-left{ width: 66px; -height: 14px; font-family: PingFang SC; font-weight: 500; font-size: 15px; diff --git a/src/views/mine/index.vue b/src/views/mine/index.vue index c13f6d5..8483261 100644 --- a/src/views/mine/index.vue +++ b/src/views/mine/index.vue @@ -22,12 +22,7 @@
-
-
-
修改密码
-
-
-
+