| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- @extends('layouts.app')
- @section('title','查询')
- @section('content')
- <span id="nav2">
- @component('maintenance.menu')@endcomponent
- @component('maintenance.expressPrinting.menu')@endcomponent
- @component('maintenance.expressPrinting.template.menu')@endcomponent
- </span>
- <div class="container-fluid" id="part-template">
- <table class="table table-striped table-sm table-hover">
- <tr>
- <th>序号</th>
- <th>名称</th>
- <th>内容</th>
- <th>操作</th>
- </tr>
- <tr v-for="(template,i) in templates">
- <td>@{{ i+1 }}</td>
- <td>@{{ template.name }}</td>
- <td>@{{ template.value }}</td>
- <td>
- <button type="button" class="btn btn-danger" @click="destroy(template.id,i)">删除</button>
- </td>
- </tr>
- </table>
- </div>
- @endsection
- @section('lastScript')
- <script>
- let vue = new Vue({
- el:'#part-template',
- data:{
- templates:{!! $templates !!},
- },
- methods:{
- destroy(id,i){
- if (!confirm('是否删除当前模板')) return;
- tempTip.setDuration(3000);
- window.tempTip.postBasicRequest("{{url('apiLocal/maintenance/expressPrinting/template/destroy')}}",{id:id},res=>{
- tempTip.showSuccess('删除成功');
- this.$delete(this.templates,i);
- });
- }
- }
- });
- </script>
- @endsection
|