Просмотр исходного кода

完成报修物品拖拽功能

hzj18279462576@163.com 2 лет назад
Родитель
Сommit
07a54caf1f

+ 38 - 0
package-lock.json

@@ -766,6 +766,11 @@
         "source-map-js": "^1.0.2"
         "source-map-js": "^1.0.2"
       }
       }
     },
     },
+    "print-js": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz",
+      "integrity": "sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg=="
+    },
     "proxy-from-env": {
     "proxy-from-env": {
       "version": "1.1.0",
       "version": "1.1.0",
       "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
       "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
@@ -823,6 +828,11 @@
       "resolved": "https://registry.npmmirror.com/shvl/-/shvl-2.0.3.tgz",
       "resolved": "https://registry.npmmirror.com/shvl/-/shvl-2.0.3.tgz",
       "integrity": "sha512-V7C6S9Hlol6SzOJPnQ7qzOVEWUQImt3BNmmzh40wObhla3XOYMe4gGiYzLrJd5TFa+cI2f9LKIRJTTKZSTbWgw=="
       "integrity": "sha512-V7C6S9Hlol6SzOJPnQ7qzOVEWUQImt3BNmmzh40wObhla3XOYMe4gGiYzLrJd5TFa+cI2f9LKIRJTTKZSTbWgw=="
     },
     },
+    "sortablejs": {
+      "version": "1.15.0",
+      "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz",
+      "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
+    },
     "source-map": {
     "source-map": {
       "version": "0.6.1",
       "version": "0.6.1",
       "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
       "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
@@ -907,6 +917,11 @@
       "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz",
       "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.13.11.tgz",
       "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A=="
       "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A=="
     },
     },
+    "vue-pdf-embed": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmmirror.com/vue-pdf-embed/-/vue-pdf-embed-1.2.1.tgz",
+      "integrity": "sha512-4uUm4wxaEGT9cS1cyuagAmMJjBxfQXWG1MvdGPesD3CiXhhSp4i0VMUCYwhFXtZ5+QqWv4mXbfLJ29Wpt+Qcuw=="
+    },
     "vue-router": {
     "vue-router": {
       "version": "4.0.10",
       "version": "4.0.10",
       "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.0.10.tgz",
       "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.0.10.tgz",
@@ -915,6 +930,29 @@
         "@vue/devtools-api": "^6.0.0-beta.14"
         "@vue/devtools-api": "^6.0.0-beta.14"
       }
       }
     },
     },
+    "vue3-print-nb": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmmirror.com/vue3-print-nb/-/vue3-print-nb-0.1.4.tgz",
+      "integrity": "sha512-LExI7viEzplR6ZKQ2b+V4U0cwGYbVD4fut/XHvk3UPGlT5CcvIGs6VlwGp107aKgk6P8Pgx4rco3Rehv2lti3A==",
+      "requires": {
+        "vue": "^3.0.5"
+      }
+    },
+    "vuedraggable": {
+      "version": "2.24.3",
+      "resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz",
+      "integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
+      "requires": {
+        "sortablejs": "1.10.2"
+      },
+      "dependencies": {
+        "sortablejs": {
+          "version": "1.10.2",
+          "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz",
+          "integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
+        }
+      }
+    },
     "vuex": {
     "vuex": {
       "version": "4.0.2",
       "version": "4.0.2",
       "resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",
       "resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",

+ 5 - 0
package.json

@@ -20,11 +20,16 @@
     "hls.js": "^1.3.4",
     "hls.js": "^1.3.4",
     "jsencrypt": "^3.3.1",
     "jsencrypt": "^3.3.1",
     "lodash": "^4.17.21",
     "lodash": "^4.17.21",
+    "print-js": "^1.6.0",
     "sass": "^1.58.0",
     "sass": "^1.58.0",
     "sass-loader": "^13.2.0",
     "sass-loader": "^13.2.0",
+    "sortablejs": "^1.15.0",
     "terser": "^5.16.5",
     "terser": "^5.16.5",
     "vue": "^3.2.45",
     "vue": "^3.2.45",
+    "vue-pdf-embed": "^1.2.1",
     "vue-router": "^4.0.10",
     "vue-router": "^4.0.10",
+    "vue3-print-nb": "^0.1.4",
+    "vuedraggable": "^2.24.3",
     "vuex": "^4.0.2",
     "vuex": "^4.0.2",
     "vuex-persistedstate": "^4.1.0"
     "vuex-persistedstate": "^4.1.0"
   },
   },

+ 4 - 0
src/main.js

@@ -10,6 +10,8 @@ import router from "@/router";
 import store from "@/store";
 import store from "@/store";
 
 
 import "animate.css/animate.min.css";
 import "animate.css/animate.min.css";
+// 打印功能
+import print from "vue3-print-nb";
 
 
 const app = createApp(App);
 const app = createApp(App);
 for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
@@ -21,6 +23,8 @@ app.use(ElementPlus, {
 });
 });
 app.use(router);
 app.use(router);
 app.use(store);
 app.use(store);
+// 使用打印功能
+app.use(print);
 
 
 app.mount("#app");
 app.mount("#app");
 app.config.devtools = true;
 app.config.devtools = true;

+ 3 - 3
src/router/index.js

@@ -5,8 +5,8 @@ import {
 } from "vue-router";
 } from "vue-router";
 import Layout from "@/layout/index.vue";
 import Layout from "@/layout/index.vue";
 const router = createRouter({
 const router = createRouter({
-  // history: createWebHashHistory("/carstop/dist6"), // 线上地址
-  history: createWebHashHistory("/campusMaintenance/repairManage"), // 测试环境发布地址
+  // history: createWebHashHistory("/campusMaintenance/repairManage"), // 线上地址
+  history: createWebHashHistory("/testingServer/repairManage"), // 测试环境发布地址
   routes: [
   routes: [
     {
     {
       path: "/login",
       path: "/login",
@@ -90,7 +90,7 @@ const router = createRouter({
   ],
   ],
 });
 });
 export default router;
 export default router;
-router.beforeEach((to, from, next) => {
+router.beforeEach(async (to, from, next) => {
   // 判断 如果cook是否存在,可以进去
   // 判断 如果cook是否存在,可以进去
   if (sessionStorage.getItem("token")) {
   if (sessionStorage.getItem("token")) {
     next(); //放行
     next(); //放行

+ 4 - 2
src/store/modules/user.js

@@ -8,9 +8,10 @@ const state = {
   activeIndex: 0,
   activeIndex: 0,
   username: "",
   username: "",
   password: "",
   password: "",
-  // api: "/carstop/carbook", // 线上
-  api: "/campusMaintenance/repair-api/repair/api", // 测试
+  // api: "/campusMaintenance/repair-api/repair/api", // 线上
+  api: "/testingServer/repairTest/repair/api", // 测试
   newsNum: "",
   newsNum: "",
+  schoolId:"",// 管理员等级
 };
 };
 
 
 // 修改变量(state不能直接赋值修改,只能通过mutations)
 // 修改变量(state不能直接赋值修改,只能通过mutations)
@@ -53,6 +54,7 @@ const actions = {
     commit("newsUp", res.data.data.count);
     commit("newsUp", res.data.data.count);
     sessionStorage.setItem("newsNum", res.data.data.count);
     sessionStorage.setItem("newsNum", res.data.data.count);
   },
   },
+ 
   // // 车辆管理
   // // 车辆管理
   // busNum: async ({ commit, state }) => {
   // busNum: async ({ commit, state }) => {
   //   let data = new FormData();
   //   let data = new FormData();

+ 12 - 5
src/views/account/account.vue

@@ -43,6 +43,12 @@
         <!-- <el-table-column align="center" type="selection" width="80" /> -->
         <!-- <el-table-column align="center" type="selection" width="80" /> -->
         <el-table-column width="150" align="center" label="序号" type="index" index="1" />
         <el-table-column width="150" align="center" label="序号" type="index" index="1" />
         <el-table-column align="center" prop="username" label="名称" />
         <el-table-column align="center" prop="username" label="名称" />
+        <!-- <el-table-column align="center" label="校区">
+          <template #default="{ row }">
+            <span v-if="row.schoolId == 1">墨轩湖校区</span>
+            <span v-if="row.schoolId == 2">黄家湖校区</span>
+          </template>
+        </el-table-column> -->
         <el-table-column align="center" prop="account" label="账号" />
         <el-table-column align="center" prop="account" label="账号" />
         <el-table-column align="center" prop="phone" label="手机号码" />
         <el-table-column align="center" prop="phone" label="手机号码" />
         <el-table-column align="center" label="管理员">
         <el-table-column align="center" label="管理员">
@@ -283,11 +289,12 @@ const getList = async (message) => {
       message: res.data.message,
       message: res.data.message,
       center: true,
       center: true,
     });
     });
-    // if (res.data.message == "token错误") {
-    //   router.push({
-    //     path: `/login`,
-    //   });
-    // }
+    if (res.data.code == 570) {
+      sessionStorage.removeItem("token")
+      router.push({
+        path: `/login`,
+      });
+    }
   }
   }
 };
 };
 
 

+ 6 - 0
src/views/affiche/affiche.vue

@@ -177,6 +177,12 @@ const getList = async (message) => {
       message: res.data.message,
       message: res.data.message,
       center: true,
       center: true,
     });
     });
+    if (res.data.code == 570) {
+      sessionStorage.removeItem("token")
+      router.push({
+        path: `/login`,
+      });
+    }
   }
   }
   // console.log(res);
   // console.log(res);
 };
 };

+ 119 - 164
src/views/area/area.vue

@@ -3,76 +3,36 @@
     <div class="top">报修区域</div>
     <div class="top">报修区域</div>
     <div class="left">
     <div class="left">
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
-      <span
-        class="cameratxt"
-        @click="getList(1)"
-        :class="themeIndex == 1 ? 'is_active' : ''"
-        >黄家湖校区</span
-      >
-      <span
-        class="cameratxt"
-        @click="getList(2)"
-        :class="themeIndex == 2 ? 'is_active' : ''"
-        >墨轩湖校区</span
-      >
+      <span class="cameratxt" @click="getList(1)" :class="themeIndex == 1 ? 'is_active' : ''">黄家湖校区</span>
+      <span class="cameratxt" @click="getList(2)" :class="themeIndex == 2 ? 'is_active' : ''">墨轩湖校区</span>
     </div>
     </div>
     <div v-if="themeIndex == 1">
     <div v-if="themeIndex == 1">
       <div class="middle">
       <div class="middle">
         <!-- 按钮列表 -->
         <!-- 按钮列表 -->
         <div class="gongneng">
         <div class="gongneng">
-          <el-button
-            type="primary"
-            color="rgba(111, 182, 184, 1)"
-            @click="addlist"
-            ><img
-              src="@/assets/add.png"
-              style="width: 14px; height: 14px; margin-right: 4px"
-              alt=""
-            /><span>添加区域</span></el-button
-          >
+          <el-button type="primary" color="rgba(111, 182, 184, 1)" @click="addlist"><img src="@/assets/add.png"
+              style="width: 14px; height: 14px; margin-right: 4px" alt="" /><span>添加区域</span></el-button>
         </div>
         </div>
       </div>
       </div>
       <div class="footer">
       <div class="footer">
-        <el-table
-          :data="tableData.list"
-          @selection-change="handleSelectionChange"
-          :header-cell-style="{
-            background: 'rgba(240, 243, 247, 1)',
-          }"
-          style="width: 100%; margin-bottom: 20px"
-          row-key="id"
-        >
+        <el-table :data="tableData.list" @selection-change="handleSelectionChange" :header-cell-style="{
+          background: 'rgba(240, 243, 247, 1)',
+        }" style="width: 100%; margin-bottom: 20px" row-key="id">
           <el-table-column label="报修区域">
           <el-table-column label="报修区域">
             <template #default="scope">
             <template #default="scope">
-              <img
-                v-if="scope.row.flag == 1"
-                src="@/assets/areaTable.png"
-                alt=""
-              />
+              <img v-if="scope.row.flag == 1" src="@/assets/areaTable.png" alt="" />
               <span>{{ scope.row.name }}</span>
               <span>{{ scope.row.name }}</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="address" align="center" label="操作">
           <el-table-column prop="address" align="center" label="操作">
             <template #default="scope">
             <template #default="scope">
               <div class="options">
               <div class="options">
-                <div
-                  class="look add"
-                  v-if="scope.row.parentId == 1"
-                  @click="addAreaH(scope.row)"
-                >
+                <div class="look add" v-if="scope.row.parentId == 1" @click="addAreaH(scope.row)">
                   添加
                   添加
                 </div>
                 </div>
                 <div class="look edit" @click="editAreaH(scope.row)">修改</div>
                 <div class="look edit" @click="editAreaH(scope.row)">修改</div>
-                <el-popconfirm
-                  width="220"
-                  confirm-button-text="确认"
-                  cancel-button-text="取消"
-                  :icon="InfoFilled"
-                  icon-color="#f89626"
-                  title="是否删除?"
-                  @confirm="delAreaH(scope.row)"
-                  @cancel="cencelAreaH"
-                >
+                <el-popconfirm width="220" confirm-button-text="确认" cancel-button-text="取消" :icon="InfoFilled"
+                  icon-color="#f89626" title="是否删除?" @confirm="delAreaH(scope.row)" @cancel="cencelAreaH">
                   <template #reference>
                   <template #reference>
                     <div class="look delete">删除</div>
                     <div class="look delete">删除</div>
                   </template>
                   </template>
@@ -82,47 +42,18 @@
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
         <!-- 添加区域 -->
         <!-- 添加区域 -->
-        <el-dialog
-          class="addAreaH"
-          v-model="addAreaHvisible"
-          :close-on-click-modal="false"
-          :close-on-press-escape="false"
-          :title="addAreaHTitle"
-          align-center
-          width="609"
-          :before-close="addAreaHclose"
-        >
-          <el-form
-            ref="addAreas"
-            :model="addAreaForm"
-            :rules="addAreaRules"
-            label-width="120px"
-            class="demo-ruleForm"
-            :size="formSize"
-            label-position="left"
-            status-icon
-          >
-            <el-form-item
-              label="区域名称 :"
-              prop="content"
-              style="
+        <el-dialog class="addAreaH" v-model="addAreaHvisible" :close-on-click-modal="false" :close-on-press-escape="false"
+          :title="addAreaHTitle" align-center width="609" :before-close="addAreaHclose">
+          <el-form ref="addAreas" :model="addAreaForm" :rules="addAreaRules" label-width="120px" class="demo-ruleForm"
+            :size="formSize" label-position="left" status-icon>
+            <el-form-item label="区域名称 :" prop="content" style="
                 padding-bottom: 40px;
                 padding-bottom: 40px;
                 border-bottom: 1px solid rgba(230, 230, 230, 1);
                 border-bottom: 1px solid rgba(230, 230, 230, 1);
