Commit eb264e2d authored by xd's avatar xd

修改添加编辑子部门,修改样式失败

parent 8024b2e0
...@@ -50,4 +50,7 @@ $prefix: d2; ...@@ -50,4 +50,7 @@ $prefix: d2;
height: 42px; height: 42px;
background-color: #ececec; background-color: #ececec;
padding: 0 10px; padding: 0 10px;
}
.d2-theme-container-main-body {
margin: 0 !important;
} }
\ No newline at end of file
...@@ -449,3 +449,15 @@ ...@@ -449,3 +449,15 @@
} }
} }
} }
.d2-layout-header-aside-content {
position: inherit !important;
}
.d2-theme-container {
height: 100% !important;
.d2-theme-container-main {
height: 100% !important;
.d2-theme-container-main-layer{
height: 100% !important;
}
}
}
\ No newline at end of file
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<d2-menu-side/> <d2-menu-side/>
</div>--> </div>-->
<!--通知栏--> <!--通知栏-->
<d2-header-alarm-notify ></d2-header-alarm-notify> <!-- <d2-header-alarm-notify ></d2-header-alarm-notify> -->
<!-- 主体 --> <!-- 主体 -->
<div class="d2-theme-container-main"> <div class="d2-theme-container-main">
<!-- 搜索 --> <!-- 搜索 -->
...@@ -94,7 +94,7 @@ import d2HeaderTheme from './components/header-theme' ...@@ -94,7 +94,7 @@ import d2HeaderTheme from './components/header-theme'
import d2HeaderUser from './components/header-user' import d2HeaderUser from './components/header-user'
import d2HeaderLog from './components/header-log' import d2HeaderLog from './components/header-log'
import d2HeaderColor from './components/header-color' import d2HeaderColor from './components/header-color'
import d2HeaderAlarmNotify from './components/header-alarm-notify' // import d2HeaderAlarmNotify from './components/header-alarm-notify'
import { mapState, mapGetters, mapActions } from 'vuex' import { mapState, mapGetters, mapActions } from 'vuex'
import mixinSearch from './mixins/search' import mixinSearch from './mixins/search'
export default { export default {
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
d2HeaderUser, d2HeaderUser,
// d2HeaderLog, // d2HeaderLog,
// d2HeaderColor, // d2HeaderColor,
d2HeaderAlarmNotify // d2HeaderAlarmNotify
}, },
data () { data () {
return { return {
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="设置主管:" prop="clerkId" > <el-form-item label="设置主管:" prop="clerkId" >
<el-cascader :props="props" v-model="deptId" :disabled="ifDisabled" :options="parentDeptList" :show-all-levels="false" filterable style="width: 30%;margin-right:15px;" @change="handleParentChange" ></el-cascader> <el-cascader :props="props" ref="direcRef" v-model="deptId" :disabled="ifDisabled" :options="parentDeptList" :show-all-levels="false" filterable style="width: 30%;margin-right:15px;" @change="handleParentChange" ></el-cascader>
<el-select v-model="clerkId" filterable multiple placeholder="请选择" style="width: 30%;" clearble @change="handleMemberChange"> <el-select v-model="clerkId" filterable multiple placeholder="请选择" style="width: 30%;" clearble @change="handleMemberChange" :loading="optionLoading" loading-text="数据加载中">
<el-option <el-option
v-for="item in peopleList" v-for="item in peopleList"
:key="item.id" :key="item.id"
...@@ -125,7 +125,8 @@ export default { ...@@ -125,7 +125,8 @@ export default {
oyStallName: '', oyStallName: '',
oyStallMemberId: '', oyStallMemberId: '',
oyStallCode: '', oyStallCode: '',
clerkId: '' clerkId: '',
oydeptId: ''
}, },
detail: 2, detail: 2,
ifDisabled: false, ifDisabled: false,
...@@ -134,6 +135,7 @@ export default { ...@@ -134,6 +135,7 @@ export default {
parentDeptList: [], parentDeptList: [],
peopleList: [], peopleList: [],
orgTree: [], orgTree: [],
optionLoading: false,
rules: { rules: {
label: [ label: [
{ required: true, message: "请输入部门名称", trigger: "blur" }, { required: true, message: "请输入部门名称", trigger: "blur" },
...@@ -201,10 +203,11 @@ export default { ...@@ -201,10 +203,11 @@ export default {
this.formLoading = false this.formLoading = false
}); });
}, },
handleParentChange(val) { handleParentChange(val) {
this.addForm.oydeptId = val
this.optionLoading = true
this.clerkId = [] this.clerkId = []
this.getGroupMember(val) this.getGroupMember(val)
}, },
getDeptList() { getDeptList() {
getWxAllDeptList() getWxAllDeptList()
...@@ -240,28 +243,31 @@ export default { ...@@ -240,28 +243,31 @@ export default {
} else { } else {
return false; return false;
} }
}); })
// console.log(addGroup)
}, },
// 获取所有人员 // 获取所有人员
getGroupMember(id) { getGroupMember(id) {
this.ifDisabled = true this.ifDisabled = true
getAllPeopleList({ id }).then(res => { getAllPeopleList({ id }).then(res => {
this.peopleList = res.data this.peopleList = res.data
this.optionLoading = false
this.ifDisabled = false this.ifDisabled = false
}) })
}, },
handleMemberChange(val) { handleMemberChange(val) {
console.log(val,'..');
if(val.length == 0) { if(val.length == 0) {
this.addForm.clerkId = '' this.addForm.clerkId = ''
}else { }else {
this.addForm.clerkId = '验证用' this.addForm.clerkId = '验证用'
} }
} }
},
watch: {
deptId() {
if (this.$refs.direcRef) {
this.$refs.direcRef.dropDownVisible = false; //监听值发生变化就关闭它
}
}
} }
}; };
</script> </script>
......
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="设置主管:" prop="clerkId" > <el-form-item label="设置主管:" prop="clerkId" >
<el-cascader :props="props" v-model="deptId" :options="parentDeptList" :disabled="ifDisabled" :show-all-levels="false" filterable style="width: 30%;margin-right:15px;" @change="handleParentChange" ></el-cascader> <el-cascader :props="props" v-model="deptId" ref="direcRef" :options="parentDeptList" :disabled="ifDisabled" :show-all-levels="false" filterable style="width: 30%;margin-right:15px;" @change="handleParentChange" ></el-cascader>
<el-select v-model="clerkId" filterable multiple placeholder="请选择" style="width: 30%;" clearble @change="handleMemberChange" > <el-select v-model="clerkId" filterable multiple placeholder="请选择" style="width: 30%;" clearble @change="handleMemberChange" :loading="optionLoading" loading-text="数据加载中" >
<el-option <el-option
v-for="item in peopleList" v-for="item in peopleList"
:key="item.id" :key="item.id"
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
code: "" code: ""
}, },
checked: false, checked: false,
optionLoading: false,
//// ////
addForm: { addForm: {
label: '', label: '',
...@@ -198,19 +199,17 @@ export default { ...@@ -198,19 +199,17 @@ export default {
this.formLoading = true this.formLoading = true
getDeptDetail({id:this.groupId}).then(res=> { getDeptDetail({id:this.groupId}).then(res=> {
console.log(res,"详情") console.log(res,"详情")
// this.addForm.clerkId = clerkId
this.addForm = res.data.organization this.addForm = res.data.organization
const clerkId = [] const clerkId = []
res.data.supervisors.forEach(item => { res.data.supervisors.forEach(item => {
clerkId.push(item.id) clerkId.push(item.id)
}) })
this.clerkId = clerkId this.clerkId = clerkId
this.addForm.clerkId = "验证用" this.addForm.clerkId = "验证用"
// this.addForm.clerkId = clerkId
this.getDeptList() this.getDeptList()
const deptId = '' const deptId = ''
this.deptId = res.data.supervisors[0].departmentId this.addForm.oydeptId = res.data.oydeptId
this.deptId = res.data.oydeptId
this.getGroupMember(this.deptId) this.getGroupMember(this.deptId)
}) })
...@@ -227,10 +226,11 @@ export default { ...@@ -227,10 +226,11 @@ export default {
this.orgTree = [res.data] this.orgTree = [res.data]
}) })
}, },
handleParentChange(val) { handleParentChange(val) {
this.addForm.clerkId = [] this.addForm.oydeptId = val
this.getGroupMember(val) this.optionLoading = true
this.clerkId = []
this.getGroupMember(val)
}, },
getDeptList() { getDeptList() {
getWxAllDeptList() getWxAllDeptList()
...@@ -270,6 +270,8 @@ export default { ...@@ -270,6 +270,8 @@ export default {
getAllPeopleList({ id }).then(res => { getAllPeopleList({ id }).then(res => {
this.peopleList = res.data this.peopleList = res.data
this.ifDisabled = false this.ifDisabled = false
this.optionLoading = false
this.ifDisabled = false
}) })
}, },
handleMemberChange(val) { handleMemberChange(val) {
...@@ -279,6 +281,13 @@ export default { ...@@ -279,6 +281,13 @@ export default {
this.addForm.clerkId = '验证用' this.addForm.clerkId = '验证用'
} }
} }
},
watch: {
deptId() {
if (this.$refs.direcRef) {
this.$refs.direcRef.dropDownVisible = false; //监听值发生变化就关闭它
}
}
} }
}; };
</script> </script>
......
<template> <template>
<d2-container class="ct"> <!-- <d2-container class="ct"> -->
<!-- <div class="test"> <!-- <div class="test">
<el-menu <el-menu
:default-active="index" :default-active="index"
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="content"> <div class="content">
<mail></mail> <mail></mail>
</div> </div>
</d2-container> <!-- </d2-container> -->
</template> </template>
<script> <script>
...@@ -63,49 +63,11 @@ export default { ...@@ -63,49 +63,11 @@ export default {
</script> </script>
<style></style> <style></style>
<style scoped> <style scoped>
.ct >>> .d2-container-full__body{
overflow: visible !important;
}
.ct >>> .d2-container-full {
padding: 0 !important;
}
.d2-theme-container-main {
background-color: #f8f8f8;
}
.test {
width: 13%;
min-height: 100%;
display: flex;
box-shadow:0px 2px 4px 0px rgba(221,221,221,1);
}
.content { .content {
width: 100%; width:100%;
display: flex;
}
.ct >>> .d2-container-full__body {
display: flex;
justify-content: space-between;
padding: 0 !important;
}
/* .tac {
width: 99%;
height: 100%;
box-shadow:0px 2px 4px 0px rgba(221,221,221,1);
} */
.test >>> .el-menu {
border-right: none;
}
.test >>> .el-menu-item.is-active{
border-left: 2px solid rgba(78,89,199,1);
}
.test >>> .el-menu {
width: 100%;
box-shadow: 0px 2px 4px 0px #ddd;
}
.content {
flex: 6;
padding: 16px; padding: 16px;
background-color: #f8f8f8; background-color: #f8f8f8;
height: 100%;
} }
.circle { .circle {
display: inline-block; display: inline-block;
...@@ -118,10 +80,5 @@ export default { ...@@ -118,10 +80,5 @@ export default {
text-align: center; text-align: center;
margin-right: 12px; margin-right: 12px;
} }
.theme-d2 .el-menu-item svg, .theme-d2 .el-submenu__title svg {
margin-right: 0;
}
.ct >>> .d2-layout-header-aside-group .d2-layout-header-aside-content .d2-theme-container .d2-theme-container-main .d2-theme-container-main-layer {
left: 0 !important;
}
</style> </style>
...@@ -468,6 +468,8 @@ export default { ...@@ -468,6 +468,8 @@ export default {
display: flex; display: flex;
width: 100%; width: 100%;
flex-wrap: nowrap; flex-wrap: nowrap;
height: 88%;
max-height: 88%;
} }
.run { .run {
height: 34px; height: 34px;
...@@ -540,14 +542,13 @@ export default { ...@@ -540,14 +542,13 @@ export default {
min-height: 100%; min-height: 100%;
} }
.left { .left {
position: relative;
width: 20%; width: 20%;
/* */
overflow: auto; overflow: auto;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
.right { .right {
position: relative;
padding: 10px; padding: 10px;
margin-left: 10px; margin-left: 10px;
width: 79%; width: 79%;
...@@ -557,7 +558,7 @@ export default { ...@@ -557,7 +558,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #fff; background-color: #fff;
height: 100%; height: inherit;
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0px 2px 4px 0px #ddd; box-shadow: 0px 2px 4px 0px #ddd;
} }
...@@ -575,7 +576,7 @@ export default { ...@@ -575,7 +576,7 @@ export default {
.main { .main {
/* // border: 2px solid orange; */ /* // border: 2px solid orange; */
width: 100%; width: 100%;
height: 100vh; height: 90%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
...@@ -636,4 +637,7 @@ export default { ...@@ -636,4 +637,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
margin-top: 4px; margin-top: 4px;
} }
.trees >>> .el-tree-node__content {
display: block!important;
}
</style> </style>
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