Browse Source

修改已挂牌和拟挂牌多次保存数据问题

develop
王健 4 years ago
parent
commit
0a5da282f4
  1. 50
      src/views/land/handLand/newLand.vue
  2. 32
      src/views/land/noneHandLand/newLand.vue

50
src/views/land/handLand/newLand.vue

@ -1353,7 +1353,7 @@
</el-form>
<div class="dialog_op">
<el-button type="primary" @click="goBack">返回</el-button>
<el-button type="primary" @click="saveAllData" v-show="!readOnly"
<el-button type="primary" @click="save" v-show="!readOnly"
>保存所有数据</el-button
>
</div>
@ -1875,9 +1875,11 @@ export default {
},
calculate() {
if (this.editForm.totalConsArea && this.editForm.totalConsArea != 0) {
this.editForm.bizCommerceRate =
((this.editForm.bizSpace + this.editForm.commerceSpace) /
this.editForm.totalConsArea*100).toFixed(2)
this.editForm.bizCommerceRate = (
((this.editForm.bizSpace + this.editForm.commerceSpace) /
this.editForm.totalConsArea) *
100
).toFixed(2);
}
},
getList(page, params) {
@ -2049,21 +2051,21 @@ export default {
},
//
saveAllData() {
let type = "";
this.$route.query.isEditOr === "true" ? (type = "put") : (type = "post");
saveHandLandList(JSON.stringify(this.editForm), type).then((res) => {
if (res.data.success) {
this.$message({
type: "success",
message: "保存成功",
});
window.history.back();
} else {
this.$message.error("保存失败");
}
});
},
// saveAllData() {
// let type = "";
// this.$route.query.isEditOr === "true" ? (type = "put") : (type = "post");
// saveHandLandList(JSON.stringify(this.editForm), type).then((res) => {
// if (res.data.success) {
// this.$message({
// type: "success",
// message: "",
// });
// window.history.back();
// } else {
// this.$message.error("");
// }
// });
// },
goBack() {
window.history.back();
},
@ -2555,6 +2557,16 @@ export default {
this.$route.query.isEditOr === "true" ? (type = "put") : (type = "post");
saveHandLandList(JSON.stringify(this.editForm), type).then((res) => {
if (res.data.success) {
if (this.$route.query.isEditOr === "false") {
this.$router.push({
path: "/land/handLand/newLand",
query: {
readOnly: "false",
isEditOr: "true",
data: res.data.data.landListedId
},
});
}
this.$message({
type: "success",
message: "保存成功",

32
src/views/land/noneHandLand/newLand.vue

@ -1162,7 +1162,7 @@
</el-form>
<div class="dialog_op">
<el-button type="primary" @click="goBack">返回</el-button>
<el-button type="primary" @click="saveAllData" v-show="!readOnly"
<el-button type="primary" @click="save" v-show="!readOnly"
>保存所有数据</el-button
>
</div>
@ -1867,6 +1867,16 @@ export default {
this.$route.query.isEditOr === "true" ? (type = "put") : (type = "post");
saveNoHandLandList(JSON.stringify(this.editForm), type).then((res) => {
if (res.data.success) {
if (this.$route.query.isEditOr === "false") {
this.$router.push({
path: "/land/noneHandLand/newLand",
query: {
readOnly: "false",
isEditOr: "true",
data: res.data.data.proposedseriaId,
},
});
}
this.$message.success("保存成功");
} else {
this.$message.error("保存失败");
@ -1916,16 +1926,16 @@ export default {
},
//
saveAllData() {
saveNoHandLandList(JSON.stringify(this.editForm)).then((res) => {
if (res.data.success) {
this.$message("保存成功");
this.dialogFormVisible = false;
} else {
this.$message.error("保存失败");
}
});
},
// saveAllData() {
// saveNoHandLandList(JSON.stringify(this.editForm)).then((res) => {
// if (res.data.success) {
// this.$message("");
// this.dialogFormVisible = false;
// } else {
// this.$message.error("");
// }
// });
// },
uploadLonLat(e) {
const file = e;
let formData = new FormData();

Loading…
Cancel
Save