-              "
-            >
-              <el-input
-                clearable
-                v-model="addAreaForm.content"
-                placeholder="请输入区域名称"
-              />
+              ">
+              <el-input clearable v-model="addAreaForm.content" placeholder="请输入区域名称" />
             </el-form-item>
             </el-form-item>
             <el-form-item class="options">
             <el-form-item class="options">
-              <el-button
-                color="rgba(111, 182, 184, 1)"
-                class="queding"
-                type="primary"
-                @click="addAreaSub(addAreas)"
-              >
+              <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="addAreaSub(addAreas)">
                 确定
                 确定
               </el-button>
               </el-button>
               <el-button class="congzhi" @click="addAreaHclose">取消</el-button>
               <el-button class="congzhi" @click="addAreaHclose">取消</el-button>
@@ -210,59 +141,29 @@
       <div class="middle">
       <div class="middle">
         <!-- 按钮列表 -->
         <!-- 按钮列表 -->
         <div class="gongneng">
         <div class="gongneng">
-          <el-button
-            type="primary"
-            color="rgba(111, 182, 184, 1)"
-            @click="addlistM"
-            ><img
-              src="@/assets/add.png"
-              style="width: 14px; height: 14px; margin-right: 4px"
-              alt=""
-            /><span>添加区域</span></el-button
-          >
+          <el-button type="primary" color="rgba(111, 182, 184, 1)" @click="addlistM"><img src="@/assets/add.png"
+              style="width: 14px; height: 14px; margin-right: 4px" alt="" /><span>添加区域</span></el-button>
         </div>
         </div>
       </div>
       </div>
       <div class="footer">
       <div class="footer">
-        <el-table
-          :data="tableData.list"
-          @selection-change="handleSelectionChange"
-          :header-cell-style="{
-            background: 'rgba(240, 243, 247, 1)',
-          }"
-          style="width: 100%; margin-bottom: 20px"
-          row-key="id"
-        >
+        <el-table :data="tableData.list" @selection-change="handleSelectionChange" :header-cell-style="{
+          background: 'rgba(240, 243, 247, 1)',
+        }" style="width: 100%; margin-bottom: 20px" row-key="id">
           <el-table-column prop="date" label="报修区域">
           <el-table-column prop="date" label="报修区域">
             <template #default="scope">
             <template #default="scope">
-              <img
-                v-if="scope.row.flag == 1"
-                src="@/assets/areaTable.png"
-                alt=""
-              />
+              <img v-if="scope.row.flag == 1" src="@/assets/areaTable.png" alt="" />
               <span>{{ scope.row.name }}</span>
               <span>{{ scope.row.name }}</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column prop="address" align="center" label="操作">
           <el-table-column prop="address" align="center" label="操作">
             <template #default="scope">
             <template #default="scope">
               <div class="options">
               <div class="options">
-                <div
-                  class="look add"
-                  v-if="scope.row.parentId == 2"
-                  @click="addAreasM(scope.row)"
-                >
+                <div class="look add" v-if="scope.row.parentId == 2" @click="addAreasM(scope.row)">
                   添加
                   添加
                 </div>
                 </div>
                 <div class="look edit" @click="editAreaM(scope.row)">修改</div>
                 <div class="look edit" @click="editAreaM(scope.row)">修改</div>
-                <el-popconfirm
-                  width="220"
-                  confirm-button-text="确认"
-                  cancel-button-text="取消"
-                  :icon="InfoFilled"
-                  icon-color="#f89626"
-                  title="是否删除?"
-                  @confirm="delAreaM(scope.row)"
-                  @cancel="cencelAreaM"
-                >
+                <el-popconfirm width="220" confirm-button-text="确认" cancel-button-text="取消" :icon="InfoFilled"
+                  icon-color="#f89626" title="是否删除?" @confirm="delAreaM(scope.row)" @cancel="cencelAreaM">
                   <template #reference>
                   <template #reference>
                     <div class="look delete">删除</div>
                     <div class="look delete">删除</div>
                   </template>
                   </template>
@@ -272,47 +173,18 @@
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
         <!-- 添加区域 -->
         <!-- 添加区域 -->
-        <el-dialog
-          class="addAreaM"
-          v-model="addAreaMvisible"
-          :close-on-click-modal="false"
-          :close-on-press-escape="false"
-          :title="addAreaMTitle"
-          align-center
-          width="609"
-          :before-close="addAreaMclose"
-        >
-          <el-form
-            ref="addAreaM"
-            :model="addAreaMForm"
-            :rules="addAreaMRules"
-            label-width="120px"
-            class="demo-ruleForm"
-            :size="formSize"
-            label-position="left"
-            status-icon
-          >
-            <el-form-item
-              label="区域名称 :"
-              prop="content"
-              style="
+        <el-dialog class="addAreaM" v-model="addAreaMvisible" :close-on-click-modal="false" :close-on-press-escape="false"
+          :title="addAreaMTitle" align-center width="609" :before-close="addAreaMclose">
+          <el-form ref="addAreaM" :model="addAreaMForm" :rules="addAreaMRules" label-width="120px" class="demo-ruleForm"
+            :size="formSize" label-position="left" status-icon>
+            <el-form-item label="区域名称 :" prop="content" style="
                 padding-bottom: 40px;
                 padding-bottom: 40px;
                 border-bottom: 1px solid rgba(230, 230, 230, 1);
                 border-bottom: 1px solid rgba(230, 230, 230, 1);
-              "
-            >
-              <el-input
-                clearable
-                v-model="addAreaMForm.content"
-                placeholder="请输入区域名称"
-              />
+              ">
+              <el-input clearable v-model="addAreaMForm.content" placeholder="请输入区域名称" />
             </el-form-item>
             </el-form-item>
             <el-form-item class="options">
             <el-form-item class="options">
-              <el-button
-                color="rgba(111, 182, 184, 1)"
-                class="queding"
-                type="primary"
-                @click="addAreaMSub(addAreaM)"
-              >
+              <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="addAreaMSub(addAreaM)">
                 确定
                 确定
               </el-button>
               </el-button>
               <el-button class="congzhi" @click="addAreaMclose">取消</el-button>
               <el-button class="congzhi" @click="addAreaMclose">取消</el-button>
@@ -514,6 +386,12 @@ const getList = async (flag) => {
       message: res.data.message,
       message: res.data.message,
       center: true,
       center: true,
     });
     });
+    if (res.data.code == 570) {
+      sessionStorage.removeItem("token")
+      router.push({
+        path: `/login`,
+      });
+    }
   }
   }
 };
 };
 
 
