master
cody 2 months ago
parent fb68ab0477
commit b098322475

@ -2,7 +2,7 @@
ENV='development' ENV='development'
# base api # base api
VUE_APP_BASE_API=http://wuxiwuye.ali251.langye.net/ VUE_APP_BASE_API=
VUE_APP_UPLOAD_API=http://wuxiwuye.ali251.langye.net/api/admin/upload-file 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 VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview

Binary file not shown.

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

@ -74,41 +74,42 @@
</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"
<!-- >--> :key="item.id"
<!-- <el-image--> >
<!-- style="width: 100%; max-width: 200px;margin-right: 10px;"--> <el-image
<!-- :src="item.url"--> style="width: 100%; max-width: 200px;margin-right: 10px;"
<!-- :preview-src-list="--> :src="item.url"
<!-- (/\/land/g.test($route.path) ? detail.id_asset_picture_files_land_id_relation : detail.id_asset_picture_files_house_id_relation).map(--> :preview-src-list="
<!-- (i) => i.url--> (/\/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>--> fit="contain"
<!-- </div>--> ></el-image>
<!-- </div>--> </div>
<!-- </template>--> </div>
<!-- <template v-else>--> </template>
<!-- <el-empty description="无"></el-empty>--> <template v-else>
<!-- </template>--> <el-empty description="无"></el-empty>
<!-- </template>--> </template>
<!-- </el-card>--> </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)"> <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"> <div class="el-descriptions__header el-descriptions__title">
<p>关联土地</p> <p>关联土地</p>
@ -297,7 +298,12 @@
<AnchorLink href="#detail-info" title="基本信息" /> <AnchorLink href="#detail-info" title="基本信息" />
<AnchorLink href="#detail-link-land" title="关联土地" v-if="/\/house/g.test($route.path)"/> <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-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-histories" title="历史沿革" />
<AnchorLink href="#detail-assetsMap" title="资产地图" /> <AnchorLink href="#detail-assetsMap" title="资产地图" />
<!-- <AnchorLink href="#detail-safe" title="安全检查"></AnchorLink>--> <!-- <AnchorLink href="#detail-safe" title="安全检查"></AnchorLink>-->
@ -1190,10 +1196,13 @@ export default {
return function (i) { return function (i) {
let { field, _relations } = i; let { field, _relations } = i;
if (field === 'bufuqingkuang') { if (field === 'bufuqingkuang') {
if ((this.detail.tudiquanshuren !== this.detail.quanliren) || const ownerMismatch = this.detail.hasOwnProperty('land_id')
(this.detail.dengjimianji !== this.detail.shijimianji)) { ? this.detail.quanshuren !== this.detail.quanliren
: this.detail.tudiquanshuren !== this.detail.quanliren
if (ownerMismatch || (this.detail.dengjimianji !== this.detail.shijimianji)) {
let text = "" 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 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, width: i.width,
formatter: (row, column, cellValue, index) => { formatter: (row, column, cellValue, index) => {
let text = ""; let text = "";
text += row.tudiquanshuren !== row.quanliren ? "权利人名称不符" : "" text += row.quanshuren !== row.quanliren ? "权利人名称不符" : ""
text += text ? "" : "" text += text ? "" : ""
text += row.dengjimianji !== row.shijimianji ? "登记面积不符": "" text += row.dengjimianji !== row.shijimianji ? "登记面积不符": ""
return text || "无" return text || "无"
@ -1071,32 +1071,8 @@ export default {
prop: i.field, prop: i.field,
label: i.name, label: i.name,
width: i.width, width: i.width,
align: "center", align: "left",
customFn: (row) => { formatter: (row, column, cellValue) => cellValue || "无",
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>
);
},
}); });
break; break;
default: default:

@ -304,13 +304,21 @@
</div> </div>
</template> </template>
<template #create> <template #create>
<Button <div style="display: flex; gap: 10px;">
type="primary" <Button
@click=" type="primary"
$refs['dialog'].setType('add'), $refs['dialog'].show() @click="
" $refs['dialog'].setType('add'), $refs['dialog'].show()
>新增</Button "
> >新增</Button
>
<Button
type="error"
:disabled="selectedRows.length === 0"
@click="batchDelete"
>删除</Button
>
</div>
</template> </template>
<template #import> <template #import>
<Button type="primary" @click="$refs['imports'].show()" <Button type="primary" @click="$refs['imports'].show()"
@ -342,7 +350,8 @@
:destroy-req-opt="select" :destroy-req-opt="select"
:table-item="table" :table-item="table"
:btn-to-more="true" :btn-to-more="true"
:more-auths="['edit','delete','picture','file']" :more-auths="['edit','delete','picture','document','file']"
@selection-change="handleSelectionChange"
@loaded="adjustAlignment" @loaded="adjustAlignment"
@detail=" @detail="
(row) => { (row) => {
@ -362,6 +371,10 @@
$refs['atlas'].setId(row.id); $refs['atlas'].setId(row.id);
$refs['atlas'].show(); $refs['atlas'].show();
}" }"
@document="(row) => {
$refs['documents'].setId(row.id);
$refs['documents'].show();
}"
@file="(row) => { @file="(row) => {
$refs['files'].setId(row.id); $refs['files'].setId(row.id);
$refs['files'].show(); $refs['files'].show();
@ -391,6 +404,12 @@
> >
</template> </template>
<template #document="{row}">
<span
>证件图片</span
>
</template>
<template #file="{row}"> <template #file="{row}">
<span <span
>附件</span >附件</span
@ -408,6 +427,7 @@
<history ref="history"></history> <history ref="history"></history>
<lease ref="lease"></lease> <lease ref="lease"></lease>
<atlas ref="atlas"></atlas> <atlas ref="atlas"></atlas>
<documents ref="documents"></documents>
<files ref="files"></files> <files ref="files"></files>
<handle ref="handle"></handle> <handle ref="handle"></handle>
<!-- <drawer--> <!-- <drawer-->
@ -445,6 +465,7 @@ import lease from '@/views/assets/lease.vue';
// import drawer from "@/views/component/drawer.vue"; // import drawer from "@/views/component/drawer.vue";
import imports from "@/views/component/imports.vue"; import imports from "@/views/component/imports.vue";
import atlas from "@/views/assets/atlas.vue"; import atlas from "@/views/assets/atlas.vue";
import documents from "@/views/assets/documents.vue";
import files from "@/views/assets/files.vue"; import files from "@/views/assets/files.vue";
import handle from "@/views/assets/component/addHandle.vue"; import handle from "@/views/assets/component/addHandle.vue";
import { deepCopy } from '@/utils' import { deepCopy } from '@/utils'
@ -458,6 +479,7 @@ export default {
history, history,
lease, lease,
atlas, atlas,
documents,
// drawer, // drawer,
imports, imports,
files, files,
@ -493,12 +515,65 @@ export default {
customFormId: "", customFormId: "",
tableName: "", tableName: "",
}, },
selectedRows: [],
selectedRowMap: {},
}; };
}, },
methods: { methods: {
index, index,
destroy, destroy,
download, 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() { reset() {
this.select.filter.splice(1); this.select.filter.splice(1);
this.select.filter[0] = { this.select.filter[0] = {
@ -1064,33 +1139,9 @@ export default {
prop: i.field, prop: i.field,
label: i.name, label: i.name,
width: i.width, width: i.width,
align: alignLeft.find((m) => m === i.field) ? "left" : "center", align: "left",
fixed: i.is_fixed, fixed: i.is_fixed,
customFn: (row) => { formatter: (row, column, cellValue) => cellValue || "无",
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>
);
},
}); });
break; break;
default: default:
@ -1116,6 +1167,12 @@ export default {
label: "序号", label: "序号",
formatter: (row, column, cellValue, index) => (this.$refs['xyTable'].selectOpt.page - 1) * this.$refs['xyTable'].selectOpt.page_size + index + 1 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({ this.table.push({
prop: 'admin.name', prop: 'admin.name',
width: 120, width: 120,
@ -1134,6 +1191,7 @@ export default {
}) })
}, },
adjustAlignment () { adjustAlignment () {
this.syncPageSelection();
if (this.firstAdjustTable) { if (this.firstAdjustTable) {
const data = this.$refs['xyTable'].getListData(); const data = this.$refs['xyTable'].getListData();
if (data.length < 2) return; if (data.length < 2) return;

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

Loading…
Cancel
Save