zhanghua
2025-01-16 22f9f05b3f1c452325b04f0a5ed9c5f4ad992f3b
src/views/index.vue
@@ -36,10 +36,7 @@
                                    />
                                </el-select>
                            </el-form-item>
                            <el-form-item
                                label="投资金额"
                                style="margin-right: 50px"
                            >
              <el-form-item label="投资金额" style="margin-right: 50px">
                                <div class="from_input">
                                    <el-input
                                        v-model="queryParams.start"
@@ -59,15 +56,10 @@
                                </div>
                            </el-form-item>
                            <el-form-item style="margin-right: 20px">
                                <el-button
                                    icon="Search"
                                    type="primary"
                                    @click="handleQuery"
                <el-button icon="Search" type="primary" @click="handleQuery"
                                    >搜索</el-button
                                >
                                <el-button icon="Refresh" @click="resetQuery"
                                    >重置</el-button
                                >
                <el-button icon="Refresh" @click="resetQuery">重置</el-button>
                            </el-form-item>
                        </div>
                    </el-form>
@@ -104,7 +96,7 @@
                                    v-model="searchForm.name"
                                    clearable
                                    placeholder="请输入项目名称或项目代码"
                                    style="width: 180px"
                  style="width: 240px"
                                />
                            </el-form-item>
                            <el-form-item style="margin-right: 0px">
@@ -116,9 +108,7 @@
                                    @click="searchList"
                                    >搜索</el-button
                                >
                                <el-button icon="Refresh" @click="mapQuery"
                                    >重置</el-button
                                >
                <el-button icon="Refresh" @click="mapQuery">重置</el-button>
                            </el-form-item>
                        </el-form>
                    </div>
@@ -148,7 +138,9 @@
import NoticeTable from "./components/noticeTable.vue";
import TidingsTable from "./components/tidingsTable.vue";
import Map from "./components/Map/index.vue";
import { getCalculatioln, getAbnormalData } from '@/api/login';
import { getCalculatioln, getAbnormalData } from "@/api/login";
import { searchByKey } from "@/api/projectEngineering/projectInfo";
export default {
    name: "Index",
    data() {
@@ -158,32 +150,17 @@
            sys_administrative_divisions: [],
            countExceptionProjectData: {},
            searchForm: {},
            tableDatas: [
                {
                    name: "射洪市",
                    value: 105.37281,
                    lat: 30.87145,
                    lon: 105.37281,
                    id: "222222222",
                },
                {
                    name: "xxxx",
                    value: 105.22332,
                    lat: 31.52421,
                    lon: 106.22332,
                    id: "11112",
                },
            ],
      tableDatas: [],
            calculation: [
                { text: '储', mun: 0, statistics: '', statisticsMun: '0' },
                { text: '建', mun: 0, statistics: '', statisticsMun: '0' },
                { text: '省', mun: 0, statistics: '', statisticsMun: '0' },
                { text: '市', mun: 0, statistics: '', statisticsMun: '0' },
                { text: '新', mun: 0, statistics: '', statisticsMun: '0' },
                { text: '竣', mun: 0, statistics: '', statisticsMun: '0' },
                { text: '县', mun: 0, statistics: '', statisticsMun: '0' },
                { text: '普', mun: 0, statistics: '', statisticsMun: '0' }
            ]
        { text: "储", mun: 0, statistics: "", statisticsMun: "0" },
        { text: "建", mun: 0, statistics: "", statisticsMun: "0" },
        { text: "省", mun: 0, statistics: "", statisticsMun: "0" },
        { text: "市", mun: 0, statistics: "", statisticsMun: "0" },
        { text: "新", mun: 0, statistics: "", statisticsMun: "0" },
        { text: "竣", mun: 0, statistics: "", statisticsMun: "0" },
        { text: "县", mun: 0, statistics: "", statisticsMun: "0" },
        { text: "普", mun: 0, statistics: "", statisticsMun: "0" },
      ],
        };
    },
    components: {
@@ -194,7 +171,8 @@
        Map,
    },
    created() {
        this.handleQuery()
    this.handleQuery();
    this.searchList();
    },
    methods: {
        dataPickerChange(val) {
@@ -217,7 +195,6 @@
            };
            getCalculatioln(obj).then((res) => {
                const arr = res.data.proPhaseCountVO?.concat(res.data.impTypeCountVO);
                const newArr = arr.map((item) => ({
                    text: item.text,
@@ -236,7 +213,6 @@
                    const newItem = newArrLookup[item.text];
                    return newItem ? newItem : item; // 如果 newItem 存在,则返回 newItem,否则返回原始 item
                });
            });
            this.abnormalData(obj);
@@ -275,9 +251,23 @@
        },
        // 地图搜索
        async searchList() {
            // await search()
            this.mapRef.moveTo(105.37281, 30.87145);
    searchList() {
      var _this = this;
      searchByKey({ wordKey: this.searchForm.name }).then((res) => {
        if (res.code == 200) {
          if (res.data.length > 0) {
            // this.$refs["mapRef"].showProjectInfo(res.data);
            // _this.tableDatas = res.data;
            setTimeout(() => {
              _this.$refs["mapRef"].makeAllMask(res.data);
            }, 2000);
          } else {
            _this.$message.error("未查询到对应项目");
          }
        } else {
          _this.$message.error(res.msg);
        }
      });
        },
        mapQuery() { },
    },
@@ -314,6 +304,9 @@
    }
    .search-form {
    padding: 5px;
    position: absolute;
    z-index: 999;
        display: flex;
        justify-content: flex-end;
    }
@@ -346,12 +339,12 @@
::v-deep.el-select__placeholder {
    font-size: 12px;
}
::v-deep input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
::v-deep input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type='number'] {
input[type="number"] {
    -moz-appearance: textfield;
}
.search_from {