123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <template>
- <view>
- <cu-custom bgColor="bg-gradual-pink" :isBack="true">
- <block slot="backText">返回</block>
- <block slot="content">组织架构</block>
- </cu-custom>
- <xiaolu-tree :checkList="checkList" v-if="tree.length>0" :props="prop" @sendValue="confirm" :isCheck="true" :treeNone="tree"></xiaolu-tree>
-
- </view>
- </template>
- <script>
- import XiaoluTree from'@/components/xiaolu-tree/tree.vue'
- import api from '@/api/api'
- export default {
- components: {
- XiaoluTree
- },
- data() {
- return {
- data:[],
- userUrl:'/sys/user/departList',
- departName:'',
- orgName:'',
- tree: [],
- checkList: [],
- backList: this.checkList,
- prop:{
- label: 'name',
- children: 'children',
- multiple:true,
- },
- max: 5,
- }
- },
- watch:{
- departName:{
- handler(newVal, objVal) {
- this.querydepartName(newVal);
- },
- }
- },
- created(){
- this.querydepartName()
- uni.setStorageSync("orgType",3);
- },
- methods:{
-
- jump(s){
- console.log(s)
- this.$store.commit('SET_DEPARTID',s)
- this.$Router.push({name:'wagesuser'})
- },
- querydepartName(s){
- this.$http.get(this.userUrl,{params:{departName:s}}).then(res=>{
- console.log("res",res)
- this.tree=res.data.departName;
- // this.orgName=res.data.orgName;
-
- }).catch(err => {
- console.log(err);
- });
- },
- ret(){
- this.$Router.push({name:'index'})
- },
-
- }
-
- }
-
-
- </script>
- <style>
- .ins{
- background-color: #F1F1F1;
- width: 90%;
- height: 30px;
- margin:0 auto;
- border-radius:5px 5px 5px 5px;
- margin-top: 20px;
-
- }
- .s{
- list-style-type:none;
- margin-left: -40px;
- }
-
- .imgs{
- width: 15px;
- height: 15px;
- float: right;
- }
-
- .top{
- background-color: #5677AC;
- width: 100%;
- height: 40px;
-
- }
- </style>
|