From 5167d73c1e36d0f9ddeb2a473d7164737b560fe0 Mon Sep 17 00:00:00 2001
From: pengwei <2071057782@qq.com>
Date: 星期一, 21 四月 2025 08:55:51 +0800
Subject: [PATCH] 优化
---
项目代码/client/src/views/tts/UserManagement/Usermanagement.vue | 651 ++++++++++++++++++++++++++++++++++++++++++-----------
项目代码/client/src/router/viewGird.js | 7
项目代码/client/src/views/tts/LargeScreen/Largescreen.vue | 4
3 files changed, 523 insertions(+), 139 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/router/viewGird.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/router/viewGird.js"
index 289c590..b1b2a6f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/router/viewGird.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/router/viewGird.js"
@@ -123,8 +123,13 @@
path: "/Largescreen",
name: "Largescreen",
component: () => import("@/views/tts/LargeScreen/Largescreen.vue"),
+ }, {
+ path: '/baidu',
+ name: 'baidu',
+ beforeEnter() {
+ window.location.href = 'https://www.baidu.com';
+ }
}
-
];
export default viewgird;
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/LargeScreen/Largescreen.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/LargeScreen/Largescreen.vue"
index 83f7cdb..e848da6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/LargeScreen/Largescreen.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/LargeScreen/Largescreen.vue"
@@ -1,5 +1,7 @@
<template>
- <div class="Largescreen"></div>
+ <div class="Largescreen">
+
+ </div>
</template>
<script setup>
import {} from "vue";
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/UserManagement/Usermanagement.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/UserManagement/Usermanagement.vue"
index 08bd27d..d988f4e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/UserManagement/Usermanagement.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/UserManagement/Usermanagement.vue"
@@ -2,17 +2,27 @@
<div class="Usermanagement">
<div class="content">
<div class="checkbox">
- <div :class="['item', isactive == 1 ? 'isactive' : '']" @click="changeactive(1)">
+ <div
+ :class="['item', isactive == 1 ? 'isactive' : '']"
+ @click="changeactive(1)"
+ >
鐢ㄦ埛鍒楄〃
</div>
- <div :class="['item', isactive == 2 ? 'isactive' : '']" @click="changeactive(2)">
+ <div
+ :class="['item', isactive == 2 ? 'isactive' : '']"
+ @click="changeactive(2)"
+ >
鐢ㄦ埛瑙掕壊
</div>
</div>
<div class="serch">
<div class="time_box">
<div class="time">鍒涘缓鏃ユ湡</div>
- <el-date-picker v-model="queryForm.selectTime" prefix-icon="none" clear-icon="none" style="
+ <el-date-picker
+ v-model="queryForm.selectTime"
+ prefix-icon="none"
+ clear-icon="none"
+ style="
font-size: 0.75rem !important;
border: 0.06rem solid rgba(222, 222, 222, 1);
border-radius: 0 0.25rem 0.25rem 0;
@@ -20,178 +30,377 @@
width: 19rem;
height: 2rem;
border-left: 0;
- " format="YYYY-MM-DD HH:mm:ss" type="datetimerange" range-separator="~" start-placeholder="璧峰鏃ユ湡"
- end-placeholder="鎴鏃ユ湡" size="small" />
+ "
+ format="YYYY-MM-DD HH:mm:ss"
+ type="datetimerange"
+ range-separator="~"
+ start-placeholder="璧峰鏃ユ湡"
+ end-placeholder="鎴鏃ユ湡"
+ size="small"
+ />
</div>
<div class="serch_box">
<div class="serchb">
- <el-select v-model="queryForm.selectType" placeholder="璇烽�夋嫨" size="small"
- style="width: 100%; height: 100%; font-size: 0.15rem">
- <el-option v-for="item in selectoptions" :key="item.value" :label="item.label" :value="item.value" />
+ <el-select
+ v-model="queryForm.selectType"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ style="width: 100%; height: 100%; font-size: 0.15rem"
+ >
+ <el-option
+ v-for="item in selectoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
</div>
- <input v-model="queryForm.selectInput" placeholder="璇疯緭鍏ュ叧閿瘝鎼滅储" style="border-left: 0.06rem solid #e2e2e2" />
+ <input
+ v-model="queryForm.selectInput"
+ placeholder="璇疯緭鍏ュ叧閿瘝鎼滅储"
+ style="border-left: 0.06rem solid #e2e2e2"
+ />
</div>
- <el-button @click="handleQuery" type="primary" size="small"
- style="margin-left: 0.98rem; height: 2rem">鏌ヨ</el-button>
- <el-button size="small" style="height: 2rem" @click="resetQuery">閲嶇疆</el-button>
+ <el-button
+ @click="handleQuery"
+ type="primary"
+ size="small"
+ style="margin-left: 0.98rem; height: 2rem"
+ >鏌ヨ</el-button
+ >
+ <el-button size="small" style="height: 2rem" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
</div>
<div class="btns">
<div style="display: flex; align-items: center">
<!-- 鐢ㄦ埛鍒楄〃鏂板缓 -->
- <el-button v-if="isactive == 1" type="primary" size="small" @click="dialogVisible = true" style="
+ <el-button
+ v-if="isactive == 1"
+ type="primary"
+ size="small"
+ @click="dialogVisible = true"
+ style="
width: 5.5rem;
height: 2rem;
font-size: 0.88rem;
display: flex;
align-items: center;
- "><el-icon style="margin-right: 0.2rem">
- <Plus />
- </el-icon>鏂板缓</el-button>
+ "
+ ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
+ >鏂板缓</el-button
+ >
<!-- 鐢ㄦ埛瑙掕壊鏂板缓 -->
- <el-button v-if="isactive == 2" type="primary" size="small" @click="AddRole" style="
+ <el-button
+ v-if="isactive == 2"
+ type="primary"
+ size="small"
+ @click="AddRole"
+ style="
width: 5.5rem;
height: 2rem;
font-size: 0.88rem;
display: flex;
align-items: center;
- "><el-icon style="margin-right: 0.2rem">
- <Plus />
- </el-icon>鏂板缓</el-button>
- <el-button v-if="isactive != 3" size="small" style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
- @click="printExcel">鎵归噺瀵煎嚭</el-button>
- <el-button @click="deleteAll" size="small"
- style="width: 5.5rem; height: 2rem; font-size: 0.88rem">鎵归噺鍒犻櫎</el-button>
+ "
+ ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
+ >鏂板缓</el-button
+ >
+ <el-button
+ v-if="isactive != 3"
+ size="small"
+ style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
+ @click="printExcel"
+ >鎵归噺瀵煎嚭</el-button
+ >
+ <el-button
+ @click="deleteAll"
+ size="small"
+ style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
+ >鎵归噺鍒犻櫎</el-button
+ >
</div>
</div>
<div style="margin-top: 1rem; height: 100%">
<!-- 鐢ㄦ埛鍒楄〃 -->
- <el-table empty-text="鏆傛棤鏁版嵁" height="450" v-if="isactive == 1" :data="tableData" style="width: 100%"
+ <el-table
+ empty-text="鏆傛棤鏁版嵁"
+ height="450"
+ v-if="isactive == 1"
+ :data="tableData"
+ style="width: 100%"
:header-cell-style="{
background: 'rgba(250,250,250,1)',
color: '#101010',
fontSize: '0.88rem',
height: '3rem',
border: 'none',
- }" :row-style="{
+ }"
+ :row-style="{
color: '#101010',
fontSize: '0.88rem',
height: '3rem',
- }" @selection-change="UserSelectionChange">
+ }"
+ @selection-change="UserSelectionChange"
+ >
<el-table-column type="selection" align="center" min-width="1%" />
- <el-table-column prop="userName" label="鐧诲綍璐﹀彿" align="center" min-width="2%" />
- <el-table-column prop="userTrueName" label="鐪熷疄濮撳悕" align="center" min-width="3%" />
- <el-table-column prop="phoneNo" label="鑱旂郴鏂瑰紡" align="center" min-width="3%" />
- <el-table-column prop="role_Id" label="鐢ㄦ埛鍒嗙粍" align="center" min-width="2%" />
- <el-table-column prop="roleName" label="鐢ㄦ埛瑙掕壊" align="center" min-width="3%" />
- <el-table-column prop="address" label="浜鸿劯鐓х墖" align="center" min-width="3%">
+ <el-table-column
+ prop="userName"
+ label="鐧诲綍璐﹀彿"
+ align="center"
+ min-width="2%"
+ />
+ <el-table-column
+ prop="userTrueName"
+ label="鐪熷疄濮撳悕"
+ align="center"
+ min-width="3%"
+ />
+ <el-table-column
+ prop="phoneNo"
+ label="鑱旂郴鏂瑰紡"
+ align="center"
+ min-width="3%"
+ />
+ <el-table-column
+ prop="role_Id"
+ label="鐢ㄦ埛鍒嗙粍"
+ align="center"
+ min-width="2%"
+ />
+ <el-table-column
+ prop="roleName"
+ label="鐢ㄦ埛瑙掕壊"
+ align="center"
+ min-width="3%"
+ />
+ <el-table-column
+ prop="address"
+ label="浜鸿劯鐓х墖"
+ align="center"
+ min-width="3%"
+ >
<template #default="scope">
- <el-image style="width: 70px; height: 70px" :src="'http://115.159.85.185:9098' + scope.row.headImageUrl"
- show-progress :initial-index="4" fit="cover" />
+ <el-image
+ style="width: 70px; height: 70px"
+ :src="'http://115.159.85.185:9098' + scope.row.headImageUrl"
+ show-progress
+ :initial-index="4"
+ fit="cover"
+ />
</template>
</el-table-column>
- <el-table-column prop="groupID" label="鐧惧害浜戝垎缁�" align="center" min-width="3%" />
+ <el-table-column
+ prop="groupID"
+ label="鐧惧害浜戝垎缁�"
+ align="center"
+ min-width="3%"
+ />
<el-table-column label="鏄惁鍚敤" align="center" min-width="2%">
<template #default="scope">
- <el-switch :disabled="(userInfo.userName == 'admin' || userInfo.roleId == '1' ? scope.row.userName == 'admin' || scope.row.user_Id == '1' : scope.row.userName == 'admin' || scope.row.user_Id == '1' || scope.row.userName != userInfo.userName
- )
- " v-model="scope.row.enable" :active-value="1" :inactive-value="0" @change="changeSwitch(scope.row)" />
+ <el-switch
+ :disabled="
+ userInfo.userName == 'admin' || userInfo.roleId == '1'
+ ? scope.row.userName == 'admin' || scope.row.user_Id == '1'
+ : scope.row.userName == 'admin' ||
+ scope.row.user_Id == '1' ||
+ scope.row.userName != userInfo.userName
+ "
+ v-model="scope.row.enable"
+ :active-value="1"
+ :inactive-value="0"
+ @change="changeSwitch(scope.row)"
+ />
</template>
</el-table-column>
- <el-table-column prop="createDate" label="鍒涘缓鏃ユ湡" align="center" min-width="3%" />
+ <el-table-column
+ prop="createDate"
+ label="鍒涘缓鏃ユ湡"
+ align="center"
+ min-width="3%"
+ />
<el-table-column label="鎿嶄綔" align="center" min-width="3%">
<template #default="scope">
- <el-button size="small" type="text" @click="Edit(scope.row)" :disabled="scope.row.isdisabled
- ">缂栬緫</el-button>
- <el-button size="small" type="text" :disabled="scope.row.isdisabled
- " @click="Editpassword(scope.row)">淇敼瀵嗙爜</el-button>
- <el-button size="small" type="text" @click="deletUser(scope.row)" :disabled="scope.row.isdisabled
- ">鍒犻櫎</el-button>
+ <el-button
+ size="small"
+ type="text"
+ @click="Edit(scope.row)"
+ :disabled="scope.row.isdisabled"
+ >缂栬緫</el-button
+ >
+ <el-button
+ size="small"
+ type="text"
+ :disabled="scope.row.isdisabled"
+ @click="Editpassword(scope.row)"
+ >淇敼瀵嗙爜</el-button
+ >
+ <el-button
+ size="small"
+ type="text"
+ @click="deletUser(scope.row)"
+ :disabled="scope.row.isdisabled"
+ >鍒犻櫎</el-button
+ >
</template>
</el-table-column>
</el-table>
<!-- 鐢ㄦ埛瑙掕壊 -->
- <el-table empty-text="鏆傛棤鏁版嵁" height="450" v-if="isactive == 2" :data="grideData" style="width: 100%"
+ <el-table
+ empty-text="鏆傛棤鏁版嵁"
+ height="450"
+ v-if="isactive == 2"
+ :data="grideData"
+ style="width: 100%"
:header-cell-style="{
background: 'rgba(250,250,250,1)',
color: '#101010',
fontSize: '0.88rem',
height: '3rem',
border: 'none',
- }" :row-style="{
+ }"
+ :row-style="{
color: '#101010',
fontSize: '0.88rem',
height: '3rem',
- }" @selection-change="RoleSelectionChange">
+ }"
+ @selection-change="RoleSelectionChange"
+ >
<el-table-column type="selection" align="center" />
<el-table-column prop="roleName" label="瑙掕壊鍚嶇О" align="center" />
<el-table-column prop="name" label="瑙掕壊鏉冮檺" align="center">
<template #default="scope">
- <span v-if="!(userInfo.userName == 'admin' || userInfo.roleId == '1' ? scope.row.userName == 'admin' || scope.row.user_Id == '1' : scope.row.userName == 'admin' || scope.row.user_Id == '1' || scope.row.userName != userInfo.userName
- )
- " @click="toDetail(scope.row)" style="color: #4386ff; cursor: pointer">绠$悊</span>
+ <span
+ v-if="
+ !(userInfo.userName == 'admin' || userInfo.roleId == '1'
+ ? scope.row.userName == 'admin' || scope.row.user_Id == '1'
+ : scope.row.userName == 'admin' ||
+ scope.row.user_Id == '1' ||
+ scope.row.userName != userInfo.userName)
+ "
+ @click="toDetail(scope.row)"
+ style="color: #4386ff; cursor: pointer"
+ >绠$悊</span
+ >
</template>
</el-table-column>
<el-table-column prop="deptName" label="澶囨敞" align="center" />
<el-table-column label="鏄惁鍚敤" align="center">
<template #default="scope">
- <el-switch :disabled="!(userInfo.userName == 'admin' || userInfo.roleId == '1'
- )
- " v-model="scope.row.enable" :active-value="1" :inactive-value="0"
- @change="changeRoleSwitch(scope.row)" />
+ <el-switch
+ :disabled="
+ !(userInfo.userName == 'admin' || userInfo.roleId == '1')
+ "
+ v-model="scope.row.enable"
+ :active-value="1"
+ :inactive-value="0"
+ @change="changeRoleSwitch(scope.row)"
+ />
</template>
</el-table-column>
<el-table-column prop="createDate" label="鍒涘缓鏃ユ湡" align="center" />
<el-table-column label="鎿嶄綔" align="center">
<template #default="scope">
- <span v-if="
- !(userInfo.userName == 'admin' || userInfo.roleId == '1' ? scope.row.userName == 'admin' || scope.row.user_Id == '1' : scope.row.userName == 'admin' || scope.row.user_Id == '1' || scope.row.userName != userInfo.userName
- )
- " style="color: blue; font-size: 0.88rem; cursor: pointer" @click="EditRole(scope.row)">缂栬緫</span>
- </template></el-table-column>
+ <span
+ v-if="
+ !(userInfo.userName == 'admin' || userInfo.roleId == '1'
+ ? scope.row.userName == 'admin' || scope.row.user_Id == '1'
+ : scope.row.userName == 'admin' ||
+ scope.row.user_Id == '1' ||
+ scope.row.userName != userInfo.userName)
+ "
+ style="color: blue; font-size: 0.88rem; cursor: pointer"
+ @click="EditRole(scope.row)"
+ >缂栬緫</span
+ >
+ </template></el-table-column
+ >
</el-table>
</div>
- <div style="
+ <div
+ style="
display: flex;
justify-content: right;
align-self: flex-end;
margin-bottom: 1.19rem;
margin-right: 1.25rem;
- ">
- <el-pagination v-if="isactive == 1" size="small" background layout="prev, pager, next"
- :current-page="pageQuery.page" :page-size="pageQuery.rows" :total="pageTotal" @size-change="handleSizeChange"
- @current-change="handleCurrentChange" />
- <el-pagination v-if="isactive == 2" size="small" background layout="prev, pager, next"
- :current-page="pageQuery.page" :page-size="pageQuery.rows" :total="pageTotal1" @size-change="handleSizeChange"
- @current-change="handleCurrentChange" />
+ "
+ >
+ <el-pagination
+ v-if="isactive == 1"
+ size="small"
+ background
+ layout="prev, pager, next"
+ :current-page="pageQuery.page"
+ :page-size="pageQuery.rows"
+ :total="pageTotal"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ />
+ <el-pagination
+ v-if="isactive == 2"
+ size="small"
+ background
+ layout="prev, pager, next"
+ :current-page="pageQuery.page"
+ :page-size="pageQuery.rows"
+ :total="pageTotal1"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ />
</div>
</div>
<!-- 鐢ㄦ埛淇℃伅鏂板缓缂栬緫寮瑰嚭妗� -->
- <el-dialog v-model="dialogVisible" title="" width="60%" :before-close="handleClose" :show-close="false"
- :align-center="true" @close="resetForm(formUserRef)">
+ <el-dialog
+ v-model="dialogVisible"
+ title=""
+ width="60%"
+ :before-close="handleClose"
+ :show-close="false"
+ :align-center="true"
+ @close="resetForm(formUserRef)"
+ >
<template #title>
- <div style="
+ <div
+ style="
height: 3.63rem;
display: flex;
border-bottom: 1px solid #e6e6e6;
- ">
- <span style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold">鐢ㄦ埛淇℃伅</span>
+ "
+ >
+ <span
+ style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold"
+ >鐢ㄦ埛淇℃伅</span
+ >
</div>
</template>
- <el-form :model="formUser" label-width="auto" label-position="top" :rules="rules" ref="formUserRef"
- :hide-required-asterisk="true">
+ <el-form
+ :model="formUser"
+ label-width="auto"
+ label-position="top"
+ :rules="rules"
+ ref="formUserRef"
+ :hide-required-asterisk="true"
+ >
<el-row :gutter="20">
<el-col :span="8">
<el-form-item prop="username">
<template #label>
<div style="display: flex; align-items: flex-end">
<span style="color: red; margin-right: 0.2rem">*</span>
- <span style="font-size: 0.88rem; color: black; font-weight: bold">鐧诲綍璐﹀彿</span>
+ <span
+ style="font-size: 0.88rem; color: black; font-weight: bold"
+ >鐧诲綍璐﹀彿</span
+ >
</div>
</template>
- <el-input size="small" v-model="formUser.username" placeholder="璇疯緭鍏�" />
+ <el-input
+ size="small"
+ v-model="formUser.username"
+ placeholder="璇疯緭鍏�"
+ />
</el-form-item>
</el-col>
<el-col :span="8">
@@ -199,10 +408,17 @@
<template #label>
<div style="display: flex; align-items: flex-end">
<span style="color: red; margin-right: 0.2rem">*</span>
- <span style="font-size: 0.88rem; color: black; font-weight: bold">鐪熷疄濮撳悕</span>
+ <span
+ style="font-size: 0.88rem; color: black; font-weight: bold"
+ >鐪熷疄濮撳悕</span
+ >
</div>
</template>
- <el-input size="small" v-model="formUser.usertruename" placeholder="璇疯緭鍏�" />
+ <el-input
+ size="small"
+ v-model="formUser.usertruename"
+ placeholder="璇疯緭鍏�"
+ />
</el-form-item>
</el-col>
<el-col :span="8">
@@ -210,10 +426,17 @@
<template #label>
<div style="display: flex; align-items: flex-end">
<span style="color: red; margin-right: 0.2rem">*</span>
- <span style="font-size: 0.88rem; color: black; font-weight: bold">鑱旂郴鐢佃瘽</span>
+ <span
+ style="font-size: 0.88rem; color: black; font-weight: bold"
+ >鑱旂郴鐢佃瘽</span
+ >
</div>
</template>
- <el-input size="small" v-model="formUser.phoneno" placeholder="璇疯緭鍏�" />
+ <el-input
+ size="small"
+ v-model="formUser.phoneno"
+ placeholder="璇疯緭鍏�"
+ />
</el-form-item>
</el-col>
</el-row>
@@ -223,13 +446,24 @@
<template #label>
<div style="display: flex; align-items: flex-end">
<span style="color: red; margin-right: 0.2rem">*</span>
- <span style="font-size: 0.88rem; color: black; font-weight: bold">鐢ㄦ埛瑙掕壊
+ <span
+ style="font-size: 0.88rem; color: black; font-weight: bold"
+ >鐢ㄦ埛瑙掕壊
</span>
</div>
</template>
- <el-select v-model="formUser.roleid" placeholder="璇烽�夋嫨" size="small">
- <el-option :disabled="item.roleId == 1" v-for="item in groupOptions" :key="item.roleId"
- :label="item.roleName" :value="item.roleId" />
+ <el-select
+ v-model="formUser.roleid"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ >
+ <el-option
+ :disabled="item.roleId == 1"
+ v-for="item in groupOptions"
+ :key="item.roleId"
+ :label="item.roleName"
+ :value="item.roleId"
+ />
</el-select>
</el-form-item>
</el-col>
@@ -238,12 +472,23 @@
<template #label>
<div style="display: flex; align-items: flex-end">
<span style="color: red; margin-right: 0.2rem">*</span>
- <span style="font-size: 0.88rem; color: black; font-weight: bold">鐢ㄦ埛绫诲瀷
+ <span
+ style="font-size: 0.88rem; color: black; font-weight: bold"
+ >鐢ㄦ埛绫诲瀷
</span>
</div>
</template>
- <el-select v-model="formUser.rolename" placeholder="璇烽�夋嫨" size="small">
- <el-option v-for="item in roleNameList" :key="item.value" :label="item.label" :value="item.value" />
+ <el-select
+ v-model="formUser.rolename"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ >
+ <el-option
+ v-for="item in roleNameList"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
</el-form-item>
</el-col>
@@ -252,11 +497,23 @@
<template #label>
<div style="display: flex; align-items: flex-end">
<span style="color: red; margin-right: 0.2rem">*</span>
- <span style="font-size: 0.88rem; color: black; font-weight: bold">鏄惁鍚敤</span>
+ <span
+ style="font-size: 0.88rem; color: black; font-weight: bold"
+ >鏄惁鍚敤</span
+ >
</div>
</template>
- <el-select v-model="formUser.enable" placeholder="璇烽�夋嫨" size="small">
- <el-option v-for="item in isoptins" :key="item.value" :label="item.label" :value="item.value" />
+ <el-select
+ v-model="formUser.enable"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ >
+ <el-option
+ v-for="item in isoptins"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
</el-form-item>
</el-col>
@@ -267,7 +524,10 @@
<template #label>
<div style="display: flex; align-items: flex-end">
<span style="color: red; margin-right: 0.2rem">*</span>
- <span style="font-size: 0.88rem; color: black; font-weight: bold">浜鸿劯鍥剧墖</span>
+ <span
+ style="font-size: 0.88rem; color: black; font-weight: bold"
+ >浜鸿劯鍥剧墖</span
+ >
<!-- <span
style="
color: rgba(255, 0, 0, 1);
@@ -278,26 +538,50 @@
> -->
</div>
</template>
- <el-upload ref="uploadRef" name="files" class="avatar-uploader"
- action="http://115.159.85.185:9098/api/User/SaveFiles" list-type="picture-card" limit="1"
- :auto-upload="true" @before-upload="beforeAvatarUpload" :on-success="handleAvatarSuccess"
- :file-list="fileList != [] ? fileList : []" :class="{ hide: showUpload }">
+ <el-upload
+ ref="uploadRef"
+ name="files"
+ class="avatar-uploader"
+ action="http://115.159.85.185:9098/api/User/SaveFiles"
+ list-type="picture-card"
+ limit="1"
+ :auto-upload="true"
+ @before-upload="beforeAvatarUpload"
+ :on-success="handleAvatarSuccess"
+ :file-list="fileList != [] ? fileList : []"
+ :class="{ hide: showUpload }"
+ >
<el-icon>
<Plus />
</el-icon>
<template #file="{ file }">
<div>
- <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+ <img
+ class="el-upload-list__item-thumbnail"
+ :src="file.url"
+ alt=""
+ />
<span class="el-upload-list__item-actions">
- <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+ <span
+ class="el-upload-list__item-preview"
+ @click="handlePictureCardPreview(file)"
+ >
<el-icon size="15"><zoom-in /></el-icon>
</span>
- <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
+ <span
+ v-if="!disabled"
+ class="el-upload-list__item-delete"
+ @click="handleDownload(file)"
+ >
<el-icon size="15">
<Download />
</el-icon>
</span>
- <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+ <span
+ v-if="!disabled"
+ class="el-upload-list__item-delete"
+ @click="handleRemove(file)"
+ >
<el-icon size="15">
<Delete />
</el-icon>
@@ -312,9 +596,19 @@
</el-form>
<template #footer>
<div class="dialog-footer" style="text-align: center">
- <el-button size="small" @click="dialogVisible = false" style="height: 2rem; font-size: 0.88rem">鍙栨秷</el-button>
+ <el-button
+ size="small"
+ @click="dialogVisible = false"
+ style="height: 2rem; font-size: 0.88rem"
+ >鍙栨秷</el-button
+ >
- <el-button size="small" type="primary" @click="saveObj(formUserRef)" style="height: 2rem; font-size: 0.88rem">
+ <el-button
+ size="small"
+ type="primary"
+ @click="saveObj(formUserRef)"
+ style="height: 2rem; font-size: 0.88rem"
+ >
淇濆瓨
</el-button>
</div>
@@ -322,21 +616,39 @@
</el-dialog>
<!-- 鐢ㄦ埛淇℃伅淇敼瀵嗙爜寮瑰嚭妗� -->
- <el-dialog v-model="dialogVisible1" title="" width="30%" :before-close="handleClose" :show-close="false"
- :align-center="true">
+ <el-dialog
+ v-model="dialogVisible1"
+ title=""
+ width="30%"
+ :before-close="handleClose"
+ :show-close="false"
+ :align-center="true"
+ >
<template #title>
- <div style="
+ <div
+ style="
height: 3.63rem;
display: flex;
border-bottom: 1px solid #e6e6e6;
- ">
- <span style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold">鐢ㄦ埛淇℃伅</span>
+ "
+ >
+ <span
+ style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold"
+ >鐢ㄦ埛淇℃伅</span
+ >
</div>
</template>
- <el-form :model="newobj" label-width="auto" label-position="top" ref="formpasswordRef" :rules="passwordrules">
+ <el-form
+ :model="newobj"
+ label-width="auto"
+ label-position="top"
+ ref="formpasswordRef"
+ :rules="passwordrules"
+ >
<el-row>
<el-col>
- <div style="
+ <div
+ style="
height: 3.63rem;
display: flex;
align-items: center;
@@ -344,23 +656,40 @@
padding: 0 2rem;
box-sizing: border-box;
border-radius: 0.25rem;
- ">
- <span style="color: #51b820; font-size: 1rem">璐﹀彿锛歿{ formpassword.userName }}</span><span
- style="color: #51b820; font-size: 1rem; margin-left: 2rem">鐢ㄦ埛锛歿{ formpassword.roleName }}</span>
+ "
+ >
+ <span style="color: #51b820; font-size: 1rem"
+ >璐﹀彿锛歿{ formpassword.userName }}</span
+ ><span style="color: #51b820; font-size: 1rem; margin-left: 2rem"
+ >鐢ㄦ埛锛歿{ formpassword.roleName }}</span
+ >
</div>
</el-col>
</el-row>
<el-form-item prop="newPwd">
- <el-input style="margin-top: 1rem" size="large" v-model="newobj.newPwd" placeholder="璇疯緭鍏�" />
+ <el-input
+ style="margin-top: 1rem"
+ size="large"
+ v-model="newobj.newPwd"
+ placeholder="璇疯緭鍏�"
+ />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer" style="text-align: center">
- <el-button size="small" @click="dialogVisible1 = false"
- style="height: 2rem; font-size: 0.88rem">鍙栨秷</el-button>
+ <el-button
+ size="small"
+ @click="dialogVisible1 = false"
+ style="height: 2rem; font-size: 0.88rem"
+ >鍙栨秷</el-button
+ >
- <el-button size="small" type="primary" @click="savePassword(formpasswordRef)"
- style="height: 2rem; font-size: 0.88rem">
+ <el-button
+ size="small"
+ type="primary"
+ @click="savePassword(formpasswordRef)"
+ style="height: 2rem; font-size: 0.88rem"
+ >
淇濆瓨
</el-button>
</div>
@@ -368,44 +697,84 @@
</el-dialog>
<!-- 鐢ㄦ埛瑙掕壊鏂板缓 -->
- <el-dialog v-model="dialogVisible2" title="" width="20%" :before-close="handleClose" :show-close="false"
- :align-center="true" @close="resetForm1(formRoleRef)">
+ <el-dialog
+ v-model="dialogVisible2"
+ title=""
+ width="20%"
+ :before-close="handleClose"
+ :show-close="false"
+ :align-center="true"
+ @close="resetForm1(formRoleRef)"
+ >
<template #title>
- <div style="
+ <div
+ style="
height: 3.63rem;
display: flex;
border-bottom: 1px solid #e6e6e6;
- ">
- <span style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold">鐢ㄦ埛瑙掕壊</span>
+ "
+ >
+ <span
+ style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold"
+ >鐢ㄦ埛瑙掕壊</span
+ >
</div>
</template>
- <el-form :model="formRole" label-width="auto" label-position="top" ref="formRoleRef" :rules="roleRules"
- :hide-required-asterisk="true">
+ <el-form
+ :model="formRole"
+ label-width="auto"
+ label-position="top"
+ ref="formRoleRef"
+ :rules="roleRules"
+ :hide-required-asterisk="true"
+ >
<el-form-item prop="roleName">
<template #label>
<div style="display: flex; align-items: flex-end">
<span style="color: red; margin-right: 0.2rem">*</span>
- <span style="font-size: 0.88rem; color: black; font-weight: bold">瑙掕壊鍚嶇О</span>
+ <span style="font-size: 0.88rem; color: black; font-weight: bold"
+ >瑙掕壊鍚嶇О</span
+ >
</div>
</template>
- <el-input style="height: 2rem" size="small" v-model="formRole.roleName" placeholder="璇疯緭鍏�" />
+ <el-input
+ style="height: 2rem"
+ size="small"
+ v-model="formRole.roleName"
+ placeholder="璇疯緭鍏�"
+ />
</el-form-item>
<el-form-item>
<template #label>
<div style="display: flex; align-items: flex-end">
- <span style="font-size: 0.88rem; color: black; font-weight: bold">澶囨敞</span>
+ <span style="font-size: 0.88rem; color: black; font-weight: bold"
+ >澶囨敞</span
+ >
</div>
</template>
- <el-input style="height: 2rem" size="small" v-model="formRole.description" placeholder="璇疯緭鍏�" />
+ <el-input
+ style="height: 2rem"
+ size="small"
+ v-model="formRole.description"
+ placeholder="璇疯緭鍏�"
+ />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer" style="text-align: center">
- <el-button size="small" @click="dialogVisible2 = false"
- style="height: 2rem; font-size: 0.88rem">鍙栨秷</el-button>
+ <el-button
+ size="small"
+ @click="dialogVisible2 = false"
+ style="height: 2rem; font-size: 0.88rem"
+ >鍙栨秷</el-button
+ >
- <el-button size="small" type="primary" @click="saveRole(formRoleRef)"
- style="height: 2rem; font-size: 0.88rem">
+ <el-button
+ size="small"
+ type="primary"
+ @click="saveRole(formRoleRef)"
+ style="height: 2rem; font-size: 0.88rem"
+ >
淇濆瓨
</el-button>
</div>
@@ -414,13 +783,15 @@
<!-- 鏉冮檺绠$悊寮瑰嚭妗� -->
<el-dialog v-model="imgdialogVisible">
- <div style="
+ <div
+ style="
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
- ">
+ "
+ >
<img w-full :src="dialogImageUrl" alt="Preview Image" />
</div>
</el-dialog>
@@ -528,7 +899,7 @@
const dialogVisible = ref(false);
const imgdialogVisible = ref(false);
const dialogImageUrl = ref("");
-const userInfo = ref()
+const userInfo = ref();
//鐢ㄦ埛淇℃伅淇敼瀵嗙爜寮瑰嚭妗�
const dialogVisible1 = ref(false);
//鐢ㄦ埛瑙掕壊鏂板缓
@@ -618,7 +989,12 @@
tableData.value = res.data.items.map((item) => {
return {
...item,
- isdisabled: userInfo.value.userName == 'admin' || userInfo.value.roleId == "1" ? item.userName == "admin" || item.user_Id == "1" : item.userName == "admin" || item.user_Id == "1" || item.userName != userInfo.value.userName
+ isdisabled:
+ userInfo.value.userName == "admin" || userInfo.value.roleId == "1"
+ ? item.userName == "admin" || item.user_Id == "1"
+ : item.userName == "admin" ||
+ item.user_Id == "1" ||
+ item.userName != userInfo.value.userName,
};
});
pageTotal.value = res.data.totalCount;
@@ -1056,6 +1432,7 @@
<style lang="scss" scoped>
.Usermanagement {
display: flex;
+ flex-direction: column;
background-color: #fff;
.content {
--
Gitblit v1.9.3