xy 1 year ago
parent db4587c4ae
commit 477bb55874

@ -4,10 +4,10 @@ NODE_ENV = production
ENV = 'staging'
# 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_PREVIEW=//view.langye.net:8012/onlinePreview
#VUE_APP_BASE_API=http://wuxiwuye.ali251.langye.net/
#VUE_APP_UPLOAD_API=http://wuxiwuye.ali251.langye.net/api/admin/upload-file
#VUE_APP_PREVIEW=//view.langye.net:8012/onlinePreview
# base api
#VUE_APP_BASE_API=http://192.168.221.31:9001/
#VUE_APP_UPLOAD_API=http://192.168.221.31:9001/api/admin/upload-file
#VUE_APP_PREVIEW=http://192.168.221.31:8012/onlinePreview
VUE_APP_BASE_API=http://192.168.221.31:9001/
VUE_APP_UPLOAD_API=http://192.168.221.31:9001/api/admin/upload-file
VUE_APP_PREVIEW=http://192.168.221.31:8012/onlinePreview

@ -27,8 +27,8 @@ export default {
if(!newVal) return
let info = {
...newVal,
latitude: newVal.latitude,
longitude: newVal.longitude,
latitude: newVal.location?.lat || newVal.latitude,
longitude: newVal.location?.lng || newVal.longitude,
}
let res = ''
if(typeof this.resultFormat === 'string') {

@ -146,6 +146,7 @@ export class CreateDialog {
: "编辑",
visible: that.dialogVisible,
width: this.options?.width ? this.options.width : "800px",
"close-on-click-modal": false
},
on: {
"update:visible": (val) => {

@ -40,6 +40,12 @@ export default {
table_name: "houses",
},
tableItem: [
{
type: "selection",
reserveSelection: true,
fixed: "left",
width: 56
},
{
label: "名称",
prop: "name",
@ -89,31 +95,41 @@ export default {
["loaded"]: (_) => {
this.setCurrentRow();
},
["row-click"]: ({ row }) => {
["select"]: (selection, row) => {
if (row.land_id && row.land_id !== this.id) {
this.$message({
type: "warning",
message: "当前房产已有绑定土地",
});
this.$refs["houseTable"].setCurrentRow();
this.$refs["houseTable"].toggleRowSelection(row, false);
return;
}
this.form["ruzhangshijian"] = row.ruzhangshijian;
this.form["zhangmianyuanzhi"] = row.zhangmianyuanzhi;
this.pickHouseRow = deepCopy(row);
delete this.pickHouseRow.id_his_evolutions_house_id_relation;
let copyRow = deepCopy(row);
delete copyRow.id;
copyRow.land_id = this.id;
this.form["id_house_properties_land_id_relation"] = [
Object.assign(
this.originalForm?.id_house_properties_land_id_relation
? this.originalForm.id_house_properties_land_id_relation
: {},
copyRow
),
];
},
// ["row-click"]: ({ row }) => {
// if (row.land_id && row.land_id !== this.id) {
// this.$message({
// type: "warning",
// message: "",
// });
// this.$refs["houseTable"].setCurrentRow();
// return;
// }
// this.form["ruzhangshijian"] = row.ruzhangshijian;
// this.form["zhangmianyuanzhi"] = row.zhangmianyuanzhi;
// this.pickHouseRow = deepCopy(row);
// delete this.pickHouseRow.id_his_evolutions_house_id_relation;
// let copyRow = deepCopy(row);
// delete copyRow.id;
// copyRow.land_id = this.id;
// this.form["id_house_properties_land_id_relation"] = [
// Object.assign(
// this.originalForm?.id_house_properties_land_id_relation
// ? this.originalForm.id_house_properties_land_id_relation
// : {},
// copyRow
// ),
// ];
// },
},
}),
},

@ -343,12 +343,12 @@
<atlas ref="atlas"></atlas>
<files ref="files"></files>
<addHandle ref="addHandle"></addHandle>
<!-- <imports-->
<!-- :table-name="customForm.tableName"-->
<!-- :form-info="form"-->
<!-- ref="imports"-->
<!-- @refresh="$refs['xyTable'].getTableData()"-->
<!-- ></imports>-->
<imports
:table-name="customForm.tableName"
:form-info="form"
ref="imports"
@refresh="$refs['xyTable'].getTableData()"
></imports>
<!-- <atlas ref="atlas"></atlas>-->
<!-- <assetsHistoryList ref="assetsHistoryList"></assetsHistoryList>-->
</div>
@ -376,7 +376,7 @@ import history from '@/views/assets/history.vue'
import files from "@/views/assets/files.vue";
import addHandle from '@/views/assets/component/addHandle.vue'
// import drawer from "@/views/component/drawer.vue";
// import imports from "./imports.vue";
import imports from "@/views/component/imports.vue";
// import atlas from "@/views/assets/atlas.vue";
// import assetsHistoryList from '@/views/assets/assetsHistoryList.vue'
export default {
@ -391,7 +391,7 @@ export default {
files,
addHandle,
// drawer,
// imports,
imports,
// atlas,
// assetsHistoryList
@ -753,7 +753,7 @@ export default {
}
});
this.table.unshift({
type: "index",
prop: "id",
width: 60,
label: "序号",
});

@ -741,7 +741,7 @@ export default {
}
});
this.table.unshift({
type: "index",
prop: "id",
width: 60,
label: "序号",
});

@ -179,7 +179,7 @@
安全检查
</div>
<xy-table :is-page="false" :height="300" :list="/\/land/g.test(this.$route.path) ? detail.id_asset_safety_inspections_land_id_relation : detail.id_asset_safety_inspections_house_id_relation" :table-item="inspectionTable" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" ></xy-table>
<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">
@ -195,7 +195,7 @@
维修保养
</div>
<xy-table :is-page="false" :height="300" :list="/\/land/g.test(this.$route.path) ? detail.id_asset_safety_keeps_land_id_relation : detail.id_asset_safety_keeps_house_id_relation" :table-item="keepTable" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" ></xy-table>
<xy-table :is-page="false" :height="300" :list="keeps" :table-item="keepTable" style="margin-top: 20px" size="mini" stripe ref="table1" :auths="[]" ></xy-table>
</el-card>
<el-card id="detail-files">
@ -288,7 +288,7 @@
<el-card v-show="isShowSearch" class="search-container">
<template #header>
<div style="display:flex;align-items: center;">
<p>搜索</p>
<p>搜索附件</p>
<i class="el-icon-close" style="margin-left: auto;" @click="isShowSearch = false"></i>
</div>
@ -304,13 +304,13 @@
</el-input>
<ul class="search-file-list">
<li v-for="(item, index) in searchFiles" :key="item.id">
<li v-for="(item, index) in myFiles" :key="item.id">
<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>
<p style="flex-basis: 25%;flex-shrink: 0;">
{{ item.land.name ? `[土地]${item.land.name}` : `[房产]${item.house.name}` }}
</p>
<!-- <p style="flex-basis: 25%;flex-shrink: 0;">-->
<!-- {{ item.land.name ? `[土地]${item.land.name}` : `[房产]${item.house.name}` }}-->
<!-- </p>-->
<div>
<el-button
@ -365,6 +365,8 @@ export default {
},
histories: [],
inspections: [],
keeps: [],
units: new Map([
["dengjimianji", "m²"],
["shijimianji", "m²"],
@ -483,6 +485,8 @@ export default {
searchKeyword: "",
searchFiles: [],
searchFileTotal: 0,
myFiles: [],
};
},
methods: {
@ -629,6 +633,10 @@ export default {
});
this.detail = detail;
this.init();
this.myFiles.push(...detail.id_asset_file_files_land_id_relation);
this.myFiles.push(...detail.id_asset_picture_files_land_id_relation);
this.myFiles.push(...detail.id_assets_atlas_files_land_id_relation);
},
@ -647,6 +655,50 @@ export default {
]
})
this.histories = res.data;
res.data.forEach(i => {
this.myFiles.push(...i.tupian_detail)
})
},
async getKeeps () {
const res = await index({
table_name: 'asset_safety_keeps',
page: 1,
page_size: 999,
filter:[
{
key: /\/land/g.test(this.$route.path) ? 'land_id' : 'house_id',
op: 'eq',
value: this.$route.params.id
}
]
})
this.keeps = res.data;
res.data.forEach(i => {
this.myFiles.push(...i.fujian_detail)
})
},
async getInspections () {
const res = await index({
table_name: 'asset_safety_inspections',
page: 1,
page_size: 999,
filter:[
{
key: /\/land/g.test(this.$route.path) ? 'land_id' : 'house_id',
op: 'eq',
value: this.$route.params.id
}
]
})
this.inspections = res.data;
res.data.forEach(i => {
this.myFiles.push(...i.fujian_detail)
})
},
print () {
@ -749,6 +801,8 @@ export default {
created() {
this.getFields().then(res => {
this.getHistories()
this.getKeeps()
this.getInspections()
})
},
};

@ -458,24 +458,28 @@ export default {
this.formInfo.forEach((i) => {
if (i && (i.edit_input === "file" || i.edit_input === "files")) {
res[i._relations.link_with_name]
? (this.file[i.field] =
res[i._relations.link_with_name] instanceof Array
? res[i._relations.link_with_name].map((i) => {
return {
name: i?.original_name,
url: i?.url,
response: i,
};
})
: [
{
name: res[i._relations.link_with_name]?.original_name,
url: res[i._relations.link_with_name]?.url,
response: res[i._relations.link_with_name],
},
])
: (this.file[i.field] = []);
if (i._relations && i._relations.link_with_name) {
res[i._relations.link_with_name]
? (this.file[i.field] =
res[i._relations.link_with_name] instanceof Array
? res[i._relations.link_with_name].map((i) => {
return {
name: i?.original_name,
url: i?.url,
response: i,
};
})
: [
{
name: res[i._relations.link_with_name]?.original_name,
url: res[i._relations.link_with_name]?.url,
response: res[i._relations.link_with_name],
},
])
: (this.file[i.field] =[]);
} else {
this.file[i.field] = res[`${i.field}_upload_details`]
}
return
}
@ -529,22 +533,16 @@ export default {
info._relations?.link_relation === "newHasMany" ||
info._relations?.link_relation === "hasMany"
) {
if (info.edit_input === "files") {
copyForm[info.field] = this.file[
info.field
]?.map((i) => i?.response?.id);
} else {
copyForm[info._relations.link_with_name] = copyForm[
info.field
] instanceof Array ? copyForm[
info.field
]?.map((i) => {
return {
[info._relations.custom_form_field]: i,
//...copyRelation,
};
}) : '';
}
copyForm[info._relations.link_with_name] = copyForm[
info.field
] instanceof Array ? copyForm[
info.field
]?.map((i) => {
return {
[info._relations.custom_form_field]: i,
//...copyRelation,
};
}) : '';
delete copyForm[info.field];
}
@ -579,6 +577,11 @@ export default {
if (!copyForm[info._relations?.link_with_name]) {
delete copyForm[info._relations?.link_with_name];
}
if (info.edit_input === "files") {
copyForm[info.field] = this.file[
info.field
]?.map((i) => i?.response?.id);
}
// if (info._relations?.link_with_name) {
// if (info.edit_input === "files" || info.edit_input === "file") {
// this.form[info._relations.link_with_name] = this.file[info.field].map(i => i?.response);

@ -598,7 +598,7 @@ export default {
);
});
this.table.unshift({
type: "index",
prop: "id",
width: 60,
label: "序号",
});

Loading…
Cancel
Save