no message
This commit is contained in:
parent
a2b0cf6d4f
commit
18541887dc
@ -13,8 +13,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= VUE_APP_TITLE %> doesn't work properly without JavaScript
|
||||
enabled. Please enable it to continue.</strong>
|
||||
<strong>We're sorry but <%= VUE_APP_TITLE %> doesn't work properly without JavaScript enabled.</strong>
|
||||
</noscript>
|
||||
<script type="text/javascript">
|
||||
var dark = window.localStorage.getItem('APP_DARK');
|
||||
@ -26,7 +25,6 @@
|
||||
<div class="app-loading">
|
||||
<div class="app-loading__logo"> </div>
|
||||
<div class="app-loading__loader"></div>
|
||||
<!-- <div class="app-loading__title"><%= VUE_APP_TITLE %></div> -->
|
||||
</div>
|
||||
<style>
|
||||
.app-loading {position: absolute;top:0px;left:0px;right:0px;bottom:0px;display: flex;justify-content: center;align-items: center;flex-direction: column;background: #fff;}
|
||||
@ -34,10 +32,8 @@
|
||||
.app-loading__logo img {width: 90px;vertical-align: bottom;}
|
||||
.app-loading__loader {box-sizing: border-box;width: 35px;height: 35px;border: 5px solid transparent;border-top-color: #000;border-radius: 50%;animation: .5s loader linear infinite;position: relative;}
|
||||
.app-loading__loader:before {box-sizing: border-box;content: '';display: block;width: inherit;height: inherit;position: absolute;top: -5px;left: -5px;border: 5px solid #ccc;border-radius: 50%;opacity: .5;}
|
||||
.app-loading__title {font-size: 24px;color: #333;margin-top: 30px;}
|
||||
.dark .app-loading {background: #222225;}
|
||||
.dark .app-loading__loader {border-top-color: #fff;}
|
||||
.dark .app-loading__title {color: #d0d0d0;}
|
||||
@keyframes loader {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
@ -48,7 +44,6 @@
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
<div id="versionCheck" style="display: none;position: absolute;z-index: 99;top:0;left:0;right:0;bottom:0;padding:150px 20px;background:rgba(255,255,255,0.8);color: #333;">
|
||||
<h2 style="line-height: 1;margin: 0;font-size: 24px;">当前浏览器内核版本过低</h2>
|
||||
|
@ -51,7 +51,7 @@
|
||||
methods: {
|
||||
async getData(){
|
||||
this.loading = true
|
||||
var res = await this.$api.system.tasks.list.get()
|
||||
var res = await this.$http.get('tasks')
|
||||
this.tasks = res.data
|
||||
this.loading = false
|
||||
},
|
||||
|
@ -6,10 +6,10 @@
|
||||
<div class="screen panel-item hidden-sm-and-down" @click="screen">
|
||||
<el-icon><el-icon-full-screen /></el-icon>
|
||||
</div>
|
||||
<!-- <div class="tasks panel-item" @click="tasks">
|
||||
<div class="tasks panel-item" @click="tasks">
|
||||
<el-icon><el-icon-sort /></el-icon>
|
||||
</div>
|
||||
<div class="msg panel-item" @click="showMsg">
|
||||
<!-- <div class="msg panel-item" @click="showMsg">
|
||||
<el-badge :hidden="msgList.length==0" :value="msgList.length" class="badge" type="danger">
|
||||
<el-icon><el-icon-chat-dot-round /></el-icon>
|
||||
</el-badge>
|
||||
@ -53,7 +53,7 @@
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="uc">帐号信息</el-dropdown-item>
|
||||
<el-dropdown-item command="userinfo">帐号信息</el-dropdown-item>
|
||||
<el-dropdown-item command="clearCache">清除缓存</el-dropdown-item>
|
||||
<el-dropdown-item divided command="outLogin">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@ -126,8 +126,8 @@
|
||||
methods: {
|
||||
//个人信息
|
||||
handleUser(command) {
|
||||
if(command == "uc"){
|
||||
this.$router.push({path: '/usercenter'});
|
||||
if(command == "userinfo"){
|
||||
this.$router.push({path: '/user/index/info'});
|
||||
}
|
||||
if(command == "cmd"){
|
||||
this.$router.push({path: '/cmd'});
|
||||
|
206
src/views/user/group/index.vue
Normal file
206
src/views/user/group/index.vue
Normal file
@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<el-main>
|
||||
<el-card shadow="never">
|
||||
<x-select-filter :data="data" :selected-values="selectedValues" :label-width="80" @on-change="change"></x-select-filter>
|
||||
</el-card>
|
||||
<el-card class="userlose" shadow="never" style="margin-top: 10px;">
|
||||
<el-container>
|
||||
<el-header v-auths="['user.group']">
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<x-table :api="api" :hideDo="true" size="large" stripe ref="table" :params="filterData" :hidePagination="true">
|
||||
<el-table-column prop="id" fixed sortable label="GroupID" align="center" width="120" />
|
||||
|
||||
<el-table-column prop="title" label="名称" width="180" />
|
||||
<el-table-column prop="alias" label="别名" width="180" />
|
||||
|
||||
<el-table-column prop="status" label="状态" width="90">
|
||||
<template #default="scope">
|
||||
<x-status-indicator pulse type="success" v-if="scope.row.status==1" label="开启" />
|
||||
<x-status-indicator pulse type="info" v-if="scope.row.status==0" label="关闭" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="anicount" label="积分" width="100" v-if="filterData.type=='member'" />
|
||||
|
||||
<el-table-column prop="anicount" label="主图" width="100" v-if="filterData.type=='member'">
|
||||
<template #default="scope">
|
||||
<el-image :preview-src-list="[scope.row.image.url]" :preview-teleported="true" hide-on-click-modal="true" lazy="true" style="width: 30px; height: 30px" fit="cover" :src="scope.row.image.url">
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
无图
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column prop="aid" label="控制台模块" width="120" v-if="filterData.type=='system'">
|
||||
<template #default="scope">
|
||||
<el-badge :value="scope.row.authority.grid ? scope.row.authority.grid.length:0" type="warning"></el-badge>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="aid" label="菜单" width="80" v-if="filterData.type=='system'">
|
||||
<template #default="scope">
|
||||
<el-badge :value="scope.row.authority.menu ? scope.row.authority.menu.length:0" type="primary"></el-badge>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="message" label="备注">
|
||||
<template #default="scope">
|
||||
<input class="el-input__inner" type="text" readonly :value="scope.row.message">
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" align="right" width="160">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button text type="primary" size="small" @click="group_show(scope.row, scope.$index)">查看</el-button>
|
||||
<el-button text type="primary" size="small" @click="group_edit(scope.row, scope.$index)" v-auths="['user.group']">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="group_del(scope.row, scope.$index)" >
|
||||
<template #reference>
|
||||
<el-button text type="primary" size="small" v-auths="['user.group']">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</x-table>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-card>
|
||||
</el-main>
|
||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save=false"></save-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<style>
|
||||
.userlose .el-card__body{
|
||||
padding: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import xSelectFilter from '@/components/xSelectFilter'
|
||||
import saveDialog from './save'
|
||||
|
||||
export default {
|
||||
name: 'selectFilter',
|
||||
components: {
|
||||
xSelectFilter,
|
||||
saveDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [
|
||||
{
|
||||
title: "用户组",
|
||||
key: "type",
|
||||
options: [
|
||||
{
|
||||
label: "系统组",
|
||||
value: "system",
|
||||
icon: "el-icon-flag"
|
||||
},
|
||||
{
|
||||
label: "用户组",
|
||||
value: "member",
|
||||
icon: "el-icon-bottom-left"
|
||||
},
|
||||
{
|
||||
label: "自定义会员组",
|
||||
value: "default",
|
||||
icon: "el-icon-circle-close"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
selectedValues: {
|
||||
type: ["system"]
|
||||
},
|
||||
filterData: {
|
||||
type:'system'
|
||||
},
|
||||
search: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false
|
||||
},
|
||||
api:'user/group/lists'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredItems() {
|
||||
return this.items.filter(item => item.category === 'Category A');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
//本地更新数据
|
||||
handleSaveSuccess(){
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
//添加
|
||||
add(){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open().setData({type:this.filterData.type})
|
||||
})
|
||||
},
|
||||
//编辑
|
||||
group_edit(row){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open('edit').setData(row)
|
||||
})
|
||||
},
|
||||
//查看
|
||||
group_show(row){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open('show').setData(row)
|
||||
})
|
||||
},
|
||||
//权限设置
|
||||
permission(){
|
||||
this.dialog.permission = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open()
|
||||
})
|
||||
},
|
||||
//删除
|
||||
async group_del(row){
|
||||
var reqData = {id: row.id}
|
||||
var res = await this.$http.post('user/group/delete',reqData);
|
||||
if(res.code == 200){
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success("删除成功");
|
||||
return false;
|
||||
}
|
||||
this.$alert(res.message, "提示", {type: 'error'})
|
||||
},
|
||||
change(selected){
|
||||
this.filterData = selected
|
||||
this.$refs.table.reload(this.filterData)
|
||||
},
|
||||
//表格内开关
|
||||
changeSwitch(val, row){
|
||||
row.status = row.status == '1'?'0':'1'
|
||||
row.$switch_status = true;
|
||||
setTimeout(()=>{
|
||||
delete row.$switch_status;
|
||||
row.status = val;
|
||||
this.$message.success("操作成功")
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<x-dialog :title="titleMap[mode]" v-model="visible" :width="900" destroy-on-close @closed="$emit('closed')">
|
||||
|
||||
<el-main style="padding: 10px 20px;">
|
||||
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="left">
|
||||
|
||||
<el-form-item label="角色名称" prop="title">
|
||||
<el-input v-model="form.title" clearable></el-input>
|
||||
</el-form-item>
|
||||
@ -71,6 +70,7 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<template #footer>
|
||||
<el-button @click="visible=false" >取 消</el-button>
|
||||
<el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="submit()">保 存</el-button>
|
||||
@ -195,7 +195,7 @@
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
var res = await this.$http.post('system/group/submit', this.form);
|
||||
var res = await this.$http.post('user/group/submit', this.form);
|
||||
this.isSaveing = false;
|
||||
if(res.code == 200){
|
||||
this.$emit('success', this.form, this.mode)
|
||||
@ -217,7 +217,7 @@
|
||||
this.dept.checked = this.form.authority.dept || [];
|
||||
|
||||
if (this.form.type=='system') {
|
||||
this.$http.post('system/group/menuSystem',{}).then((res) => {
|
||||
this.$http.post('user/group/menuSystem',{}).then((res) => {
|
||||
if (res.code==200) {
|
||||
// Object.assign(this.$data, res.data);
|
||||
this.menu.list = res.data.menu || [];
|
@ -1,207 +0,0 @@
|
||||
<template>
|
||||
<el-main>
|
||||
<el-card shadow="never">
|
||||
<x-select-filter :data="data" :selected-values="selectedValues" :label-width="80" @on-change="change"></x-select-filter>
|
||||
</el-card>
|
||||
<el-card class="userlose" shadow="never" style="margin-top: 10px;">
|
||||
<el-container>
|
||||
<el-header v-auths="['user.group']">
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<x-table :api="api" ref="table" :params="filterData" :hidePagination="true">
|
||||
<el-table-column prop="id" fixed sortable label="GroupID" align="center" width="100" />
|
||||
|
||||
<el-table-column prop="title" label="名称" width="180" />
|
||||
<el-table-column prop="alias" label="别名" width="180" />
|
||||
|
||||
<el-table-column prop="status" label="状态" width="90">
|
||||
<template #default="scope">
|
||||
<x-status-indicator pulse type="success" v-if="scope.row.status==1" label="开启" />
|
||||
<x-status-indicator pulse type="info" v-if="scope.row.status==0" label="关闭" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="anicount" label="积分" width="100" v-if="filterData.type=='member'" />
|
||||
|
||||
<el-table-column prop="anicount" label="主图" width="100" v-if="filterData.type=='member'">
|
||||
<template #default="scope">
|
||||
<el-image :preview-src-list="[scope.row.image.url]" :preview-teleported="true" hide-on-click-modal="true" lazy="true" style="width: 30px; height: 30px" fit="cover" :src="scope.row.image.url">
|
||||
<template #error>
|
||||
<div class="image-slot">
|
||||
无图
|
||||
</div>
|
||||
</template>
|
||||
</el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column prop="aid" label="控制台模块" width="100" v-if="filterData.type=='system'">
|
||||
<template #default="scope">
|
||||
<el-badge :value="scope.row.authority.grid ? scope.row.authority.grid.length:0" type="warning"></el-badge>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="aid" label="菜单" width="80" v-if="filterData.type=='system'">
|
||||
<template #default="scope">
|
||||
<el-badge :value="scope.row.authority.menu ? scope.row.authority.menu.length:0" type="primary"></el-badge>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="message" label="备注">
|
||||
<template #default="scope">
|
||||
<input class="el-input__inner" type="text" readonly :value="scope.row.message">
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" align="right" width="160">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button text type="primary" size="small" @click="group_show(scope.row, scope.$index)">查看</el-button>
|
||||
<el-button text type="primary" size="small" @click="group_edit(scope.row, scope.$index)" v-auths="['user.group']">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="group_del(scope.row, scope.$index)" >
|
||||
<template #reference>
|
||||
<el-button text type="primary" size="small" v-auths="['user.group']">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</x-table>
|
||||
</el-main>
|
||||
<!-- <pre>{{ filterData }}</pre> -->
|
||||
</el-container>
|
||||
</el-card>
|
||||
</el-main>
|
||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save=false"></save-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<style>
|
||||
.userlose .el-card__body{
|
||||
padding: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import xSelectFilter from '@/components/xSelectFilter'
|
||||
import saveDialog from './role/save'
|
||||
|
||||
export default {
|
||||
name: 'selectFilter',
|
||||
components: {
|
||||
xSelectFilter,
|
||||
saveDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [
|
||||
{
|
||||
title: "用户组",
|
||||
key: "type",
|
||||
options: [
|
||||
{
|
||||
label: "系统组",
|
||||
value: "system",
|
||||
icon: "el-icon-flag"
|
||||
},
|
||||
{
|
||||
label: "用户组",
|
||||
value: "member",
|
||||
icon: "el-icon-bottom-left"
|
||||
},
|
||||
{
|
||||
label: "自定义会员组",
|
||||
value: "default",
|
||||
icon: "el-icon-circle-close"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
selectedValues: {
|
||||
type: ["system"]
|
||||
},
|
||||
filterData: {
|
||||
type:'system'
|
||||
},
|
||||
search: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false
|
||||
},
|
||||
api:'system/group/lists'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredItems() {
|
||||
return this.items.filter(item => item.category === 'Category A');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
//本地更新数据
|
||||
handleSaveSuccess(){
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
//添加
|
||||
add(){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open().setData({type:this.filterData.type})
|
||||
})
|
||||
},
|
||||
//编辑
|
||||
group_edit(row){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open('edit').setData(row)
|
||||
})
|
||||
},
|
||||
//查看
|
||||
group_show(row){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open('show').setData(row)
|
||||
})
|
||||
},
|
||||
//权限设置
|
||||
permission(){
|
||||
this.dialog.permission = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open()
|
||||
})
|
||||
},
|
||||
//删除
|
||||
async group_del(row){
|
||||
var reqData = {id: row.id}
|
||||
var res = await this.$http.post('system/group/delete',reqData);
|
||||
if(res.code == 200){
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success("删除成功");
|
||||
return false;
|
||||
}
|
||||
this.$alert(res.message, "提示", {type: 'error'})
|
||||
},
|
||||
change(selected){
|
||||
this.filterData = selected
|
||||
this.$refs.table.reload(this.filterData)
|
||||
},
|
||||
//表格内开关
|
||||
changeSwitch(val, row){
|
||||
row.status = row.status == '1'?'0':'1'
|
||||
row.$switch_status = true;
|
||||
setTimeout(()=>{
|
||||
delete row.$switch_status;
|
||||
row.status = val;
|
||||
this.$message.success("操作成功")
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user