联调案例库
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
<!-- 弹框 -->
|
||||
<PopupEdit ref="popupEditRef" />
|
||||
<PopupEdit ref="popupEditRef" @onSubmit="tableStore.index()" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -16,7 +16,8 @@ import { onMounted, ref, provide } from 'vue'
|
||||
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
|
||||
import { libtemplateDel } from '@/api/supervision-boot/database/index'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import PopupEdit from './components/form.vue'
|
||||
defineOptions({
|
||||
@@ -28,52 +29,72 @@ const popupEditRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/user-boot/dept/deptTree',
|
||||
url: '/supervision-boot/libtemplate/pageQuery',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '模版名称', field: 'name' },
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'name1'
|
||||
field: 'createTime'
|
||||
},
|
||||
// {
|
||||
// title: '发生地点',
|
||||
// field: 'name2'
|
||||
// },
|
||||
// {
|
||||
// title: '处理措施',
|
||||
// field: 'name3'
|
||||
// },
|
||||
// {
|
||||
// title: '治理效果',
|
||||
// field: 'name4'
|
||||
// }
|
||||
{
|
||||
title: '操作',
|
||||
width: '280',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '预览 ',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '下载 ',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '修改 ',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
popupEditRef.value.open('修改模版', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
libtemplateDel({ id: row.id }).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
name: '测试名称',
|
||||
name1: 'xxx',
|
||||
name2: 'XXX',
|
||||
name3: '1月',
|
||||
name4: '单体系统',
|
||||
name5: '1'
|
||||
},
|
||||
{
|
||||
name: '测试名称',
|
||||
name1: 'xxx',
|
||||
name2: 'XXX',
|
||||
name3: '1月',
|
||||
name4: '单体系统',
|
||||
name5: '0'
|
||||
}
|
||||
]
|
||||
}
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
// 弹框
|
||||
const addUser = () => {
|
||||
popupEditRef.value.open('新增案例')
|
||||
popupEditRef.value.open('新增模版')
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
Reference in New Issue
Block a user