|
|
|
|
@ -304,13 +304,21 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template #create>
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
$refs['dialog'].setType('add'), $refs['dialog'].show()
|
|
|
|
|
"
|
|
|
|
|
>新增</Button
|
|
|
|
|
>
|
|
|
|
|
<div style="display: flex; gap: 10px;">
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
$refs['dialog'].setType('add'), $refs['dialog'].show()
|
|
|
|
|
"
|
|
|
|
|
>新增</Button
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
type="error"
|
|
|
|
|
:disabled="selectedRows.length === 0"
|
|
|
|
|
@click="batchDelete"
|
|
|
|
|
>删除</Button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template #import>
|
|
|
|
|
<Button type="primary" @click="$refs['imports'].show()"
|
|
|
|
|
@ -342,7 +350,8 @@
|
|
|
|
|
:destroy-req-opt="select"
|
|
|
|
|
:table-item="table"
|
|
|
|
|
:btn-to-more="true"
|
|
|
|
|
:more-auths="['edit','delete','picture','file']"
|
|
|
|
|
:more-auths="['edit','delete','picture','document','file']"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
@loaded="adjustAlignment"
|
|
|
|
|
@detail="
|
|
|
|
|
(row) => {
|
|
|
|
|
@ -362,6 +371,10 @@
|
|
|
|
|
$refs['atlas'].setId(row.id);
|
|
|
|
|
$refs['atlas'].show();
|
|
|
|
|
}"
|
|
|
|
|
@document="(row) => {
|
|
|
|
|
$refs['documents'].setId(row.id);
|
|
|
|
|
$refs['documents'].show();
|
|
|
|
|
}"
|
|
|
|
|
@file="(row) => {
|
|
|
|
|
$refs['files'].setId(row.id);
|
|
|
|
|
$refs['files'].show();
|
|
|
|
|
@ -391,6 +404,12 @@
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template #document="{row}">
|
|
|
|
|
<span
|
|
|
|
|
>证件图片</span
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template #file="{row}">
|
|
|
|
|
<span
|
|
|
|
|
>附件</span
|
|
|
|
|
@ -408,6 +427,7 @@
|
|
|
|
|
<history ref="history"></history>
|
|
|
|
|
<lease ref="lease"></lease>
|
|
|
|
|
<atlas ref="atlas"></atlas>
|
|
|
|
|
<documents ref="documents"></documents>
|
|
|
|
|
<files ref="files"></files>
|
|
|
|
|
<handle ref="handle"></handle>
|
|
|
|
|
<!-- <drawer-->
|
|
|
|
|
@ -445,6 +465,7 @@ import lease from '@/views/assets/lease.vue';
|
|
|
|
|
// import drawer from "@/views/component/drawer.vue";
|
|
|
|
|
import imports from "@/views/component/imports.vue";
|
|
|
|
|
import atlas from "@/views/assets/atlas.vue";
|
|
|
|
|
import documents from "@/views/assets/documents.vue";
|
|
|
|
|
import files from "@/views/assets/files.vue";
|
|
|
|
|
import handle from "@/views/assets/component/addHandle.vue";
|
|
|
|
|
import { deepCopy } from '@/utils'
|
|
|
|
|
@ -458,6 +479,7 @@ export default {
|
|
|
|
|
history,
|
|
|
|
|
lease,
|
|
|
|
|
atlas,
|
|
|
|
|
documents,
|
|
|
|
|
// drawer,
|
|
|
|
|
imports,
|
|
|
|
|
files,
|
|
|
|
|
@ -493,12 +515,65 @@ export default {
|
|
|
|
|
customFormId: "",
|
|
|
|
|
tableName: "",
|
|
|
|
|
},
|
|
|
|
|
selectedRows: [],
|
|
|
|
|
selectedRowMap: {},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
index,
|
|
|
|
|
destroy,
|
|
|
|
|
download,
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
const currentPageRows = this.$refs['xyTable']?.getListData?.() || [];
|
|
|
|
|
currentPageRows.forEach((row) => {
|
|
|
|
|
if (this.selectedRowMap[row.id]) {
|
|
|
|
|
delete this.selectedRowMap[row.id];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
(selection || []).forEach((row) => {
|
|
|
|
|
this.selectedRowMap[row.id] = row;
|
|
|
|
|
});
|
|
|
|
|
this.selectedRows = Object.values(this.selectedRowMap);
|
|
|
|
|
},
|
|
|
|
|
syncPageSelection() {
|
|
|
|
|
const currentPageRows = this.$refs['xyTable']?.getListData?.() || [];
|
|
|
|
|
currentPageRows.forEach((row) => {
|
|
|
|
|
this.$refs['xyTable']?.toggleRowSelection(row, !!this.selectedRowMap[row.id]);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
batchDelete() {
|
|
|
|
|
if (this.selectedRows.length === 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'warning',
|
|
|
|
|
message: '请先选择要删除的数据'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.$confirm(`确认删除选中的 ${this.selectedRows.length} 条数据吗?`, '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
return Promise.all(
|
|
|
|
|
this.selectedRows.map((row) =>
|
|
|
|
|
this.destroy({
|
|
|
|
|
table_name: this.customForm.tableName,
|
|
|
|
|
id: row.id,
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
).then(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '批量删除成功'
|
|
|
|
|
});
|
|
|
|
|
this.selectedRowMap = {};
|
|
|
|
|
this.selectedRows = [];
|
|
|
|
|
this.$refs['xyTable'].clearSelection();
|
|
|
|
|
this.$refs['xyTable'].getTableData(true);
|
|
|
|
|
});
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
reset() {
|
|
|
|
|
this.select.filter.splice(1);
|
|
|
|
|
this.select.filter[0] = {
|
|
|
|
|
@ -1064,33 +1139,9 @@ export default {
|
|
|
|
|
prop: i.field,
|
|
|
|
|
label: i.name,
|
|
|
|
|
width: i.width,
|
|
|
|
|
align: alignLeft.find((m) => m === i.field) ? "left" : "center",
|
|
|
|
|
align: "left",
|
|
|
|
|
fixed: i.is_fixed,
|
|
|
|
|
customFn: (row) => {
|
|
|
|
|
return (
|
|
|
|
|
<el-popover width="450" trigger="click">
|
|
|
|
|
<el-table size="small" data={row.id_his_evolutions_land_id_relation}>
|
|
|
|
|
<el-table-column width="40" type="index" align="center"></el-table-column>
|
|
|
|
|
<el-table-column width="150" property="mianjitiaozheng" label="面积调整" show-overflow-tooltip={true}></el-table-column>
|
|
|
|
|
<el-table-column width="150" property="qitashuoming" label="其他说明" show-overflow-tooltip={true}></el-table-column>
|
|
|
|
|
<el-table-column width="150" property="zichanlaiyuan" label="资产来源" show-overflow-tooltip={true}></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<a slot="reference">查看</a>
|
|
|
|
|
</el-popover>
|
|
|
|
|
// <a
|
|
|
|
|
// on={{
|
|
|
|
|
// ["click"]: (e) => {
|
|
|
|
|
// this.$refs["addHistory"].setRow(row);
|
|
|
|
|
// this.$refs["addHistory"].setType("show");
|
|
|
|
|
// this.$refs["addHistory"].show();
|
|
|
|
|
// },
|
|
|
|
|
// }}
|
|
|
|
|
// >
|
|
|
|
|
// 查看
|
|
|
|
|
// </a>
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
formatter: (row, column, cellValue) => cellValue || "无",
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
@ -1116,6 +1167,12 @@ export default {
|
|
|
|
|
label: "序号",
|
|
|
|
|
formatter: (row, column, cellValue, index) => (this.$refs['xyTable'].selectOpt.page - 1) * this.$refs['xyTable'].selectOpt.page_size + index + 1
|
|
|
|
|
})
|
|
|
|
|
this.table.unshift({
|
|
|
|
|
type: "selection",
|
|
|
|
|
width: 50,
|
|
|
|
|
align: "center",
|
|
|
|
|
reserveSelection: false
|
|
|
|
|
})
|
|
|
|
|
this.table.push({
|
|
|
|
|
prop: 'admin.name',
|
|
|
|
|
width: 120,
|
|
|
|
|
@ -1134,6 +1191,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
adjustAlignment () {
|
|
|
|
|
this.syncPageSelection();
|
|
|
|
|
if (this.firstAdjustTable) {
|
|
|
|
|
const data = this.$refs['xyTable'].getListData();
|
|
|
|
|
if (data.length < 2) return;
|
|
|
|
|
|