|
@@ -88,7 +88,7 @@ export default {
|
|
|
},
|
|
|
//分析模型列表
|
|
|
anaModels: [],
|
|
|
- anaModelsCopy:[],//用于存放分析模型初始数据
|
|
|
+ anaModelsCopy: [], //用于存放分析模型初始数据
|
|
|
templateYZ: [], //用地性质模版因子
|
|
|
editData: {}, //编辑的对象
|
|
|
multipleSelection: [],
|
|
@@ -139,7 +139,7 @@ export default {
|
|
|
xzmj: 0,
|
|
|
xmmc: "耕地保护项目_" + this.getCurrentDateTime(),
|
|
|
};
|
|
|
- this.anaModels = this.anaModelsCopy
|
|
|
+ this.anaModels = this.anaModelsCopy;
|
|
|
this.$refs.ruleForm.resetFields();
|
|
|
this.$refs.multipleTable.clearSelection();
|
|
|
this.$refs.range.reset();
|
|
@@ -154,40 +154,43 @@ export default {
|
|
|
Message.warning("请绘制或导入选址范围!");
|
|
|
return;
|
|
|
}
|
|
|
- let obj = {
|
|
|
- xzfw: this.$refs.range.fileDataID,
|
|
|
- xmmc: this.ruleForm.xmmc,
|
|
|
- mxlist: this.multipleSelection,
|
|
|
- };
|
|
|
+ if (this.multipleSelection.length) {
|
|
|
+ let obj = {
|
|
|
+ xzfw: this.$refs.range.fileDataID,
|
|
|
+ xmmc: this.ruleForm.xmmc,
|
|
|
+ mxlist: this.multipleSelection,
|
|
|
+ };
|
|
|
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "分析中",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(0, 0, 0, 0.7)",
|
|
|
- });
|
|
|
- setTimeout(() => {
|
|
|
- loading.close();
|
|
|
- this.activeTabs = "lsju";
|
|
|
- this.$emit("updateParent", "activeTabs", "lsju");
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- }, 1000);
|
|
|
- AddGdbh(obj)
|
|
|
- .then((res) => {
|
|
|
- loading.close();
|
|
|
- this.activeTabs = "lsju";
|
|
|
- this.$emit("updateParent", "activeTabs", "lsju");
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- this.$message({
|
|
|
- message: res.message,
|
|
|
- type: res.success ? "success" : "warning",
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "分析中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ AddGdbh(obj)
|
|
|
+ .then((res) => {
|
|
|
+ // setTimeout(() => {
|
|
|
+ this.activeTabs = "lsju";
|
|
|
+ this.$emit("updateParent", "activeTabs", "lsju");
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ this.$message({
|
|
|
+ message: res.message,
|
|
|
+ type: res.success ? "success" : "warning",
|
|
|
+ });
|
|
|
+ this.reset();
|
|
|
+ loading.close();
|
|
|
+ // }, 2000);
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ loading.close();
|
|
|
+ Message.error(error);
|
|
|
});
|
|
|
- this.reset();
|
|
|
- })
|
|
|
- .catch((error) => {
|
|
|
- loading.close();
|
|
|
- Message.error(error);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: "至少选择一个分析模型",
|
|
|
+ type: "warning",
|
|
|
});
|
|
|
+ }
|
|
|
} else {
|
|
|
loading.close();
|
|
|
console.log("error submit!!");
|
|
@@ -199,7 +202,7 @@ export default {
|
|
|
GetMxList()
|
|
|
.then((res) => {
|
|
|
this.anaModels = res.data;
|
|
|
- this.anaModelsCopy = JSON.parse(JSON.stringify(res.data))
|
|
|
+ this.anaModelsCopy = JSON.parse(JSON.stringify(res.data));
|
|
|
})
|
|
|
.catch((erro) => {
|
|
|
console.log(erro);
|