选择部门

This commit is contained in:
shijingjing
2022-07-20 11:02:01 +08:00
parent a39671b283
commit 5d8754639e
2 changed files with 27 additions and 293 deletions

View File

@@ -139,14 +139,14 @@
</div>
<div class="type-list">
<div class="type-title">宣发部门</div>
<AiPagePicker
<!-- <AiPagePicker
type="custom"
:selected.sync="deptList"
:selected.sync="department"
nodeKey="id"
:ops="{ url: `./selectDeptUser`, label: 'name' }"
valueObj
>
<span class="label" v-if="deptList.length">已选择</span>
<span class="label" v-if="department.length">已选择</span>
<span v-else style="color: #999">请选择</span>
<u-icon
name="arrow-right"
@@ -154,7 +154,8 @@
size="24"
style="margin-left: 8px"
/>
</AiPagePicker>
</AiPagePicker> -->
<input type="text" placeholder="请选择部门" :value="department" disabled @click="getDept"/>
</div>
</scroll-view>
<div class="popBtn">
@@ -207,6 +208,7 @@
<script>
import echarts from "echarts";
import { mapActions } from 'vuex'
export default {
name: "AppPropagandaStatistics",
appName: "宣发统计",
@@ -226,7 +228,8 @@ export default {
timeSelect: 0,
start: "",
end: "",
deptList: [],
department: '',
departList: [],
nowMonth: "",
nowDate: "",
calendarList: [],
@@ -618,6 +621,25 @@ export default {
],
});
},
// 选择部门
...mapActions(['selectEnterpriseContact']),
getDept() {
this.selectEnterpriseContact({
fromDepartmentId: 0,
mode: "single",
type: ["department"],
selectedDepartmentIds: this.departList?.map(e => e.id)
}).then((res)=>{
console.log(res,111);
if(res?.departmentList) {
this.department = res.departmentList[0].id
}
}
).catch((err) => {
console.log(err);
})
},
},
};
</script>