xy 1 year ago
parent 477bb55874
commit 697f7fff29

@ -58,6 +58,7 @@
"eslint-plugin-vue": "6.2.2", "eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0", "html-webpack-plugin": "3.2.0",
"mockjs": "1.0.1-beta3", "mockjs": "1.0.1-beta3",
"patch-package": "^8.0.0",
"runjs": "4.3.2", "runjs": "4.3.2",
"sass": "1.26.8", "sass": "1.26.8",
"sass-loader": "8.0.2", "sass-loader": "8.0.2",

@ -98,7 +98,7 @@ AMap.initAMapApiLoader({
// 高德的key // 高德的key
key: '795a757114c371f42cee1f8efa527684', key: '795a757114c371f42cee1f8efa527684',
// 插件集合 (插件按需引入) // 插件集合 (插件按需引入)
plugin: ['AMap.Autocomplete','AMap.Geocoder','AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', plugin: ['AMap.AutoComplete','AMap.Geocoder','AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType',
'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.DistrictSearch','AMap.CircleMarker','AMap.Polyline','AMap.MarkerClusterer' 'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.DistrictSearch','AMap.CircleMarker','AMap.Polyline','AMap.MarkerClusterer'
// 'AMap.Object3DLayer', 'AMap.Object3D' // 'AMap.Object3DLayer', 'AMap.Object3D'
] ]

@ -44,7 +44,8 @@ export default {
type: "selection", type: "selection",
reserveSelection: true, reserveSelection: true,
fixed: "left", fixed: "left",
width: 56 width: 50,
selectable: (row) => (!row.land_id || row.land_id === this.id),
}, },
{ {
label: "名称", label: "名称",
@ -93,7 +94,12 @@ export default {
}, },
on: { on: {
["loaded"]: (_) => { ["loaded"]: (_) => {
this.setCurrentRow(); //this.setCurrentRow();
this.$refs["houseTable"].getListData()?.forEach(row => {
if (row.land_id && row.land_id === this.id) {
this.$refs["houseTable"].toggleRowSelection(row, true);
}
})
}, },
["select"]: (selection, row) => { ["select"]: (selection, row) => {
if (row.land_id && row.land_id !== this.id) { if (row.land_id && row.land_id !== this.id) {
@ -327,16 +333,18 @@ export default {
delete copyForm[info._relations?.link_with_name]; delete copyForm[info._relations?.link_with_name];
} }
}); });
if (this.pickHouseRow && typeof this.pickHouseRow === "object") { if (this.$refs["houseTable"].getSelection() && this.$refs["houseTable"]?.getSelection()?.length > 0) {
promiseAll.push( promiseAll.push(
save( ...this.$refs["houseTable"].getSelection().map(i => save(Object.assign(i, { table_name: 'houses',land_id: this.id })))
Object.assign(this.pickHouseRow, {
table_name: "houses",
land_id: this.id,
})
)
); );
} }
this.originalForm.id_houses_land_id_relation.forEach(item => {
if (this.$refs["houseTable"].getSelection().findIndex(selected => selected.id === item.id) === -1) {
promiseAll.push(
save(Object.assign(item, { table_name: 'houses',land_id: "" }))
);
}
})
promiseAll.push( promiseAll.push(
save(Object.assign(copyForm, { table_name: this.tableName })) save(Object.assign(copyForm, { table_name: this.tableName }))
); );

@ -244,16 +244,15 @@ export default {
}, },
submit() { submit() {
save({ Promise.all(this.fileList.map(item => save({
table_name: 'asset_file_files', table_name: 'asset_file_files',
file_id: this.fileList[0]?.response?.id, file_id: item?.response?.id,
[/\/land/g.test(this.$route.path) ? 'land_id' : 'house_id']: this.id, [/\/land/g.test(this.$route.path) ? 'land_id' : 'house_id']: this.id,
name: this.fileList[0]?.response?.name, name: item?.response?.name,
original_name: this.fileList[0]?.response?.original_name, original_name: item?.response?.original_name,
//TODO: url: item?.response?.url,
url: this.fileList[0]?.response?.url.replace(/:\/\/:\/\//g, '://'), ...this.form
...this.form }))).then(res => {
}).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '附件上传成功' message: '附件上传成功'
@ -262,6 +261,24 @@ export default {
this.isShowModal = false this.isShowModal = false
this.init() this.init()
}) })
// save({
// table_name: 'asset_file_files',
// file_id: this.fileList[0]?.response?.id,
// [/\/land/g.test(this.$route.path) ? 'land_id' : 'house_id']: this.id,
// name: this.fileList[0]?.response?.name,
// original_name: this.fileList[0]?.response?.original_name,
// //TODO:
// url: this.fileList[0]?.response?.url.replace(/:\/\/:\/\//g, '://'),
// ...this.form
// }).then(res => {
// this.$message({
// type: 'success',
// message: ''
// })
// this.getDetail()
// this.isShowModal = false
// this.init()
// })
}, },
openDownload (row) { openDownload (row) {
@ -303,6 +320,13 @@ export default {
this.type = '' this.type = ''
this.fileList = [] this.fileList = []
} }
},
isShowModal (val) {
if (val) {
} else {
this.fileList = [];
}
} }
} }
} }

