From 82379f6ff9ddc28abb2a0e46bc97090ec049b6e9 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期二, 07 五月 2024 11:55:51 +0800
Subject: [PATCH] 新增人员状态、状态描述展示、设置操作

---
 src/views/user/student/list.vue |   43 +++++++++++++++++++++++++++++++++----------
 1 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/src/views/user/student/list.vue b/src/views/user/student/list.vue
index ba9feba..e78badf 100644
--- a/src/views/user/student/list.vue
+++ b/src/views/user/student/list.vue
@@ -30,11 +30,17 @@
       <el-table-column prop="userName" label="鐢ㄦ埛鍚�"/>
       <el-table-column prop="realName" label="鐪熷疄濮撳悕" />
       <el-table-column prop="deptNames" label="閮ㄩ棬" />
-      <el-table-column label="鏍囩" prop="tagNames">
+      <el-table-column label="鏍囩" prop="tagNames" width="80px">
         <template slot-scope="{row}">
-          <el-tag style="margin-right: 5px;" v-for="(item,index) in row.tagNames" :key="index">{{ item }}</el-tag>
+          <el-tag style="margin: 5px;" v-for="(item,index) in row.tagNames" :key="index">{{ item }}</el-tag>
         </template>
       </el-table-column>
+      <el-table-column label="浜哄憳鐘舵��" prop="condition">
+        <template slot-scope="{row}">
+          <el-tag type="warning" v-if="row.condition">{{ row.condition }}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column prop="conditionDetail" label="鍏蜂綋鎯呭喌" show-overflow-tooltip="true"/>
       <el-table-column prop="sex" label="鎬у埆" width="60px;" :formatter="sexFormatter"/>
       <el-table-column prop="phone" label="鎵嬫満鍙�"/>
       <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="160px"/>
@@ -56,7 +62,7 @@
           <router-link :to="{path:'/log/user/list', query:{userId:row.id}}" class="link-left">
             <el-button size="mini" >鏃ュ織</el-button>
           </router-link>
-          <el-button  size="mini" @click="status(row.id)" class="link-left">鐘舵��</el-button>
+          <el-button  size="mini" @click="status(row)" class="link-left">鐘舵��</el-button>
           <el-button  size="mini" type="danger" @click="deleteUser(row)" class="link-left">鍒犻櫎</el-button>
         </template>
       </el-table-column>
@@ -64,10 +70,14 @@
     <pagination v-show="total>0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize"
                 @pagination="search"/>
 
-
-
-    <el-dialog  :visible.sync="statusVisible"  append-to-body :close-on-click-modal="false" style="width: 100%;height: 100%"   :show-close="false" center>
-      111
+    <!-- 鐘舵�佸脊绐� -->
+    <el-dialog :visible.sync="statusVisible" append-to-body :close-on-click-modal="false" :show-close="false" center width="300px">
+      <el-radio-group v-model="user.condition">
+        <el-radio label="鐥呭亣">鐥呭亣</el-radio>
+        <el-radio label="鍑哄樊">鍑哄樊</el-radio>
+        <el-radio label="鍏朵粬">鍏朵粬</el-radio>
+      </el-radio-group>
+      <el-input type="textarea" maxlength="100" show-word-limit autosize v-model="user.conditionDetail" placeholder="璇疯緭鍏ヨ缁嗘儏鍐�" style="margin-top: 30px;"></el-input>
       <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="statusConfirm">纭� 瀹�</el-button>
         <el-button @click="statusVisible = false">鍙� 娑�</el-button>
@@ -85,7 +95,7 @@
   components: { Pagination },
   data () {
     return {
-      form: {},
+      user:{},
       statusVisible: false,
       upLoadUrl:'/api/admin/user/import',
       fileList:[],
@@ -104,11 +114,24 @@
     this.search()
   },
   methods: {
-    status(id) {
+    status(user) {
       this.statusVisible = true;
+      this.user = { ...user };
     },
     statusConfirm() {
-      this.form;
+      if (this.user.condition === null) {
+        this.$message.error("璇烽�夋嫨鐘舵��")
+        return
+      }
+      userApi.setStatus(this.user).then(res => {
+        if (res.code === 1) {
+          this.$message.success("鎿嶄綔鎴愬姛")
+          this.statusVisible = false;
+          this.search()
+        } else {
+          this.$message.error("鎿嶄綔澶辫触")
+        }
+      })
     },
     handlePreview(e){
       console.log(e)

--
Gitblit v1.8.0