diff --git a/.env.staging b/.env.staging index 9361378..3646f31 100644 --- a/.env.staging +++ b/.env.staging @@ -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 diff --git a/src/components/XyMap/index.vue b/src/components/XyMap/index.vue index 3b966ff..3fd5120 100644 --- a/src/components/XyMap/index.vue +++ b/src/components/XyMap/index.vue @@ -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') { diff --git a/src/utils/createDialog.js b/src/utils/createDialog.js index 7d34f2d..833eb8d 100644 --- a/src/utils/createDialog.js +++ b/src/utils/createDialog.js @@ -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) => { diff --git a/src/views/assets/component/addLand.vue b/src/views/assets/component/addLand.vue index 80b4119..bff5b6d 100644 --- a/src/views/assets/component/addLand.vue +++ b/src/views/assets/component/addLand.vue @@ -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 + // ), + // ]; + // }, }, }), }, diff --git a/src/views/assets/house.vue b/src/views/assets/house.vue index 30d674e..8e77a47 100644 --- a/src/views/assets/house.vue +++ b/src/views/assets/house.vue @@ -343,12 +343,12 @@ - - - - - - + @@ -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: "序号", }); diff --git a/src/views/assets/land.vue b/src/views/assets/land.vue index 77678d1..a77f8c1 100644 --- a/src/views/assets/land.vue +++ b/src/views/assets/land.vue @@ -741,7 +741,7 @@ export default { } }); this.table.unshift({ - type: "index", + prop: "id", width: 60, label: "序号", }); diff --git a/src/views/component/detail.vue b/src/views/component/detail.vue index cff4f74..1c4e87f 100644 --- a/src/views/component/detail.vue +++ b/src/views/component/detail.vue @@ -179,7 +179,7 @@ 安全检查 - + @@ -195,7 +195,7 @@ 维修保养 - + @@ -288,7 +288,7 @@ - 搜索 + 搜索附件 @@ -304,13 +304,13 @@ - + {{index+1}}.{{ item.original_name }} - - {{ item.land.name ? `[土地]${item.land.name}` : `[房产]${item.house.name}` }} - + + + { + 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() }) }, }; diff --git a/src/views/component/dialog.vue b/src/views/component/dialog.vue index 7a00711..e298733 100644 --- a/src/views/component/dialog.vue +++ b/src/views/component/dialog.vue @@ -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); diff --git a/src/views/component/table.vue b/src/views/component/table.vue index cdd23e5..f120085 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -598,7 +598,7 @@ export default { ); }); this.table.unshift({ - type: "index", + prop: "id", width: 60, label: "序号", });
搜索
搜索附件
- {{ item.land.name ? `[土地]${item.land.name}` : `[房产]${item.house.name}` }} -