Commit 6a6a624b authored by xulili's avatar xulili

柜组列表和通讯录树样式修改

parent 2d8dd839
<template> <template>
<div class="main"> <div class="main">
<div class="title">全部柜组( 共5个 )</div> <div class="title">全部柜组( 共<span>{{page.total}}</span>个 )</div>
<div class="searchs"> <div class="searchs">
<div class="buttons"> <div class="buttons">
<el-button class="button buttonlight" size="small" @click="addCounter">添加柜组</el-button> <el-button class="button buttonlight" size="small" @click="addCounter">添加柜组</el-button>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="principal" prop="principalName"
label="柜组负责人" label="柜组负责人"
align="center" align="center"
></el-table-column> ></el-table-column>
...@@ -60,18 +60,9 @@ ...@@ -60,18 +60,9 @@
<el-table-column label="创建时间" width="120" align="center" prop="createDate"/> <el-table-column label="创建时间" width="120" align="center" prop="createDate"/>
<el-table-column label="操作" align="center" fixed="right" width="200"> <el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" class="btn" @click="handleDetail(scope.row.id)" <el-button type="text" class="btn" @click="handleDetail(scope.row.id)" >详情</el-button>
>详情</el-button <el-button type="text" class="btn" @click="handleEdit(scope.row.id)" >编辑</el-button >
> <el-button type="text" @click="handleDelete(scope.row.id)" class="listButtonRed">删除</el-button>
<el-button type="text" class="btn" @click="handleEdit(scope.row.id)"
>编辑</el-button
>
<el-button
type="text"
@click="handleDelete(scope.row.id)"
class="listButtonRed"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -160,8 +151,16 @@ export default { ...@@ -160,8 +151,16 @@ export default {
_this.tableData = [] _this.tableData = []
} }
if(res.result == 'success'){ if(res.result == 'success'){
_this.tableData = res.data.adminShops.list let data = res.data.pageInfo.list
_this.page.total = Number(res.data.adminShops.total) _this.tableData = data.map((v,i)=>{
let obj = {}
for(let key in v.adminShop){
obj[key] = v.adminShop[key]
obj.principalName = v.principal
}
return obj
})
_this.page.total = Number(res.data.pageInfo.total)
} }
}) })
}, },
...@@ -179,7 +178,12 @@ export default { ...@@ -179,7 +178,12 @@ export default {
this.$confirm('确定删除该柜组吗?', { this.$confirm('确定删除该柜组吗?', {
}).then(() => { }).then(() => {
stallDel({shopIds:id}).then(res=>{ stallDel({shopIds:id}).then(res=>{
_this.$message(res.data) if(res.result == 'fail'){
_this.$message.error(res.errorMsg)
}
if(res.result == 'success'){
_this.getListData()
}
}) })
}).catch(() => { }).catch(() => {
this.$message.info("取消删除") this.$message.info("取消删除")
...@@ -194,7 +198,12 @@ export default { ...@@ -194,7 +198,12 @@ export default {
this.$confirm('确定批量删除柜组吗?', { this.$confirm('确定批量删除柜组吗?', {
}).then(() => { }).then(() => {
stallDel({shopIds:delIds}).then(res=>{ stallDel({shopIds:delIds}).then(res=>{
_this.$message(res.data) if(res.result == 'fail'){
_this.$message.error(res.errorMsg)
}
if(res.result == 'success'){
_this.getListData()
}
}) })
}).catch(() => { }).catch(() => {
this.$message.info("取消删除") this.$message.info("取消删除")
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<span class="number">{{ allNumber }}</span> <span class="number">{{ allNumber }}</span>
</div> </div>
</div> </div>
<div class="ty" style="margin:15px 0;" @click="getNoGroupMember(1,1)"> <div class="ty" style="margin:12px 0;" @click="getNoGroupMember(1,1)">
<div> <div>
<span>未分组</span> <span>未分组</span>
<span class="number">{{ wNumber }}</span> <span class="number">{{ wNumber }}</span>
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
expand-on-click-node expand-on-click-node
@node-click="handleTreeClick" @node-click="handleTreeClick"
> >
<!-- <span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
</span> -->
</el-tree> </el-tree>
</div> </div>
</div> </div>
...@@ -713,11 +710,11 @@ export default { ...@@ -713,11 +710,11 @@ export default {
<style scoped> <style scoped>
.trees >>> .el-tree-node__content { .trees >>> .el-tree-node__content {
padding: 10px; padding: 5px;
border-bottom: 1px solid #fff; /*border-bottom: 1px solid #fff;*/
} }
.trees >>> .el-tree-node__children .el-tree-node__content { .trees >>> .el-tree-node__children .el-tree-node__content {
background-color: #dadad97a; /*background-color: #dadad97a;*/
} }
.btn >>> .el-button + .el-button { .btn >>> .el-button + .el-button {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment