瀏覽代碼

feat: lint style and fix 上传问题

gemercheung 1 年之前
父節點
當前提交
7e3152877e

文件差異過大導致無法顯示
+ 2137 - 1390
pnpm-lock.yaml


+ 3 - 1
src/App.vue

@@ -17,7 +17,7 @@
     let code = getUrlKey('code'); //获取url参数code
     let code = getUrlKey('code'); //获取url参数code
     // let isWeixn = is_weixn();
     // let isWeixn = is_weixn();
     const router = useRouter();
     const router = useRouter();
-    const routersName = router.currentRoute.value;
+    const routersName = String(router.currentRoute.value);
     console.log('routersName', routersName);
     console.log('routersName', routersName);
     if (routersName == 'feedback' || routersName == 'feedbacksuccess') {
     if (routersName == 'feedback' || routersName == 'feedbacksuccess') {
       document.title = t('feedback.title');
       document.title = t('feedback.title');
@@ -52,6 +52,7 @@
     let scope = 'snsapi_base'; //snsapi_userinfo   //静默授权 用户无感知
     let scope = 'snsapi_base'; //snsapi_userinfo   //静默授权 用户无感知
     let appid = 'wxac3d59ea82d9b82a';
     let appid = 'wxac3d59ea82d9b82a';
     let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${urlNow}&response_type=code&scope=${scope}&state=${state}#wechat_redirect`;
     let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${urlNow}&response_type=code&scope=${scope}&state=${state}#wechat_redirect`;
+    console.log('url', url);
     // window.location.replace(url);
     // window.location.replace(url);
   }
   }
 </script>
 </script>
@@ -67,6 +68,7 @@
   .van-toast {
   .van-toast {
     background: rgba(0, 0, 0, 0.7) !important;
     background: rgba(0, 0, 0, 0.7) !important;
   }
   }
+
   .htmlText {
   .htmlText {
     overflow: hidden;
     overflow: hidden;
     text-overflow: ellipsis;
     text-overflow: ellipsis;

+ 1 - 1
src/api/feedback.ts

@@ -1,4 +1,4 @@
-import useAxiosApi from '/@/utils/useAxiosApi';
+// import useAxiosApi from '/@/utils/useAxiosApi';
 import request from '/@/utils/request';
 import request from '/@/utils/request';
 
 
 /**
 /**

+ 1 - 1
src/api/index.ts

@@ -143,7 +143,7 @@ export function wechatMobilePay(params) {
   return request({
   return request({
     url: '/service/sale/order/pay/wechatPay',
     url: '/service/sale/order/pay/wechatPay',
     method: 'post',
     method: 'post',
-    data:params,
+    data: params,
   });
   });
 }
 }
 export interface wxLoginRus {
 export interface wxLoginRus {

+ 13 - 15
src/assets/app.css

@@ -15,12 +15,12 @@ p {
   --van-font-size-sm: 14px !important;
   --van-font-size-sm: 14px !important;
   --van-font-size-md: 16px !important;
   --van-font-size-md: 16px !important;
   --van-font-size-lg: 18px !important; */
   --van-font-size-lg: 18px !important; */
-  --van-primary-color: #00B3EC!important;
-  --van-blue: #00B3EC!important;
+  --van-primary-color: #00b3ec !important;
+  --van-blue: #00b3ec !important;
   --van-uploader-delete-background: red;
   --van-uploader-delete-background: red;
-  --primary-color: #00B3EC!important;
-  --van-blue: #00B3EC!important;
-  --van-uploader-delete-background: red!important;
+  --primary-color: #00b3ec !important;
+  --van-blue: #00b3ec !important;
+  --van-uploader-delete-background: red !important;
 }
 }
 .ant-upload-list-item-container {
 .ant-upload-list-item-container {
   height: 90px !important;
   height: 90px !important;
@@ -30,11 +30,11 @@ p {
   height: 90px !important;
   height: 90px !important;
   width: 90px !important;
   width: 90px !important;
 }
 }
-.van-cell-group{
+.van-cell-group {
   margin: 0 !important;
   margin: 0 !important;
   padding: var(--van-cell-group-inset-padding);
   padding: var(--van-cell-group-inset-padding);
 }
 }
-.ant-input-textarea-show-count::after{
+.ant-input-textarea-show-count::after {
   position: absolute;
   position: absolute;
   right: 3px;
   right: 3px;
   bottom: -24px;
   bottom: -24px;
@@ -48,24 +48,22 @@ p {
 .ant-input-focused {
 .ant-input-focused {
   border-color: var(--van-primary-color);
   border-color: var(--van-primary-color);
 }
 }
-.ant-upload.ant-upload-select:not(.ant-upload-disabled):hover{
-  border-color: var(--van-primary-color)!important;
+.ant-upload.ant-upload-select:not(.ant-upload-disabled):hover {
+  border-color: var(--van-primary-color) !important;
 }
 }
 .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector {
 .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector {
   border-color: var(--van-primary-color);
   border-color: var(--van-primary-color);
 }
 }
-.van-rate__icon{
-	height: var(--rate-width) !important;
+.van-rate__icon {
+  height: var(--rate-width) !important;
 }
 }
 .van-rate__icon--half {
 .van-rate__icon--half {
   position: absolute !important;
   position: absolute !important;
 }
 }
-.van-cell:after{
+.van-cell:after {
   left: 0px !important;
   left: 0px !important;
 }
 }
 
 
-.van-uploader__preview-delete-icon{
+.van-uploader__preview-delete-icon {
   position: absolute !important;
   position: absolute !important;
 }
 }
-
-

+ 6 - 4
src/i18n/lang/en-us.ts

@@ -23,7 +23,8 @@ export const lang: langType = {
     upload: 'Upload',
     upload: 'Upload',
     uploadsuccess: 'Upload Success',
     uploadsuccess: 'Upload Success',
     submitSuccess: 'Submitted successfully',
     submitSuccess: 'Submitted successfully',
-    submitText: 'Thank you for your feedback! We will seriously consider it and work hard to improve it, and look forward to providing you with a better product experience!',
+    submitText:
+      'Thank you for your feedback! We will seriously consider it and work hard to improve it, and look forward to providing you with a better product experience!',
     title: 'Feedback',
     title: 'Feedback',
     title1: 'Problem Description',
     title1: 'Problem Description',
     title2: 'Expected Solution',
     title2: 'Expected Solution',
@@ -41,8 +42,9 @@ export const lang: langType = {
     setselcet: 'Select ',
     setselcet: 'Select ',
     success:
     success:
       'Thank you for your feedback. We attach great importance to your opinions and will deal with them as soon as possible after receiving them. Looking forward to providing you with an excellent product experience!',
       'Thank you for your feedback. We attach great importance to your opinions and will deal with them as soon as possible after receiving them. Looking forward to providing you with an excellent product experience!',
-    fileTips: 'Please upload pictures or videos. Recommend picture within 5MB, jpg/png format support. Recommend video within 50MB, mp4 format support',
-    fileTipsPc: 'Please upload pictures or videos</br> Recommend picture within 5MB, jpg/png format support</br> Recommend video within 50MB, mp4 format support',
-  
+    fileTips:
+      'Please upload pictures or videos. Recommend picture within 5MB, jpg/png format support. Recommend video within 50MB, mp4 format support',
+    fileTipsPc:
+      'Please upload pictures or videos</br> Recommend picture within 5MB, jpg/png format support</br> Recommend video within 50MB, mp4 format support',
   },
   },
 };
 };

+ 1 - 1
src/layout/basic/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div class="main-page">
   <div class="main-page">
     <RouterView v-slot="{ Component }" v-if="$route.meta.keepAlive">
     <RouterView v-slot="{ Component }" v-if="$route.meta.keepAlive">
-      <keep-alive :include="['homePage','index']">
+      <keep-alive :include="['homePage', 'index']">
         <component :is="Component" :key="$route.path" />
         <component :is="Component" :key="$route.path" />
       </keep-alive>
       </keep-alive>
     </RouterView>
     </RouterView>

+ 2 - 2
src/router/index.ts

@@ -1,7 +1,7 @@
 import { createRouter, createWebHashHistory, Router } from 'vue-router';
 import { createRouter, createWebHashHistory, Router } from 'vue-router';
 import { useCookies } from '@vueuse/integrations/useCookies';
 import { useCookies } from '@vueuse/integrations/useCookies';
-let current = window.navigator.language || window.navigator.userLanguage || null;
-let mytitle = '用户反馈'
+const current = window.navigator.language || window.navigator.userLanguage || null;
+let mytitle = '用户反馈';
 if (current && !/^zh/.test(current)) {
 if (current && !/^zh/.test(current)) {
   mytitle = 'Feedback';
   mytitle = 'Feedback';
 }
 }

+ 2 - 2
src/router/routes.ts

@@ -84,9 +84,9 @@ const routes = [
           title: '申请开票',
           title: '申请开票',
           keepAlive: true,
           keepAlive: true,
         },
         },
-      }
+      },
     ],
     ],
-  }
+  },
 ];
 ];
 
 
 export default routes;
 export default routes;

+ 3 - 3
src/store/index.ts

@@ -5,9 +5,9 @@
 // store.use(piniaPluginPersistedstate);
 // store.use(piniaPluginPersistedstate);
 
 
 // export default store;
 // export default store;
-import { useUserStore } from "./modules/user";
-import { useHomeStore } from "./modules/home"
- 
+import { useUserStore } from './modules/user';
+import { useHomeStore } from './modules/home';
+
 export default function useStore() {
 export default function useStore() {
   return {
   return {
     user: useUserStore(),
     user: useUserStore(),

+ 46 - 47
src/utils/request.ts

@@ -1,5 +1,5 @@
-import axios, { AxiosRequestConfig } from "axios";
-import { showLoadingToast, closeToast, showFailToast  } from 'vant';
+import axios, { AxiosRequestConfig } from 'axios';
+import { showLoadingToast, closeToast, showFailToast } from 'vant';
 import { useCookies } from '@vueuse/integrations/useCookies';
 import { useCookies } from '@vueuse/integrations/useCookies';
 const { VITE_TOKEN_KEY } = import.meta.env;
 const { VITE_TOKEN_KEY } = import.meta.env;
 const token = useCookies().get(VITE_TOKEN_KEY as string);
 const token = useCookies().get(VITE_TOKEN_KEY as string);
@@ -8,83 +8,82 @@ interface ResponseData<T = any> {
   message: string;
   message: string;
   data: T;
   data: T;
 }
 }
-let loadingCount = 0
+let loadingCount = 0;
 const MODE = import.meta.env.MODE; // 环境变量
 const MODE = import.meta.env.MODE; // 环境变量
-console.log("MODE: ", MODE);
+console.log('MODE: ', MODE);
 const service = axios.create({
 const service = axios.create({
   // 开发环境请求本地代理,生产环境请求域名
   // 开发环境请求本地代理,生产环境请求域名
   // 开发环境在接口面前自动加上 api,配合 本地代理使用,无需在每个接口前写 /api
   // 开发环境在接口面前自动加上 api,配合 本地代理使用,无需在每个接口前写 /api
-//   baseURL: MODE === "development" ? "/service" : "http://ab.svip52.com/api",
+  //   baseURL: MODE === "development" ? "/service" : "http://ab.svip52.com/api",
   headers: {
   headers: {
-    "X-Requested-With": "XMLHttpRequest",
-    "Content-Type": "application/json",
+    'X-Requested-With': 'XMLHttpRequest',
+    'Content-Type': 'application/json',
   },
   },
 });
 });
 // 两层泛型,一层是 axios 提供的,AxiosRequestConfig
 // 两层泛型,一层是 axios 提供的,AxiosRequestConfig
 // 一层是自定义的,ResponseData<T>
 // 一层是自定义的,ResponseData<T>
 // 实现响应的 data 以及 data.data 的类型提示
 // 实现响应的 data 以及 data.data 的类型提示
 // request 函数传入一个 data.data 的类型
 // request 函数传入一个 data.data 的类型
-const request = async <T = any>(
-  config: AxiosRequestConfig
-): Promise<ResponseData<T>> => {
+const request = async <T = any>(config: AxiosRequestConfig): Promise<ResponseData<T>> => {
   // 请求前加上 token
   // 请求前加上 token
   service.interceptors.request.use((config) => {
   service.interceptors.request.use((config) => {
-    addToast()
+    addToast();
     if (config?.headers) {
     if (config?.headers) {
-      config.headers.wxOpenId = token || "";
+      config.headers.wxOpenId = token || '';
     }
     }
     return config;
     return config;
   });
   });
-    //response拦截器
-    service.interceptors.response.use(
-    response => {
-        reduce()
-        return response;
+  //response拦截器
+  service.interceptors.response.use(
+    (response) => {
+      reduce();
+      return response;
     },
     },
-    error => {
-        reduce()
-        return Promise.reject(error)
-    }
-    );
+    (error) => {
+      reduce();
+      return Promise.reject(error);
+    },
+  );
   const { data } = await service.request<ResponseData<T>>(config);
   const { data } = await service.request<ResponseData<T>>(config);
   // 请求失败
   // 请求失败
-//   reduce()
-  if (typeof data !== "object") {
+  //   reduce()
+  if (typeof data !== 'object') {
     showFailToast({
     showFailToast({
-      message:'服务器错误,请联系管理员',
+      message: '服务器错误,请联系管理员',
       iconSize: 35,
       iconSize: 35,
       icon: 'warning-o',
       icon: 'warning-o',
     });
     });
     return Promise.reject(data);
     return Promise.reject(data);
   }
   }
-  if (!(data.code == 200 || data.code == 0 )) {
-    if (data.message) showFailToast({
-      message:data.message,
-      icon: 'warning-o',
-      iconSize: 35,
-    });
+  if (!(data.code == 200 || data.code == 0)) {
+    if (data.message)
+      showFailToast({
+        message: data.message,
+        icon: 'warning-o',
+        iconSize: 35,
+      });
     // 401,token 过期
     // 401,token 过期
     if (data.code == 401) {
     if (data.code == 401) {
-      localStorage.removeItem("token");
-      location.href = "#/login";
+      localStorage.removeItem('token');
+      location.href = '#/login';
     }
     }
     return Promise.reject(data);
     return Promise.reject(data);
   }
   }
   return data;
   return data;
 };
 };
-function addToast(){
-    showLoadingToast({
-      message: '加载中...',
-      forbidClick: true,
-      duration: 0,
-      iconSize: 35,
-    });
-    loadingCount++
+function addToast() {
+  showLoadingToast({
+    message: '加载中...',
+    forbidClick: true,
+    duration: 0,
+    iconSize: 35,
+  });
+  loadingCount++;
+}
+function reduce() {
+  loadingCount--;
+  if (loadingCount == 0) {
+    closeToast();
   }
   }
-function reduce(){
-    loadingCount--
-    if (loadingCount == 0) {
-      closeToast()
-    }
 }
 }
-export default request;
+export default request;

+ 13 - 14
src/utils/useAxiosApi.ts

@@ -1,7 +1,7 @@
 import { useAxios } from '@vueuse/integrations/useAxios';
 import { useAxios } from '@vueuse/integrations/useAxios';
 import axios from 'axios';
 import axios from 'axios';
-import { showLoadingToast, closeToast, showFailToast  } from 'vant';
-let loadingCount = 0
+import { showLoadingToast, closeToast, showFailToast } from 'vant';
+let loadingCount = 0;
 // create an axios instance
 // create an axios instance
 const instance = axios.create({
 const instance = axios.create({
   withCredentials: false,
   withCredentials: false,
@@ -22,7 +22,7 @@ instance.interceptors.request.use(
       forbidClick: true,
       forbidClick: true,
       duration: 0,
       duration: 0,
     });
     });
-    loadingCount++
+    loadingCount++;
     return config;
     return config;
   },
   },
   (error) => {
   (error) => {
@@ -45,32 +45,32 @@ instance.interceptors.response.use(
    * You can also judge the status by HTTP Status Code
    * You can also judge the status by HTTP Status Code
    */
    */
   (response) => {
   (response) => {
-    console.log('response',response);
-    loadingCount--
+    console.log('response', response);
+    loadingCount--;
     if (loadingCount == 0) {
     if (loadingCount == 0) {
-      closeToast()
+      closeToast();
     }
     }
     const res = response.data;
     const res = response.data;
     // if the custom code is not 200, it is judged as an error.
     // if the custom code is not 200, it is judged as an error.
     if (res.code !== 200) {
     if (res.code !== 200) {
       showFailToast({
       showFailToast({
-        message:res.message,
+        message: res.message,
         icon: 'warning-o',
         icon: 'warning-o',
         iconSize: 35,
         iconSize: 35,
       });
       });
       return Promise.reject(res || 'Error');
       return Promise.reject(res || 'Error');
     } else {
     } else {
-      return Promise.resolve(res); //进行中 
+      return Promise.resolve(res); //进行中
     }
     }
   },
   },
   (error) => {
   (error) => {
-    console.log('error',error.response);
-    loadingCount--
+    console.log('error', error.response);
+    loadingCount--;
     if (loadingCount == 0) {
     if (loadingCount == 0) {
-      closeToast()
+      closeToast();
     }
     }
     showFailToast({
     showFailToast({
-      message:'服务器错误,请联系管理员',
+      message: '服务器错误,请联系管理员',
       icon: 'warning-o',
       icon: 'warning-o',
       iconSize: 35,
       iconSize: 35,
     });
     });
@@ -82,7 +82,6 @@ instance.interceptors.response.use(
  * reactive useFetchApi
  * reactive useFetchApi
  */
  */
 
 
-
 export default function useAxiosApi(url: string, config?: any): any {
 export default function useAxiosApi(url: string, config?: any): any {
   return useAxios(url, config, instance);
   return useAxios(url, config, instance);
- }
+}

+ 46 - 47
src/views/detail/evaluate.vue

@@ -22,61 +22,60 @@
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
-  
-  <script lang="ts" setup name="detailPage">
-import { ref, unref  } from 'vue';
-import { showToast } from 'vant';
-import { commentApi } from '/@/api';
-import { useRouter } from 'vue-router';
-import { showSuccessToast  } from 'vant';
-const router = useRouter();
-const { id } = unref(router.currentRoute)?.params;
-const evaluate = ref({
-  comment: '',
-  starRank: 5,
-});
-async function handlComment() {
-  const { comment, starRank} = evaluate.value
-  if(!comment){
-    return showToast('请输入您的评论')
-  }
-  const res = await commentApi({
-    repairId: id,
-    comment,
-    starRank,
+
+<script lang="ts" setup name="detailPage">
+  import { ref, unref } from 'vue';
+  import { showToast } from 'vant';
+  import { commentApi } from '/@/api';
+  import { useRouter } from 'vue-router';
+  import { showSuccessToast } from 'vant';
+  const router = useRouter();
+  const { id } = unref(router.currentRoute)?.params;
+  const evaluate = ref({
+    comment: '',
+    starRank: 5,
   });
   });
-  console.log('evaluate', res);
-  showSuccessToast({
-      message:'评论成功',
+  async function handlComment() {
+    const { comment, starRank } = evaluate.value;
+    if (!comment) {
+      return showToast('请输入您的评论');
+    }
+    const res = await commentApi({
+      repairId: id,
+      comment,
+      starRank,
+    });
+    console.log('evaluate', res);
+    showSuccessToast({
+      message: '评论成功',
       iconSize: 35,
       iconSize: 35,
       duration: 1000,
       duration: 1000,
     });
     });
     setTimeout(() => {
     setTimeout(() => {
-        router.go(-1);
+      router.go(-1);
     }, 200);
     }, 200);
-}
+  }
 </script>
 </script>
- <style lang="scss" >
-.evaluate {
-  min-height: 100vh;
-  background-color: #f5f5f5;
-  .evaluate_top {
-    background-color: #fff;
-    .star {
-      line-height: 25px;
-      padding: 11px 16px;
-      border-top: 1px solid #e7e7e7;
-      .text {
-        margin-right: 15px;
-        font-family: PingFang SC-Regular, PingFang SC;
-        font-weight: 400;
-        color: #333333;
+<style lang="scss">
+  .evaluate {
+    min-height: 100vh;
+    background-color: #f5f5f5;
+    .evaluate_top {
+      background-color: #fff;
+      .star {
+        line-height: 25px;
+        padding: 11px 16px;
+        border-top: 1px solid #e7e7e7;
+        .text {
+          margin-right: 15px;
+          font-family: PingFang SC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #333333;
+        }
       }
       }
     }
     }
+    .but {
+      padding: 25px 15px;
+    }
   }
   }
-  .but {
-    padding: 25px 15px;
-  }
-}
 </style>
 </style>
-  

+ 327 - 281
src/views/detail/index.vue

@@ -1,39 +1,76 @@
 // 评价页面
 // 评价页面
 <template>
 <template>
   <div class="page">
   <div class="page">
-    <div class="stepList item_content" :key="stepShow+'123'">
+    <div class="stepList item_content" :key="stepShow + '123'">
       <div class="item_content_top">
       <div class="item_content_top">
-        <div class="stepList_title">维修单号 {{id}}</div>
-        <van-button v-if="detailData.repairerVo?.status == 30" size="small" @click="goRoute(`/repair/${id}`)" color="#00B3EC" type="primary" >查看报价</van-button>
-        <van-button v-if="detailData.repairerVo?.status == 80 || detailData.repairerVo?.status == 40" size="small" @click="goRoute(`/payment/${id}`)" color="#00B3EC" type="primary" >支付</van-button>
-        <van-button v-if="detailData.repairerVo?.status  > 80 && detailData.repairerVo?.commentStatus == 0" size="small" @click="goRoute(`/evaluate/${id}`)" color="#00B3EC" type="primary" >评价</van-button>
-        <van-button v-if="detailData.repairerVo?.status  > 80 && detailData.applyInvoice == 0 && detailData.repairerVo.warrantyType != 0 && detailData.repairerVo.warrantyType != 3 && detailData.payAmount > 0" size="small" @click="goRoute(`/invoice/${id}`)" color="#00B3EC" type="primary" >申请开票</van-button>
+        <div class="stepList_title">维修单号 {{ id }}</div>
+        <van-button v-if="detailData.repairerVo?.status == 30" size="small" @click="goRoute(`/repair/${id}`)" color="#00B3EC" type="primary"
+          >查看报价</van-button
+        >
+        <van-button
+          v-if="detailData.repairerVo?.status == 80 || detailData.repairerVo?.status == 40"
+          size="small"
+          @click="goRoute(`/payment/${id}`)"
+          color="#00B3EC"
+          type="primary"
+          >支付</van-button
+        >
+        <van-button
+          v-if="detailData.repairerVo?.status > 80 && detailData.repairerVo?.commentStatus == 0"
+          size="small"
+          @click="goRoute(`/evaluate/${id}`)"
+          color="#00B3EC"
+          type="primary"
+          >评价</van-button
+        >
+        <van-button
+          v-if="
+            detailData.repairerVo?.status > 80 &&
+            detailData.applyInvoice == 0 &&
+            detailData.repairerVo.warrantyType != 0 &&
+            detailData.repairerVo.warrantyType != 3 &&
+            detailData.payAmount > 0
+          "
+          size="small"
+          @click="goRoute(`/invoice/${id}`)"
+          color="#00B3EC"
+          type="primary"
+          >申请开票</van-button
+        >
       </div>
       </div>
       <transition-group name="van-fade">
       <transition-group name="van-fade">
         <!-- <div v-show="stepShow">Slide Right</div> -->
         <!-- <div v-show="stepShow">Slide Right</div> -->
         <div class="border stepItem" v-for="(item, index) in processList" :key="index" v-show="stepShow ? true : index < 1">
         <div class="border stepItem" v-for="(item, index) in processList" :key="index" v-show="stepShow ? true : index < 1">
           <div class="step">
           <div class="step">
-            <div class="step_title">{{item.title || item.remark}}</div>
-            <div v-if="item.repairLogId">{{ replacName(item.sysUserName,item.subTitle) }}</div>
+            <div class="step_title">{{ item.title || item.remark }}</div>
+            <div v-if="item.repairLogId">{{ replacName(item.sysUserName, item.subTitle) }}</div>
             <div class="status htmlText" v-else>
             <div class="status htmlText" v-else>
-                {{ replacName(item.sysUserName,item.subTitle) }}
+              {{ replacName(item.sysUserName, item.subTitle) }}
             </div>
             </div>
             <!-- <div v-if="item.customerAddress">{{item.customerAddress.sendType == 0?' 前台送修':`快递寄送 ${item.customerAddress?.sendTrackingNum}`}}</div> -->
             <!-- <div v-if="item.customerAddress">{{item.customerAddress.sendType == 0?' 前台送修':`快递寄送 ${item.customerAddress?.sendTrackingNum}`}}</div> -->
-            <div class="htmlText" v-if="item.customerAddress">{{item.customerAddress.getType == 0?' 前台取回':`快递寄回 ${item.customerAddress?.getTrackingNum}`}}</div>
-            <div class="htmlText" v-if="item.repairRegisterVo?.checkResult">检测结果: {{item.repairRegisterVo?.checkResult}}</div>
-            <div class="htmlText" v-if="item.repairRegisterVo?.partNamesStr">所需备件: {{item.repairRegisterVo?.partNamesStr}}</div>
-            <div class="htmlText" v-if="item.orderReceiving?.orderFaultMsg">机器外观: {{item.orderReceiving?.orderFaultMsg}}</div>
-            <div class="htmlText" v-if="item.repairTest?.resultInfo">测试描述: {{item.repairTest?.resultInfo}}</div>
+            <div class="htmlText" v-if="item.customerAddress">{{
+              item.customerAddress.getType == 0 ? ' 前台取回' : `快递寄回 ${item.customerAddress?.getTrackingNum}`
+            }}</div>
+            <div class="htmlText" v-if="item.repairRegisterVo?.checkResult">检测结果: {{ item.repairRegisterVo?.checkResult }}</div>
+            <div class="htmlText" v-if="item.repairRegisterVo?.partNamesStr">所需备件: {{ item.repairRegisterVo?.partNamesStr }}</div>
+            <div class="htmlText" v-if="item.orderReceiving?.orderFaultMsg">机器外观: {{ item.orderReceiving?.orderFaultMsg }}</div>
+            <div class="htmlText" v-if="item.repairTest?.resultInfo">测试描述: {{ item.repairTest?.resultInfo }}</div>
             <div class="imgList" v-if="item.imagesInfo?.length">
             <div class="imgList" v-if="item.imagesInfo?.length">
-              <img :src="imgItem" v-for="(imgItem,imgID) in item.imagesInfo" @click="imgPreview(item.imagesInfo, imgID)" :key="imgItem + index" alt="" />
+              <img
+                :src="imgItem"
+                v-for="(imgItem, imgID) in item.imagesInfo"
+                @click="imgPreview(item.imagesInfo, imgID)"
+                :key="imgItem + index"
+                alt=""
+              />
             </div>
             </div>
-            <div class="htmlText" v-if="item.remark">{{item.remark}}</div>
-            <div class="step_time" v-if="item.createTime">{{dayjs(item.createTime).format('MM-DD HH:mm')}}</div>
+            <div class="htmlText" v-if="item.remark">{{ item.remark }}</div>
+            <div class="step_time" v-if="item.createTime">{{ dayjs(item.createTime).format('MM-DD HH:mm') }}</div>
             <div class="doct" :class="index == 0 ? 'oneSpot' : 'Spot'"></div>
             <div class="doct" :class="index == 0 ? 'oneSpot' : 'Spot'"></div>
           </div>
           </div>
         </div>
         </div>
       </transition-group>
       </transition-group>
-      <van-divider v-if="processList?.length >1">
+      <van-divider v-if="processList?.length > 1">
         <div @click="handleShow">
         <div @click="handleShow">
           <van-icon :name="!stepShow ? 'arrow-down' : 'arrow-up'" />
           <van-icon :name="!stepShow ? 'arrow-down' : 'arrow-up'" />
           {{ !stepShow ? '展开' : '收起' }}
           {{ !stepShow ? '展开' : '收起' }}
@@ -46,15 +83,15 @@
         <div class="cost_list" style="border-bottom: none">
         <div class="cost_list" style="border-bottom: none">
           <div class="item">
           <div class="item">
             <span>公司名称</span>
             <span>公司名称</span>
-            <span>{{detailData.customer?.companyName}}</span>
+            <span>{{ detailData.customer?.companyName }}</span>
           </div>
           </div>
           <div class="item">
           <div class="item">
             <span>联系人</span>
             <span>联系人</span>
-            <span>{{detailData.customer?.customerName}}</span>
+            <span>{{ detailData.customer?.customerName }}</span>
           </div>
           </div>
           <div class="item">
           <div class="item">
             <span>联系电话</span>
             <span>联系电话</span>
-            <span>{{detailData.customer?.phone}}</span>
+            <span>{{ detailData.customer?.phone }}</span>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -62,22 +99,28 @@
     <div class="page_top item_content" v-if="detailData.repairerVo">
     <div class="page_top item_content" v-if="detailData.repairerVo">
       <div class="title">故障信息</div>
       <div class="title">故障信息</div>
       <div class="content">
       <div class="content">
-        <div class="text">{{cameraType[detailData.repairerVo?.cameraType]}} {{detailData.repairerVo?.cameraSnCode}}</div>
+        <div class="text">{{ cameraType[detailData.repairerVo?.cameraType] }} {{ detailData.repairerVo?.cameraSnCode }}</div>
         <div class="text" v-html="detailData.repairerVo?.faultMsg"></div>
         <div class="text" v-html="detailData.repairerVo?.faultMsg"></div>
-        
+
         <div class="imgList" v-if="detailData.repairerVo">
         <div class="imgList" v-if="detailData.repairerVo">
-          <img :src="imgItem" v-for="(imgItem, imgID) in detailData.repairerVo.faultImg" @click="imgPreview(detailData.repairerVo.faultImg, imgID)" :key="imgItem" alt="" />
+          <img
+            :src="imgItem"
+            v-for="(imgItem, imgID) in detailData.repairerVo.faultImg"
+            @click="imgPreview(detailData.repairerVo.faultImg, imgID)"
+            :key="imgItem"
+            alt=""
+          />
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
-    <div class="page_custinfo item_content" v-if="detailData.priceList.length && detailData.repairerVo?.status  > 30">
+    <div class="page_custinfo item_content" v-if="detailData.priceList.length && detailData.repairerVo?.status > 30">
       <div class="title">费用明细</div>
       <div class="title">费用明细</div>
       <div class="content">
       <div class="content">
         <div class="cost_list">
         <div class="cost_list">
           <!-- v-show="!(item.type == 0 && item.status == 0) && item.laborId != 2" -->
           <!-- v-show="!(item.type == 0 && item.status == 0) && item.laborId != 2" -->
           <div class="item" v-for="item in detailData.priceList" :key="item.name">
           <div class="item" v-for="item in detailData.priceList" :key="item.name">
             <span>{{ item.name }}</span>
             <span>{{ item.name }}</span>
-            <span>¥{{ item.discount ==0 ?item.price:item.priceDiscount }} x{{ item.count }}</span>
+            <span>¥{{ item.discount == 0 ? item.price : item.priceDiscount }} x{{ item.count }}</span>
           </div>
           </div>
           <div class="item" v-if="detailData.repairerVo.warrantyType == 0 || detailData.repairerVo.warrantyType == 3">
           <div class="item" v-if="detailData.repairerVo.warrantyType == 0 || detailData.repairerVo.warrantyType == 3">
             <span>保内维修</span>
             <span>保内维修</span>
@@ -86,7 +129,13 @@
         </div>
         </div>
         <div class="cell" style="border: none">
         <div class="cell" style="border: none">
           <span>维修费用</span>
           <span>维修费用</span>
-          <span>¥{{ (detailData.repairerVo.warrantyType == 0 || detailData.repairerVo.warrantyType == 3)?'0.00':priceCount(detailData?.priceList || []) }}</span>
+          <span
+            >¥{{
+              detailData.repairerVo.warrantyType == 0 || detailData.repairerVo.warrantyType == 3
+                ? '0.00'
+                : priceCount(detailData?.priceList || [])
+            }}</span
+          >
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
@@ -96,31 +145,31 @@
         <div class="cost_list">
         <div class="cost_list">
           <div class="item">
           <div class="item">
             <span>送修方式</span>
             <span>送修方式</span>
-            <span>{{detailData.customerAddress.sendType == 0 ?'前台送修':'快递寄送'}}</span>
+            <span>{{ detailData.customerAddress.sendType == 0 ? '前台送修' : '快递寄送' }}</span>
           </div>
           </div>
           <div class="item" v-if="detailData.customerAddress.sendType != 0">
           <div class="item" v-if="detailData.customerAddress.sendType != 0">
             <span>快递单号</span>
             <span>快递单号</span>
-            <span>{{detailData.customerAddress.sendTrackingNum}}</span>
+            <span>{{ detailData.customerAddress.sendTrackingNum }}</span>
           </div>
           </div>
           <div class="item">
           <div class="item">
             <span>取回方式</span>
             <span>取回方式</span>
-            <span>{{detailData.customerAddress.getType == 0 ?'前台取回':'快递寄回'}}</span>
+            <span>{{ detailData.customerAddress.getType == 0 ? '前台取回' : '快递寄回' }}</span>
           </div>
           </div>
           <div class="item" v-if="detailData.customerAddress.getType != 0">
           <div class="item" v-if="detailData.customerAddress.getType != 0">
             <span>快递单号</span>
             <span>快递单号</span>
-            <span>{{detailData.customerAddress.getTrackingNum}}</span>
+            <span>{{ detailData.customerAddress.getTrackingNum }}</span>
           </div>
           </div>
-          <div class="item" v-if="detailData.customerAddress.getType != 0 && detailData.customerAddress.getAddrName" >
+          <div class="item" v-if="detailData.customerAddress.getType != 0 && detailData.customerAddress.getAddrName">
             <span>收件人</span>
             <span>收件人</span>
-            <span>{{detailData.customerAddress.getAddrName}}</span>
+            <span>{{ detailData.customerAddress.getAddrName }}</span>
           </div>
           </div>
           <div class="item" v-if="detailData.customerAddress.getType != 0 && detailData.customerAddress.getAddrPhone">
           <div class="item" v-if="detailData.customerAddress.getType != 0 && detailData.customerAddress.getAddrPhone">
             <span>收件人电话</span>
             <span>收件人电话</span>
-            <span>{{detailData.customerAddress.getAddrPhone}}</span>
+            <span>{{ detailData.customerAddress.getAddrPhone }}</span>
           </div>
           </div>
           <div class="item" v-if="detailData.customerAddress.getType != 0 && detailData.customerAddress.getAddress">
           <div class="item" v-if="detailData.customerAddress.getType != 0 && detailData.customerAddress.getAddress">
             <span>收件地址</span>
             <span>收件地址</span>
-            <span>{{detailData.customerAddress.getAddress}}</span>
+            <span>{{ detailData.customerAddress.getAddress }}</span>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -132,287 +181,284 @@
         <div class="cost_list" style="border-bottom: none">
         <div class="cost_list" style="border-bottom: none">
           <div class="item">
           <div class="item">
             <span>内容</span>
             <span>内容</span>
-            <span>{{detailData.repairComment?.comment}}</span>
+            <span>{{ detailData.repairComment?.comment }}</span>
           </div>
           </div>
           <div class="item">
           <div class="item">
             <span>评分</span>
             <span>评分</span>
-            <span>{{detailData.repairComment?.starRank}}分</span>
+            <span>{{ detailData.repairComment?.starRank }}分</span>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
-  
+
 <script lang="ts" setup name="detailPage">
 <script lang="ts" setup name="detailPage">
-import { useRouter } from 'vue-router';
-import { ref, onMounted, unref, onActivated } from 'vue';
-import { showImagePreview } from 'vant';
-import { repairProcess, repairDetails } from '/@/api';
-import dayjs from 'dayjs'
-const { currentRoute } = useRouter();
-const router = useRouter();
-const { id } = unref(currentRoute)?.params
-const stepShow = ref<boolean>(false);
-const cameraType = {
-    0:'四维看看',
-    1:'四维看见',
-    2:'四维深时',
+  import { useRouter } from 'vue-router';
+  import { ref, onMounted, unref, onActivated } from 'vue';
+  import { showImagePreview } from 'vant';
+  import { repairProcess, repairDetails } from '/@/api';
+  import dayjs from 'dayjs';
+  const { currentRoute } = useRouter();
+  const router = useRouter();
+  const { id } = unref(currentRoute)?.params;
+  const stepShow = ref<boolean>(false);
+  const cameraType = {
+    0: '四维看看',
+    1: '四维看见',
+    2: '四维深时',
+  };
+  let detailData = ref({
+    customer: {},
+    customerAddress: {},
+    repairerVo: {},
+    RepairTestVo: {},
+    repairRegisterVo: {},
+    orderReceivingVo: {},
+    repairPay: {},
+    repairComment: {},
+    priceList: [],
+    applyInvoice: 0,
+  });
+  let processList = ref<any>([]);
+  onMounted(() => {
+    console.log('onMounted', id);
+    getDetaile();
+  });
+  onActivated(() => {
+    console.log('onActivated');
+    getDetaile();
+  });
+  function priceCount(list) {
+    let priceCount = 0;
+    list.map((ele) => {
+      // if(!(ele.type == 0 && ele.status == 0) && ele.laborId != 2){
+      let price = ele.discount == 0 ? ele.price : ele.priceDiscount;
+      priceCount = price * ele.count + priceCount;
+      // }
+    });
+    return priceCount.toFixed(2);
   }
   }
-let detailData = ref({
-  customer:<any>{},
-  customerAddress:<any>{},
-  repairerVo:<any>{},
-  RepairTestVo:<any>{},
-  repairRegisterVo:<any>{},
-  orderReceivingVo:<any>{},
-  repairPay:<any>{},
-  repairComment:<any>{},
-  priceList:<any>[],
-  applyInvoice:0,
-});
-let processList = ref<any>([])
-onMounted(() => {
-  console.log('onMounted',id)
-  getDetaile();
-});
-onActivated(()=>{
-  console.log('onActivated')
-  getDetaile();
-
-})
-function priceCount(list){
-  let priceCount = 0
-  list.map(ele => {
-    // if(!(ele.type == 0 && ele.status == 0) && ele.laborId != 2){
-      let price = ele.discount == 0 ? ele.price : ele.priceDiscount
-      priceCount = (price * ele.count) + priceCount
-    // }
-  })
-  return priceCount.toFixed(2)
-}
-const getDetaile = async () => {
-  const { data } = await repairDetails(id);
-  detailData.value = data
-  const resProcess = await repairProcess(id);
-  console.log('resProcess',resProcess)
-  let process = unref(resProcess?.response)?.data;
-  processList.value = process
-};
-const handleShow = () => {
-  stepShow.value = !stepShow.value;
-};
-const goRoute = (path) => {
-  console.log('goRoute',path)
-  if (!path) return;
-  router.push(path);
-};
-function replacName(name,subTitle){
-  return subTitle.replace(name, namePrivate(name));
-}
-// 姓名脱敏
-function namePrivate(name) {
-  if(null != name && name != undefined) {
-    if(name.length == 2) {
-      return name.substring(0,1) + '*' // 截取name的第一个字符,第二个字符变成*
-    } else if(name.length == 3) {
-      return name.substring(0,1) + '*' + name.substring(2,3) // 截取name的第一个和第三个字符,第二个字符变成*
-    } else if(name.length > 3) {
-      return name.substring(0,1) + '*' + '*' + name.substring(3,name.length) //截取第一个和大于第4个字符
-    }
-  } else {
-    return ''
+  const getDetaile = async () => {
+    const { data } = await repairDetails(id);
+    detailData.value = data;
+    const resProcess = await repairProcess(id);
+    console.log('resProcess', resProcess);
+    let process = unref(resProcess?.response)?.data;
+    processList.value = process;
+  };
+  const handleShow = () => {
+    stepShow.value = !stepShow.value;
+  };
+  const goRoute = (path) => {
+    console.log('goRoute', path);
+    if (!path) return;
+    router.push(path);
+  };
+  function replacName(name, subTitle) {
+    return subTitle.replace(name, namePrivate(name));
   }
   }
-}
-function imgPreview(list,startPosition=1){
-  let images = list.map(ele =>{
-    if(typeof ele == 'string' ){
-      return ele
-    }else{
-      return
-    }
-  })
-  showImagePreview({
-  images: images||[],
-  startPosition,
-});
-}
-
-</script>
- <style lang="scss" >
-.page {
-  min-height: 100vh;
-  background-color: #f5f5f5;
-  overflow: hidden;
-  .item_content {
-    background-color: #fff;
-    border-radius: 4px 4px 4px 4px;
-    margin: 12px;
-    .title {
-      font-size: 14px;
-      font-family: PingFang SC-Medium, PingFang SC;
-      font-weight: 600;
-      color: #000000;
-      padding: 15px 0;
-      margin: 0 15px;
-      border-bottom: 1px solid #e7e7e7;
-    }
-    .content {
-      padding: 24px 15px;
-    }
-    .item {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      line-height: 30px;
-      font-size: 14px;
-      span{
-        max-width: 70%;
-        overflow:hidden;        //超出的文本隐藏
-        text-overflow:ellipsis; //用省略号显示
-        white-space:nowrap; 
+  // 姓名脱敏
+  function namePrivate(name) {
+    if (null != name && name != undefined) {
+      if (name.length == 2) {
+        return name.substring(0, 1) + '*'; // 截取name的第一个字符,第二个字符变成*
+      } else if (name.length == 3) {
+        return name.substring(0, 1) + '*' + name.substring(2, 3); // 截取name的第一个和第三个字符,第二个字符变成*
+      } else if (name.length > 3) {
+        return name.substring(0, 1) + '*' + '*' + name.substring(3, name.length); //截取第一个和大于第4个字符
       }
       }
-      // margin-bottom: 8px;
+    } else {
+      return '';
     }
     }
-
-    .imgList {
-      margin-top: 8px;
-      img {
-        height: 64px;
-        width: 64px;
-        padding: 0 8px 0 0;
-        object-fit: cover;
+  }
+  function imgPreview(list, startPosition = 1) {
+    let images = list.map((ele) => {
+      if (typeof ele == 'string') {
+        return ele;
+      } else {
+        return;
       }
       }
-    }
+    });
+    showImagePreview({
+      images: images || [],
+      startPosition,
+    });
   }
   }
-  .stepList {
-    padding: 24px 16px;
-    .item_content_top{
-      padding-bottom: 15px;
-      margin-bottom: 16px;
-      border-bottom: 1px solid #f5f5f5;
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-    }
-    &_title {
-      font-size: 14px;
-      font-family: PingFang SC-Medium, PingFang SC;
-      font-weight: 500;
-      color: #000000;
-    }
-    .stepItem {
-      transition: all 3s 2s linear;
-    }
-    .step {
-      &:last-child {
-        // border: none;
+</script>
+<style lang="scss">
+  .page {
+    min-height: 100vh;
+    background-color: #f5f5f5;
+    overflow: hidden;
+    .item_content {
+      background-color: #fff;
+      border-radius: 4px 4px 4px 4px;
+      margin: 12px;
+      .title {
+        font-size: 14px;
+        font-family: PingFang SC-Medium, PingFang SC;
+        font-weight: 600;
+        color: #000000;
+        padding: 15px 0;
+        margin: 0 15px;
+        border-bottom: 1px solid #e7e7e7;
+      }
+      .content {
+        padding: 24px 15px;
+      }
+      .item {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        line-height: 30px;
+        font-size: 14px;
+        span {
+          max-width: 70%;
+          overflow: hidden; //超出的文本隐藏
+          text-overflow: ellipsis; //用省略号显示
+          white-space: nowrap;
+        }
+        // margin-bottom: 8px;
       }
       }
-      padding: 8px 15px 16px 15px;
-      border-left: 1px solid #f5f5f5;
-      div{
+
+      .imgList {
         margin-top: 8px;
         margin-top: 8px;
+        img {
+          height: 64px;
+          width: 64px;
+          padding: 0 8px 0 0;
+          object-fit: cover;
+        }
+      }
+    }
+    .stepList {
+      padding: 24px 16px;
+      .item_content_top {
+        padding-bottom: 15px;
+        margin-bottom: 16px;
+        border-bottom: 1px solid #f5f5f5;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
       }
       }
       &_title {
       &_title {
         font-size: 14px;
         font-size: 14px;
-        line-height: 22px;
-        margin-top: 0px !important;
+        font-family: PingFang SC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #000000;
+      }
+      .stepItem {
+        transition: all 3s 2s linear;
       }
       }
-      &_time {
-        font-size: 10px;
+      .step {
+        &:last-child {
+          // border: none;
+        }
+        padding: 8px 15px 16px 15px;
+        border-left: 1px solid #f5f5f5;
+        div {
+          margin-top: 8px;
+        }
+        &_title {
+          font-size: 14px;
+          line-height: 22px;
+          margin-top: 0px !important;
+        }
+        &_time {
+          font-size: 10px;
+          font-family: PingFang SC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #999999;
+          line-height: 14px;
+          // padding-bottom: 24px;
+        }
+        font-size: 12px;
         font-family: PingFang SC-Regular, PingFang SC;
         font-family: PingFang SC-Regular, PingFang SC;
         font-weight: 400;
         font-weight: 400;
-        color: #999999;
-        line-height: 14px;
-        // padding-bottom: 24px;
+        color: #333333;
+        line-height: 18px;
+        position: relative;
+        .doct {
+          display: inline-block;
+          position: absolute;
+          left: 0;
+          top: 0;
+          width: 8px;
+          height: 8px;
+          border-radius: 50%;
+          transform: translat(-50%, -50%);
+        }
+        .oneSpot {
+          border: 4px solid #00b3ec;
+          left: -8px;
+          top: 4px;
+          background: #fff;
+        }
+        .Spot {
+          background: #cccccc;
+          left: -4px;
+          top: 8px;
+        }
+      }
+    }
+    .colortext {
+      color: #e34d59;
+    }
+    .cell {
+      border-top: 1px solid #e7e7e7;
+      &:first-child {
+        border-top: none;
       }
       }
-      font-size: 12px;
+      // height: 48px;
+      margin-top: 12px;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      font-size: 14px;
       font-family: PingFang SC-Regular, PingFang SC;
       font-family: PingFang SC-Regular, PingFang SC;
       font-weight: 400;
       font-weight: 400;
       color: #333333;
       color: #333333;
-      line-height: 18px;
-      position: relative;
-      .doct {
-        display: inline-block;
-        position: absolute;
-        left: 0;
-        top: 0;
-        width: 8px;
-        height: 8px;
-        border-radius: 50%;
-        transform: translat(-50%, -50%);
+      line-height: 22px;
+    }
+    .page_custinfo {
+      .cost_list {
+        padding-bottom: 8px;
+        // margin: 0 15px;
+        // padding-top: 24px;
+        border: {
+          // top: 1px solid #e7e7e7;
+          bottom: 1px solid #e7e7e7;
+        }
       }
       }
-      .oneSpot {
-        border: 4px solid #00b3ec;
-        left: -8px;
-        top: 4px;
-        background: #fff;
+    }
+    .page_top {
+      .cost_list {
+        border: {
+          // bottom: 1px solid #e7e7e7;
+        }
       }
       }
-      .Spot {
-        background: #cccccc;
-        left: -4px;
-        top: 8px;
+      .text {
+        line-height: 30px;
       }
       }
     }
     }
-  }
-  .colortext {
-    color: #e34d59;
-  }
-  .cell {
-    border-top: 1px solid #e7e7e7;
-    &:first-child {
-      border-top: none;
+    .repairInfo {
+      background-color: #fff;
+      margin-bottom: 12px;
+      border-radius: 4px 4px 4px 4px;
     }
     }
-    // height: 48px;
-    margin-top: 12px;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    font-size: 14px;
-    font-family: PingFang SC-Regular, PingFang SC;
-    font-weight: 400;
-    color: #333333;
-    line-height: 22px;
-  }
-  .page_custinfo {
-    .cost_list {
-      padding-bottom: 8px;
-      // margin: 0 15px;
-      // padding-top: 24px;
-      border: {
-        // top: 1px solid #e7e7e7;
-        bottom: 1px solid #e7e7e7;
+    .but {
+      padding: 25px 15px;
+      .tips {
+        font-size: 12px;
+        font-family: PingFang SC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #999999;
+        margin-bottom: 10px;
       }
       }
-    }
-  }
-  .page_top {
-    .cost_list {
-      border: {
-        // bottom: 1px solid #e7e7e7;
+      button {
+        margin-top: 16px;
       }
       }
     }
     }
-    .text {
-      line-height: 30px;
-    }
-  }
-  .repairInfo {
-    background-color: #fff;
-    margin-bottom: 12px;
-    border-radius: 4px 4px 4px 4px;
-  }
-  .but {
-    padding: 25px 15px;
-    .tips {
-      font-size: 12px;
-      font-family: PingFang SC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #999999;
-      margin-bottom: 10px;
-    }
-    button {
-      margin-top: 16px;
-    }
   }
   }
-}
 </style>
 </style>
-  

+ 45 - 47
src/views/detail/invoice.vue

@@ -127,57 +127,56 @@
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
-  
-  <script lang="ts" setup name="detailPage">
-import { ref, onMounted, unref } from 'vue';
-import { getInvoiceAddress, invoiceApply } from '/@/api';
-import { useRouter } from 'vue-router';
-import { showSuccessToast  } from 'vant';
-const router = useRouter();
-const { id } = unref(router.currentRoute)?.params;
-const formData = ref({
-  address: '',
-  bankAccount: '',
-  bank: '',
-  invoiceEmail: '',
-  invoiceNum: '',
-  invoiceHead: '',
-  checked: '1',
-  checkeds: '1',
-  invoiceAmount: 0,
-  invoiceType: 0,
-  phone: '',
-  getAddrName: '',
-  getAddrPhone: '',
-  getAddress: '',
-});
-onMounted(async () => {
-  let { data } = await getInvoiceAddress(id);
-  formData.value.invoiceAmount = data.payAmount;
-  formData.value.getAddrName = data.getAddrName;
-  formData.value.getAddrPhone = data.getAddrPhone;
-  formData.value.getAddress = data.getAddress;
-});
-async function onSubmit() {
-  const res = await invoiceApply({
-    ...formData.value,
-    repairId: id,
+
+<script lang="ts" setup name="detailPage">
+  import { ref, onMounted, unref } from 'vue';
+  import { getInvoiceAddress, invoiceApply } from '/@/api';
+  import { useRouter } from 'vue-router';
+  import { showSuccessToast } from 'vant';
+  const router = useRouter();
+  const { id } = unref(router.currentRoute)?.params;
+  const formData = ref({
+    address: '',
+    bankAccount: '',
+    bank: '',
+    invoiceEmail: '',
+    invoiceNum: '',
+    invoiceHead: '',
+    checked: '1',
+    checkeds: '1',
+    invoiceAmount: 0,
+    invoiceType: 0,
+    phone: '',
+    getAddrName: '',
+    getAddrPhone: '',
+    getAddress: '',
   });
   });
-  if(res.code == 200){
-    showSuccessToast({
-      message:'开票成功',
-      iconSize: 35,
-      duration: 1000,
+  onMounted(async () => {
+    let { data } = await getInvoiceAddress(id);
+    formData.value.invoiceAmount = data.payAmount;
+    formData.value.getAddrName = data.getAddrName;
+    formData.value.getAddrPhone = data.getAddrPhone;
+    formData.value.getAddress = data.getAddress;
+  });
+  async function onSubmit() {
+    const res = await invoiceApply({
+      ...formData.value,
+      repairId: id,
     });
     });
-    setTimeout(() => {
+    if (res.code == 200) {
+      showSuccessToast({
+        message: '开票成功',
+        iconSize: 35,
+        duration: 1000,
+      });
+      setTimeout(() => {
         router.go(-1);
         router.go(-1);
-    }, 200);
+      }, 200);
+    }
   }
   }
-}
 </script>
 </script>
- <style lang="scss" >
+<style lang="scss">
   .evaluate {
   .evaluate {
-    
     .van-cell-group {
     .van-cell-group {
       margin: 0 !important;
       margin: 0 !important;
     }
     }
@@ -214,6 +213,5 @@ async function onSubmit() {
     .but {
     .but {
       padding: 25px 15px;
       padding: 25px 15px;
     }
     }
-}
+  }
 </style>
 </style>
-  

+ 97 - 97
src/views/detail/payment.vue

@@ -15,109 +15,109 @@
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
-  
+
 <script lang="ts" setup name="detailPage">
 <script lang="ts" setup name="detailPage">
-import { ref, onMounted, unref, computed } from 'vue';
-import { useRouter } from 'vue-router';
-import { useUserStore } from '/@/store/modules/user';
-import { showSuccessToast, showToast } from 'vant'
-import { repairDetails, wechatMobilePay } from '/@/api';
-const router = useRouter();
-const userStore = useUserStore();
-const wxOpenId = computed(() => {
-  return userStore.getWxOpenId;
-});
-const { id } = unref(router.currentRoute)?.params;
-const detail = ref({
-  // priceList: [],
-  amount: 0,
-});
-onMounted(async () => {
-  const { data } = await repairDetails(id);
-  detail.value.amount = data.payAmount;
-});
+  import { ref, onMounted, unref, computed } from 'vue';
+  import { useRouter } from 'vue-router';
+  import { useUserStore } from '/@/store/modules/user';
+  import { showSuccessToast, showToast } from 'vant';
+  import { repairDetails, wechatMobilePay } from '/@/api';
+  const router = useRouter();
+  const userStore = useUserStore();
+  const wxOpenId = computed(() => {
+    return userStore.getWxOpenId;
+  });
+  const { id } = unref(router.currentRoute)?.params;
+  const detail = ref({
+    // priceList: [],
+    amount: 0,
+  });
+  onMounted(async () => {
+    const { data } = await repairDetails(id);
+    detail.value.amount = data.payAmount;
+  });
 
 
-function payOrder() {
-  //获取code
-  if (typeof WeixinJSBridge == 'undefined') {
-    if (document.addEventListener) {
-      document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
-    } else if (document.attachEvent) {
-      document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
-      document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
+  function payOrder() {
+    //获取code
+    if (typeof WeixinJSBridge == 'undefined') {
+      if (document.addEventListener) {
+        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
+      } else if (document.attachEvent) {
+        document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
+        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
+      }
+    } else {
+      onBridgeReady();
     }
     }
-  } else {
-    onBridgeReady();
+    // window.location.replace(url);
   }
   }
-  // window.location.replace(url);
-}
-async function onBridgeReady() {
-  const { data } = await wechatMobilePay({
-    openId:wxOpenId.value,
-    repairId:id,
-    wxPayType:'1',
-  });
-  WeixinJSBridge.invoke(
-    'getBrandWCPayRequest',
-    {
-      appId: data.appid,//'wx2421b1c4370ec43b', //公众号ID,由商户传入
-      timeStamp: data.timeStamp,//'1395712654', //时间戳,自1970年以来的秒数
-      nonceStr: data.nonce_str,//'e61463f8efa94090b1f366cccfbbb444', //随机串
-      package: `prepay_id=${data.prepay_id}`,
-      signType: data.signType,//'RSA', //微信签名方式:
-      paySign:data.paySign, //微信签名
-    },
-    function (res) {
-      if (res.err_msg == 'get_brand_wcpay_request:ok') {
-        // 使用以上方式判断前端返回,微信团队郑重提示:
-        //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
-        showSuccessToast('支付成功');
-      }else{//失败
-        showToast('支付失败');
-      }
-      setTimeout(() => {
-        router.go(-1);
-      }, 200);
-    },
-  );
-}
-function queryURLParams(url) {
-  let pattern = /(\w+)=(\w+)/gi; //定义正则表达式
-  let parames = {}; // 定义参数对象
-  url.replace(pattern, ($, $1, $2) => {
-    parames[$1] = $2;
-  });
-  return parames;
-}
-// 判断是否在微信浏览器  1为微信浏览器 2为其他  这个方法定义在外面,后面也会用到
+  async function onBridgeReady() {
+    const { data } = await wechatMobilePay({
+      openId: wxOpenId.value,
+      repairId: id,
+      wxPayType: '1',
+    });
+    WeixinJSBridge.invoke(
+      'getBrandWCPayRequest',
+      {
+        appId: data.appid, //'wx2421b1c4370ec43b', //公众号ID,由商户传入
+        timeStamp: data.timeStamp, //'1395712654', //时间戳,自1970年以来的秒数
+        nonceStr: data.nonce_str, //'e61463f8efa94090b1f366cccfbbb444', //随机串
+        package: `prepay_id=${data.prepay_id}`,
+        signType: data.signType, //'RSA', //微信签名方式:
+        paySign: data.paySign, //微信签名
+      },
+      function (res) {
+        if (res.err_msg == 'get_brand_wcpay_request:ok') {
+          // 使用以上方式判断前端返回,微信团队郑重提示:
+          //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
+          showSuccessToast('支付成功');
+        } else {
+          //失败
+          showToast('支付失败');
+        }
+        setTimeout(() => {
+          router.go(-1);
+        }, 200);
+      },
+    );
+  }
+  // function queryURLParams(url) {
+  //   let pattern = /(\w+)=(\w+)/gi; //定义正则表达式
+  //   let parames = {}; // 定义参数对象
+  //   url.replace(pattern, ($, $1, $2) => {
+  //     parames[$1] = $2;
+  //   });
+  //   return parames;
+  // }
+  // 判断是否在微信浏览器  1为微信浏览器 2为其他  这个方法定义在外面,后面也会用到
 </script>
 </script>
- <style lang="scss" >
-.evaluate {
-  min-height: 100vh;
-  background-color: #f5f5f5;
-  .evaluate_top {
-    background-color: #fff;
-    .border {
-      border-top: 1px solid #e7e7e7;
-    }
-    .colortext {
-      color: #e34d59;
+<style lang="scss">
+  .evaluate {
+    min-height: 100vh;
+    background-color: #f5f5f5;
+    .evaluate_top {
+      background-color: #fff;
+      .border {
+        border-top: 1px solid #e7e7e7;
+      }
+      .colortext {
+        color: #e34d59;
+      }
+      .cell {
+        height: 48px;
+        padding: 0 15px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        font-size: 14px;
+        font-family: PingFang SC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #333333;
+      }
     }
     }
-    .cell {
-      height: 48px;
-      padding: 0 15px;
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      font-size: 14px;
-      font-family: PingFang SC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #333333;
+    .but {
+      padding: 25px 15px;
     }
     }
   }
   }
-  .but {
-    padding: 25px 15px;
-  }
-}
 </style>
 </style>
-  

+ 115 - 116
src/views/detail/repair.vue

@@ -20,7 +20,7 @@
       <div class="cost_list">
       <div class="cost_list">
         <div class="item" v-for="item in detail.priceList" :key="item.name">
         <div class="item" v-for="item in detail.priceList" :key="item.name">
           <span>{{ item.name }}</span>
           <span>{{ item.name }}</span>
-          <span>¥{{ item.discount ==0 ?item.price:item.priceDiscount }} x{{ item.count }}</span>
+          <span>¥{{ item.discount == 0 ? item.price : item.priceDiscount }} x{{ item.count }}</span>
         </div>
         </div>
       </div>
       </div>
       <div class="cell" style="border: none">
       <div class="cell" style="border: none">
@@ -32,134 +32,133 @@
       <span class="tips">确认维修后,将直接开始维修。维修费用待维修完成后支付</span>
       <span class="tips">确认维修后,将直接开始维修。维修费用待维修完成后支付</span>
       <p class="tips">取消维修,原机退回,需要收取检测费。</p>
       <p class="tips">取消维修,原机退回,需要收取检测费。</p>
       <van-button type="primary" color="#00B3EC" @click="hanldConfirm(0)" block>确认维修</van-button>
       <van-button type="primary" color="#00B3EC" @click="hanldConfirm(0)" block>确认维修</van-button>
-      <van-button type="primary" style="background: none;" color="#00B3EC" @click="hanldConfirm(1)" plain block>取消维修</van-button>
+      <van-button type="primary" style="background: none" color="#00B3EC" @click="hanldConfirm(1)" plain block>取消维修</van-button>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
-  
-  <script lang="ts" setup name="detailPage">
-import { ref, onMounted, unref } from 'vue';
-import { useRouter } from 'vue-router';
-import { showToast } from 'vant';
-import { repairDetails, confirmRepair } from '/@/api';
-const router = useRouter();
-const { id } = unref(router.currentRoute)?.params;
-const detail = ref({
-  amount: 0,
-  priceList: <any>[],
-  repairerVo: <any>{},
-  repairRegisterVo: <any>{},
-});
-onMounted(async () => {
-  const { data } = await repairDetails(id);
-  let detaile = data,
-    amount = 0;
-  detail.value.repairerVo = <any>detaile.repairerVo;
-  detail.value.repairRegisterVo = <any>detaile.repairRegisterVo;
-  detail.value.priceList = <any>detaile.priceList.map((ele) => {
-    let price = ele.discount == 0 ? ele.price : ele.priceDiscount
-    amount = amount +  price * ele.count;
-    return ele;
+
+<script lang="ts" setup name="detailPage">
+  import { ref, onMounted, unref } from 'vue';
+  import { useRouter } from 'vue-router';
+  import { showToast } from 'vant';
+  import { repairDetails, confirmRepair } from '/@/api';
+  const router = useRouter();
+  const { id } = unref(router.currentRoute)?.params;
+  const detail = ref({
+    amount: 0,
+    priceList: [] as any,
+    repairerVo: {} as any,
+    repairRegisterVo: {} as any,
   });
   });
-  detail.value.amount = amount;
-});
-const hanldConfirm = async (confirm) => {
-  const {code} = await confirmRepair({ repairId: id, confirm });
-  if (code == 200 || !code) {
-    showToast('操作成功');
-    setTimeout(() => {
-      router.go(-1);
-    }, 500);
-  }
-};
+  onMounted(async () => {
+    const { data } = await repairDetails(id);
+    let detail = data,
+      amount = 0;
+    detail.value.repairerVo = detail.repairerVo;
+    detail.value.repairRegisterVo = detail.repairRegisterVo;
+    detail.value.priceList = detail.priceList.map((ele: any) => {
+      let price = ele.discount == 0 ? ele.price : ele.priceDiscount;
+      amount = amount + price * ele.count;
+      return ele;
+    });
+    detail.value.amount = amount;
+  });
+  const hanldConfirm = async (confirm) => {
+    const { code } = await confirmRepair({ repairId: id, confirm });
+    if (code == 200 || !code) {
+      showToast('操作成功');
+      setTimeout(() => {
+        router.go(-1);
+      }, 500);
+    }
+  };
 </script>
 </script>
- <style lang="scss" scoped>
-.page {
-  min-height: 100vh;
-  background-color: #f5f5f5;
+<style lang="scss" scoped>
+  .page {
+    min-height: 100vh;
+    background-color: #f5f5f5;
 
 
-  .title {
-    font-size: 14px;
-    font-family: PingFang SC-Medium, PingFang SC;
-    font-weight: 500;
-    color: #000000;
-    padding: 15px;
-  }
-  .colortext {
-    color: #e34d59;
-  }
-  .cell {
-    border-top: 1px solid #e7e7e7;
-    &:first-child {
-      border-top: none;
+    .title {
+      font-size: 14px;
+      font-family: PingFang SC-Medium, PingFang SC;
+      font-weight: 500;
+      color: #000000;
+      padding: 15px;
     }
     }
-    height: 48px;
-    padding: 0 15px;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    font-size: 14px;
-    font-family: PingFang SC-Regular, PingFang SC;
-    font-weight: 400;
-    color: #333333;
-  }
-  .remarkDiv{
-    height: auto;
-    padding: 15px;
-    align-items: start;
-    .remark{
-      max-width: calc(100% - 65px);
-      // overflow: hidden;
-      // text-overflow: ellipsis;
-      // width: 100%;
-      // display: -webkit-box;
-      // -webkit-box-orient: vertical;
-      // -webkit-line-clamp: 3;
-      // word-break: break-all;
+    .colortext {
+      color: #e34d59;
     }
     }
-  }
-  .page_top {
-    background-color: #fff;
-    border-radius: 4px 4px 4px 4px;
-    .cost_list {
-      margin: 0 15px;
-      padding-top: 24px;
-      border: {
-        top: 1px solid #e7e7e7;
-        bottom: 1px solid #e7e7e7;
+    .cell {
+      border-top: 1px solid #e7e7e7;
+      &:first-child {
+        border-top: none;
+      }
+      height: 48px;
+      padding: 0 15px;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      font-size: 14px;
+      font-family: PingFang SC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #333333;
+    }
+    .remarkDiv {
+      height: auto;
+      padding: 15px;
+      align-items: start;
+      .remark {
+        max-width: calc(100% - 65px);
+        // overflow: hidden;
+        // text-overflow: ellipsis;
+        // width: 100%;
+        // display: -webkit-box;
+        // -webkit-box-orient: vertical;
+        // -webkit-line-clamp: 3;
+        // word-break: break-all;
       }
       }
-      .item {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        margin-bottom: 8px;
-        span{
-          max-width: 50%;
-          overflow: hidden;
-          white-space: nowrap;
-          text-overflow: ellipsis;
+    }
+    .page_top {
+      background-color: #fff;
+      border-radius: 4px 4px 4px 4px;
+      .cost_list {
+        margin: 0 15px;
+        padding-top: 24px;
+        border: {
+          top: 1px solid #e7e7e7;
+          bottom: 1px solid #e7e7e7;
+        }
+        .item {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          margin-bottom: 8px;
+          span {
+            max-width: 50%;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+          }
         }
         }
       }
       }
     }
     }
-  }
-  .repairInfo {
-    background-color: #fff;
-    margin-bottom: 12px;
-    border-radius: 4px 4px 4px 4px;
-  }
-  .but {
-    padding: 25px 15px;
-    .tips {
-      font-size: 12px;
-      font-family: PingFang SC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #999999;
-      margin-bottom: 10px;
+    .repairInfo {
+      background-color: #fff;
+      margin-bottom: 12px;
+      border-radius: 4px 4px 4px 4px;
     }
     }
-    button {
-      margin-top: 16px;
+    .but {
+      padding: 25px 15px;
+      .tips {
+        font-size: 12px;
+        font-family: PingFang SC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #999999;
+        margin-bottom: 10px;
+      }
+      button {
+        margin-top: 16px;
+      }
     }
     }
   }
   }
-}
 </style>
 </style>
-  

文件差異過大導致無法顯示
+ 313 - 2685
src/views/feedback/area.json


文件差異過大導致無法顯示
+ 3621 - 3621
src/views/feedback/country copy.json


文件差異過大導致無法顯示
+ 2483 - 2482
src/views/feedback/country.json


+ 6 - 5
src/views/feedback/index.vue

@@ -14,20 +14,20 @@
 
 
 <script lang="ts" setup name="HomeSubmit">
 <script lang="ts" setup name="HomeSubmit">
   // import { showLoadingToast, closeToast } from 'vant';
   // import { showLoadingToast, closeToast } from 'vant';
-  import { computed, reactive, unref, ref, onMounted } from 'vue';
+  import { computed, reactive, ref, onMounted } from 'vue';
   import { useUserStore } from '/@/store/modules/user';
   import { useUserStore } from '/@/store/modules/user';
-  import { showToast, showSuccessToast } from 'vant';
+  // import { showToast, showSuccessToast } from 'vant';
   import mcSubmit from './mcSubmit.vue';
   import mcSubmit from './mcSubmit.vue';
   import pcSubmit from './pcSubmit.vue';
   import pcSubmit from './pcSubmit.vue';
   import { useRouter } from 'vue-router';
   import { useRouter } from 'vue-router';
-  import axios from 'axios';
+  // import axios from 'axios';
   // import useAxiosApi from '/@/utils/useAxiosApi';
   // import useAxiosApi from '/@/utils/useAxiosApi';
   // import { Toast } from '@nutui/nutui';
   // import { Toast } from '@nutui/nutui';
   import { getAllByTypeId, feedbackAdd, getDefaultAddress } from '/@/api/feedback';
   import { getAllByTypeId, feedbackAdd, getDefaultAddress } from '/@/api/feedback';
   // import { setLang } from '/@/i18n';
   // import { setLang } from '/@/i18n';
   import jsonp from 'jsonp';
   import jsonp from 'jsonp';
   import { useI18n } from 'vue-i18n';
   import { useI18n } from 'vue-i18n';
-  const emit = defineEmits(['setActive']);
+  // const emit = defineEmits(['setActive']);
   const submitPc = ref(null);
   const submitPc = ref(null);
   const submitMc = ref(null);
   const submitMc = ref(null);
   const { t, locale } = useI18n();
   const { t, locale } = useI18n();
@@ -36,6 +36,7 @@
   const wxOpenId = computed(() => {
   const wxOpenId = computed(() => {
     return userStore.getWxOpenId;
     return userStore.getWxOpenId;
   });
   });
+  console.log('wxOpenId', wxOpenId);
   const addres = ref({
   const addres = ref({
     country: '',
     country: '',
     city: '',
     city: '',
@@ -63,7 +64,7 @@
     console.log('url', url, window.escape(url));
     console.log('url', url, window.escape(url));
     jsonp('https://www.4dage.com/wechat/jssdk/share/?uri=' + url + '&name=厦门四维时代微信公众号', 'success_jsonp', function (err, data) {
     jsonp('https://www.4dage.com/wechat/jssdk/share/?uri=' + url + '&name=厦门四维时代微信公众号', 'success_jsonp', function (err, data) {
       if (err) {
       if (err) {
-        console.err(err);
+        console.error(err);
       } else {
       } else {
         wx.config({
         wx.config({
           debug: false, // 开启调试模式
           debug: false, // 开启调试模式

+ 19 - 18
src/views/feedback/mcSubmit.vue

@@ -222,11 +222,11 @@
   import cityList from './area.json';
   import cityList from './area.json';
   import countryList from './country.json';
   import countryList from './country.json';
   import axios from 'axios';
   import axios from 'axios';
-  const areaList = ref({});
+  // const areaList = ref({});
   const props = defineProps(['columns', 'addres']);
   const props = defineProps(['columns', 'addres']);
   const emit = defineEmits(['submit']);
   const emit = defineEmits(['submit']);
   import { showToast } from 'vant';
   import { showToast } from 'vant';
-  const propsOptions = props.columns;
+  // const propsOptions = props.columns;
   const loading = ref(false);
   const loading = ref(false);
   const submits = ref(null);
   const submits = ref(null);
   const setObjId = ref({
   const setObjId = ref({
@@ -237,7 +237,7 @@
   const cascaderValue = ref();
   const cascaderValue = ref();
   watch(
   watch(
     () => props.addres,
     () => props.addres,
-    (newValue, oldValue) => {
+    (newValue, _) => {
       console.log('addreswatch', newValue);
       console.log('addreswatch', newValue);
       formData.value.country = newValue.country;
       formData.value.country = newValue.country;
       formData.value.city = newValue.mccountries;
       formData.value.city = newValue.mccountries;
@@ -284,7 +284,7 @@
     };
     };
   });
   });
   // 全部选项选择完毕后,会触发 finish 事件
   // 全部选项选择完毕后,会触发 finish 事件
-  const onFinish = ({ selectedOptions }, b) => {
+  const onFinish = ({ selectedOptions }, _) => {
     showPicker.value.city = false;
     showPicker.value.city = false;
     console.log('onFinish', cascaderValue.value);
     console.log('onFinish', cascaderValue.value);
     formData.value.city = selectedOptions.map((option) => option.text).join('/');
     formData.value.city = selectedOptions.map((option) => option.text).join('/');
@@ -297,20 +297,21 @@
   const onSubmit = () => {
   const onSubmit = () => {
     emit('submit', formData.value, setObjId.value);
     emit('submit', formData.value, setObjId.value);
   };
   };
-  const beforeUpload = (file) => {
-    console.log('beforeUpload', file);
-    const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
-    if (!isJpgOrPng) {
-      showToast('You can only upload JPG file!');
-    }
-    const isLt2M = file.size / 1024 / 1024 < 2;
-    if (!isLt2M) {
-      showToast('Image must smaller than 2MB!');
-    }
-    return isJpgOrPng && isLt2M;
-  }; //校验图片的格式
+  // const beforeUpload = (file) => {
+  //   console.log('beforeUpload', file);
+  //   const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
+  //   if (!isJpgOrPng) {
+  //     showToast('You can only upload JPG file!');
+  //   }
+  //   const isLt2M = file.size / 1024 / 1024 < 2;
+  //   if (!isLt2M) {
+  //     showToast('Image must smaller than 2MB!');
+  //   }
+  //   return isJpgOrPng && isLt2M;
+  // }; //校验图片的格式
   function beforeRead(file) {
   function beforeRead(file) {
-    const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'video/mp4' || file.type === 'video/quicktime';
+    const isJpgOrPng =
+      file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'video/mp4' || file.type === 'video/quicktime';
     if (!isJpgOrPng) {
     if (!isJpgOrPng) {
       showToast(t('feedback.fileTips'));
       showToast(t('feedback.fileTips'));
       return false;
       return false;
@@ -356,7 +357,7 @@
       .then((res) => {
       .then((res) => {
         loading.value = false;
         loading.value = false;
         let { data } = res;
         let { data } = res;
-        if (data.code == 200) {
+        if (data.code == 200 || data.code == 0) {
           // 上传状态提示关闭
           // 上传状态提示关闭
           file.url = data.data;
           file.url = data.data;
           file.file = file.file;
           file.file = file.file;

+ 77 - 39
src/views/feedback/pcSubmit.vue

@@ -2,7 +2,9 @@
   <div class="pcSubmit">
   <div class="pcSubmit">
     <a-form layout="vertical" :model="formData" ref="formRef" :rules="rules">
     <a-form layout="vertical" :model="formData" ref="formRef" :rules="rules">
       <a-form-item name="problemDesc">
       <a-form-item name="problemDesc">
-        <div class="myTitle required" slot="label"><span class="number">01</span>{{ t('feedback.title1') }}</div>
+        <template #label>
+          <div class="myTitle required"><span class="number">01</span>{{ t('feedback.title1') }}</div>
+        </template>
         <a-textarea
         <a-textarea
           show-count
           show-count
           :maxlength="500"
           :maxlength="500"
@@ -31,7 +33,9 @@
         <div class="tips" v-html="t('feedback.fileTipsPc')"></div>
         <div class="tips" v-html="t('feedback.fileTipsPc')"></div>
       </a-form-item>
       </a-form-item>
       <a-form-item name="solution">
       <a-form-item name="solution">
-        <div class="myTitle required" slot="label"><span class="number">02</span>{{ t('feedback.title2') }}</div>
+        <template #label>
+          <div class="myTitle required"><span class="number">02</span>{{ t('feedback.title2') }}</div>
+        </template>
         <a-textarea
         <a-textarea
           show-count
           show-count
           :maxlength="500"
           :maxlength="500"
@@ -59,67 +63,99 @@
         <div class="tips" v-html="t('feedback.fileTipsPc')"></div>
         <div class="tips" v-html="t('feedback.fileTipsPc')"></div>
       </a-form-item>
       </a-form-item>
       <a-form-item name="industryOptionId">
       <a-form-item name="industryOptionId">
-        <div class="myTitle required" slot="label"><span class="number">03</span>{{ t('feedback.title3') }}</div>
+        <template #label>
+          <div class="myTitle required"><span class="number">03</span>{{ t('feedback.title3') }}</div>
+        </template>
         <a-select
         <a-select
           key="industryOptionId"
           key="industryOptionId"
           v-model:value="formData.industryOptionId"
           v-model:value="formData.industryOptionId"
-          :getPopupContainer="triggerNode => {return triggerNode.parentNode;}"
+          :getPopupContainer="
+            (triggerNode) => {
+              return triggerNode.parentNode;
+            }
+          "
           :placeholder="t('feedback.setselcet')"
           :placeholder="t('feedback.setselcet')"
           :options="propsOptions.industryOptionId"
           :options="propsOptions.industryOptionId"
         />
         />
       </a-form-item>
       </a-form-item>
       <a-form-item name="hardwareOptionId">
       <a-form-item name="hardwareOptionId">
-        <div class="myTitle required" slot="label"><span class="number">04</span>{{ t('feedback.title4') }}</div>
+        <template #label>
+          <div class="myTitle required"><span class="number">04</span>{{ t('feedback.title4') }}</div>
+        </template>
         <a-select
         <a-select
           key="hardwareOptionId"
           key="hardwareOptionId"
           v-model:value="formData.hardwareOptionId"
           v-model:value="formData.hardwareOptionId"
           :placeholder="t('feedback.setselcet')"
           :placeholder="t('feedback.setselcet')"
-          :getPopupContainer="triggerNode => {return triggerNode.parentNode;}"
+          :getPopupContainer="
+            (triggerNode) => {
+              return triggerNode.parentNode;
+            }
+          "
           :options="propsOptions.hardwareOptionId"
           :options="propsOptions.hardwareOptionId"
         />
         />
       </a-form-item>
       </a-form-item>
       <a-form-item name="softwareOptionId">
       <a-form-item name="softwareOptionId">
-        <div class="myTitle required" slot="label"><span class="number">05</span>{{ t('feedback.title5') }}</div>
+        <template #label>
+          <div class="myTitle required"><span class="number">05</span>{{ t('feedback.title5') }}</div>
+        </template>
         <a-select
         <a-select
           key="softwareOptionId"
           key="softwareOptionId"
           v-model:value="formData.softwareOptionId"
           v-model:value="formData.softwareOptionId"
           :placeholder="t('feedback.setselcet')"
           :placeholder="t('feedback.setselcet')"
-          :getPopupContainer="triggerNode => {return triggerNode.parentNode;}"
+          :getPopupContainer="
+            (triggerNode) => {
+              return triggerNode.parentNode;
+            }
+          "
           :options="propsOptions.softwareOptionId"
           :options="propsOptions.softwareOptionId"
         />
         />
       </a-form-item>
       </a-form-item>
       <a-form-item>
       <a-form-item>
-        <div class="myTitle" slot="label"><span class="number">06</span>{{ t('feedback.title6') }}</div>
+        <template #label>
+          <div class="myTitle"><span class="number">06</span>{{ t('feedback.title6') }}</div>
+        </template>
         <a-input :maxlength="30" v-model:value="formData.nickName" :placeholder="t('feedback.settext')" />
         <a-input :maxlength="30" v-model:value="formData.nickName" :placeholder="t('feedback.settext')" />
       </a-form-item>
       </a-form-item>
       <a-form-item>
       <a-form-item>
-        <div class="myTitle" slot="label"><span class="number">07</span>{{ t('feedback.title61') }}</div>
+        <template #label>
+          <div class="myTitle"><span class="number">07</span>{{ t('feedback.title61') }}</div>
+        </template>
         <a-input :maxlength="30" v-model:value="formData.phone" :placeholder="t('feedback.settext')" />
         <a-input :maxlength="30" v-model:value="formData.phone" :placeholder="t('feedback.settext')" />
       </a-form-item>
       </a-form-item>
       <a-form-item>
       <a-form-item>
-        <div class="myTitle" slot="label"><span class="number">08</span>{{ t('feedback.title7') }}</div>
+        <template #label>
+          <div class="myTitle"><span class="number">08</span>{{ t('feedback.title7') }}</div>
+        </template>
         <a-select
         <a-select
           v-model:value="formData.country"
           v-model:value="formData.country"
           :filterOption="filterOption"
           :filterOption="filterOption"
           :options="countryOption"
           :options="countryOption"
-          :getPopupContainer="triggerNode => {return triggerNode.parentNode;}"
+          :getPopupContainer="
+            (triggerNode) => {
+              return triggerNode.parentNode;
+            }
+          "
           showSearch
           showSearch
           :placeholder="t('feedback.setselcet')"
           :placeholder="t('feedback.setselcet')"
         />
         />
         <!-- <a-cascader v-model:value="formData.countries" :options="options" placeholder="Please select" /> -->
         <!-- <a-cascader v-model:value="formData.countries" :options="options" placeholder="Please select" /> -->
       </a-form-item>
       </a-form-item>
       <a-form-item v-if="formData.country == '中国' || formData.country == 'China'">
       <a-form-item v-if="formData.country == '中国' || formData.country == 'China'">
-        <div class="myTitle" slot="label"
-          ><span class="number">{{ formData.country == '中国' || formData.country == 'China' ? '09' : '08' }}</span
-          >{{ t('feedback.title71') }}</div
-        >
+        <template #label>
+          <div class="myTitle"
+            ><span class="number">{{ formData.country == '中国' || formData.country == 'China' ? '09' : '08' }}</span
+            >{{ t('feedback.title71') }}</div
+          >
+        </template>
         <a-cascader v-model:value="formData.countries" :options="options" :placeholder="t('feedback.setselcet')" />
         <a-cascader v-model:value="formData.countries" :options="options" :placeholder="t('feedback.setselcet')" />
       </a-form-item>
       </a-form-item>
       <a-form-item>
       <a-form-item>
-        <div class="myTitle" slot="label"
-          ><span class="number">{{ formData.country == '中国' || formData.country == 'China' ? '10' : '09' }}</span
-          >{{ t('feedback.title8') }}</div
-        >
+        <template #label>
+          <div class="myTitle">
+            <span class="number">{{ formData.country == '中国' || formData.country == 'China' ? '10' : '09' }}</span>
+            {{ t('feedback.title8') }}
+          </div>
+        </template>
         <van-rate
         <van-rate
           color="#FADB14"
           color="#FADB14"
           size="30"
           size="30"
@@ -130,10 +166,12 @@
         />
         />
       </a-form-item>
       </a-form-item>
       <a-form-item>
       <a-form-item>
-        <div class="myTitle" slot="label"
-          ><span class="number">{{ formData.country == '中国' || formData.country == 'China' ? '11' : '10' }}</span
-          >{{ t('feedback.title9') }}</div
-        >
+        <template #label>
+          <div class="myTitle"
+            ><span class="number">{{ formData.country == '中国' || formData.country == 'China' ? '11' : '10' }}</span
+            >{{ t('feedback.title9') }}</div
+          >
+        </template>
         <a-input :maxlength="100" v-model:value="formData.scoreReason" :placeholder="t('feedback.settext')" />
         <a-input :maxlength="100" v-model:value="formData.scoreReason" :placeholder="t('feedback.settext')" />
       </a-form-item>
       </a-form-item>
       <a-form-item style="text-align: center">
       <a-form-item style="text-align: center">
@@ -158,7 +196,7 @@
   const emit = defineEmits(['submit']);
   const emit = defineEmits(['submit']);
   watch(
   watch(
     () => props.addres,
     () => props.addres,
-    (newValue, oldValue) => {
+    (newValue, _) => {
       console.log('addreswatch', newValue);
       console.log('addreswatch', newValue);
       formData.value.country = newValue.country;
       formData.value.country = newValue.country;
       formData.value.countries = newValue.mccountries;
       formData.value.countries = newValue.mccountries;
@@ -183,7 +221,7 @@
   console.log('formData', formData);
   console.log('formData', formData);
   // eslint-disable-next-line vue/no-setup-props-destructure
   // eslint-disable-next-line vue/no-setup-props-destructure
   const propsOptions = props.columns;
   const propsOptions = props.columns;
-  const previewImage = ref('');
+  // const previewImage = ref('');
   const formRef = ref(null);
   const formRef = ref(null);
   const rules = {
   const rules = {
     problemDesc: [
     problemDesc: [
@@ -194,7 +232,7 @@
     industryOptionId: [{ required: true, message: t('feedback.setselcet') + t('feedback.title3'), trigger: 'change' }],
     industryOptionId: [{ required: true, message: t('feedback.setselcet') + t('feedback.title3'), trigger: 'change' }],
     hardwareOptionId: [{ required: true, message: t('feedback.setselcet') + t('feedback.title4'), trigger: 'change' }],
     hardwareOptionId: [{ required: true, message: t('feedback.setselcet') + t('feedback.title4'), trigger: 'change' }],
   };
   };
-  function validatorFile(_rule, value) {
+  function validatorFile(_rule, _) {
     let rule = _rule;
     let rule = _rule;
     let isOk = Boolean(formData.value[rule.name] || (formData.value[`${rule.name}Imgs`] && formData.value[`${rule.name}Imgs`].length > 0));
     let isOk = Boolean(formData.value[rule.name] || (formData.value[`${rule.name}Imgs`] && formData.value[`${rule.name}Imgs`].length > 0));
     if (isOk) {
     if (isOk) {
@@ -255,14 +293,14 @@
   //   console.log('file',file)
   //   console.log('file',file)
   //   return file
   //   return file
   // }
   // }
-  function getBase64(file) {
-    return new Promise((resolve, reject) => {
-      const reader = new FileReader();
-      reader.readAsDataURL(file);
-      reader.onload = () => resolve(reader.result);
-      reader.onerror = (error) => reject(error);
-    });
-  }
+  // function getBase64(file) {
+  //   return new Promise((resolve, reject) => {
+  //     const reader = new FileReader();
+  //     reader.readAsDataURL(file);
+  //     reader.onload = () => resolve(reader.result);
+  //     reader.onerror = (error) => reject(error);
+  //   });
+  // }
   const handlePreview = async (file) => {
   const handlePreview = async (file) => {
     console.log('file', file);
     console.log('file', file);
     file.preview = file.response.data;
     file.preview = file.response.data;
@@ -270,10 +308,10 @@
     return;
     return;
     // createImgPreview({ imageList: [file.response.data] });
     // createImgPreview({ imageList: [file.response.data] });
   };
   };
-  const preview = (file) => {
-    console.log('file', file);
-    return file;
-  };
+  // const preview = (file) => {
+  //   console.log('file', file);
+  //   return file;
+  // };
   const onSubmit = () => {
   const onSubmit = () => {
     console.log('values', formRef.value.validate());
     console.log('values', formRef.value.validate());
     formRef.value
     formRef.value

+ 1 - 2
src/views/feedback/success.vue

@@ -2,7 +2,7 @@
   <div class="success">
   <div class="success">
     <div class="centent">
     <div class="centent">
       <van-icon color="#50C418" size="60" name="checked" />
       <van-icon color="#50C418" size="60" name="checked" />
-      <p>{{t('feedback.submitSuccess')}}</p>
+      <p>{{ t('feedback.submitSuccess') }}</p>
       <div>{{ t('feedback.submitText') }}</div>
       <div>{{ t('feedback.submitText') }}</div>
     </div>
     </div>
   </div>
   </div>
@@ -13,7 +13,6 @@
   const { t } = useI18n();
   const { t } = useI18n();
 </script>
 </script>
 
 
-
 <style lang="scss" scoped>
 <style lang="scss" scoped>
   .success {
   .success {
     height: 100vh;
     height: 100vh;

+ 51 - 52
src/views/home/index.vue

@@ -2,72 +2,71 @@
   <div class="page">
   <div class="page">
     <van-tabs v-model:active="active" color="#00B3EC" title-active-color="#00B3EC">
     <van-tabs v-model:active="active" color="#00B3EC" title-active-color="#00B3EC">
       <van-tab title="设备报修">
       <van-tab title="设备报修">
-        <SubmitPage @setActive="changeActive"/>
+        <SubmitPage @set-active="changeActive" />
       </van-tab>
       </van-tab>
       <van-tab title="报修记录">
       <van-tab title="报修记录">
-        <List :active="active" @setActive="changeActive"/>
+        <List :active="active" @set-active="changeActive" />
       </van-tab>
       </van-tab>
     </van-tabs>
     </van-tabs>
   </div>
   </div>
 </template>
 </template>
 
 
 <script lang="ts" setup name="homePage">
 <script lang="ts" setup name="homePage">
-import { computed, ref, onActivated } from 'vue';
-import { useUserStore } from '/@/store/modules/user';
-import SubmitPage from './submit.vue'
-import List from './list.vue'
-const active = ref(0);
-const userStore = useUserStore();
-const getUserInfo = computed(() => {
-  const { name = '' } = userStore.getUserInfo() || {};
-  return name;
-});
-const onClickTab = (title) => {
-}
-const changeActive = (type) => {
-  document.documentElement.scrollTo({ top: 0, behavior: 'smooth' });
-  active.value = type
-};
+  import { ref } from 'vue';
+  // import { useUserStore } from '/@/store/modules/user';
+  import SubmitPage from './submit.vue';
+  import List from './list.vue';
+  const active = ref(0);
+  // const userStore = useUserStore();
+  // const getUserInfo = computed(() => {
+  //   const { name = '' } = userStore.getUserInfo() || {};
+  //   return name;
+  // });
+  // const onClickTab = (title) => {};
+  const changeActive = (type) => {
+    document.documentElement.scrollTo({ top: 0, behavior: 'smooth' });
+    active.value = type;
+  };
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.page{
-  background-color: #F5F5F5;
-}
-.header {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  padding: 0 20px;
-  font-size: 40px;
-  img {
-    width: 90px;
-    height: 90px;
+  .page {
+    background-color: #f5f5f5;
+  }
+  .header {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    padding: 0 20px;
+    font-size: 40px;
+    img {
+      width: 90px;
+      height: 90px;
+    }
   }
   }
-}
 
 
-.intro-header {
-  margin-top: 20px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  font-size: 16px;
-}
+  .intro-header {
+    margin-top: 20px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 16px;
+  }
 
 
-.supportList {
-  margin: 0 16px;
+  .supportList {
+    margin: 0 16px;
 
 
-  .nut-cell-group__title {
-    margin-top: 30px;
-  }
-  .nut-icon {
-    color: green;
+    .nut-cell-group__title {
+      margin-top: 30px;
+    }
+    .nut-icon {
+      color: green;
+    }
   }
   }
-}
 
 
-.btn-wrap {
-  margin: 20px;
-}
-.btn-confirm {
-  // @include main-lang-bg(302px, 82px, '/@/assets/button', 'confirm.png');
-}
+  .btn-wrap {
+    margin: 20px;
+  }
+  .btn-confirm {
+    // @include main-lang-bg(302px, 82px, '/@/assets/button', 'confirm.png');
+  }
 </style>
 </style>

+ 164 - 132
src/views/home/list.vue

@@ -4,8 +4,10 @@
       <!-- <van-cell v-for="item in list" :key="item" :title="item" /> -->
       <!-- <van-cell v-for="item in list" :key="item" :title="item" /> -->
       <div class="item" v-for="item in list" :key="item" @click="goRoute(`detail/${item.repairId}`)">
       <div class="item" v-for="item in list" :key="item" @click="goRoute(`detail/${item.repairId}`)">
         <div class="item_top padddiv">
         <div class="item_top padddiv">
-          <div class="orderSn">工单号: <span>{{item.repairId}}</span></div>
-          <div class="state" style="color:#00B3EC">{{status[item.status]}}</div>
+          <div class="orderSn"
+            >工单号: <span>{{ item.repairId }}</span></div
+          >
+          <div class="state" style="color: #00b3ec">{{ status[item.status] }}</div>
         </div>
         </div>
         <div class="content padddiv">
         <div class="content padddiv">
           <div class="camera">
           <div class="camera">
@@ -13,18 +15,48 @@
               <img src="../../assets/image/tips/kj.png" />
               <img src="../../assets/image/tips/kj.png" />
               {{ myData.cameraType[item.cameraType] }}
               {{ myData.cameraType[item.cameraType] }}
             </span>
             </span>
-            <span>  {{ item.cameraSnCode }}</span>
+            <span> {{ item.cameraSnCode }}</span>
           </div>
           </div>
-          <div class="camera_text htmlText" v-html="item.faultMsg" />
+          <div class="camera_text htmlText" v-html="item.faultMsg"></div>
         </div>
         </div>
         <div class="item_buttom padddiv">
         <div class="item_buttom padddiv">
           <div class="time">报修日期 {{ dayjs(item.createTime).format('YYYY-MM-DD') }}</div>
           <div class="time">报修日期 {{ dayjs(item.createTime).format('YYYY-MM-DD') }}</div>
           <div class="butList">
           <div class="butList">
             <!-- <van-button @click.stop="goRoute(`payment/${item}`)" hairline size="small" type="primary" >支付</van-button> -->
             <!-- <van-button @click.stop="goRoute(`payment/${item}`)" hairline size="small" type="primary" >支付</van-button> -->
-            <van-button v-if="item.status == 30" @click.stop="goRoute(`repair/${item.repairId}`)" color="#00B3EC" plain hairline size="small">查看报价</van-button>
-            <van-button v-if="item.status == 80 || item.status == 40" @click.stop="goRoute(`payment/${item.repairId}`)" color="#00B3EC" hairline size="small">支付</van-button>
-            <van-button v-if="item.status > 80 && item.commentStatus == 0" @click.stop="goRoute(`evaluate/${item.repairId}`)" color="#00B3EC" plain hairline size="small">评价</van-button>
-            <van-button v-if="item.status > 80 && item.invoiceStatus == 0 && item.warrantyType != 0 && item.warrantyType != 3 && item.payAmount > 0" @click.stop="goRoute(`invoice/${item.repairId}`)" color="#00B3EC" hairline size="small">申请开票</van-button>
+            <van-button
+              v-if="item.status == 30"
+              @click.stop="goRoute(`repair/${item.repairId}`)"
+              color="#00B3EC"
+              plain
+              hairline
+              size="small"
+              >查看报价</van-button
+            >
+            <van-button
+              v-if="item.status == 80 || item.status == 40"
+              @click.stop="goRoute(`payment/${item.repairId}`)"
+              color="#00B3EC"
+              hairline
+              size="small"
+              >支付</van-button
+            >
+            <van-button
+              v-if="item.status > 80 && item.commentStatus == 0"
+              @click.stop="goRoute(`evaluate/${item.repairId}`)"
+              color="#00B3EC"
+              plain
+              hairline
+              size="small"
+              >评价</van-button
+            >
+            <van-button
+              v-if="item.status > 80 && item.invoiceStatus == 0 && item.warrantyType != 0 && item.warrantyType != 3 && item.payAmount > 0"
+              @click.stop="goRoute(`invoice/${item.repairId}`)"
+              color="#00B3EC"
+              hairline
+              size="small"
+              >申请开票</van-button
+            >
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -32,141 +64,141 @@
   </div>
   </div>
 </template>
 </template>
 <script lang="ts" setup name="HomeList">
 <script lang="ts" setup name="HomeList">
-import { reactive, ref, onActivated, toRefs, watch, computed, onMounted } from 'vue';
-import { useRouter } from 'vue-router';
-import { useUserStore } from '/@/store/modules/user';
-import { useHomeStore } from '/@/store/modules/home';
-import { repairList } from '/@/api';
-import dayjs from 'dayjs'
-const userStore = useUserStore();
-const userHome = useHomeStore();
-const router = useRouter();
-import sw from '/@/assets/image/tips/l-sh.png';
-import ss from '/@/assets/image/tips/ss.png';
-import kk from '/@/assets/image/tips/kk.png';
-import kj from '/@/assets/image/tips/kj.png';
-const props = defineProps({
-  active: {
-    type:Number,
-    require:true,
-    default:0
-  },
-});
-const { active } = toRefs(props);
-const list = ref<[any]>([]);
-const loading = ref(false);
-console.log('userStore',userStore)
-const wxOpenId = computed(() => {
-  return userStore.getWxOpenId;
-});
-const status = computed(() => {
-  return userHome.getStatus || {};
-});
-console.log(props, active)
-watch(
-  () => active.value,
-  (val) => {
-    //val为修改后的值,preVal为修改前的值
-    if(val==1){
-      onLoad()
-    }
-  }
-);
-onMounted(()=>{
-  onLoad()
-})
-onActivated(()=>{
-  getList()
-})
-const myData = reactive({
-  cameraType:{
-    0:'四维看看',
-    1:'四维看见',
-    2:'四维深时',
-  },
-  
-  imgObj: {
-    1: sw,
-    2: kk,
-    3: kj,
-    4: ss,
-  },
-});
-const onLoad = async () => {
-  getList()
-};
-const getList = async (item) => {
-  loading.value = false;
-  const {data} = await repairList({wxOpenId:wxOpenId.value});
-  console.log('data',data)
-  list.value = data || []
-  loading.value = true;
-}
-const goRoute = (path) => {
-  if (!path) return;
-  router.push(path);
-};
+  import { reactive, ref, onActivated, toRefs, watch, computed, onMounted } from 'vue';
+  import { useRouter } from 'vue-router';
+  import { useUserStore } from '/@/store/modules/user';
+  import { useHomeStore } from '/@/store/modules/home';
+  import { repairList } from '/@/api';
+  import dayjs from 'dayjs';
+  const userStore = useUserStore();
+  const userHome = useHomeStore();
+  const router = useRouter();
+  import sw from '/@/assets/image/tips/l-sh.png';
+  import ss from '/@/assets/image/tips/ss.png';
+  import kk from '/@/assets/image/tips/kk.png';
+  import kj from '/@/assets/image/tips/kj.png';
+  const props = defineProps({
+    active: {
+      type: Number,
+      require: true,
+      default: 0,
+    },
+  });
+  const { active } = toRefs(props);
+  const list = ref<[any]>([]);
+  const loading = ref(false);
+  console.log('userStore', userStore);
+  const wxOpenId = computed(() => {
+    return userStore.getWxOpenId;
+  });
+  const status = computed(() => {
+    return userHome.getStatus || {};
+  });
+  console.log(props, active);
+  watch(
+    () => active.value,
+    (val) => {
+      //val为修改后的值,preVal为修改前的值
+      if (val == 1) {
+        onLoad();
+      }
+    },
+  );
+  onMounted(() => {
+    onLoad();
+  });
+  onActivated(() => {
+    getList();
+  });
+  const myData = reactive({
+    cameraType: {
+      0: '四维看看',
+      1: '四维看见',
+      2: '四维深时',
+    },
+
+    imgObj: {
+      1: sw,
+      2: kk,
+      3: kj,
+      4: ss,
+    },
+  });
+  const onLoad = async () => {
+    getList();
+  };
+  const getList = async () => {
+    loading.value = false;
+    const { data } = await repairList({ wxOpenId: wxOpenId.value });
+    console.log('data', data);
+    list.value = data || [];
+    loading.value = true;
+  };
+  const goRoute = (path) => {
+    if (!path) return;
+    router.push(path);
+  };
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.list {
-  min-height: calc(100vh - 48px);
-  background-color: #f5f5f5;
-  .item {
-    margin: 10px 0;
-    background-color: #fff;
-    font-size: 14px;
-    .padddiv {
-      padding: 0 16px;
-    }
-    .item_top {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      padding: 13px 16px;
-      .orderSn {
-        font-size: 14px;
-        font-family: PingFang SC-Regular, PingFang SC;
-        font-weight: 400;
-        color: rgba(102, 102, 102, 0.6);
+  .list {
+    min-height: calc(100vh - 48px);
+    background-color: #f5f5f5;
+    .item {
+      margin: 10px 0;
+      background-color: #fff;
+      font-size: 14px;
+      .padddiv {
+        padding: 0 16px;
       }
       }
-    }
-    .content {
-      .camera {
-        margin: 12px 0;
+      .item_top {
         display: flex;
         display: flex;
         justify-content: space-between;
         justify-content: space-between;
         align-items: center;
         align-items: center;
-        height: 46px;
-        img{
-          position: relative;
-          top: 6px;
-          margin-right: 10px;
+        padding: 13px 16px;
+        .orderSn {
+          font-size: 14px;
+          font-family: PingFang SC-Regular, PingFang SC;
+          font-weight: 400;
+          color: rgba(102, 102, 102, 0.6);
         }
         }
       }
       }
-      .camera_text {
-        margin-bottom: 24px;
+      .content {
+        .camera {
+          margin: 12px 0;
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          height: 46px;
+          img {
+            position: relative;
+            top: 6px;
+            margin-right: 10px;
+          }
+        }
+        .camera_text {
+          margin-bottom: 24px;
+        }
       }
       }
-    }
-    .item_buttom {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      height: 60px;
-      border-top: 1px solid #E7E7E7;
+      .item_buttom {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        height: 60px;
+        border-top: 1px solid #e7e7e7;
 
 
-      .butList {
-        .van-button {
-          min-width: 72px;
-          margin-left: 15px;
+        .butList {
+          .van-button {
+            min-width: 72px;
+            margin-left: 15px;
+          }
+        }
+        .time {
+          font-size: 12px;
+          font-family: PingFang SC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #999;
         }
         }
-      }
-      .time{
-        font-size: 12px;
-        font-family: PingFang SC-Regular, PingFang SC;
-        font-weight: 400;
-        color: #999;
       }
       }
     }
     }
   }
   }
-}
-</style>
+</style>

+ 140 - 139
src/views/home/submit.vue

@@ -139,155 +139,156 @@
     </div>
     </div>
   </van-form>
   </van-form>
 </template>
 </template>
-  
+
 <script lang="ts" setup name="HomeSubmit">
 <script lang="ts" setup name="HomeSubmit">
-import { showLoadingToast, closeToast } from 'vant';
-import { computed, reactive, unref, ref } from 'vue';
-import { useUserStore } from '/@/store/modules/user';
-import { showToast, showSuccessToast } from 'vant';
-import axios from 'axios';
-// import useAxiosApi from '/@/utils/useAxiosApi';
-// import { Toast } from '@nutui/nutui';
-import { cameraRepair } from '/@/api';
-// import { setLang } from '/@/i18n';
-// import { useI18n } from 'vue-i18n';
-const emit = defineEmits(['setActive']);
-// const { locale } = useI18n();
-const userStore = useUserStore();
-const loading = ref(false)
-const wxOpenId = computed(() => {
-  return userStore.getWxOpenId;
-});
-const formData = reactive({
-  companyName: '',
-  customerName: '',
-  phone: '',
-  cameraSnCode: '',
-  faultMsg: '',
-  faultImg: <any>[],
-  sendType: 0,
-  sendTrackingNum: '',
-  getAddress: '',
-  getAddrName: '',
-  getAddrPhone: '',
-  getType: 0,
-  message: '',
-});
-async function onSubmit() {
-  // return new Promise((resolve) => {
-  let apiData = {
-    ...formData,
-    wxOpenId: wxOpenId.value,
-    faultImg: formData.faultImg.map((ele) => ele.url),
-  };
-  const { response } = await cameraRepair(apiData);
-  let data = unref(response);
-  console.log('onSubmit', formData, data, 'wxOpenId', wxOpenId);
-  if (data.code == 200) {
-    showSuccessToast('提交成功');
-    emit('setActive', 1);
-    formData.companyName = '';
-    formData.customerName = '';
-    formData.phone = '';
-    formData.cameraSnCode = '';
-    formData.faultMsg = '';
-    formData.faultImg = [];
-    formData.sendTrackingNum = '';
-    formData.getAddress = '';
-    formData.getAddrName = '';
-    formData.getAddrPhone = '';
-  }
-}
-//校验图片的格式
-function beforeRead(file) {
-  if (!/(jpg|jpeg|png|JPG|PNG)/i.test(file.type)) {
-    showToast('请上传正确格式的图片');
-    return false;
-  }
-  return true;
-}
-//照片上传事件方法
-function clzpAfterRead(file) {
-  // 上传状态提示开启
-  file.status = 'uploading';
-  file.message = '上传中...';
-  loading.value = true
-  // 创建一个空对象实例
-  let formData = new FormData();
-  // 调用append()方法添加数据
-  formData.append('file', file.file);
-  axios({
-    url: '/service/sale/upload/file',
-    method: 'POST',
-    data: formData,
-    headers: {
-      'Content-Type': 'multipart/form-data',
-    },
-  }).then((res) => {
-    loading.value = false
-    let { data } = res;
+  // import { showLoadingToast, closeToast } from 'vant';
+  import { computed, reactive, unref, ref } from 'vue';
+  import { useUserStore } from '/@/store/modules/user';
+  import { showToast, showSuccessToast } from 'vant';
+  import axios from 'axios';
+  // import useAxiosApi from '/@/utils/useAxiosApi';
+  // import { Toast } from '@nutui/nutui';
+  import { cameraRepair } from '/@/api';
+  // import { setLang } from '/@/i18n';
+  // import { useI18n } from 'vue-i18n';
+  const emit = defineEmits(['setActive']);
+  // const { locale } = useI18n();
+  const userStore = useUserStore();
+  const loading = ref(false);
+  const wxOpenId = computed(() => {
+    return userStore.getWxOpenId;
+  });
+  const formData = reactive({
+    companyName: '',
+    customerName: '',
+    phone: '',
+    cameraSnCode: '',
+    faultMsg: '',
+    faultImg: [],
+    sendType: 0,
+    sendTrackingNum: '',
+    getAddress: '',
+    getAddrName: '',
+    getAddrPhone: '',
+    getType: 0,
+    message: '',
+  });
+  async function onSubmit() {
+    // return new Promise((resolve) => {
+    let apiData = {
+      ...formData,
+      wxOpenId: wxOpenId.value,
+      faultImg: formData.faultImg.map((ele) => ele.url),
+    };
+    const { response } = await cameraRepair(apiData);
+    let data = unref(response);
+    console.log('onSubmit', formData, data, 'wxOpenId', wxOpenId);
     if (data.code == 200) {
     if (data.code == 200) {
-      // 上传状态提示关闭
-      file.url = data.data;
-      file.file = '';
-      file.content = '';
-      file.status = 'done';
-      showToast('上传成功!');
+      showSuccessToast('提交成功');
+      emit('setActive', 1);
+      formData.companyName = '';
+      formData.customerName = '';
+      formData.phone = '';
+      formData.cameraSnCode = '';
+      formData.faultMsg = '';
+      formData.faultImg = [];
+      formData.sendTrackingNum = '';
+      formData.getAddress = '';
+      formData.getAddrName = '';
+      formData.getAddrPhone = '';
     }
     }
-    console.log('formData.faultImg',formData, file)
-  }).catch(() =>{
-    loading.value = false
-  });
-}
+  }
+  //校验图片的格式
+  function beforeRead(file) {
+    if (!/(jpg|jpeg|png|JPG|PNG)/i.test(file.type)) {
+      showToast('请上传正确格式的图片');
+      return false;
+    }
+    return true;
+  }
+  //照片上传事件方法
+  function clzpAfterRead(file) {
+    // 上传状态提示开启
+    file.status = 'uploading';
+    file.message = '上传中...';
+    loading.value = true;
+    // 创建一个空对象实例
+    let formData = new FormData();
+    // 调用append()方法添加数据
+    formData.append('file', file.file);
+    axios({
+      url: '/service/sale/upload/file',
+      method: 'POST',
+      data: formData,
+      headers: {
+        'Content-Type': 'multipart/form-data',
+      },
+    })
+      .then((res) => {
+        loading.value = false;
+        let { data } = res;
+        if (data.code == 200 || data.code == 0) {
+          // 上传状态提示关闭
+          file.url = data.data;
+          file.file = '';
+          file.content = '';
+          file.status = 'done';
+          showToast('上传成功!');
+        }
+        console.log('formData.faultImg', formData, file);
+      })
+      .catch(() => {
+        loading.value = false;
+      });
+  }
 </script>
 </script>
-  <style lang="scss">
-.header {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  padding: 0 20px;
-  font-size: 40px;
-  img {
-    width: 90px;
-    height: 90px;
+<style lang="scss">
+  .header {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    padding: 0 20px;
+    font-size: 40px;
+    img {
+      width: 90px;
+      height: 90px;
+    }
   }
   }
-}
 
 
-.intro-header {
-  margin-top: 20px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  font-size: 16px;
-}
+  .intro-header {
+    margin-top: 20px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 16px;
+  }
 
 
-.supportList {
-  margin: 0 16px;
+  .supportList {
+    margin: 0 16px;
 
 
-  .nut-cell-group__title {
-    margin-top: 30px;
-  }
-  .nut-icon {
-    color: green;
+    .nut-cell-group__title {
+      margin-top: 30px;
+    }
+    .nut-icon {
+      color: green;
+    }
   }
   }
-}
 
 
-.btn-wrap {
-  margin: 20px;
-}
-.page {
-  .btn-confirm {
-    // @include main-lang-bg(302px, 82px, '/@/assets/button', 'confirm.png');
-  }
-  .van-cell {
-    padding: 20px 0;
+  .btn-wrap {
+    margin: 20px;
   }
   }
-  .van-cell__title {
-    margin-bottom: 10px;
-  }
-  .van-radio--horizontal {
-    margin-right: 60px;
+  .page {
+    .btn-confirm {
+      // @include main-lang-bg(302px, 82px, '/@/assets/button', 'confirm.png');
+    }
+    .van-cell {
+      padding: 20px 0;
+    }
+    .van-cell__title {
+      margin-bottom: 10px;
+    }
+    .van-radio--horizontal {
+      margin-right: 60px;
+    }
   }
   }
-}
 </style>
 </style>
-