@@ -1063,6 +941,7 @@ onUnmounted(() => {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   box-shadow: 0px 3px 10px rgba(213, 228, 252, 1);
   box-shadow: 0px 3px 10px rgba(213, 228, 252, 1);
+
   .top {
   .top {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
@@ -1073,6 +952,7 @@ onUnmounted(() => {
     font-size: 18px;
     font-size: 18px;
     font-weight: 600;
     font-weight: 600;
   }
   }
+
   .left {
   .left {
     // width: calc(100wh - 40px);
     // width: calc(100wh - 40px);
     display: flex;
     display: flex;
@@ -1082,59 +962,73 @@ onUnmounted(() => {
     color: rgb(0, 0, 0);
     color: rgb(0, 0, 0);
     font-size: 18px;
     font-size: 18px;
     font-weight: 600;
     font-weight: 600;
+
     span {
     span {
       margin-right: 20px;
       margin-right: 20px;
       cursor: pointer;
       cursor: pointer;
     }
     }
+
     .is_active {
     .is_active {
       color: rgba(111, 182, 184, 1);
       color: rgba(111, 182, 184, 1);
     }
     }
   }
   }
+
   .middle {
   .middle {
     width: 96%;
     width: 96%;
     margin: 0 auto;
     margin: 0 auto;
 
 
     color: #000;
     color: #000;
+
     // border-bottom: 1px solid rgb(231, 231, 231);
     // border-bottom: 1px solid rgb(231, 231, 231);
     .filter {
     .filter {
       display: flex;
       display: flex;
       flex-wrap: wrap;
       flex-wrap: wrap;
       align-items: center;
       align-items: center;
+
       //   margin: 10px 0 0 0;
       //   margin: 10px 0 0 0;
       .search {
       .search {
         color: #fff;
         color: #fff;
       }
       }
+
       .condition {
       .condition {
         display: flex;
         display: flex;
         align-items: center;
         align-items: center;
         margin: 10px 30px 10px 0;
         margin: 10px 30px 10px 0;
+
         :deep(.el-input .el-input__inner) {
         :deep(.el-input .el-input__inner) {
           font-size: 16px;
           font-size: 16px;
         }
         }
+
         span {
         span {
           margin: 0 10px 0 0;
           margin: 0 10px 0 0;
         }
         }
       }
       }
     }
     }
+
     .gongneng {
     .gongneng {
       margin: 10px 0 20px 0;
       margin: 10px 0 20px 0;
+
       span {
       span {
         color: #fff;
         color: #fff;
       }
       }
     }
     }
+
     :deep(.cont) {
     :deep(.cont) {
       width: 60%;
       width: 60%;
       margin: 20px auto;
       margin: 20px auto;
     }
     }
+
     :deep(.download) {
     :deep(.download) {
       display: flex;
       display: flex;
       align-items: center;
       align-items: center;
       margin: 10px;
       margin: 10px;
     }
     }
+
     :deep(.download span) {
     :deep(.download span) {
       font-size: 16px;
       font-size: 16px;
       margin-left: 20px;
       margin-left: 20px;
     }
     }
+
     :deep(.cont .el-button) {
     :deep(.cont .el-button) {
       margin-left: 60px;
       margin-left: 60px;
       margin-bottom: 30px;
       margin-bottom: 30px;
@@ -1145,11 +1039,13 @@ onUnmounted(() => {
       display: flex;
       display: flex;
       justify-content: center;
       justify-content: center;
     }
     }
+
     :deep(.cont .accomplish .el-button) {
     :deep(.cont .accomplish .el-button) {
       width: 50%;
       width: 50%;
       margin: 0;
       margin: 0;
     }
     }
   }
   }
+
   .footer {
   .footer {
     width: 96%;
     width: 96%;
     height: 550px;
     height: 550px;
@@ -1158,16 +1054,20 @@ onUnmounted(() => {
     .el-table--fit {
     .el-table--fit {
       height: 100%;
       height: 100%;
       user-select: none;
       user-select: none;
+
       :deep(.el-table__header-wrapper) {
       :deep(.el-table__header-wrapper) {
         background-color: #000;
         background-color: #000;
         font-size: 16px;
         font-size: 16px;
+
         tr {
         tr {
           color: #000;
           color: #000;
         }
         }
+
         .el-table__cell:nth-child(1) {
         .el-table__cell:nth-child(1) {
           height: 50px;
           height: 50px;
           font-size: 16px;
           font-size: 16px;
           color: #000;
           color: #000;
+
           .cell {
           .cell {
             display: flex;
             display: flex;
             align-items: center;
             align-items: center;
@@ -1177,10 +1077,12 @@ onUnmounted(() => {
           }
           }
         }
         }
       }
       }
+
       :deep(.el-table__row) {
       :deep(.el-table__row) {
         height: 50px;
         height: 50px;
         font-size: 16px;
         font-size: 16px;
         color: #000;
         color: #000;
+
         .el-table__cell:nth-child(1) {
         .el-table__cell:nth-child(1) {
           .cell {
           .cell {
             display: flex;
             display: flex;
@@ -1197,6 +1099,7 @@ onUnmounted(() => {
           }
           }
         }
         }
       }
       }
+
       // :deep(.el-table__row--level-1) {
       // :deep(.el-table__row--level-1) {
       //   .cell {
       //   .cell {
       //     margin-left: 30px;
       //     margin-left: 30px;
@@ -1219,44 +1122,54 @@ onUnmounted(() => {
       .el-button--primary {
       .el-button--primary {
         margin-left: 5px;
         margin-left: 5px;
       }
       }
+
       :deep(.el-table__body .even) {
       :deep(.el-table__body .even) {
         background-color: #fff;
         background-color: #fff;
       }
       }
+
       :deep(.el-table__body .odd) {
       :deep(.el-table__body .odd) {
         background-color: rgba(240, 243, 247, 1);
         background-color: rgba(240, 243, 247, 1);
       }
       }
+
       :deep(.options) {
       :deep(.options) {
         display: flex;
         display: flex;
         align-items: center;
         align-items: center;
         justify-content: center;
         justify-content: center;
         color: rgba(111, 182, 184, 1);
         color: rgba(111, 182, 184, 1);
       }
       }
+
       :deep(.look) {
       :deep(.look) {
         padding: 2px 10px;
         padding: 2px 10px;
         cursor: pointer;
         cursor: pointer;
         border-radius: 15px;
         border-radius: 15px;
         margin-right: 10px;
         margin-right: 10px;
       }
       }
+
       .add {
       .add {
         border: 1px solid rgba(30, 125, 251, 1);
         border: 1px solid rgba(30, 125, 251, 1);
         color: rgba(30, 125, 251, 1);
         color: rgba(30, 125, 251, 1);
       }
       }
+
       .edit {
       .edit {
         border: 1px solid rgba(111, 182, 184, 1);
         border: 1px solid rgba(111, 182, 184, 1);
         color: rgba(111, 182, 184, 1);
         color: rgba(111, 182, 184, 1);
       }
       }
+
       .delete {
       .delete {
         border: 1px solid rgba(212, 48, 48, 1);
         border: 1px solid rgba(212, 48, 48, 1);
         color: rgba(212, 48, 48, 1);
         color: rgba(212, 48, 48, 1);
       }
       }
+
       :deep(.add):hover {
       :deep(.add):hover {
         background-color: rgba(30, 125, 251, 1);
         background-color: rgba(30, 125, 251, 1);
         color: #fff;
         color: #fff;
       }
       }
+
       :deep(.edit):hover {
       :deep(.edit):hover {
         background-color: rgba(111, 182, 184, 1);
         background-color: rgba(111, 182, 184, 1);
         color: #fff;
         color: #fff;
       }
       }
+
       :deep(.delete):hover {
       :deep(.delete):hover {
         background-color: rgba(212, 48, 48, 1);
         background-color: rgba(212, 48, 48, 1);
         color: #fff;
         color: #fff;
@@ -1267,78 +1180,95 @@ onUnmounted(() => {
     :deep(.addAreaH) {
     :deep(.addAreaH) {
       //   height: 420px;
       //   height: 420px;
       border-radius: 11px;
       border-radius: 11px;
+
       .el-dialog__header {
       .el-dialog__header {
         border-radius: 11px 11px 0 0;
         border-radius: 11px 11px 0 0;
         background: rgba(237, 241, 245, 1);
         background: rgba(237, 241, 245, 1);
         font-weight: 600;
         font-weight: 600;
         margin: 0;
         margin: 0;
+
         .el-dialog__headerbtn {
         .el-dialog__headerbtn {
           outline: none;
           outline: none;
         }
         }
       }
       }
+
       .el-dialog__body {
       .el-dialog__body {
         padding: 30px 20px 10px 20px;
         padding: 30px 20px 10px 20px;
+
         .el-input {
         .el-input {
           width: 200px;
           width: 200px;
         }
         }
+
         .checkbox {
         .checkbox {
           .el-form-item__content {
           .el-form-item__content {
             display: flex;
             display: flex;
             flex-direction: column;
             flex-direction: column;
             align-items: flex-start;
             align-items: flex-start;
+
             .el-checkbox-group {
             .el-checkbox-group {
               display: flex;
               display: flex;
               flex-direction: column;
               flex-direction: column;
             }
             }
           }
           }
         }
         }
+
         .options {
         .options {
           .el-form-item__content {
           .el-form-item__content {
             .queding {
             .queding {
               margin-left: 20px;
               margin-left: 20px;
               color: #fff;
               color: #fff;
             }
             }
+
             display: flex;
             display: flex;
             flex-direction: row-reverse;
             flex-direction: row-reverse;
           }
           }
         }
         }
       }
       }
     }
     }
+
     // 添加区域弹窗样式
     // 添加区域弹窗样式
     :deep(.addAreaM) {
     :deep(.addAreaM) {
       //   height: 420px;
       //   height: 420px;
       border-radius: 11px;
       border-radius: 11px;
+
       .el-dialog__header {
       .el-dialog__header {
         border-radius: 11px 11px 0 0;
         border-radius: 11px 11px 0 0;
         background: rgba(237, 241, 245, 1);
         background: rgba(237, 241, 245, 1);
         font-weight: 600;
         font-weight: 600;
         margin: 0;
         margin: 0;
+
         .el-dialog__headerbtn {
         .el-dialog__headerbtn {
           outline: none;
           outline: none;
         }
         }
       }
       }
+
       .el-dialog__body {
       .el-dialog__body {
         padding: 30px 20px 10px 20px;
         padding: 30px 20px 10px 20px;
+
         .el-input {
         .el-input {
           width: 200px;
           width: 200px;
         }
         }
+
         .checkbox {
         .checkbox {
           .el-form-item__content {
           .el-form-item__content {
             display: flex;
             display: flex;
             flex-direction: column;
             flex-direction: column;
             align-items: flex-start;
             align-items: flex-start;
+
             .el-checkbox-group {
             .el-checkbox-group {
               display: flex;
               display: flex;
               flex-direction: column;
               flex-direction: column;
             }
             }
           }
           }
         }
         }
+
         .options {
         .options {
           .el-form-item__content {
           .el-form-item__content {
             .queding {
             .queding {
               margin-left: 20px;
               margin-left: 20px;
               color: #fff;
               color: #fff;
             }
             }
+
             display: flex;
             display: flex;
             flex-direction: row-reverse;
             flex-direction: row-reverse;
           }
           }
@@ -1350,37 +1280,45 @@ onUnmounted(() => {
     :deep(.addStaff) {
     :deep(.addStaff) {
       //   height: 420px;
       //   height: 420px;
       border-radius: 11px;
       border-radius: 11px;
+
       .el-dialog__header {
       .el-dialog__header {
         border-radius: 11px 11px 0 0;
         border-radius: 11px 11px 0 0;
         background: rgba(237, 241, 245, 1);
         background: rgba(237, 241, 245, 1);
         font-weight: 600;
         font-weight: 600;
         margin: 0;
         margin: 0;
+
         .el-dialog__headerbtn {
         .el-dialog__headerbtn {
           outline: none;
           outline: none;
         }
         }
       }
       }
+
       .el-dialog__body {
       .el-dialog__body {
         padding: 30px 20px 10px 20px;
         padding: 30px 20px 10px 20px;
+
         .el-input {
         .el-input {
           width: 200px;
           width: 200px;
         }
         }
+
         .checkbox {
         .checkbox {
           .el-form-item__content {
           .el-form-item__content {
             display: flex;
             display: flex;
             flex-direction: column;
             flex-direction: column;
             align-items: flex-start;
             align-items: flex-start;
+
             .el-checkbox-group {
             .el-checkbox-group {
               display: flex;
               display: flex;
               flex-direction: column;
               flex-direction: column;
             }
             }
           }
           }
         }
         }
+
         .options {
         .options {
           .el-form-item__content {
           .el-form-item__content {
             .queding {
             .queding {
               margin-left: 20px;
               margin-left: 20px;
               color: #fff;
               color: #fff;
             }
             }
+
             display: flex;
             display: flex;
             flex-direction: row-reverse;
             flex-direction: row-reverse;
           }
           }
@@ -1388,10 +1326,12 @@ onUnmounted(() => {
       }
       }
     }
     }
   }
   }
+
   // 加号图片样式
   // 加号图片样式
   :deep(.el-table .el-table__expand-icon) {
   :deep(.el-table .el-table__expand-icon) {
     margin: 0 4px 0 0px;
     margin: 0 4px 0 0px;
   }
   }
+
   // 有子节点 未展开
   // 有子节点 未展开
   :deep(.el-table .el-table__expand-icon:before) {
   :deep(.el-table .el-table__expand-icon:before) {
     background: url("@/assets/close.png") no-repeat;
     background: url("@/assets/close.png") no-repeat;
@@ -1403,6 +1343,7 @@ onUnmounted(() => {
     background-size: 16px;
     background-size: 16px;
     transform: translateY(-2px);
     transform: translateY(-2px);
   }
   }
+
   // 有子节点 且已展开
   // 有子节点 且已展开
   :deep(.el-table .el-table__expand-icon--expanded:before) {
   :deep(.el-table .el-table__expand-icon--expanded:before) {
     background: url("@/assets/open.png") no-repeat;
     background: url("@/assets/open.png") no-repeat;
@@ -1413,6 +1354,7 @@ onUnmounted(() => {
     font-size: 16px;
     font-size: 16px;
     background-size: 16px;
     background-size: 16px;
   }
   }
+
   // 没有子节点
   // 没有子节点
   :deep(.el-table .el-table__placeholder) {
   :deep(.el-table .el-table__placeholder) {
     content: "";
     content: "";
@@ -1423,49 +1365,61 @@ onUnmounted(() => {
     background-size: 16px;
     background-size: 16px;
     // margin-right: 40px;
     // margin-right: 40px;
   }
   }
+
   // 展开折叠时不进行动画,否则图标会旋转
   // 展开折叠时不进行动画,否则图标会旋转
   :deep(.el-table .el-table__expand-icon--expanded) {
   :deep(.el-table .el-table__expand-icon--expanded) {
     transform: none;
     transform: none;
   }
   }
+
   .pageSize {
   .pageSize {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: space-between;
     justify-content: space-between;
     margin: 0 30px;
     margin: 0 30px;
+
     span {
     span {
       color: #000;
       color: #000;
     }
     }
+
     .el-pagination {
     .el-pagination {
+
       // width: 1600px;
       // width: 1600px;
       :deep(.el-pagination__total) {
       :deep(.el-pagination__total) {
         color: #000;
         color: #000;
       }
       }
+
       :deep(.el-pagination__goto) {
       :deep(.el-pagination__goto) {
         color: #000;
         color: #000;
       }
       }
+
       :deep(.el-pagination__classifier) {
       :deep(.el-pagination__classifier) {
         color: #000;
         color: #000;
       }
       }
+
       :deep(.el-input__wrapper) {
       :deep(.el-input__wrapper) {
         border: 1px solid rgba(0, 0, 0, 1);
         border: 1px solid rgba(0, 0, 0, 1);
         border-radius: 5px;
         border-radius: 5px;
         box-shadow: none;
         box-shadow: none;
       }
       }
+
       :deep(.el-pager li) {
       :deep(.el-pager li) {
         margin: 0 5px;
         margin: 0 5px;
         border: 1px solid rgba(0, 0, 0, 1);
         border: 1px solid rgba(0, 0, 0, 1);
         border-radius: 5px;
         border-radius: 5px;
         background-color: transparent;
         background-color: transparent;
       }
       }
+
       :deep(.el-pager li.is-active) {
       :deep(.el-pager li.is-active) {
         background-color: rgba(111, 182, 184, 1);
         background-color: rgba(111, 182, 184, 1);
       }
       }
+
       :deep(.btn-prev) {
       :deep(.btn-prev) {
         margin-right: 5px;
         margin-right: 5px;
         border: 1px solid rgba(0, 0, 0, 1);
         border: 1px solid rgba(0, 0, 0, 1);
         border-radius: 5px;
         border-radius: 5px;
         background-color: transparent;
         background-color: transparent;
       }
       }
+
       :deep(.btn-next) {
       :deep(.btn-next) {
         margin-left: 5px;
         margin-left: 5px;
         border: 1px solid rgba(0, 0, 0, 1);
         border: 1px solid rgba(0, 0, 0, 1);
@@ -1475,6 +1429,7 @@ onUnmounted(() => {
     }
     }
   }
   }
 }
 }
+
 .el-input {
 .el-input {
   width: 192px;
   width: 192px;
 }
 }

+ 38 - 16
src/views/consumable/consumable.vue

@@ -19,7 +19,14 @@
               end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :prefix-icon="Calendar"
               end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :prefix-icon="Calendar"
               placeholder="请选择日期" />
               placeholder="请选择日期" />
           </div>
           </div>
-
+          <div class="condition">
+            <span>校区 : </span>
+            <el-select v-model="searchInput.schoolId" class="m-2" placeholder="请选择校区" @change="selSchool">
+              <el-option label="全部校区" :value="0" />
+              <el-option label="黄家湖校区" :value="1" />
+              <el-option label="墨轩湖校区" :value="2" />
+            </el-select>
+          </div>
           <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
           <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
             @click="searchBtn"><el-icon>
             @click="searchBtn"><el-icon>
               <Search />
               <Search />
@@ -44,21 +51,22 @@
           border: 0,
           border: 0,
         }">
         }">
           <!-- <el-table-column align="center" type="selection" width="80" /> -->
           <!-- <el-table-column align="center" type="selection" width="80" /> -->
+          <el-table-column width="80" align="center" type="index" prop="1" label="序号" />
+          <el-table-column width="220" align="center" prop="name" label="品名" />
+          <el-table-column align="center" prop="price" label="单价(元)" />
           <el-table-column width="150" align="center " label="校区">
           <el-table-column width="150" align="center " label="校区">
             <template #default="{ row }">
             <template #default="{ row }">
               <span>{{ row.schoolId == 1 ? "黄家湖校区" : "墨轩湖校区" }}</span>
               <span>{{ row.schoolId == 1 ? "黄家湖校区" : "墨轩湖校区" }}</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column width="220" align="center" prop="name" label="耗材名称" />
-          <el-table-column width="250" align="center" prop="content" show-overflow-tooltip label="耗材内容" />
-          <el-table-column align="center" prop="price" label="单价(元)" />
+          <!-- <el-table-column width="250" align="center" prop="content" show-overflow-tooltip label="耗材内容" />
           <el-table-column align="center" show-overflow-tooltip label="关联物品种类" width="250">
           <el-table-column align="center" show-overflow-tooltip label="关联物品种类" width="250">
             <template #default="{ row }">
             <template #default="{ row }">
               <span v-if="row.articleNames">{{
               <span v-if="row.articleNames">{{
                 row.articleNames.join(",")
                 row.articleNames.join(",")
               }}</span>
               }}</span>
             </template>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column align="center" prop="userName" label="录入人" />
           <el-table-column align="center" prop="userName" label="录入人" />
           <el-table-column align="center" prop="updateTime" label="创建时间" />
           <el-table-column align="center" prop="updateTime" label="创建时间" />
           <el-table-column align="center" label="操作" width="220">
           <el-table-column align="center" label="操作" width="220">
@@ -202,7 +210,14 @@
               start-placeholder="起始时间" end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
               start-placeholder="起始时间" end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
               :prefix-icon="Calendar" placeholder="请选择日期" />
               :prefix-icon="Calendar" placeholder="请选择日期" />
           </div>
           </div>
-
+          <div class="condition">
+            <span>校区 : </span>
+            <el-select v-model="searchInput2.schoolId" class="m-2" placeholder="请选择校区" @change="selSchool">
+              <el-option label="全部校区" :value="0" />
+              <el-option label="黄家湖校区" :value="1" />
+              <el-option label="墨轩湖校区" :value="2" />
+            </el-select>
+          </div>
           <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
           <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
             @click="searchBtn"><el-icon>
             @click="searchBtn"><el-icon>
               <Search />
               <Search />
@@ -223,13 +238,17 @@
             border: 0,
             border: 0,
           }">
           }">
           <!-- <el-table-column align="center" type="selection" width="80" /> -->
           <!-- <el-table-column align="center" type="selection" width="80" /> -->
-          <el-table-column width="150" align="center " type="index" label="序号" />
-          <el-table-column align="center" prop="consumeName" label="耗材名称" />
-          <el-table-column align="center" prop="price" label="单价(元)" />
-          <el-table-column align="center" prop="number" label="数量" />
-          <el-table-column align="center" prop="totalPrice" label="金额(元)" />
-          <el-table-column align="center" prop="articleName" label="关联故障种类" />
-          <el-table-column align="center" prop="recordNo" label="工单" />
+          <el-table-column width="80" align="center " type="index" label="序号" />
+          <el-table-column align="center" prop="schoolName" label="校区" />
+          <el-table-column align="center" prop="areaName" label="区域" width="210" />
+          <el-table-column align="center" prop="consumeName" width="150" show-overflow-tooltip label="品名" />
+          <el-table-column align="center" prop="price" label="单价(元)" width="90" />
+          <el-table-column align="center" prop="number" label="数量" width="80" />
+          <el-table-column align="center" prop="totalPrice" label="金额(元)" width="90" />
+          <!-- <el-table-column align="center" prop="articleName" label="关联故障种类" /> -->
+          <el-table-column align="center" prop="statu" label="状态" width="90" />
+          <el-table-column align="center" prop="changeUser" label="改价人" />
+          <el-table-column align="center" prop="recordNo" label="工单" width="150" />
           <el-table-column align="center" prop="reportTime" label="报修时间" />
           <el-table-column align="center" prop="reportTime" label="报修时间" />
           <el-table-column align="center" prop="updateTime" label="维修时间" />
           <el-table-column align="center" prop="updateTime" label="维修时间" />
         </el-table>
         </el-table>
@@ -269,7 +288,7 @@ const router = useRouter();
 const tableData = reactive({ list: [] });
 const tableData = reactive({ list: [] });
 const tableData2 = reactive({ list: [] });
 const tableData2 = reactive({ list: [] });
 
 
-const themeIndex = ref(1); // 切换 耗材管理 和 耗材记录
+const themeIndex = ref(2); // 切换 耗材管理 和 耗材记录
 
 
 // 添加耗材 弹窗数据 (------------------------------------)
 // 添加耗材 弹窗数据 (------------------------------------)
 const dialongTitle = ref("添加耗材"); // 弹窗标题
 const dialongTitle = ref("添加耗材"); // 弹窗标题
@@ -283,10 +302,12 @@ const articleIdsRef = ref(); // 关联物品种类ref
 const searchInput = reactive({
 const searchInput = reactive({
   name: "",
   name: "",
   createTime: "",
   createTime: "",
+  schoolId: ""
 }); // 搜索按钮数据
 }); // 搜索按钮数据
 const searchInput2 = reactive({
 const searchInput2 = reactive({
   name: "",
   name: "",
   createTime: "",
   createTime: "",
+  schoolId: ""
 }); // 搜索按钮数据
 }); // 搜索按钮数据
 5;
 5;
 // 耗材管理页面(---------------------------------------------)
 // 耗材管理页面(---------------------------------------------)
@@ -387,7 +408,8 @@ const getList = async (flag) => {
         message: res.data.message,
         message: res.data.message,
         center: true,
         center: true,
       });
       });
-      if (res.data.message == "token错误") {
+      if (res.data.code == 570) {
+        sessionStorage.removeItem("token")
         router.push({
         router.push({
           path: `/login`,
           path: `/login`,
         });
         });
@@ -907,7 +929,7 @@ const handleCurrentChange2 = (value) => {
 
 
 onBeforeMount(() => {
 onBeforeMount(() => {
   api.value = store.state.user.api;
   api.value = store.state.user.api;
-  getList(1);
+  getList(themeIndex.value);
 });
 });
 onUnmounted(() => {
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
   // document.removeEventListener("keyup", Enters);

+ 973 - 0
src/views/evaluate/evaluate copy1.vue

@@ -0,0 +1,973 @@
+<template>
+  <div class="content-box">
+    <div class="left">
+      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
+      <span class="cameratxt">评价管理</span>
+    </div>
+
+    <div class="middle">
+      <div class="filter">
+        <div class="condition">
+          <span>关键字 : </span>
+          <el-input :clearable="true" v-model="searchInput.keyWord" class="w-50 m-2" placeholder="请输入工单号或姓名"
+            style="width: 180px" />
+        </div>
+        <div class="condition">
+          <span>评价时间 : </span>
+          <el-date-picker v-model="searchInput.createTime" type="daterange" range-separator="-" start-placeholder="起始时间"
+            end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :prefix-icon="Calendar"
+            placeholder="请选择日期" :clearable="true" />
+        </div>
+
+        <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
+          @click="searchBtn"><el-icon>
+            <Search />
+          </el-icon> <span>查询</span></el-button>
+        <el-button v-print="print">点击打开打印预览</el-button>
+      </div>
+      <!-- 按钮列表 -->
+      <div class="gongneng">
+        <el-button color="rgba(111, 182, 184, 1)" class="import" type="primary" @click="importExcel"><img
+            src="@/assets/import.png" style="width: 14px; height: 14px; margin-right: 4px" alt="" />
+          <span>导出表单</span></el-button>
+      </div>
+    </div>
+    <div class="footer" id="printWrapper">
+      <el-table :row-class-name="tableRowClassName" :data="tableData.list" style="width: 100%" :header-cell-style="{
+        background: 'rgba(240, 243, 247, 1)',
+        height: '50px',
+        border: 0,
+      }">
+        <el-table-column align="center" width="180" prop="recordNo" label="工单编号" />
+        <el-table-column align="center" prop="userName" label="姓名" />
+        <el-table-column align="center" prop="userPhone" label="电话" />
+        <el-table-column align="center" width="180" prop="description" label="故障描述" show-overflow-tooltip />
+        <el-table-column align="center" width="170" prop="reportTime" label="报修时间" />
+        <el-table-column align="center" prop="maintenancerName" label="技术员" />
+        <el-table-column align="center" label="评价星级" width="160">
+          <template #default="{ row, index }">
+            <el-rate v-model="row.star" allow-half color="rgba(234, 149, 24, 1)" size="large" disabled
+              disabled-void-color="rgba(179, 179, 179, 1)" />
+          </template>
+        </el-table-column>
+        <el-table-column align="center" width="160" show-overflow-tooltip prop="content" label="评价内容" />
+        <el-table-column align="center" prop="createTime" width="180" label="评价时间" />
+        <el-table-column align="center" label="操作" width="220">
+          <template #default="scope">
+            <div class="edit">
+              <div class="look" @click="orderInfo(scope.row)">详情</div>
+              <el-popconfirm width="220" confirm-button-text="确认" cancel-button-text="取消" :icon="InfoFilled"
+                icon-color="#f89626" title="是否删除这条评价?" @confirm="confirmEvent(scope.row)" @cancel="cancelEvent">
+                <template #reference>
+                  <div class="look">删除</div>
+                </template>
+              </el-popconfirm>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 详情弹窗 -->
+    <el-dialog class="orderInfo" v-model="orderInfoVisible" :close-on-click-modal="false" :close-on-press-escape="false"
+      title="评价详情" align-center width="760" :before-close="cancelOrderInfo">
+      <div class="order_info">
+        <!-- 工单详情 工单信息 -->
+        <div class="title">
+          <img src="@/assets/orderInfo.png" alt="" />
+          <span>工单信息</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">工单编号:</div><span>{{ orderInfoData.recordNo }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修姓名:</div><span>{{ orderInfoData.userName }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修电话:</div><span>{{ orderInfoData.userPhone }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">故障类型:</div><span>{{ orderInfoData.articleName }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">故障描述:</div><span>{{ orderInfoData.description }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修区域:</div><span>{{ orderInfoData.areaName }}{{ orderInfoData.address }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修录音:</div>
+          <div class="audio" @click="bofang">
+            <img src="@/assets/audio.png" alt="" />
+            <div class="audioNum">{{ orderInfoData.voiceLength }}"</div>
+            <!-- <button class="butt" @click="bofang">确认</button> -->
+            <audio ref="audio" class="aud" :src="orderInfoData.voice"></audio>
+          </div>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修时间:</div><span>{{ orderInfoData.reportTime }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">评价内容:</div><span>{{ orderInfoData.content }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">评价时间:</div><span>{{ orderInfoData.createTime }}</span>
+        </div>
+        <div class="workNums">
+          <div class="titles">评价星级:</div>
+          <el-rate v-model="orderInfoData.star" allow-half color="rgba(234, 149, 24, 1)" size="large" disabled
+            disabled-void-color="rgba(179, 179, 179, 1)" />
+        </div>
+        <!-- 工单详情 报修进度 -->
+        <div class="title">
+          <img src="@/assets/repairsInfo.png" alt="" />
+          <span>报修进度</span>
+        </div>
+        <!-- <div class="workNum">
+            <span class="titles">维修总时长:</span
+            ><span>{{ orderInfoData.totalTime }}</span>
+          </div>
+          <div class="workNum">
+            <span class="titles">维修耗时:</span
+            ><span>{{ orderInfoData.time }}</span>
+          </div> -->
+        <div class="steps">
+          <el-steps direction="vertical" :active="orderInfoData.tracks.length">
+            <el-step v-for="(i, index) in orderInfoData.tracks">
+              <template v-slot:icon>
+                <img style="width: 20px; height: 20px" src="@/assets/step_common.png" alt="" />
+              </template>
+              <template v-slot:title>
+                <span>{{ i.state }}</span>
+              </template>
+              <template v-slot:description>
+                <div class="content">
+                  <span>[{{ i.userZzstr }}]{{ i.userName }}{{ i.userPhone }}
+                    {{ i.createTime }}</span>
+                </div>
+                <div>
+                  <div>{{ i.content }}</div>
+                  <!-- 评价图片 -->
+                  <div v-if="i.images" class="evaluateImg">
+                    <div v-for="(item, index) in i.images">
+                      <img @click="lookImg(item)" :key="index" :src="item" alt="" />
+                    </div>
+                  </div>
+                  <!-- 评价录音 -->
+                  <div v-if="i.voice" class="audio" @click="audioPlay(i)">
+                    <img src="@/assets/audio.png" alt="" />
+                    <div class="audioNum">{{ i.voiceLength }}"</div>
+                    <!-- <button class="butt" @click="bofang">确认</button> -->
+                    <audio :id="`audio${i.id}`" class="aud" :src="i.voice"></audio>
+                  </div>
+                </div>
+              </template>
+            </el-step>
+          </el-steps>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 分页组件 -->
+    <div class="pageSize">
+      <span></span>
+      <el-pagination background :current-page="currentPage" :page-size="pageSize"
+        layout="total, prev, pager, next, jumper, slot" :total="total" @update:current-page="handleCurrentChange" />
+    </div>
+    <div class="bgImg" v-if="bgImg">
+      <img @click="bgImg = false" :src="bgImgurl" alt="" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, nextTick, onBeforeMount, onUnmounted } from "vue";
+import { useRouter } from "vue-router";
+import { ElMessage, ElMessageBox } from "element-plus";
+import { Calendar } from "@element-plus/icons-vue";
+import vidiconsApi from "@/api/vidicons.js";
+import { dayjs } from "element-plus";
+import lodash from "lodash";
+import axios from "axios";
+import { useStore } from "vuex";
+const store = useStore();
+const api = ref("");
+const router = useRouter();
+// 表格数据
+const tableData = reactive({ list: [] });
+
+// 详情   (-----------------------------------------------)
+const orderInfoVisible = ref(false); // 控制工单详情
+// 录音
+const audio = ref();
+const orderInfoData = ref({
+  recordNo: "", // 工单编号
+  userName: "", // 报修姓名
+  userPhone: "", // 报修电话
+  articleName: "", // 故障类型
+  description: "", // 故障描述
+  articleId: "", // 报修类型
+  address: "", // 报修区域
+  areaName: "",// 报修校区地址
+  voice: "", // 报修录音
+  voiceLength: "", // 报修录音时长
+  reportTime: "", // 报修时间
+  totalTime: "", // 维修总时长
+  time: "", // 维修耗时
+  content: "", // 评价内容
+  createTime: "", // 评价时间
+  star: "", // 评价星级
+  tracks: [],
+});
+const bgImg = ref(false)// 点击查看图片
+const bgImgurl = ref() // 点击查看图片地址
+
+const searchInput = reactive({
+  keyWord: "",
+  createTime: "",
+}); // 搜索按钮数据
+
+// 打印功能
+const print = ref({
+  id: 'printWrapper',//这里的id就是上面我们的打印区域id,实现指哪打哪
+  popTitle: '配置页眉标题', // 打印配置页上方的标题
+  extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>',
+  extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
+  preview: false, // 是否启动预览模式,默认是false
+  previewTitle: '预览的标题', // 打印预览的标题
+  previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印
+  zIndex: 20020, // 预览窗口的z-index,默认是20002,最好比默认值更高
+  previewBeforeOpenCallback() { console.log('正在加载预览窗口!'); }, // 预览窗口打开之前的callback
+  previewOpenCallback() { console.log('已经加载完预览窗口,预览打开了!') }, // 预览窗口打开时的callback
+  beforeOpenCallback() { console.log('开始打印之前!') }, // 开始打印之前的callback
+  openCallback() { console.log('执行打印了!') }, // 调用打印时的callback
+  closeCallback() { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
+  clickMounted() { console.log('点击v-print绑定的按钮了!') },
+})
+
+const currentPage = ref(1); // 当前页
+const pageSize = ref(10);
+const total = ref(); // 当前总数
+
+// 查看评价数据列表
+const getList = async (message) => {
+  // let data = new FormData();
+  // if (searchInput.createTime == null) {
+  //   searchInput.createTime = "";
+  // }
+  // data.set("car_number", searchInput.carnumber);
+  // data.set("create_time", searchInput.createTime); //前面的key记得对应!
+  // data.set("page", currentPage.value);
+  // data.set("rows", pageSize.value); //前面的key记得对应!
+  // let res = await adminApi.adminLogin(data);
+  let data;
+  if (searchInput.createTime) {
+    data = {
+      currentPage: currentPage.value, // 当前页
+      pageCount: pageSize.value, // 一页数据条数
+      keyWord: searchInput.keyWord, // 关键字
+      startTime: searchInput.createTime[0],
+      endTime: searchInput.createTime[1],
+    };
+  } else {
+    data = {
+      currentPage: currentPage.value, // 当前页
+      pageCount: pageSize.value, // 一页数据条数
+      keyWord: searchInput.keyWord, // 关键字
+    };
+  }
+
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairEvaluate/queryPageRepairEvaluate",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "评价数据");
+  if (res.data.code == 200) {
+    tableData.list = res.data.data.list;
+    if (message) {
+      ElMessage({
+        type: "success",
+        showClose: true,
+        message: message,
+        center: true,
+      });
+    }
+    // currentPage.value = res.data.currentPage;
+    total.value = res.data.data.totalCount;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
+// 搜索功能
+const searchBtn = lodash.debounce(async () => {
+  getList("查询成功");
+}, 300);
+
+// 工单详情按钮  (工单详情-----------------------------------)
+const orderInfo = async (row) => {
+  orderInfoVisible.value = true;
+  orderInfoData.value.createTime = row.createTime;
+  orderInfoData.value.star = row.star;
+  orderInfoData.value.content = row.content;
+  let data = { recordId: row.recordId };
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairRecord/details",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "详情数据");
+  if (res.data.code == 200) {
+    orderInfoData.value.recordNo = res.data.data.recordNo;
+    orderInfoData.value.userName = res.data.data.userName;
+    orderInfoData.value.userPhone = res.data.data.userPhone;
+    orderInfoData.value.description = res.data.data.description;
+    orderInfoData.value.address = res.data.data.address;
+    orderInfoData.value.areaName = res.data.data.areaName;
+    orderInfoData.value.articleName = res.data.data.articleName;
+    orderInfoData.value.voice = res.data.data.voice;
+    orderInfoData.value.voiceLength = res.data.data.voiceLength;
+    orderInfoData.value.reportTime = res.data.data.reportTime;
+    orderInfoData.value.totalTime = res.data.data.totalTime;
+    orderInfoData.value.time = res.data.data.time;
+    orderInfoData.value.tracks = res.data.data.tracks;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 取消工单详情按钮
+const cancelOrderInfo = () => {
+  orderInfoVisible.value = false;
+};
+// 工单详情 点击音频
+const bofang = () => {
+  orderInfoData.value.tracks.forEach((item) => {
+    // console.log(item.id);
+    let audioId = document.getElementById(`audio${item.id}`);
+    if (item.voice) {
+      // console.log(item.id);
+      audioId.load();
+    }
+  });
+  console.log(audio.value.duration, "音频总时长");
+  // audio.value.pause(); //  暂停pause
+
+  if (audio.value.paused == true) {
+    audio.value.play();
+  } else {
+    audio.value.pause();
+  }
+};
+
+// 步骤条中的播放
+const audioPlay = (i) => {
+  audio.value.load();
+  orderInfoData.value.tracks.forEach((item) => {
+    // console.log(item.id);
+    let audioId = document.getElementById(`audio${item.id}`);
+    if (item.voice) {
+      // console.log(item.id);
+      audioId.load();
+    }
+  });
+  let audioId = document.getElementById(`audio${i.id}`);
+  // console.log(audioId, i.state);
+  if (audioId.paused == true) {
+    audioId.play();
+  } else {
+    audioId.pause();
+    // clearInterval(timer);
+    // timer = null;
+  }
+};
+// 点击工单步骤中的图片查看
+const lookImg = (item) => {
+  bgImg.value = true
+  bgImgurl.value = item
+}
+
+// 工单详情删除按钮  (工单详情-----------------------------------)
+// const orderInfo = (row) => {
+//   orderInfoVisible.value = true;
+//   orderInfoData.list = row;
+// };
+
+// // 取消工单详情按钮
+// const cancelOrderInfo = () => {
+//   orderInfoVisible.value = false;
+// };
+// // 工单详情 点击音频
+// const bofang = () => {
+//   let music1 = new Audio();
+//   music1 = gaobai;
+//   audio.value.src = music1;
+//   // imgUrl.value = "@/assets/gaobai.mp3";
+//   audio.value.play();
+// };
+// 删除评价功能  (--------------------------------------------------)
+
+// 确定删除
+const confirmEvent = async (row) => {
+  let data = {
+    id: row.id,
+  };
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairEvaluate/deleteRepairEvaluateById",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "删除评价成功");
+  if (res.data.code == 200) {
+    if (tableData.list.length == 1 && currentPage.value != 1) {
+      currentPage.value = currentPage.value - 1;
+    }
+    getList();
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 取消删除
+const cancelEvent = () => {
+  ElMessage({
+    type: "info",
+    showClose: true,
+    message: "取消删除",
+    center: true,
+  });
+};
+
+//导出功能
+const importExcel = async () => {
+  let datas = {
+    keyWord: searchInput.keyWord, // 关键字
+  };
+  if (searchInput.createTime) {
+    datas.startTime = searchInput.createTime[0];
+    datas.endTime = searchInput.createTime[1];
+  }
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairEvaluate/toRepairEvaluateExcel",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: datas,
+    responseType: "blob",
+  });
+  console.log(res, "导出评价表单");
+  if (res.status == 200) {
+    let name = `评价管理表单`;
+    var content = res.data;
+    // var data = new Blob([content],{type:"application/octet-stream;charset=utf-8"});
+    // var data = new Blob([content], {
+    //   type: "application/vnd.ms-excel;charset=utf-8",
+    // });
+    var data = new Blob([content]);
+    var downloadUrl = window.URL.createObjectURL(data);
+    var anchor = document.createElement("a");
+    anchor.href = downloadUrl;
+    anchor.download = name + ".xlsx";
+    anchor.click();
+    window.URL.revokeObjectURL(data);
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: "导出成功",
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: "导出失败",
+      center: true,
+    });
+  }
+};
+// 表格斑马纹颜色修改
+const tableRowClassName = ({ row, rowIndex }) => {
+  if (rowIndex % 2 === 0) {
+    return "even";
+  } else if (rowIndex % 2 !== 0) {
+    return "odd";
+  }
+  return "";
+};
+// 分页
+const handleCurrentChange = (value) => {
+  // console.log(value);
+  currentPage.value = value;
+  getList();
+};
+
+onBeforeMount(() => {
+  api.value = store.state.user.api;
+  getList();
+});
+onUnmounted(() => {
+  // document.removeEventListener("keyup", Enters);
+});
+</script>
+
+<style scoped lang="scss">
+// 去掉打印的页眉页脚
+@page {
+  size: auto;
+  margin: 0mm;
+}
+
+
+.content-box {
+  width: 97.5%;
+  height: 89%;
+  margin: 20px auto;
+  background-color: #fff;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+  box-shadow: 0px 3px 10px rgba(213, 228, 252, 1);
+
+  .left {
+    // width: calc(100wh - 40px);
+    display: flex;
+    align-items: center;
+    height: 60px;
+    margin: 0 30px;
+    border-bottom: 1px solid #ccc;
+    color: rgb(0, 0, 0);
+    font-size: 18px;
+    font-weight: 600;
+
+    span {
+      margin-right: 20px;
+      cursor: pointer;
+    }
+
+    .is_active {
+      color: rgba(111, 182, 184, 1);
+    }
+  }
+
+  .middle {
+    width: 96%;
+    margin: 0 auto;
+
+    color: #000;
+
+    // border-bottom: 1px solid rgb(231, 231, 231);
+    .filter {
+      display: flex;
+      flex-wrap: wrap;
+      align-items: center;
+      margin: 10px 0 0 0;
+
+      .search {
+        color: #fff;
+      }
+
+      .condition {
+        display: flex;
+        align-items: center;
+        margin: 10px 30px 10px 0;
+
+        :deep(.el-input .el-input__inner) {
+          font-size: 16px;
+        }
+
+        span {
+          margin: 0 10px 0 0;
+        }
+      }
+    }
+
+    .gongneng {
+      margin: 10px 0 15px 0;
+
+      span {
+        color: #fff;
+      }
+    }
+
+    :deep(.cont) {
+      width: 60%;
+      margin: 20px auto;
+    }
+
+    :deep(.download) {
+      display: flex;
+      align-items: center;
+      margin: 10px;
+    }
+
+    :deep(.download span) {
+      font-size: 16px;
+      margin-left: 20px;
+    }
+
+    :deep(.cont .el-button) {
+      margin-left: 60px;
+      margin-bottom: 30px;
+    }
+
+    :deep(.cont .accomplish) {
+      width: 100%;
+      display: flex;
+      justify-content: center;
+    }
+
+    :deep(.cont .accomplish .el-button) {
+      width: 50%;
+      margin: 0;
+    }
+  }
+
+  .footer {
+    width: 96%;
+    height: 550px;
+    margin: 10px auto 30px;
+
+    .el-table--fit {
+      height: 100%;
+
+      :deep(.el-table__header-wrapper) {
+        background-color: #000;
+        font-size: 16px;
+
+        tr {
+          color: #000;
+        }
+      }
+
+      :deep(.el-table__row) {
+        height: 50px;
+        font-size: 16px;
+        color: #000;
+
+        .el-rate__icon {
+          //评分图标大小
+          font-size: 25px;
+        }
+      }
+
+      :deep(.el-table__row td) {
+        padding: 0;
+        border: 0;
+      }
+
+      .el-button--primary {
+        margin-left: 5px;
+      }
+
+      :deep(.el-table__body .even) {
+        background-color: #fff;
+      }
+
+      :deep(.el-table__body .odd) {
+        background-color: rgba(240, 243, 247, 1);
+      }
+
+      :deep(.edit) {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        color: rgba(111, 182, 184, 1);
+      }
+
+      :deep(.look) {
+        padding: 0 10px;
+        cursor: pointer;
+      }
+
+      //   :deep(.look):hover {
+      //     color: red;
+      //   }
+    }
+  }
+
+  // 详情样式
+  :deep(.orderInfo) {
+    height: 800px;
+    overflow: hidden;
+    border-radius: 11px;
+
+    .el-dialog__header {
+      border-radius: 11px 11px 0 0;
+      background: rgba(237, 241, 245, 1);
+      font-weight: 600;
+      margin: 0;
+
+      .el-dialog__headerbtn {
+        outline: none;
+      }
+    }
+
+    .el-dialog__body {
+      height: 720px;
+      overflow: auto;
+      padding: 0px 20px 10px 20px;
+
+      .order_info {
+        .title {
+          display: flex;
+          align-items: center;
+          margin: 25px 0 10px 0;
+
+          img {
+            width: 20px;
+            height: 20px;
+            margin-right: 10px;
+          }
+
+          span {
+            color: #000;
+            font-size: 18px;
+            font-weight: 800;
+          }
+        }
+
+        // 工单详情 排列模式样式
+        .workNum {
+          display: flex;
+          align-items: center;
+          margin-bottom: 12px;
+          font-size: 16px;
+
+          .audio {
+            width: 98px;
+            height: 30px;
+            border-radius: 42.41px;
+            background: rgba(255, 255, 255, 1);
+            box-shadow: 0px 0px 1.68px rgba(0, 0, 0, 0.25);
+            display: flex;
+            align-items: center;
+            cursor: pointer;
+
+            img {
+              width: 18px;
+              height: 18px;
+              margin-left: 5px;
+            }
+
+            .audioNum {
+              font-size: 16px;
+            }
+          }
+
+          .titles {
+            color: rgba(128, 128, 128, 1);
+            font-weight: 200;
+            display: inline-block;
+            width: 80px;
+          }
+
+          span:nth-child(2) {
+            color: #000;
+            font-weight: 600;
+            width: 640px;
+          }
+        }
+
+        .workNums {
+          display: flex;
+          align-items: center;
+          margin-bottom: 12px;
+          font-size: 16px;
+
+          .el-rate__item {
+            .el-icon {
+              font-size: 25px;
+            }
+          }
+
+          .titles {
+            color: rgba(128, 128, 128, 1);
+            font-weight: 200;
+            display: inline-block;
+            width: 80px;
+          }
+        }
+
+        // 工单详情 步骤条样式
+        .steps {
+          .el-step {
+
+            // margin: 15px 0;
+            .el-step__main {
+              display: flex;
+              margin-bottom: 15px;
+
+              span {
+                font-size: 16px;
+              }
+
+              .el-step__title {
+                padding: 0 10px 0 0;
+
+                span {
+                  background-color: rgba(111, 182, 184, 1);
+                  color: #fff;
+                  padding: 1px 3px;
+                  border-radius: 3px;
+                  display: block;
+                }
+              }
+            }
+
+            .el-step__description {
+              .content {
+                margin-top: 7px;
+              }
+
+              .evaluateImg {
+                width: 500px;
+                margin: 10px 0;
+                display: flex;
+                flex-wrap: wrap;
+
+                img {
+                  width: 80px;
+                  // height: 40px;
+                  margin: 5px 10px 0 0;
+                }
+              }
+
+              .audio {
+                width: 98px;
+                height: 30px;
+                border-radius: 42.41px;
+                background: rgba(255, 255, 255, 1);
+                box-shadow: 0px 0px 1.68px rgba(0, 0, 0, 0.25);
+                display: flex;
+                align-items: center;
+                cursor: pointer;
+
+                img {
+                  width: 18px;
+                  height: 18px;
+                  margin-left: 5px;
+                }
+
+                .audioNum {
+                  font-size: 16px;
+                  color: #000;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .pageSize {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin: 0 30px;
+
+    span {
+      color: #000;
+    }
+
+    .el-pagination {
+
+      // width: 1600px;
+      :deep(.el-pagination__total) {
+        color: #000;
+      }
+
+      :deep(.el-pagination__goto) {
+        color: #000;
+      }
+
+      :deep(.el-pagination__classifier) {
+        color: #000;
+      }
+
+      :deep(.el-input__wrapper) {
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        box-shadow: none;
+      }
+
+      :deep(.el-pager li) {
+        margin: 0 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+
+      :deep(.el-pager li.is-active) {
+        background-color: rgba(111, 182, 184, 1);
+      }
+
+      :deep(.btn-prev) {
+        margin-right: 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+
+      :deep(.btn-next) {
+        margin-left: 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+    }
+  }
+
+  .bgImg {
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 99999999;
+    width: 100%;
+    height: 100%;
+    background-color: rgba(255, 255, 255, 0.8);
+    display: flex;
+    justify-content: center;
+
+    img {
+      height: 100%;
+    }
+  }
+}
+
+.el-input {
+  width: 192px;
+}
+</style>

+ 962 - 0
src/views/evaluate/evaluate copy2.vue

@@ -0,0 +1,962 @@
+<template>
+  <div class="content-box">
+    <div class="left">
+      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
+      <span class="cameratxt">评价管理</span>
+    </div>
+
+    <div class="middle">
+      <div class="filter">
+        <div class="condition">
+          <span>关键字 : </span>
+          <el-input :clearable="true" v-model="searchInput.keyWord" class="w-50 m-2" placeholder="请输入工单号或姓名"
+            style="width: 180px" />
+        </div>
+        <div class="condition">
+          <span>评价时间 : </span>
+          <el-date-picker v-model="searchInput.createTime" type="daterange" range-separator="-" start-placeholder="起始时间"
+            end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :prefix-icon="Calendar"
+            placeholder="请选择日期" :clearable="true" />
+        </div>
+
+        <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
+          @click="searchBtn"><el-icon>
+            <Search />
+          </el-icon> <span>查询</span></el-button>
+      </div>
+      <!-- 按钮列表 -->
+      <div class="gongneng">
+        <el-button color="rgba(111, 182, 184, 1)" class="import" type="primary" @click="importExcel"><img
+            src="@/assets/import.png" style="width: 14px; height: 14px; margin-right: 4px" alt="" />
+          <span>导出表单</span></el-button>
+        <el-button type="primary" @click="printBox">打印</el-button>
+      </div>
+    </div>
+    <div class="footer" id="printBox">
+      <el-table :row-class-name="tableRowClassName" :data="tableData.list" style="width: 100%" :header-cell-style="{
+        background: 'rgba(240, 243, 247, 1)',
+        height: '50px',
+        border: 0,
+      }">
+        <el-table-column align="center" width="180" prop="recordNo" label="工单编号" />
+        <el-table-column align="center" prop="userName" label="姓名" />
+        <el-table-column align="center" prop="userPhone" label="电话" />
+        <el-table-column align="center" width="180" prop="description" label="故障描述" show-overflow-tooltip />
+        <el-table-column align="center" width="170" prop="reportTime" label="报修时间" />
+        <el-table-column align="center" prop="maintenancerName" label="技术员" />
+        <el-table-column align="center" label="评价星级" width="160">
+          <template #default="{ row, index }">
+            <el-rate v-model="row.star" allow-half color="rgba(234, 149, 24, 1)" size="large" disabled
+              disabled-void-color="rgba(179, 179, 179, 1)" />
+          </template>
+        </el-table-column>
+        <el-table-column align="center" width="160" show-overflow-tooltip prop="content" label="评价内容" />
+        <el-table-column align="center" prop="createTime" width="180" label="评价时间" />
+        <el-table-column align="center" label="操作" width="220">
+          <template #default="scope">
+            <div class="edit">
+              <div class="look" @click="orderInfo(scope.row)">详情</div>
+              <el-popconfirm width="220" confirm-button-text="确认" cancel-button-text="取消" :icon="InfoFilled"
+                icon-color="#f89626" title="是否删除这条评价?" @confirm="confirmEvent(scope.row)" @cancel="cancelEvent">
+                <template #reference>
+                  <div class="look">删除</div>
+                </template>
+              </el-popconfirm>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 详情弹窗 -->
+    <el-dialog class="orderInfo" v-model="orderInfoVisible" :close-on-click-modal="false" :close-on-press-escape="false"
+      title="评价详情" align-center width="760" :before-close="cancelOrderInfo">
+      <div class="order_info">
+        <!-- 工单详情 工单信息 -->
+        <div class="title">
+          <img src="@/assets/orderInfo.png" alt="" />
+          <span>工单信息</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">工单编号:</div><span>{{ orderInfoData.recordNo }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修姓名:</div><span>{{ orderInfoData.userName }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修电话:</div><span>{{ orderInfoData.userPhone }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">故障类型:</div><span>{{ orderInfoData.articleName }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">故障描述:</div><span>{{ orderInfoData.description }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修区域:</div><span>{{ orderInfoData.areaName }}{{ orderInfoData.address }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修录音:</div>
+          <div class="audio" @click="bofang">
+            <img src="@/assets/audio.png" alt="" />
+            <div class="audioNum">{{ orderInfoData.voiceLength }}"</div>
+            <!-- <button class="butt" @click="bofang">确认</button> -->
+            <audio ref="audio" class="aud" :src="orderInfoData.voice"></audio>
+          </div>
+        </div>
+        <div class="workNum">
+          <div class="titles">报修时间:</div><span>{{ orderInfoData.reportTime }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">评价内容:</div><span>{{ orderInfoData.content }}</span>
+        </div>
+        <div class="workNum">
+          <div class="titles">评价时间:</div><span>{{ orderInfoData.createTime }}</span>
+        </div>
+        <div class="workNums">
+          <div class="titles">评价星级:</div>
+          <el-rate v-model="orderInfoData.star" allow-half color="rgba(234, 149, 24, 1)" size="large" disabled
+            disabled-void-color="rgba(179, 179, 179, 1)" />
+        </div>
+        <!-- 工单详情 报修进度 -->
+        <div class="title">
+          <img src="@/assets/repairsInfo.png" alt="" />
+          <span>报修进度</span>
+        </div>
+        <!-- <div class="workNum">
+            <span class="titles">维修总时长:</span
+            ><span>{{ orderInfoData.totalTime }}</span>
+          </div>
+          <div class="workNum">
+            <span class="titles">维修耗时:</span
+            ><span>{{ orderInfoData.time }}</span>
+          </div> -->
+        <div class="steps">
+          <el-steps direction="vertical" :active="orderInfoData.tracks.length">
+            <el-step v-for="(i, index) in orderInfoData.tracks">
+              <template v-slot:icon>
+                <img style="width: 20px; height: 20px" src="@/assets/step_common.png" alt="" />
+              </template>
+              <template v-slot:title>
+                <span>{{ i.state }}</span>
+              </template>
+              <template v-slot:description>
+                <div class="content">
+                  <span>[{{ i.userZzstr }}]{{ i.userName }}{{ i.userPhone }}
+                    {{ i.createTime }}</span>
+                </div>
+                <div>
+                  <div>{{ i.content }}</div>
+                  <!-- 评价图片 -->
+                  <div v-if="i.images" class="evaluateImg">
+                    <div v-for="(item, index) in i.images">
+                      <img @click="lookImg(item)" :key="index" :src="item" alt="" />
+                    </div>
+                  </div>
+                  <!-- 评价录音 -->
+                  <div v-if="i.voice" class="audio" @click="audioPlay(i)">
+                    <img src="@/assets/audio.png" alt="" />
+                    <div class="audioNum">{{ i.voiceLength }}"</div>
+                    <!-- <button class="butt" @click="bofang">确认</button> -->
+                    <audio :id="`audio${i.id}`" class="aud" :src="i.voice"></audio>
+                  </div>
+                </div>
+              </template>
+            </el-step>
+          </el-steps>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 分页组件 -->
+    <div class="pageSize">
+      <span></span>
+      <el-pagination background :current-page="currentPage" :page-size="pageSize"
+        layout="total, prev, pager, next, jumper, slot" :total="total" @update:current-page="handleCurrentChange" />
+    </div>
+    <div class="bgImg" v-if="bgImg">
+      <img @click="bgImg = false" :src="bgImgurl" alt="" />
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, nextTick, onBeforeMount, onUnmounted } from "vue";
+import { useRouter } from "vue-router";
+import { ElMessage, ElMessageBox } from "element-plus";
+import { Calendar } from "@element-plus/icons-vue";
+import vidiconsApi from "@/api/vidicons.js";
+import { dayjs } from "element-plus";
+import lodash from "lodash";
+import axios from "axios";
+import { useStore } from "vuex";
+import print from 'print-js'
+
+const store = useStore();
+const api = ref("");
+const router = useRouter();
+// 表格数据
+const tableData = reactive({ list: [] });
+
+// 详情   (-----------------------------------------------)
+const orderInfoVisible = ref(false); // 控制工单详情
+// 录音
+const audio = ref();
+const orderInfoData = ref({
+  recordNo: "", // 工单编号
+  userName: "", // 报修姓名
+  userPhone: "", // 报修电话
+  articleName: "", // 故障类型
+  description: "", // 故障描述
+  articleId: "", // 报修类型
+  address: "", // 报修区域
+  areaName: "",// 报修校区地址
+  voice: "", // 报修录音
+  voiceLength: "", // 报修录音时长
+  reportTime: "", // 报修时间
+  totalTime: "", // 维修总时长
+  time: "", // 维修耗时
+  content: "", // 评价内容
+  createTime: "", // 评价时间
+  star: "", // 评价星级
+  tracks: [],
+});
+const bgImg = ref(false)// 点击查看图片
+const bgImgurl = ref() // 点击查看图片地址
+
+const searchInput = reactive({
+  keyWord: "",
+  createTime: "",
+}); // 搜索按钮数据
+
+const currentPage = ref(1); // 当前页
+const pageSize = ref(10);
+const total = ref(); // 当前总数
+
+// 打印功能
+const printBox = () => {
+  setTimeout(function () {
+    print({
+      printable: 'printBox',
+      type: 'html',
+      scanStyles: false,
+      targetStyles: ['*']
+    })
+  }, 500)
+}
+
+// 查看评价数据列表
+const getList = async (message) => {
+  // let data = new FormData();
+  // if (searchInput.createTime == null) {
+  //   searchInput.createTime = "";
+  // }
+  // data.set("car_number", searchInput.carnumber);
+  // data.set("create_time", searchInput.createTime); //前面的key记得对应!
+  // data.set("page", currentPage.value);
+  // data.set("rows", pageSize.value); //前面的key记得对应!
+  // let res = await adminApi.adminLogin(data);
+  let data;
+  if (searchInput.createTime) {
+    data = {
+      currentPage: currentPage.value, // 当前页
+      pageCount: pageSize.value, // 一页数据条数
+      keyWord: searchInput.keyWord, // 关键字
+      startTime: searchInput.createTime[0],
+      endTime: searchInput.createTime[1],
+    };
+  } else {
+    data = {
+      currentPage: currentPage.value, // 当前页
+      pageCount: pageSize.value, // 一页数据条数
+      keyWord: searchInput.keyWord, // 关键字
+    };
+  }
+
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairEvaluate/queryPageRepairEvaluate",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "评价数据");
+  if (res.data.code == 200) {
+    tableData.list = res.data.data.list;
+    if (message) {
+      ElMessage({
+        type: "success",
+        showClose: true,
+        message: message,
+        center: true,
+      });
+    }
+    // currentPage.value = res.data.currentPage;
+    total.value = res.data.data.totalCount;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+
+// 搜索功能
+const searchBtn = lodash.debounce(async () => {
+  getList("查询成功");
+}, 300);
+
+// 工单详情按钮  (工单详情-----------------------------------)
+const orderInfo = async (row) => {
+  orderInfoVisible.value = true;
+  orderInfoData.value.createTime = row.createTime;
+  orderInfoData.value.star = row.star;
+  orderInfoData.value.content = row.content;
+  let data = { recordId: row.recordId };
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairRecord/details",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "详情数据");
+  if (res.data.code == 200) {
+    orderInfoData.value.recordNo = res.data.data.recordNo;
+    orderInfoData.value.userName = res.data.data.userName;
+    orderInfoData.value.userPhone = res.data.data.userPhone;
+    orderInfoData.value.description = res.data.data.description;
+    orderInfoData.value.address = res.data.data.address;
+    orderInfoData.value.areaName = res.data.data.areaName;
+    orderInfoData.value.articleName = res.data.data.articleName;
+    orderInfoData.value.voice = res.data.data.voice;
+    orderInfoData.value.voiceLength = res.data.data.voiceLength;
+    orderInfoData.value.reportTime = res.data.data.reportTime;
+    orderInfoData.value.totalTime = res.data.data.totalTime;
+    orderInfoData.value.time = res.data.data.time;
+    orderInfoData.value.tracks = res.data.data.tracks;
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 取消工单详情按钮
+const cancelOrderInfo = () => {
+  orderInfoVisible.value = false;
+};
+// 工单详情 点击音频
+const bofang = () => {
+  orderInfoData.value.tracks.forEach((item) => {
+    // console.log(item.id);
+    let audioId = document.getElementById(`audio${item.id}`);
+    if (item.voice) {
+      // console.log(item.id);
+      audioId.load();
+    }
+  });
+  console.log(audio.value.duration, "音频总时长");
+  // audio.value.pause(); //  暂停pause
+
+  if (audio.value.paused == true) {
+    audio.value.play();
+  } else {
+    audio.value.pause();
+  }
+};
+
+// 步骤条中的播放
+const audioPlay = (i) => {
+  audio.value.load();
+  orderInfoData.value.tracks.forEach((item) => {
+    // console.log(item.id);
+    let audioId = document.getElementById(`audio${item.id}`);
+    if (item.voice) {
+      // console.log(item.id);
+      audioId.load();
+    }
+  });
+  let audioId = document.getElementById(`audio${i.id}`);
+  // console.log(audioId, i.state);
+  if (audioId.paused == true) {
+    audioId.play();
+  } else {
+    audioId.pause();
+    // clearInterval(timer);
+    // timer = null;
+  }
+};
+// 点击工单步骤中的图片查看
+const lookImg = (item) => {
+  bgImg.value = true
+  bgImgurl.value = item
+}
+
+// 工单详情删除按钮  (工单详情-----------------------------------)
+// const orderInfo = (row) => {
+//   orderInfoVisible.value = true;
+//   orderInfoData.list = row;
+// };
+
+// // 取消工单详情按钮
+// const cancelOrderInfo = () => {
+//   orderInfoVisible.value = false;
+// };
+// // 工单详情 点击音频
+// const bofang = () => {
+//   let music1 = new Audio();
+//   music1 = gaobai;
+//   audio.value.src = music1;
+//   // imgUrl.value = "@/assets/gaobai.mp3";
+//   audio.value.play();
+// };
+// 删除评价功能  (--------------------------------------------------)
+
+// 确定删除
+const confirmEvent = async (row) => {
+  let data = {
+    id: row.id,
+  };
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairEvaluate/deleteRepairEvaluateById",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: data,
+  });
+  console.log(res, "删除评价成功");
+  if (res.data.code == 200) {
+    if (tableData.list.length == 1 && currentPage.value != 1) {
+      currentPage.value = currentPage.value - 1;
+    }
+    getList();
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
+  }
+};
+// 取消删除
+const cancelEvent = () => {
+  ElMessage({
+    type: "info",
+    showClose: true,
+    message: "取消删除",
+    center: true,
+  });
+};
+
+//导出功能
+const importExcel = async () => {
+  let datas = {
+    keyWord: searchInput.keyWord, // 关键字
+  };
+  if (searchInput.createTime) {
+    datas.startTime = searchInput.createTime[0];
+    datas.endTime = searchInput.createTime[1];
+  }
+  let res = await axios({
+    method: "get",
+    url: api.value + "/repairEvaluate/toRepairEvaluateExcel",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+    params: datas,
+    responseType: "blob",
+  });
+  console.log(res, "导出评价表单");
+  if (res.status == 200) {
+    let name = `评价管理表单`;
+    var content = res.data;
+    // var data = new Blob([content],{type:"application/octet-stream;charset=utf-8"});
+    // var data = new Blob([content], {
+    //   type: "application/vnd.ms-excel;charset=utf-8",
+    // });
+    var data = new Blob([content]);
+    var downloadUrl = window.URL.createObjectURL(data);
+    var anchor = document.createElement("a");
+    anchor.href = downloadUrl;
+    anchor.download = name + ".xlsx";
+    anchor.click();
+    window.URL.revokeObjectURL(data);
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: "导出成功",
+      center: true,
+    });
+  } else {
+    ElMessage({
+      type: "error",
+      showClose: true,
+      message: "导出失败",
+      center: true,
+    });
+  }
+};
+// 表格斑马纹颜色修改
+const tableRowClassName = ({ row, rowIndex }) => {
+  if (rowIndex % 2 === 0) {
+    return "even";
+  } else if (rowIndex % 2 !== 0) {
+    return "odd";
+  }
+  return "";
+};
+// 分页
+const handleCurrentChange = (value) => {
+  // console.log(value);
+  currentPage.value = value;
+  getList();
+};
+
+onBeforeMount(() => {
+  api.value = store.state.user.api;
+  getList();
+});
+onUnmounted(() => {
+  // document.removeEventListener("keyup", Enters);
+});
+</script>
+
+<style scoped lang="scss">
+.content-box {
+  width: 97.5%;
+  height: 89%;
+  margin: 20px auto;
+  background-color: #fff;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+  box-shadow: 0px 3px 10px rgba(213, 228, 252, 1);
+
+  .left {
+    // width: calc(100wh - 40px);
+    display: flex;
+    align-items: center;
+    height: 60px;
+    margin: 0 30px;
+    border-bottom: 1px solid #ccc;
+    color: rgb(0, 0, 0);
+    font-size: 18px;
+    font-weight: 600;
+
+    span {
+      margin-right: 20px;
+      cursor: pointer;
+    }
+
+    .is_active {
+      color: rgba(111, 182, 184, 1);
+    }
+  }
+
+  .middle {
+    width: 96%;
+    margin: 0 auto;
+
+    color: #000;
+
+    // border-bottom: 1px solid rgb(231, 231, 231);
+    .filter {
+      display: flex;
+      flex-wrap: wrap;
+      align-items: center;
+      margin: 10px 0 0 0;
+
+      .search {
+        color: #fff;
+      }
+
+      .condition {
+        display: flex;
+        align-items: center;
+        margin: 10px 30px 10px 0;
+
+        :deep(.el-input .el-input__inner) {
+          font-size: 16px;
+        }
+
+        span {
+          margin: 0 10px 0 0;
+        }
+      }
+    }
+
+    .gongneng {
+      margin: 10px 0 15px 0;
+
+      span {
+        color: #fff;
+      }
+    }
+
+    :deep(.cont) {
+      width: 60%;
+      margin: 20px auto;
+    }
+
+    :deep(.download) {
+      display: flex;
+      align-items: center;
+      margin: 10px;
+    }
+
+    :deep(.download span) {
+      font-size: 16px;
+      margin-left: 20px;
+    }
+
+    :deep(.cont .el-button) {
+      margin-left: 60px;
+      margin-bottom: 30px;
+    }
+
+    :deep(.cont .accomplish) {
+      width: 100%;
+      display: flex;
+      justify-content: center;
+    }
+
+    :deep(.cont .accomplish .el-button) {
+      width: 50%;
+      margin: 0;
+    }
+  }
+
+  .footer {
+    width: 96%;
+    height: 550px;
+    margin: 10px auto 30px;
+
+    .el-table--fit {
+      height: 100%;
+
+      :deep(.el-table__header-wrapper) {
+        background-color: #000;
+        font-size: 16px;
+
+        tr {
+          color: #000;
+        }
+      }
+
+      :deep(.el-table__row) {
+        height: 50px;
+        font-size: 16px;
+        color: #000;
+
+        .el-rate__icon {
+          //评分图标大小
+          font-size: 25px;
+        }
+      }
+
+      :deep(.el-table__row td) {
+        padding: 0;
+        border: 0;
+      }
+
+      .el-button--primary {
+        margin-left: 5px;
+      }
+
+      :deep(.el-table__body .even) {
+        background-color: #fff;
+      }
+
+      :deep(.el-table__body .odd) {
+        background-color: rgba(240, 243, 247, 1);
+      }
+
+      :deep(.edit) {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        color: rgba(111, 182, 184, 1);
+      }
+
+      :deep(.look) {
+        padding: 0 10px;
+        cursor: pointer;
+      }
+
+      //   :deep(.look):hover {
+      //     color: red;
+      //   }
+    }
+  }
+
+  // 详情样式
+  :deep(.orderInfo) {
+    height: 800px;
+    overflow: hidden;
+    border-radius: 11px;
+
+    .el-dialog__header {
+      border-radius: 11px 11px 0 0;
+      background: rgba(237, 241, 245, 1);
+      font-weight: 600;
+      margin: 0;
+
+      .el-dialog__headerbtn {
+        outline: none;
+      }
+    }
+
+    .el-dialog__body {
+      height: 720px;
+      overflow: auto;
+      padding: 0px 20px 10px 20px;
+
+      .order_info {
+        .title {
+          display: flex;
+          align-items: center;
+          margin: 25px 0 10px 0;
+
+          img {
+            width: 20px;
+            height: 20px;
+            margin-right: 10px;
+          }
+
+          span {
+            color: #000;
+            font-size: 18px;
+            font-weight: 800;
+          }
+        }
+
+        // 工单详情 排列模式样式
+        .workNum {
+          display: flex;
+          align-items: center;
+          margin-bottom: 12px;
+          font-size: 16px;
+
+          .audio {
+            width: 98px;
+            height: 30px;
+            border-radius: 42.41px;
+            background: rgba(255, 255, 255, 1);
+            box-shadow: 0px 0px 1.68px rgba(0, 0, 0, 0.25);
+            display: flex;
+            align-items: center;
+            cursor: pointer;
+
+            img {
+              width: 18px;
+              height: 18px;
+              margin-left: 5px;
+            }
+
+            .audioNum {
+              font-size: 16px;
+            }
+          }
+
+          .titles {
+            color: rgba(128, 128, 128, 1);
+            font-weight: 200;
+            display: inline-block;
+            width: 80px;
+          }
+
+          span:nth-child(2) {
+            color: #000;
+            font-weight: 600;
+            width: 640px;
+          }
+        }
+
+        .workNums {
+          display: flex;
+          align-items: center;
+          margin-bottom: 12px;
+          font-size: 16px;
+
+          .el-rate__item {
+            .el-icon {
+              font-size: 25px;
+            }
+          }
+
+          .titles {
+            color: rgba(128, 128, 128, 1);
+            font-weight: 200;
+            display: inline-block;
+            width: 80px;
+          }
+        }
+
+        // 工单详情 步骤条样式
+        .steps {
+          .el-step {
+
+            // margin: 15px 0;
+            .el-step__main {
+              display: flex;
+              margin-bottom: 15px;
+
+              span {
+                font-size: 16px;
+              }
+
+              .el-step__title {
+                padding: 0 10px 0 0;
+
+                span {
+                  background-color: rgba(111, 182, 184, 1);
+                  color: #fff;
+                  padding: 1px 3px;
+                  border-radius: 3px;
+                  display: block;
+                }
+              }
+            }
+
+            .el-step__description {
+              .content {
+                margin-top: 7px;
+              }
+
+              .evaluateImg {
+                width: 500px;
+                margin: 10px 0;
+                display: flex;
+                flex-wrap: wrap;
+
+                img {
+                  width: 80px;
+                  // height: 40px;
+                  margin: 5px 10px 0 0;
+                }
+              }
+
+              .audio {
+                width: 98px;
+                height: 30px;
+                border-radius: 42.41px;
+                background: rgba(255, 255, 255, 1);
+                box-shadow: 0px 0px 1.68px rgba(0, 0, 0, 0.25);
+                display: flex;
+                align-items: center;
+                cursor: pointer;
+
+                img {
+                  width: 18px;
+                  height: 18px;
+                  margin-left: 5px;
+                }
+
+                .audioNum {
+                  font-size: 16px;
+                  color: #000;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .pageSize {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin: 0 30px;
+
+    span {
+      color: #000;
+    }
+
+    .el-pagination {
+
+      // width: 1600px;
+      :deep(.el-pagination__total) {
+        color: #000;
+      }
+
+      :deep(.el-pagination__goto) {
+        color: #000;
+      }
+
+      :deep(.el-pagination__classifier) {
+        color: #000;
+      }
+
+      :deep(.el-input__wrapper) {
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        box-shadow: none;
+      }
+
+      :deep(.el-pager li) {
+        margin: 0 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+
+      :deep(.el-pager li.is-active) {
+        background-color: rgba(111, 182, 184, 1);
+      }
+
+      :deep(.btn-prev) {
+        margin-right: 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+
+      :deep(.btn-next) {
+        margin-left: 5px;
+        border: 1px solid rgba(0, 0, 0, 1);
+        border-radius: 5px;
+        background-color: transparent;
+      }
+    }
+  }
+
+  .bgImg {
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 99999999;
+    width: 100%;
+    height: 100%;
+    background-color: rgba(255, 255, 255, 0.8);
+    display: flex;
+    justify-content: center;
+
+    img {
+      height: 100%;
+    }
+  }
+}
+
+.el-input {
+  width: 192px;
+}
+</style>

+ 16 - 0
src/views/evaluate/evaluate.vue

@@ -18,6 +18,16 @@
             end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :prefix-icon="Calendar"
             end-placeholder="结束时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :prefix-icon="Calendar"
             placeholder="请选择日期" :clearable="true" />
             placeholder="请选择日期" :clearable="true" />
         </div>
         </div>
+        <div class="condition">
+          <span>评价 : </span>
+          <el-select clearable v-model="searchInput.schoolId" class="m-2" placeholder="请选择评价星级" @change="selSchool">
+            <el-option label="1星" :value="0" />
+            <el-option label="2星" :value="1" />
+            <el-option label="3星" :value="2" />
+            <el-option label="4星" :value="3" />
+            <el-option label="5星" :value="4" />
+          </el-select>
+        </div>
 
 
         <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
         <el-button style="margin-left: 20px" color="rgba(111, 182, 184, 1)" type="primary" class="search"
           @click="searchBtn"><el-icon>
           @click="searchBtn"><el-icon>
@@ -286,6 +296,12 @@ const getList = async (message) => {
       message: res.data.message,
       message: res.data.message,
       center: true,
       center: true,
     });
     });
+    if (res.data.code == 570) {
+      sessionStorage.removeItem("token")
+      router.push({
+        path: `/login`,
+      });
+    }
   }
   }
 };
 };
 
 

Разница между файлами не показана из-за своего большого размера
+ 1715 - 0
src/views/goods/goods 1.vue


Разница между файлами не показана из-за своего большого размера
+ 1756 - 0
src/views/goods/goods copy.vue


Разница между файлами не показана из-за своего большого размера
+ 525 - 222
src/views/goods/goods.vue


Разница между файлами не показана из-за своего большого размера
+ 1821 - 0
src/views/home/home copy.vue


Разница между файлами не показана из-за своего большого размера
+ 370 - 225
src/views/home/home.vue


+ 10 - 9
src/views/news/news.vue

@@ -279,11 +279,12 @@ const getList = async (msg) => {
       message: res.data.message,
       message: res.data.message,
       center: true,
       center: true,
     });
     });
-    // if (res.data.message == "token错误") {
-    //   router.push({
-    //     path: `/login`,
-    //   });
-    // }
+    if (res.data.code == 570) {
+      sessionStorage.removeItem("token")
+      router.push({
+        path: `/login`,
+      });
+    }
   }
   }
 };
 };
 // 刷新
 // 刷新
@@ -298,7 +299,7 @@ const searchBtn = lodash.debounce(async () => {
 }, 300);
 }, 300);
 
 
 // 查看按钮
 // 查看按钮
-const look = async (row) => {
+const look =lodash.throttle(async (row) => {
   let data = { id: row.id }
   let data = { id: row.id }
   let res = await axios({
   let res = await axios({
     method: "get",
     method: "get",
@@ -328,7 +329,7 @@ const look = async (row) => {
       center: true,
       center: true,
     });
     });
   }
   }
-};
+},1000);
 
 
 // 获取未读数量
 // 获取未读数量
 const newsNum = async () => {
 const newsNum = async () => {
@@ -358,7 +359,7 @@ const newsNum = async () => {
 };
 };
 
 
 // 一键已读
 // 一键已读
-const allRead = async () => {
+const allRead = lodash.throttle(async () => {
   let data = {}
   let data = {}
   let res = await axios({
   let res = await axios({
     method: "get",
     method: "get",
@@ -388,7 +389,7 @@ const allRead = async () => {
       center: true,
       center: true,
     });
     });
   }
   }
-};
+},1000);
 
 
 // 多选框功能
 // 多选框功能
 const handleSelectionChange = (val) => {
 const handleSelectionChange = (val) => {

+ 183 - 99
src/views/paySuccess/paySuccess.vue

@@ -57,7 +57,9 @@
           <template #default="scope">
           <template #default="scope">
             <div class="edit">
             <div class="edit">
               <div class="look" @click="refundInfo(scope.row)">详情</div>
               <div class="look" @click="refundInfo(scope.row)">详情</div>
-              <div class="look" @click="refund(scope.row)" v-if="schoolId == 0">退款</div>
+              <div class="look" @click="applyRefund(scope.row)">申请退款</div>
+              <div class="look" @click=refund(scope.row)>审核</div>
+              <!-- <div class="look" @click="refund(scope.row)" v-if="schoolId == 0">退款</div> -->
             </div>
             </div>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
@@ -135,7 +137,7 @@
         </div>
         </div>
       </el-dialog>
       </el-dialog>
       <!-- 退款弹窗 -->
       <!-- 退款弹窗 -->
-      <el-dialog class="refund" v-model="refundVisible" :close-on-click-modal="false" :close-on-press-escape="false"
+      <!-- <el-dialog class="refund" v-model="refundVisible" :close-on-click-modal="false" :close-on-press-escape="false"
         title="退款" align-center width="500" :before-close="cancelRefund">
         title="退款" align-center width="500" :before-close="cancelRefund">
         <div class="priceContent">
         <div class="priceContent">
           <span>退款金额 : </span>
           <span>退款金额 : </span>
@@ -158,6 +160,48 @@
           </el-button>
           </el-button>
           <el-button @click="cancelRefund">取消</el-button>
           <el-button @click="cancelRefund">取消</el-button>
         </div>
         </div>
+      </el-dialog> -->
+      <!-- 退款 -->
+      <el-dialog class="refund" v-model="refundVisible" :close-on-click-modal="false" :close-on-press-escape="false"
+        title="退款" align-center width="500" :before-close="cancelRefund">
+        <div class="priceContent">
+          <div style="margin-bottom: 15px;">备注 : </div>
+          <el-input v-model="refundRemark" :rows="4" type="textarea" show-word-limit 
+                placeholder="此处为备注内容" />
+        </div> 
+        <div class="priceContent">
+          <span>退款金额 : </span>
+          <span style="color: red">{{ refundPrice }}元</span>
+        </div>
+        <div class="options">
+          <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="refundYes">
+            同意
+          </el-button>
+          <el-button @click="cancelRefund">驳回</el-button>
+        </div>
+      </el-dialog>
+      <!-- 申请退款 -->
+      <el-dialog class="refund" v-model="applyRefundVisible" :close-on-click-modal="false" :close-on-press-escape="false"
+        title="申请退款" align-center width="500" :before-close="cancelApplyRefund">
+        <div class="priceContent">
+          <span>申请人 : </span>
+          <span>XXX</span>
+        </div>    
+        <div class="priceContent">
+          <span>退款金额 : </span>
+          <el-input clearable v-model="applyRefundPrice" class="w-50 m-2" placeholder="请输入退款金额" style="width: 180px" />
+        </div>  
+        <div class="priceContent">
+          <div style="margin-bottom: 15px;">备注 : </div>
+          <el-input v-model="applyRefundPriceRemark" :rows="4" type="textarea" show-word-limit 
+                placeholder="此处为备注内容" />
+        </div> 
+        <div class="options">
+          <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary" @click="applyRefundYes">
+            提交
+          </el-button>
+          <el-button @click="cancelApplyRefund">取消</el-button>
+        </div>
       </el-dialog>
       </el-dialog>
     </div>
     </div>
 
 
@@ -237,11 +281,23 @@ const refundInfolist = reactive({
 });
 });
 
 
 // 退款(----------------------)
 // 退款(----------------------)
-const refundVisible = ref(false); // 控制退款弹窗
-const refundPrice = ref(); // 退款费用
+// const refundVisible = ref(false); // 控制退款弹窗
+// const refundPrice = ref(); // 退款费用
+// const refundRecord = reactive({ list: [] }); // 退款记录
+// const refundId = ref(); // 退款id
+// const restrictPrice = ref(); // 限制退款金额
+
+// 退款
 const refundRecord = reactive({ list: [] }); // 退款记录
 const refundRecord = reactive({ list: [] }); // 退款记录
-const refundId = ref(); // 退款id
-const restrictPrice = ref(); // 限制退款金额
+const refundVisible=ref(false) // 退款弹窗
+const refundRemark=ref() // 备注
+const refundPrice=ref() // 退款的金额
+
+// 申请退款
+const applyRefundVisible=ref(false)// 申请退款弹窗
+const applyRefundPrice=ref() // 退款金额
+const applyRefundPriceRemark=ref() // 退款备注
+
 
 
 const currentPage = ref(1); // 当前页
 const currentPage = ref(1); // 当前页
 const pageSize = ref(10);
 const pageSize = ref(10);
@@ -279,6 +335,12 @@ const getList = async () => {
       message: res.data.message,
       message: res.data.message,
       center: true,
       center: true,
     });
     });
+    if (res.data.code == 570) {
+      sessionStorage.removeItem("token")
+      router.push({
+        path: `/login`,
+      });
+    }
   }
   }
   // 合计接口
   // 合计接口
   {
   {
@@ -336,100 +398,122 @@ const cancelRefundInfo = () => {
 };
 };
 
 
 //退款按钮  (-------------------------------------------)
 //退款按钮  (-------------------------------------------)
-const refund = async (row) => {
-  refundVisible.value = true;
-  refundId.value = row.id;
-  refundRecord.list = row.repairRefundRecordList;
-  let data = {
-    payRecordId: refundId.value,
-  };
-  let res = await axios({
-    method: "get",
-    url: api.value + "/repairPayRecord/restrict",
-    headers: {
-      token: sessionStorage.getItem("token"),
-      user_head: sessionStorage.getItem("userhead"),
-    },
-    params: data,
-  });
-  restrictPrice.value = res.data.data;
-  console.log(res, "退款限制金额");
-};
-// 确定退款
-const refundYes = async () => {
-  var reg = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/;
-  console.log(reg.test(refundPrice.value));
+// const refund = async (row) => {
+//   refundVisible.value = true;
+//   refundId.value = row.id;
+//   refundRecord.list = row.repairRefundRecordList;
+//   let data = {
+//     payRecordId: refundId.value,
+//   };
+//   let res = await axios({
+//     method: "get",
+//     url: api.value + "/repairPayRecord/restrict",
+//     headers: {
+//       token: sessionStorage.getItem("token"),
+//       user_head: sessionStorage.getItem("userhead"),
+//     },
+//     params: data,
+//   });
+//   restrictPrice.value = res.data.data;
+//   console.log(res, "退款限制金额");
+// };
+// // 确定退款
+// const refundYes = async () => {
+//   var reg = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/;
+//   console.log(reg.test(refundPrice.value));
+
+//   if (refundPrice.value > restrictPrice.value) {
+//     ElMessage({
+//       type: "error",
+//       showClose: true,
+//       message: "退款金额不能大于剩余金额",
+//       center: true,
+//     });
+//     return false;
+//   } else if (restrictPrice.value == 0) {
+//     ElMessage({
+//       type: "error",
+//       showClose: true,
+//       message: "金额已全部退款",
+//       center: true,
+//     });
+//     return false;
+//   } else if (refundPrice.value <= 0) {
+//     ElMessage({
+//       type: "error",
+//       showClose: true,
+//       message: "输入的退款金额必须大于0",
+//       center: true,
+//     });
+//     return false;
+//   } else if (!reg.test(refundPrice.value)) {
+//     ElMessage({
+//       type: "error",
+//       showClose: true,
+//       message: "退款金额为正数(小数位不超过2位)",
+//       center: true,
+//     });
+//     return false;
+//   }
+//   let data = {
+//     repairPayRecordId: refundId.value,
+//     refundPrice: refundPrice.value,
+//   };
+//   let res = await axios({
+//     method: "post",
+//     url: api.value + "/repairPayRecord/refundableAmount",
+//     headers: {
+//       token: sessionStorage.getItem("token"),
+//       user_head: sessionStorage.getItem("userhead"),
+//     },
+//     data: data,
+//   });
+//   console.log(res, "退款");
+//   if (res.data.code == 200) {
+//     refundVisible.value = false;
+//     refundPrice.value = "";
+//     getList();
+//     ElMessage({
+//       type: "success",
+//       showClose: true,
+//       message: res.data.message,
+//       center: true,
+//     });
+//   } else {
+//     ElMessage({
+//       type: "error",
+//       showClose: true,
+//       message: res.data.message,
+//       center: true,
+//     });
+//   }
+// };
+// // 取消按钮
+// const cancelRefund = () => {
+//   refundVisible.value = false;
+// };
+
+
+// 审核 (-----------------------------------------------------)
+const refund=(row)=>{
+  refundVisible.value=true
+}
+const cancelRefund=()=>{
+  refundVisible.value=false
+}
 
 
-  if (refundPrice.value > restrictPrice.value) {
-    ElMessage({
-      type: "error",
-      showClose: true,
-      message: "退款金额不能大于剩余金额",
-      center: true,
-    });
-    return false;
-  } else if (restrictPrice.value == 0) {
-    ElMessage({
-      type: "error",
-      showClose: true,
-      message: "金额已全部退款",
-      center: true,
-    });
-    return false;
-  } else if (refundPrice.value <= 0) {
-    ElMessage({
-      type: "error",
-      showClose: true,
-      message: "输入的退款金额必须大于0",
-      center: true,
-    });
-    return false;
-  } else if (!reg.test(refundPrice.value)) {
-    ElMessage({
-      type: "error",
-      showClose: true,
-      message: "退款金额为正数(小数位不超过2位)",
-      center: true,
-    });
-    return false;
-  }
-  let data = {
-    repairPayRecordId: refundId.value,
-    refundPrice: refundPrice.value,
-  };
-  let res = await axios({
-    method: "post",
-    url: api.value + "/repairPayRecord/refundableAmount",
-    headers: {
-      token: sessionStorage.getItem("token"),
-      user_head: sessionStorage.getItem("userhead"),
-    },
-    data: data,
-  });
-  console.log(res, "退款");
-  if (res.data.code == 200) {
-    refundVisible.value = false;
-    refundPrice.value = "";
-    getList();
-    ElMessage({
-      type: "success",
-      showClose: true,
-      message: res.data.message,
-      center: true,
-    });
-  } else {
-    ElMessage({
-      type: "error",
-      showClose: true,
-      message: res.data.message,
-      center: true,
-    });
-  }
-};
-// 取消按钮
-const cancelRefund = () => {
-  refundVisible.value = false;
-};
+// 申请退款 (----------------------------------------------------)
+const applyRefund=(row)=>{
+  applyRefundVisible.value=true
+}
+// 确定申请
+const applyRefundYes=()=>{
+  console.log("确定申请退款");
+}
+// 取消申请
+const cancelApplyRefund=()=>{
+  applyRefundVisible.value=false
+}
 
 
 //导出功能
 //导出功能
 const importExcel = async () => {
 const importExcel = async () => {

+ 6 - 1
src/views/scheduling/scheduling.vue

@@ -388,7 +388,6 @@ const dialongTitle = ref("添加时段"); // 弹窗标题
 const searchInput = reactive({
 const searchInput = reactive({
   createTime: "",
   createTime: "",
 }); // 搜索按钮数据
 }); // 搜索按钮数据
-5;
 const currentPage = ref(1); // 当前页
 const currentPage = ref(1); // 当前页
 const pageSize = ref(10);
 const pageSize = ref(10);
 const total = ref(); // 当前总数
 const total = ref(); // 当前总数
@@ -526,6 +525,12 @@ const getList = async (flag) => {
         message: res.data.message,
         message: res.data.message,
         center: true,
         center: true,
       });
       });
+      if (res.data.code == 570) {
+        sessionStorage.removeItem("token")
+        router.push({
+          path: `/login`,
+        });
+      }
     }
     }
   } else if (flag == 2) {
   } else if (flag == 2) {
     loading2.value = true;
     loading2.value = true;

+ 11 - 5
src/views/staff/staff.vue

@@ -47,12 +47,12 @@
             border: 0,
             border: 0,
           }">
           }">
           <!-- <el-table-column align="center" type="selection" width="80" /> -->
           <!-- <el-table-column align="center" type="selection" width="80" /> -->
-          <!-- <el-table-column
-            width="150"
+          <el-table-column
+            width="80"
             align="center "
             align="center "
             type="index"
             type="index"
             label="序号"
             label="序号"
-          /> -->
+          />
           <el-table-column align="center" prop="userName" label="姓名" />
           <el-table-column align="center" prop="userName" label="姓名" />
           <el-table-column align="center" width="150" prop="userPhone" label="手机号码" />
           <el-table-column align="center" width="150" prop="userPhone" label="手机号码" />
           <el-table-column align="center" prop="teamName" label="维修班" />
           <el-table-column align="center" prop="teamName" label="维修班" />
@@ -66,8 +66,8 @@
           </el-table-column>
           </el-table-column>
           <el-table-column align="center" width="100" prop="workTypeName" label="工种" />
           <el-table-column align="center" width="100" prop="workTypeName" label="工种" />
           <el-table-column align="center" prop="articleName" label="关联报修类型" width="200" show-overflow-tooltip />
           <el-table-column align="center" prop="articleName" label="关联报修类型" width="200" show-overflow-tooltip />
-          <el-table-column align="center" prop="acceptanceTime" label="接单考核时间" />
-          <el-table-column align="center" prop="maintenanceTime" label="维修考核时间" />
+          <!-- <el-table-column align="center" prop="acceptanceTime" label="接单考核时间" /> -->
+          <!-- <el-table-column align="center" prop="maintenanceTime" label="维修考核时间" /> -->
           <el-table-column align="center" fixed="right" label="操作" width="150">
           <el-table-column align="center" fixed="right" label="操作" width="150">
             <template #default="scope">
             <template #default="scope">
               <div class="edit">
               <div class="edit">
@@ -322,6 +322,12 @@ const getList = async () => {
       message: res.data.message,
       message: res.data.message,
       center: true,
       center: true,
     });
     });
+    if (res.data.code == 570) {
+      sessionStorage.removeItem("token")
+      router.push({
+        path: `/login`,
+      });
+    }
   }
   }
 };
 };
 
 

+ 12 - 6
src/views/waiting/waiting.vue

@@ -10,8 +10,8 @@
           <h3>评价设置</h3>
           <h3>评价设置</h3>
           <div>
           <div>
             <span>工单完成后 </span>
             <span>工单完成后 </span>
-            <el-input clearable v-model="ruleForm.hour" class="w-50 m-2" style="width: 80px" @blur="timeUpdata" />
-            <span>&nbsp;&nbsp;小时,用户未评价系统默认为好评</span>
+            <el-input clearable v-model="ruleForm.day" class="w-50 m-2" style="width: 80px" @blur="timeUpdata" />
+            <span>&nbsp;&nbsp;,用户未评价系统默认为好评</span>
           </div>
           </div>
         </div>
         </div>
         <div class="condition">
         <div class="condition">
@@ -59,7 +59,7 @@ const router = useRouter();
 
 
 // 表格数据
 // 表格数据
 const ruleForm = reactive({
 const ruleForm = reactive({
-  hour: "", // 自动好评时间
+  day: "", // 自动好评时间
   emergencyCall: "", // 黄家湖紧急电话
   emergencyCall: "", // 黄家湖紧急电话
   emergencyMxh: "",// 墨轩湖紧急电话
   emergencyMxh: "",// 墨轩湖紧急电话
   servicePhone: "", // 服务监督电话
   servicePhone: "", // 服务监督电话
@@ -77,7 +77,7 @@ const getlist = async (message) => {
   });
   });
   console.log(res);
   console.log(res);
   if (res.data.code == 200) {
   if (res.data.code == 200) {
-    ruleForm.hour = res.data.data.hour; // 自动好评时间
+    ruleForm.day = res.data.data.day; // 自动好评时间
     ruleForm.emergencyCall = res.data.data.emergencyCall; // 黄家湖紧急电话
     ruleForm.emergencyCall = res.data.data.emergencyCall; // 黄家湖紧急电话
     ruleForm.emergencyMxh = res.data.data.emergencyMxh; // 墨轩湖紧急电话
     ruleForm.emergencyMxh = res.data.data.emergencyMxh; // 墨轩湖紧急电话
     ruleForm.servicePhone = res.data.data.servicePhone; // 服务监督电话
     ruleForm.servicePhone = res.data.data.servicePhone; // 服务监督电话
@@ -99,13 +99,19 @@ const getlist = async (message) => {
       message: res.data.message,
       message: res.data.message,
       center: true,
       center: true,
     });
     });
+    if (res.data.code == 570) {
+      sessionStorage.removeItem("token")
+      router.push({
+        path: `/login`,
+      });
+    }
   }
   }
 };
 };
 
 
 // 页面数据一修改就调用函数
 // 页面数据一修改就调用函数
 const timeUpdata = async () => {
 const timeUpdata = async () => {
   let data = {
   let data = {
-    hour: ruleForm.hour, // 自动好评时间
+    day: ruleForm.day, // 自动好评时间
     emergencyCall: ruleForm.emergencyCall, // 紧急电话
     emergencyCall: ruleForm.emergencyCall, // 紧急电话
     emergencyMxh: ruleForm.emergencyMxh, // 紧急电话
     emergencyMxh: ruleForm.emergencyMxh, // 紧急电话
     servicePhone: ruleForm.servicePhone, // 服务监督电话
     servicePhone: ruleForm.servicePhone, // 服务监督电话
@@ -135,7 +141,7 @@ const timeUpdata = async () => {
     ElMessage({
     ElMessage({
       type: "error",
       type: "error",
       showClose: true,
       showClose: true,
-      message: "修改失败",
+      message: res.data.message,
       center: true,
       center: true,
     });
     });
   }
   }

Разница между файлами не показана из-за своего большого размера
+ 3601 - 0
src/views/workOrder/workOrder copy.vue


Разница между файлами не показана из-за своего большого размера
+ 973 - 457
src/views/workOrder/workOrder.vue


+ 15 - 13
vite.config.js

@@ -22,26 +22,28 @@ export default defineConfig({
     port: 8989,
     port: 8989,
     // 是否开启 https
     // 是否开启 https
     // https: false,
     // https: false,
-    // 线上地址
-    // proxy: {
-    //   "/carstop/carbook": {
-    //     target: "https://chtech.ncjti.edu.cn/carstop/carbook",
-    //     changeOrigin: true,
-    //     rewrite: (path) => path.replace(/^\/carstop\/carbook/, ""),
-    //   },
-    // },
-
     // 测试地址
     // 测试地址
     proxy: {
     proxy: {
-      "/campusMaintenance/repair-api/repair/api": {
+      "/testingServer/repairTest/repair/api": {
         target:
         target:
-          "https://chtech.ncjti.edu.cn/campusMaintenance/repair-api/repair/api", // 测试环境
-        // "http://192.168.161.224:8080/repair/api", // 测试环境
+          "https://chtech.ncjti.edu.cn/testingServer/repairTest/repair/api",
         changeOrigin: true,
         changeOrigin: true,
         rewrite: (path) =>
         rewrite: (path) =>
-          path.replace(/^\/campusMaintenance\/repair-api\/repair\/api/, ""),
+          path.replace(/^\/testingServer\/repairTest\/repair\/api/, ""),
       },
       },
     },
     },
+
+    // 在线地址
+    // proxy: {
+    //   "/campusMaintenance/repair-api/repair/api": {
+    //     target:
+    //       "https://chtech.ncjti.edu.cn/campusMaintenance/repair-api/repair/api", // 测试环境
+    //     // "http://192.168.161.224:8080/repair/api", // 测试环境
+    //     changeOrigin: true,
+    //     rewrite: (path) =>
+    //       path.replace(/^\/campusMaintenance\/repair-api\/repair\/api/, ""),
+    //   },
+    // },
   },
   },
   publicDir: "public",
   publicDir: "public",
   base: "./",
   base: "./",