123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- var app = getApp();
- var that;
- var animation;
- Page({
- data: {
- tbList: [{
- id: 1,
- name: '仅同步指定部门内的人员信息(可多选)',
- kam: '该选择不会包含子部门人员,请确保选中需要同步的人员的直属部门',
- checked: true
- },
- {
- id: 2,
- name: '仅同步部门信息和上下级关系',
- kam: '仅同步所有部门名称和上下级所属关系,但不同步人员信息'
- },
- {
- id: 3,
- name: '同步全部部门和人员信息 ',
- kam: '同步全部信息所需时间较长,请关注同步成功后推送的工作通知'
- },
- ],
- defaultSection:[],
- popupCx: '',
- dept_ids:[],
- selectTbIndex:1,
- },
- onLoad(e) {
- that = this;
- dd.setNavigationBar({
- title: "钉钉通讯录同步"
- });
- },
- onShow() {
- animation = dd.createAnimation({
- duration: 200,
- timeFunction: "linear",
- });
- },
- //抢任务
- formSubmit() {
- this.setData({ disabled: true })
- app.$post("api/integral/task", { task_id: this.data.dataDetail.id }).then((res) => {
- app.globalData.showToast('抢单成功!');
- setTimeout(() => {
- dd.navigateBack({ delta: 1 })
- }, 1000);
- }).finally(() => {
- that.setData({ disabled: false })
- });
-
- },
- radioChange(e) {
- this.setData({
- selectTbIndex:e.detail.value
- })
- },
- //选择弹窗
- openSelect(e) {
- animation.translateY(0).step();
- that.setData({
- isShowType: 1,
- popupCx: 'container__mask',
- animationInfo: animation.export()
- });
- },
- //关闭规则
- onClose() {
- animation.translateY(1200).step();
- that.setData({
- isShowType: '',
- popupCx: '',
- animationInfo: animation.export()
- });
- },
- //选择部门
- onSelectSection(e) {
- var arr = [];
- if (e.length > 0) {
- let names='';
- e.forEach(user => {
- arr.push(user.id);
- names+=(user.name+',')
- })
- that.setData({
- defaultSection: e,
- dept_ids: arr,
- deptNames:names
- })
- } else {
- that.setData({
- defaultSection: [],
- dept_ids: [],
- deptNames:''
- })
- }
- },
- });
|