|
@@ -3,74 +3,65 @@
|
|
|
<div class="order-service-content">
|
|
|
<el-scrollbar ref="scrollbarRef">
|
|
|
<div v-loading="dataLoading" class="content-box" element-loading-text="获取数据中...">
|
|
|
- <div v-for="(item,index) in orderDataList" :key="item.id" class="comment-card-box">
|
|
|
+ <div v-for="(item, index) in orderDataList" :key="index" class="comment-card-box">
|
|
|
<div class="user-avatar-box">
|
|
|
- <el-avatar :size="50" :src="item.avatar || avatarPng"/>
|
|
|
+ <el-avatar :size="50" :src="item.avatar || avatarPng" />
|
|
|
</div>
|
|
|
<div class="card-content-box">
|
|
|
<div class="user-info-box">
|
|
|
- <div class="text-lg">{{ item['createUserName'] || '用户名异常' }}</div>
|
|
|
- <div class="text-gray">{{ item['createTime'] }}</div>
|
|
|
+ <div class="text-lg">{{ item.createUserName || '用户名异常' }}</div>
|
|
|
+ <div class="text-gray">{{ item.createTime }}</div>
|
|
|
</div>
|
|
|
- <div class="desc_para" v-html="item['opinionContent']"></div>
|
|
|
- <div v-if="item['returnFiles']?.length > 0" class="image_desc">
|
|
|
- <div v-for="(items,indexs) in item['returnFiles']" class="hc-image-box">
|
|
|
- <HcImg :index="indexs" :src="items" :srcs="item['returnFiles']" class="hc-image"/>
|
|
|
+ <div class="desc_para" v-html="item.opinionContent" />
|
|
|
+ <div v-if="item.returnFiles?.length > 0" class="image_desc">
|
|
|
+ <div v-for="(items, indexs) in item.returnFiles" :key="indexs" class="hc-image-box">
|
|
|
+ <HcImg :index="indexs" :src="items" :srcs="item.returnFiles" class="hc-image" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="foot-tools-box">
|
|
|
- <div :class="item['commentsNumber'] >= 1 ? 'active' : ''" class="icon-box"
|
|
|
- @click="commentExpanded(item)">
|
|
|
- <HcIcon :fill="item['commentsNumber'] >= 1" class="icon" name="question-answer"/>
|
|
|
- <span v-if="item['commentsNumber'] >= 1"
|
|
|
- class="badge">{{ item['commentsNumber'] }}</span>
|
|
|
+ <div :class="item.commentsNumber >= 1 ? 'active' : ''" class="icon-box" @click="commentExpanded(item)">
|
|
|
+ <HcIcon :fill="item.commentsNumber >= 1" class="icon" name="question-answer" />
|
|
|
+ <span v-if="item.commentsNumber >= 1" class="badge">{{ item.commentsNumber }}</span>
|
|
|
</div>
|
|
|
- <div :class="item['currentUserGood'] ? 'active' : ''" :data-index="item['expandedName']"
|
|
|
- class="icon-box" @click="likeClick(item)">
|
|
|
- <i :class="item['currentUserGood'] ? 'hcicon-praise_fill ': 'hcicon-praise'"
|
|
|
- class="hc-icon-i icon"></i>
|
|
|
- <span v-if="item['goodNumber'] >= 1" class="badge">{{ item['goodNumber'] }}</span>
|
|
|
+ <div :class="item.currentUserGood ? 'active' : ''" :data-index="item.expandedName" class="icon-box" @click="likeClick(item)">
|
|
|
+ <i :class="item.currentUserGood ? 'hcicon-praise_fill ' : 'hcicon-praise'" class="hc-icon-i icon" />
|
|
|
+ <span v-if="item.goodNumber >= 1" class="badge">{{ item.goodNumber }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-collapse v-model="item['expandedName']" accordion class="hc-collapse-box">
|
|
|
- <el-collapse-item :name="`commentList-${item['id']}`" title="">
|
|
|
+ <el-collapse v-model="item.expandedName" accordion class="hc-collapse-box">
|
|
|
+ <el-collapse-item :name="`commentList-${item.id}`" title="">
|
|
|
<div class="collapse-comment-box">
|
|
|
<div class="comment-reply-content-box">
|
|
|
- <el-input v-model="item['replyContent']" autosize placeholder="我也说一句"
|
|
|
- type="textarea"/>
|
|
|
- <el-button hc-btn type="primary" @click="saveCommentClick(item)">评论
|
|
|
- </el-button>
|
|
|
+ <el-input v-model="item.replyContent" autosize placeholder="我也说一句" type="textarea" />
|
|
|
+ <el-button hc-btn type="primary" @click="saveCommentClick(item)">评论</el-button>
|
|
|
</div>
|
|
|
- <div v-for="items in item['expandedCommentList']" :key="items.id"
|
|
|
- class="user-comment-info-box">
|
|
|
- <el-avatar :size="50" :src="items.avatar || avatarPng"/>
|
|
|
+ <div v-for="items in item.expandedCommentList" :key="items.id" class="user-comment-info-box">
|
|
|
+ <el-avatar :size="50" :src="items.avatar || avatarPng" />
|
|
|
<div class="user-comment-box">
|
|
|
<div class="user-info-box">
|
|
|
- <span
|
|
|
- class="user-name">{{ items['userName'] || '用户名异常' }}</span>
|
|
|
- <span class="create-time">{{ items['createTime'] }}</span>
|
|
|
+ <span class="user-name">{{ items.userName || '用户名异常' }}</span>
|
|
|
+ <span class="create-time">{{ items.createTime }}</span>
|
|
|
</div>
|
|
|
- <div class="user-comment-content-box"
|
|
|
- v-html="items['replyContent']"></div>
|
|
|
+ <div class="user-comment-content-box" v-html="items.replyContent" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</div>
|
|
|
- <div v-if="parseInt(item['isSolve']) === 1" class="code-status-box">
|
|
|
- <img :src="Web515Png" alt="" class="widget"/>
|
|
|
+ <div v-if="parseInt(item.isSolve) === 1" class="code-status-box">
|
|
|
+ <img :src="Web515Png" alt="" class="widget">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
<div class="page-top-btn" @click="scrollToTop">
|
|
|
- <HcIcon class="icon" name="arrow-up"/>
|
|
|
+ <HcIcon class="icon" name="arrow-up" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--我的工单服务-->
|
|
|
- <div :style="'width:' + leftWidth + 'px;'" class="order-service-data">
|
|
|
- <HcCard :scrollbar="false">
|
|
|
+ <!-- 我的工单服务 -->
|
|
|
+ <div :style="`width:${leftWidth}px;`" class="order-service-data">
|
|
|
+ <HcNewCard :scrollbar="false">
|
|
|
<template #header>
|
|
|
<el-badge :value="2" class="item-badge">
|
|
|
<div class="font-bold text-lg">我的工单服务进度</div>
|
|
@@ -79,39 +70,34 @@
|
|
|
<template #extra>
|
|
|
<el-tooltip content="发起新工单服务" effect="dark" placement="top">
|
|
|
<el-button class="hc-add-icon" hc-btn type="primary" @click="newOrderServiceClick">
|
|
|
- <HcIcon name="add" style="margin-right: 0"/>
|
|
|
+ <HcIcon name="add" style="margin-right: 0" />
|
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
<div class="mb-5">
|
|
|
- <el-select v-model="nameSelectKey" block placeholder="工单名称" size="large"
|
|
|
- @change="nameSelectUpdate">
|
|
|
- <el-option v-for="item in nameSelectData" :key="item.id" :label="item?.title"
|
|
|
- :value="item?.id"/>
|
|
|
+ <el-select v-model="nameSelectKey" block placeholder="工单名称" size="large" @change="nameSelectUpdate">
|
|
|
+ <el-option v-for="item in nameSelectData" :key="item.id" :label="item?.title" :value="item?.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <div :class="isCurrentBol?'time-height':''" class="time-line-box">
|
|
|
+ <div :class="isCurrentBol ? 'time-height' : ''" class="time-line-box">
|
|
|
<el-scrollbar>
|
|
|
<el-timeline class="hc-time-line">
|
|
|
- <template v-for="(item,index) in orderFlowList" :key="index">
|
|
|
- <el-timeline-item :class="item['currentBol']?'success':item['current']?'primary':''"
|
|
|
- size="large">
|
|
|
+ <template v-for="(item, index) in orderFlowList" :key="index">
|
|
|
+ <el-timeline-item :class="item.currentBol ? 'success' : item.current ? 'primary' : ''" size="large">
|
|
|
<div class="timeline-item-icon">
|
|
|
- <HcIcon v-if="item['currentBol']" class="check-icon" name="check"/>
|
|
|
+ <HcIcon v-if="item.currentBol" class="check-icon" name="check" />
|
|
|
<span v-else>{{ index + 1 }}</span>
|
|
|
</div>
|
|
|
- <div class="reply-name">{{ item['replyName'] }}</div>
|
|
|
- <div class="reply-content" v-html="item['replyContent']"></div>
|
|
|
+ <div class="reply-name">{{ item.replyName }}</div>
|
|
|
+ <div class="reply-content" v-html="item.replyContent" />
|
|
|
</el-timeline-item>
|
|
|
</template>
|
|
|
</el-timeline>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
- <div :class="isCurrentBol?'show':''" class="evaluation-box">
|
|
|
+ <div :class="isCurrentBol ? 'show' : ''" class="evaluation-box">
|
|
|
<div class="text-lg font-bold">评价</div>
|
|
|
- <div class="tip-box">
|
|
|
- 请对工单处理评价,若是未解决问题,可进行投诉,平台核实情况,将对相关客服人员绩效考核,并且重新为您自动发起工单解决问题
|
|
|
- </div>
|
|
|
+ <div class="tip-box">请对工单处理评价,若是未解决问题,可进行投诉,平台核实情况,将对相关客服人员绩效考核,并且重新为您自动发起工单解决问题</div>
|
|
|
<div class="radio-group-box">
|
|
|
<el-radio-group v-model="evaluationKey" class="radio-group">
|
|
|
<div v-for="item in evaluationData" :key="item.value" class="radio-item">
|
|
@@ -121,49 +107,45 @@
|
|
|
</div>
|
|
|
<div class="btn-box">
|
|
|
<el-button hc-btn type="primary" @click="disposeUserFeedback">
|
|
|
- <HcIcon name="check_circle"/>
|
|
|
+ <HcIcon name="check_circle" />
|
|
|
<span>提交</span>
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </HcCard>
|
|
|
- <!--左右拖动-->
|
|
|
- <div class="horizontal-drag-line" @mousedown="onmousedown"/>
|
|
|
+ </HcNewCard>
|
|
|
+ <!-- 左右拖动 -->
|
|
|
+ <div class="horizontal-drag-line" @mousedown="onmousedown" />
|
|
|
</div>
|
|
|
- <!--提交工单-->
|
|
|
- <el-dialog v-model="showModal" :before-close="handleModalClose" class="hc-modal-border" title="发起新工单服务"
|
|
|
- width="720px">
|
|
|
+ <!-- 提交工单 -->
|
|
|
+ <el-dialog v-model="showModal" :before-close="handleModalClose" class="hc-modal-border" title="发起新工单服务" width="720px">
|
|
|
<div class="title">请选择您需要反馈的问题类型</div>
|
|
|
<div class="hc-type-tabs my-5">
|
|
|
<el-radio-group v-model="typeTabKey" size="large" @change="typeTabChange">
|
|
|
- <el-radio-button v-for="item in typeTab" :label="item?.dictValue">{{ item?.dictValue }}
|
|
|
- </el-radio-button>
|
|
|
+ <el-radio-button v-for="(item, index) in typeTab" :key="index" :label="item?.dictValue">{{ item?.dictValue }}</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
<div class="modal-checkbox-box">
|
|
|
<el-checkbox-group v-model="typeCheckBox[typeTabIndex]">
|
|
|
<div v-for="item in typeTab[typeTabIndex]?.children" :key="item.id" class="checkbox-item">
|
|
|
- <el-checkbox :label="item['dictValue']">{{ item['dictValue'] }}</el-checkbox>
|
|
|
+ <el-checkbox :label="item.dictValue">{{ item.dictValue }}</el-checkbox>
|
|
|
</div>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
<div class="mt-5">
|
|
|
- <el-input v-model="opinionContent" :rows="3" placeholder="请输入你宝贵的建议,我们将会跟踪解决"
|
|
|
- type="textarea"/>
|
|
|
+ <el-input v-model="opinionContent" :rows="3" placeholder="请输入你宝贵的建议,我们将会跟踪解决" type="textarea" />
|
|
|
</div>
|
|
|
<div v-loading="spinShow" class="mt-3 upload-img">
|
|
|
<div class="w-full">
|
|
|
- <HcUploads :accept="uploadAccept" :fileList="uploadFileList" :limit="3" :size="30" :viewer="false"
|
|
|
- action="put-file"
|
|
|
- @change="uploadChange" @del="removeUpload" @preview="handlePreview"
|
|
|
- @progress="uploadsProgress"/>
|
|
|
+ <HcUploads
|
|
|
+ :accept="uploadAccept" :file-list="uploadFileList" :limit="3" :size="30" :viewer="false" action="put-file"
|
|
|
+ @change="uploadChange" @del="removeUpload" @preview="handlePreview"
|
|
|
+ @progress="uploadsProgress"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <el-image-viewer v-if="showViewer" :initial-index="initialIndex" :url-list="previewFileList"
|
|
|
- @close="previewModalClose"/>
|
|
|
+ <el-image-viewer v-if="showViewer" :initial-index="initialIndex" :url-list="previewFileList" @close="previewModalClose" />
|
|
|
</div>
|
|
|
<div class="mt-3">
|
|
|
- <el-alert :closable="false" title="请上传JPG、PNG格式的图片文件,最多上传 3 张图片,文件大小不超过30M"
|
|
|
- type="error"/>
|
|
|
+ <el-alert :closable="false" title="请上传JPG、PNG格式的图片文件,最多上传 3 张图片,文件大小不超过30M" type="error" />
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
@@ -173,11 +155,10 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!--提示框-->
|
|
|
- <el-dialog v-model="showTipModal" :before-close="handleTipModalClose" class="hc-modal-border" title="感谢"
|
|
|
- width="600px">
|
|
|
+ <!-- 提示框 -->
|
|
|
+ <el-dialog v-model="showTipModal" :before-close="handleTipModalClose" class="hc-modal-border" title="感谢" width="600px">
|
|
|
<div class="tip-modal-icon-box">
|
|
|
- <HcIcon fill name="emotion"/>
|
|
|
+ <HcIcon fill name="emotion" />
|
|
|
</div>
|
|
|
<div class="tip-modal-text-box">感谢您的仗义直言,大恩不言谢,有事联系我们,我们随时都在</div>
|
|
|
<template #footer>
|
|
@@ -191,25 +172,25 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {nextTick, onMounted, ref, watch} from "vue";
|
|
|
-import {useAppStore} from "~src/store";
|
|
|
-import orderServe from '~api/other/orderServe';
|
|
|
-import avatarPng from '~src/assets/images/avatar.png';
|
|
|
-import Web515Png from '~src/assets/images/Web515.png';
|
|
|
-import {userConfigSave} from "~api/other";
|
|
|
-import {base64ToFile, getObjVal, getArrValue, getObjValue} from "js-fast-way"
|
|
|
-import ossApi from "~api/oss";
|
|
|
+import { nextTick, onMounted, ref, watch } from 'vue'
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
+import orderServe from '~api/other/orderServe'
|
|
|
+import avatarPng from '~src/assets/images/avatar.png'
|
|
|
+import Web515Png from '~src/assets/images/Web515.png'
|
|
|
+import { userConfigSave } from '~api/other'
|
|
|
+import { base64ToFile, getArrValue, getObjVal, getObjValue } from 'js-fast-way'
|
|
|
+import ossApi from '~api/oss'
|
|
|
|
|
|
//初始变量
|
|
|
const useAppState = useAppStore()
|
|
|
-const projectId = ref(useAppState.getProjectId);
|
|
|
-const contractId = ref(useAppState.getContractId);
|
|
|
+const projectId = ref(useAppState.getProjectId)
|
|
|
+const contractId = ref(useAppState.getContractId)
|
|
|
const isScreenShort = ref(useAppState.getScreenShort)
|
|
|
//是否弹出工单感谢, 0不弹出,1弹出
|
|
|
const opinionView = ref(useAppState.getOrderServiceTipModal)
|
|
|
|
|
|
//搜索和分页数据
|
|
|
-const searchForm = ref({current: 1, size: 20})
|
|
|
+const searchForm = ref({ current: 1, size: 20 })
|
|
|
const orderDataList = ref([])
|
|
|
|
|
|
// 工单名称
|
|
@@ -218,11 +199,11 @@ const nameSelectData = ref([])
|
|
|
|
|
|
//监听
|
|
|
watch(() => [
|
|
|
- useAppState.getScreenShort
|
|
|
+ useAppState.getScreenShort,
|
|
|
], ([ScreenShort]) => {
|
|
|
isScreenShort.value = ScreenShort
|
|
|
if (ScreenShort) {
|
|
|
- let base64 = window.sessionStorage.getItem('screenShort-base64') || '';
|
|
|
+ let base64 = window.sessionStorage.getItem('screenShort-base64') || ''
|
|
|
if (base64) uploadImgFile(base64)
|
|
|
}
|
|
|
})
|
|
@@ -230,7 +211,7 @@ watch(() => [
|
|
|
nextTick(() => {
|
|
|
//截图数据
|
|
|
if (isScreenShort.value) {
|
|
|
- let base64 = window.sessionStorage.getItem('screenShort-base64') || '';
|
|
|
+ let base64 = window.sessionStorage.getItem('screenShort-base64') || ''
|
|
|
if (base64) uploadImgFile(base64)
|
|
|
}
|
|
|
})
|
|
@@ -245,7 +226,7 @@ onMounted(() => {
|
|
|
const dataLoading = ref(false)
|
|
|
const queryUserOpinionPage = async () => {
|
|
|
dataLoading.value = true
|
|
|
- const {error, code, data} = await orderServe.queryUserOpinionPage(searchForm.value)
|
|
|
+ const { error, code, data } = await orderServe.queryUserOpinionPage(searchForm.value)
|
|
|
dataLoading.value = false
|
|
|
if (!error && code === 200) {
|
|
|
orderDataList.value = getArrValue(data['records'])
|
|
@@ -256,8 +237,8 @@ const queryUserOpinionPage = async () => {
|
|
|
|
|
|
//获取工单服务下拉列表
|
|
|
const queryCurrentUserOpinionList = async () => {
|
|
|
- const {error, code, data} = await orderServe.queryCurrentUserOpinionList({
|
|
|
- projectId: projectId.value
|
|
|
+ const { error, code, data } = await orderServe.queryCurrentUserOpinionList({
|
|
|
+ projectId: projectId.value,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
const res = getArrValue(data)
|
|
@@ -278,14 +259,14 @@ const queryCurrentUserOpinionList = async () => {
|
|
|
const isCurrentBol = ref(false)
|
|
|
const orderFlowList = ref([])
|
|
|
const queryUserFlowOpinion = async () => {
|
|
|
- let id = nameSelectKey.value || null;
|
|
|
- const {error, code, data} = await orderServe.queryUserFlowOpinion({userOpinionId: id})
|
|
|
+ let id = nameSelectKey.value || null
|
|
|
+ const { error, code, data } = await orderServe.queryUserFlowOpinion({ userOpinionId: id })
|
|
|
if (!error && code === 200) {
|
|
|
const res = getArrValue(data)
|
|
|
orderFlowList.value = res
|
|
|
if (res.length > 0) {
|
|
|
- const {currentBol, evaluation} = res[res.length - 1];
|
|
|
- isCurrentBol.value = !!(currentBol && parseInt(evaluation) === -1);
|
|
|
+ const { currentBol, evaluation } = res[res.length - 1]
|
|
|
+ isCurrentBol.value = !!(currentBol && parseInt(evaluation) === -1)
|
|
|
}
|
|
|
} else {
|
|
|
orderFlowList.value = []
|
|
@@ -312,8 +293,8 @@ const commentExpanded = (item) => {
|
|
|
|
|
|
//获取评论列表
|
|
|
const queryCommentsList = async (item) => {
|
|
|
- const {error, code, data} = await orderServe.queryCommentsList({
|
|
|
- userOpinionId: item.id
|
|
|
+ const { error, code, data } = await orderServe.queryCommentsList({
|
|
|
+ userOpinionId: item.id,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
item['expandedCommentList'] = getArrValue(data)
|
|
@@ -325,16 +306,16 @@ const queryCommentsList = async (item) => {
|
|
|
//提交评论
|
|
|
const saveCommentClick = async (item) => {
|
|
|
if (!item['replyContent']) {
|
|
|
- window.$message?.warning('请先填写评论内容');
|
|
|
+ window.$message?.warning('请先填写评论内容')
|
|
|
} else {
|
|
|
- const {error, code} = await orderServe.saveUserComments({
|
|
|
+ const { error, code } = await orderServe.saveUserComments({
|
|
|
userOpinionId: item.id,
|
|
|
replyContent: item['replyContent'],
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
- window.$message?.success('评论成功');
|
|
|
+ window.$message?.success('评论成功')
|
|
|
item['replyContent'] = ''
|
|
|
queryCommentsList(item)
|
|
|
}
|
|
@@ -344,17 +325,17 @@ const saveCommentClick = async (item) => {
|
|
|
//点赞
|
|
|
const likeClick = async (item) => {
|
|
|
if (item['currentUserGood']) {
|
|
|
- const {error, code} = await orderServe.cancelGood({
|
|
|
- userOpinionId: item.id
|
|
|
+ const { error, code } = await orderServe.cancelGood({
|
|
|
+ userOpinionId: item.id,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
item['currentUserGood'] = false
|
|
|
item['goodNumber']--
|
|
|
}
|
|
|
} else {
|
|
|
- const {error, code} = await orderServe.addGoodNumber({
|
|
|
+ const { error, code } = await orderServe.addGoodNumber({
|
|
|
userOpinionId: item.id,
|
|
|
- good: 1
|
|
|
+ good: 1,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
item['currentUserGood'] = true
|
|
@@ -368,14 +349,14 @@ const showModal = ref(false)
|
|
|
|
|
|
//类型tab数据
|
|
|
const typeTabKey = ref(null)
|
|
|
-const typeTab = ref([]);
|
|
|
+const typeTab = ref([])
|
|
|
|
|
|
-const typeTabIndex = ref(-1);
|
|
|
-const typeCheckBox = ref([]);
|
|
|
+const typeTabIndex = ref(-1)
|
|
|
+const typeCheckBox = ref([])
|
|
|
|
|
|
const typeTabChange = (val) => {
|
|
|
- typeTabKey.value = val;
|
|
|
- typeTabIndex.value = typeTab.value.findIndex(item => item.dictValue === val);
|
|
|
+ typeTabKey.value = val
|
|
|
+ typeTabIndex.value = typeTab.value.findIndex(item => item.dictValue === val)
|
|
|
}
|
|
|
|
|
|
//发起新工单服务
|
|
@@ -391,7 +372,7 @@ const handleModalClose = () => {
|
|
|
|
|
|
//获取字典信息
|
|
|
const queryDictBizList = async () => {
|
|
|
- const {error, code, data} = await orderServe.queryDictBizList()
|
|
|
+ const { error, code, data } = await orderServe.queryDictBizList()
|
|
|
if (!error && code === 200) {
|
|
|
const res = getArrValue(data)
|
|
|
typeTab.value = res
|
|
@@ -408,11 +389,11 @@ const queryDictBizList = async () => {
|
|
|
const opinionContent = ref('')
|
|
|
|
|
|
//上传
|
|
|
-const uploadAccept = "image/png,image/jpg,image/jpeg"
|
|
|
+const uploadAccept = 'image/png,image/jpg,image/jpeg'
|
|
|
const uploadFileList = ref([])
|
|
|
|
|
|
//上传的文件结果
|
|
|
-const uploadChange = ({fileList}) => {
|
|
|
+const uploadChange = ({ fileList }) => {
|
|
|
uploadFileList.value = fileList
|
|
|
}
|
|
|
|
|
@@ -426,7 +407,7 @@ const uploadsProgress = (val) => {
|
|
|
const showViewer = ref(false)
|
|
|
const initialIndex = ref(-1)
|
|
|
const previewFileList = ref([])
|
|
|
-const handlePreview = ({index, fileArr}) => {
|
|
|
+const handlePreview = ({ index, fileArr }) => {
|
|
|
previewFileList.value = fileArr
|
|
|
initialIndex.value = index
|
|
|
showViewer.value = true
|
|
@@ -439,10 +420,10 @@ const previewModalClose = () => {
|
|
|
}
|
|
|
|
|
|
//删除上传的文件
|
|
|
-const removeUpload = async ({link}) => {
|
|
|
- const arrUrl = link.split(".com//");
|
|
|
+const removeUpload = async ({ link }) => {
|
|
|
+ const arrUrl = link.split('.com//')
|
|
|
if (arrUrl.length > 0) {
|
|
|
- await ossApi.removeFile({fileName: arrUrl[1]}, false)
|
|
|
+ await ossApi.removeFile({ fileName: arrUrl[1] }, false)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -450,13 +431,13 @@ const removeUpload = async ({link}) => {
|
|
|
//上传截图文件
|
|
|
const spinShow = ref(false)
|
|
|
const uploadImgFile = async (base64) => {
|
|
|
- let fileOfBlob = base64ToFile(base64);
|
|
|
- let formData = new FormData();
|
|
|
- formData.append("file", fileOfBlob);
|
|
|
+ let fileOfBlob = base64ToFile(base64)
|
|
|
+ let formData = new FormData()
|
|
|
+ formData.append('file', fileOfBlob)
|
|
|
//上传文件
|
|
|
spinShow.value = true
|
|
|
newOrderServiceClick()
|
|
|
- const {error, code, data} = await ossApi.putFile(formData, false)
|
|
|
+ const { error, code, data } = await ossApi.putFile(formData, false)
|
|
|
spinShow.value = false
|
|
|
if (!error && code === 200) {
|
|
|
let res = getObjValue(data)
|
|
@@ -464,42 +445,42 @@ const uploadImgFile = async (base64) => {
|
|
|
uploadFileList.value.push({
|
|
|
url: res?.link,
|
|
|
name: res?.name,
|
|
|
- response: {data: res}
|
|
|
+ response: { data: res },
|
|
|
})
|
|
|
}
|
|
|
- window.sessionStorage.removeItem('screenShort-base64');
|
|
|
- window.$message?.success('文件上传成功');
|
|
|
+ window.sessionStorage.removeItem('screenShort-base64')
|
|
|
+ window.$message?.success('文件上传成功')
|
|
|
spinShow.value = false
|
|
|
} else {
|
|
|
- window.sessionStorage.removeItem('screenShort-base64');
|
|
|
- window.$message?.warning('文件上传失败');
|
|
|
+ window.sessionStorage.removeItem('screenShort-base64')
|
|
|
+ window.$message?.warning('文件上传失败')
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//提交工单反馈
|
|
|
const saveClick = async () => {
|
|
|
//拼接问题类型
|
|
|
- let problemType = typeTabKey.value, index = typeTabIndex.value, problemVal = '';
|
|
|
- const checkBoxVal = typeCheckBox.value[index] || [];
|
|
|
+ let problemType = typeTabKey.value, index = typeTabIndex.value, problemVal = ''
|
|
|
+ const checkBoxVal = typeCheckBox.value[index] || []
|
|
|
checkBoxVal.forEach(item => {
|
|
|
problemVal += `-${item}`
|
|
|
})
|
|
|
let filesUrl = getUploadFileUrl()
|
|
|
//判断数据
|
|
|
if (!problemVal) {
|
|
|
- window.$message?.warning('请先选择问题类型');
|
|
|
+ window.$message?.warning('请先选择问题类型')
|
|
|
} else {
|
|
|
//请求接口
|
|
|
- const {error, code} = await orderServe.saveUserOpinion({
|
|
|
+ const { error, code } = await orderServe.saveUserOpinion({
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|
|
|
problemType: problemType + problemVal,
|
|
|
opinionContent: opinionContent.value,
|
|
|
- returnFiles: filesUrl
|
|
|
+ returnFiles: filesUrl,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
- window.$message?.success('提交成功');
|
|
|
- showModal.value = false;
|
|
|
+ window.$message?.success('提交成功')
|
|
|
+ showModal.value = false
|
|
|
//重置表单
|
|
|
typeCheckBox.value[index] = []
|
|
|
opinionContent.value = ''
|
|
@@ -508,14 +489,14 @@ const saveClick = async () => {
|
|
|
//更新数据
|
|
|
queryUserOpinionPage()
|
|
|
queryCurrentUserOpinionList()
|
|
|
- window?.location?.reload() //刷新页面
|
|
|
+ window?.location?.reload() //刷新页面
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//获取文件URL
|
|
|
const getUploadFileUrl = () => {
|
|
|
- let fileArr = [], fileList = uploadFileList.value ?? [];
|
|
|
+ let fileArr = [], fileList = uploadFileList.value ?? []
|
|
|
fileList.forEach(item => {
|
|
|
if (getObjVal(item?.response)) {
|
|
|
fileArr.push(item?.response?.data?.link)
|
|
@@ -530,19 +511,19 @@ const getUploadFileUrl = () => {
|
|
|
const showTipModal = ref(false)
|
|
|
const evaluationKey = ref('1')
|
|
|
const evaluationData = [
|
|
|
- {value: "1", label: "满意"},
|
|
|
- {value: "2", label: "不满意并再次提交解决"},
|
|
|
- {value: "3", label: "不满意且投诉"}
|
|
|
+ { value: '1', label: '满意' },
|
|
|
+ { value: '2', label: '不满意并再次提交解决' },
|
|
|
+ { value: '3', label: '不满意且投诉' },
|
|
|
]
|
|
|
const disposeUserFeedback = async () => {
|
|
|
let oldEndFlow = orderFlowList.value[3]?.id || ''
|
|
|
- const {error, code} = await orderServe.disposeUserFeedback({
|
|
|
+ const { error, code } = await orderServe.disposeUserFeedback({
|
|
|
oldEndFlow: oldEndFlow,
|
|
|
type: evaluationKey.value || '',
|
|
|
- userOpinionId: nameSelectKey.value || ''
|
|
|
+ userOpinionId: nameSelectKey.value || '',
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
- window.$message?.success('提交成功');
|
|
|
+ window.$message?.success('提交成功')
|
|
|
showTipModal.value = parseInt(opinionView.value) === 1
|
|
|
queryCurrentUserOpinionList()
|
|
|
}
|
|
@@ -550,7 +531,7 @@ const disposeUserFeedback = async () => {
|
|
|
|
|
|
//提示框
|
|
|
const tipModalClick = async () => {
|
|
|
- await userConfigSave({opinionView: 0})
|
|
|
+ await userConfigSave({ opinionView: 0 })
|
|
|
showTipModal.value = false
|
|
|
useAppState.setOrderServiceTipModal(0)
|
|
|
opinionView.value = 0
|
|
@@ -567,18 +548,18 @@ const scrollToTop = () => {
|
|
|
}
|
|
|
|
|
|
//左右拖动,改变树形结构宽度
|
|
|
-const leftWidth = ref(500);
|
|
|
+const leftWidth = ref(500)
|
|
|
const onmousedown = () => {
|
|
|
const clientWidth = document.body.clientWidth
|
|
|
document.onmousemove = (ve) => {
|
|
|
- let diffVal = clientWidth - (ve.clientX + 24);
|
|
|
+ let diffVal = clientWidth - (ve.clientX + 24)
|
|
|
if (diffVal >= 300 && diffVal <= 1000) {
|
|
|
- leftWidth.value = diffVal;
|
|
|
+ leftWidth.value = diffVal
|
|
|
}
|
|
|
}
|
|
|
document.onmouseup = () => {
|
|
|
- document.onmousemove = null;
|
|
|
- document.onmouseup = null;
|
|
|
+ document.onmousemove = null
|
|
|
+ document.onmouseup = null
|
|
|
}
|
|
|
}
|
|
|
</script>
|