Browse Source

🐞 fix: 修复工单系统存在的部分问题

Pchen. 10 months ago
parent
commit
6c7841556f

+ 6 - 2
src/pages/service/admin/orderDetail.vue

@@ -14,9 +14,11 @@
             <div class="message" v-for="(msg, index) in data.msg">
             <div class="message" v-for="(msg, index) in data.msg">
                 <a-divider v-if="index !== 0" />
                 <a-divider v-if="index !== 0" />
                 <div class="head">
                 <div class="head">
-                    <a-avatar :size="40">
-                        <img :src="data.userInfo[msg.uuid]?.avatar ?? ''" />
+                    <a-avatar>
+                        <IconUser v-if="!data.userInfo[msg.uuid]?.avatar" />
+                        <img alt="" :src="data.userInfo[msg.uuid]?.avatar" v-else />
                     </a-avatar>
                     </a-avatar>
+
                     <div class="right">
                     <div class="right">
                         <div class="username">
                         <div class="username">
                             {{ data.userInfo[msg.uuid]?.username }}
                             {{ data.userInfo[msg.uuid]?.username }}
@@ -195,6 +197,7 @@ const getOrderDetail = async () => {
         info.value = [
         info.value = [
             { label: '工单标题', value: res.data.title },
             { label: '工单标题', value: res.data.title },
             { label: '工单ID', value: res.data.id },
             { label: '工单ID', value: res.data.id },
+            { label: '发起人', value: res.data.userInfo[res.data.create_user]?.username},
             { label: '通知邮箱', value: res.data.email },
             { label: '通知邮箱', value: res.data.email },
             { label: '创建时间', value: stramptoTime(res.data.create_time) },
             { label: '创建时间', value: stramptoTime(res.data.create_time) },
             { label: '最后更新时间', value: stramptoTime(res.data.update_time) },
             { label: '最后更新时间', value: stramptoTime(res.data.update_time) },
@@ -259,6 +262,7 @@ const stramptoTime = (time) => {
 .message {
 .message {
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
+    margin-bottom: 5px;
 
 
     .head {
     .head {
         display: flex;
         display: flex;

+ 11 - 0
src/pages/service/admin/orderList.vue

@@ -53,6 +53,13 @@
                     current: pagination.current,
                     current: pagination.current,
                     total: pagination.total
                     total: pagination.total
                 }" @page-change="handlePageChange" @page-size-change="handlePageSizeChange">
                 }" @page-change="handlePageChange" @page-size-change="handlePageSizeChange">
+                <template #username="{ record }">
+                    <a-avatar :size="30">
+                        <IconUser v-if="!record.avatar" />
+                        <img :alt="record.username ?? ''" :src="record.avatar" v-else />
+                    </a-avatar>
+                    {{ record.username }}
+                </template>
                 <template #create_time="{ record }">
                 <template #create_time="{ record }">
                     {{ stramptoTime(record.create_time) }}
                     {{ stramptoTime(record.create_time) }}
                 </template>
                 </template>
@@ -127,6 +134,10 @@ const columns = [
         title: '工单标题',
         title: '工单标题',
         dataIndex: 'title',
         dataIndex: 'title',
     }, {
     }, {
+        title: '发起人',
+        slotName: 'username',
+    },
+    {
         title: '提醒邮箱',
         title: '提醒邮箱',
         dataIndex: 'email',
         dataIndex: 'email',
     }, {
     }, {

+ 4 - 2
src/pages/service/orderDetail.vue

@@ -14,8 +14,9 @@
             <div class="message" v-for="(msg, index) in data.msg">
             <div class="message" v-for="(msg, index) in data.msg">
                 <a-divider v-if="index !== 0" />
                 <a-divider v-if="index !== 0" />
                 <div class="head">
                 <div class="head">
-                    <a-avatar :size="40">
-                        <img :src="data.userInfo[msg.uuid]?.avatar ?? ''" />
+                    <a-avatar>
+                        <IconUser v-if="!data.userInfo[msg.uuid]?.avatar" />
+                        <img alt="" :src="data.userInfo[msg.uuid]?.avatar" v-else />
                     </a-avatar>
                     </a-avatar>
                     <div class="right">
                     <div class="right">
                         <div class="username">
                         <div class="username">
@@ -259,6 +260,7 @@ const stramptoTime = (time) => {
 .message {
 .message {
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
+    margin-bottom: 5px;
 
 
     .head {
     .head {
         display: flex;
         display: flex;

+ 1 - 1
vite.config.js

@@ -18,7 +18,7 @@ export default defineConfig({
   server: {
   server: {
     proxy: {
     proxy: {
       '/cloud': {
       '/cloud': {
-        target: 'https://lepao-cloud.cthc.top',
+        target: 'http://lepao-cloud.xxoo365.top/',
         changeOrigin: true,
         changeOrigin: true,
         rewrite: path => path.replace(/^\/cloud/, '')
         rewrite: path => path.replace(/^\/cloud/, '')
       }
       }