Commit 7d1aa2a9 by 胡悦

修改样式

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