|
@@ -1,378 +1,559 @@
|
|
|
<template>
|
|
|
- <div class="repair-detail-box">
|
|
|
- <div
|
|
|
- :class="[
|
|
|
- 'repair-content',
|
|
|
- detailStatus === 'processed' ? 'fixed-page-content' : 'page-content',
|
|
|
- ]"
|
|
|
- >
|
|
|
- <div class="white-box page-1">
|
|
|
- <div class="cell-item">
|
|
|
- <p class="label">当前企业</p>
|
|
|
- <p class="tit">{{ detail.companyName }}</p>
|
|
|
- </div>
|
|
|
- <div class="cell-item">
|
|
|
- <p class="label">您是想</p>
|
|
|
- <div class="tit">{{ detail.type==='1'?'报事':'咨询' }}</div>
|
|
|
- </div>
|
|
|
- <div class="cell-item">
|
|
|
- <p class="label">快捷选择</p>
|
|
|
- <div class="tit">{{ detail.serviceType }}</div>
|
|
|
- </div>
|
|
|
- <div class="block-cell-item">
|
|
|
- <p class="label">报事报修描述</p>
|
|
|
- <div class="tit">
|
|
|
- <div class="textarea">
|
|
|
- {{detail.description}}
|
|
|
+ <div class="addRepair">
|
|
|
+ <div class="reportBody">
|
|
|
+ <ul class="detailUl">
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liName">当前企业</span>
|
|
|
+ <span class="liInfo">无锡XXXXX有限公司</span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liName">
|
|
|
+ <span style="color: red;margin-right: 10rpx;">*</span>
|
|
|
+ 您是想
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ <label class="radio" @click.stop="isCheck=true" >
|
|
|
+ <radio value="报事" :checked="isCheck" color="#0365F9"/>报事
|
|
|
+ </label>
|
|
|
+ <label class="radio" @click.stop="isCheck=false" >
|
|
|
+ <radio value="咨询" :checked="!isCheck" color="#0365F9"/>咨询
|
|
|
+ </label>
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi2">
|
|
|
+ <span class="liName">
|
|
|
+ 快捷选择
|
|
|
+ </span>
|
|
|
+ <div class="detailLi2Box">
|
|
|
+ <div class="detailLi2BoxTop">
|
|
|
+ <div class="checkItem" :class="item.isCheck?'checked':''" v-for="item in checkList" @click="clickCheck(item)">{{item.name}}</div>
|
|
|
</div>
|
|
|
+ <van-field
|
|
|
+ :value="form.contant"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入文字进行报事报修描述"
|
|
|
+ class="myField"
|
|
|
+ maxlength="800"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="white-box page-2">
|
|
|
- <div class="cell-item">
|
|
|
- <p class="label">位置</p>
|
|
|
- <div class="tit">{{ detail.position==='1'?'室内':'公区' }}</div>
|
|
|
- </div>
|
|
|
- <div class="block-cell-item">
|
|
|
- <p class="label">补充说明</p>
|
|
|
- <div class="tit">
|
|
|
- <ul class="annex-list-box">
|
|
|
- <li
|
|
|
- class="annex-item"
|
|
|
- v-for="(item, index) in explainAnnexList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <img :src="item.url" alt="" v-if="item.type === 'image'" />
|
|
|
- <video
|
|
|
- :src="item.url"
|
|
|
- v-if="item.type === 'video'"
|
|
|
- width="100%"
|
|
|
- height="100%"
|
|
|
- ></video>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="cell-item flex-item">
|
|
|
- <p class="label">报事人</p>
|
|
|
- <p class="tit tel-box">
|
|
|
- <span>{{ detail.userPhone }}</span>
|
|
|
- <TelNum :num="detail.phone" :showTel="false" />
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="cell-item">
|
|
|
- <p class="label">报事时间</p>
|
|
|
- <p class="tit">{{ detail.createdAt }}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="white-box page-3">
|
|
|
- <div class="custom-item-tit">
|
|
|
- <p class="tit">处理情况</p>
|
|
|
- </div>
|
|
|
- <div class="block-cell-item">
|
|
|
- <p class="label">处理进展</p>
|
|
|
- <div class="tit">
|
|
|
- <van-steps :active="stepActive" :active-color="'#6600FF'">
|
|
|
- <van-step v-for="(item, index) in processSteps" :key="index">{{
|
|
|
- item.label
|
|
|
- }}</van-step>
|
|
|
- </van-steps>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liName">
|
|
|
+ <span style="color: red;margin-right: 10rpx;">*</span>
|
|
|
+ 位置
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ <label class="radio" @click.stop="isCheck2=true" >
|
|
|
+ <radio value="报事" :checked="isCheck2" color="#0365F9"/>室内
|
|
|
+ </label>
|
|
|
+ <label class="radio" @click.stop="isCheck2=false" >
|
|
|
+ <radio value="咨询" :checked="!isCheck2" color="#0365F9"/>公区
|
|
|
+ </label>
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi2">
|
|
|
+ <span class="liName">
|
|
|
+ 补充说明
|
|
|
+ <span style="color: #B3B3B3;font-size: 28rpx">(支持图片/视频上传限20M内,最多6张)</span>
|
|
|
+ </span>
|
|
|
+ <div class="detailLi2Box" style="margin: 24rpx 0 0 0">
|
|
|
+ <van-uploader
|
|
|
+ :max-count="6"
|
|
|
+ @delete="deleteRYXXZP"
|
|
|
+ :file-list="fileList"
|
|
|
+ @after-read="uploadRYXXZP"
|
|
|
+ :show-upload="true"
|
|
|
+ />
|
|
|
</div>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liName">
|
|
|
+ 报事人
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 章敏-18915281562 <img src="https://www.idea-co-sf.com/gardenProduct/image/phoneIcon.png" class="phoneIcon">
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi" style="border-bottom: none">
|
|
|
+ <span class="liName">
|
|
|
+ 报事时间
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 2024-05-16 15:30
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="handleBox">
|
|
|
+ <div class="handleTitle">处理情况</div>
|
|
|
+ <div class="imageBox">
|
|
|
+ <div class="imageItem">
|
|
|
+ <img src="https://www.idea-co-sf.com/gardenProduct/image/upImage.svg" class="handleImg">
|
|
|
+ <span>上报</span>
|
|
|
</div>
|
|
|
- <div class="block-cell-item">
|
|
|
- <p class="label">
|
|
|
- 处理后拍照<span class="tips">(支持图片上传限20M内,最多6张)</span>
|
|
|
- </p>
|
|
|
- <div class="tit">
|
|
|
- <ul class="annex-list-box">
|
|
|
- <li
|
|
|
- class="annex-item"
|
|
|
- v-for="(item, index) in processedAnnexList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <img :src="item.url" alt="" v-if="item.type === 'image'" />
|
|
|
- <video
|
|
|
- :src="item.url"
|
|
|
- v-if="item.type === 'video'"
|
|
|
- width="100%"
|
|
|
- height="100%"
|
|
|
- ></video>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
+ <img src="https://www.idea-co-sf.com/gardenProduct/image/arrow.png" class="handleArrow">
|
|
|
+ <div class="imageItem">
|
|
|
+ <img src="https://www.idea-co-sf.com/gardenProduct/image/acceptance.svg" class="handleImg">
|
|
|
+ <span>受理</span>
|
|
|
</div>
|
|
|
- <div class="cell-item flex-item">
|
|
|
- <p class="label">结案人</p>
|
|
|
- <p class="tit tel-box">
|
|
|
- <span>{{ detail.handleUserId }}</span>
|
|
|
- <TelNum :num="detail.hanleUserPhone" :showTel="false" />
|
|
|
- </p>
|
|
|
+ <img src="https://www.idea-co-sf.com/gardenProduct/image/arrow.png" class="handleArrow">
|
|
|
+ <div class="imageItem">
|
|
|
+ <img :src="optionsType==='待受理'?'https://www.idea-co-sf.com/gardenProduct/image/unHandle.svg':'https://www.idea-co-sf.com/gardenProduct/image/handle.svg'" class="handleImg">
|
|
|
+ <span>处理</span>
|
|
|
</div>
|
|
|
- <div class="cell-item">
|
|
|
- <p class="label">结案时间</p>
|
|
|
- <p class="tit">{{detail.handleTime}}</p>
|
|
|
+ <img src="https://www.idea-co-sf.com/gardenProduct/image/arrow.png" class="handleArrow">
|
|
|
+ <div class="imageItem">
|
|
|
+ <img src="https://www.idea-co-sf.com/gardenProduct/image/evaluate.svg" class="handleImg">
|
|
|
+ <span>评价</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="white-box page-4" v-if="detailStatus === 'processed'||detailStatus === 'evaluated'">
|
|
|
- <div class="custom-item-tit">
|
|
|
- <p class="tit">服务评价</p>
|
|
|
- </div>
|
|
|
- <div class="custom-white-box-content">
|
|
|
- <div class="evaluate-box">
|
|
|
- <p class="evaluate-left">您对本次服务的评价</p>
|
|
|
- <div class="evaluate-right">
|
|
|
- <van-rate v-model="evaluateVal" color="#ffd21e" :readonly="detailStatus !== 'processed'"/>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div class="reportBody" v-if="optionsType!=='已处理'">
|
|
|
+ <ul class="detailUl">
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liInfo">
|
|
|
+ <label>
|
|
|
+ <radio value="报事" :checked="optionsType==='待受理'" color="#0365F9" :disabled="optionsType==='待处理'"/>派单
|
|
|
+ </label>
|
|
|
+ <label style="margin-left: 64rpx">
|
|
|
+ <radio value="咨询" :checked="optionsType==='待处理'" color="#0365F9" :disabled="optionsType==='待受理'"/>处理
|
|
|
+ </label>
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi" v-if="optionsType==='待受理'">
|
|
|
+ <span class="liName">
|
|
|
+ 派单给
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 李开心
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi2" v-if="optionsType==='待受理'">
|
|
|
+ <span class="liName" style="margin-bottom: 16rpx">
|
|
|
+ 备注
|
|
|
+ </span>
|
|
|
+ <van-field
|
|
|
+ :value="form.contant"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入文字进行报事报修描述"
|
|
|
+ class="myField2"
|
|
|
+ maxlength="800"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </li>
|
|
|
+ <li class="detailLi2" v-if="optionsType==='待处理'">
|
|
|
+ <span class="liName">
|
|
|
+ 处理后拍照
|
|
|
+ <span style="color: #B3B3B3;font-size: 28rpx">(支持图片上传限20M内,最多6张)</span>
|
|
|
+ </span>
|
|
|
+ <div class="detailLi2Box" style="margin: 24rpx 0 0 0">
|
|
|
+ <van-uploader
|
|
|
+ :max-count="6"
|
|
|
+ @delete="deleteRYXXZP"
|
|
|
+ :file-list="fileList"
|
|
|
+ @after-read="uploadRYXXZP"
|
|
|
+ :show-upload="true"
|
|
|
+ />
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi" v-if="optionsType==='待处理'">
|
|
|
+ <span class="liName">
|
|
|
+ 处理人
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 李开心
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi" v-if="optionsType==='待处理'" style="border-bottom: none">
|
|
|
+ <span class="liName">
|
|
|
+ 处理时间
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ {{timeNow}}
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="reportBody" v-if="optionsType==='已处理'">
|
|
|
+ <div class="handleTitle">派单信息</div>
|
|
|
+ <ul class="detailUl">
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liName">
|
|
|
+ 派单给
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 李开心
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi2">
|
|
|
+ <span class="liName" style="margin-bottom: 16rpx">
|
|
|
+ 备注
|
|
|
+ </span>
|
|
|
+ <van-field
|
|
|
+ :value="form.contant"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入文字进行报事报修描述"
|
|
|
+ class="myField2"
|
|
|
+ maxlength="800"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </li>
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liName">
|
|
|
+ 派单人
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 李欣怡
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi" style="border-bottom: none">
|
|
|
+ <span class="liName">
|
|
|
+ 派单时间
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 2024-05-18 15:30
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="reportBody" v-if="optionsType==='已处理'">
|
|
|
+ <div class="handleTitle">处理信息</div>
|
|
|
+ <ul class="detailUl">
|
|
|
+ <li class="detailLi2">
|
|
|
+ <span class="liName">
|
|
|
+ 处理后拍照
|
|
|
+ <span style="color: #B3B3B3;font-size: 28rpx">(支持图片上传限20M内,最多6张)</span>
|
|
|
+ </span>
|
|
|
+ <div class="detailLi2Box" style="margin: 24rpx 0 0 0">
|
|
|
+ <van-uploader
|
|
|
+ :max-count="6"
|
|
|
+ @delete="deleteRYXXZP"
|
|
|
+ :file-list="fileList"
|
|
|
+ @after-read="uploadRYXXZP"
|
|
|
+ :show-upload="true"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi">
|
|
|
+ <span class="liName">
|
|
|
+ 处理人
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 李开心
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ <li class="detailLi" style="border-bottom: none">
|
|
|
+ <span class="liName">
|
|
|
+ 处理时间
|
|
|
+ </span>
|
|
|
+ <span class="liInfo">
|
|
|
+ 2024-05-18 15:30
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="reportBody" v-if="optionsType==='已处理'">
|
|
|
+ <div class="evaluationBox" >
|
|
|
+ <span class="evaName">您对本次服务的评价</span>
|
|
|
+ <van-rate
|
|
|
+ :value="value"
|
|
|
+ :size="24"
|
|
|
+ gutter="32rpx"
|
|
|
+ void-color="#eee"
|
|
|
+ bind:change="onChange"
|
|
|
+ color="#fd9a63"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="repair-bottom bottom-button" v-if="detailStatus === 'processed'">
|
|
|
- <button class="btn" @click="onConfirm">评价提交</button>
|
|
|
+ <div class="buttonBox">
|
|
|
+ <button class="zcBtn" @tap="closePage" :class="optionsType==='已处理'?'btn2':'btn '">关闭</button>
|
|
|
+ <button class="btn tjBtn" v-if="optionsType==='待受理'">提交派单</button>
|
|
|
+ <button class="btn tjBtn" v-if="optionsType==='待处理'">处理完成</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import TelNum from '@/components/tel-number'
|
|
|
-import { getById } from '../../service/api_repair'
|
|
|
-import Base from '@/pages/base/base'
|
|
|
-import { editRepair } from '@/service/api_repair'
|
|
|
-import { Toast } from 'vant'
|
|
|
export default {
|
|
|
- components: {
|
|
|
- TelNum
|
|
|
+ data(){
|
|
|
+ return{
|
|
|
+ isCheck:false,
|
|
|
+ isCheck2:false,
|
|
|
+ form:{
|
|
|
+ contant:''
|
|
|
+ },
|
|
|
+ checkList:[
|
|
|
+ {name:'挂件安装',isCheck:true},
|
|
|
+ {name:'我要投诉',isCheck:false},
|
|
|
+ {name:'疏通管道',isCheck:false},
|
|
|
+ {name:'维修线路',isCheck:false},
|
|
|
+ {name:'更换灯泡',isCheck:false},
|
|
|
+ {name:'网络维修',isCheck:false},
|
|
|
+ {name:'保洁服务',isCheck:false},
|
|
|
+ {name:'其他维修',isCheck:false},
|
|
|
+ ],
|
|
|
+ fileList:[],
|
|
|
+ optionsType:'',
|
|
|
+ timeNow:'',
|
|
|
+ value: "5"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad(options) {
|
|
|
+ console.log(options);
|
|
|
+ this.optionsType = options.type
|
|
|
+ if (options.type==='待处理'){
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: '报修处理',
|
|
|
+ });
|
|
|
+ }else if(options.type==='已处理'){
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: '报修详情',
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: '报修派单',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ this.getTime()
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ // toRecord() {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url:'/pages/subPackages/reportRepair/repairRecord'
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ getTime(){
|
|
|
+
|
|
|
+ let timestamp = new Date().getTime();
|
|
|
+ let dateStr = new Date().toLocaleDateString();
|
|
|
+ console.log(dateStr);
|
|
|
+
|
|
|
+ let date = new Date();
|
|
|
+ let year = date.getFullYear();
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
+ let day = date.getDate();
|
|
|
+ let hours = date.getHours();
|
|
|
+ let minutes = date.getMinutes();
|
|
|
+ let fullDateStr = `${year}-${month}-${day} ${hours}:${minutes}`;
|
|
|
+ console.log(fullDateStr);
|
|
|
+ this.timeNow = fullDateStr
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- dc_key: ['QUICK_SELECTION', 'REPAIR_STATUS'],
|
|
|
- detailId: '', // 详情id
|
|
|
- detailStatus: '', // 详情状态:0、待受理 1、已受理 2、已处理 3、已评价
|
|
|
- explainAnnexList: [
|
|
|
- // {
|
|
|
- // type: 'image',
|
|
|
- // url: require('../../assets/image/reportRepair/shuibiao.jpeg')
|
|
|
- // }
|
|
|
- ], // 说明附件 type image、图片 video、视频
|
|
|
- processedAnnexList: [
|
|
|
- // {
|
|
|
- // type: 'image',
|
|
|
- // url: require('../../assets/image/reportRepair/shuibiao.jpeg')
|
|
|
- // }
|
|
|
- ], // 附件 type image、图片 video、视频
|
|
|
- stepActive: 0, // 当前处理到哪一步
|
|
|
- processSteps: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- status: 1,
|
|
|
- label: '上报'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- status: 1,
|
|
|
- label: '已受理'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- status: 1,
|
|
|
- label: '已处理'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 4,
|
|
|
- status: 0,
|
|
|
- label: '评价'
|
|
|
- }
|
|
|
- ], // 处理流程
|
|
|
- evaluateVal: 0, // 评分
|
|
|
- id: '',
|
|
|
- detail: {},
|
|
|
- fileUrlList: [],
|
|
|
- params: {
|
|
|
- id: '',
|
|
|
- evaluateNum: '',
|
|
|
- score: ''
|
|
|
- }
|
|
|
- }
|
|
|
+ closePage() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages/subPackages/todo/repairAcceptance'
|
|
|
+ })
|
|
|
},
|
|
|
- mixins: [Base],
|
|
|
- mounted() {
|
|
|
- this.id = this.$route.query.id
|
|
|
- this.initDict(this.dc_key).then((res) => {
|
|
|
- this.getDetailById()
|
|
|
- })
|
|
|
+ clickCheck(item){
|
|
|
+ item.isCheck = !item.isCheck
|
|
|
},
|
|
|
- methods: {
|
|
|
- onConfirm(value) {
|
|
|
- this.params.evaluateNum = this.params.evaluateNum + 1
|
|
|
- this.params.score = this.params.score + this.evaluateVal
|
|
|
- this.params.status = 'evaluated'
|
|
|
- editRepair(this.params).then((res) => {
|
|
|
- Toast.success('评价成功')
|
|
|
- this.$router.push({ path: 'repairRecord',
|
|
|
- query: { type: this.detail.type }
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- getDetailById() {
|
|
|
- const _this = this
|
|
|
- getById({ id: _this.id }).then((res) => {
|
|
|
- console.log(res.data)
|
|
|
- if (res.data) {
|
|
|
- const det = _this.getItemJson(res.data)
|
|
|
- this.detail = det
|
|
|
- this.explainAnnexList = det.fileUrlList
|
|
|
- this.processedAnnexList = det.handleUrlList
|
|
|
- this.detailStatus = det.status
|
|
|
- this.params = {
|
|
|
- id: det.id,
|
|
|
- evaluateNum: det.evaluateNum,
|
|
|
- score: det.score
|
|
|
- }
|
|
|
- this.evaluateVal = ((det.score == null ? 0 : det.score) / (det.evaluateNum == null ? 1 : det.evaluateNum))
|
|
|
- }
|
|
|
- // const item = _this.getItemJson(res)
|
|
|
- })
|
|
|
- },
|
|
|
- getItemJson: function(item) {
|
|
|
- item.releaseTime = this.$common.transDate(item.releaseTime)
|
|
|
- item.createdAt = this.$common.transDate(item.createdAt)
|
|
|
- item.serviceType = this.dc_map.QUICK_SELECTION[item.serviceType]
|
|
|
- if (item.userId) {
|
|
|
- const user = item.userId.split('-')
|
|
|
- item.userPhone = user[1] + '-' + user[2]
|
|
|
- item.phone = user[2]
|
|
|
- }
|
|
|
- if (item.handleUserId) {
|
|
|
- const test = item.handleUserId.split('-')
|
|
|
- item.handleUserId = test[1] + '-' + test[2]
|
|
|
- item.hanleUserPhone = test[2]
|
|
|
- }
|
|
|
- item.handleTime = this.$common.transDate(item.handleTime)
|
|
|
- switch (item.status) {
|
|
|
- case 'unAcceptance':
|
|
|
- this.stepActive = 0
|
|
|
- break
|
|
|
- case 'acceptance':
|
|
|
- this.stepActive = 1
|
|
|
- break
|
|
|
- case 'evaluated':
|
|
|
- this.stepActive = 3
|
|
|
- break
|
|
|
- case 'processed':
|
|
|
- this.stepActive = 2
|
|
|
- break
|
|
|
- }
|
|
|
- const fileUrls = this.$common.castEval(item.fileUrl)
|
|
|
- const fileUrl = []
|
|
|
- if (fileUrls !== null && fileUrls.length > 0) {
|
|
|
- fileUrls.forEach(item => {
|
|
|
- if (item.url) {
|
|
|
- const ul = {
|
|
|
- type: 'image',
|
|
|
- url: item.url.replace('/server', '/smartParkH5Server')
|
|
|
- }
|
|
|
- fileUrl.push(ul)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- item.fileUrlList = fileUrl
|
|
|
-
|
|
|
- const handleUrls = this.$common.castEval(item.handleUrl)
|
|
|
- const handleUrl = []
|
|
|
- if (handleUrls !== null && handleUrls.length > 0) {
|
|
|
- handleUrls.forEach(item => {
|
|
|
- if (item.url) {
|
|
|
- const ul = {
|
|
|
- type: 'image',
|
|
|
- url: item.url.replace('/server', '/smartParkH5Server')
|
|
|
- }
|
|
|
- handleUrl.push(ul)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- item.handleUrlList = handleUrl
|
|
|
- return item
|
|
|
- },
|
|
|
- /**
|
|
|
- *
|
|
|
- */
|
|
|
- quickSelect(item) {
|
|
|
- if (this.quickSleced.val && this.quickSleced.val === item.val) {
|
|
|
- this.quickSleced = {}
|
|
|
- } else {
|
|
|
- this.quickSleced = item
|
|
|
- }
|
|
|
+ deleteRYXXZP(event) {
|
|
|
+ this.fileList.splice(event.detail.index, 1);
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ uploadRYXXZP(event) {
|
|
|
+ console.log(event)
|
|
|
+ let that = this;
|
|
|
+ const { file } = event.detail;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: that.$constant.BASE_URI + "/wx/fileController/upload",
|
|
|
+ filePath: file.url,
|
|
|
+ name: "file",
|
|
|
+ formData: { user: "test" },
|
|
|
+ success(res) {
|
|
|
+ // 上传完成需要更新 fileList
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ that.fileList.push({
|
|
|
+ imgUrl: "/FileController/download/" + data.data[0],
|
|
|
+ id: data.data[0],
|
|
|
+ url:
|
|
|
+ that.$constant.BASE_URI +
|
|
|
+ "/FileController/download/" +
|
|
|
+ data.data[0],
|
|
|
+ isImage: true,
|
|
|
+ });
|
|
|
},
|
|
|
- /**
|
|
|
- * 上传文件
|
|
|
- */
|
|
|
- afterRead(file) {
|
|
|
- console.log(file)
|
|
|
- }
|
|
|
- }
|
|
|
+ fail(res) {},
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
-<style lang="scss" scoped>
|
|
|
-.repair-detail-box {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- .page-1 {
|
|
|
- .textarea {
|
|
|
- padding: 20px;
|
|
|
- border-radius: 10px;
|
|
|
- background: $page-color-base;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
- }
|
|
|
- .page-4 {
|
|
|
- .evaluate-box {
|
|
|
- padding: 20px 30px;
|
|
|
- background: $page-color-base;
|
|
|
- border: 1px solid #ebedf0;
|
|
|
- border-radius: 100px;
|
|
|
+<style lang="scss">
|
|
|
+.addRepair{
|
|
|
+ .reportBody{
|
|
|
+ margin-top: 24rpx;
|
|
|
+ padding: 38rpx 36rpx;
|
|
|
+ background: white;
|
|
|
+ //height: 1416rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .record {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- box-sizing: border-box;
|
|
|
+ justify-content: flex-end;
|
|
|
+ color: #0365F9;
|
|
|
+ font-size: 32rpx;
|
|
|
+ .recordImg{
|
|
|
+ width: 36rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ padding: 5rpx 0 0 10rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .detailUl{
|
|
|
+ margin-top: 20rpx;
|
|
|
+ .liName{
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+ .detailLi{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 32rpx 0;
|
|
|
+ border-bottom: 2rpx solid #E6E6E6;
|
|
|
+ .liInfo{
|
|
|
+ display: inline-block;
|
|
|
+ text-align: right;
|
|
|
+ max-width: 428rpx;
|
|
|
+ color: rgba(102, 102, 102, 1);
|
|
|
+ font-size: 32rpx;
|
|
|
+ line-height: 38rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .radio{
|
|
|
+ margin-left: 64rpx;
|
|
|
+ }
|
|
|
+ .phoneIcon{
|
|
|
+ width: 64rpx;
|
|
|
+ height: 64rpx;
|
|
|
+ margin-left: 24rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .detailLi2{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ padding: 32rpx 0;
|
|
|
+ border-bottom: 2rpx solid #E6E6E6;
|
|
|
+ .detailLi2BoxTop{
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 12rpx 0;
|
|
|
+ .checkItem{
|
|
|
+ width: 160rpx;
|
|
|
+ height: 64rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #666666;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background: #F5F7FA;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ margin: 12rpx 0;
|
|
|
+ }
|
|
|
+ .checked{
|
|
|
+ background: #0365F9;
|
|
|
+ color: white;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- .annex-list-box {
|
|
|
+ .van-cell {
|
|
|
+ background: #F5F7FA !important;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ .buttonBox{
|
|
|
display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- justify-content: space-between;
|
|
|
- &::after {
|
|
|
- display: block;
|
|
|
- content: "";
|
|
|
- width: 30%;
|
|
|
- height: 0px;
|
|
|
+ justify-content: center;
|
|
|
+ .btn{
|
|
|
+ width: 240rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ display: flex;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 48rpx 16rpx 150rpx 16rpx;
|
|
|
+ color: white;
|
|
|
+ letter-spacing: 2rpx;
|
|
|
+ text-indent: 2rpx;
|
|
|
+ }
|
|
|
+ .btn2{
|
|
|
+ width: 654rpx;
|
|
|
+ height: 96rpx;
|
|
|
+ display: flex;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 48rpx 48rpx 150rpx 48rpx;
|
|
|
+ color: white;
|
|
|
+ letter-spacing: 2rpx;
|
|
|
+ text-indent: 2rpx;
|
|
|
}
|
|
|
- .annex-item {
|
|
|
- width: 30%;
|
|
|
- height: 180px;
|
|
|
- border: 1px solid $text4;
|
|
|
- margin-bottom: 20px;
|
|
|
- position: relative;
|
|
|
- overflow: hidden;
|
|
|
- > img {
|
|
|
- width: 100%;
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- bottom: 0;
|
|
|
- margin: auto;
|
|
|
- display: block;
|
|
|
+ .zcBtn{
|
|
|
+ background: rgba(0, 0, 0, 0.05);
|
|
|
+ color: rgba(3, 101, 249, 1);
|
|
|
+ &::after{
|
|
|
+ border: none;
|
|
|
}
|
|
|
- video {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
+ }
|
|
|
+ .tjBtn{
|
|
|
+ background: #0365F9;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .handleBox{
|
|
|
+ background: white;
|
|
|
+ padding: 32rpx;
|
|
|
+ margin: 24rpx 0;
|
|
|
+ .imageBox{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-evenly;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 48rpx;
|
|
|
+ .handleImg{
|
|
|
+ width: 72rpx;
|
|
|
+ height: 72rpx;
|
|
|
+ margin-bottom: 8rpx;
|
|
|
+ }
|
|
|
+ .handleArrow{
|
|
|
+ width: 64rpx;
|
|
|
+ height: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
+ .imageItem{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ color: rgba(34, 34, 34, 1);
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .handleTitle{
|
|
|
+ color: rgba(34, 34, 34, 1);
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: 600;
|
|
|
}
|
|
|
- .tel-box {
|
|
|
+ .evaluationBox {
|
|
|
+ width: 686rpx;
|
|
|
+ height: 100rpx;
|
|
|
+ padding: 0 24rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- /deep/ .custom-tel-component {
|
|
|
- margin-left: 20px;
|
|
|
+ justify-content: space-between;
|
|
|
+ background: #f5f7fa;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin-top: 24rpx;
|
|
|
+ .evaName{
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
}
|
|
|
}
|
|
|
}
|