|
|
|
|
@ -6,10 +6,10 @@
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<!-- <div class="mb-3">
|
|
|
|
|
<a class="btn btn-primary" href="{{url($urlPrefix . '/create')}}">
|
|
|
|
|
@lang("icons.action_create") @lang('actions.create'){{$modelName}}
|
|
|
|
|
</a>
|
|
|
|
|
</div> -->
|
|
|
|
|
<a class="btn btn-primary" href="{{url($urlPrefix . '/create')}}">
|
|
|
|
|
@lang("icons.action_create") @lang('actions.create'){{$modelName}}
|
|
|
|
|
</a>
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
|
|
<!-- 搜索表单 -->
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
@ -97,8 +97,8 @@
|
|
|
|
|
<td>{{ $row->created_at->format('Y-m-d H:i:s') }}</td>
|
|
|
|
|
<td>
|
|
|
|
|
<!-- <a class="btn btn-sm btn-primary"
|
|
|
|
|
href="{{url("{$urlPrefix}/edit?id={$row['id']}")}}">@lang("icons.action_edit")
|
|
|
|
|
@lang("actions.edit")</a> -->
|
|
|
|
|
href="{{url("{$urlPrefix}/edit?id={$row['id']}")}}">@lang("icons.action_edit")
|
|
|
|
|
@lang("actions.edit")</a> -->
|
|
|
|
|
<a class="btn btn-sm btn-danger btn-delete" data-id="{{$row['id']}}"
|
|
|
|
|
href="javascript:;">@lang("icons.action_delete") @lang("actions.delete")</a>
|
|
|
|
|
</td>
|
|
|
|
|
@ -121,15 +121,21 @@
|
|
|
|
|
function showHtml(element) {
|
|
|
|
|
// 获取base64编码的HTML内容
|
|
|
|
|
var encodedHtml = element.getAttribute('data-html');
|
|
|
|
|
// 解码HTML内容
|
|
|
|
|
var htmlContent = atob(encodedHtml);
|
|
|
|
|
|
|
|
|
|
// 解码HTML内容并正确处理UTF-8字符
|
|
|
|
|
var binaryString = atob(encodedHtml);
|
|
|
|
|
var bytes = new Uint8Array(binaryString.length);
|
|
|
|
|
for (var i = 0; i < binaryString.length; i++) {
|
|
|
|
|
bytes[i] = binaryString.charCodeAt(i);
|
|
|
|
|
}
|
|
|
|
|
var htmlContent = new TextDecoder('utf-8').decode(bytes);
|
|
|
|
|
|
|
|
|
|
// 使用Blob和URL创建正确编码的HTML文档
|
|
|
|
|
var blob = new Blob([htmlContent], { type: 'text/html; charset=utf-8' });
|
|
|
|
|
var url = URL.createObjectURL(blob);
|
|
|
|
|
|
|
|
|
|
// 打开新窗口
|
|
|
|
|
var newWindow = window.open('', '_blank');
|
|
|
|
|
// 写入HTML内容
|
|
|
|
|
newWindow.document.open();
|
|
|
|
|
newWindow.document.write(htmlContent);
|
|
|
|
|
newWindow.document.close();
|
|
|
|
|
window.open(url, '_blank');
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
@endpush
|
|
|
|
|
@endpush
|