|
@@ -2,7 +2,7 @@
|
|
<div class="hc-order-service">
|
|
<div class="hc-order-service">
|
|
<div class="order-service-content">
|
|
<div class="order-service-content">
|
|
<el-scrollbar ref="scrollbarRef">
|
|
<el-scrollbar ref="scrollbarRef">
|
|
- <div class="content-box">
|
|
|
|
|
|
+ <div class="content-box" v-loading="dataLoading" element-loading-text="获取数据中...">
|
|
<div class="comment-card-box" v-for="(item,index) in orderDataList" :key="item.id">
|
|
<div class="comment-card-box" v-for="(item,index) in orderDataList" :key="item.id">
|
|
<div class="user-avatar-box">
|
|
<div class="user-avatar-box">
|
|
<el-avatar :size="50" :src="item.avatar || avatarPng" />
|
|
<el-avatar :size="50" :src="item.avatar || avatarPng" />
|
|
@@ -20,11 +20,11 @@
|
|
</div>
|
|
</div>
|
|
<div class="foot-tools-box">
|
|
<div class="foot-tools-box">
|
|
<div class="icon-box" :class="item['commentsNumber'] >= 1 ? 'active' : ''" @click="commentExpanded(item)">
|
|
<div class="icon-box" :class="item['commentsNumber'] >= 1 ? 'active' : ''" @click="commentExpanded(item)">
|
|
- <HcIcon name="chat" class="icon"/>
|
|
|
|
|
|
+ <HcIcon name="question-answer" class="icon" :fill="item['commentsNumber'] >= 1"/>
|
|
<span class="badge" v-if="item['commentsNumber'] >= 1">{{item['commentsNumber']}}</span>
|
|
<span class="badge" v-if="item['commentsNumber'] >= 1">{{item['commentsNumber']}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="icon-box" :class="item['currentUserGood'] ? 'active' : ''" :data-index="item['expandedName']" @click="likeClick(item)">
|
|
<div class="icon-box" :class="item['currentUserGood'] ? 'active' : ''" :data-index="item['expandedName']" @click="likeClick(item)">
|
|
- <HcIcon name="thumb_up" class="icon"/>
|
|
|
|
|
|
+ <i class="hc-icon-i icon" :class="item['currentUserGood'] ? 'hcicon-praise_fill ': 'hcicon-praise'"></i>
|
|
<span class="badge" v-if="item['goodNumber'] >= 1">{{item['goodNumber']}}</span>
|
|
<span class="badge" v-if="item['goodNumber'] >= 1">{{item['goodNumber']}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
<div class="page-top-btn" @click="scrollToTop">
|
|
<div class="page-top-btn" @click="scrollToTop">
|
|
- <HcIcon name="vertical_align_top" class="icon"/>
|
|
|
|
|
|
+ <HcIcon name="arrow-up" class="icon"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--我的工单服务-->
|
|
<!--我的工单服务-->
|
|
@@ -70,7 +70,7 @@
|
|
<template #extra>
|
|
<template #extra>
|
|
<el-tooltip effect="dark" content="发起新工单服务" placement="top">
|
|
<el-tooltip effect="dark" content="发起新工单服务" placement="top">
|
|
<el-button type="primary" hc-btn class="hc-add-icon" @click="newOrderServiceClick">
|
|
<el-button type="primary" hc-btn class="hc-add-icon" @click="newOrderServiceClick">
|
|
- <HcIcon name="add"/>
|
|
|
|
|
|
+ <HcIcon name="add" style="margin-right: 0"/>
|
|
</el-button>
|
|
</el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</template>
|
|
</template>
|
|
@@ -85,7 +85,7 @@
|
|
<template v-for="(item,index) in orderFlowList" :key="index">
|
|
<template v-for="(item,index) in orderFlowList" :key="index">
|
|
<el-timeline-item :class="item['currentBol']?'success':item['current']?'primary':''" size="large">
|
|
<el-timeline-item :class="item['currentBol']?'success':item['current']?'primary':''" size="large">
|
|
<div class="timeline-item-icon">
|
|
<div class="timeline-item-icon">
|
|
- <HcIcon name="done" class="check-icon" v-if="item['currentBol']"/>
|
|
|
|
|
|
+ <HcIcon name="check" class="check-icon" v-if="item['currentBol']"/>
|
|
<span v-else>{{index + 1}}</span>
|
|
<span v-else>{{index + 1}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="reply-name">{{item['replyName']}}</div>
|
|
<div class="reply-name">{{item['replyName']}}</div>
|
|
@@ -135,11 +135,11 @@
|
|
<el-input v-model="opinionContent" :rows="3" type="textarea" placeholder="请输入你宝贵的建议,我们将会跟踪解决"/>
|
|
<el-input v-model="opinionContent" :rows="3" type="textarea" placeholder="请输入你宝贵的建议,我们将会跟踪解决"/>
|
|
</div>
|
|
</div>
|
|
<div class="mt-3 upload-img" v-loading="spinShow">
|
|
<div class="mt-3 upload-img" v-loading="spinShow">
|
|
- <el-upload v-model:file-list="uploadFileList" :action="uploadAction" :headers="getTokenHeader()" :limit="3" :accept="uploadAccept" list-type="picture-card" multiple
|
|
|
|
- :before-upload="beforeUpload" :on-change="uploadChange" :on-exceed="uploadExceed" :on-preview="handlePreview" :on-remove="removeUpload">
|
|
|
|
- <HcIcon name="add" class="hc-upload-icon"/>
|
|
|
|
- </el-upload>
|
|
|
|
- <el-image-viewer v-if="showViewer" :initial-index="initialIndex" :url-list="previewFileList" @close="showViewer = false"/>
|
|
|
|
|
|
+ <div class="w-full">
|
|
|
|
+ <HcUploads :fileList="uploadFileList" :accept="uploadAccept" action="put-file" :limit="3" :size="30" :viewer="false"
|
|
|
|
+ @change="uploadChange" @progress="uploadsProgress" @del="removeUpload" @preview="handlePreview"/>
|
|
|
|
+ </div>
|
|
|
|
+ <el-image-viewer v-if="showViewer" :initial-index="initialIndex" :url-list="previewFileList" @close="previewModalClose"/>
|
|
</div>
|
|
</div>
|
|
<div class="mt-3">
|
|
<div class="mt-3">
|
|
<el-alert title="请上传JPG、PNG格式的图片文件,最多上传 3 张图片,文件大小不超过30M" type="error" :closable="false"/>
|
|
<el-alert title="请上传JPG、PNG格式的图片文件,最多上传 3 张图片,文件大小不超过30M" type="error" :closable="false"/>
|
|
@@ -147,7 +147,7 @@
|
|
<template #footer>
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
<el-button size="large" @click="handleModalClose">取消</el-button>
|
|
<el-button size="large" @click="handleModalClose">取消</el-button>
|
|
- <el-button type="primary" hc-btn @click="saveClick">提交</el-button>
|
|
|
|
|
|
+ <el-button type="primary" hc-btn :disabled="uploadsLoading" @click="saveClick">提交</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -155,7 +155,7 @@
|
|
<!--提示框-->
|
|
<!--提示框-->
|
|
<el-dialog v-model="showTipModal" title="感谢" width="600px" custom-class="hc-modal-border" :before-close="handleTipModalClose">
|
|
<el-dialog v-model="showTipModal" title="感谢" width="600px" custom-class="hc-modal-border" :before-close="handleTipModalClose">
|
|
<div class="tip-modal-icon-box">
|
|
<div class="tip-modal-icon-box">
|
|
- <HcIcon name="sentiment_very_satisfied"/>
|
|
|
|
|
|
+ <HcIcon name="emotion" fill/>
|
|
</div>
|
|
</div>
|
|
<div class="tip-modal-text-box">感谢您的仗义直言,大恩不言谢,有事联系我们,我们随时都在</div>
|
|
<div class="tip-modal-text-box">感谢您的仗义直言,大恩不言谢,有事联系我们,我们随时都在</div>
|
|
<template #footer>
|
|
<template #footer>
|
|
@@ -170,18 +170,17 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import {nextTick, onMounted, ref, watch} from "vue";
|
|
import {nextTick, onMounted, ref, watch} from "vue";
|
|
-import {useAppStore} from "~src/store/index";
|
|
|
|
|
|
+import {useAppStore} from "~src/store";
|
|
import orderServe from '~api/other/orderServe';
|
|
import orderServe from '~api/other/orderServe';
|
|
-import {getTokenHeader} from '~src/api/request/header';
|
|
|
|
import avatarPng from '~src/assets/images/avatar.png';
|
|
import avatarPng from '~src/assets/images/avatar.png';
|
|
import Web515Png from '~src/assets/images/Web515.png';
|
|
import Web515Png from '~src/assets/images/Web515.png';
|
|
import {userConfigSave} from "~api/other";
|
|
import {userConfigSave} from "~api/other";
|
|
-import {isType, isSize, base64ToFile, getIndex} from "vue-utils-plus"
|
|
|
|
-import oss from "~api/oss";
|
|
|
|
|
|
+import {isType, base64ToFile} from "vue-utils-plus"
|
|
|
|
+import ossApi from "~api/oss";
|
|
|
|
|
|
//初始变量
|
|
//初始变量
|
|
-const { getArrValue, getObjValue, getObjNullValue } = isType()
|
|
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
|
|
+const { getArrValue, getObjValue } = isType()
|
|
const projectId = ref(useAppState.getProjectId);
|
|
const projectId = ref(useAppState.getProjectId);
|
|
const contractId = ref(useAppState.getContractId);
|
|
const contractId = ref(useAppState.getContractId);
|
|
const isScreenShort = ref(useAppState.getScreenShort)
|
|
const isScreenShort = ref(useAppState.getScreenShort)
|
|
@@ -222,8 +221,11 @@ onMounted(() => {
|
|
})
|
|
})
|
|
|
|
|
|
//获取列表数据
|
|
//获取列表数据
|
|
|
|
+const dataLoading = ref(false)
|
|
const queryUserOpinionPage = async () => {
|
|
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) {
|
|
if (!error && code === 200) {
|
|
orderDataList.value = getArrValue(data['records'])
|
|
orderDataList.value = getArrValue(data['records'])
|
|
} else {
|
|
} else {
|
|
@@ -385,66 +387,45 @@ const queryDictBizList = async () => {
|
|
const opinionContent = ref('')
|
|
const opinionContent = ref('')
|
|
|
|
|
|
//上传
|
|
//上传
|
|
-const uploadFileList = ref([])
|
|
|
|
-const uploadAction = "/api/blade-resource/oss/endpoint/put-file"
|
|
|
|
const uploadAccept = "image/png,image/jpg,image/jpeg"
|
|
const uploadAccept = "image/png,image/jpg,image/jpeg"
|
|
|
|
+const uploadFileList = ref([])
|
|
|
|
|
|
-//上传前
|
|
|
|
-const beforeUpload = (res) => {
|
|
|
|
- if (isSize(res?.size,30)) {
|
|
|
|
- return true;
|
|
|
|
- } else {
|
|
|
|
- window?.$message?.warning('文件大小,不能过30M!');
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-//状态改变
|
|
|
|
-const uploadChange = (_, uploadFiles) => {
|
|
|
|
- console.log(uploadFiles)
|
|
|
|
- //暂时不知道怎么搞。。。
|
|
|
|
|
|
+//上传的文件结果
|
|
|
|
+const uploadChange = ({ fileList}) => {
|
|
|
|
+ uploadFileList.value = fileList
|
|
}
|
|
}
|
|
|
|
|
|
-//超出限制时
|
|
|
|
-const uploadExceed = () => {
|
|
|
|
- window?.$message?.warning('请上传JPG、PNG格式的图片文件,最多上传 3 张图片,文件大小不超过30M');
|
|
|
|
|
|
+//上传进度
|
|
|
|
+const uploadsLoading = ref(false)
|
|
|
|
+const uploadsProgress = (val) => {
|
|
|
|
+ uploadsLoading.value = val
|
|
}
|
|
}
|
|
|
|
|
|
-//预览
|
|
|
|
|
|
+//预览上传的文件
|
|
const showViewer = ref(false)
|
|
const showViewer = ref(false)
|
|
|
|
+const initialIndex = ref(-1)
|
|
const previewFileList = ref([])
|
|
const previewFileList = ref([])
|
|
-const initialIndex = ref(0)
|
|
|
|
-const handlePreview = (file) => {
|
|
|
|
- let fileArr = getUploadFileUrl()
|
|
|
|
- const fileList = uploadFileList.value ?? [];
|
|
|
|
- const index = getIndex(fileList, 'uid', file?.uid)
|
|
|
|
|
|
+const handlePreview = ({ index, fileArr}) => {
|
|
previewFileList.value = fileArr
|
|
previewFileList.value = fileArr
|
|
initialIndex.value = index
|
|
initialIndex.value = index
|
|
showViewer.value = true
|
|
showViewer.value = true
|
|
}
|
|
}
|
|
|
|
|
|
-//获取文件URL
|
|
|
|
-const getUploadFileUrl = () => {
|
|
|
|
- let fileArr = [], fileList = uploadFileList.value ?? [];
|
|
|
|
- fileList.forEach(item => {
|
|
|
|
- fileArr.push(item?.response?.data?.link)
|
|
|
|
- })
|
|
|
|
- return fileArr
|
|
|
|
|
|
+//预览关闭
|
|
|
|
+const previewModalClose = () => {
|
|
|
|
+ initialIndex.value = -1
|
|
|
|
+ showViewer.value = false
|
|
}
|
|
}
|
|
|
|
|
|
-//删除文件
|
|
|
|
-const removeUpload = async (file) => {
|
|
|
|
- const fileName = file?.response?.data?.name
|
|
|
|
- const { error, code } = await oss.removeFile({
|
|
|
|
- fileName: fileName
|
|
|
|
- })
|
|
|
|
- if (!error && code === 200) {
|
|
|
|
- return true
|
|
|
|
- } else {
|
|
|
|
- return false
|
|
|
|
|
|
+//删除上传的文件
|
|
|
|
+const removeUpload = async ({link}) => {
|
|
|
|
+ const arrUrl = link.split(".com//");
|
|
|
|
+ if (arrUrl.length > 0) {
|
|
|
|
+ await ossApi.removeFile({fileName: arrUrl[1]},false)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
//上传截图文件
|
|
//上传截图文件
|
|
const spinShow = ref(false)
|
|
const spinShow = ref(false)
|
|
const uploadImgFile = async (base64) => {
|
|
const uploadImgFile = async (base64) => {
|
|
@@ -454,7 +435,7 @@ const uploadImgFile = async (base64) => {
|
|
//上传文件
|
|
//上传文件
|
|
spinShow.value = true
|
|
spinShow.value = true
|
|
newOrderServiceClick()
|
|
newOrderServiceClick()
|
|
- const { error, code, data } = await oss.putFile(formData, false)
|
|
|
|
|
|
+ const { error, code, data } = await ossApi.putFile(formData, false)
|
|
spinShow.value = false
|
|
spinShow.value = false
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
let res = getObjValue(data)
|
|
let res = getObjValue(data)
|