diff --git a/web/pages/useradmin.html b/web/pages/useradmin.html
index a1d560b..487e2a0 100644
--- a/web/pages/useradmin.html
+++ b/web/pages/useradmin.html
@@ -46,7 +46,7 @@
\ No newline at end of file
diff --git a/web/pages/usergroup.html b/web/pages/usergroup.html
new file mode 100644
index 0000000..c9789c0
--- /dev/null
+++ b/web/pages/usergroup.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
用户分群
+
+
+
+
+
+
+
+
+
+
+ 新建分群
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/src/x.min.js b/web/src/x.min.js
index ab20d5c..429ad34 100644
--- a/web/src/x.min.js
+++ b/web/src/x.min.js
@@ -1026,6 +1026,10 @@ var X = window.X || {
ylist.push(arr)
}
console.log(ylist);
+ if(ylist.length == 0){
+ layer.msg('暂未选择用户');
+ return;
+ }
X.api("authz/add_role_domain","post",{data:ylist},function(d){
console.log(d)
layer.closeAll();
@@ -3383,6 +3387,111 @@ var X = window.X || {
}
};
})();
+// srczip/logic/copyreport.js
+(function(){
+ X.pageLogic['copyreport'] = {
+ 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",d,".project-list-box");
+ layui.form.render();
+ comboTree1 = $('.yidong-txt-box .justAnotherInputBox1').comboTree({
+ source : X.DATA.KanBanData,
+ isMultiple: false
+ });
+ comboTree2 = $('.yidong-txt-box .justAnotherInputBox2').comboTree({
+ source : X.DATA.ProjectData,
+ isMultiple: false
+ });
+ });
+
+ layui.form.on('select(projectlist)', function(data){
+ console.log(data);
+ comboTree1.destroy();
+ comboTree2.destroy();
+ X.api('project/kanban',"post",{"_id":data.value},function (d){
+ X.DATA['KanBanData'] = d.kanban;
+ X.DATA['ProjectData'] = d.spaces;
+ comboTree1 = $('.yidong-txt-box .justAnotherInputBox1').comboTree({
+ source : d.kanban,
+ isMultiple: false
+ });
+ comboTree2 = $('.yidong-txt-box .justAnotherInputBox2').comboTree({
+ source : d.spaces,
+ isMultiple: false
+ });
+ });
+ });
+
+
+
+ //叉图标关闭弹窗
+ $(".yidong-top .yidong-cha").click(function(){
+ console.log(layer.index)
+ parent.layer.closeAll(layer.index);
+ });
+ //取消按钮
+ $(".yidong-but-box .yidong-qx").click(function(){
+ layer.closeAll(layer.index);
+ });
+ //我的看板,空间切换实践
+ $(".yidong-tab-box .yidong-tab div").click(function(){
+ $(".yidong-tab-box .yidong-tab div").removeClass('tabdata');
+ $(this).addClass('tabdata');
+ if($(this).html() == "我的看板"){
+ $(".yidong-txt-box .justAnotherInputBox1").show();
+ $(".yidong-txt-box .justAnotherInputBox2").hide();
+ }else {
+ $(".yidong-txt-box .justAnotherInputBox1").hide();
+ $(".yidong-txt-box .justAnotherInputBox2").show();
+ }
+ $(".yidong-txt-box .justAnotherInputBox1").val("");
+ $(".yidong-txt-box .justAnotherInputBox2").val("");
+ })
+
+ //确定按钮
+ $(".yidong-but-box .yidong-qd").click(function(){
+ var type ='kanban';
+ var id = '';//没有默认传看板
+ if($('#yidongjustAnotherInputBox2').val() != ""){
+ var Addlocation = $('#yidongjustAnotherInputBox2').val();
+ type = "space"
+ }else {
+ var Addlocation = $('#yidongjustAnotherInputBox1').val();
+ }
+ // console.log(Addlocation);
+ if(Addlocation){
+ id = X.pageLogic.newkanban.matchingid(Addlocation,type);
+ }else {
+ alert('请选择添加的位置');
+ return;
+ }
+ // var source_id = data['mykanban'].concat(data['kongjian']);
+ var dataArr = {
+ 'source_ids':data,
+ '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(0);
+ // }
+ })
+ });
+
+
+ }
+ };
+})();
// srczip/logic/dashboard.js
//cc
(function(){
@@ -3650,6 +3759,13 @@ var X = window.X || {
X.DATA[cat+'id'] = id;
});
+ //复制单个报表
+ $(document).off('click','.model-fuzhi').on('click','.model-fuzhi',function(e) {
+ X.parametersopen('','copyreport',"auto",function(d) {
+
+ })
+ })
+
// 渲染下拉框
$(document).off('click','.nav-action-bar').on('click','.nav-action-bar',function(e){
e.stopPropagation();
@@ -3808,18 +3924,18 @@ var X = window.X || {
//画统计图和添加移入移出事件
morefeatures:function(eventdata){
- $(".layui-card").mouseenter(function () {
- var classname = $(this).attr('class');
- if(classname.indexOf("tool-show") == -1){
- $(this).addClass('tool-show');
- }
- });
- $(".layui-card").mouseleave(function () {
- var classname = $(this).attr('class');
- if(classname.indexOf("tool-show") != -1){
- $(this).removeClass('tool-show');
- }
- });
+ // $(".layui-card").mouseenter(function () {
+ // var classname = $(this).attr('class');
+ // if(classname.indexOf("tool-show") == -1){
+ // $(this).addClass('tool-show');
+ // }
+ // });
+ // $(".layui-card").mouseleave(function () {
+ // var classname = $(this).attr('class');
+ // if(classname.indexOf("tool-show") != -1){
+ // $(this).removeClass('tool-show');
+ // }
+ // });
var dropdownlist = [
{title:'表格',id:'table'},
{title:'图形',id:'echarts'}
@@ -9467,9 +9583,25 @@ var X = window.X || {
})
}else if(obj.event == "del"){
// 删除
- X.parametersopen(data,"deluserinfo",'auto',function(){
- me.useradmin()
- })
+ // X.parametersopen(data,"deluserinfo",'auto',function(){
+ // me.useradmin()
+ // })
+
+ layer.confirm('确认删除吗?该操作不可恢复', {
+ btn: ['取消','删除 '] //按钮
+ }, function(){
+ //取消
+ layer.close(layer.index);
+ }, function(){
+ //删除
+ X.api("authz/del_role_user_domain",'post',{username:data.name,role_id:data.role_id,game:X.DATA['game']},function(d){
+ layer.msg('删除成功');
+ layer.close(layer.index);
+ me.useradmin();
+ // X.pageLogic.dashboard.freshMenu(X.DATA.projectid);//刷新侧边栏
+ // me.updata(X.DATA.projectid);//刷新数据
+ })
+ });
}
})
@@ -9483,7 +9615,7 @@ var X = window.X || {
,{field:'data_auth', width:180, title: '数据权限'}
,{field:'sign', title: '所属成员组', width: 180}
,{field:'last_login_ts', title: '最后访问时间', sort: true}
- ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:200}
+ ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:80}
]]);
}
@@ -9596,6 +9728,16 @@ var X = window.X || {
};
})();
+// srczip/logic/usergroup.js
+(function(){
+ X.pageLogic['usergroup'] = {
+ init : function(parms){
+
+
+
+ }
+ };
+})();
// srczip/logic/userpar.js
(function(){
X.pageLogic['userpar'] = {
diff --git a/web/srczip/logic/addexistuser.js b/web/srczip/logic/addexistuser.js
index 757a4cb..65c8aae 100644
--- a/web/srczip/logic/addexistuser.js
+++ b/web/srczip/logic/addexistuser.js
@@ -182,6 +182,10 @@
ylist.push(arr)
}
console.log(ylist);
+ if(ylist.length == 0){
+ layer.msg('暂未选择用户');
+ return;
+ }
X.api("authz/add_role_domain","post",{data:ylist},function(d){
console.log(d)
layer.closeAll();
diff --git a/web/srczip/logic/copyreport.js b/web/srczip/logic/copyreport.js
new file mode 100644
index 0000000..3cde1fb
--- /dev/null
+++ b/web/srczip/logic/copyreport.js
@@ -0,0 +1,104 @@
+(function(){
+ X.pageLogic['copyreport'] = {
+ 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",d,".project-list-box");
+ layui.form.render();
+ comboTree1 = $('.yidong-txt-box .justAnotherInputBox1').comboTree({
+ source : X.DATA.KanBanData,
+ isMultiple: false
+ });
+ comboTree2 = $('.yidong-txt-box .justAnotherInputBox2').comboTree({
+ source : X.DATA.ProjectData,
+ isMultiple: false
+ });
+ });
+
+ layui.form.on('select(projectlist)', function(data){
+ console.log(data);
+ comboTree1.destroy();
+ comboTree2.destroy();
+ X.api('project/kanban',"post",{"_id":data.value},function (d){
+ X.DATA['KanBanData'] = d.kanban;
+ X.DATA['ProjectData'] = d.spaces;
+ comboTree1 = $('.yidong-txt-box .justAnotherInputBox1').comboTree({
+ source : d.kanban,
+ isMultiple: false
+ });
+ comboTree2 = $('.yidong-txt-box .justAnotherInputBox2').comboTree({
+ source : d.spaces,
+ isMultiple: false
+ });
+ });
+ });
+
+
+
+ //叉图标关闭弹窗
+ $(".yidong-top .yidong-cha").click(function(){
+ console.log(layer.index)
+ parent.layer.closeAll(layer.index);
+ });
+ //取消按钮
+ $(".yidong-but-box .yidong-qx").click(function(){
+ layer.closeAll(layer.index);
+ });
+ //我的看板,空间切换实践
+ $(".yidong-tab-box .yidong-tab div").click(function(){
+ $(".yidong-tab-box .yidong-tab div").removeClass('tabdata');
+ $(this).addClass('tabdata');
+ if($(this).html() == "我的看板"){
+ $(".yidong-txt-box .justAnotherInputBox1").show();
+ $(".yidong-txt-box .justAnotherInputBox2").hide();
+ }else {
+ $(".yidong-txt-box .justAnotherInputBox1").hide();
+ $(".yidong-txt-box .justAnotherInputBox2").show();
+ }
+ $(".yidong-txt-box .justAnotherInputBox1").val("");
+ $(".yidong-txt-box .justAnotherInputBox2").val("");
+ })
+
+ //确定按钮
+ $(".yidong-but-box .yidong-qd").click(function(){
+ var type ='kanban';
+ var id = '';//没有默认传看板
+ if($('#yidongjustAnotherInputBox2').val() != ""){
+ var Addlocation = $('#yidongjustAnotherInputBox2').val();
+ type = "space"
+ }else {
+ var Addlocation = $('#yidongjustAnotherInputBox1').val();
+ }
+ // console.log(Addlocation);
+ if(Addlocation){
+ id = X.pageLogic.newkanban.matchingid(Addlocation,type);
+ }else {
+ alert('请选择添加的位置');
+ return;
+ }
+ // var source_id = data['mykanban'].concat(data['kongjian']);
+ var dataArr = {
+ 'source_ids':data,
+ '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(0);
+ // }
+ })
+ });
+
+
+ }
+ };
+})();
\ No newline at end of file
diff --git a/web/srczip/logic/dashboard.js b/web/srczip/logic/dashboard.js
index afd3d23..d51f680 100644
--- a/web/srczip/logic/dashboard.js
+++ b/web/srczip/logic/dashboard.js
@@ -264,6 +264,13 @@
X.DATA[cat+'id'] = id;
});
+ //复制单个报表
+ $(document).off('click','.model-fuzhi').on('click','.model-fuzhi',function(e) {
+ X.parametersopen('','copyreport',"auto",function(d) {
+
+ })
+ })
+
// 渲染下拉框
$(document).off('click','.nav-action-bar').on('click','.nav-action-bar',function(e){
e.stopPropagation();
@@ -422,18 +429,18 @@
//画统计图和添加移入移出事件
morefeatures:function(eventdata){
- $(".layui-card").mouseenter(function () {
- var classname = $(this).attr('class');
- if(classname.indexOf("tool-show") == -1){
- $(this).addClass('tool-show');
- }
- });
- $(".layui-card").mouseleave(function () {
- var classname = $(this).attr('class');
- if(classname.indexOf("tool-show") != -1){
- $(this).removeClass('tool-show');
- }
- });
+ // $(".layui-card").mouseenter(function () {
+ // var classname = $(this).attr('class');
+ // if(classname.indexOf("tool-show") == -1){
+ // $(this).addClass('tool-show');
+ // }
+ // });
+ // $(".layui-card").mouseleave(function () {
+ // var classname = $(this).attr('class');
+ // if(classname.indexOf("tool-show") != -1){
+ // $(this).removeClass('tool-show');
+ // }
+ // });
var dropdownlist = [
{title:'表格',id:'table'},
{title:'图形',id:'echarts'}
diff --git a/web/srczip/logic/useradmin.js b/web/srczip/logic/useradmin.js
index edf85c0..a3833c0 100644
--- a/web/srczip/logic/useradmin.js
+++ b/web/srczip/logic/useradmin.js
@@ -95,9 +95,25 @@
})
}else if(obj.event == "del"){
// 删除
- X.parametersopen(data,"deluserinfo",'auto',function(){
- me.useradmin()
- })
+ // X.parametersopen(data,"deluserinfo",'auto',function(){
+ // me.useradmin()
+ // })
+
+ layer.confirm('确认删除吗?该操作不可恢复', {
+ btn: ['取消','删除 '] //按钮
+ }, function(){
+ //取消
+ layer.close(layer.index);
+ }, function(){
+ //删除
+ X.api("authz/del_role_user_domain",'post',{username:data.name,role_id:data.role_id,game:X.DATA['game']},function(d){
+ layer.msg('删除成功');
+ layer.close(layer.index);
+ me.useradmin();
+ // X.pageLogic.dashboard.freshMenu(X.DATA.projectid);//刷新侧边栏
+ // me.updata(X.DATA.projectid);//刷新数据
+ })
+ });
}
})
@@ -111,7 +127,7 @@
,{field:'data_auth', width:180, title: '数据权限'}
,{field:'sign', title: '所属成员组', width: 180}
,{field:'last_login_ts', title: '最后访问时间', sort: true}
- ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:200}
+ ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:80}
]]);
}
diff --git a/web/srczip/logic/usergroup.js b/web/srczip/logic/usergroup.js
new file mode 100644
index 0000000..4b99171
--- /dev/null
+++ b/web/srczip/logic/usergroup.js
@@ -0,0 +1,9 @@
+(function(){
+ X.pageLogic['usergroup'] = {
+ init : function(parms){
+
+
+
+ }
+ };
+})();
\ No newline at end of file
diff --git a/web/static/css/style.css b/web/static/css/style.css
index df59e82..8a3b0ec 100644
--- a/web/static/css/style.css
+++ b/web/static/css/style.css
@@ -21,6 +21,7 @@
.layui-form-item .layui-form-checkbox[lay-skin=primary] { text-indent: 0px !important; }
.layui-anim-downbit { max-height: 350px; overflow-y: auto; overflow-x: hidden; }
/* .layui-nav .layui-nav-child dd.layui-this a, .layui-nav-child dd.layui-this { background-color: #f6f8fa !important; } */
+.controlhover:hover > .control { display: block; }
.username { color: #67729d; margin-right: 16px; }
.layui-project { position:absolute; top: 0; left: 80px; ;}
@@ -83,7 +84,7 @@
.echarts-box { padding: 0 24px; margin-top: 10px; height: 204px; }
.layui-card:last-child { padding-bottom: 12px; }
.echarts { width: 100%; height: 204px; }
-.control { display: none; }
+.control { height: 21px; display: none; }
.tool-show .control { display: block; }
.table-box { margin: 10px 24px 0 24px; height: 283px; overflow-x: auto; }
@@ -190,6 +191,7 @@ input::-webkit-input-placeholder{ color:#a7b5c3;}
/* 移动看板 */
.yidong-bg { display: none; background-color: rgba(0, 0, 0, 0.3); width: 100%; height: 100%; position: fixed; top: 0; z-index: 9999; }
.yidong-box { width: 396px; height: 242px; background-color: #ffffff; border-radius: 2px; }
+.copyreport-box { width: 396px; height: 300px; background-color: #ffffff; border-radius: 2px; }
.yidong-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; color: #202d3f; font-size: 16px; }
.yidong-top img { cursor: pointer; }
.yidong-txt-box { height: 32px; padding: 10px 28px; position: fixed; width: 345px; }
diff --git a/web/static/img/fuzhi2.png b/web/static/img/fuzhi2.png
new file mode 100644
index 0000000..c60f5f4
Binary files /dev/null and b/web/static/img/fuzhi2.png differ