|
@@ -1,11 +1,15 @@
|
|
<template>
|
|
<template>
|
|
<div class="hgxsc">
|
|
<div class="hgxsc">
|
|
- <div class="rangDiv">
|
|
|
|
- <div class="block-title">选址范围</div>
|
|
|
|
- <range type="hgxfx" :keys="['hx', 'sc']" class="range" ref="range" />
|
|
|
|
- </div>
|
|
|
|
- <el-form :model="ruleForm" label-width="75px">
|
|
|
|
- <div class="block-title">基本信息</div>
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ :model="ruleForm"
|
|
|
|
+ ref="ruleForm"
|
|
|
|
+ label-width="100px"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="选址范围:" prop="xzmj">
|
|
|
|
+ <range type="hgxfx" :keys="['hx', 'sc']" class="range" ref="range" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- <div class="block-title">基本信息</div> -->
|
|
<el-form-item label="项目名称:" prop="xmmc">
|
|
<el-form-item label="项目名称:" prop="xmmc">
|
|
<el-input
|
|
<el-input
|
|
v-model="ruleForm.xmmc"
|
|
v-model="ruleForm.xmmc"
|
|
@@ -102,6 +106,15 @@ export default {
|
|
xzfw: "",
|
|
xzfw: "",
|
|
xzmj: 0,
|
|
xzmj: 0,
|
|
},
|
|
},
|
|
|
|
+ rules: {
|
|
|
|
+ xzmj: [{ required: true, message: "请填写范围的数据" }],
|
|
|
|
+ xmmc: [
|
|
|
|
+ { required: true, message: "请输入项目名称", trigger: "blur" },
|
|
|
|
+ { min: 3, max: 10, message: "长度在 3 到 5 个字符", trigger: "blur" },
|
|
|
|
+ ],
|
|
|
|
+ jsdw: [{ required: true, message: "请输入建设单位", trigger: "blur" }],
|
|
|
|
+ xmlx: [{ required: true, message: "请输入项目类型", trigger: "blur" }],
|
|
|
|
+ },
|
|
|
|
|
|
options: [],
|
|
options: [],
|
|
};
|
|
};
|
|
@@ -201,9 +214,12 @@ export default {
|
|
var _temp = this.$refs.range.getRange();
|
|
var _temp = this.$refs.range.getRange();
|
|
this.ruleForm.xzfw = _temp.xzfw;
|
|
this.ruleForm.xzfw = _temp.xzfw;
|
|
this.ruleForm.xzmj = _temp.xzmj || hgxfx.xzmj;
|
|
this.ruleForm.xzmj = _temp.xzmj || hgxfx.xzmj;
|
|
-
|
|
|
|
- this.is_form()
|
|
|
|
- .then((res) => {
|
|
|
|
|
|
+ this.$refs.ruleForm.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.getCheckedNodes();
|
|
|
|
+ if (this.ruleForm.scxs.length == 0) {
|
|
|
|
+ Message.warning("至少选择一个项目信息");
|
|
|
|
+ }
|
|
MessageBox.confirm("是否开始进行合规性检查?", "合规性检查", {
|
|
MessageBox.confirm("是否开始进行合规性检查?", "合规性检查", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
@@ -227,36 +243,15 @@ export default {
|
|
// this.$emit("updateParent", "loading", false);
|
|
// this.$emit("updateParent", "loading", false);
|
|
// });
|
|
// });
|
|
});
|
|
});
|
|
- })
|
|
|
|
- .catch((res) => {
|
|
|
|
|
|
+ } else {
|
|
Message.warning(res);
|
|
Message.warning(res);
|
|
- });
|
|
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- is_form() {
|
|
|
|
|
|
+ getCheckedNodes() {
|
|
this.ruleForm.scxs = this.$refs.tree.getCheckedNodes(true).map((item) => {
|
|
this.ruleForm.scxs = this.$refs.tree.getCheckedNodes(true).map((item) => {
|
|
return item.id;
|
|
return item.id;
|
|
});
|
|
});
|
|
- return new Promise((resolve, reject) => {
|
|
|
|
- if (this.ruleForm.xzmj == 0) {
|
|
|
|
- reject("请填写范围的数据!");
|
|
|
|
- }
|
|
|
|
- if (this.ruleForm.xmmc == "") {
|
|
|
|
- reject("请填写项目名称");
|
|
|
|
- }
|
|
|
|
- if (this.ruleForm.jsdw == "") {
|
|
|
|
- reject("请填写建设单位");
|
|
|
|
- }
|
|
|
|
- if (this.ruleForm.xmlx == "") {
|
|
|
|
- reject("请填写项目类型");
|
|
|
|
- }
|
|
|
|
- // if (this.ruleForm.ydxz_bsm == ("" || null)) {
|
|
|
|
- // reject("请选择用地性质");
|
|
|
|
- // }
|
|
|
|
- if (this.ruleForm.scxs.length == 0) {
|
|
|
|
- reject("至少选择一个项目信息");
|
|
|
|
- }
|
|
|
|
- resolve(true);
|
|
|
|
- });
|
|
|
|
},
|
|
},
|
|
},
|
|
},
|
|
watch: {},
|
|
watch: {},
|
|
@@ -275,9 +270,9 @@ export default {
|
|
}
|
|
}
|
|
.range {
|
|
.range {
|
|
flex: 1;
|
|
flex: 1;
|
|
- width: calc(100% - 100px);
|
|
|
|
- position: absolute;
|
|
|
|
- left: 100px;
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
+ // position: absolute;
|
|
|
|
+ // left: 100px;
|
|
}
|
|
}
|
|
|
|
|
|
.treeDiv {
|
|
.treeDiv {
|
|
@@ -288,4 +283,13 @@ export default {
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+/deep/ .el-input .el-input--mini .el-input--suffix {
|
|
|
|
+ width: 278px !important;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-select {
|
|
|
|
+ width: 278px !important;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-form-item__error {
|
|
|
|
+ top: 32px !important;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|