From ce1f77d4a12083a6f94324d764b46e085e90d36e Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 13 五月 2024 12:02:12 +0800
Subject: [PATCH] 视频分类初始话

---
 src/views/user/student/list.vue |   50 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 49 insertions(+), 1 deletions(-)

diff --git a/src/views/user/student/list.vue b/src/views/user/student/list.vue
index d8272e9..82bdfa3 100644
--- a/src/views/user/student/list.vue
+++ b/src/views/user/student/list.vue
@@ -30,6 +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" width="80px">
+        <template slot-scope="{row}">
+          <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" align="center" width="100px">
+        <template slot-scope="{row}">
+          <el-tag :type="row.condition == '姝e父' || row.condition == null  ? 'success' : 'warning'">{{ row.condition ? row.condition : '姝e父' }}</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"/>
@@ -40,7 +51,7 @@
           </el-tag>
         </template>
       </el-table-column>
-      <el-table-column width="270px" label="鎿嶄綔" align="center">
+      <el-table-column width="340px" label="鎿嶄綔" align="center">
         <template slot-scope="{row}">
           <el-button size="mini"  @click="changeStatus(row)" class="link-left">
             {{ statusBtnFormatter(row.status) }}
@@ -51,12 +62,28 @@
           <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)" class="link-left">鐘舵��</el-button>
           <el-button  size="mini" type="danger" @click="deleteUser(row)" class="link-left">鍒犻櫎</el-button>
         </template>
       </el-table-column>
     </el-table>
     <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" :show-close="false" center width="400px">
+      <el-radio-group v-model="user.condition">
+        <el-radio label="姝e父">姝e父</el-radio>
+        <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="{ minRows: 4}" :rows="2" 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>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -69,6 +96,8 @@
   components: { Pagination },
   data () {
     return {
+      user:{},
+      statusVisible: false,
       upLoadUrl:'/api/admin/user/import',
       fileList:[],
       queryParam: {
@@ -86,6 +115,25 @@
     this.search()
   },
   methods: {
+    status(user) {
+      this.statusVisible = true;
+      this.user = { ...user };
+    },
+    statusConfirm() {
+      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)
       if (e.code==1){

--
Gitblit v1.8.0