前端
This commit is contained in:
parent
a40ca3a000
commit
1c896d2e0e
@ -2,7 +2,7 @@
|
||||
$_CONFIG = array(
|
||||
//数据库相关
|
||||
'db' =>array(
|
||||
'ip'=>'10.0.0.107', #数据库服务器IP
|
||||
'ip'=>'127.0.0.1', #数据库服务器IP
|
||||
'username'=>'root', #用户名
|
||||
'pwd'=>'root', #密码
|
||||
'database'=>'leguevent', #数据库名
|
||||
|
@ -1041,8 +1041,14 @@ if ($act == 'newevent') {
|
||||
.recording—title { font-size: 16px; color:#686868; }
|
||||
.recording—title span{ font-size: 12px; color:#686868; }
|
||||
.recording—name { float: right; }
|
||||
.recording—con-box { margin-top: -16px; padding-bottom: 50px; }
|
||||
.recording—con-box { margin-top: 16px; padding-bottom: 50px; }
|
||||
.yanqi { position: absolute; top:0; right:0;}
|
||||
.recording-dot-box { margin-top: 0px; padding: 14px; }
|
||||
.recording-dot-box img { width: 18px; margin-top: 6px; cursor:pointer}
|
||||
.recording-dot-box:hover {border: 1px solid #f2f2f2;}
|
||||
.biankuang { box-shadow: 0px 0px 10px #5fadff;}
|
||||
.liyoubox {width: 100%; word-wrap: break-word; white-space: normal; word-break: break-all;}
|
||||
.recording—text { width: 100%; height: 60px; resize:none; display:none; padding: 8px 0; }
|
||||
</style>
|
||||
<div class='popup-bg' id='popup-bg'>
|
||||
<div class="yiny" id='yiny' onclick="guanbi()"></div>
|
||||
@ -1235,12 +1241,15 @@ if ($act == 'newevent') {
|
||||
|
||||
<script type="text/x-dot-template" id="recording-dot">
|
||||
{{~it:item:index}}
|
||||
<div style="margin-top: 32px;">
|
||||
<div class='recording-dot-box' id='recording-dot-box{{=index}}'>
|
||||
<p><span style='font-weight: bold;'>《{{= item.project}}》</span>项目{{=item.type}}从<span style='color:#77da80'>{{=item.date1}}</span>日{{=item.timetype}}到<span style='color:#ff7f7f'>{{=item.date2}}</span>日</p>
|
||||
<div style='margin-top: 6px;'> 调整理由为:{{=item.reason}}</div>
|
||||
<div class='liyoubox'>
|
||||
<div style='margin-top: 6px;' id="recording—ly{{=index}}"> 调整理由为:<font>{{= item.reason}}</font></div>
|
||||
<textarea class='recording—text' id='recording—text{{=index}}'> {{= item.reason}} </textarea>
|
||||
</div>
|
||||
<P class='recording—name' style='margin-top: 6px;'>调整人:{{=item.user}}</p>
|
||||
<img src='./assets/images/dian.png' onclick='recordingdel({{=index}})' style='cursor:pointer'>
|
||||
<img src='./assets/images/dian.png'>
|
||||
<img src='./assets/images/jlxg.png' onclick='recordingedit("recording-dot-box{{=index}}",{{=index}})' >
|
||||
<img src='./assets/images/jldel.png' onclick='recordingdel({{=index}})'>
|
||||
</div>
|
||||
{{~}}
|
||||
</script>
|
||||
@ -1275,6 +1284,48 @@ if ($act == 'newevent') {
|
||||
datechoice();
|
||||
})
|
||||
|
||||
var recedittype = 0;
|
||||
function recordingedit(id,idx){
|
||||
if ("<?=$canEdit?>" != "1" && "<?=$issxarole?>" != "1") return;
|
||||
$(".recording-dot-box").removeClass("biankuang");
|
||||
if(recedittype == 0){
|
||||
$("#recording—ly"+idx).css('display','none');
|
||||
$("#recording—text"+idx).css('display','block');
|
||||
$('#'+id).addClass('biankuang');
|
||||
recedittype = 1;
|
||||
console.log('111'+recedittype)
|
||||
}else {
|
||||
$("#recording—ly"+idx).css('display','block');
|
||||
$("#recording—text"+idx).css('display','none');
|
||||
recedittype = 0;
|
||||
console.log('222'+recedittype);
|
||||
var contentedit = $("#recording—text"+idx).val();
|
||||
console.log(contentedit);
|
||||
$.ajax({
|
||||
url: './?app=pmcalendar',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
act: 'edityanqi',
|
||||
id: notid,
|
||||
idx: idx,
|
||||
content: contentedit
|
||||
},
|
||||
success: function (res) {
|
||||
// console.log(res);
|
||||
// alert('删除成功');
|
||||
showEventData(notid);
|
||||
// textdisabled();
|
||||
},
|
||||
error: function () {
|
||||
alert('数据异常,请稍后重试!!!');
|
||||
showEventData(notid);
|
||||
// textdisabled();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function recordingdel(idx){
|
||||
if ("<?=$canEdit?>" != "1" && "<?=$issxarole?>" != "1") return;
|
||||
if (confirm("确定删除这条记录?")) {
|
||||
@ -2402,7 +2453,7 @@ if ($act == 'newevent') {
|
||||
recording[i]['timetype'] = "延期";
|
||||
}
|
||||
}
|
||||
// console.log(recording)
|
||||
console.log(recording)
|
||||
tmpltxt = doT.template(document.getElementById("recording-dot").innerHTML);//生成模板方法
|
||||
document.getElementById("recording-content").innerHTML = tmpltxt(recording);//数据渲染
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user