|
@@ -10,6 +10,10 @@
|
|
|
<el-button type="primary" link @click="table_snap(row)">
|
|
<el-button type="primary" link @click="table_snap(row)">
|
|
|
<template #icon><sc-iconify icon="mingcute:pic-line"></sc-iconify></template>设备抓拍
|
|
<template #icon><sc-iconify icon="mingcute:pic-line"></sc-iconify></template>设备抓拍
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <el-button type="primary" link @click="table_edit(row)">
|
|
|
|
|
+ <template #icon><sc-iconify icon="ant-design:edit-outlined"></sc-iconify></template>修改
|
|
|
|
|
+ </el-button>
|
|
|
<el-button type="primary" link @click="table_del(row)">
|
|
<el-button type="primary" link @click="table_del(row)">
|
|
|
<template #icon><sc-iconify icon="ant-design:delete-outlined"></sc-iconify></template>删除
|
|
<template #icon><sc-iconify icon="ant-design:delete-outlined"></sc-iconify></template>删除
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -53,14 +57,14 @@ const columns = reactive([
|
|
|
{ type: "html", field: "deviceType", title: "设备类型", minWidth: 160, sortable: true },
|
|
{ type: "html", field: "deviceType", title: "设备类型", minWidth: 160, sortable: true },
|
|
|
{ type: "html", field: "CreateTime", title: "创建时间", minWidth: 160, sortable: true, formatter: ({ cellValue, row }) => cellValue || TOOL.dateFormat(row.createTime) },
|
|
{ type: "html", field: "CreateTime", title: "创建时间", minWidth: 160, sortable: true, formatter: ({ cellValue, row }) => cellValue || TOOL.dateFormat(row.createTime) },
|
|
|
{ type: "html", field: "UpdateTime", title: "更新时间", minWidth: 160, sortable: true, formatter: ({ cellValue, row }) => cellValue || TOOL.dateFormat(row.updateTime) },
|
|
{ type: "html", field: "UpdateTime", title: "更新时间", minWidth: 160, sortable: true, formatter: ({ cellValue, row }) => cellValue || TOOL.dateFormat(row.updateTime) },
|
|
|
- { title: "操作", fixed: "right", minWidth: 160, align: "center", slots: { default: "action" } }
|
|
|
|
|
|
|
+ { title: "操作", fixed: "right", minWidth: 220, align: "center", slots: { default: "action" } }
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
// 显示隐藏 筛选表单
|
|
// 显示隐藏 筛选表单
|
|
|
const xGridTable = ref();
|
|
const xGridTable = ref();
|
|
|
-const refreshTable = () => {
|
|
|
|
|
|
|
+const refreshTable = (mode = "add") => {
|
|
|
xGridTable.value.reloadColumn(columns);
|
|
xGridTable.value.reloadColumn(columns);
|
|
|
- xGridTable.value.searchData();
|
|
|
|
|
|
|
+ xGridTable.value.searchData(mode);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const deviceRef = ref();
|
|
const deviceRef = ref();
|
|
@@ -75,6 +79,11 @@ const table_add = () => {
|
|
|
nextTick(() => deviceRef.value?.open());
|
|
nextTick(() => deviceRef.value?.open());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const table_edit = row => {
|
|
|
|
|
+ dialog.detail = true;
|
|
|
|
|
+ nextTick(() => deviceRef.value?.setData(row));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const table_snap = row => {
|
|
const table_snap = row => {
|
|
|
dialog.snap = true;
|
|
dialog.snap = true;
|
|
|
nextTick(() => snapRef.value?.open(row));
|
|
nextTick(() => snapRef.value?.open(row));
|