yyzone
Version:
yyzone vue components and utils
51 lines (46 loc) • 1.5 kB
Markdown
// 1 引入组件
import { selectMan } from '../component/select-man';
// 2 写入标签
<select-man ref="sm"/>
// 3 通过 this.$refs调用
this.$refs.open({
qzId:'', // 必传 ;
host:'', // 必传 ;
token:'', // 必传 ;
// 标题
title: "-----标题-----",
// 是否把元素放入body中 ;
fixed: true,
// 选择团队时需要的参数 , 存在memberId获取和自己相关的部门 , 不存在获取所有部门 ;
memberId:'',
// 发送ajax时 便利对象拼接在地址上 , ( 多语环境 , 时间戳等 ) ;
params:{
lang:'zhs',
tmp: Date.parse( new Date())
},
// 选人
chooseMan:{
dep:true, //根据部门选人
team:true, //根据团队选人
man:true, //直接选人
selected:[],//选中数据 , 回显数据
limit:100, //limit为1为单选
limitCallback:function(){alert('超出选择上限')}, //达到上限回调
},
// 选部门
chooseDep:{
selected:[],//选中数据 , 回显数据
limit:100, //limit为1为单选
limitCallback:function(){alert('超出选择上限')}, //达到上限回调
},
// 选团队
chooseTeam:{
selected:[], //选中数据 , 回显数据
limit:100, //limit为1为单选
limitCallback:function(){alert('超出选择上限')}, //达到上限回调
},
// 选中回调函数 ;
callback:function( res ){
console.log(JSON.stringify(res))
},
})