123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <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,
- }
- },
-
- created(){
- this.querydepartName()
- uni.setStorageSync("orgType",4);
- },
- methods:{
- querydepartName(s){
- this.$http.get(this.userUrl,{params:{departName:s}}).then(res=>{
- console.log("res",res)
- this.tree=res.data.departName;
-
- }).catch(err => {
- console.log(err);
- });
- }
-
-
- }
-
- }
-
-
- </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>
|