fix
This commit is contained in:
parent
a7a9d4eead
commit
60022829f6
@ -30,14 +30,14 @@
|
|||||||
<el-button type="success" icon="download" @click="handleExport">导出</el-button>
|
<el-button type="success" icon="download" @click="handleExport">导出</el-button>
|
||||||
<el-button type="success" icon="upload" @click="onUpload">导入</el-button>
|
<el-button type="success" icon="upload" @click="onUpload">导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="{ row }">
|
<!-- <template #menu="{ row }">
|
||||||
<el-button type="info" link @click="handleView(row)">查看</el-button>
|
<el-button type="info" link @click="handleView(row)">查看</el-button>
|
||||||
<el-popconfirm title="确定删除该土地?" @confirm="() => handleDelete(row.id)">
|
<el-popconfirm title="确定删除该土地?" @confirm="() => handleDelete(row.id)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button type="danger" link>删除</el-button>
|
<el-button type="danger" link>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</template>
|
</template> -->
|
||||||
<template #area-form>
|
<template #area-form>
|
||||||
<section class="area_form_">
|
<section class="area_form_">
|
||||||
<el-input-number v-model="landArea" :precision="2" :step="1" :min="1" controls-position="right"></el-input-number>
|
<el-input-number v-model="landArea" :precision="2" :step="1" :min="1" controls-position="right"></el-input-number>
|
||||||
@ -58,7 +58,12 @@
|
|||||||
<template #landUrl-form="{ type }">
|
<template #landUrl-form="{ type }">
|
||||||
<Attrs v-model:attrs="landAttrs" :type="type" />
|
<Attrs v-model:attrs="landAttrs" :type="type" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #menu="scope">
|
||||||
|
<custom-table-operate :actions="option.actions" :data="scope" />
|
||||||
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
|
||||||
<custom-import-excel
|
<custom-import-excel
|
||||||
ref="importExcelRef"
|
ref="importExcelRef"
|
||||||
:template-url="getAssetsFile('template/土地模版表.xlsx')"
|
:template-url="getAssetsFile('template/土地模版表.xlsx')"
|
||||||
@ -416,6 +421,24 @@ const option = reactive({
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
name: '查看',
|
||||||
|
icon: 'view',
|
||||||
|
event: ({ row }) => handleView(row),
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '编辑',
|
||||||
|
// icon: 'edit',
|
||||||
|
// event: ({ row }) => rowEdit(row),
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'danger',
|
||||||
|
name: '删除',
|
||||||
|
icon: 'delete',
|
||||||
|
event: ({ row }) => handleDelete(row.id),
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
const searchData = reactive({
|
const searchData = reactive({
|
||||||
landName: '',
|
landName: '',
|
||||||
@ -495,11 +518,26 @@ async function handleExport() {
|
|||||||
window.URL.revokeObjectURL(link);
|
window.URL.revokeObjectURL(link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function handleDelete(id) {
|
function handleDelete(id) {
|
||||||
let res = await delLand(id);
|
app
|
||||||
if (res.code == 200) {
|
.$confirm(`删除后信息将不可查看,确认要删除吗?`, '确定删除', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
delLand(id)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
app.$message.success('删除成功!');
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
app.$message.error(err.msg);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
function handleView(obj) {
|
function handleView(obj) {
|
||||||
rowData.value = obj;
|
rowData.value = obj;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user