|
@@ -0,0 +1,290 @@
|
|
|
+<template>
|
|
|
+ <div class="hgxsc">
|
|
|
+ <div class="block-title">选址范围</div>
|
|
|
+ <range :keys="['hx', 'sc', 'zbd']" ref="range" />
|
|
|
+ <el-form :model="ruleForm" label-width="75px">
|
|
|
+ <div class="block-title">基本信息</div>
|
|
|
+ <el-form-item label="项目名称:" prop="xmmc">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.xmmc"
|
|
|
+ size="mini"
|
|
|
+ placeholder="请输入项目名称"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="项目类型:" prop="xmlx">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.xmlx"
|
|
|
+ size="mini"
|
|
|
+ placeholder="请输入项目类型"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="建设单位:" prop="jsdw">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.jsdw"
|
|
|
+ size="mini"
|
|
|
+ placeholder="请输入建设单位"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="block-title">
|
|
|
+ 分析因子
|
|
|
+ <div
|
|
|
+ v-show="$store.getters.name == 'admin'"
|
|
|
+ class="posi-abs pointer"
|
|
|
+ style="right: 0; top: 1px; color: #409eff"
|
|
|
+ @click="updateScx"
|
|
|
+ >
|
|
|
+ 关联资源目录
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="treeDiv">
|
|
|
+ <el-tree
|
|
|
+ :data="treedata"
|
|
|
+ ref="tree"
|
|
|
+ show-checkbox
|
|
|
+ node-key="id"
|
|
|
+ :props="defaultProps"
|
|
|
+ :default-expanded-keys="xz"
|
|
|
+ >
|
|
|
+ </el-tree>
|
|
|
+ </div>
|
|
|
+ <div class="bottomBtns">
|
|
|
+ <el-button round class="btn-style" @click="reset">重置</el-button>
|
|
|
+ <el-button type="primary" round class="btn-style" @click="submitData">
|
|
|
+ 检查</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+// import range from "@/components/mapview/range.vue"; ///mapview/range
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ // range,
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ activeTabs: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ loading: {
|
|
|
+ type: Boolean,
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ xz: [],
|
|
|
+
|
|
|
+ treedata: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ label: "一级控制线",
|
|
|
+ children: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ label: "二级控制线",
|
|
|
+ children: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ label: "一级控制线",
|
|
|
+ children: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 4,
|
|
|
+ label: "二级控制线",
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: 41,
|
|
|
+ label: "二级控制线",
|
|
|
+ children: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ defaultProps: {
|
|
|
+ children: "children",
|
|
|
+ label: "label",
|
|
|
+ },
|
|
|
+ ruleForm: {
|
|
|
+ xmmc: "",
|
|
|
+ jsdw: "",
|
|
|
+ xmlx: "",
|
|
|
+ xzdw: "",
|
|
|
+ ydxz_bsm: "",
|
|
|
+ yjydlx: "",
|
|
|
+
|
|
|
+ fwlx: 1,
|
|
|
+ xzfw: "",
|
|
|
+ xzmj: 0,
|
|
|
+ },
|
|
|
+
|
|
|
+ options: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // this.getKzx();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //获取检查要素
|
|
|
+ getKzx() {
|
|
|
+ GetScx().then((res) => {
|
|
|
+ if (res) {
|
|
|
+ this.GetAll = res.data;
|
|
|
+ for (var t in this.GetAll) {
|
|
|
+ const getall = this.GetAll[t];
|
|
|
+ if (getall.kzxjb == 1) {
|
|
|
+ this.treedata[0].children.push({
|
|
|
+ id: getall.bsm,
|
|
|
+ label: getall.ysmc,
|
|
|
+ });
|
|
|
+ this.xz.push(getall.bsm);
|
|
|
+ } else if (getall.kzxjb == 2) {
|
|
|
+ this.treedata[1].children.push({
|
|
|
+ id: getall.bsm,
|
|
|
+ label: getall.ysmc,
|
|
|
+ });
|
|
|
+ this.xz.push(getall.bsm);
|
|
|
+ } else {
|
|
|
+ let bool = false;
|
|
|
+ for (let i = 0; i < this.treedata.length; i++) {
|
|
|
+ if (this.treedata[i].id == getall.kzxjb) {
|
|
|
+ bool = true;
|
|
|
+ this.treedata[i].children.push({
|
|
|
+ id: getall.bsm,
|
|
|
+ label: getall.ysmc,
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!bool) {
|
|
|
+ this.treedata.push({
|
|
|
+ id: getall.kzxjb,
|
|
|
+ label: getall.tjzd,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: getall.bsm,
|
|
|
+ label: getall.ysmc,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.tree.setCheckedKeys(this.xz);
|
|
|
+ }, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ updateScx() {
|
|
|
+ UpdateScx().then((res) => {
|
|
|
+ if (res.statuscode == 200) {
|
|
|
+ ElMessage.success(res.message);
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ setydlx() {
|
|
|
+ this.ruleForm.yjydlx = this.$refs.ydcascader
|
|
|
+ .getCheckedNodes()[0]
|
|
|
+ .pathLabels.join(",");
|
|
|
+ this.$refs.ydcascader.togglePopperVisible();
|
|
|
+ },
|
|
|
+ reset() {
|
|
|
+ this.ruleForm = {
|
|
|
+ xmmc: "",
|
|
|
+ jsdw: "",
|
|
|
+ xmlx: "",
|
|
|
+ xzdw: "",
|
|
|
+ ydxz_bsm: "",
|
|
|
+ yjydlx: "",
|
|
|
+ scxs: [],
|
|
|
+
|
|
|
+ fwlx: 1,
|
|
|
+ xzfw: "",
|
|
|
+ xzmj: 0,
|
|
|
+ };
|
|
|
+ this.$refs.range.reset();
|
|
|
+ },
|
|
|
+ submitData() {
|
|
|
+ //更新范围
|
|
|
+ var _temp = this.$refs.range.getRange();
|
|
|
+ this.ruleForm.xzfw = _temp.xzfw;
|
|
|
+ this.ruleForm.xzmj = _temp.xzmj;
|
|
|
+
|
|
|
+ this.is_form()
|
|
|
+ .then((res) => {
|
|
|
+ // ElMessageBox.confirm("是否开始进行合规性检查?", "合规性检查", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning",
|
|
|
+ // }).then(() => {
|
|
|
+ // parent.emit("update:loading", true);
|
|
|
+ // Add({ ...this.ruleForm }).then((res) => {
|
|
|
+ // if (res.success) {
|
|
|
+ // parent.emit("update:rzMc", this.ruleForm.xmmc);
|
|
|
+ // parent.emit("update:rzBsm", res.data);
|
|
|
+ // parent.emit("update:rwBsm", res.data);
|
|
|
+ // }
|
|
|
+ // parent.emit("update:loading", false);
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ })
|
|
|
+ .catch((res) => {
|
|
|
+ ElMessage.warning(res);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ is_form() {
|
|
|
+ this.ruleForm.scxs = this.$refs.tree.getCheckedNodes(true).map((item) => {
|
|
|
+ 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(
|
|
|
+ // () => prop.activeTabs,
|
|
|
+ // (newValue, oldValue) => {
|
|
|
+ // if (prop.activeTabs != "scjg") this.reset();
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.hgxsc {
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ .treeDiv {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 250px);
|
|
|
+ padding: 7px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|