Commit 7d1aa2a9 by 胡悦

修改样式

1 parent 482e333b
......@@ -175,13 +175,15 @@ export default {
this.$nextTick(() => {
console.log(this.$refs.membersForm)
this.$refs.membersForm.selectTable(this.basicForm.userList)
this.basicForm.userList.map(item => {
if (item.masterStatus) {
this.basicForm.group = item
this.$refs.membersForm.group = item
this.selectData = this.basicForm.userList
}
})
if (this.basicForm.userList && this.basicForm.userList.length != 0) {
this.basicForm.userList.map(item => {
if (item.masterStatus) {
this.basicForm.group = item
this.$refs.membersForm.group = item
this.selectData = this.basicForm.userList
}
})
}
})
}
},
......@@ -278,8 +280,24 @@ export default {
// }
},
handleClose() {
this.openMembers()
this.selectData = []
// this.openMembers()
this.membersVisible = false
if (this.$route.params.id) {
this.$nextTick(() => {
this.$refs.membersForm.selectTable(this.basicForm.userList)
if (this.basicForm.userList && this.basicForm.userList.length != 0) {
this.basicForm.userList.map(item => {
if (item.masterStatus) {
this.basicForm.group = item
this.$refs.membersForm.group = item
this.selectData = this.basicForm.userList
}
})
}
})
} else {
this.selectData = []
}
}
}
}
......
......@@ -9,7 +9,7 @@
}"
>
<div class="tree-title">所在门店/部门</div>
<el-tree :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree>
<el-tree v-loading="loading" :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</div>
</div>
<el-col
......@@ -18,7 +18,7 @@
height: treeHeight + 20 + 'px'
}"
>
<GLTable ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable">
<GLTable ref="saleTable" v-loading="loading" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" v-show="!group.staffName" @click="selectGroup(scope.scope)">设为群主</el-button>
<el-button type="text" v-show="group.staffName && scope.scope.staffName == group.staffName" @click="cancelGroup">取消群主</el-button>
......@@ -62,19 +62,21 @@ export default {
{
label: '',
prop: 'optionBtns',
addHtml: 'optionBtns',
fixed: 'right'
addHtml: 'optionBtns'
}
]
},
tableEmpData: [],
group: {},
allGroup: [],
employeeList: []
employeeList: [],
loading: true,
currentArr: []
}
},
watch: {
selectData(val) {
console.log(this.group)
console.log(val)
if (val.length == 0) {
this.clearSelection()
......@@ -101,8 +103,10 @@ export default {
listDepartmentTree() {
this.$apis.groupGuest.listDepartmentTree({ merchantId: 10001001, addChildrensFlag: true }).then(res => {
this.listTree = res
this.loading = false
this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
console.log(this.listTree, this.selectData)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.staffId == i.staffId)
console.log(row)
......@@ -128,6 +132,7 @@ export default {
handleNodeClick(data) {
this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses
this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.listEntmicroStaff()
},
selectGroup(data) {
......@@ -153,6 +158,17 @@ export default {
}
})
return arr
},
searchTable(search) {
const arr = []
this.currentArr.forEach(item => {
console.log(item.staffName.indexOf(search) != -1)
if (item.staffName.indexOf(search) != -1) {
console.log(item)
arr.push(item)
}
})
this.tableEmpData = arr
}
// listEntmicroStaff(staffName) {
// let params = {
......@@ -167,7 +183,7 @@ export default {
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.treeHeight = clientHeight - 450
this.treeHeight = clientHeight - 800
this.listDepartmentTree()
console.log(this.selectData, '.....')
......
......@@ -76,7 +76,8 @@ export default {
},
//查询
searchEmp() {
this.$refs.selectEmpTabel.listDepartmentTree(this.newTag)
console.log(this.newTag)
this.$refs.selectEmpTabel.searchTable(this.newTag)
},
handlGroup(val) {
console.log(val)
......@@ -168,6 +169,8 @@ export default {
width: 100%;
display: flex;
align-items: center;
max-height: 64px;
overflow: auto;
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
......@@ -181,7 +184,7 @@ export default {
}
}
.el-tag {
margin-right: 4px;
margin: 3px 4px 3px 0;
height: 26px;
line-height: 24px;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!