欢迎各位兄弟 发布技术文章
这里的技术是共享的
<script> | |
const app =Vue.createApp({ | |
data(){ | |
return { | |
//seen: false /* 改为false,信息就无法显示 */ | |
} | |
}, | |
methods: { | |
do_complete(event){ | |
setTimeout(function(){},400); | |
// console.log(event.target.getAttribute("attr_accept_uid")); | |
jQuery(event.target).siblings('img').css('display','inline'); | |
var is_complete = 0; | |
if(event.target.checked){ | |
is_complete = 1; | |
} | |
var nid =event.target.getAttribute('attr_nid'); | |
axios({ | |
method: 'post', | |
url: 'to-do/is-complete', | |
headers: { 'content-type': 'application/x-www-form-urlencoded' }, | |
data: 'is_complete='+is_complete+'&nid='+nid+'&accepter_uid='+event.target.getAttribute('attr_accepter_uid') | |
// data:{ | |
// 'is_complete': event.target.value, | |
// 'nid': event.target.getAttribute('attr_nid'), | |
// 'accepter_uid': event.target.getAttribute('attr_accepter_uid'), | |
// } | |
}) | |
.then(function(response){ | |
console.log(response); | |
// document.getElementById('date_data_'+nid).innerHTML = response.data; | |
jQuery('#date_data_'+nid).html(response.data); | |
jQuery(event.target).siblings('img').css('display',''); | |
}).catch(function(error){ | |
console.log(error); | |
jQuery(event.target).siblings('img').css('display',''); | |
}) | |
}, | |
do_remark(event){ | |
setTimeout(function(){},400); | |
// console.log(event.target.getAttribute("attr_accept_uid")); | |
jQuery(event.target).siblings('img').css('display','inline'); | |
var nid =event.target.getAttribute('attr_nid'); | |
axios({ | |
method: 'post', | |
url: 'to-do/remark', | |
headers: { 'content-type': 'application/x-www-form-urlencoded' }, | |
data: 'remark='+event.target.value+'&nid='+nid+'&accepter_uid='+event.target.getAttribute('attr_accepter_uid') | |
}) | |
.then(function(response){ | |
console.log(response); | |
jQuery(event.target).siblings('img').css('display',''); | |
}).catch(function(error){ | |
console.log(error); | |
jQuery(event.target).siblings('img').css('display',''); | |
}) | |
}, | |
do_show(event){ | |
setTimeout(function(){},50); | |
jQuery(event.target).siblings('.rela').children('.show_full_text').fadeIn(); | |
}, | |
do_hidden(event){ | |
setTimeout(function(){},50); | |
jQuery(event.target).siblings('.rela').children('.show_full_text').fadeOut(); | |
} | |
} | |
}) | |
const vm = app.mount('#to_do_list_content'); | |
</script> |
<div id="to_do_list_content">
<div class="region region-content">
<div id="block-system-main" class="block block-system">
<div class="content">
<a href="/batch_upload_to_do">批量上传excel</a> <a href="/node/add/to-do">新增待办事项</a>
<div class="view view-to-do-view view-id-to_do_view view-display-id-page_3 view-dom-id-c0730081e620fdf6efd3ff3891605a13">
<div class="view-content">
<table class="views-table cols-9">
<thead>
<tr>
<th class="views-field views-field-php-2" scope="col">
序号 </th>
<th class="views-field views-field-field-full-name" scope="col">
发布人 </th>
<th class="views-field views-field-field-done" scope="col">
事项 </th>
<th class="views-field views-field-php" scope="col">
接受人 </th>
<th class="views-field views-field-field-yaoqiu-time" scope="col">
要求时间 </th>
<th class="views-field views-field-php-1" scope="col">
是否完成 </th>
<th scope="col">
完成时间 </th>
<th class="views-field views-field-php-3" scope="col">
备注 </th>
<th class="views-field views-field-edit-node" scope="col">
编辑 </th>
</tr>
</thead>
<tbody>
<tr class="even">
<td class="views-field views-field-php-2">
2 </td>
<td class="views-field views-field-field-full-name">
11111(aaaa) </td>
<td class="views-field views-field-field-done">
逐步推进新windows版沙箱更新 </td>
<td class="views-field views-field-php">
2222222 Gu(cccc)<br />333333 Hong(dddd)<br />444444 Tang(eee)<br /> </td>
<td class="views-field views-field-field-yaoqiu-time">
<span class="date-display-single" property="dc:date" datatype="xsd:dateTime" content="2022-04-30T00:00:00+08:00">2022-04-30</span> </td>
<td class="views-field views-field-php-1 to-do-checkbox">
<div><input type="checkbox" name='field_is_complete' id='to_do_1774' v-on:change="do_complete" class='red' value='1' attr_nid='1774' attr_accepter_uid='41,31,48' /><label class='show-for-checkbox'><i class='mdi mdi-check'></i></label><img src='/misc/throbber-active.gif' class='hidden' /></div> </td>
<td >
<span id='date_data_1774'></span> </td>
<td class="views-field views-field-php-3">
<input name='remark' value="" attr_nid='1774' attr_accepter_uid='41,31,48' v-on:keyup.enter='do_remark' v-on:mouseover='do_show' v-on:mouseout='do_hidden' /><img src='/misc/throbber-active.gif' class='hidden' /> </td>
<td class="views-field views-field-edit-node">
<a href="/node/1774/edit?destination=to-do-no-complete-list">编辑</a> </td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div>
<div id="block-views-to-do-view-block-1" class="block block-views contextual-links-region">
<h2>本周待办事项</h2>
<div class="contextual-links-wrapper"><ul class="contextual-links"><li class="views-ui-edit first"><a href="/admin/structure/views/view/to_do_view/edit/block_1?destination=to-do-no-complete-list">编辑视图</a></li>
<li class="block-configure last"><a href="/admin/structure/block/manage/views/to_do_view-block_1/configure?destination=to-do-no-complete-list">配置</a></li>
</ul></div>
<div class="content">
<div class="view view-to-do-view view-id-to_do_view view-display-id-block_1 view-dom-id-48b4a5c30d1178603dc3216a3e52e8fa" >
<div>
<a href="/to-do-list">所有待办事项</a>
</div>
</div> </div>
</div>
</div>
</div>