Merge pull request '邓洁 : 修复bug' (#198) from dengjie into dev
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/198
This commit is contained in:
@@ -47,6 +47,8 @@ const authStore = useAuthStore();
|
|||||||
const loginForm = reactive({
|
const loginForm = reactive({
|
||||||
username: "admin",
|
username: "admin",
|
||||||
password: "123456",
|
password: "123456",
|
||||||
|
// username: "",
|
||||||
|
// password: "",
|
||||||
code: "",
|
code: "",
|
||||||
uuid: "",
|
uuid: "",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -165,12 +165,12 @@ const formRules = ref({
|
|||||||
const formInstance = ref()
|
const formInstance = ref()
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
getSiteList({
|
getSiteList({
|
||||||
// userId:userId,
|
userId:userId,
|
||||||
...pageInfo
|
...pageInfo
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
total.value = res.data.total;
|
total.value = res.data.total;
|
||||||
showAddIcon.value = total.value % 6!==0;
|
showAddIcon.value = total.value % 6!==0;
|
||||||
showFirst.value = total.value / pageInfo.pageSize >= 1;
|
showFirst.value = total.value / pageInfo.pageSize > 1;
|
||||||
res.data.rows.map(item => {
|
res.data.rows.map(item => {
|
||||||
if (item.tunnelList === null || item.tunnelList.length === 0) {
|
if (item.tunnelList === null || item.tunnelList.length === 0) {
|
||||||
item.info = info.value
|
item.info = info.value
|
||||||
@@ -188,7 +188,6 @@ const handleClickSite = (type) => {
|
|||||||
if (type.checked) {
|
if (type.checked) {
|
||||||
siteIds.value.push(type.siteId)
|
siteIds.value.push(type.siteId)
|
||||||
siteNameList.value.push(type.siteName)
|
siteNameList.value.push(type.siteName)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
siteIds.value.map((item, index) => {
|
siteIds.value.map((item, index) => {
|
||||||
if (item === type.siteId) {
|
if (item === type.siteId) {
|
||||||
@@ -260,6 +259,15 @@ const handleSubmit = (instance) => {
|
|||||||
const handleChooseAll=()=>{
|
const handleChooseAll=()=>{
|
||||||
siteList.value.map(item=>{
|
siteList.value.map(item=>{
|
||||||
item.checked=!item.checked
|
item.checked=!item.checked
|
||||||
|
if(item.checked&&!item.isDefault){
|
||||||
|
siteIds.value.push(item.siteId)
|
||||||
|
}else if(!item.checked&&!item.isDefault){
|
||||||
|
siteIds.value.map((newItem, index) => {
|
||||||
|
if (newItem === item.siteId) {
|
||||||
|
siteIds.value.splice(index, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleMoreDelete = () => {
|
const handleMoreDelete = () => {
|
||||||
|
|||||||
@@ -269,7 +269,6 @@ const handleGoSiteOrIndex = () => {
|
|||||||
} else if (type === 'i') {
|
} else if (type === 'i') {
|
||||||
router.push('/')
|
router.push('/')
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
getTunnelList({
|
getTunnelList({
|
||||||
@@ -333,6 +332,15 @@ const handleGoToEditTunnel = (tunnelId) => {
|
|||||||
const handleChooseAll = () => {
|
const handleChooseAll = () => {
|
||||||
tunnelList.value.map(item => {
|
tunnelList.value.map(item => {
|
||||||
item.checked = !item.checked
|
item.checked = !item.checked
|
||||||
|
if(item.checked&&!item.isDefault){
|
||||||
|
tunnelIds.value.push(item.tunnelId)
|
||||||
|
}else if(!item.checked&&!item.isDefault){
|
||||||
|
tunnelIds.value.map((newItem, index) => {
|
||||||
|
if (newItem === item.tunnelId) {
|
||||||
|
tunnelIds.value.splice(index, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleEditDevice = (tunnelId) => {
|
const handleEditDevice = (tunnelId) => {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
<!-- <div class="all-btn" @click="handleAll">-->
|
<!-- <div class="all-btn" @click="handleAll">-->
|
||||||
<!-- 全选-->
|
<!-- 全选-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div class="all-btn del-btn" @click="handleDelete">
|
<!-- <div class="all-btn del-btn" @click="handleDelete">-->
|
||||||
删除
|
<!-- 删除-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-content">
|
<div class="user-content">
|
||||||
@@ -24,12 +24,18 @@
|
|||||||
v-model="username"
|
v-model="username"
|
||||||
clearable
|
clearable
|
||||||
placeholder="输入搜索内容"
|
placeholder="输入搜索内容"
|
||||||
|
@clear="getInfo"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" :icon="Search" style="margin-left: 20px" @click="getInfo">搜索</el-button>
|
<el-button type="primary" :icon="Search" style="margin-left: 20px" @click="getInfo">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>用户管理</div>
|
<div>用户管理</div>
|
||||||
<div class="add-btn" @click="handleAddUser">添加用户</div>
|
<div class="all-del-btn">
|
||||||
|
<div class="add-btn" @click="handleAddUser">添加用户</div>
|
||||||
|
<div class="all-btn del-btn" @click="handleDelete">
|
||||||
|
删除
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="device-table">
|
<div class="device-table">
|
||||||
<el-table stripe ref="multipleTable" @select="handleSelect"
|
<el-table stripe ref="multipleTable" @select="handleSelect"
|
||||||
@@ -61,18 +67,19 @@
|
|||||||
<el-form-item label="当前站点">
|
<el-form-item label="当前站点">
|
||||||
<div class="current-site">{{ currentSite }}<span>如果需要切换站点,请返回首屏切换</span></div>
|
<div class="current-site">{{ currentSite }}<span>如果需要切换站点,请返回首屏切换</span></div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="输入用户名称">
|
<el-form-item label="输入账户">
|
||||||
<el-input v-model="form.userName" placeholder="请输入用户名称"/>
|
<el-input v-model="form.userName" placeholder="请输入账户"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="输入用户昵称">
|
<el-form-item label="输入密码" v-if="title==='添加用户'">
|
||||||
<el-input v-model="form.nickName" placeholder="请输入用户昵称"/>
|
<el-input type="password" show-password v-model="form.password" placeholder="请输入密码"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="输入昵称">
|
||||||
|
<el-input v-model="form.nickName" placeholder="请输入昵称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="输入电话号码">
|
<el-form-item label="输入电话号码">
|
||||||
<el-input v-model="form.phoneNumber" placeholder="输入电话号码"/>
|
<el-input v-model="form.phoneNumber" placeholder="输入电话号码"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="输入密码" v-if="title==='添加用户'">
|
|
||||||
<el-input v-model="form.password" placeholder="请输入密码"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="选择身份">
|
<el-form-item label="选择身份">
|
||||||
<el-radio-group v-model="form.roleId" @change="(val) => {
|
<el-radio-group v-model="form.roleId" @change="(val) => {
|
||||||
console.log('vaaa',val)
|
console.log('vaaa',val)
|
||||||
@@ -136,7 +143,7 @@ const tunnelIndex = ref()
|
|||||||
const username = ref()
|
const username = ref()
|
||||||
const userIds = ref()
|
const userIds = ref()
|
||||||
const showFirst = ref(true)
|
const showFirst = ref(true)
|
||||||
const currentSite = ref()
|
const currentSite = ref('')
|
||||||
const formInstance = ref()
|
const formInstance = ref()
|
||||||
const userData = ref([])
|
const userData = ref([])
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
@@ -191,18 +198,23 @@ const handleAll = () => {
|
|||||||
multipleTable.value.toggleAllSelection()
|
multipleTable.value.toggleAllSelection()
|
||||||
}
|
}
|
||||||
const handleDelete = () => {
|
const handleDelete = () => {
|
||||||
ElMessageBox.confirm(`是否确认删除该用户吗?`, '系统提示', {
|
console.log('userIds.value',userIds.value)
|
||||||
confirmButtonText: '确定',
|
if (userIds.value ===undefined) {
|
||||||
cancelButtonText: '取消',
|
ElMessage.warning('请先选择用户进行删除')
|
||||||
type: 'warning'
|
} else {
|
||||||
}).then(() => {
|
ElMessageBox.confirm(`是否确认删除该用户吗?`, '系统提示', {
|
||||||
deleteUser(userIds.value).then(res => {
|
confirmButtonText: '确定',
|
||||||
if (res.code === 1000) {
|
cancelButtonText: '取消',
|
||||||
ElMessage.success(res.msg)
|
type: 'warning'
|
||||||
getInfo()
|
}).then(() => {
|
||||||
}
|
deleteUser(userIds.value).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success(res.msg)
|
||||||
|
getInfo()
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
form.value = {
|
form.value = {
|
||||||
@@ -236,12 +248,12 @@ const getInfo = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
getInfo()
|
getInfo()
|
||||||
const firstPage=()=>{
|
const firstPage = () => {
|
||||||
pageInfo.pageNum = 1
|
pageInfo.pageNum = 1
|
||||||
getInfo()
|
getInfo()
|
||||||
}
|
}
|
||||||
const lastPage=()=>{
|
const lastPage = () => {
|
||||||
pageInfo.pageNum = total.value/pageInfo.pageSize
|
pageInfo.pageNum = total.value / pageInfo.pageSize
|
||||||
getInfo()
|
getInfo()
|
||||||
}
|
}
|
||||||
//点击页码进行分页功能
|
//点击页码进行分页功能
|
||||||
@@ -263,6 +275,7 @@ const handleSubmit = async (formInstance) => {
|
|||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
getInfo()
|
getInfo()
|
||||||
isVisited.value = false
|
isVisited.value = false
|
||||||
|
ElMessage.success(res.msg)
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning(res.msg)
|
ElMessage.warning(res.msg)
|
||||||
}
|
}
|
||||||
@@ -272,6 +285,7 @@ const handleSubmit = async (formInstance) => {
|
|||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
getInfo()
|
getInfo()
|
||||||
isVisited.value = false
|
isVisited.value = false
|
||||||
|
ElMessage.success(res.msg)
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning(res.msg)
|
ElMessage.warning(res.msg)
|
||||||
}
|
}
|
||||||
@@ -294,15 +308,26 @@ const handleSelect = async (selection, row) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.current-site{
|
:deep(.el-input .el-input__password) {
|
||||||
font-size: 38px;color: #FFFFFF;
|
font-size: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input__clear) {
|
||||||
|
font-size: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.current-site {
|
||||||
|
font-size: 41px;
|
||||||
|
color: #FFFFFF;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
>span{
|
|
||||||
font-size: 30px!important;
|
> span {
|
||||||
color: darkgray!important;
|
font-size: 38px !important;
|
||||||
|
color: darkgray !important;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
:deep(.el-table__header-wrapper .el-checkbox) {
|
:deep(.el-table__header-wrapper .el-checkbox) {
|
||||||
display: none
|
display: none
|
||||||
}
|
}
|
||||||
@@ -390,31 +415,32 @@ const handleSelect = async (selection, row) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.all-del-btn {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.del-btn {
|
}
|
||||||
width: 168px;
|
|
||||||
height: 60px;
|
|
||||||
background: #08B7B8;
|
|
||||||
border-radius: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.all-btn {
|
.all-del-btn {
|
||||||
cursor: pointer;
|
display: flex;
|
||||||
padding-left: 53px;
|
|
||||||
width: 178px;
|
|
||||||
height: 70px;
|
|
||||||
line-height: 70px;
|
|
||||||
border-radius: 11px;
|
|
||||||
border: 2px solid #08B7B8;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-size: 38px;
|
|
||||||
|
|
||||||
&:last-child {
|
.del-btn {
|
||||||
margin-left: 40px;
|
width: 168px;
|
||||||
margin-right: 70px;
|
height: 60px;
|
||||||
}
|
background: #08B7B8;
|
||||||
|
border-radius: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.all-btn {
|
||||||
|
cursor: pointer;
|
||||||
|
padding-left: 53px;
|
||||||
|
width: 178px;
|
||||||
|
height: 70px;
|
||||||
|
line-height: 70px;
|
||||||
|
border-radius: 11px;
|
||||||
|
border: 2px solid #08B7B8;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 38px;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-left: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -433,7 +459,7 @@ const handleSelect = async (selection, row) => {
|
|||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
border: 2px solid #05FEFF;
|
border: 2px solid #05FEFF;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 73px 98px;
|
padding: 73px 58px;
|
||||||
|
|
||||||
.user-top {
|
.user-top {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -452,14 +478,15 @@ const handleSelect = async (selection, row) => {
|
|||||||
|
|
||||||
.add-btn {
|
.add-btn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 170px;
|
width: 180px;
|
||||||
height: 60px;
|
height: 70px;
|
||||||
line-height: 60px;
|
line-height: 70px;
|
||||||
background: #08B7B8;
|
background: #08B7B8;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
font-size: 35px;
|
font-size: 38px;
|
||||||
padding-left: 19px;
|
padding-left: 19px;
|
||||||
|
//margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
@@ -467,25 +494,25 @@ const handleSelect = async (selection, row) => {
|
|||||||
|
|
||||||
:deep(.el-button) {
|
:deep(.el-button) {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
height: 60px;
|
height: 70px;
|
||||||
background: #08B7B8;
|
background: #08B7B8;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 35px;
|
font-size: 38px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-input__wrapper) {
|
:deep(.el-input__wrapper) {
|
||||||
width: 292px;
|
width: 300px;
|
||||||
height: 60px;
|
height: 70px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: 1px solid #05FEFF;
|
border: 1px solid #05FEFF;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
font-size: 35px;
|
font-size: 38px;
|
||||||
|
|
||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
height: 60px;
|
height: 70px;
|
||||||
line-height: 60px;
|
line-height: 70px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -493,7 +520,7 @@ const handleSelect = async (selection, row) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-table--fit) {
|
:deep(.el-table--fit) {
|
||||||
width: 2000px !important;
|
width: 2110px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.cell) {
|
:deep(.cell) {
|
||||||
|
|||||||
Reference in New Issue
Block a user