开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
develop
分支 (3)
develop
forVS2010
ccbpm2021
develop
分支 (3)
develop
forVS2010
ccbpm2021
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
develop
分支 (3)
develop
forVS2010
ccbpm2021
ccflow
/
CCFlow
/
WF
/
Admin
/
Admin.js
ccflow
/
CCFlow
/
WF
/
Admin
/
Admin.js
Admin.js 15.41 KB
一键复制 编辑 原始数据 按行查看 历史
驰骋BPM 提交于 2020年07月08日 18:26 +08:00 . no commit message
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
/*
* admin.js文件说明
* 1. 为后台管理的页面增加的文件, 用于可以自动化的改变后台设置的一些特效.
* 2. 解决帮助的统一风格问题.
* 3. 目前增加了两个模式的操作。
* 3.1 fieldset 的 legend 的ID 包含 help 就是帮助内容页面. 出现的效果是加载后,是隐藏的,用户点击文字就要显示里面的内容
* 3.2 对于textArea 如果在 class='SQL' 系统就认为是表达式sql文本输入框.
* 3.3 对于标记 class="HelpImg" 的图片绑定事件,在click 让其可以全屏打开.
* 3.4 class=Help 的div都是帮助用的div. 比如下面,想办法,让其点击隐藏与显示.
* http://localhost:2207/WF/Admin/AttrNode/Selector/3.SQL.htm?FK_Node=1702
* <div id="DivHelp1" class="help">
是对人员的分组,分组的目的就是为了更友好的找到人员,比如:<br />
1. SELECT No,Name FROM Port_Dept <br />
2. SELECT No,Name FROM Port_Dept WHERE ParentNo='@WebUser.FK_Dept'<br />
3. SELECT No,Name FROM Port_Station WHERE No IN('01','02') 查询岗位编号是01,02 <br />
4. 分组数据源可以为空,如果为空就显示的时候不分组.<br />
</div>
*
* 4. 代国强来完善这两个方法,参考 D:\ccflow\CCFlow\WF\CCBill\Admin\MethodDoc.htm 页面。
*
*
*/
$(document).ready(function () {
//动态添加新风格
SetNewCSS();
//设置帮助页面内容
// SetHelpPage();
HelpDiv();
//设置自动提示.
initToggle();
//设置 class="Help" 的图片 点击直接可以全屏放大打开. @lz
SetHelpImg();
//设置放大的img容器
SetBigImgDiv();
//设置SQL脚本编辑器.
CheckSQLTextArea();
//如何给按钮自动增加标签?
AddBtnIcon();
})
function AddBtnIcon() {
//保存按钮icon
if ($("#Btn_Save").height() > 25)
$("#Btn_Save").attr('style', 'background-image: url(../../../Img/Btn/Save.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
else
$("#Btn_Save").attr('style', 'background-image: url(../../../Img/Btn/Save.png); background-repeat: no-repeat; background-size: 13px 13px; background-position: 1px 6px;');
if ($("#Btn_Delete").height() > 25)
$("#Btn_Delete").attr('style', 'background-image: url(../../../Img/Btn/Delete.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
else
$("#Btn_Delete").attr('style', 'background-image: url(../../../Img/Btn/Delete.png); background-repeat: no-repeat; background-size: 13px 13px; background-position: 1px 6px;');
//返回按钮icon
if ($("#Btn_Back").height() > 25)
$("#Btn_Back").attr('style', 'background-image: url(../../../Img/Btn/Back.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
else
$("#Btn_Back").attr('style', 'background-image: url(../../../Img/Btn/Back.png); background-repeat: no-repeat; background-size: 13px 13px; background-position: 1px 6px;');
//导入按钮icon
if ($("#Btn_Imp").height() > 25)
$("#Btn_Imp").attr('style', 'background-image: url(../../../Img/Btn/Imp.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
else
$("#Btn_Imp").attr('style', 'background-image: url(../../../Img/Btn/Imp.png); background-repeat: no-repeat; background-size: 13px 13px; background-position: 1px 6px;');
//导出按钮icon
if ($("#Btn_Exp").height() > 25)
$("#Btn_Exp").attr('style', 'background-image: url(../../../Img/Btn/Exp.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
else
$("#Btn_Exp").attr('style', 'background-image: url(../../../Img/Btn/Exp.png); background-repeat: no-repeat; background-size: 13px 13px; background-position: 1px 6px;');
//帮助按钮icon
if ($("#Btn_Help").height() > 25)
$("#Btn_Help").attr('style', 'background-image: url(../../../Img/Btn/Help.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
else
$("#Btn_Help").attr('style', 'background-image: url(../../../Img/Btn/Help.png); background-repeat: no-repeat; background-size: 13px 13px; background-position: 1px 6px;');
//高级按钮icon
if ($("#Btn_Advanced").height() > 25)
$("#Btn_Advanced").attr('style', 'background-image: url(../../../Img/Btn/Advanced.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
else
$("#Btn_Advanced").attr('style', 'background-image: url(../../../Img/Btn/Advanced.png); background-repeat: no-repeat; background-size: 13px 13px; background-position: 1px 6px;');
//批处理按钮
$("#Btn_Batch").attr('style', 'background-image: url(../../../Img/Btn/Batch.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
if ($("#Btn_New").height() > 25) {
$("#Btn_New").attr('style', 'background-image: url(../../../Img/Btn/New.png); background-repeat: no-repeat; background-size: 14px 14px; background-position: 6px 8px;');
$("#Btn_New").attr('height', 50);
}
else {
$("#Btn_New").attr('style', 'background-image: url(../../../Img/Btn/New.png); background-repeat: no-repeat; background-size: 13px 13px; background-position: 1px 6px;');
$("#Btn_New").attr('height', 50);
}
}
style = ''
//动态添加新风格
function SetNewCSS() {
//body下添加一个父Div
var div = document.createElement('div');
$(div).attr('class', 'cs-content-box');
$('#bar').wrap(div);
$('fieldset').wrapAll(div);
//帮助ul风格
div = document.createElement('div');
$(div).attr('class', 'cs-help');
$('ul').wrap(div);
$.each($("legend"), function (i, obj) {
var _html = $(obj).html();
if (obj.id.indexOf("help") != -1) {
$(obj).html("");
var div2 = "<div id='help1' class='help-title'> <img src='../Img/ico-help.png' alt='帮助' class='ico-help' />" + _html + " </div>";
$($(obj).parent().find("ul").parent()[0]).append(div2)
}
})
//bar风格
$('#bar').attr('class', 'cs-tr cs-bar');
//删除重复的说明标题
var leg = $("legend");
for (var i = 0; i < leg.length; i++) {
if (leg.eq(i).text() == "说明")
leg.eq(i).remove();
}
}
//设置帮助页面内容
function SetHelpPage() {
var legends = $("legend#help");
//隐藏所有兄弟级元素
legends.siblings().hide();
////增加font 以便监听单击
//var font = document.createElement('font');
//$(font).attr('id', 'cl');
//legends.wrap('#cl');
//legends.wrap(font);
$("font").on("click", function () {
alert("1234");
legends.siblings().show();
});
}
function showPage() {
var legends = $("legend#help");
//隐藏所有兄弟级元素
legends.siblings().show();
}
function HelpDiv() {
$("form").find("div").each(function () {
if (this.className.toLowerCase() == "help") {
//var msg = "请输入SQL语句,支持ccbpm的表达式.";
// this.placeholder = msg;
// this.value = FormatSQL(this.value);
this.css('color', 'Gray');
this.css('display', 'none');
alert(this.id);
}
});
}
//设置 class="HelpImg" 的图片 点击直接可以全屏放大打开.
function SetHelpImg() {
$(function () {
$(".HelpImg").click(function () {
var _this = $(this);//将当前的pimg元素作为_this传入函数
imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
});
});
function imgShow(outerdiv, innerdiv, bigimg, _this) {
var src = _this.attr("src");//获取当前点击的pimg元素中的src属性
$(bigimg).attr("src", src);//设置#bigimg元素的src属性
/*获取当前点击图片的真实大小,并显示弹出层及大图*/
$("<img/>").attr("src", src).load(function () {
var windowW = $(window).width();//获取当前窗口宽度
var windowH = $(window).height();//获取当前窗口高度
var realWidth = this.width;//获取图片真实宽度
var realHeight = this.height;//获取图片真实高度
var imgWidth, imgHeight;
var scale = 0.8;//缩放尺寸,当图片真实宽度和高度大于窗口宽度和高度时进行缩放
if (realHeight > windowH * scale) {//判断图片高度
imgHeight = windowH * scale;//如大于窗口高度,图片高度进行缩放
imgWidth = imgHeight / realHeight * realWidth;//等比例缩放宽度
if (imgWidth > windowW * scale) {//如宽度扔大于窗口宽度
imgWidth = windowW * scale;//再对宽度进行缩放
}
} else if (realWidth > windowW * scale) {//如图片高度合适,判断图片宽度
imgWidth = windowW * scale;//如大于窗口宽度,图片宽度进行缩放
imgHeight = imgWidth / realWidth * realHeight;//等比例缩放高度
} else {//如果图片真实高度和宽度都符合要求,高宽不变
imgWidth = realWidth;
imgHeight = realHeight;
}
$(bigimg).css("width", imgWidth);//以最终的宽度对图片缩放
var w = (windowW - imgWidth) / 2;//计算图片与窗口左边距
var h = (windowH - imgHeight) / 2;//计算图片与窗口上边距
$(innerdiv).css({ "top": h, "left": w });//设置#innerdiv的top和left属性
$(outerdiv).fadeIn("fast");//淡入显示#outerdiv及.pimg
});
$(outerdiv).click(function () {//再次点击淡出消失弹出层
$(this).fadeOut("fast");
});
}
}
//加载放大的img容器
function SetBigImgDiv() {
var divs = "<div id='outerdiv' style='position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;'><div id='innerdiv' style='position:absolute;'><img id='bigimg' style='border:5px solid #fff;' src=''/></div ></div >";
$(".cs-content-box").append(divs);
}
//设置SQL脚本编辑器. 如果遇到 textarea 的className=SQL的,我们就默认为该文本框是
//要sql的格式,就给他增加上sql的模式.
function CheckSQLTextArea() {
var isLoadSQLJS = false;
$("form").find("input,textarea").each(function () {
if (this.className == "SQL") {
var msg = "请输入SQL语句,支持ccbpm的表达式.";
this.placeholder = msg;
this.value = FormatSQL(this.value);
//alert(this.id);
// alert(basePath);
////开始为这个文本框设置sql模式的显示.
//if (isLoadSQLJS == false) {
// /*加载相关的JS*/
// $.getScript(basePath + '/Scripts/codemirror/doc/docs.css', function () {
// });
// $.getScript(basePath + '/Scripts/codemirror/lib/codemirror.css', function () {
// });
// $.getScript(basePath + '/Scripts/codemirror/theme/eclipse.css', function () {
// });
// //加载js.
// $.getScript(basePath + '/Scripts/codemirror/lib/codemirror.js', function () {
// $.getScript(basePath + '/Scripts/codemirror/mode/javascript/javascript.js', function () {
// $.getScript(basePath + '/Scripts/codemirror/addon/selection/active-line.js', function () {
// $.getScript(basePath + '/Scripts/codemirror/addon/edit/matchbrackets.js', function () {
// isLoadSQLJS = true;
// LoadCodeMirror(this.id);
// alert('ss');
// });
// });
// });
// });
// isLoadSQLJS = true;
//} else {
// LoadCodeMirror(this.id);
//}
}
});
}
function LoadCodeMirror(id) {
var editor = CodeMirror.fromTextArea(document.getElementById(id), {
lineNumbers: true,
styleActiveLine: true,
matchBrackets: true,
theme: "eclipse"
});
}
//< link rel = "stylesheet" href = "../../Scripts/codemirror/doc/docs.css" />
// <link rel="stylesheet" href="../../Scripts/codemirror/lib/codemirror.css" />
// <link rel="stylesheet" href="../../Scripts/codemirror/theme/eclipse.css" />
// <link rel="stylesheet" href="../../Scripts/codemirror/theme/elegant.css" />
// <link rel="stylesheet" href="../../Scripts/codemirror/theme/erlang-dark.css" />
// <link rel="stylesheet" href="../../Scripts/codemirror/theme/idea.css" />
// <script src="../../Scripts/codemirror/lib/codemirror.js"></script>
// <script src="../../Scripts/codemirror/mode/javascript/javascript.js" type="text/javascript"></script>
// <script src="../../Scripts/codemirror/addon/selection/active-line.js" type="text/javascript"></script>
// <script src="../../Scripts/codemirror/addon/edit/matchbrackets.js" type="text/javascript"></script>
function CheckIsSQL(sql) {
if (sql == '' || sql == null)
return false;
if (sql.replace(/(^\s*)/g, "").toUpperCase().indexOf('SELECT') == -1)
return false;
return true;
}
//格式化SQL, 原来的 ~修改为 '
function FormatSQL(sql) {
sql = sql.replace(/~/g, "'");
return sql;
}
//让所有具有
function initToggle() {
var legends = document.getElementsByTagName('legend');
for (var i = 0, len = legends.length; i < len; i++) {
var en = legends[i];
if (en.id.indexOf('help') == -1)
continue;
// en.toggle();
en.innerHTML = "<font color=green><b>" + en.innerHTML + "</b></font>";
en.onclick = function () {
// 绑定事件
for (var j = 0, ln = this.parentElement.childNodes.length; j < ln; j++) {
var dtl = this.parentElement.childNodes[j];
if (dtl.style.display === 'none') {
dtl.display = 'block';
} else {
dtl.display = 'none';
}
continue;
var nodeName = this.parentElement.childNodes[j].nodeName;
alert(nodeName);
if (nodeName && nodeName.toUpperCase() ===
'TABLE') {//兼容浏览器,有的浏览器childNodes的个数不同
var tbl = this.parentElement.childNodes[j];
if (tbl.style.display === 'none') {
tbl.style.display = 'block';
} else {
tbl.style.display = 'none';
}
}
}
}
}
}
//document.onreadystatechange = function () { //页面加载完后,注册事件
// if (document.readyState == "complete") {
// initToggle();
// }
//}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

驰骋BPM系统包含表单引擎+流程引擎+权限控制,方便集成,配置灵活,功能强大,适合中国国情的工作流引擎.演示:http://demo.ccflow.org,右上角点star方可加群:787427590
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/codingstudio/ccflow.git
git@gitee.com:codingstudio/ccflow.git
codingstudio
ccflow
CCFlow
develop
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /