parent
743ff5e560
commit
44a321d6e1
18 changed files with 1041 additions and 802 deletions
After Width: | Height: | Size: 436 B |
After Width: | Height: | Size: 411 B |
@ -1,271 +1,328 @@ |
||||
<template> |
||||
<div class="page"> |
||||
<h6 class="p-title">筛选</h6> |
||||
<div class="tool"> |
||||
<ul class="filter"> |
||||
<li> |
||||
<el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> |
||||
</li> |
||||
</ul> |
||||
<div> |
||||
<el-button v-auth="'角色权限:新增角色'" type="info" round @click="addRole">新增角色</el-button> |
||||
<el-button v-auth="'角色权限:批量删除'" type="primary" round @click="delAllSelection">批量删除</el-button> |
||||
</div> |
||||
</div> |
||||
|
||||
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys"> |
||||
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column> |
||||
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> |
||||
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250" show-overflow-tooltip></el-table-column> |
||||
<el-table-column label="角色描述" min-width="400" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" align="center" width="200"> |
||||
<template slot-scope="scope"> |
||||
<el-button v-auth="'角色权限:查看'" type="text" @click="showRole(scope.row)">查看</el-button> |
||||
<el-button v-auth="'角色权限:编辑'" v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)">编辑</el-button> |
||||
<el-button v-auth="'角色权限:删除'" v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> |
||||
</div> |
||||
<div class="page"> |
||||
<h6 class="p-title">筛选</h6> |
||||
<div class="tool"> |
||||
<ul class="filter"> |
||||
<li> |
||||
<el-input placeholder="请输入角色名称" |
||||
prefix-icon="el-icon-search" |
||||
v-model.trim="keyword" |
||||
clearable></el-input> |
||||
</li> |
||||
</ul> |
||||
<div> |
||||
<el-button v-auth="'角色权限:新增角色'" |
||||
type="info" |
||||
round |
||||
@click="addRole">新增角色</el-button> |
||||
<el-button v-auth="'角色权限:批量删除'" |
||||
type="primary" |
||||
round |
||||
@click="delAllSelection">批量删除</el-button> |
||||
</div> |
||||
</div> |
||||
|
||||
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false"> |
||||
<el-form ref="form" label-width="80px" :disabled="isDetail"> |
||||
<el-form-item label="角色名称"> |
||||
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="角色描述"> |
||||
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="role" label="角色权限"> |
||||
<div style="max-height: 300px; overflow: auto"> |
||||
<el-tree |
||||
ref="per" |
||||
:data="permissions" |
||||
show-checkbox |
||||
default-expand-all |
||||
node-key="id" |
||||
:default-expanded-keys="checkedIds" |
||||
:default-checked-keys="checkedIds" |
||||
:props="defaultProps"> |
||||
</el-tree> |
||||
</div> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" class="dialog-footer" v-if="!isDetail"> |
||||
<el-button @click="roleVisible = false">取 消</el-button> |
||||
<el-button type="primary" @click="saveData">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
<el-table :data="listData" |
||||
class="table" |
||||
ref="table" |
||||
stripe |
||||
header-align="center" |
||||
@selection-change="handleSelectionChange" |
||||
:row-key="getRowKeys"> |
||||
<el-table-column type="selection" |
||||
width="55" |
||||
align="center" |
||||
:selectable="practiceSelectable" |
||||
:reserve-selection="true"></el-table-column> |
||||
<el-table-column type="index" |
||||
width="60" |
||||
label="序号" |
||||
align="center"></el-table-column> |
||||
<el-table-column prop="roleName" |
||||
label="角色名称" |
||||
align="center" |
||||
min-width="250" |
||||
show-overflow-tooltip></el-table-column> |
||||
<el-table-column label="角色描述" |
||||
min-width="400" |
||||
align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-input placeholder="该角色用于管理全部功能权限" |
||||
v-model="scope.row.remark" |
||||
disabled></el-input> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" |
||||
align="center" |
||||
width="200"> |
||||
<template slot-scope="scope"> |
||||
<el-button v-auth="'角色权限:查看'" |
||||
type="text" |
||||
@click="showRole(scope.row)">查看</el-button> |
||||
<el-button v-auth="'角色权限:编辑'" |
||||
v-if="scope.row.roleName !== '超级管理员'" |
||||
type="text" |
||||
@click="editRole(scope.row)">编辑</el-button> |
||||
<el-button v-auth="'角色权限:删除'" |
||||
v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" |
||||
type="text" |
||||
@click="handleDelete(scope.row)">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="pagination"> |
||||
<el-pagination background |
||||
@current-change="currentChange" |
||||
:current-page="page" |
||||
layout="total, prev, pager, next" |
||||
:total="total"></el-pagination> |
||||
</div> |
||||
|
||||
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" |
||||
:visible.sync="roleVisible" |
||||
width="30%" |
||||
@close="closeRole" |
||||
class="dialog" |
||||
:close-on-click-modal="false"> |
||||
<el-form ref="form" |
||||
label-width="80px" |
||||
:disabled="isDetail"> |
||||
<el-form-item label="角色名称"> |
||||
<el-input v-model="form.roleName" |
||||
placeholder="请输入角色名称"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="角色描述"> |
||||
<el-input v-model="form.remark" |
||||
placeholder="请输入角色描述" |
||||
type="textarea" |
||||
rows="5"></el-input> |
||||
</el-form-item> |
||||
<el-form-item prop="role" |
||||
label="角色权限"> |
||||
<div style="max-height: 300px; overflow: auto"> |
||||
<el-tree ref="per" |
||||
:data="permissions" |
||||
show-checkbox |
||||
default-expand-all |
||||
node-key="id" |
||||
:default-expanded-keys="checkedIds" |
||||
:default-checked-keys="checkedIds" |
||||
:props="defaultProps"> |
||||
</el-tree> |
||||
</div> |
||||
</el-form-item> |
||||
</el-form> |
||||
<span slot="footer" |
||||
class="dialog-footer" |
||||
v-if="!isDetail"> |
||||
<el-button @click="roleVisible = false">取 消</el-button> |
||||
<el-button type="primary" |
||||
@click="saveData">确 定</el-button> |
||||
</span> |
||||
</el-dialog> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import util from "@/libs/util"; |
||||
import Setting from "@/setting"; |
||||
export default { |
||||
data() { |
||||
return { |
||||
keyword: "", |
||||
searchTimer: null, |
||||
isDetail: false, |
||||
form: { |
||||
id: "", |
||||
roleName: "", |
||||
remark: "" |
||||
}, |
||||
listData: [], |
||||
defaultProps: { |
||||
children: "children", |
||||
label: "name" |
||||
}, |
||||
page: 1, |
||||
pageSize: 10, |
||||
total: 0, |
||||
multipleSelection: [], |
||||
isAdd: true, |
||||
roleVisible: false, |
||||
permissions: [], |
||||
checkedIds: [], |
||||
roleNameReapeat: false // 角色名称是否重复 |
||||
}; |
||||
data () { |
||||
return { |
||||
keyword: "", |
||||
searchTimer: null, |
||||
isDetail: false, |
||||
form: { |
||||
id: "", |
||||
roleName: "", |
||||
remark: "" |
||||
}, |
||||
listData: [], |
||||
defaultProps: { |
||||
children: "children", |
||||
label: "name" |
||||
}, |
||||
page: 1, |
||||
pageSize: 10, |
||||
total: 0, |
||||
multipleSelection: [], |
||||
isAdd: true, |
||||
roleVisible: false, |
||||
permissions: [], |
||||
checkedIds: [], |
||||
roleNameReapeat: false // 角色名称是否重复 |
||||
}; |
||||
}, |
||||
watch: { |
||||
keyword: function (val) { |
||||
clearTimeout(this.searchTimer); |
||||
this.searchTimer = setTimeout(() => { |
||||
this.getData(); |
||||
}, 500); |
||||
} |
||||
}, |
||||
mounted () { |
||||
this.getData(); |
||||
}, |
||||
methods: { |
||||
getData () { |
||||
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${util.encodeStr(this.keyword)}&platformId=1&port=0`).then(res => { |
||||
this.listData = res.rolePage.records; |
||||
this.total = res.rolePage.total; |
||||
}).catch(res => { }); |
||||
}, |
||||
watch: { |
||||
keyword: function(val) { |
||||
clearTimeout(this.searchTimer); |
||||
this.searchTimer = setTimeout(() => { |
||||
this.getData(); |
||||
}, 500); |
||||
} |
||||
currentChange (val) { |
||||
this.page = val; |
||||
this.getData(); |
||||
}, |
||||
mounted() { |
||||
this.getData(); |
||||
handleDelete (row) { |
||||
this.$confirm("确定要删除吗?", "提示", { |
||||
type: "warning" |
||||
}).then(() => { |
||||
this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => { |
||||
util.successMsg("删除成功"); |
||||
this.getData(); |
||||
}).catch(res => { }); |
||||
}).catch(() => { }); |
||||
}, |
||||
methods: { |
||||
getData() { |
||||
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${util.encodeStr(this.keyword)}&platformId=1&port=0`).then(res => { |
||||
this.listData = res.rolePage.records; |
||||
this.total = res.rolePage.total; |
||||
}).catch(res => {}); |
||||
}, |
||||
currentChange(val) { |
||||
this.page = val; |
||||
getRowKeys (row) { |
||||
return row.id; |
||||
}, |
||||
handleSelectionChange (val) { |
||||
this.multipleSelection = val; |
||||
}, |
||||
delAllSelection () { |
||||
if (this.multipleSelection.length) { |
||||
this.$confirm("确定要删除吗?", "提示", { |
||||
type: "warning" |
||||
}).then(() => { |
||||
let ids = this.multipleSelection.map(item => { |
||||
return item.id; |
||||
}); |
||||
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => { |
||||
this.$refs.table.clearSelection(); |
||||
util.successMsg("删除成功"); |
||||
this.getData(); |
||||
}, |
||||
handleDelete(row) { |
||||
this.$confirm("确定要删除吗?", "提示", { |
||||
type: "warning" |
||||
}).then(() => { |
||||
this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => { |
||||
util.successMsg("删除成功"); |
||||
this.getData(); |
||||
}).catch(res => {}); |
||||
}).catch(() => {}); |
||||
}, |
||||
getRowKeys(row) { |
||||
return row.id; |
||||
}, |
||||
handleSelectionChange(val) { |
||||
this.multipleSelection = val; |
||||
}, |
||||
delAllSelection() { |
||||
if (this.multipleSelection.length) { |
||||
this.$confirm("确定要删除吗?", "提示", { |
||||
type: "warning" |
||||
}).then(() => { |
||||
let ids = this.multipleSelection.map(item => { |
||||
return item.id; |
||||
}); |
||||
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => { |
||||
this.$refs.table.clearSelection(); |
||||
util.successMsg("删除成功"); |
||||
this.getData(); |
||||
}).catch(res => {}); |
||||
if(this.multipleSelection.length === this.listData.length && this.page>1) { |
||||
this.handleCurrentChange(this.page - 1) |
||||
} |
||||
}).catch(() => {}); |
||||
} else { |
||||
util.errorMsg("请先选择数据!"); |
||||
} |
||||
}, |
||||
practiceSelectable(row, index){ |
||||
let boolean = true; |
||||
if(row.roleName == '超级管理员'){ |
||||
boolean = false |
||||
}else{ |
||||
boolean = true |
||||
} |
||||
return boolean; |
||||
}, |
||||
closeRole() { |
||||
this.isDetail = false; |
||||
this.form = { |
||||
id: "", |
||||
roleName: "", |
||||
remark: "" |
||||
}; |
||||
this.checkedIds = []; |
||||
this.permissions = []; |
||||
}, |
||||
// 获取权限菜单 |
||||
getPer(row) { |
||||
if (!this.permissions.length) { |
||||
this.$get(`${this.api.queryAllMenus}?platformId=${Setting.platformId}`).then(res => { |
||||
let data = res.children; |
||||
// 因为有些菜单是后来去掉的,但是数据库里要去掉的话就得全部重新加了,所以就在前端来手动把不需要了的菜单给去掉,下面同理 |
||||
let yw = data.findIndex(n => n.name == "业务后台"); |
||||
yw != -1 && data.splice(yw, 1); |
||||
try { |
||||
let system = data.findIndex(n => n.name == "系统设置"); |
||||
}).catch(res => { }); |
||||
if (this.multipleSelection.length === this.listData.length && this.page > 1) { |
||||
this.handleCurrentChange(this.page - 1) |
||||
} |
||||
}).catch(() => { }); |
||||
} else { |
||||
util.errorMsg("请先选择数据!"); |
||||
} |
||||
}, |
||||
practiceSelectable (row, index) { |
||||
let boolean = true; |
||||
if (row.roleName == '超级管理员') { |
||||
boolean = false |
||||
} else { |
||||
boolean = true |
||||
} |
||||
return boolean; |
||||
}, |
||||
closeRole () { |
||||
this.isDetail = false; |
||||
this.form = { |
||||
id: "", |
||||
roleName: "", |
||||
remark: "" |
||||
}; |
||||
this.checkedIds = []; |
||||
this.permissions = []; |
||||
}, |
||||
// 获取权限菜单 |
||||
getPer (row) { |
||||
if (!this.permissions.length) { |
||||
this.$get(`${this.api.queryAllMenus}?platformId=${Setting.platformId}`).then(res => { |
||||
let data = res.children; |
||||
// 因为有些菜单是后来去掉的,但是数据库里要去掉的话就得全部重新加了,所以就在前端来手动把不需要了的菜单给去掉,下面同理 |
||||
let yw = data.findIndex(n => n.name == "业务后台"); |
||||
yw != -1 && data.splice(yw, 1); |
||||
try { |
||||
let system = data.findIndex(n => n.name == "系统设置"); |
||||
|
||||
if (system != -1) { |
||||
data[system].children[1].children.splice(4, 1); |
||||
data[system].children[1].children.splice(1, 1); |
||||
data[system].children[1].children.splice(0, 1); |
||||
} |
||||
} catch (error) { |
||||
} |
||||
this.permissions = data; |
||||
if (row) { |
||||
this.getDetail(row); |
||||
} |
||||
}).catch(res => { |
||||
}); |
||||
} |
||||
}, |
||||
addRole() { |
||||
this.isAdd = true; |
||||
this.getPer(); |
||||
this.checkedIds = []; |
||||
this.permissions.length && this.$refs.per.setCheckedNodes([]); |
||||
this.roleVisible = true; |
||||
}, |
||||
// 递归处理勾选的权限 |
||||
handleRolePer(data, permissions) { |
||||
let result = data; |
||||
if (permissions.length) { |
||||
permissions.map(e => { |
||||
if (result.includes(e.id) && e.children) { |
||||
// 如果该权限下的子权限不是每个都勾选了,就把该权限的id从已勾选的id集合里去除,因为如果不去除的话,这个权限就会勾选,同时会把该权限下的所有子权限都一起勾选 |
||||
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1); |
||||
} |
||||
e.children && e.children.length && this.handleRolePer(data, e.children); |
||||
}); |
||||
if (system != -1) { |
||||
data[system].children[1].children.splice(4, 1); |
||||
data[system].children[1].children.splice(1, 1); |
||||
data[system].children[1].children.splice(0, 1); |
||||
} |
||||
return result; |
||||
}, |
||||
async getDetail(row) { // 查询详情 |
||||
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`); |
||||
this.form = res.role; |
||||
this.form.id = row.id; |
||||
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions); |
||||
this.$refs.per.setCheckedNodes(this.checkedIds); |
||||
}, |
||||
showRole(row) { |
||||
this.isDetail = true; |
||||
this.isAdd = false; |
||||
this.getPer(row); |
||||
this.roleVisible = true; |
||||
}, |
||||
editRole(row) { |
||||
this.isAdd = false; |
||||
this.getPer(row); |
||||
this.roleVisible = true; |
||||
}, |
||||
async saveData() { |
||||
if (!this.form.roleName) return util.warningMsg("请填写角色名称"); |
||||
if (!this.form.remark) return util.warningMsg("请填写角色描述"); |
||||
if (!this.$refs.per.getCheckedKeys().length) return util.warningMsg("请选择角色权限"); |
||||
// 获取已勾选的,和半勾选的(即子级没有全部勾选的节点),半勾选的一样要传给后端 |
||||
let permissionId = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()]; |
||||
let data = { |
||||
...this.form, |
||||
permissionId, |
||||
platformId:1, |
||||
}; |
||||
if (this.form.id) { |
||||
this.$post(this.api.saveOrUpdate, data).then(res => { |
||||
util.successMsg("修改成功"); |
||||
this.getData(); |
||||
this.roleVisible = false; |
||||
}).catch(res => {}); |
||||
} else { |
||||
this.$post(this.api.saveOrUpdate, data).then(res => { |
||||
util.successMsg("新增成功"); |
||||
this.getData(); |
||||
this.roleVisible = false; |
||||
}).catch(res => {}); |
||||
} |
||||
} |
||||
} catch (error) { |
||||
} |
||||
this.permissions = data; |
||||
if (row) { |
||||
this.getDetail(row); |
||||
} |
||||
}).catch(res => { |
||||
}); |
||||
} |
||||
}, |
||||
addRole () { |
||||
this.isAdd = true; |
||||
this.getPer(); |
||||
this.checkedIds = []; |
||||
this.permissions.length && this.$refs.per.setCheckedNodes([]); |
||||
this.roleVisible = true; |
||||
}, |
||||
// 递归处理勾选的权限 |
||||
handleRolePer (data, permissions) { |
||||
let result = data; |
||||
if (permissions.length) { |
||||
permissions.map(e => { |
||||
if (result.includes(e.id) && e.children) { |
||||
// 如果该权限下的子权限不是每个都勾选了,就把该权限的id从已勾选的id集合里去除,因为如果不去除的话,这个权限就会勾选,同时会把该权限下的所有子权限都一起勾选 |
||||
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1); |
||||
} |
||||
e.children && e.children.length && this.handleRolePer(data, e.children); |
||||
}); |
||||
} |
||||
return result; |
||||
}, |
||||
async getDetail (row) { // 查询详情 |
||||
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`); |
||||
this.form = res.role; |
||||
this.form.id = row.id; |
||||
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions); |
||||
this.$refs.per.setCheckedNodes(this.checkedIds); |
||||
}, |
||||
showRole (row) { |
||||
this.isDetail = true; |
||||
this.isAdd = false; |
||||
this.getPer(row); |
||||
this.roleVisible = true; |
||||
}, |
||||
editRole (row) { |
||||
this.isAdd = false; |
||||
this.getPer(row); |
||||
this.roleVisible = true; |
||||
}, |
||||
async saveData () { |
||||
if (!this.form.roleName) return util.warningMsg("请填写角色名称"); |
||||
if (!this.form.remark) return util.warningMsg("请填写角色描述"); |
||||
if (!this.$refs.per.getCheckedKeys().length) return util.warningMsg("请选择角色权限"); |
||||
// 获取已勾选的,和半勾选的(即子级没有全部勾选的节点),半勾选的一样要传给后端 |
||||
let permissionId = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()]; |
||||
let data = { |
||||
...this.form, |
||||
permissionId, |
||||
platformId: 1, |
||||
}; |
||||
if (this.form.id) { |
||||
this.$post(this.api.saveOrUpdate, data).then(res => { |
||||
util.successMsg("修改成功"); |
||||
this.getData(); |
||||
this.roleVisible = false; |
||||
}).catch(res => { }); |
||||
} else { |
||||
this.$post(this.api.saveOrUpdate, data).then(res => { |
||||
util.successMsg("新增成功"); |
||||
this.getData(); |
||||
this.roleVisible = false; |
||||
}).catch(res => { }); |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
|
||||
</style> |
@ -1,173 +1,174 @@ |
||||
.msg{ |
||||
li{ |
||||
margin-bottom: 10px; |
||||
border-top: 1px solid #f1f1f1; |
||||
&:first-child{ |
||||
border-top: 0; |
||||
} |
||||
.li-wrap{ |
||||
position: relative; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
padding: 16px 0; |
||||
.avatar{ |
||||
width: 48px; |
||||
height: 48px; |
||||
border-radius: 50%; |
||||
} |
||||
.texts{ |
||||
flex: 1; |
||||
margin-left: 24px; |
||||
.name{ |
||||
color: rgba(0, 0, 0, 0.85); |
||||
font-size: 16px; |
||||
} |
||||
.des{ |
||||
margin: 8px 0; |
||||
} |
||||
.date{ |
||||
color: rgba(0, 0, 0, 0.45); |
||||
font-size: 14px; |
||||
} |
||||
} |
||||
.action{ |
||||
display: inline-flex; |
||||
align-items: center; |
||||
margin-top: 15px; |
||||
.icon{ |
||||
margin: 0 5px; |
||||
color: $main-color; |
||||
font-size: 18px; |
||||
cursor: pointer; |
||||
&:hover{ |
||||
opacity: .8; |
||||
} |
||||
&:first-child{ |
||||
margin-right: 5px; |
||||
} |
||||
&.del{ |
||||
color: rgba(0, 0, 0, 0.65); |
||||
border: 1px solid rgba(0, 0, 0, 0.15); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.reply{ |
||||
margin-top: 20px; |
||||
} |
||||
} |
||||
&.children{ |
||||
margin-left: 72px; |
||||
padding-left: 24px; |
||||
background-color: rgba(0, 0, 0, 0.02); |
||||
border-radius: 8px; |
||||
li{ |
||||
border-top-color: rgba(0, 0, 0, 0.06); |
||||
} |
||||
} |
||||
.msg { |
||||
li { |
||||
margin-bottom: 10px; |
||||
border-top: 1px solid #f1f1f1; |
||||
&:first-child { |
||||
border-top: 0; |
||||
} |
||||
.li-wrap { |
||||
position: relative; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
padding: 16px 0; |
||||
.avatar { |
||||
width: 48px; |
||||
height: 48px; |
||||
border-radius: 50%; |
||||
} |
||||
.texts { |
||||
flex: 1; |
||||
margin-left: 24px; |
||||
.name { |
||||
color: rgba(0, 0, 0, 0.85); |
||||
font-size: 16px; |
||||
} |
||||
.date { |
||||
color: rgba(0, 0, 0, 0.45); |
||||
font-size: 14px; |
||||
} |
||||
} |
||||
.reply-name { |
||||
color: #9076ff; |
||||
} |
||||
.action { |
||||
display: inline-flex; |
||||
align-items: center; |
||||
margin: 15px 10px 0 0; |
||||
.icon { |
||||
margin: 0 5px; |
||||
color: $main-color; |
||||
font-size: 18px; |
||||
cursor: pointer; |
||||
&:hover { |
||||
opacity: 0.8; |
||||
} |
||||
&:first-child { |
||||
margin-right: 5px; |
||||
} |
||||
&.del { |
||||
color: rgba(0, 0, 0, 0.65); |
||||
border: 1px solid rgba(0, 0, 0, 0.15); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.reply { |
||||
margin-top: 20px; |
||||
} |
||||
} |
||||
&.children { |
||||
margin-left: 72px; |
||||
padding-left: 24px; |
||||
background-color: rgba(0, 0, 0, 0.02); |
||||
border-radius: 8px; |
||||
li { |
||||
border-top-color: rgba(0, 0, 0, 0.06); |
||||
} |
||||
} |
||||
} |
||||
.toggle{ |
||||
margin: 16px 0; |
||||
text-align: center; |
||||
color: $main-color; |
||||
font-size: 14px; |
||||
span{ |
||||
cursor: pointer; |
||||
} |
||||
.toggle { |
||||
margin: 16px 0; |
||||
text-align: center; |
||||
color: $main-color; |
||||
font-size: 14px; |
||||
span { |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
/deep/.quill{ |
||||
background-color: #fff; |
||||
/deep/.quill { |
||||
background-color: #fff; |
||||
} |
||||
|
||||
/deep/.timeline { |
||||
padding-left: 9%; |
||||
overflow: hidden; |
||||
.el-timeline-item { |
||||
padding-bottom: 40px; |
||||
} |
||||
.el-timeline-item__node--normal { |
||||
top: 30px; |
||||
} |
||||
.el-timeline-item__wrapper { |
||||
top: 15px; |
||||
padding-left: 40px; |
||||
} |
||||
.el-timeline-item__tail { |
||||
height: 250%; |
||||
border-left-width: 1px; |
||||
} |
||||
.sign { |
||||
position: relative; |
||||
display: inline-block; |
||||
margin-left: -12.5%; |
||||
font-size: 14px; |
||||
color: #9076FF; |
||||
} |
||||
.draft { |
||||
.ver, .sign { |
||||
color: #b1b1b1; |
||||
} |
||||
} |
||||
.ver { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
padding-bottom: 10px; |
||||
margin: -22px 0 20px; |
||||
font-size: 18px; |
||||
color: #9076FF; |
||||
border-bottom: 1px dashed #bfbfbf; |
||||
} |
||||
.withdraw { |
||||
margin-right: 10px; |
||||
font-size: 13px; |
||||
color: #979797; |
||||
} |
||||
.action { |
||||
margin-left: 15px; |
||||
i { |
||||
margin-left: 8px; |
||||
font-size: 14px; |
||||
color: #9076FF; |
||||
cursor: pointer; |
||||
&:hover { |
||||
opacity: .9; |
||||
} |
||||
} |
||||
} |
||||
.detail { |
||||
li { |
||||
margin-bottom: 20px; |
||||
} |
||||
.name { |
||||
display: flex; |
||||
align-items: center; |
||||
margin-bottom: 5px; |
||||
font-size: 15px; |
||||
font-weight: 600; |
||||
img { |
||||
width: 20px; |
||||
margin-right: 5px; |
||||
} |
||||
} |
||||
.val { |
||||
font-size: 14px; |
||||
line-height: 1.8; |
||||
white-space: pre-wrap; |
||||
p { |
||||
position: relative; |
||||
color: #6a6a6a; |
||||
&:before { |
||||
content: ''; |
||||
display: inline-block; |
||||
width: 5px; |
||||
height: 5px; |
||||
margin: 0 10px 0 5px; |
||||
vertical-align: middle; |
||||
border-radius: 20px; |
||||
background-color: #c5b8ff; |
||||
padding-left: 9%; |
||||
overflow: hidden; |
||||
.el-timeline-item { |
||||
padding-bottom: 40px; |
||||
} |
||||
.el-timeline-item__node--normal { |
||||
top: 30px; |
||||
} |
||||
.el-timeline-item__wrapper { |
||||
top: 15px; |
||||
padding-left: 40px; |
||||
} |
||||
.el-timeline-item__tail { |
||||
height: 250%; |
||||
border-left-width: 1px; |
||||
} |
||||
.sign { |
||||
position: relative; |
||||
display: inline-block; |
||||
margin-left: -12.5%; |
||||
font-size: 14px; |
||||
color: #9076ff; |
||||
} |
||||
.draft { |
||||
.ver, |
||||
.sign { |
||||
color: #b1b1b1; |
||||
} |
||||
} |
||||
.ver { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
padding-bottom: 10px; |
||||
margin: -22px 0 20px; |
||||
font-size: 18px; |
||||
color: #9076ff; |
||||
border-bottom: 1px dashed #bfbfbf; |
||||
} |
||||
.withdraw { |
||||
margin-right: 10px; |
||||
font-size: 13px; |
||||
color: #979797; |
||||
} |
||||
.action { |
||||
margin-left: 15px; |
||||
i { |
||||
margin-left: 8px; |
||||
font-size: 14px; |
||||
color: #9076ff; |
||||
cursor: pointer; |
||||
&:hover { |
||||
opacity: 0.9; |
||||
} |
||||
} |
||||
} |
||||
.detail { |
||||
li { |
||||
margin-bottom: 20px; |
||||
} |
||||
.name { |
||||
display: flex; |
||||
align-items: center; |
||||
margin-bottom: 5px; |
||||
font-size: 15px; |
||||
font-weight: 600; |
||||
img { |
||||
width: 20px; |
||||
margin-right: 5px; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.val { |
||||
font-size: 14px; |
||||
line-height: 1.8; |
||||
white-space: pre-wrap; |
||||
p { |
||||
position: relative; |
||||
color: #6a6a6a; |
||||
&:before { |
||||
content: ''; |
||||
display: inline-block; |
||||
width: 5px; |
||||
height: 5px; |
||||
margin: 0 10px 0 5px; |
||||
vertical-align: middle; |
||||
border-radius: 20px; |
||||
background-color: #c5b8ff; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue