master
xy 2 years ago
parent cc842a6a5b
commit 63947b70ce

@ -85,7 +85,7 @@ export default {
},
async getDetail() {
const res = await show({ id: this.row.id_his_evolutions_house_id_relation?.id || this.row.id_his_evolutions_land_id_relation?.id, table_name: 'his_evolutions' });
const res = await show({ id: this.id, table_name: 'his_evolutions' });
this.$integrateData(this.form, res);
this.formInfo.forEach((i) => {

@ -0,0 +1,109 @@
<template>
<div>
<Modal title="历史沿革" footer-hide :width="64" v-model="isShow">
<Button
type="primary"
style="margin-bottom: 10px"
@click="
$refs['addHistory'].setRow(row),
$refs['addHistory'].setType('add'),
$refs['addHistory'].show()
"
>新增记录</Button
>
<xy-table
:btn-width="120"
style="width: 100%"
:auths="['delete', 'edit']"
:height="360"
:is-page="false"
ref="xyTable"
:list="row.id_his_evolutions_land_id_relation || []"
:table-item="table"
@delete="destroy"
@editor="
(row1) => {
$refs['addHistory'].setId(row1.id),
$refs['addHistory'].setType('editor');
$refs['addHistory'].setRow(row);
$refs['addHistory'].show();
}
"
></xy-table>
</Modal>
<addHistory ref="addHistory"></addHistory>
</div>
</template>
<script>
import { index, destroy } from "@/api/system/baseForm";
import addHistory from "@/views/assets/component/addHistory.vue";
export default {
components: {
addHistory,
},
data() {
return {
id: "",
isShow: false,
row: {},
table: [
{
prop: "mianjitiaozheng",
label: "面积调整",
width: 200,
align: "left",
},
{
prop: "qitashuoming",
label: "其他说明",
width: 220,
align: "left",
},
{
prop: "zichanlaiyuan",
label: "资产来源",
width: 220,
align: "left",
},
],
};
},
methods: {
setRow(row) {
this.row = row;
},
show() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
setId(id) {
if (typeof id === "number") {
this.id = id;
this.select.filter[0].value = id;
}
},
destroy (row) {
destroy({
id: row.id,
table_name: 'his_evolutions'
})
}
},
computed: {},
watch: {
isShow(newVal) {
if (newVal) {
this.$refs["xyTable"].getTableData(true);
}
},
},
};
</script>
<style scoped lang="scss"></style>

@ -290,10 +290,7 @@
"
>
<template #assetsHistory="{ row }">
<Button
size="small"
type="primary"
@click="toHistory(row)"
<Button size="small" type="primary" @click="toHistory(row)"
>历史沿革</Button
>
</template>
@ -610,13 +607,41 @@ export default {
"wuyedanwei",
];
switch (i.field) {
case "bufuqingkuang":
this.table.push({
label: i.name,
width: i.width,
customFn: (row) => {
return (
<div>
{row.tudiquanshuren !== row.quanliren ||
row.dengjimianji !== row.shijimianji ? (
<div>
<span>
{row.tudiquanshuren !== row.quanliren
? "权利人名称不符"
: ""}
</span>
<span>
{row.dengjimianji !== row.shijimianji
? "登记面积不符"
: ""}
</span>
</div>
) : (
<span></span>
)}
</div>
);
},
});
break;
case "bufuyuanyin":
this.table.push({
prop: i.field,
label: i.name,
width: i.width,
align: alignLeft.find((m) => m === i.field) ? "left" : "center",
fixed: i.is_fixed,
align: "center",
customFn: (row) => {
return (
<a
@ -658,14 +683,16 @@ export default {
});
},
toHistory (row) {
toHistory(row) {
if (row.id_his_evolutions_house_id_relation?.id) {
this.$refs['addHistory'].setType('editor')
this.$refs['addHistory'].setId(row.id_his_evolutions_house_id_relation?.id)
this.$refs["addHistory"].setType("editor");
this.$refs["addHistory"].setId(
row.id_his_evolutions_house_id_relation?.id
);
}
this.$refs['addHistory'].setRow(row);
this.$refs['addHistory'].show();
}
this.$refs["addHistory"].setRow(row);
this.$refs["addHistory"].show();
},
},
computed: {

@ -291,6 +291,7 @@
@refresh="$refs['xyTable'].getTableData()"
>
</add>
<history ref="history"></history>
<addHistory ref="addHistory"></addHistory>
<!-- <drawer-->
<!-- :table-name="customForm.tableName"-->
@ -323,7 +324,8 @@ import { listdept } from "@/api/system/department"
import add from "./component/addLand.vue";
import LxHeader from "@/components/LxHeader/index.vue";
import headerContent from "@/components/LxHeader/XyContent.vue";
import addHistory from '@/views/assets/component/addHistory.vue'
import addHistory from '@/views/assets/component/addHistory.vue';
import history from '@/views/assets/history.vue';
// import drawer from "@/views/component/drawer.vue";
// import imports from "./imports.vue";
// import atlas from "@/views/assets/atlas.vue";
@ -335,6 +337,7 @@ export default {
LxHeader,
add,
headerContent,
history
// drawer,
// imports,
@ -585,6 +588,46 @@ export default {
let alignLeft = ['dikuaimingcheng','chengjiandanwei','jianshedanwei','wuyedanwei']
switch (i.field) {
case "fangchanzhuangtai":
this.table.push({
label: i.name,
width: i.width,
customFn:row => {
return (
<span>{ row.id_house_properties_land_id_relation?.land_id === row.id ? '房地权属合一' : '房地权属分离' }</span>
)
}
})
break;
case "bufuqingkuang":
this.table.push({
label: i.name,
width: i.width,
customFn: (row) => {
return (
<div>
{row.tudiquanshuren !== row.quanliren ||
row.dengjimianji !== row.shijimianji ? (
<div>
<span>
{row.tudiquanshuren !== row.quanliren
? "权利人名称不符"
: ""}
</span>
<span>
{row.dengjimianji !== row.shijimianji
? "登记面积不符"
: ""}
</span>
</div>
) : (
<span></span>
)}
</div>
);
},
});
break;
case "bufuyuanyin":
this.table.push({
prop: i.field,
@ -594,17 +637,27 @@ export default {
fixed: i.is_fixed,
customFn: (row) => {
return (
<a
on={{
["click"]: (e) => {
this.$refs["addHistory"].setRow(row);
this.$refs["addHistory"].setType("show");
this.$refs["addHistory"].show();
},
}}
>
查看
</a>
<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>
);
},
});
@ -634,12 +687,14 @@ export default {
},
toHistory (row) {
if (row.id_his_evolutions_land_id_relation?.id) {
this.$refs['addHistory'].setType('editor')
this.$refs['addHistory'].setId(row.id_his_evolutions_land_id_relation?.id)
}
this.$refs['addHistory'].setRow(row);
this.$refs['addHistory'].show();
this.$refs['history'].setRow(row);
this.$refs['history'].show();
// if (row.id_his_evolutions_land_id_relation?.id) {
// this.$refs['addHistory'].setType('editor')
// this.$refs['addHistory'].setId(row.id_his_evolutions_land_id_relation?.id)
// }
// this.$refs['addHistory'].setRow(row);
// this.$refs['addHistory'].show();
}
},

Loading…
Cancel
Save