|
|
|
@ -1,37 +1,39 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { save, show, index, destroy, imports } from "@/api/system/baseForm";
|
|
|
|
import { save, show, index, destroy, imports } from "@/api/system/baseForm";
|
|
|
|
import { CreateDialog } from "@/utils/createDialog"
|
|
|
|
import { CreateDialog } from "@/utils/createDialog";
|
|
|
|
import { deepCopy } from "@/utils";
|
|
|
|
import { deepCopy } from "@/utils";
|
|
|
|
import { resolveFormInfo } from '@/utils/createTable'
|
|
|
|
import { resolveFormInfo } from "@/utils/createTable";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
tableName: String,
|
|
|
|
tableName: String,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
render(h) {
|
|
|
|
render(h) {
|
|
|
|
const _this = this;
|
|
|
|
const _this = this;
|
|
|
|
let dialog = new CreateDialog(this,[
|
|
|
|
let dialog = new CreateDialog(this, [], {}, false);
|
|
|
|
],{}, false)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div style="padding: 0 20px">
|
|
|
|
<div style="padding: 0 20px">
|
|
|
|
<el-card style="margin-top: 20px;">
|
|
|
|
<el-card style="margin-top: 20px;">
|
|
|
|
<div slot="header" style="display: flex;align-items: center;">
|
|
|
|
<div slot="header" style="display: flex;align-items: center;">
|
|
|
|
<i class="el-icon-back"
|
|
|
|
<i
|
|
|
|
|
|
|
|
class="el-icon-back"
|
|
|
|
style="padding-right: 20px;font-size: 20px;font-weight: 600;cursor: pointer;"
|
|
|
|
style="padding-right: 20px;font-size: 20px;font-weight: 600;cursor: pointer;"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['click']: _ => {
|
|
|
|
["click"]: (_) => {
|
|
|
|
this.$router.go(-1)
|
|
|
|
this.$router.go(-1);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}}></i>
|
|
|
|
}}
|
|
|
|
<p>{ (() => {
|
|
|
|
></i>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
{(() => {
|
|
|
|
let title = new Map([
|
|
|
|
let title = new Map([
|
|
|
|
['add', '新增招租'],
|
|
|
|
["add", "新增招租"],
|
|
|
|
['editor', '编辑招租']
|
|
|
|
["editor", "编辑招租"],
|
|
|
|
])
|
|
|
|
]);
|
|
|
|
return title.get(this.type)
|
|
|
|
return title.get(this.type);
|
|
|
|
})() }</p>
|
|
|
|
})()}
|
|
|
|
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{/* 资产信息 */}
|
|
|
|
{/* 资产信息 */}
|
|
|
|
@ -60,69 +62,86 @@ export default {
|
|
|
|
>
|
|
|
|
>
|
|
|
|
新增记录
|
|
|
|
新增记录
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
<Button type="primary"
|
|
|
|
<Button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
shape="circle"
|
|
|
|
shape="circle"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['click']: _ => {
|
|
|
|
["click"]: (_) => {
|
|
|
|
this.landDialog = true;
|
|
|
|
this.landDialog = true;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}}>选择土地</Button>
|
|
|
|
}}
|
|
|
|
<Button type="primary"
|
|
|
|
>
|
|
|
|
|
|
|
|
选择土地
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
shape="circle"
|
|
|
|
shape="circle"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['click']: _ => {
|
|
|
|
["click"]: (_) => {
|
|
|
|
this.houseDialog = true;
|
|
|
|
this.houseDialog = true;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}}>选择房产</Button>
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
选择房产
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<xy-table
|
|
|
|
<xy-table
|
|
|
|
row-key={
|
|
|
|
row-key={(row) => {
|
|
|
|
row => {
|
|
|
|
row._relation_id
|
|
|
|
row._relation_id ? row._relation_id : (row.hasOwnProperty('land_id') ? 'house_' + row.id : 'land_' + row.id)
|
|
|
|
? row._relation_id
|
|
|
|
}
|
|
|
|
: row.hasOwnProperty("land_id")
|
|
|
|
}
|
|
|
|
? "house_" + row.id
|
|
|
|
|
|
|
|
: "land_" + row.id;
|
|
|
|
|
|
|
|
}}
|
|
|
|
ref="assetsTable"
|
|
|
|
ref="assetsTable"
|
|
|
|
list={this.nowAssets}
|
|
|
|
list={this.nowAssets}
|
|
|
|
height="300"
|
|
|
|
height="300"
|
|
|
|
isHandlerKey={false}
|
|
|
|
isHandlerKey={false}
|
|
|
|
is-page={false}
|
|
|
|
is-page={false}
|
|
|
|
table-item={
|
|
|
|
table-item={[
|
|
|
|
[
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "name",
|
|
|
|
prop: "name",
|
|
|
|
label: "资产名称",
|
|
|
|
label: "资产名称",
|
|
|
|
width: 180,
|
|
|
|
width: 180,
|
|
|
|
fixed: "left",
|
|
|
|
fixed: "left",
|
|
|
|
align: "left",
|
|
|
|
align: "left",
|
|
|
|
customFn: row => (
|
|
|
|
customFn: (row) =>
|
|
|
|
row.id ?
|
|
|
|
row.id ? (
|
|
|
|
(<span>{ row.name }</span>) :
|
|
|
|
<span>{row.name}</span>
|
|
|
|
(<el-input vModel={row._name} size="small"></el-input>)
|
|
|
|
) : (
|
|
|
|
)
|
|
|
|
<el-input vModel={row._name} size="small"></el-input>
|
|
|
|
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "type",
|
|
|
|
prop: "type",
|
|
|
|
label: "分类",
|
|
|
|
label: "分类",
|
|
|
|
width: 100,
|
|
|
|
width: 100,
|
|
|
|
"fixed": "left",
|
|
|
|
fixed: "left",
|
|
|
|
customFn: row => (
|
|
|
|
customFn: (row) =>
|
|
|
|
row.id ?
|
|
|
|
row.id ? (
|
|
|
|
(<span>{ row.hasOwnProperty('land_id') ? '房产' : '土地' }</span>) :
|
|
|
|
<span>
|
|
|
|
(<el-input vModel={row._biaodileixing} size="small"></el-input>)
|
|
|
|
{row.hasOwnProperty("land_id") ? "房产" : "土地"}
|
|
|
|
)
|
|
|
|
</span>
|
|
|
|
|
|
|
|
) : (
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
vModel={row._biaodileixing}
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "zuoluo",
|
|
|
|
prop: "zuoluo",
|
|
|
|
label: "坐落",
|
|
|
|
label: "坐落",
|
|
|
|
width: 160,
|
|
|
|
width: 160,
|
|
|
|
align: "left",
|
|
|
|
align: "left",
|
|
|
|
customFn: row => (
|
|
|
|
customFn: (row) =>
|
|
|
|
row.id ?
|
|
|
|
row.id ? (
|
|
|
|
(<span>{ row.zuoluo }</span>) :
|
|
|
|
<span>{row.zuoluo}</span>
|
|
|
|
(<el-input vModel={row._zuoluo} size="small"></el-input>)
|
|
|
|
) : (
|
|
|
|
)
|
|
|
|
<el-input vModel={row._zuoluo} size="small"></el-input>
|
|
|
|
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "xiangxiweizhi",
|
|
|
|
prop: "xiangxiweizhi",
|
|
|
|
@ -142,11 +161,17 @@ export default {
|
|
|
|
label: "实际面积(m²)",
|
|
|
|
label: "实际面积(m²)",
|
|
|
|
width: 160,
|
|
|
|
width: 160,
|
|
|
|
align: "center",
|
|
|
|
align: "center",
|
|
|
|
customFn: row => (
|
|
|
|
customFn: (row) =>
|
|
|
|
row.id ?
|
|
|
|
row.id ? (
|
|
|
|
(<span>{ row.shijimianji }</span>) :
|
|
|
|
<span>{row.shijimianji}</span>
|
|
|
|
(<el-input-number precision={2} controls={false} vModel={row._shijimianji} size="small"></el-input-number>)
|
|
|
|
) : (
|
|
|
|
)
|
|
|
|
<el-input-number
|
|
|
|
|
|
|
|
precision={2}
|
|
|
|
|
|
|
|
controls={false}
|
|
|
|
|
|
|
|
vModel={row._shijimianji}
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
></el-input-number>
|
|
|
|
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "_chuzumianji",
|
|
|
|
prop: "_chuzumianji",
|
|
|
|
@ -167,84 +192,122 @@ export default {
|
|
|
|
prop: "operate",
|
|
|
|
prop: "operate",
|
|
|
|
label: "操作",
|
|
|
|
label: "操作",
|
|
|
|
width: 160,
|
|
|
|
width: 160,
|
|
|
|
customFn: row => {
|
|
|
|
customFn: (row) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div style="display: flex;">
|
|
|
|
<div style="display: flex;">
|
|
|
|
<Button type="error"
|
|
|
|
<Button
|
|
|
|
|
|
|
|
type="error"
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
ghost={true}
|
|
|
|
ghost={true}
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['click']: _ => {
|
|
|
|
["click"]: (_) => {
|
|
|
|
this.$confirm("确定删除?").then(_ => {
|
|
|
|
this.$confirm("确定删除?").then((_) => {
|
|
|
|
if (row.hasOwnProperty("land_id")) {
|
|
|
|
if (row.hasOwnProperty("land_id")) {
|
|
|
|
this.$refs["houseLinkTable"]?.toggleRowSelection(
|
|
|
|
this.$refs[
|
|
|
|
this.$refs["houseLinkTable"].getListData().find(i => i.id === row.id)
|
|
|
|
"houseLinkTable"
|
|
|
|
,false)
|
|
|
|
]?.toggleRowSelection(
|
|
|
|
|
|
|
|
this.$refs["houseLinkTable"]
|
|
|
|
|
|
|
|
.getListData()
|
|
|
|
|
|
|
|
.find((i) => i.id === row.id),
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$refs["landLinkTable"]?.toggleRowSelection(
|
|
|
|
this.$refs[
|
|
|
|
this.$refs["landLinkTable"].getListData().find(i => i.id === row.id)
|
|
|
|
"landLinkTable"
|
|
|
|
,false)
|
|
|
|
]?.toggleRowSelection(
|
|
|
|
|
|
|
|
this.$refs["landLinkTable"]
|
|
|
|
|
|
|
|
.getListData()
|
|
|
|
|
|
|
|
.find((i) => i.id === row.id),
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (row._relation_id) {
|
|
|
|
if (row._relation_id) {
|
|
|
|
destroy({ table_name: "lets_to_assets", id: row._relation_id },false).then(_ => {
|
|
|
|
destroy(
|
|
|
|
this.nowAssets.splice(this.nowAssets.findIndex(j => j._relation_id === row._relation_id),1)
|
|
|
|
{
|
|
|
|
})
|
|
|
|
table_name: "lets_to_assets",
|
|
|
|
|
|
|
|
id: row._relation_id,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
).then((_) => {
|
|
|
|
|
|
|
|
this.nowAssets.splice(
|
|
|
|
|
|
|
|
this.nowAssets.findIndex(
|
|
|
|
|
|
|
|
(j) =>
|
|
|
|
|
|
|
|
j._relation_id === row._relation_id
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
1
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.nowAssets.splice(this.nowAssets.findIndex(j => j._relation_id === row._relation_id),1)
|
|
|
|
this.nowAssets.splice(
|
|
|
|
}
|
|
|
|
this.nowAssets.findIndex(
|
|
|
|
})
|
|
|
|
(j) => j._relation_id === row._relation_id
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
1
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}}>删除</Button>
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
删除
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
]
|
|
|
|
]}
|
|
|
|
}></xy-table>
|
|
|
|
></xy-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{dialog.render()}
|
|
|
|
dialog.render()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
|
|
<el-drawer title="土地列表"
|
|
|
|
<el-drawer
|
|
|
|
|
|
|
|
title="土地列表"
|
|
|
|
append-to-body={true}
|
|
|
|
append-to-body={true}
|
|
|
|
visible={this.landDialog}
|
|
|
|
visible={this.landDialog}
|
|
|
|
size="64%"
|
|
|
|
size="64%"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['update:visible']: (val) => this.landDialog = val,
|
|
|
|
["update:visible"]: (val) => (this.landDialog = val),
|
|
|
|
}}>
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
<div style="padding: 0 10px;">
|
|
|
|
<div style="padding: 0 10px;">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Input vModel={this.landSelect.keyword} style="width: 300px;" placeholder="请填写关键词"/>
|
|
|
|
<Input
|
|
|
|
<Button type="primary"
|
|
|
|
vModel={this.landSelect.keyword}
|
|
|
|
|
|
|
|
style="width: 300px;"
|
|
|
|
|
|
|
|
placeholder="请填写关键词"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
style="margin-left: 10px;"
|
|
|
|
style="margin-left: 10px;"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['click']: _ => {
|
|
|
|
["click"]: (_) => {
|
|
|
|
this.$refs['landLinkTable'].getTableData(true)
|
|
|
|
this.$refs["landLinkTable"].getTableData(true);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}}>搜索</Button>
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
搜索
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<xy-table
|
|
|
|
<xy-table
|
|
|
|
isHandlerKey={false}
|
|
|
|
isHandlerKey={false}
|
|
|
|
height="600"
|
|
|
|
height="600"
|
|
|
|
ref="landLinkTable"
|
|
|
|
ref="landLinkTable"
|
|
|
|
table-item={
|
|
|
|
table-item={[
|
|
|
|
[
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "selection",
|
|
|
|
prop: "selection",
|
|
|
|
label: "选择",
|
|
|
|
label: "选择",
|
|
|
|
width: 80,
|
|
|
|
width: 80,
|
|
|
|
fixed: "left",
|
|
|
|
fixed: "left",
|
|
|
|
customFn: row => {
|
|
|
|
customFn: (row) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Button size="small"
|
|
|
|
<Button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
'click': _ => {
|
|
|
|
click: (_) => {
|
|
|
|
this.nowAssets.push({
|
|
|
|
this.nowAssets.push({
|
|
|
|
id: row.id,
|
|
|
|
id: row.id,
|
|
|
|
name: row.name,
|
|
|
|
name: row.name,
|
|
|
|
@ -259,10 +322,13 @@ export default {
|
|
|
|
_relation_id: "",
|
|
|
|
_relation_id: "",
|
|
|
|
ORIGINAL_DATA: row,
|
|
|
|
ORIGINAL_DATA: row,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}}>新增</Button>
|
|
|
|
}}
|
|
|
|
)
|
|
|
|
>
|
|
|
|
}
|
|
|
|
新增
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// {
|
|
|
|
// {
|
|
|
|
// type: "selection",
|
|
|
|
// type: "selection",
|
|
|
|
@ -272,71 +338,74 @@ export default {
|
|
|
|
// fixed: "left",
|
|
|
|
// fixed: "left",
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "id",
|
|
|
|
prop: "id",
|
|
|
|
"width": 60,
|
|
|
|
width: 60,
|
|
|
|
"label": "序号",
|
|
|
|
label: "序号",
|
|
|
|
formatter: (row, column, cellValue, index) => (this.$refs['landLinkTable'].selectOpt.page - 1) * this.$refs['landLinkTable'].selectOpt.page_size + index + 1
|
|
|
|
formatter: (row, column, cellValue, index) =>
|
|
|
|
|
|
|
|
(this.$refs["landLinkTable"].selectOpt.page - 1) *
|
|
|
|
|
|
|
|
this.$refs["landLinkTable"].selectOpt.page_size +
|
|
|
|
|
|
|
|
index +
|
|
|
|
|
|
|
|
1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "tudiquanshuren",
|
|
|
|
prop: "tudiquanshuren",
|
|
|
|
"label": "土地权属人",
|
|
|
|
label: "土地权属人",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "left"
|
|
|
|
align: "left",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "area",
|
|
|
|
prop: "area",
|
|
|
|
"label": "区域",
|
|
|
|
label: "区域",
|
|
|
|
"width": 80,
|
|
|
|
width: 80,
|
|
|
|
"align": "center",
|
|
|
|
align: "center",
|
|
|
|
"formatter": (data, row, value) => {
|
|
|
|
formatter: (data, row, value) => {
|
|
|
|
return this.wxAreas[value]
|
|
|
|
return this.wxAreas[value];
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "name",
|
|
|
|
prop: "name",
|
|
|
|
"label": "资产名称",
|
|
|
|
label: "资产名称",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "left",
|
|
|
|
align: "left",
|
|
|
|
"fixed": "left"
|
|
|
|
fixed: "left",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "tudizhenghao",
|
|
|
|
prop: "tudizhenghao",
|
|
|
|
"label": "土地证号",
|
|
|
|
label: "土地证号",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "left"
|
|
|
|
align: "left",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "zuoluo",
|
|
|
|
prop: "zuoluo",
|
|
|
|
"label": "坐落",
|
|
|
|
label: "坐落",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "left"
|
|
|
|
align: "left",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "zichanweizhi",
|
|
|
|
prop: "zichanweizhi",
|
|
|
|
"label": "资产位置",
|
|
|
|
label: "资产位置",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "center"
|
|
|
|
align: "center",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "quanliren",
|
|
|
|
prop: "quanliren",
|
|
|
|
"label": "证载“权利人”",
|
|
|
|
label: "证载“权利人”",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "left"
|
|
|
|
align: "left",
|
|
|
|
}
|
|
|
|
},
|
|
|
|
]
|
|
|
|
]}
|
|
|
|
}
|
|
|
|
|
|
|
|
action={this.index}
|
|
|
|
action={this.index}
|
|
|
|
req-opt={this.landSelect}
|
|
|
|
req-opt={this.landSelect}
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['loaded']: _ => {
|
|
|
|
["loaded"]: (_) => {
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
// this.$refs['landLinkTable'].getListData()?.filter(item => this.nowAssets?.find(j => j.id === item.id && !j.hasOwnProperty('land_id')))?.forEach(item => {
|
|
|
|
// this.$refs['landLinkTable'].getListData()?.filter(item => this.nowAssets?.find(j => j.id === item.id && !j.hasOwnProperty('land_id')))?.forEach(item => {
|
|
|
|
// this.$refs['landLinkTable'].toggleRowSelection(item, true)
|
|
|
|
// this.$refs['landLinkTable'].toggleRowSelection(item, true)
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
},
|
|
|
|
},
|
|
|
|
['select']: (selection, row) => {
|
|
|
|
["select"]: (selection, row) => {
|
|
|
|
if (selection.find(i => i.id === row.id)) {
|
|
|
|
if (selection.find((i) => i.id === row.id)) {
|
|
|
|
this.nowAssets.push({
|
|
|
|
this.nowAssets.push({
|
|
|
|
id: row.id,
|
|
|
|
id: row.id,
|
|
|
|
name: row.name,
|
|
|
|
name: row.name,
|
|
|
|
@ -345,47 +414,61 @@ export default {
|
|
|
|
shijimianji: row.shijimianji,
|
|
|
|
shijimianji: row.shijimianji,
|
|
|
|
_chuzumianji: row.shijimianji,
|
|
|
|
_chuzumianji: row.shijimianji,
|
|
|
|
_relation_id: "",
|
|
|
|
_relation_id: "",
|
|
|
|
})
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
let index = this.nowAssets.findIndex(i => i.id === row.id && !i.hasOwnProperty('land_id') )
|
|
|
|
let index = this.nowAssets.findIndex(
|
|
|
|
let temp = this.nowAssets.splice(index, 1)
|
|
|
|
(i) => i.id === row.id && !i.hasOwnProperty("land_id")
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
let temp = this.nowAssets.splice(index, 1);
|
|
|
|
if (temp._relation_id) {
|
|
|
|
if (temp._relation_id) {
|
|
|
|
destroy({
|
|
|
|
destroy(
|
|
|
|
|
|
|
|
{
|
|
|
|
table_name: "lets_to_assets",
|
|
|
|
table_name: "lets_to_assets",
|
|
|
|
id: temp._relation_id
|
|
|
|
id: temp._relation_id,
|
|
|
|
},false)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
false
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
></xy-table>
|
|
|
|
></xy-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-drawer>
|
|
|
|
</el-drawer>
|
|
|
|
|
|
|
|
|
|
|
|
<el-drawer title="房产列表"
|
|
|
|
<el-drawer
|
|
|
|
|
|
|
|
title="房产列表"
|
|
|
|
append-to-body={true}
|
|
|
|
append-to-body={true}
|
|
|
|
visible={this.houseDialog}
|
|
|
|
visible={this.houseDialog}
|
|
|
|
size="64%"
|
|
|
|
size="64%"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['update:visible']: (val) => this.houseDialog = val,
|
|
|
|
["update:visible"]: (val) => (this.houseDialog = val),
|
|
|
|
}}>
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
<div style="padding: 0 10px;">
|
|
|
|
<div style="padding: 0 10px;">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Input vModel={this.houseSelect.keyword} style="width: 300px;" placeholder="请填写关键词"/>
|
|
|
|
<Input
|
|
|
|
<Button type="primary"
|
|
|
|
vModel={this.houseSelect.keyword}
|
|
|
|
|
|
|
|
style="width: 300px;"
|
|
|
|
|
|
|
|
placeholder="请填写关键词"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
style="margin-left: 10px;"
|
|
|
|
style="margin-left: 10px;"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['click']: _ => {
|
|
|
|
["click"]: (_) => {
|
|
|
|
this.$refs['houseLinkTable'].getTableData(true)
|
|
|
|
this.$refs["houseLinkTable"].getTableData(true);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}}>搜索</Button>
|
|
|
|
}}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
搜索
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<xy-table
|
|
|
|
<xy-table
|
|
|
|
isHandlerKey={false}
|
|
|
|
isHandlerKey={false}
|
|
|
|
height="600"
|
|
|
|
height="600"
|
|
|
|
ref="houseLinkTable"
|
|
|
|
ref="houseLinkTable"
|
|
|
|
table-item={
|
|
|
|
table-item={[
|
|
|
|
[
|
|
|
|
|
|
|
|
// {
|
|
|
|
// {
|
|
|
|
// type: "selection",
|
|
|
|
// type: "selection",
|
|
|
|
// width: 56,
|
|
|
|
// width: 56,
|
|
|
|
@ -398,12 +481,13 @@ export default {
|
|
|
|
label: "选择",
|
|
|
|
label: "选择",
|
|
|
|
width: 80,
|
|
|
|
width: 80,
|
|
|
|
fixed: "left",
|
|
|
|
fixed: "left",
|
|
|
|
customFn: row => {
|
|
|
|
customFn: (row) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Button size="small"
|
|
|
|
<Button
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
'click': _ => {
|
|
|
|
click: (_) => {
|
|
|
|
this.nowAssets.push({
|
|
|
|
this.nowAssets.push({
|
|
|
|
id: row.id,
|
|
|
|
id: row.id,
|
|
|
|
name: row.name,
|
|
|
|
name: row.name,
|
|
|
|
@ -419,77 +503,93 @@ export default {
|
|
|
|
_relation_id: "",
|
|
|
|
_relation_id: "",
|
|
|
|
ORIGINAL_DATA: row,
|
|
|
|
ORIGINAL_DATA: row,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}}>新增</Button>
|
|
|
|
}}
|
|
|
|
)
|
|
|
|
>
|
|
|
|
}
|
|
|
|
新增
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "id",
|
|
|
|
prop: "id",
|
|
|
|
"width": 60,
|
|
|
|
width: 60,
|
|
|
|
"label": "序号",
|
|
|
|
label: "序号",
|
|
|
|
formatter: (row, column, cellValue, index) => (this.$refs['houseLinkTable'].selectOpt.page - 1) * this.$refs['houseLinkTable'].selectOpt.page_size + index + 1
|
|
|
|
formatter: (row, column, cellValue, index) =>
|
|
|
|
|
|
|
|
(this.$refs["houseLinkTable"].selectOpt.page - 1) *
|
|
|
|
|
|
|
|
this.$refs["houseLinkTable"].selectOpt.page_size +
|
|
|
|
|
|
|
|
index +
|
|
|
|
|
|
|
|
1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "quanshuren",
|
|
|
|
prop: "quanshuren",
|
|
|
|
"label": "权属人",
|
|
|
|
label: "权属人",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "center"
|
|
|
|
align: "center",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "area",
|
|
|
|
prop: "area",
|
|
|
|
"label": "区域",
|
|
|
|
label: "区域",
|
|
|
|
"width": 80,
|
|
|
|
width: 80,
|
|
|
|
"align": "center",
|
|
|
|
align: "center",
|
|
|
|
"formatter": (data, row, value) => {
|
|
|
|
formatter: (data, row, value) => {
|
|
|
|
return this.wxAreas[value]
|
|
|
|
return this.wxAreas[value];
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "name",
|
|
|
|
prop: "name",
|
|
|
|
"label": "资产名称",
|
|
|
|
label: "资产名称",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"fixed": "left",
|
|
|
|
fixed: "left",
|
|
|
|
"align": "left"
|
|
|
|
align: "left",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "quanzhenghao",
|
|
|
|
prop: "quanzhenghao",
|
|
|
|
"label": "权证号",
|
|
|
|
label: "权证号",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "center"
|
|
|
|
align: "center",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "zuoluo",
|
|
|
|
prop: "zuoluo",
|
|
|
|
"label": "坐落",
|
|
|
|
label: "坐落",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "left"
|
|
|
|
align: "left",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "zichanweizhi",
|
|
|
|
prop: "zichanweizhi",
|
|
|
|
"label": "房产位置",
|
|
|
|
label: "房产位置",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "center"
|
|
|
|
align: "center",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"prop": "quanliren",
|
|
|
|
prop: "quanliren",
|
|
|
|
"label": "证载“权利人”",
|
|
|
|
label: "证载“权利人”",
|
|
|
|
"width": 0,
|
|
|
|
width: 0,
|
|
|
|
"align": "center"
|
|
|
|
align: "center",
|
|
|
|
}
|
|
|
|
},
|
|
|
|
]
|
|
|
|
]}
|
|
|
|
}
|
|
|
|
|
|
|
|
action={this.index}
|
|
|
|
action={this.index}
|
|
|
|
req-opt={this.houseSelect}
|
|
|
|
req-opt={this.houseSelect}
|
|
|
|
on={{
|
|
|
|
on={{
|
|
|
|
['loaded']: _ => {
|
|
|
|
["loaded"]: (_) => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs['houseLinkTable'].getListData()?.filter(item => this.nowAssets?.find(j => j.id === item.id && j.hasOwnProperty('land_id')))?.forEach(item => {
|
|
|
|
this.$refs["houseLinkTable"]
|
|
|
|
this.$refs['houseLinkTable'].toggleRowSelection(item, true)
|
|
|
|
.getListData()
|
|
|
|
})
|
|
|
|
?.filter((item) =>
|
|
|
|
})
|
|
|
|
this.nowAssets?.find(
|
|
|
|
|
|
|
|
(j) => j.id === item.id && j.hasOwnProperty("land_id")
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
?.forEach((item) => {
|
|
|
|
|
|
|
|
this.$refs["houseLinkTable"].toggleRowSelection(
|
|
|
|
|
|
|
|
item,
|
|
|
|
|
|
|
|
true
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
['select']: (selection, row) => {
|
|
|
|
["select"]: (selection, row) => {
|
|
|
|
if (selection.find(i => i.id === row.id)) {
|
|
|
|
if (selection.find((i) => i.id === row.id)) {
|
|
|
|
this.nowAssets.push({
|
|
|
|
this.nowAssets.push({
|
|
|
|
id: row.id,
|
|
|
|
id: row.id,
|
|
|
|
name: row.name,
|
|
|
|
name: row.name,
|
|
|
|
@ -498,26 +598,30 @@ export default {
|
|
|
|
shijimianji: row.shijimianji,
|
|
|
|
shijimianji: row.shijimianji,
|
|
|
|
_chuzumianji: row.shijimianji,
|
|
|
|
_chuzumianji: row.shijimianji,
|
|
|
|
_relation_id: "",
|
|
|
|
_relation_id: "",
|
|
|
|
land_id: row.land_id
|
|
|
|
land_id: row.land_id,
|
|
|
|
})
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
let index = this.nowAssets.findIndex(i => i.id === row.id && i.hasOwnProperty('land_id') )
|
|
|
|
let index = this.nowAssets.findIndex(
|
|
|
|
let temp = this.nowAssets.splice(index, 1)
|
|
|
|
(i) => i.id === row.id && i.hasOwnProperty("land_id")
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
let temp = this.nowAssets.splice(index, 1);
|
|
|
|
if (temp._relation_id) {
|
|
|
|
if (temp._relation_id) {
|
|
|
|
destroy({
|
|
|
|
destroy(
|
|
|
|
|
|
|
|
{
|
|
|
|
table_name: "lets_to_assets",
|
|
|
|
table_name: "lets_to_assets",
|
|
|
|
id: temp._relation_id
|
|
|
|
id: temp._relation_id,
|
|
|
|
},false)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
false
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
></xy-table>
|
|
|
|
></xy-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-drawer>
|
|
|
|
</el-drawer>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
@ -537,12 +641,12 @@ export default {
|
|
|
|
landSelect: {
|
|
|
|
landSelect: {
|
|
|
|
is_auth_more: 1,
|
|
|
|
is_auth_more: 1,
|
|
|
|
table_name: "lands",
|
|
|
|
table_name: "lands",
|
|
|
|
keyword: ""
|
|
|
|
keyword: "",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
houseSelect: {
|
|
|
|
houseSelect: {
|
|
|
|
is_auth_more: 1,
|
|
|
|
is_auth_more: 1,
|
|
|
|
table_name: "houses",
|
|
|
|
table_name: "houses",
|
|
|
|
keyword: ""
|
|
|
|
keyword: "",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
columns: 1,
|
|
|
|
columns: 1,
|
|
|
|
@ -558,8 +662,8 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
index,
|
|
|
|
index,
|
|
|
|
setRow (row) {
|
|
|
|
setRow(row) {
|
|
|
|
this.row = row
|
|
|
|
this.row = row;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
init() {
|
|
|
|
init() {
|
|
|
|
for (let key in this.form) {
|
|
|
|
for (let key in this.form) {
|
|
|
|
@ -588,20 +692,19 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
async getDetail() {
|
|
|
|
async getDetail() {
|
|
|
|
const res = await show({ id: this.id, table_name: 'lets' });
|
|
|
|
const res = await show({ id: this.id, table_name: "lets" });
|
|
|
|
this.$integrateData(this.form, res);
|
|
|
|
this.$integrateData(this.form, res);
|
|
|
|
|
|
|
|
|
|
|
|
this.formInfo.forEach((i) => {
|
|
|
|
this.formInfo.forEach((i) => {
|
|
|
|
if (i.edit_input === "file") {
|
|
|
|
if (i.edit_input === "file") {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i.edit_input === "files") {
|
|
|
|
if (i.edit_input === "files") {
|
|
|
|
this.file[i.field] = res[`${i.field}_upload_details`]
|
|
|
|
this.file[i.field] = res[`${i.field}_upload_details`];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.form = Object.assign({}, this.form);
|
|
|
|
this.form = Object.assign({}, this.form);
|
|
|
|
this.originalForm = deepCopy(res);
|
|
|
|
this.originalForm = deepCopy(res);
|
|
|
|
this.originalForm?.lets_to_assets?.forEach(item => {
|
|
|
|
this.originalForm?.lets_to_assets?.forEach((item) => {
|
|
|
|
if (item.land_id) {
|
|
|
|
if (item.land_id) {
|
|
|
|
let land = item.lands;
|
|
|
|
let land = item.lands;
|
|
|
|
if (land) {
|
|
|
|
if (land) {
|
|
|
|
@ -609,28 +712,50 @@ export default {
|
|
|
|
id: land.id,
|
|
|
|
id: land.id,
|
|
|
|
name: land.name,
|
|
|
|
name: land.name,
|
|
|
|
zuoluo: land.zuoluo,
|
|
|
|
zuoluo: land.zuoluo,
|
|
|
|
zichanweizhi: land.zichanweizhi,
|
|
|
|
|
|
|
|
shijimianji: land.shijimianji,
|
|
|
|
shijimianji: land.shijimianji,
|
|
|
|
_chuzumianji: item.chuzumianji||0,
|
|
|
|
_chuzumianji: item.chuzumianji,
|
|
|
|
|
|
|
|
_name: item.name,
|
|
|
|
|
|
|
|
_biaodileixing: item.biaodileixing,
|
|
|
|
|
|
|
|
_zuoluo: item.zuoluo,
|
|
|
|
|
|
|
|
_shijimianji: item.shijimianji,
|
|
|
|
|
|
|
|
_xiangxiweizhi: item.xiangxiweizhi,
|
|
|
|
_relation_id: item.id,
|
|
|
|
_relation_id: item.id,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else if (item.house_id) {
|
|
|
|
let house = item.house;
|
|
|
|
let house = item.house;
|
|
|
|
if (house) {
|
|
|
|
if (house) {
|
|
|
|
this.nowAssets.push({
|
|
|
|
this.nowAssets.push({
|
|
|
|
id: house.id,
|
|
|
|
id: house.id,
|
|
|
|
name: house.name,
|
|
|
|
name: house.name,
|
|
|
|
zuoluo: house.zuoluo,
|
|
|
|
zuoluo: house.zuoluo,
|
|
|
|
zichanweizhi: house.zichanweizhi,
|
|
|
|
|
|
|
|
shijimianji: house.shijimianji,
|
|
|
|
shijimianji: house.shijimianji,
|
|
|
|
_chuzumianji: item.chuzumianji||0,
|
|
|
|
_name: item.name,
|
|
|
|
|
|
|
|
_zuoluo: item.zuoluo,
|
|
|
|
|
|
|
|
_biaodileixing: item.biaodileixing,
|
|
|
|
|
|
|
|
_shijimianji: item.shijimianji,
|
|
|
|
|
|
|
|
_xiangxiweizhi: item.xiangxiweizhi,
|
|
|
|
|
|
|
|
_chuzumianji: item.chuzumianji,
|
|
|
|
_relation_id: item.id,
|
|
|
|
_relation_id: item.id,
|
|
|
|
land_id: house.land_id,
|
|
|
|
land_id: house.land_id,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.nowAssets.push({
|
|
|
|
|
|
|
|
id: "",
|
|
|
|
|
|
|
|
name: item.name,
|
|
|
|
|
|
|
|
zuoluo: item.zuoluo,
|
|
|
|
|
|
|
|
shijimianji: item.shijimianji,
|
|
|
|
|
|
|
|
_name: item.name,
|
|
|
|
|
|
|
|
_zuoluo: item.zuoluo,
|
|
|
|
|
|
|
|
_biaodileixing: item.biaodileixing,
|
|
|
|
|
|
|
|
_shijimianji: item.shijimianji,
|
|
|
|
|
|
|
|
_xiangxiweizhi: item.xiangxiweizhi,
|
|
|
|
|
|
|
|
_chuzumianji: item.chuzumianji,
|
|
|
|
|
|
|
|
_relation_id: item.id,
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
submit() {
|
|
|
|
submit() {
|
|
|
|
@ -664,12 +789,19 @@ export default {
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// this.form.id_lease_plans_lease_id_relation = this.leasePlans;
|
|
|
|
// this.form.id_lease_plans_lease_id_relation = this.leasePlans;
|
|
|
|
save(Object.assign(this.form, { table_name: 'lets' })).then(res => {
|
|
|
|
save(Object.assign(this.form, { table_name: "lets" })).then((res) => {
|
|
|
|
if (this.type !== 'add') {
|
|
|
|
if (this.type !== "add") {
|
|
|
|
Promise.all(this.originalForm.id_lets_to_assets_let_id_relation?.map(i => destroy({
|
|
|
|
Promise.all(
|
|
|
|
|
|
|
|
this.originalForm.id_lets_to_assets_let_id_relation?.map((i) =>
|
|
|
|
|
|
|
|
destroy(
|
|
|
|
|
|
|
|
{
|
|
|
|
id: i.id,
|
|
|
|
id: i.id,
|
|
|
|
table_name: "lets_to_assets"
|
|
|
|
table_name: "lets_to_assets",
|
|
|
|
},false)))
|
|
|
|
},
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let leaseToAssetsData = this.nowAssets.map((item) => ({
|
|
|
|
let leaseToAssetsData = this.nowAssets.map((item) => ({
|
|
|
|
id: item._relation_id,
|
|
|
|
id: item._relation_id,
|
|
|
|
@ -678,28 +810,33 @@ export default {
|
|
|
|
name: item._name,
|
|
|
|
name: item._name,
|
|
|
|
zuoluo: item._zuoluo,
|
|
|
|
zuoluo: item._zuoluo,
|
|
|
|
xiangxiweizhi: item._xiangxiweizhi,
|
|
|
|
xiangxiweizhi: item._xiangxiweizhi,
|
|
|
|
biaodileixing: item._relation_i ? (item.hasOwnProperty("land_id") ? '房产' : '土地') : item._biaodileixing,
|
|
|
|
biaodileixing: item._relation_i
|
|
|
|
|
|
|
|
? item.hasOwnProperty("land_id")
|
|
|
|
|
|
|
|
? "房产"
|
|
|
|
|
|
|
|
: "土地"
|
|
|
|
|
|
|
|
: item._biaodileixing,
|
|
|
|
shijimianji: item._shijimianji,
|
|
|
|
shijimianji: item._shijimianji,
|
|
|
|
chuzumianji: item._chuzumianji,
|
|
|
|
chuzumianji: item._chuzumianji,
|
|
|
|
let_id: res.id,
|
|
|
|
let_id: res.id,
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
if (leaseToAssetsData && leaseToAssetsData.length > 0) {
|
|
|
|
if (leaseToAssetsData && leaseToAssetsData.length > 0) {
|
|
|
|
imports({
|
|
|
|
imports(
|
|
|
|
|
|
|
|
{
|
|
|
|
table_name: "lets_to_assets",
|
|
|
|
table_name: "lets_to_assets",
|
|
|
|
data: leaseToAssetsData
|
|
|
|
data: leaseToAssetsData,
|
|
|
|
},false)
|
|
|
|
},
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$Message.success({
|
|
|
|
this.$Message.success({
|
|
|
|
content: `${this.type === "add" ? "新增" : "编辑"}成功`,
|
|
|
|
content: `${this.type === "add" ? "新增" : "编辑"}成功`,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.$emit("refresh");
|
|
|
|
this.$emit("refresh");
|
|
|
|
this.$router.back();
|
|
|
|
this.$router.back();
|
|
|
|
})
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
formInfo: {
|
|
|
|
formInfo: {
|
|
|
|
handler: function (newVal) {
|
|
|
|
handler: function (newVal) {
|
|
|
|
@ -733,7 +870,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.columns = newVal.length > 11 ? '2' : '1'
|
|
|
|
this.columns = newVal.length > 11 ? "2" : "1";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//immediate: true,
|
|
|
|
//immediate: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -755,25 +892,23 @@ export default {
|
|
|
|
for (let key in this.file) {
|
|
|
|
for (let key in this.file) {
|
|
|
|
this.file[key] = [];
|
|
|
|
this.file[key] = [];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$refs['landLinkTable'].clearSelection();
|
|
|
|
this.$refs["landLinkTable"].clearSelection();
|
|
|
|
this.$refs['houseLinkTable'].clearSelection();
|
|
|
|
this.$refs["houseLinkTable"].clearSelection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.id = this.$route.query.letId;
|
|
|
|
this.id = this.$route.query.letId;
|
|
|
|
this.type = this.$route.query.type;
|
|
|
|
this.type = this.$route.query.type;
|
|
|
|
resolveFormInfo(31).then(res => {
|
|
|
|
resolveFormInfo(31).then((res) => {
|
|
|
|
this.formInfo = res;
|
|
|
|
this.formInfo = res;
|
|
|
|
|
|
|
|
|
|
|
|
if (this.type === "editor" || this.type === "change") {
|
|
|
|
if (this.type === "editor" || this.type === "change") {
|
|
|
|
this.$nextTick(() => this.getDetail());
|
|
|
|
this.$nextTick(() => this.getDetail());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {},
|
|
|
|
beforeDestroy() {
|
|
|
|
beforeDestroy() {
|
|
|
|
this.id = "";
|
|
|
|
this.id = "";
|
|
|
|
this.type = "";
|
|
|
|
this.type = "";
|
|
|
|
@ -783,7 +918,7 @@ export default {
|
|
|
|
for (let key in this.file) {
|
|
|
|
for (let key in this.file) {
|
|
|
|
this.file[key] = [];
|
|
|
|
this.file[key] = [];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|