|
|
@@ -0,0 +1,367 @@
|
|
|
+<template>
|
|
|
+ <div
|
|
|
+ v-loading="loading"
|
|
|
+ class="fxsz max-box overflow-hidden flex-box column posi-rel"
|
|
|
+ >
|
|
|
+ <div class="max-width flex-box column padding-10 box-sizing">
|
|
|
+ <div class="block-title margin-top-5">{{ title }}说明</div>
|
|
|
+ <div class="wenzi max-width column box-sizing" style="margin-top: 10px">
|
|
|
+ {{ qdfxsm }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="max-widthflex-box column">
|
|
|
+ <div
|
|
|
+ class="max-width flex-box column padding-10 box-sizing"
|
|
|
+ style="padding-top: 0"
|
|
|
+ >
|
|
|
+ <div class="block-title margin-top-5">分析规划</div>
|
|
|
+ <div class="max-width flex-box margin-top-10">
|
|
|
+ <el-form ref="queryForm" :model="queryParams" label-width="80px">
|
|
|
+ <el-form-item label="规划1:">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.plan1"
|
|
|
+ placeholder="请选择分析规划1"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, i) in fxghList"
|
|
|
+ :key="i"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.name"
|
|
|
+ ></el-option> </el-select
|
|
|
+ ></el-form-item>
|
|
|
+ <el-form-item label="规划2:">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.plan2"
|
|
|
+ placeholder="请选择分析规划2"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, i) in fxghList"
|
|
|
+ :key="i"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.name"
|
|
|
+ ></el-option> </el-select
|
|
|
+ ></el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button round @click="subMit">确定</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="max-width flex-box column padding-10 box-sizing">
|
|
|
+ <div class="block-title margin-top-5">差异分析结果</div>
|
|
|
+ <div class="cyContent">
|
|
|
+ <div v-for="(item, i) in cyjgList" :key="i" style="margin-bottom: 5px">
|
|
|
+ <div class="cyList">
|
|
|
+ <div style="color: #02a7f0">{{ i + 1 }}. {{ item.fxmc }}</div>
|
|
|
+ <div class="icon_list">
|
|
|
+ <el-icon color="#02A7F0"
|
|
|
+ ><View style="width: 1.2rem; height: 1.2rem"
|
|
|
+ /></el-icon>
|
|
|
+ <el-icon color="#02A7F0" @click="handleTransfer(item, i)"
|
|
|
+ ><Operation style="width: 1.2rem; height: 1.2rem"
|
|
|
+ /></el-icon>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="wenzi max-width column box-sizing">
|
|
|
+ {{ item.remark }}
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="item.statics"
|
|
|
+ border
|
|
|
+ style="width: 100%"
|
|
|
+ :span-method="objectSpanMethod"
|
|
|
+ v-if="item.statics.length"
|
|
|
+ height="250"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ width="50"
|
|
|
+ label="序号"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="A_YDYHFLDM"
|
|
|
+ label="控规用地用海代码"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="A_YDYHFLMC"
|
|
|
+ label="控规用地用海名称"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="DLMJ"
|
|
|
+ label="与总规差异总面积"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="B_YDYHFLDM"
|
|
|
+ label="总规用地用海代码"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="B_YDYHFLMC"
|
|
|
+ label="总规用地用海名称"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="TBMJ"
|
|
|
+ label="差异面积"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+ <script>
|
|
|
+import { reactive, toRefs } from "@vue/reactivity";
|
|
|
+import {
|
|
|
+ getCurrentInstance,
|
|
|
+ onMounted,
|
|
|
+ onUnmounted,
|
|
|
+ watch,
|
|
|
+} from "@vue/runtime-core";
|
|
|
+import { useRouter } from "vue-router";
|
|
|
+import { useStore } from "vuex";
|
|
|
+import { getFxyz, create } from "@/api/ghfxpj/ctfxApi.js";
|
|
|
+import { SjyList, Cyfxjg } from "@/api/ghfxpj/cyfxApi.js";
|
|
|
+import range from "@/components/mapview/range/range.vue";
|
|
|
+import { ElMessage } from "element-plus";
|
|
|
+import EsriJSON from "ol/format/EsriJSON";
|
|
|
+import { jsonToShp } from "@/api/gdal/index.js";
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ range,
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ activeTabs: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ zytype: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ fxyzDict: {
|
|
|
+ type: Object,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ setup(prop, context) {
|
|
|
+ const { proxy } = getCurrentInstance();
|
|
|
+ const store = useStore();
|
|
|
+ const router = useRouter();
|
|
|
+ const parent = { ...context };
|
|
|
+ const fxsz = reactive({
|
|
|
+ loading: false,
|
|
|
+ range: ref(null),
|
|
|
+ isQiXian: store.state.user.isQiXian,
|
|
|
+ active_layout: true,
|
|
|
+ downloadLoading: false,
|
|
|
+ xzqList: [],
|
|
|
+ title: router.currentRoute.value.meta.title,
|
|
|
+ qdfxsm:
|
|
|
+ "围绕国土空间总体规划、国土空间控制性详细规划、绿地专项规划,开展规划与规划间的差异分析,通过输出两规之间的矛盾冲突,辅助支撑控制性详细规划调整及专项规划编制工作,真正实现“多规合一”",
|
|
|
+ cyjgList: [],
|
|
|
+ queryParams: {
|
|
|
+ plan1: "",
|
|
|
+ plan2: "",
|
|
|
+ },
|
|
|
+ fxyzList: [],
|
|
|
+ fxghList: [],
|
|
|
+ spanArr: [], // 存储合并信息的数组
|
|
|
+ init() {
|
|
|
+ //获取分析规划
|
|
|
+ SjyList().then((res) => {
|
|
|
+ if (res.statuscode === 200) {
|
|
|
+ fxsz.fxghList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ subMit() {
|
|
|
+ console.log(fxsz.queryParams, "/////");
|
|
|
+ Cyfxjg(fxsz.queryParams).then((res) => {
|
|
|
+ if (res.statuscode === 200) {
|
|
|
+ fxsz.cyjgList = res.data.fxjg;
|
|
|
+ fxsz.calculateSpan();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ reset() {
|
|
|
+ // fxsz.form.fxyz = [];
|
|
|
+ // fxsz.form.jgmc = "";
|
|
|
+ // fxsz.range.reset();
|
|
|
+ },
|
|
|
+ // 合并单元格方法
|
|
|
+ // 合并单元格方法:单独处理每个列的合并逻辑
|
|
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ // 只处理需要合并的三列(A_YDYHFLDM、A_YDYHFLMC、DLMJ)
|
|
|
+ if ([1, 2, 3].includes(columnIndex)) {
|
|
|
+ // 根据列索引获取对应字段的合并信息
|
|
|
+ const span = fxsz.spanArr[columnIndex - 1]?.[rowIndex];
|
|
|
+ if (span) {
|
|
|
+ return span;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 计算合并的行数:为三个字段分别计算合并信息
|
|
|
+ calculateSpan() {
|
|
|
+ // 初始化三个字段的合并信息数组(对应列索引1、2、3)
|
|
|
+ fxsz.spanArr = [[], [], []];
|
|
|
+ const tableData =
|
|
|
+ this.cyjgList.length > 0 ? this.cyjgList[0].statics : [];
|
|
|
+ if (tableData.length === 0) return;
|
|
|
+
|
|
|
+ // 需要合并的字段与列索引映射关系
|
|
|
+ const fieldMap = [
|
|
|
+ "A_YDYHFLDM", // 列索引1
|
|
|
+ "A_YDYHFLMC", // 列索引2
|
|
|
+ "DLMJ", // 列索引3
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 为每个字段单独计算合并信息
|
|
|
+ fieldMap.forEach((field, fieldIndex) => {
|
|
|
+ let count = 1;
|
|
|
+ for (let i = 0; i < tableData.length; i++) {
|
|
|
+ // 检查下一行是否存在且字段值相同
|
|
|
+ if (
|
|
|
+ i < tableData.length - 1 &&
|
|
|
+ tableData[i][field] === tableData[i + 1][field]
|
|
|
+ ) {
|
|
|
+ count++;
|
|
|
+ } else {
|
|
|
+ // 记录当前组的合并信息
|
|
|
+ for (let j = 0; j < count; j++) {
|
|
|
+ fxsz.spanArr[fieldIndex].push(
|
|
|
+ j === 0
|
|
|
+ ? { rowspan: count, colspan: 1 }
|
|
|
+ : { rowspan: 0, colspan: 0 }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ count = 1; // 重置计数器
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleTransfer(item, index) {
|
|
|
+ // 提交数据到Vuex
|
|
|
+ store.commit("SET_TRANSFERID", {
|
|
|
+ id: item.id,
|
|
|
+ showTable: true,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ onMounted(() => {
|
|
|
+ fxsz.init();
|
|
|
+ });
|
|
|
+ return { ...toRefs(fxsz) };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+ <style lang="less" scoped>
|
|
|
+.fxsz {
|
|
|
+ .act_xzq,
|
|
|
+ .act_yz,
|
|
|
+ .act_year {
|
|
|
+ background-color: #2a82e4;
|
|
|
+ border-radius: 20px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ .wenzi {
|
|
|
+ white-space: pre-line;
|
|
|
+ text-align: justify;
|
|
|
+ }
|
|
|
+ .model_icon {
|
|
|
+ background-size: 45% 45% !important;
|
|
|
+ display: inline-block;
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ border: none;
|
|
|
+ margin-left: 14px;
|
|
|
+ margin-right: 5px;
|
|
|
+ cursor: pointer;
|
|
|
+ border-radius: 33px;
|
|
|
+ background-repeat: no-repeat !important;
|
|
|
+ background-position: center !important;
|
|
|
+ background: rgb(59, 161, 255);
|
|
|
+ }
|
|
|
+ .FILESHP {
|
|
|
+ background-image: url(~@/assets/map/model/FILE.png),
|
|
|
+ url(~@/assets/map/model/shp.png);
|
|
|
+ background-position: center 15px, center top !important;
|
|
|
+ }
|
|
|
+ .FILESHP:hover {
|
|
|
+ background-image: url(~@/assets/map/model/FILE_active.png);
|
|
|
+ }
|
|
|
+ .FILESHP.active {
|
|
|
+ background-image: url(~@/assets/map/model/FILE_active.png);
|
|
|
+ }
|
|
|
+ .FILETXT {
|
|
|
+ background-image: url(~@/assets/map/model/FILE.png),
|
|
|
+ url(~@/assets/map/model/txt.png);
|
|
|
+ background-position: center 15px, center top !important;
|
|
|
+ }
|
|
|
+ .FILETXT:hover {
|
|
|
+ background-image: url(~@/assets/map/model/FILE_active.png);
|
|
|
+ }
|
|
|
+ .FILETXT.active {
|
|
|
+ background-image: url(~@/assets/map/model/FILE_active.png);
|
|
|
+ }
|
|
|
+ .JSON2 {
|
|
|
+ background-image: url(~@/assets/map/model/JSON2.png);
|
|
|
+ }
|
|
|
+ .JSON2:hover {
|
|
|
+ background-image: url(~@/assets/map/model/JSON2_active.png);
|
|
|
+ }
|
|
|
+ .JSON2.active {
|
|
|
+ background-image: url(~@/assets/map/model/JSON2_active.png);
|
|
|
+ }
|
|
|
+ .jiequ {
|
|
|
+ background-image: url(~@/assets/map/model/jiequ.png);
|
|
|
+ background-size: 50% 50% !important;
|
|
|
+ }
|
|
|
+ .jiequ:hover {
|
|
|
+ background-image: url(~@/assets/map/model/jiequ_active.png);
|
|
|
+ background-size: 50% 50% !important;
|
|
|
+ }
|
|
|
+ .jiequ.active {
|
|
|
+ background-image: url(~@/assets/map/model/jiequ_active.png);
|
|
|
+ background-size: 50% 50% !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+.cyContent {
|
|
|
+ height: 52vh;
|
|
|
+ overflow: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+}
|
|
|
+.cyList {
|
|
|
+ width: 100%;
|
|
|
+ height: 24px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .icon_list {
|
|
|
+ width: 80px;
|
|
|
+ height: 24px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ i,
|
|
|
+ span {
|
|
|
+ display: inline-block;
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|