master
cody 3 days ago
parent fb68ab0477
commit b098322475

@ -2,7 +2,7 @@
ENV='development'
# base api
VUE_APP_BASE_API=http://wuxiwuye.ali251.langye.net/
VUE_APP_UPLOAD_API=http://wuxiwuye.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API=
VUE_APP_DEV_PROXY_TARGET=http://127.0.0.1:8000
VUE_APP_UPLOAD_API=http://127.0.0.1:8000/api/admin/upload-file
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview

Binary file not shown.

@ -183,6 +183,12 @@ export default {
prop: "shijimianji",
width: 120,
},
{
label: "房产状态",
prop: "xianzhuang",
width: 120,
formatter: (row, column, value) => value || "无",
},
{
label: "入账时间",
prop: "ruzhangshijian",

@ -74,41 +74,42 @@
</el-descriptions>
</el-card>
<!-- <el-card id="detail-documents">-->
<!-- <div class="el-descriptions__header el-descriptions__title">-->
<!-- 资产证件图片-->
<!-- </div>-->
<!-- <template>-->
<!-- <template-->
<!-- v-if="-->
<!-- (detail.id_asset_picture_files_land_id_relation &&-->
<!-- 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.length > 0)-->
<!-- "-->
<!-- >-->
<!-- <div style="display: flex;flex-wrap: wrap;">-->
<!-- <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"-->
<!-- >-->
<!-- <el-image-->
<!-- style="width: 100%; max-width: 200px;margin-right: 10px;"-->
<!-- :src="item.url"-->
<!-- :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(-->
<!-- (i) => i.url-->
<!-- )-->
<!-- "-->
<!-- fit="contain"-->
<!-- ></el-image>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-else>-->
<!-- <el-empty description="无"></el-empty>-->
<!-- </template>-->
<!-- </template>-->
<!-- </el-card>-->
<el-card id="detail-documents">
<div class="el-descriptions__header el-descriptions__title">
资产证件图片
</div>
<template>
<template
v-if="
(detail.id_asset_picture_files_land_id_relation &&
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.length > 0)
"
>
<div style="display: flex;flex-wrap: wrap;">
<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"
:key="item.id"
>
<el-image
style="width: 100%; max-width: 200px;margin-right: 10px;"
:src="item.url"
: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(
(i) => i.url
)
"
fit="contain"
></el-image>
</div>
</div>
</template>
<template v-else>
<el-empty description="无"></el-empty>
</template>
</template>
</el-card>
<el-card id="detail-link-land" v-if="/\/house/g.test($route.path) && (detail.land_id_lands_id_relation && detail.land_id_lands_id_relation.length > 0)">
<div class="el-descriptions__header el-descriptions__title">
<p>关联土地</p>
@ -297,7 +298,12 @@
<AnchorLink href="#detail-info" title="基本信息" />
<AnchorLink href="#detail-link-land" title="关联土地" v-if="/\/house/g.test($route.path)"/>
<AnchorLink href="#detail-link-houses" title="关联房产" v-if="/\/land/g.test($route.path)"/>
<!-- <AnchorLink href="#detail-documents" title="证件图片" />-->
<AnchorLink href="#detail-documents" title="证件图片" v-if="
(detail.id_asset_picture_files_house_id_relation &&
detail.id_asset_picture_files_house_id_relation.length > 0) ||
(detail.id_asset_picture_files_land_id_relation &&
detail.id_asset_picture_files_land_id_relation.length > 0)
" />
<AnchorLink href="#detail-histories" title="历史沿革" />
<AnchorLink href="#detail-assetsMap" title="资产地图" />
<!-- <AnchorLink href="#detail-safe" title="安全检查"></AnchorLink>-->
@ -1190,10 +1196,13 @@ export default {
return function (i) {
let { field, _relations } = i;
if (field === 'bufuqingkuang') {
if ((this.detail.tudiquanshuren !== this.detail.quanliren) ||
(this.detail.dengjimianji !== this.detail.shijimianji)) {
const ownerMismatch = this.detail.hasOwnProperty('land_id')
? this.detail.quanshuren !== this.detail.quanliren
: this.detail.tudiquanshuren !== this.detail.quanliren
if (ownerMismatch || (this.detail.dengjimianji !== this.detail.shijimianji)) {
let text = ""
text += (this.detail.hasOwnProperty('land_id') ? (this.detail.quanshuren !== this.detail.quanliren) : (this.detail.tudiquanshuren !== this.detail.quanliren))
text += ownerMismatch
? " 权利人名称不符 "
: ""
text += this.detail.dengjimianji !== this.detail.shijimianji

@ -0,0 +1,169 @@
<template>
<div>
<Modal
ref="dialog"
v-model="isShow"
title="证件图片"
:footer-hide="true"
>
<el-upload
ref="upload"
style="width: 400px"
multiple
list-type="picture"
:headers="{
Authorization: `Bearer ${getToken()}`,
}"
:on-progress="onProgress"
:on-change="onChange"
:on-success="successHandle"
:before-upload="uploadBefore"
:before-remove="beforeRemove"
:on-remove="removeHande"
:action="action"
:file-list="fileList"
:limit="100"
accept=".jpg,.jpeg,.png,.gif"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">
只能上传 jpg/jpeg/png/gif 文件
<br />单个文件不能超过50M
</div>
</el-upload>
</Modal>
</div>
</template>
<script>
import { save, index, destroy } from "@/api/system/baseForm";
import { getToken } from "@/utils/auth";
export default {
data() {
return {
isShow: false,
id: "",
type: "",
action: process.env.VUE_APP_UPLOAD_API,
fileList: [],
};
},
methods: {
getToken,
onChange() {
this.$myLoadingClose();
},
onProgress() {
this.$myLoading("文件上传中...");
},
show() {
this.isShow = true;
},
hidden() {
this.isShow = false;
},
setId(id) {
if (typeof id === "number") {
this.id = id;
} else {
console.error("error typeof id: " + typeof id);
}
},
setType(type = "add") {
const types = ["add", "editor"];
if (types.includes(type)) {
this.type = type;
} else {
console.warn("Unknown type: " + type);
}
},
successHandle(response, file, fileList) {
this.fileList = fileList;
this.submit(response);
},
removeHande(file, fileList) {
this.fileList = fileList;
},
uploadBefore(file) {
if (file.size / 1000 > 50 * 1024) {
this.$message({
type: "warning",
message: "上传图片大小超过50M",
});
return false;
}
},
beforeRemove(file) {
return this.$confirm("确认要删除吗?").then(() => {
return destroy({
table_name: "asset_picture_files",
id: file.response.id,
})
.then(() => true)
.catch(() => false);
});
},
async getDetail() {
const res = await index({
table_name: "asset_picture_files",
page: 1,
page_size: 999,
filter: [
{
key: /\/land/g.test(this.$route.path) ? "land_id" : "house_id",
op: "eq",
value: this.id,
},
],
});
this.fileList = res.data.map((item) => ({
name: item.original_name,
url: item.url,
response: item,
}));
},
submit(response) {
save({
table_name: "asset_picture_files",
file_id: response.id,
[/\/land/g.test(this.$route.path) ? "land_id" : "house_id"]: this.id,
name: response.name,
original_name: response.original_name,
url: response.url.replace(/:\/\/:\/\//g, "://"),
}).then(() => {
this.$message({
type: "success",
message: "证件图片上传成功",
});
});
},
},
watch: {
isShow(val) {
if (val) {
this.getDetail();
} else {
this.id = "";
this.type = "";
this.fileList = [];
}
},
},
};
</script>
<style scoped lang="scss">
::v-deep .el-input__inner {
text-align: left;
}
::v-deep .el-upload--picture-card {
font-size: 28px;
color: #8c939d;
width: 80px !important;
height: 80px !important;
line-height: 80px !important;
text-align: center;
}
</style>

@ -1059,7 +1059,7 @@ export default {
width: i.width,
formatter: (row, column, cellValue, index) => {
let text = "";
text += row.tudiquanshuren !== row.quanliren ? "权利人名称不符" : ""
text += row.quanshuren !== row.quanliren ? "权利人名称不符" : ""
text += text ? "" : ""
text += row.dengjimianji !== row.shijimianji ? "登记面积不符": ""
return text || "无"
@ -1071,32 +1071,8 @@ export default {
prop: i.field,
label: i.name,
width: i.width,
align: "center",
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>
);
},
align: "left",
formatter: (row, column, cellValue) => cellValue || "无",
});
break;
default:

@ -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;

@ -48,11 +48,11 @@ module.exports = {
},
//before: require('./mock/mock-server.js'),
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_BASE_API,
'/api': {
target: process.env.VUE_APP_DEV_PROXY_TARGET || 'http://127.0.0.1:8000',
changeOrigin: true, //配置跨域
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: process.env.VUE_APP_BASE_API
'^/api': '/api'
}
}
}

Loading…
Cancel
Save