xfrontend/web/srczip/logic/copykanban.js
2021-08-17 18:39:53 +08:00

70 lines
2.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){
X.pageLogic['copykanban'] = {
init : function(parms){
var me = this;
this.parms = parms;
this.callback = parms.callback; //选择后执行的回调
var data = parms.extData;//获取到上层弹窗传的数据
var comboTree1,comboTree2;
// X.api("project/","get",{},function(d){
X.laytpldata("#project-list-box-dot",X.DATA.projectarr,".project-list-box");
// });
// 项目监听下拉框
// layui.form.on('select(projectlist)', function(data){
// if(data){
// X.api('project/kanban','post',{_id:data.value},function(d){
// comboTree1 = $('.copy-txt-box .justAnotherInputBox1').comboTree({
// source : d.kanban,
// isMultiple: false
// });
// comboTree2 = $('.copy-txt-box .justAnotherInputBox2').comboTree({
// source : d.spaces,
// isMultiple: false
// });
// })
// }
// });
layui.form.render();
//叉图标关闭弹窗
// $(document).off('click','.copy-top .copy-cha').on('click','.copy-top .copy-cha',function(){
// console.log(layer.index)
// parent.layer.closeAll(layer.index);
// });
// //取消按钮
// $(".copy-but-box .copy-qx").click(function(){
// layer.closeAll(layer.index);
// });
//我的看板空间切换实践copy-tab
$(".copy-tab-box .copy-tab div").click(function(){
$(".copy-tab-box .copy-tab div").removeClass('tabdata');
$(this).addClass('tabdata');
if($(this).html() == "我的看板"){
$(".copy-txt-box .justAnotherInputBox1").show();
$(".copy-txt-box .justAnotherInputBox2").hide();
}else {
$(".copy-txt-box .justAnotherInputBox1").hide();
$(".copy-txt-box .justAnotherInputBox2").show();
}
$(".copy-txt-box .justAnotherInputBox1").val("");
$(".copy-txt-box .justAnotherInputBox2").val("");
})
//确定按钮
$(".copy-but-box .copy-qd").click(function(){
var seldata = layui.form.val('projectlistexample');
var dataArr = {
'source_ids':data, //复制的看板id
'dest_project_id':seldata['project'] //复制到的项目id
};
X.api('dashboard/copy','post',dataArr,function(d){
layer.msg('复制成功');
layer.closeAll(0);
})
});
}
};
})();