提交
This commit is contained in:
parent
a1283e82dd
commit
8a2a67597b
@ -18,6 +18,7 @@
|
||||
</div>
|
||||
<div class="adminmykanban-operation-but">
|
||||
<button class="adminmykanban-operation-but-yidong"> <img src="./static/img/yidong.png" /> 移动至</button>
|
||||
<button class="adminmykanban-operation-but-copy"><i class="layui-icon"></i> 复制</button>
|
||||
<button class="adminmykanban-operation-but-del"> <img src="./static/img/del-red.png" /> 删除</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -29,7 +30,7 @@
|
||||
<div id="adminmykanban-con-kongjian" class="demo-tree-more"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -2,27 +2,38 @@
|
||||
<div class="copy-box">
|
||||
<div class="copy-top">
|
||||
<p>复制看板</p>
|
||||
<img src="./static/img/cha.png" id="copy-cha"/>
|
||||
<img src="./static/img/cha.png" class="copy-cha"/>
|
||||
</div>
|
||||
<input id="copyid" style="display: none;">
|
||||
<div class="copy-name-box">
|
||||
<div class="copy-title">看板名称</div>
|
||||
<input type="text" class="copyname-txt" id="copyname-txt"/>
|
||||
<div class="copy-title">项目名称</div>
|
||||
<!-- <input type="text" class="copyname-txt" id="copyname-txt"/> -->
|
||||
<form class="layui-form" action="" lay-filter="projectlistexample">
|
||||
<select name="project" lay-verify="required" class="project-list-box" lay-filter="projectlist">
|
||||
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
<div class="copy-tab-box">
|
||||
<!-- <div class="copy-tab-box">
|
||||
<div class="copy-title">添加至</div>
|
||||
<div class="copy-tab">
|
||||
<div class="tabdata" id='copykanban' onclick="tabdata('copykanban','copy')">我的看板</div>
|
||||
<div id='copykongjian' onclick="tabdata('copykongjian','copy')">项目空间</div>
|
||||
<div class="tabdata" id='copykanban' >我的看板</div>
|
||||
<div id='copykongjian' >项目空间</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="copy-txt-box">
|
||||
<input type="text" class="justAnotherInputBox1" placeholder=""/>
|
||||
<input type="text" class="justAnotherInputBox2" placeholder=""/>
|
||||
</div>
|
||||
<div class="copy-tishi"> <img src="./static/img/capytishi.png"/> 复制看板将同时复制看板内的报表 </div>
|
||||
<div class="copy-txt-box" style="position: fixed; width: 260px;">
|
||||
<input type="text" class="justAnotherInputBox1" id="copyjustAnotherInputBox1" placeholder=""/>
|
||||
<input type="text" class="justAnotherInputBox2" id="copyjustAnotherInputBox2" placeholder=""/>
|
||||
</div> -->
|
||||
<div class="copy-tishi"> <img src="./static/img/capytishi.png"/> 该复制是项目之间复制报表内容 </div>
|
||||
<div class="copy-but-box">
|
||||
<div class="copy-qx" id="copy-qx">取消</div>
|
||||
<div class="copy-qd" id="copy-qd">确定</div>
|
||||
<div class="copy-qx">取消</div>
|
||||
<div class="copy-qd">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script id="project-list-box-dot" type="text/html">
|
||||
{{# layui.each(d, function(index, item){ }}
|
||||
<option value="{{item._id}}">{{item.name}}</option>
|
||||
{{# }); }}
|
||||
</script>
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
|
||||
layui.define(['jquery'], function(exports){
|
||||
var $ = layui.jquery;
|
||||
var obj = {
|
||||
open:function(){
|
||||
layer.msg('修改成功');
|
||||
}
|
||||
};
|
||||
//输出接口
|
||||
exports('common', obj);
|
||||
});
|
||||
|
180
web/src/x.min.js
vendored
180
web/src/x.min.js
vendored
@ -103,8 +103,8 @@ var X = window.X || {
|
||||
|
||||
(function(){
|
||||
|
||||
// var ipurl = "http://10.0.0.77:7889/api/v1/";
|
||||
var ipurl = "http://139.159.159.3:9865/api/v1/";
|
||||
var ipurl = "http://10.0.0.77:7889/api/v1/";
|
||||
// var ipurl = "http://139.159.159.3:9865/api/v1/";
|
||||
|
||||
//设置或读取登录缓存,需要保存到localStorage,防止刷新时候登录数据丢失
|
||||
X.loginCache = function(data){
|
||||
@ -642,7 +642,7 @@ var X = window.X || {
|
||||
legenddata:legenddata,
|
||||
seriesData:seriesData,
|
||||
date:date,
|
||||
sum:sum,
|
||||
sum:sum.toFixed(2),
|
||||
mean:mean,
|
||||
sameday: sameday
|
||||
}
|
||||
@ -1219,16 +1219,16 @@ var X = window.X || {
|
||||
|
||||
$(".adminmykanban-top-fh").click(function(){
|
||||
layer.closeAll();
|
||||
})
|
||||
});
|
||||
|
||||
$(".adminmykanban-sousuo-box .cha").click(function(){
|
||||
$(document).off('click','.adminmykanban-sousuo-box .cha').on('click','.adminmykanban-sousuo-box .cha',function(){
|
||||
$(".adminmykanban-sousuo-box .adminmykanban-txt").val("");
|
||||
$(".adminmykanban-sousuo-box .cha").hide();
|
||||
me.updata(X.DATA['projectid']);
|
||||
})
|
||||
});
|
||||
|
||||
// 全选按钮
|
||||
$(document).on('click','#adminmykanban-quanxuan',function(){
|
||||
$(document).off('click','#adminmykanban-quanxuan').on('click','#adminmykanban-quanxuan',function(){
|
||||
var KanBanData = X.DATA['sxKanBanData'];
|
||||
var ProjectData = X.DATA['sxProjectData'];
|
||||
if($(this).prop('checked')){
|
||||
@ -1249,6 +1249,7 @@ var X = window.X || {
|
||||
X.treemenu("#adminmykanban-con-mykanban",KanBanData,'mykanban');
|
||||
X.treemenu("#adminmykanban-con-kongjian",ProjectData,'kongjian');
|
||||
});
|
||||
|
||||
// 搜索
|
||||
$('.adminmykanban-sousuo-box .adminmykanban-txt').bind('input propertychange', function() {
|
||||
var txt = $(this).val();
|
||||
@ -1334,16 +1335,21 @@ var X = window.X || {
|
||||
$(".adminmykanban-sousuo-box .cha").hide();
|
||||
me.updata(X.DATA['projectid']);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function cloneObjectFn(obj){ // 对象复制
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
}
|
||||
};
|
||||
|
||||
//移动至
|
||||
$(".adminmykanban-operation-but-yidong").click(function(){
|
||||
$(document).off('click','.adminmykanban-operation-but-yidong').on('click','.adminmykanban-operation-but-yidong',function(){
|
||||
var mykanban = layui.tree.getChecked('mykanban');
|
||||
var kongjian = layui.tree.getChecked('kongjian');
|
||||
console.log(kongjian);
|
||||
if(mykanban.length < 1 && kongjian.length < 1){
|
||||
alert('请先选择需要移动的看板!!!');
|
||||
return;
|
||||
}
|
||||
var data = {
|
||||
'mykanban':selectkanbanidarr(mykanban),
|
||||
'kongjian':selectkongjianidarr(kongjian)
|
||||
@ -1351,18 +1357,19 @@ var X = window.X || {
|
||||
X.parametersopen(data,'yidong-pop','auto',function(){
|
||||
me.updata(X.DATA['projectid']);
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
//删除
|
||||
$(document).on("click",".adminmykanban-operation-but-del",function(){
|
||||
$(document).off('click','.adminmykanban-operation-but-del').on('click','.adminmykanban-operation-but-del',function(){
|
||||
var mykanban = layui.tree.getChecked('mykanban');
|
||||
var kongjian = layui.tree.getChecked('kongjian');
|
||||
|
||||
var kanbanid = selectkanbanidarr(mykanban);
|
||||
var kongjianid = selectkongjianidarr(kongjian);
|
||||
|
||||
console.log(kanbanid);
|
||||
console.log(kongjianid);
|
||||
|
||||
var data= kanbanid.concat(kongjianid);
|
||||
if(data.length == 0 ){
|
||||
alert('请先选择要删除的看板!!!');
|
||||
return;
|
||||
}
|
||||
|
||||
$(".layui-layer").css('background-color','#fff !important');
|
||||
layer.confirm('确认删除选中的看板吗?该操作不可恢复', {
|
||||
@ -1372,16 +1379,31 @@ var X = window.X || {
|
||||
layer.close(layer.index);
|
||||
}, function(){
|
||||
//删除
|
||||
var data= {
|
||||
'kanbanid':kanbanid,
|
||||
'kongjianid':kongjianid
|
||||
}
|
||||
X.api("api/sidebardel",data,function(d){
|
||||
|
||||
X.api("dashboard/delete",'post',{ids:data},function(d){
|
||||
layer.msg('删除成功');
|
||||
layer.close(layer.index);
|
||||
X.pageLogic.dashboard.freshMenu(X.DATA.projectid);//刷新侧边栏
|
||||
me.updata(X.DATA.projectid);//刷新数据
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 复制
|
||||
$(document).off('click','.adminmykanban-operation-but-copy').on('click','.adminmykanban-operation-but-copy',function(){
|
||||
var mykanban = layui.tree.getChecked('mykanban');
|
||||
var kongjian = layui.tree.getChecked('kongjian');
|
||||
var kanbanid = selectkanbanidarr(mykanban);
|
||||
var kongjianid = selectkongjianidarr(kongjian);
|
||||
var data= kanbanid.concat(kongjianid);
|
||||
if(data.length < 1){
|
||||
alert('请先选择需要复制的看板!!!');
|
||||
return;
|
||||
}
|
||||
X.parametersopen(data,'copykanban','auto',function(){
|
||||
// me.updata(X.DATA['projectid']);
|
||||
})
|
||||
})
|
||||
|
||||
function selectkanbanidarr(mykanban){
|
||||
@ -1397,7 +1419,7 @@ var X = window.X || {
|
||||
|
||||
}
|
||||
return kanbanid
|
||||
}
|
||||
};
|
||||
|
||||
function selectkongjianidarr(kongjian){
|
||||
var kongjianid = [];
|
||||
@ -1405,13 +1427,13 @@ var X = window.X || {
|
||||
if(kongjian[i]['children'].length > 0){
|
||||
for(let j in kongjian[i]['children']){
|
||||
|
||||
if(kongjian[i]['children'][j]['children'].length > 0){
|
||||
for(let z in kongjian[i]['children'][j]['children']){
|
||||
kongjianid.push(kongjian[i]['children'][j]['children'][z]['id'])
|
||||
}
|
||||
}else {
|
||||
// if(kongjian[i]['children'][j]['children'].length > 0){
|
||||
// for(let z in kongjian[i]['children'][j]['children']){
|
||||
// kongjianid.push(kongjian[i]['children'][j]['children'][z]['id'])
|
||||
// }
|
||||
// }else {
|
||||
kongjianid.push(kongjian[i]['children'][j]['id']);
|
||||
}
|
||||
// }
|
||||
}
|
||||
}else {
|
||||
kongjianid.push(kongjian[i]['id']);
|
||||
@ -3140,6 +3162,77 @@ var X = window.X || {
|
||||
}
|
||||
};
|
||||
})();
|
||||
// srczip/logic/copykanban.js
|
||||
(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();
|
||||
//叉图标关闭弹窗
|
||||
$(".copy-top .copy-cha").click(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);
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
||||
// srczip/logic/dashboard.js
|
||||
//cc
|
||||
(function(){
|
||||
@ -3390,12 +3483,13 @@ var X = window.X || {
|
||||
$("#model-box").html("");//清空表格数据
|
||||
|
||||
X.api('dashboard/','post',{id:X.DATA['dashboard_id']},function(d){
|
||||
|
||||
console.log(d);
|
||||
var index = d.length;
|
||||
for(let z in d){
|
||||
|
||||
(function (i, model) { // 注意这里是形参
|
||||
setTimeout(function () {
|
||||
console.log(d[i]['report_id']);
|
||||
X.api("ck/"+model+"_model","post",{report_id:d[i]['report_id']},function(val){
|
||||
var eventdata=[];
|
||||
if(model == "event"){
|
||||
@ -9077,7 +9171,7 @@ var X = window.X || {
|
||||
var id = '';//没有默认传看板
|
||||
if($('#yidongjustAnotherInputBox2').val() != ""){
|
||||
var Addlocation = $('#yidongjustAnotherInputBox2').val();
|
||||
type = "kongjian"
|
||||
type = "space"
|
||||
}else {
|
||||
var Addlocation = $('#yidongjustAnotherInputBox1').val();
|
||||
}
|
||||
@ -9088,20 +9182,20 @@ var X = window.X || {
|
||||
alert('请选择添加的位置');
|
||||
return;
|
||||
}
|
||||
|
||||
var source_id = data['mykanban'].concat(data['kongjian']);
|
||||
var dataArr = {
|
||||
'movepositionid': id,
|
||||
'kanbandata':data.mykanban,
|
||||
'kongjiandata':data.kongjian
|
||||
}
|
||||
|
||||
X.api('api/yidong',dataArr,function(d){
|
||||
if(d.code == "ok"){
|
||||
X.pageLogic.dashboard.freshMenu();//刷新侧边栏
|
||||
X.pageLogic.adminkanban.updata();//刷新数据
|
||||
'source_ids':source_id,
|
||||
'dest_pid': id,
|
||||
'cat':type
|
||||
};
|
||||
console.log(dataArr);
|
||||
X.api('dashboard/move','post',dataArr,function(d){
|
||||
// if(d.code == "ok"){
|
||||
X.pageLogic.dashboard.freshMenu(X.DATA.projectid);//刷新侧边栏
|
||||
X.pageLogic.adminkanban.updata(X.DATA.projectid);//刷新数据
|
||||
console.log(me.parms.layIndex);
|
||||
layer.closeAll(me.parms.layIndex);
|
||||
}
|
||||
layer.closeAll(0);
|
||||
// }
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -102,8 +102,8 @@ var X = window.X || {
|
||||
|
||||
(function(){
|
||||
|
||||
// var ipurl = "http://10.0.0.77:7889/api/v1/";
|
||||
var ipurl = "http://139.159.159.3:9865/api/v1/";
|
||||
var ipurl = "http://10.0.0.77:7889/api/v1/";
|
||||
// var ipurl = "http://139.159.159.3:9865/api/v1/";
|
||||
|
||||
//设置或读取登录缓存,需要保存到localStorage,防止刷新时候登录数据丢失
|
||||
X.loginCache = function(data){
|
||||
@ -641,7 +641,7 @@ var X = window.X || {
|
||||
legenddata:legenddata,
|
||||
seriesData:seriesData,
|
||||
date:date,
|
||||
sum:sum,
|
||||
sum:sum.toFixed(2),
|
||||
mean:mean,
|
||||
sameday: sameday
|
||||
}
|
||||
|
@ -8,16 +8,16 @@
|
||||
|
||||
$(".adminmykanban-top-fh").click(function(){
|
||||
layer.closeAll();
|
||||
})
|
||||
});
|
||||
|
||||
$(".adminmykanban-sousuo-box .cha").click(function(){
|
||||
$(document).off('click','.adminmykanban-sousuo-box .cha').on('click','.adminmykanban-sousuo-box .cha',function(){
|
||||
$(".adminmykanban-sousuo-box .adminmykanban-txt").val("");
|
||||
$(".adminmykanban-sousuo-box .cha").hide();
|
||||
me.updata(X.DATA['projectid']);
|
||||
})
|
||||
});
|
||||
|
||||
// 全选按钮
|
||||
$(document).on('click','#adminmykanban-quanxuan',function(){
|
||||
$(document).off('click','#adminmykanban-quanxuan').on('click','#adminmykanban-quanxuan',function(){
|
||||
var KanBanData = X.DATA['sxKanBanData'];
|
||||
var ProjectData = X.DATA['sxProjectData'];
|
||||
if($(this).prop('checked')){
|
||||
@ -38,6 +38,7 @@
|
||||
X.treemenu("#adminmykanban-con-mykanban",KanBanData,'mykanban');
|
||||
X.treemenu("#adminmykanban-con-kongjian",ProjectData,'kongjian');
|
||||
});
|
||||
|
||||
// 搜索
|
||||
$('.adminmykanban-sousuo-box .adminmykanban-txt').bind('input propertychange', function() {
|
||||
var txt = $(this).val();
|
||||
@ -123,16 +124,21 @@
|
||||
$(".adminmykanban-sousuo-box .cha").hide();
|
||||
me.updata(X.DATA['projectid']);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function cloneObjectFn(obj){ // 对象复制
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
}
|
||||
};
|
||||
|
||||
//移动至
|
||||
$(".adminmykanban-operation-but-yidong").click(function(){
|
||||
$(document).off('click','.adminmykanban-operation-but-yidong').on('click','.adminmykanban-operation-but-yidong',function(){
|
||||
var mykanban = layui.tree.getChecked('mykanban');
|
||||
var kongjian = layui.tree.getChecked('kongjian');
|
||||
console.log(kongjian);
|
||||
if(mykanban.length < 1 && kongjian.length < 1){
|
||||
alert('请先选择需要移动的看板!!!');
|
||||
return;
|
||||
}
|
||||
var data = {
|
||||
'mykanban':selectkanbanidarr(mykanban),
|
||||
'kongjian':selectkongjianidarr(kongjian)
|
||||
@ -140,18 +146,19 @@
|
||||
X.parametersopen(data,'yidong-pop','auto',function(){
|
||||
me.updata(X.DATA['projectid']);
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
//删除
|
||||
$(document).on("click",".adminmykanban-operation-but-del",function(){
|
||||
$(document).off('click','.adminmykanban-operation-but-del').on('click','.adminmykanban-operation-but-del',function(){
|
||||
var mykanban = layui.tree.getChecked('mykanban');
|
||||
var kongjian = layui.tree.getChecked('kongjian');
|
||||
|
||||
var kanbanid = selectkanbanidarr(mykanban);
|
||||
var kongjianid = selectkongjianidarr(kongjian);
|
||||
|
||||
console.log(kanbanid);
|
||||
console.log(kongjianid);
|
||||
|
||||
var data= kanbanid.concat(kongjianid);
|
||||
if(data.length == 0 ){
|
||||
alert('请先选择要删除的看板!!!');
|
||||
return;
|
||||
}
|
||||
|
||||
$(".layui-layer").css('background-color','#fff !important');
|
||||
layer.confirm('确认删除选中的看板吗?该操作不可恢复', {
|
||||
@ -161,16 +168,31 @@
|
||||
layer.close(layer.index);
|
||||
}, function(){
|
||||
//删除
|
||||
var data= {
|
||||
'kanbanid':kanbanid,
|
||||
'kongjianid':kongjianid
|
||||
}
|
||||
X.api("api/sidebardel",data,function(d){
|
||||
|
||||
X.api("dashboard/delete",'post',{ids:data},function(d){
|
||||
layer.msg('删除成功');
|
||||
layer.close(layer.index);
|
||||
X.pageLogic.dashboard.freshMenu(X.DATA.projectid);//刷新侧边栏
|
||||
me.updata(X.DATA.projectid);//刷新数据
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 复制
|
||||
$(document).off('click','.adminmykanban-operation-but-copy').on('click','.adminmykanban-operation-but-copy',function(){
|
||||
var mykanban = layui.tree.getChecked('mykanban');
|
||||
var kongjian = layui.tree.getChecked('kongjian');
|
||||
var kanbanid = selectkanbanidarr(mykanban);
|
||||
var kongjianid = selectkongjianidarr(kongjian);
|
||||
var data= kanbanid.concat(kongjianid);
|
||||
if(data.length < 1){
|
||||
alert('请先选择需要复制的看板!!!');
|
||||
return;
|
||||
}
|
||||
X.parametersopen(data,'copykanban','auto',function(){
|
||||
// me.updata(X.DATA['projectid']);
|
||||
})
|
||||
})
|
||||
|
||||
function selectkanbanidarr(mykanban){
|
||||
@ -186,7 +208,7 @@
|
||||
|
||||
}
|
||||
return kanbanid
|
||||
}
|
||||
};
|
||||
|
||||
function selectkongjianidarr(kongjian){
|
||||
var kongjianid = [];
|
||||
@ -194,13 +216,13 @@
|
||||
if(kongjian[i]['children'].length > 0){
|
||||
for(let j in kongjian[i]['children']){
|
||||
|
||||
if(kongjian[i]['children'][j]['children'].length > 0){
|
||||
for(let z in kongjian[i]['children'][j]['children']){
|
||||
kongjianid.push(kongjian[i]['children'][j]['children'][z]['id'])
|
||||
}
|
||||
}else {
|
||||
// if(kongjian[i]['children'][j]['children'].length > 0){
|
||||
// for(let z in kongjian[i]['children'][j]['children']){
|
||||
// kongjianid.push(kongjian[i]['children'][j]['children'][z]['id'])
|
||||
// }
|
||||
// }else {
|
||||
kongjianid.push(kongjian[i]['children'][j]['id']);
|
||||
}
|
||||
// }
|
||||
}
|
||||
}else {
|
||||
kongjianid.push(kongjian[i]['id']);
|
||||
|
70
web/srczip/logic/copykanban.js
Normal file
70
web/srczip/logic/copykanban.js
Normal file
@ -0,0 +1,70 @@
|
||||
(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();
|
||||
//叉图标关闭弹窗
|
||||
$(".copy-top .copy-cha").click(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);
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
})();
|
@ -247,12 +247,13 @@
|
||||
$("#model-box").html("");//清空表格数据
|
||||
|
||||
X.api('dashboard/','post',{id:X.DATA['dashboard_id']},function(d){
|
||||
|
||||
console.log(d);
|
||||
var index = d.length;
|
||||
for(let z in d){
|
||||
|
||||
(function (i, model) { // 注意这里是形参
|
||||
setTimeout(function () {
|
||||
console.log(d[i]['report_id']);
|
||||
X.api("ck/"+model+"_model","post",{report_id:d[i]['report_id']},function(val){
|
||||
var eventdata=[];
|
||||
if(model == "event"){
|
||||
|
@ -45,7 +45,7 @@
|
||||
var id = '';//没有默认传看板
|
||||
if($('#yidongjustAnotherInputBox2').val() != ""){
|
||||
var Addlocation = $('#yidongjustAnotherInputBox2').val();
|
||||
type = "kongjian"
|
||||
type = "space"
|
||||
}else {
|
||||
var Addlocation = $('#yidongjustAnotherInputBox1').val();
|
||||
}
|
||||
@ -56,20 +56,20 @@
|
||||
alert('请选择添加的位置');
|
||||
return;
|
||||
}
|
||||
|
||||
var source_id = data['mykanban'].concat(data['kongjian']);
|
||||
var dataArr = {
|
||||
'movepositionid': id,
|
||||
'kanbandata':data.mykanban,
|
||||
'kongjiandata':data.kongjian
|
||||
}
|
||||
|
||||
X.api('api/yidong',dataArr,function(d){
|
||||
if(d.code == "ok"){
|
||||
X.pageLogic.dashboard.freshMenu();//刷新侧边栏
|
||||
X.pageLogic.adminkanban.updata();//刷新数据
|
||||
'source_ids':source_id,
|
||||
'dest_pid': id,
|
||||
'cat':type
|
||||
};
|
||||
console.log(dataArr);
|
||||
X.api('dashboard/move','post',dataArr,function(d){
|
||||
// if(d.code == "ok"){
|
||||
X.pageLogic.dashboard.freshMenu(X.DATA.projectid);//刷新侧边栏
|
||||
X.pageLogic.adminkanban.updata(X.DATA.projectid);//刷新数据
|
||||
console.log(me.parms.layIndex);
|
||||
layer.closeAll(me.parms.layIndex);
|
||||
}
|
||||
layer.closeAll(0);
|
||||
// }
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -220,8 +220,8 @@ span.comboTreeItemTitle{display: block;padding: 2px 4px;}
|
||||
|
||||
/* 复制看板 */
|
||||
/* 移动看板 */
|
||||
.copy-bg { display: none; background-color: rgba(0, 0, 0, 0.3); width: 100%; height: 100%; position: fixed; top: 0; z-index: 9999; }
|
||||
.copy-box { width: 396px; height: 314px; position: absolute; margin: auto; left: 0; right: 0; top: 0; bottom: 0; background-color: #ffffff; border-radius: 2px; }
|
||||
/* .copy-bg { display: none; background-color: rgba(0, 0, 0, 0.3); width: 100%; height: 100%; position: fixed; top: 0; z-index: 9999; } */
|
||||
.copy-box { width: 396px; height: 200px; background-color: #ffffff; border-radius: 2px; }
|
||||
.copy-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; color: #202d3f; font-size: 16px; }
|
||||
.copy-top img { cursor: pointer; }
|
||||
.copy-txt-box { height: 32px; padding: 10px 28px 10px 114px; }
|
||||
@ -236,7 +236,7 @@ span.comboTreeItemTitle{display: block;padding: 2px 4px;}
|
||||
.copy-tab div { cursor: pointer; font-size: 12px; text-align: center; width: 70px; height: 28px; line-height: 28px;}
|
||||
.copy-name-box { height: 32px; padding: 10px 28px; display: flex; align-items: center; justify-content: flex-start; }
|
||||
.copyname-txt { width: calc(100% - 86px); height: 32px; line-height: 32px; padding: 0 8px; color: #42546d; border-radius: 2px; border: 1px solid #f0f0f0; }
|
||||
.copy-tishi { margin-left: 114px; width: 205px; text-align: center; color: #607595; padding: 2px; font-size: 12px; background-color: #f1f8ff; }
|
||||
.copy-tishi { margin-left: 114px; width: 205px; text-align: center; color: #607595; padding: 2px; font-size: 12px; background-color: #f1f8ff; margin-top: 0px;}
|
||||
|
||||
/* 删除看板 */
|
||||
.del-bg { display: none; background-color: rgba(0, 0, 0, 0.3); width: 100%; height: 100%; position: fixed; top: 0; z-index: 9999; }
|
||||
@ -424,7 +424,9 @@ label:not(.form-check-label):not(.custom-file-label) { font-weight: 400; }
|
||||
.adminmykanban-sousuo-box input { margin-left: 8px; width: 460px; height: 30px; line-height: 30px; font-size: 14px; border: 0; border-radius: 2px; color: #42546d; }
|
||||
.adminmykanban-operation { border-bottom: 1px solid #f0f0f0; padding: 7px 24px; display: flex; justify-content: space-between; align-items: center; }
|
||||
.adminmykanban-operation-but button { cursor: pointer; background-color: #fff; padding: 0 16px; height: 32px; font-size: 14px; line-height: 30px; text-shadow: none; }
|
||||
|
||||
.adminmykanban-operation-but-yidong { color: #42546d; border: 1px solid #f0f0f0; }
|
||||
.adminmykanban-operation-but-copy { color: #009688; border: 1px solid #009688; }
|
||||
.adminmykanban-operation-but-del { color: #ff5d5d; border:1px solid #ff5d5d; }
|
||||
.adminmykanban-con-box { padding: 7px 24px; overflow-y: scroll; }
|
||||
.adminmykanban-con-box .adminmykanban-con-title { height: 48px; line-height: 48px; font-weight: 500; font-size: 14px; color: #42546d; }
|
||||
|
Loading…
Reference in New Issue
Block a user