@ -59,49 +59,61 @@
}}{{ units.get(item.field) }}</el-descriptions-item }}{{ units.get(item.field) }}</el-descriptions-item
> >
<el-descriptions-item :label="'关联'+(detail.hasOwnProperty('id_houses_land_id_relation') ? '房产' : '土地')"> <el-descriptions-item :label="'关联'+(detail.hasOwnProperty('id_houses_land_id_relation') ? '房产' : '土地')">
<div style="display: flex;align-items: center;"> <template v-if="/\/land/g.test($route.path)">
<span>{{ detail.hasOwnProperty('id_houses_land_id_relation') ? (detail.id_houses_land_id_relation ? detail.id_houses_land_id_relation.name : '') : (detail.land_id_lands_id_relation ? detail.land_id_lands_id_relation.name : '') }}</span> <div v-for="item in detail.id_houses_land_id_relation" style="display: flex;align-items: center;">
<el-link style="margin-left: 10px;white-space: nowrap;" @click="$router.push(detail.hasOwnProperty('id_houses_land_id_relation') ? (detail.id_houses_land_id_relation ? ('/houseDetail/'+detail.id_houses_land_id_relation.id) : '') : (detail.land_id_lands_id_relation ? ('/landDetail/'+detail.land_id_lands_id_relation.id) : ''))">查看</el-link> <span>{{ item.name }}</span>
</div> <el-link style="margin-left: 10px;white-space: nowrap;" @click="$router.push(/houseDetail/+item.id)"></el-link>
</div>
</template>
<template v-if="/\/house/g.test($route.path)">
<div style="display: flex;align-items: center;">
<span>{{ (detail.land_id_lands_id_relation ? detail.land_id_lands_id_relation.name : '') }}</span>
<el-link style="margin-left: 10px;white-space: nowrap;" @click="$router.push('/landDetail/'+detail.land_id_lands_id_relation.id)"></el-link>
</div>
</template>
<!-- <div style="display: flex;align-items: center;">-->
<!-- <span>{{ detail.hasOwnProperty('id_houses_land_id_relation') ? (detail.id_houses_land_id_relation ? detail.id_houses_land_id_relation.name : '') : (detail.land_id_lands_id_relation ? detail.land_id_lands_id_relation.name : '') }}</span>-->
<!-- <el-link style="margin-left: 10px;white-space: nowrap;" @click="$router.push(detail.hasOwnProperty('id_houses_land_id_relation') ? (detail.id_houses_land_id_relation ? ('/houseDetail/'+detail.id_houses_land_id_relation.id) : '') : (detail.land_id_lands_id_relation ? ('/landDetail/'+detail.land_id_lands_id_relation.id) : ''))">查看</el-link>-->
<!-- </div>-->
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card id="detail-documents"> <!-- <el-card id="detail-documents">-->
<div class="el-descriptions__header el-descriptions__title"> <!-- <div class="el-descriptions__header el-descriptions__title">-->
资产证件图片 <!-- 资产证件图片-->
</div> <!-- </div>-->
<template> <!-- <template>-->
<template <!-- <template-->
v-if=" <!-- v-if="-->
(detail.id_asset_picture_files_land_id_relation && <!-- (detail.id_asset_picture_files_land_id_relation &&-->
detail.id_asset_picture_files_land_id_relation.length > 0) || <!-- detail.id_asset_picture_files_land_id_relation.length > 0) ||-->
(detail.id_asset_picture_files_house_id_relation && <!-- (detail.id_asset_picture_files_house_id_relation &&-->
detail.id_asset_picture_files_house_id_relation.length > 0) <!-- detail.id_asset_picture_files_house_id_relation.length > 0)-->
" <!-- "-->
> <!-- >-->
<div style="display: flex;flex-wrap: wrap;"> <!-- <div style="display: flex;flex-wrap: wrap;">-->
<div <!-- <div-->
v-for="item in /\/land/g.test($route.path) ? detail.id_asset_picture_files_land_id_relation : detail.id_asset_picture_files_house_id_relation" <!-- v-for="item in /\/land/g.test($route.path) ? detail.id_asset_picture_files_land_id_relation : detail.id_asset_picture_files_house_id_relation"-->
> <!-- >-->
<el-image <!-- <el-image-->
style="width: 100%; max-width: 200px;margin-right: 10px;" <!-- style="width: 100%; max-width: 200px;margin-right: 10px;"-->
:src="item.url" <!-- :src="item.url"-->
:preview-src-list=" <!-- :preview-src-list="-->
(/\/land/g.test($route.path) ? detail.id_asset_picture_files_land_id_relation : detail.id_asset_picture_files_house_id_relation).map( <!-- (/\/land/g.test($route.path) ? detail.id_asset_picture_files_land_id_relation : detail.id_asset_picture_files_house_id_relation).map(-->
(i) => i.url <!-- (i) => i.url-->
) <!-- )-->
" <!-- "-->
fit="contain" <!-- fit="contain"-->
></el-image> <!-- ></el-image>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
<template v-else> <!-- <template v-else>-->
<el-empty description="无"></el-empty> <!-- <el-empty description="无"></el-empty>-->
</template> <!-- </template>-->
</template> <!-- </template>-->
</el-card> <!-- </el-card>-->
<el-card id="detail-histories"> <el-card id="detail-histories">
<div class="el-descriptions__header el-descriptions__title"> <div class="el-descriptions__header el-descriptions__title">
历史沿革 历史沿革
@ -165,7 +177,8 @@
</el-card> </el-card>
<el-card id="detail-assetsMap"> <el-card id="detail-assetsMap">
<div class="el-descriptions__header el-descriptions__title"> <div class="el-descriptions__header el-descriptions__title">
资产地图 <p>资产地图</p>
<input style="width: 140px;" id="asset-map-tipinput"/>
</div> </div>
<div <div
@ -173,14 +186,15 @@
id="detail-map" id="detail-map"
style="width: 100%; height: 300px" style="width: 100%; height: 300px"
></div> ></div>
</el-card>
<el-card id="detail-safe">
<div class="el-descriptions__header el-descriptions__title">
安全检查
</div>
<xy-table :is-page="false" :height="300" :list="inspections" :table-item="inspectionTable" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" ></xy-table>
</el-card> </el-card>
<!-- <el-card id="detail-safe">-->
<!-- <div class="el-descriptions__header el-descriptions__title">-->
<!-- 安全检查-->
<!-- </div>-->
<!-- <xy-table :is-page="false" :height="300" :list="inspections" :table-item="inspectionTable" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" ></xy-table>-->
<!-- </el-card>-->
<el-card id="detail-contract"> <el-card id="detail-contract">
<div class="el-descriptions__header el-descriptions__title"> <div class="el-descriptions__header el-descriptions__title">
@ -249,10 +263,10 @@
detail.id_assets_atlas_files_land_id_relation.length > 0) detail.id_assets_atlas_files_land_id_relation.length > 0)
" /> " />
<AnchorLink href="#detail-info" title="基本信息" /> <AnchorLink href="#detail-info" title="基本信息" />
<AnchorLink href="#detail-documents" title="证件图片" /> <!-- <AnchorLink href="#detail-documents" title="证件图片" />-->
<AnchorLink href="#detail-histories" title="历史沿革" /> <AnchorLink href="#detail-histories" title="历史沿革" />
<AnchorLink href="#detail-assetsMap" title="资产地图" /> <AnchorLink href="#detail-assetsMap" title="资产地图" />
<AnchorLink href="#detail-safe" title="安全检查"></AnchorLink> <!-- <AnchorLink href="#detail-safe" title="安全检查"></AnchorLink>-->
<AnchorLink href="#detail-contract" title="租赁合同"></AnchorLink> <AnchorLink href="#detail-contract" title="租赁合同"></AnchorLink>
<AnchorLink href="#detail-repair" title="维修保养"></AnchorLink> <AnchorLink href="#detail-repair" title="维修保养"></AnchorLink>
<AnchorLink href="#detail-files" title="相关附件" /> <AnchorLink href="#detail-files" title="相关附件" />
@ -304,7 +318,7 @@
</el-input> </el-input>
<ul class="search-file-list"> <ul class="search-file-list">
<li v-for="(item, index) in myFiles" :key="item.id"> <li v-for="(item, index) in filesFilter" :key="item.name+item.id">
<div style="display: flex;justify-content: space-between;align-items: center;"> <div style="display: flex;justify-content: space-between;align-items: center;">
<a style="flex-basis: 50%;" :download="item.url">{{index+1}}.{{ item.original_name }}</a> <a style="flex-basis: 50%;" :download="item.url">{{index+1}}.{{ item.original_name }}</a>
@ -513,10 +527,18 @@ export default {
}, },
init() { init() {
//
const satellite = new AMap.TileLayer.Satellite();
const roadNet = new AMap.TileLayer.RoadNet();
this.map = new AMap.Map("detail-map", { this.map = new AMap.Map("detail-map", {
center: this.center, center: this.center,
mapStyle: "amap://styles/bfb1bb3feb0db7082367abca96b8d214", // mapStyle: "amap://styles/bfb1bb3feb0db7082367abca96b8d214", //
zoom: 60, zoom: 60,
layers: [satellite, roadNet]
});
this.map.plugin(["AMap.ToolBar"],() => {
//
this.map.addControl(new AMap.ToolBar());
}); });
this.map.remove(this.marker); this.map.remove(this.marker);
@ -543,6 +565,7 @@ export default {
this.marker = marker; this.marker = marker;
this.map.add(this.marker); this.map.add(this.marker);
this.map.setFitView(this.marker); this.map.setFitView(this.marker);
this.map.setZoom(15);
} }
}, },
@ -735,6 +758,10 @@ export default {
}, },
computed: { computed: {
filesFilter () {
return this.myFiles.filter((i) => (new RegExp(`${this.searchKeyword}.`).test(i.original_name)));
},
picList() { picList() {
if (/\/house/g.test(this.$route.path)) { if (/\/house/g.test(this.$route.path)) {
return ( return (
@ -802,7 +829,7 @@ export default {
this.getFields().then(res => { this.getFields().then(res => {
this.getHistories() this.getHistories()
this.getKeeps() this.getKeeps()
this.getInspections() // this.getInspections()
}) })
}, },
}; };

Loading…
Cancel
Save