From 33c4e059eeb71de6f186bc4ee22e05bfd3bd5aeb Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Wed, 24 Mar 2021 18:23:45 +0800
Subject: [PATCH] 问题修复

---
 src/views/system/user.vue |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 0e50af3..0c3db78 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -90,6 +90,20 @@
                     slot="userTypeName">
             <el-tag>{{row.userTypeName}}</el-tag>
           </template>
+          <template slot-scope="{ row }" slot="online_status">
+            <el-tag
+            >{{
+              row.online_status == "0" ? "掉线" : row.online_status == "1" ? "在线" : "掉线"
+              }}
+            </el-tag>
+          </template>
+          <template slot-scope="{ row }" slot="work_status">
+            <el-tag
+            >{{
+              row.work_status == "0" ? "闲置" : row.work_status == "1" ? "工作中" : "闲置"
+              }}
+            </el-tag>
+          </template>
         </avue-crud>
         <el-dialog title="用户角色配置"
                    append-to-body
@@ -197,7 +211,7 @@
       };
       return {
         form: {},
-        search:{},
+        search: {},
         roleBox: false,
         excelBox: false,
         platformBox: false,
@@ -295,9 +309,20 @@
               slot: true,
               display: false
             },
+
             {
               label: "用户平台",
               prop: "userTypeName",
+              slot: true,
+              display: false
+            }, {
+              label: "在线状态",
+              prop: "online_status",
+              slot: true,
+              display: false
+            }, {
+              label: "工作状态",
+              prop: "work_status",
               slot: true,
               display: false
             },
@@ -885,13 +910,13 @@
         if (["edit", "view"].includes(type)) {
           getUser(this.form.id).then(res => {
             this.form = res.data.data;
-            if(this.form.hasOwnProperty("deptId")){
+            if (this.form.hasOwnProperty("deptId")) {
               this.form.deptId = this.form.deptId.split(",");
             }
-            if(this.form.hasOwnProperty("roleId")){
+            if (this.form.hasOwnProperty("roleId")) {
               this.form.roleId = this.form.roleId.split(",");
             }
-            if(this.form.hasOwnProperty("postId")){
+            if (this.form.hasOwnProperty("postId")) {
               this.form.postId = this.form.postId.split(",");
             }
           });

--
Gitblit v1.9.3