@@ -16,7 +16,10 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#F_DbType').lrDataItemSelect({ code: 'DbVersion' }); | |||
$('#F_DbType').lrselect({ | |||
value: 'F_ItemValue', | |||
text: 'F_ItemName', | |||
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList?itemCode=DbVersion' }); | |||
$('#lr_test').on('click', function () { | |||
var dbType = $('#F_DbType').lrselectGet(); | |||
@@ -19831,7 +19831,13 @@ UE.plugins['video'] = function (){ | |||
utils.each(domUtils.getElementsByTagName(table,'td'),function(td){ | |||
td.style.borderWidth = '1px'; | |||
td.style.borderStyle = 'solid'; | |||
}) | |||
}); | |||
//增加下面一段 | |||
utils.each(domUtils.getElementsByTagName(table, 'th'), function (th) { | |||
th.style.borderWidth = domUtils.getComputedStyle(th, "border-width"); | |||
th.style.borderStyle = 'solid'; | |||
th.style.borderColor = 'windowtext'; | |||
}); | |||
} | |||
}; | |||
function resetTdWidth(table, editor) { | |||
@@ -19990,9 +19996,9 @@ UE.plugins['table'] = function () { | |||
'table.noBorderTable td,table.noBorderTable th,table.noBorderTable caption{border:1px dashed #ddd !important}' + | |||
//插入的表格的默认样式 | |||
'table{margin-bottom:10px;border-collapse:collapse;display:table;}' + | |||
'td,th{padding: 5px 10px;border: 1px solid #DDD;}' + | |||
'td,th{padding: 5px 10px;border: 1px dashed #DDD;}' + | |||
'caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}' + | |||
'th{border-top:1px solid #BBB;background-color:#F7F7F7;}' + | |||
'th{border-top:1px dashed #BBB;background-color:#F7F7F7;}' + | |||
'table tr.firstRow th{border-top-width:2px;}' + | |||
'.ue-table-interlace-color-single{ background-color: #fcfcfc; } .ue-table-interlace-color-double{ background-color: #f7faff; }' + | |||
'td p{margin:0;padding:0;}', me.document); | |||
@@ -20240,7 +20246,7 @@ UE.plugins['table'] = function () { | |||
} else { | |||
utils.each(tables, function (table) { | |||
removeStyleSize(table, true); | |||
domUtils.removeAttributes(table, ['style', 'border']); | |||
domUtils.removeAttributes(table, ['style']); | |||
utils.each(domUtils.getElementsByTagName(table, "td"), function (td) { | |||
if (isEmptyBlock(td)) { | |||
domUtils.fillNode(me.document, td); | |||
@@ -16,22 +16,26 @@ | |||
<img style="height: 40px;" width="95%" src="~/LR_SystemModule/LogoImg/GetImg?code=headbg" alt="经典风格"> | |||
</div> | |||
<div> | |||
<iframe style="position: absolute; top: 18px; right: 150px; height: 25px;" id="fancybox-frame" name="fancybox-frame1591155087436" frameborder="0" scrolling="no" hspace="0" src="http://i.tianqi.com/index.php?c=code&py=akesu&a=getcode&id=34&h=25&w=280"></iframe> | |||
<iframe style="position: absolute; top: 18px; right: 150px; height: 25px;" id="fancybox-frame" name="fancybox-frame1591155087436" frameborder="0" scrolling="no" hspace="0" src="http://i.tianqi.com/index.php?c=code&py=dachang&a=getcode&id=34&h=25&w=280"></iframe> | |||
</div> | |||
</div> | |||
@*<div class="lr-lg-setting" id="lr_lg_setting"> | |||
<div class="lr-lg-setting" id="lr_lg_setting"> | |||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">[<span></span>]</a> | |||
<ul class="dropdown-menu"></ul> | |||
</div>*@ | |||
</div> | |||
@*<div class="lr-lzc-user"><a class="lr-lzca-user" href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">在线人数 @ViewBag.OnlineUserNum 人</a> | |||
<ul class="dropdown-menu pull-right lr-lzca-user-ul"> | |||
</ul></div>*@ | |||
<div class="lr-im-bell2" title="消息中心2"> | |||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> | |||
<div class="lr-im-bell2" title="消息中心"> | |||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" style="position: relative;"> | |||
<span class="point" style="display:none;"></span> | |||
<i style="font-size: 20px" class="fa fa-bell"></i> | |||
@if (ViewBag.UnreadNum > 0) | |||
{ | |||
<span style="font-size: 12px; position: absolute; background: #E54424; color: #fff; line-height: 16px; border-radius: 8px; padding: 0 6px; height: 16px; top: -12px; left: 8px;">@ViewBag.UnreadNum</span> | |||
} | |||
</a> | |||
<ul class="dropdown-menu pull-right"> | |||
<li><a href="javascript:void(0);" id="btn_daiban"><i class="fa fa-comment"></i>待办事项 @ViewBag.UnreadTask 条</a></li> | |||
@@ -1,6 +1,6 @@ | |||
@{ | |||
ViewBag.Title = "经典版风格"; | |||
Layout = "~/Views/Shared/_Admin.cshtml"; | |||
Layout = "~/Views/Shared/_AdminForDC.cshtml.cshtml"; | |||
} | |||
@Html.AppendCssFile("/Views/Home/AdminDefault/index.css") | |||
<script> | |||
@@ -66,7 +66,7 @@ var loaddfimg; | |||
userInit: function () { | |||
var loginInfo = learun.clientdata.get(['userinfo']); | |||
var _html = '<div class="lr-frame-personCenter"><a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">'; | |||
_html += '<img id="userhead"src="' + top.$.rootUrl + '/LR_OrganizationModule/User/GetImg?userId=' + loginInfo.userId + '" >'; | |||
_html += '<img id="userhead"src="' + top.$.rootUrl + '/LR_OrganizationModule/User/GetImgForDC?userId=' + loginInfo.userId + '" >'; | |||
_html += '<span>' + loginInfo.realName + '</span>'; | |||
_html += '</a>'; | |||
_html += '<ul class="dropdown-menu pull-right">'; | |||
@@ -215,8 +215,6 @@ var loaddfimg; | |||
//_html += '<div><label><input type="radio" name="ui_theme" value="3" ' + (uitheme == '3' ? 'checked' : '') + '>炫动版</label></div>'; | |||
_html += '<div><label><input type="radio" name="ui_theme" value="4" ' + (uitheme == '4' ? 'checked' : '') + '>飞扬版</label></div>'; | |||
_html += '<div><label><input type="radio" name="ui_theme" value="5" ' + (uitheme == '5' ? 'checked' : '') + '>导航版</label></div>'; | |||
_html += '<div><label><input type="radio" name="ui_theme" value="6" ' + (uitheme == '6' ? 'checked' : '') + '>主题5</label></div>'; | |||
_html += '</div>'; | |||
$setting.append($btn); | |||
$setting.append(_html); | |||
@@ -79,8 +79,7 @@ | |||
"/Views/LR_Content/plugin/workflow/lr-workflow-api.js", | |||
"/Views/LR_Content/plugin/contextmenu/lr-contextmenu.js", | |||
//"/Views/LR_Content/script/lr-im.js", | |||
//"/Views/LR_Content/script/pushmessage.js", | |||
"/Views/LR_Content/script/lr-im.js", | |||
"/Views/LR_Content/script/lr-admin.js" | |||
) | |||
@@ -35,7 +35,8 @@ | |||
@*<script src="~/Content/datepicker/WdatePicker.js"></script>*@ | |||
<script src="~/Content/ueditor/ueditor.config.js"></script> | |||
<script src="~/Content/jquery/plugin/jqprint/jQuery.print.js"></script> | |||
<script src="~/Content/ueditor/ueditor.all.min.js"></script> | |||
@*<script src="~/Content/ueditor/ueditor.all.min.js"></script>*@ | |||
<script src="~/Content/ueditor/ueditor.all.js"></script> | |||
<script src="~/Content/ueditor/lang/zh-cn/zh-cn.js"></script> | |||
<!--[if lt IE 9]> | |||
@@ -17,7 +17,7 @@ | |||
<ul class="lr-left-list" id="lr_left_list"> | |||
<li data-value="1">基本信息</li> | |||
@*<li data-value="2">联系方式</li>*@ | |||
<li data-value="3">我的头像</li> | |||
@*<li data-value="3">我的头像</li>*@ | |||
<li data-value="4">修改密码</li> | |||
<li data-value="5">我的日志</li> | |||
@if (ViewBag.UserType == "学生") | |||
@@ -223,22 +223,26 @@ | |||
}, | |||
nationalityNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality', | |||
key: value, | |||
code: 'National', | |||
keyId: 'nationalityno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data['nationality']; | |||
} | |||
}); | |||
return result; | |||
}, | |||
partyFaceNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace', | |||
key: value, | |||
code: 'PolityStatus', | |||
keyId: 'partyfaceno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data['partyface']; | |||
} | |||
}); | |||
return result; | |||
@@ -284,22 +288,27 @@ | |||
}, | |||
overseasChineseNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdOverseasChinese', | |||
key: value, | |||
code: 'BCdOverseasChinese', | |||
keyId: 'overseaschineseno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data.overseaschinesename; | |||
} | |||
}); | |||
return result; | |||
}, | |||
healthStatusNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdHealthStatus', | |||
key: value, | |||
code: 'BCdHealthStatus', | |||
keyId: 'healthstatusno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data.healthstatus; | |||
} | |||
}); | |||
@@ -373,8 +382,7 @@ | |||
<li>出生日期 : {{teacherInfo.Birthday | date}}</li> | |||
<li>联系电话 : {{teacherInfo.mobile}}</li> | |||
<li>校 区 : {{baseInfo.companyId | company}}</li> | |||
<li>教职工类别 : {{teacherInfo.EmpSortNo | empSortNo}}</li> | |||
<li>聘任职称: {{teacherInfo.TitleOfTechPostNo | titleOfTechPostNo}}</li> | |||
<li>部门 : {{teacherInfo.F_DepartmentId | department}}</li> | |||
</ul> | |||
</div> | |||
</div> | |||
@@ -387,41 +395,39 @@ | |||
<li>民 族 : {{teacherInfo.NationalityNo | nationalityNo}}</li> | |||
<li>政治面貌 : {{teacherInfo.PartyFaceNo | partyFaceNo}}</li> | |||
<li>身份证号 : {{teacherInfo.IdentityCardNo}} </li> | |||
<li>E-mail : {{teacherInfo.EMail}}</li> | |||
<li>健康状况 : {{teacherInfo.HealthStatusNo | healthStatusNo}}</li> | |||
<li>档案所在地 : {{teacherInfo.LocusOfArchives}} </li> | |||
<li>户口所在地 : {{teacherInfo.LocusOfResidence}} </li> | |||
</ul> | |||
</div> | |||
<div class="userSec2Box"> | |||
<div class="userSec2T">家庭情况 <i class="fa fa-angle-right"></i></div> | |||
<div class="userSec2T">学历学位信息 <i class="fa fa-angle-right"></i></div> | |||
<ul class="userSec2List"> | |||
<li>港澳台侨 : {{teacherInfo.OverseasChineseNo | overseasChineseNo}} </li> | |||
<li>健康状况 : {{teacherInfo.HealthStatusNo | healthStatusNo}}</li> | |||
<li>家庭出身 : {{teacherInfo.FamilyOriginNo | familyOriginNo}} </li> | |||
<li>外语语种 : {{teacherInfo.ForeignLanguageNo | foreignLanguageNo}} </li> | |||
<li>户籍省份 : {{teacherInfo.ProvinceNo | provinceNo}} </li> | |||
<li>户籍地市 : {{teacherInfo.CityNo | cityNo}} </li> | |||
<li>户籍县区 : {{teacherInfo.RegionNo | regionNo}} </li> | |||
<li>最高学历 : {{teacherInfo.HighestRecord | HighestRecordNo}} </li> | |||
<li>获取方式 : {{teacherInfo.ObtainWayOfHighestRecord | ObtainWayNo}} </li> | |||
<li>取得时间 : {{teacherInfo.HighestRecordGetTime}} </li> | |||
<li>最高学位 : {{teacherInfo.DegreeNo | degreeNo}}</li> | |||
<li>获取方式 : {{teacherInfo.ObtainWayOfHighestDegree | ObtainWayOfHighestDegreeNo}} </li> | |||
<li>取得时间 : {{teacherInfo.HighestDegreeGetTime}} </li> | |||
</ul> | |||
</div> | |||
<div class="userSec2Box"> | |||
<div class="userSec2T">其他 <i class="fa fa-angle-right"></i></div> | |||
<div class="userSec2T">其他信息 <i class="fa fa-angle-right"></i></div> | |||
<ul class="userSec2List"> | |||
<li>学科门 : {{teacherInfo.SubjectSpeciesNo | subjectSpeciesNo}}</li> | |||
<li>现任职务: {{teacherInfo.Title}}</li> | |||
<li>所在系部 : {{teacherInfo.DeptNo | deptNo}} </li> | |||
<li>文化程度 : {{teacherInfo.CultureDegreeNo | cultureDegreeNo}} </li> | |||
<li>毕业学校 : {{teacherInfo.GraduateSchoolName}} </li> | |||
<li>最高学位 : {{teacherInfo.DegreeNo | degreeNo}}</li> | |||
<li>来校年月 : {{teacherInfo.SchoolDate | date}}</li> | |||
<li>毕业时间 : {{teacherInfo.GraduateDate1}} </li> | |||
<li>是否代课 : {{teacherInfo.IsHasLesson | IsHasLessonNo}}</li> | |||
<li>文化程度 : {{teacherInfo.CultureDegreeNo | cultureDegreeNo}} </li> | |||
<li>现任职务: {{teacherInfo.Title}}</li> | |||
</ul> | |||
</div> | |||
<div class="userSec2Box"> | |||
<div class="userSec2T">联系方式 <i class="fa fa-angle-right"></i></div> | |||
<ul class="userSec2List"> | |||
<li>手机号码 : {{teacherInfo.mobile}}</li> | |||
<li>紧急联系人 : {{teacherInfo.Linkman}}</li> | |||
<li>紧急联系人电话 : {{teacherInfo.PhoneOfLinkman}}</li> | |||
</ul> | |||
@@ -443,8 +449,6 @@ | |||
$.get('/UserCenter/GetTeacherInfo', function (ref) { | |||
this.teacherInfo = ref.data.userInfo; | |||
this.baseInfo = ref.data.basecInfo; | |||
console.log(ref); | |||
}.bind(this), "json"); | |||
}, | |||
getUrl: function () { | |||
@@ -476,48 +480,71 @@ | |||
}); | |||
return result; | |||
}, | |||
department: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'f_departmentid', | |||
callback: function (_data) { | |||
result = _data.f_fullname; | |||
} | |||
}); | |||
return result; | |||
}, | |||
nationalityNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality', | |||
key: value, | |||
code: 'National', | |||
keyId: 'nationalityno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data['nationality']; | |||
} | |||
}); | |||
return result; | |||
}, | |||
partyFaceNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace', | |||
key: value, | |||
code: 'PolityStatus', | |||
keyId: 'partyfaceno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data['partyface']; | |||
} | |||
}); | |||
return result; | |||
}, | |||
overseasChineseNo: function (value) { | |||
HighestRecordNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree', | |||
key: value, | |||
code: 'BCdOverseasChinese', | |||
keyId: 'culturedegreeno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data.culturedegree; | |||
} | |||
}); | |||
return result; | |||
}, | |||
healthStatusNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdHealthStatus', | |||
key: value, | |||
code: 'BCdHealthStatus', | |||
keyId: 'healthstatusno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data.healthstatus; | |||
} | |||
}); | |||
return result; | |||
}, | |||
deptNo: function (value) { | |||
@@ -534,31 +561,33 @@ | |||
}, | |||
subjectSpeciesNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdSubjectSpecies', | |||
key: value, | |||
code: 'BCdSubjectSpecies', | |||
keyId: 'subjectspeciesno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
} | |||
result = _data.subjectspecies; | |||
}.bind(this) | |||
}); | |||
return result; | |||
}, | |||
familyOriginNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdFamilyOrigin', | |||
key: value, | |||
code: 'BCdFamilyOrigin', | |||
keyId: 'familyoriginno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
} | |||
result = _data.familyorigin; | |||
}.bind(this) | |||
}); | |||
return result; | |||
}, | |||
foreignLanguageNo: function (value) { | |||
ObtainWayNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'BCdForeignLanguage', | |||
code: 'ObtainWay', | |||
callback: function (_data) { | |||
result = _data.text; | |||
} | |||
@@ -606,20 +635,35 @@ | |||
}, | |||
cultureDegreeNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree', | |||
key: value, | |||
code: 'RecordInSchool', | |||
keyId: 'culturedegreeno', | |||
callback: function (_data) { | |||
result = _data.text; | |||
result = _data['culturedegree']; | |||
} | |||
}); | |||
return result; | |||
}, | |||
degreeNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdDegree', | |||
key: value, | |||
keyId: 'degreeno', | |||
callback: function (_data) { | |||
result = _data['degreename']; | |||
} | |||
}); | |||
return result; | |||
}, | |||
ObtainWayOfHighestDegreeNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'DegreeInSchool', | |||
code: 'ObtainWayOfDegree', | |||
callback: function (_data) { | |||
result = _data.text; | |||
} | |||
@@ -638,10 +682,23 @@ | |||
return result; | |||
}, | |||
titleOfTechPostNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdTitleOfTechPost', | |||
key: value, | |||
keyId: 'titleoftechpostno', | |||
callback: function (_data) { | |||
result = _data['titleoftechpost']; | |||
} | |||
}); | |||
return result; | |||
}, | |||
IsHasLessonNo: function (value) { | |||
var result; | |||
top.learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'BCdTitleOfTechPost', | |||
code: 'YesOrNoBit', | |||
callback: function (_data) { | |||
result = _data.text; | |||
} | |||
@@ -685,7 +742,7 @@ | |||
@if (ViewBag.UserType == "学生") | |||
{ | |||
<div class="lr-layout-wrap-item " id="lr_layout_item6" style="padding: 10;"> | |||
<center><h3> 塔里木职业技术学院</h3></center> | |||
<center><h3> 西昌民族幼儿师范高等专科学校</h3></center> | |||
<center> | |||
<h3> | |||
选修课选课流程 | |||
@@ -737,7 +794,7 @@ | |||
$(function () { | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
$("#headUrl").attr("src", "/LR_OrganizationModule/User/GetImg?userId=" + loginInfo.userId); | |||
$("#headUrl").attr("src", "/LR_OrganizationModule/User/GetImgForDC?userId=" + loginInfo.userId); | |||
if ('@ViewBag.UserType' == '学生') { | |||
$("#lr_left_list").children('li').eq(4).addClass("active"); | |||
@@ -777,4 +834,4 @@ | |||
} | |||
}); | |||
</script> | |||
@Html.AppendJsFile("/Views/UserCenter/Index.js") | |||
@Html.AppendJsFile("/Views/UserCenter/IndexForDC.js") |
@@ -69,6 +69,8 @@ var bootstrap = function ($, learun) { | |||
learun.alert.error('数据加载失败'); | |||
} | |||
}.bind(this)); | |||
//console.log("成功"); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
@@ -175,6 +175,17 @@ namespace Learun.Application.WebApi | |||
/// <returns></returns> | |||
private Response BeforeRequest(NancyContext ctx) | |||
{ | |||
ctx.Request.Url.Query = Learun.Util.WebHelper.Formatstr(ctx.Request.Url.Query); | |||
foreach (var p in ctx.Parameters) | |||
{ | |||
if (p.ParameterType == typeof(string)) | |||
{ | |||
if (ctx.Parameters[p.ParameterName] != null) | |||
{ | |||
ctx.Parameters[p.ParameterName] = Learun.Util.WebHelper.Formatstr(ctx.Parameters[p.ParameterName].ToString()); | |||
} | |||
} | |||
} | |||
string path = ctx.ResolvedRoute.Description.Path; | |||
//验证登录状态 | |||
ReqParameter req = this.Bind<ReqParameter>(); | |||
@@ -13,6 +13,6 @@ | |||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> | |||
<ExcludeApp_Data>False</ExcludeApp_Data> | |||
<publishUrl>bin\Release\Publish</publishUrl> | |||
<DeleteExistingFiles>False</DeleteExistingFiles> | |||
<DeleteExistingFiles>True</DeleteExistingFiles> | |||
</PropertyGroup> | |||
</Project> |
@@ -345,6 +345,7 @@ namespace Learun.Util | |||
System.Text.RegularExpressions.Regex regex10 = new System.Text.RegularExpressions.Regex(@"select", System.Text.RegularExpressions.RegexOptions.IgnoreCase); | |||
System.Text.RegularExpressions.Regex regex11 = new System.Text.RegularExpressions.Regex(@"update", System.Text.RegularExpressions.RegexOptions.IgnoreCase); | |||
System.Text.RegularExpressions.Regex regex12 = new System.Text.RegularExpressions.Regex(@"delete", System.Text.RegularExpressions.RegexOptions.IgnoreCase); | |||
System.Text.RegularExpressions.Regex regex13 = new System.Text.RegularExpressions.Regex(@"exec", System.Text.RegularExpressions.RegexOptions.IgnoreCase); | |||
html = regex1.Replace(html, ""); //过滤<script></script>标记 | |||
html = regex2.Replace(html, ""); //过滤href=javascript: (<A>) 属性 | |||
html = regex3.Replace(html, " _disibledevent="); //过滤其它控件的on...事件 | |||
@@ -352,6 +353,7 @@ namespace Learun.Util | |||
html = regex10.Replace(html, "s_elect"); | |||
html = regex11.Replace(html, "u_pudate"); | |||
html = regex12.Replace(html, "d_elete"); | |||
html = regex13.Replace(html, "e_xec"); | |||
html = html.Replace("'", "’"); | |||
html = html.Replace(" ", " "); | |||
return html; | |||
@@ -210,10 +210,11 @@ export default { | |||
const fileType = fileInfo.F_FileType | |||
const fileSize = fileInfo.F_FileSize | |||
const fileName = fileInfo.F_FileName | |||
const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true) | |||
const path = this.API + 'learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true) | |||
fileList.push({ path, type: fileType, uid, size: fileSize }) | |||
fileList.push({ path, type: fileType, uid, size: fileSize, name:fileName }) | |||
} | |||
return fileList | |||
@@ -273,8 +274,14 @@ export default { | |||
return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' | |||
case 'upload': | |||
const valArray = val.map(item=>{ | |||
return { | |||
uid:item.uid, | |||
path:item.path===undefined?item:item.path | |||
} | |||
}) | |||
const uploadUid = [] | |||
for (const { path, uid } of val) { | |||
for (const { path, uid } of valArray) { | |||
if (uid) { | |||
uploadUid.push(uid) | |||
continue | |||
@@ -197,7 +197,6 @@ export default { | |||
uploadUid.push(entity.uid) | |||
continue | |||
} else { | |||
const fileId = await this.HTTP_UPLOAD(entity) | |||
if (fileId) { | |||
uploadUid.push(fileId) | |||
@@ -255,10 +254,11 @@ export default { | |||
const fileType = fileInfo.F_FileType | |||
const fileSize = fileInfo.F_FileSize | |||
const fileName = fileInfo.F_FileName | |||
const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true) | |||
fileList.push({ path, type: fileType, uid, size: fileSize }) | |||
fileList.push({ path, type: fileType, uid, size: fileSize, name:fileName }) | |||
} | |||
return fileList | |||
@@ -0,0 +1,42 @@ | |||
export default function uniCopy({content,success,error}) { | |||
if(!content) return error('复制的内容不能为空 !') | |||
content = typeof content === 'string' ? content : content.toString() // 复制内容,必须字符串,数字需要转换为字符串 | |||
/** | |||
* 小程序端 和 app端的复制逻辑 | |||
*/ | |||
//#ifndef H5 | |||
uni.setClipboardData({ | |||
data: content, | |||
success: function() { | |||
success("复制成功~") | |||
console.log('success'); | |||
}, | |||
fail:function(){ | |||
success("复制失败~") | |||
} | |||
}); | |||
//#endif | |||
/** | |||
* H5端的复制逻辑 | |||
*/ | |||
// #ifdef H5 | |||
if (!document.queryCommandSupported('copy')) { //为了兼容有些浏览器 queryCommandSupported 的判断 | |||
// 不支持 | |||
error('浏览器不支持') | |||
} | |||
let textarea = document.createElement("textarea") | |||
textarea.value = content | |||
textarea.readOnly = "readOnly" | |||
document.body.appendChild(textarea) | |||
textarea.select() // 选择对象 | |||
textarea.setSelectionRange(0, content.length) //核心 | |||
let result = document.execCommand("copy") // 执行浏览器复制命令 | |||
if(result){ | |||
success("复制成功~") | |||
}else{ | |||
error("复制失败,请检查h5中调用该方法的方式,是不是用户点击的方式调用的,如果不是请改为用户点击的方式触发该方法,因为h5中安全性,不能js直接调用!") | |||
} | |||
textarea.remove() | |||
// #endif | |||
} |
@@ -259,7 +259,7 @@ export default { | |||
// filePath 为临时文件的路径 | |||
// formData 为请求附带的提交数据 | |||
async HTTP_UPLOAD(filePath, formData) { | |||
const [err, res] = await this.UPLOAD('/annexes/wxupload', filePath, formData) | |||
const [err, res] = await this.UPLOAD('learun/adms/annexes/wxupload', filePath, formData) | |||
return this.handleResult(err, res) | |||
}, | |||
@@ -270,7 +270,7 @@ export default { | |||
// url 为请求地址 | |||
// formData 为请求附带的提交数据 | |||
async HTTP_DOWNLOAD(formData) { | |||
const [err, res] = await this.DOWNLOAD('/annexes/wxdown', formData) | |||
const [err, res] = await this.DOWNLOAD('learun/adms/annexes/wxdown', formData) | |||
return this.handleResult(err, res) | |||
}, | |||
@@ -376,7 +376,7 @@ export default { | |||
downloadUrl = downloadUrl + '?' + this.URL_QUERY(query, true) | |||
return uni.downloadFile({ | |||
url: downloadUrl | |||
url: downloadUrl, | |||
}).then(([err, result]) => { | |||
if (!err) { | |||
result.data = { | |||
@@ -114,7 +114,7 @@ export default { | |||
} else if (type === 'today') { | |||
const e = { | |||
start: moment() | |||
.subtract(1, 'day') | |||
.subtract(0, 'day') | |||
.format('YYYY-MM-DD 00:00:00'), | |||
end: todayEnd | |||
} | |||
@@ -123,7 +123,7 @@ export default { | |||
} else if (type === '7d') { | |||
const e = { | |||
start: moment() | |||
.subtract(7, 'days') | |||
.subtract(6, 'days') | |||
.format('YYYY-MM-DD 00:00:00'), | |||
end: todayEnd | |||
} | |||
@@ -9,22 +9,30 @@ | |||
<view class="cu-form-group" style="border-top: none;"> | |||
<view class="grid col-4 grid-square flex-sub"> | |||
<view v-for="(file, index) in value" :key="index" class="bg-img"> | |||
<view v-for="(file, index) in value" :key="index" class="bg-img" style="position: relative;"> | |||
<!-- :style="{borderColor:file.noUpdated?'#EEE8AA':'#fff'}" --> | |||
<view v-if="file.noUpdated" class="mask"></view> | |||
<image | |||
v-if="isImgFile(file.type)" | |||
v-if="isImgFile(file)" | |||
@click="fileClick(index)" | |||
:src="file.path?file.path:file" | |||
:webp="file.type === 'webp'" | |||
mode="aspectFill" | |||
></image> | |||
<view v-else-if="isDocFile(file.type)" @click="fileClick(index)" class="file-icon solids"> | |||
<view v-else-if="isDocFile(file)" @click="fileClick(index)" class="file-icon solids"> | |||
<l-icon type="text" /> | |||
</view> | |||
<view v-else class="file-icon solids"><l-icon type="text" /></view> | |||
<view v-else class="file-icon solids" @click="fileClick(index)"> | |||
<l-icon type="text" /> | |||
</view> | |||
<view v-if="!readonly" @click.stop="delFile(index)" class="cu-tag bg-red" style="height: 24px; width: 24px;"> | |||
<l-icon type="close" color="white" style="width: 18px; height: 24px; font-size: 24px;" /> | |||
</view> | |||
<view class="fileName"> | |||
<text>{{file.name}}</text> | |||
</view> | |||
</view> | |||
<view v-if="!readonly && value.length < Number(number)" @click="chooseFile" class="solids"> | |||
@@ -36,6 +44,7 @@ | |||
</template> | |||
<script> | |||
// import uniCopy from '@/common/js/uni-copy.js' | |||
export default { | |||
name: 'l-upload-file', | |||
@@ -51,19 +60,22 @@ export default { | |||
getFileExt(path) { | |||
return /\.(\w{2,5})$/.exec(path)[1] || null | |||
}, | |||
isImgFile(type) { | |||
const typeString = (type || '').toLowerCase() | |||
//return ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'image'].includes(typeString) | |||
return true; | |||
isImgFile(file) { | |||
const typeString = (file.type || '').toLowerCase() | |||
return ['jpg','image/jpg','jpeg','image/jpeg', 'png', 'image/png','gif', 'image/gif','bmp', 'image/bmp','webp', 'image/webp','image'].includes(typeString) | |||
}, | |||
isDocFile(type) { | |||
const typeString = (type || '').toLowerCase() | |||
isDocFile(file) { | |||
const typeString = (file.type || '').toLowerCase() | |||
return ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf'].includes(typeString) | |||
return true | |||
}, | |||
delFile(index) { | |||
async delFile(index) { | |||
if (!(await this.CONFIRM('删除文件', '确定要删除该文件吗?', true))) { | |||
return | |||
} | |||
const newList = JSON.parse(JSON.stringify(this.value)) | |||
newList.splice(index, 1) | |||
this.$emit('input', newList) | |||
@@ -93,9 +105,10 @@ export default { | |||
count: Number(this.number), | |||
sizeType: ['original', 'compressed'], | |||
sourceType: ['album', 'camera'], | |||
success: ({ tempFilePaths }) => { | |||
success: ({ tempFilePaths,tempFiles }) => { | |||
const newList = JSON.parse(JSON.stringify(this.value || [])).concat( | |||
tempFilePaths//.map(t => ({ path: t, type: this.getFileExt(t) })) | |||
// tempFilePaths//.map(t => ({ path: t, type: this.getFileExt(t) })) | |||
tempFilePaths.map((t,i) => ({ path: t, type: tempFiles[i].type, size:tempFiles[i].size, name:tempFiles[i].name, noUpdated:true} )) | |||
) | |||
this.$emit('input', newList) | |||
this.$emit('change', newList) | |||
@@ -107,43 +120,72 @@ export default { | |||
async fileClick(index) { | |||
const { path, type, uid, size = 0 } = this.value[index] | |||
if (this.isImgFile(type)) { | |||
uni.previewImage({ urls: [path], current: path }) | |||
} else if (this.isDocFile(type)) { | |||
// #ifndef H5 || MP-DINGTALK | |||
if (size >= 50 * 1024 * 1024) { | |||
this.TOAST('小程序端无法下载超过50MB的文件,此文件大小为${size}KB,超过限制') | |||
return | |||
} | |||
// #endif | |||
// #ifndef MP-DINGTALK | |||
const tempFilePath = await this.HTTP_DOWNLOAD(uid) | |||
uni.openDocument({ filePath: tempFilePath, fileType: type }) | |||
// #endif | |||
// #ifdef MP-DINGTALK | |||
this.TOAST('钉钉小程序只支持查看图片文件') | |||
// #endif | |||
} else { | |||
// #ifndef MP-DINGTALK | |||
this.TOAST('小程序端只支持打开图片和文档(word、pdf等)文件') | |||
// #endif | |||
// #ifdef MP-DINGTALK | |||
this.TOAST('钉钉小程序只支持查看图片文件') | |||
// #endif | |||
// #ifdef APP-VUE | |||
const tempFilePath = await this.HTTP_DOWNLOAD(uid) | |||
uni.openDocument({ filePath: tempFilePath, fileType: type }) | |||
// #endif | |||
// #ifdef H5 | |||
await this.HTTP_DOWNLOAD(uid) | |||
// #endif | |||
} | |||
} | |||
if (this.isImgFile(this.value[index])) { | |||
uni.previewImage({ urls: [path], current: path }) | |||
}else{ | |||
uni.openDocument({ filePath: this.value[index].path, fileType: type }) | |||
// uniCopy({ | |||
// content:this.value[index].path, | |||
// success:(res)=>{ | |||
// uni.showToast({ | |||
// title: "复制链接成功!请在浏览器进行打开~", | |||
// icon: 'none', | |||
// duration:3000, | |||
// }) | |||
// }, | |||
// error:(e)=>{ | |||
// uni.showToast({ | |||
// title: e, | |||
// icon: 'none', | |||
// duration:3000, | |||
// }) | |||
// } | |||
// }) | |||
} | |||
// if (this.isImgFile(this.value[index])) { | |||
// uni.previewImage({ urls: [path], current: path }) | |||
// } else if (this.isDocFile(this.value[index])) { | |||
// // #ifndef H5 || MP-DINGTALK | |||
// if (size >= 50 * 1024 * 1024) { | |||
// this.TOAST('小程序端无法下载超过50MB的文件,此文件大小为${size}KB,超过限制') | |||
// return | |||
// } | |||
// // #endif | |||
// // #ifndef MP-DINGTALK | |||
// const tempFilePath = await this.HTTP_DOWNLOAD(uid) | |||
// uni.openDocument({ filePath: tempFilePath, fileType: type }) | |||
// // #endif | |||
// // #ifdef MP-DINGTALK | |||
// this.TOAST('钉钉小程序只支持查看图片文件') | |||
// // #endif | |||
// } else { | |||
// // #ifndef MP-DINGTALK | |||
// this.TOAST('小程序端只支持打开图片和文档(word、pdf等)文件') | |||
// // #endif | |||
// // #ifdef MP-DINGTALK | |||
// this.TOAST('钉钉小程序只支持查看图片文件') | |||
// // #endif | |||
// // #ifdef APP-VUE | |||
// const tempFilePath = await this.HTTP_DOWNLOAD(uid) | |||
// uni.openDocument({ filePath: tempFilePath, fileType: type }) | |||
// // #endif | |||
// // #ifdef H5 | |||
// await this.HTTP_DOWNLOAD(uid) | |||
// // #endif | |||
// } | |||
}, | |||
// ClickDownload(url) { | |||
// var src = url; | |||
// var iframe = document.createElement('iframe'); | |||
// iframe.style.display = 'none'; | |||
// iframe.src = "javascript: '<script>location.href=\"" + src + "\"<\/script>'"; | |||
// document.getElementsByTagName('body')[0].appendChild(iframe); | |||
// } | |||
} | |||
} | |||
</script> | |||
@@ -153,4 +195,29 @@ export default { | |||
line-height: 100%; | |||
position: static; | |||
} | |||
.fileName{ | |||
padding: 2px 2px; | |||
margin-bottom: 2px; | |||
text-align: center; | |||
position: absolute; | |||
bottom: 0px; | |||
width: 100%; | |||
background: rgba(0,0,0,0.2); | |||
color: #fff; | |||
font-size: 12px; | |||
text-overflow: ellipsis; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
} | |||
.mask{ | |||
position: absolute; | |||
top: 0;left: 0; | |||
width: 100%; | |||
height: 100%; | |||
// background: rgba(255,252,153,0.2); | |||
background: rgba(0,0,0,0.7); | |||
z-index: 100; | |||
pointer-events: none; | |||
} | |||
</style> |
@@ -16,11 +16,13 @@ export default { | |||
// "http://localhost:8088/" | |||
// ], | |||
"apiHost": [ | |||
"http://192.168.10.32:8011/" | |||
"http://192.168.10.58:8011/" | |||
// "/api/", | |||
], | |||
"webHost":"http://192.168.10.31:8031/", | |||
// 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 | |||
"devAccount": [ | |||
{ username: "2021230206", password: "www.qj.com" } | |||
{ username: "system", password: "www.qj.com" } | |||
], | |||
//是否分布式部署 指WebApi与Web不在一台服务器 | |||
"isDistributed":true, | |||
@@ -165,6 +165,17 @@ | |||
} | |||
}, | |||
"h5" : { | |||
// "devServer": { | |||
// "proxy" : { | |||
// "/api" : { | |||
// "target" : "http://192.168.10.58:8011/", //自己项目接口域名 | |||
// "changeOrigin" : true, //是否跨域 | |||
// // "secure" : true, // 设置支持https协议的代理 | |||
// "pathRewrite": {"^/api":""} //api路径重定向,根据具体情况调整,也可不写 | |||
// } | |||
// } | |||
// }, | |||
"uniStatistics" : { | |||
"enable" : false | |||
}, | |||
@@ -3,6 +3,7 @@ | |||
<!-- 主列表页 --> | |||
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;"> | |||
<!-- 顶部条目/分页信息栏 --> | |||
<!-- @buttonClick="sideOpen = true" --> | |||
<l-customlist-banner >{{ tips }}</l-customlist-banner> | |||
<!-- 滚动列表,跨端支持上拉/下拉 --> | |||
@@ -164,7 +165,7 @@ export default { | |||
}, | |||
// 拉取列表 | |||
async fetchList() { | |||
async fetchList(isConcat=true) { | |||
if (this.page > this.total) { return } | |||
let userInfo = this.GET_GLOBAL('loginUser'); | |||
@@ -185,19 +186,19 @@ export default { | |||
this.total = result.total | |||
this.page = result.page + 1 | |||
this.list = this.list.concat(result.rows) | |||
this.list = isConcat?this.list.concat(result.rows):result.rows | |||
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` | |||
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' | |||
}, | |||
// 刷新清空列表 | |||
async refreshList() { | |||
async refreshList(isConcat=true) { | |||
this.page = 1 | |||
this.total = 2 | |||
this.list = [] | |||
await this.fetchList() | |||
await this.fetchList(isConcat) | |||
}, | |||
// 列表下拉 | |||
@@ -222,7 +223,7 @@ export default { | |||
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) | |||
this.searchData = result | |||
await this.refreshList() | |||
await this.refreshList(false) | |||
}, | |||
// 点击「清空查询条件」按钮 | |||
@@ -3,9 +3,9 @@ | |||
<view v-if="ready" class="contentBox"> | |||
<view class="content" id="attendContent"> | |||
<view id="show">{{now}}</view> | |||
<div class="pen" @click="action('dk')"> | |||
<view class="pen" @click="action('dk')"> | |||
<img id="attimg" :src="imgsrc" alt="" width="100%"> | |||
</div> | |||
</view> | |||
</view> | |||
<view class="footer"> | |||
<img src="../../common/images/2.png" alt="" width="100%"> | |||
@@ -26,7 +26,7 @@ | |||
*/ | |||
/** | |||
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 | |||
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 | |||
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录: | |||
* { "path": "pages/AttendanceCard/list", "style": { "navigationBarTitleText": "考勤打卡" } } | |||
* | |||
@@ -52,7 +52,7 @@ export default { | |||
now: null, | |||
imgsrc:dk, | |||
ready: false, | |||
timer:'', | |||
} | |||
}, | |||
@@ -66,7 +66,7 @@ export default { | |||
this.LOADING('加载数据中...') | |||
this.now = this.getCurrentTime() | |||
setInterval(this.getCurrentTime,1000) | |||
this.timer = setInterval(this.getCurrentTime,1000) | |||
await this.judgeIsDK() | |||
@@ -78,17 +78,18 @@ export default { | |||
async action(type) { | |||
switch (type) { | |||
case 'dk': | |||
if(this.imgsrc == "dkred"){ | |||
if(this.imgsrc == dkred){ | |||
return | |||
} | |||
this.HTTP_POST('learun/adms/attendance/clockin', {}, '打卡失败').then(success => { | |||
this.LOADING() | |||
this.HTTP_POST('learun/adms/attendance/clockin', {}, '打卡失败').then(success => { | |||
this.HIDE_LOADING() | |||
if(!success) { | |||
this.TOAST('打卡失败') | |||
return | |||
} | |||
this.TOAST('打卡成功','success') | |||
setTimeout(this.back,1000) | |||
setTimeout(this.back,500) | |||
}) | |||
return | |||
@@ -122,9 +123,11 @@ export default { | |||
let mf = nowDate.getMinutes()<10 ? '0'+nowDate.getMinutes() : nowDate.getMinutes(); | |||
let ss = nowDate.getSeconds()<10 ? '0'+nowDate.getSeconds() : nowDate.getSeconds(); | |||
this.now = hh+':'+mf+':'+ss; | |||
} | |||
} | |||
}, | |||
}, | |||
destroyed() { | |||
clearInterval(this.timer) | |||
} | |||
} | |||
</script> | |||
@@ -1,6 +1,5 @@ | |||
<template> | |||
<view class="page"> | |||
<!-- 表单 --> | |||
<l-customform v-if="ready" :initFormValue="formValue" :scheme="scheme" :rel="rel" ref="form" /> | |||
<!-- 设置标题和优先级 --> | |||
@@ -220,6 +220,7 @@ export default { | |||
* 遍历 formValue,将其中的表单值依次使用 convertToPostData 这个方法转化为提交值 | |||
*/ | |||
async getPostData(originFormValue, scheme) { | |||
console.log(originFormValue, scheme) | |||
const formValue = this.COPY(originFormValue) | |||
// 依次按照 scheme 项目遍历 | |||