代码提交-glj

This commit is contained in:
glj 2023-04-21 18:24:53 +08:00
parent c634b89aa0
commit 60cec328df
5 changed files with 267 additions and 366 deletions

View File

@ -4,33 +4,17 @@
<el-row :gutter="22"> <el-row :gutter="22">
<el-col :span="10"> <el-col :span="10">
<div class="system-role-padding layout-padding-auto layout-padding-view"> <div class="system-role-padding layout-padding-auto layout-padding-view">
<el-table :data="state.disasterData.data" <el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
v-loading="state.disasterData.loading" highlight-current-row @row-click="tableClick">
style="width: 100%" <el-table-column type="index" label="ID" width="50" />
highlight-current-row <el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
@row-click="tableClick"> <el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
<el-table-column type="index" <el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
label="ID"
width="50" />
<el-table-column prop="disasterType"
label="Disaster type"
show-overflow-tooltip></el-table-column>
<el-table-column prop="disasterCountry"
label="disaster country"
show-overflow-tooltip></el-table-column>
<el-table-column prop="disasterTime"
label="disaster time"
show-overflow-tooltip></el-table-column>
</el-table> </el-table>
<el-pagination @size-change="onHandleDisasterSizeChange" <el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
@current-change="onHandleDisasterCurrentChange" class="mt15" :pager-count="5" :page-sizes="[10, 20, 30]"
class="mt15" v-model:current-page="state.disasterData.param.pageNum" background
:pager-count="5" v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next, jumper"
:page-sizes="[10, 20, 30]"
v-model:current-page="state.disasterData.param.pageNum"
background
v-model:page-size="state.disasterData.param.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="state.disasterData.total"> :total="state.disasterData.total">
</el-pagination> </el-pagination>
</div> </div>
@ -38,10 +22,11 @@
<el-col :span="14"> <el-col :span="14">
<div class="system-role-padding layout-padding-auto layout-padding-view"> <div class="system-role-padding layout-padding-auto layout-padding-view">
<div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;"> <div class="system-user-search mb15" style="display: flex;margin-left: 10px;margin-top: 10px;">
<el-select v-model="state.searchName" placeholder="please select data type" style="max-width: 200px" size="default" clearable> <el-select v-model="state.searchName" placeholder="please select data type" style="max-width: 200px"
<el-option value="1" label="basic data"></el-option> size="default" clearable>
<el-option value="2" label="responded report"></el-option> <el-option value="0" label="basic data"></el-option>
<el-option value="3" label="cartographic product"></el-option> <el-option value="1" label="responded report"></el-option>
<el-option value="2" label="cartographic product"></el-option>
</el-select> </el-select>
<el-button size="default" type="primary" class="ml10" @click="getTableData"> <el-button size="default" type="primary" class="ml10" @click="getTableData">
<el-icon> <el-icon>
@ -62,58 +47,36 @@
batch delete batch delete
</el-button> </el-button>
</div> </div>
<el-table :data="state.tableData.data" <el-table :data="state.tableData.data" v-loading="state.tableData.loading"
v-loading="state.tableData.loading" @selection-change="handleSelectionChange" style="width: 100%">
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" <el-table-column type="index" label="ID" width="50" />
label="ID" <el-table-column prop="uploaderName" label="uploader Name" show-overflow-tooltip></el-table-column>
width="50" /> <el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
<el-table-column prop="uploaderName" <el-table-column prop="title" label="Professional title" show-overflow-tooltip
label="uploader Name" width="150"></el-table-column>
show-overflow-tooltip></el-table-column> <el-table-column prop="size" label="Data size" show-overflow-tooltip>
<el-table-column prop="sourceOrganization"
label="Organization"
show-overflow-tooltip></el-table-column>
<el-table-column prop="title"
label="Professional title"
show-overflow-tooltip width="150"></el-table-column>
<el-table-column prop="size"
label="Data size"
show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
{{ formatSizeUnits(scope.row.size) }} {{ formatSizeUnits(scope.row.size) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="uploadTime" <el-table-column prop="uploadTime" label="Upload time" show-overflow-tooltip></el-table-column>
label="Upload time" <el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
show-overflow-tooltip></el-table-column>
<el-table-column prop="Operate"
label="Operate"
show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-button size="small" text type="primary" @click="del(scope.row)">Delete</el-button> <el-button size="small" text type="primary" @click="del(scope.row)">Delete</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination @size-change="onHandleSizeChange" <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
@current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background
class="mt15" v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next, jumper"
:pager-count="5"
:page-sizes="[10, 20, 30]"
v-model:current-page="state.tableData.param.pageNum"
background
v-model:page-size="state.tableData.param.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="state.tableData.total"> :total="state.tableData.total">
</el-pagination> </el-pagination>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-config-provider> </el-config-provider>
<RoleDialog ref="roleDialogRef" <RoleDialog ref="roleDialogRef" @refresh="getTableData()" />
@refresh="getTableData()" />
<Upload ref="uploadRef" @callback="getTableData" /> <Upload ref="uploadRef" @callback="getTableData" />
</div> </div>
</template> </template>
@ -213,6 +176,8 @@ const getDisasterData = () => {
const getTableData = () => { const getTableData = () => {
state.tableData.loading = true; state.tableData.loading = true;
getOtherDataPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "disasterId": state.disasterId, "type": state.searchName, "isDeleted": 0 }).then(res => { getOtherDataPage(state.tableData.param.pageNum, state.tableData.param.pageSize, { "disasterId": state.disasterId, "type": state.searchName, "isDeleted": 0 }).then(res => {
console.log(res);
state.tableData.data = res.records; state.tableData.data = res.records;
state.tableData.total = res.total; state.tableData.total = res.total;
}) })
@ -306,6 +271,7 @@ onMounted(() => {
.system-role-container { .system-role-container {
.system-role-padding { .system-role-padding {
padding: 15px; padding: 15px;
.el-table { .el-table {
flex: 1; flex: 1;
} }

View File

@ -14,8 +14,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="checked"> <el-form-item label="checked" style="margin-left: 10px;">
<el-select size="default" v-model="state.query.status" clearable <el-select size="default" v-model="state.query.status" clearable style="max-width: 180px"
placeholder="Replied"> placeholder="Replied">
<el-option label="UnReplied" :value="0"></el-option> <el-option label="UnReplied" :value="0"></el-option>
<el-option label="Replied" :value="1"></el-option> <el-option label="Replied" :value="1"></el-option>

View File

@ -4,33 +4,17 @@
<el-row :gutter="22"> <el-row :gutter="22">
<el-col :span="10"> <el-col :span="10">
<div class="system-role-padding layout-padding-auto layout-padding-view"> <div class="system-role-padding layout-padding-auto layout-padding-view">
<el-table :data="state.disasterData.data" <el-table :data="state.disasterData.data" v-loading="state.disasterData.loading" style="width: 100%"
v-loading="state.disasterData.loading" highlight-current-row @row-click="tableClick">
style="width: 100%" <el-table-column type="index" label="ID" width="50" />
highlight-current-row <el-table-column prop="disasterType" label="Disaster type" show-overflow-tooltip></el-table-column>
@row-click="tableClick"> <el-table-column prop="disasterCountry" label="disaster country" show-overflow-tooltip></el-table-column>
<el-table-column type="index" <el-table-column prop="disasterTime" label="disaster time" show-overflow-tooltip></el-table-column>
label="ID"
width="50" />
<el-table-column prop="disasterType"
label="Disaster type"
show-overflow-tooltip></el-table-column>
<el-table-column prop="disasterCountry"
label="disaster country"
show-overflow-tooltip></el-table-column>
<el-table-column prop="disasterTime"
label="disaster time"
show-overflow-tooltip></el-table-column>
</el-table> </el-table>
<el-pagination @size-change="onHandleDisasterSizeChange" <el-pagination @size-change="onHandleDisasterSizeChange" @current-change="onHandleDisasterCurrentChange"
@current-change="onHandleDisasterCurrentChange" class="mt15" :pager-count="5" :page-sizes="[10, 20, 30]"
class="mt15" v-model:current-page="state.disasterData.param.pageNum" background
:pager-count="5" v-model:page-size="state.disasterData.param.pageSize" layout="total, sizes, prev, pager, next, jumper"
:page-sizes="[10, 20, 30]"
v-model:current-page="state.disasterData.param.pageNum"
background
v-model:page-size="state.disasterData.param.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="state.disasterData.total"> :total="state.disasterData.total">
</el-pagination> </el-pagination>
</div> </div>
@ -45,59 +29,36 @@
batch audit batch audit
</el-button> </el-button>
</div> </div>
<el-table :data="state.tableData.data" <el-table :data="state.tableData.data" v-loading="state.tableData.loading"
v-loading="state.tableData.loading" @selection-change="handleSelectionChange" style="width: 100%">
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" <el-table-column type="index" label="ID" width="50" />
label="ID" <el-table-column prop="uploaderName" label="uploader Name" show-overflow-tooltip></el-table-column>
width="50" /> <el-table-column prop="sourceOrganization" label="Organization" show-overflow-tooltip></el-table-column>
<el-table-column prop="uploaderName" <el-table-column prop="title" label="Professional title" show-overflow-tooltip
label="uploader Name"
show-overflow-tooltip></el-table-column>
<el-table-column prop="sourceOrganization"
label="Organization"
show-overflow-tooltip></el-table-column>
<el-table-column prop="title"
label="Professional title"
show-overflow-tooltip
width="150"></el-table-column> width="150"></el-table-column>
<el-table-column prop="size" <el-table-column prop="size" label="Data size" show-overflow-tooltip>
label="Data size"
show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
{{ formatSizeUnits(scope.row.size) }} {{ formatSizeUnits(scope.row.size) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="uploadTime" <el-table-column prop="uploadTime" label="Upload time" show-overflow-tooltip></el-table-column>
label="Upload time" <el-table-column prop="Operate" label="Operate" show-overflow-tooltip>
show-overflow-tooltip></el-table-column>
<el-table-column prop="Operate"
label="Operate"
show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-button size="small" text type="primary" @click="auditData(scope.row)">Audit</el-button> <el-button size="small" text type="primary" @click="auditData(scope.row)">Audit</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination @size-change="onHandleSizeChange" <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
@current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background
class="mt15" v-model:page-size="state.tableData.param.pageSize" layout="total, sizes, prev, pager, next, jumper"
:pager-count="5"
:page-sizes="[10, 20, 30]"
v-model:current-page="state.tableData.param.pageNum"
background
v-model:page-size="state.tableData.param.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="state.tableData.total"> :total="state.tableData.total">
</el-pagination> </el-pagination>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-config-provider> </el-config-provider>
<RoleDialog ref="roleDialogRef" <RoleDialog ref="roleDialogRef" @refresh="getTableData()" />
@refresh="getTableData()" />
<Audit ref="auditRef" @callback="getTableData" /> <Audit ref="auditRef" @callback="getTableData" />
</div> </div>
</template> </template>
@ -274,6 +235,7 @@ onMounted(() => {
.system-role-container { .system-role-container {
.system-role-padding { .system-role-padding {
padding: 15px; padding: 15px;
.el-table { .el-table {
flex: 1; flex: 1;
} }

View File

@ -14,7 +14,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="checked"> <el-form-item label="checked" style="margin-left: 10px;">
<el-select size="default" v-model="state.query.checked" clearable <el-select size="default" v-model="state.query.checked" clearable
placeholder="Please select"> placeholder="Please select">
<el-option label="checked" value="0"></el-option> <el-option label="checked" value="0"></el-option>

View File

@ -85,7 +85,6 @@
{{ dateFormat(scope.row.disasterTime) }} {{ dateFormat(scope.row.disasterTime) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="chiefName" label="Answer" show-overflow-tooltip></el-table-column>
<!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> --> <!-- <el-table-column prop="responseTime" label="Response time" show-overflow-tooltip></el-table-column> -->
<!-- <el-table-column prop="Operate" label="Operate" show-overflow-tooltip></el-table-column> --> <!-- <el-table-column prop="Operate" label="Operate" show-overflow-tooltip></el-table-column> -->
<el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip> <el-table-column prop="respondStatus" label="Response status" show-overflow-tooltip>
@ -97,11 +96,24 @@
</el-table-column> </el-table-column>
<el-table-column prop="Operate" label="Operate" show-overflow-tooltip> <!-- <el-table-column prop="describe" label="角色描述" show-overflow-tooltip></el-table-column>
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column> -->
<!-- <el-table-column prop="status" label="角色状态" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<el-button size="small" text type="primary" @click="onAllocation(scope.row)">Allocation</el-button> <el-tag type="success" v-if="scope.row.status">启用</el-tag>
<el-tag type="info" v-else>禁用</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100">
<template #default="scope">
<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" text type="primary" @click="onOpenEditRole('edit', scope.row)"
>修改</el-button
>
<el-button :disabled="scope.row.roleName === '超级管理员'" size="small" text type="primary" @click="onRowDel(scope.row)"
>删除</el-button
>
</template>
</el-table-column> -->
</el-table> </el-table>
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15" <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.current" background
@ -111,19 +123,19 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<el-dialog v-model="state.dialogVisible" title="Review" width="30%"> <el-dialog v-model="state.dialogVisible" title="Review" width="30%" :before-close="handleClose">
<el-container style="margin-top: -2%;margin-bottom: 2%;"> <el-container style="margin-top: -2%;margin-bottom: 2%;">
<el-radio v-model="state.radio" label='1' @click="mapEvents('1')">Point</el-radio> <el-radio v-model="state.radio" label='1'>Point</el-radio>
<el-radio v-model="state.radio" label='2' @click="mapEvents('2')">Area</el-radio> <el-radio v-model="state.radio" label='2'>Area</el-radio>
<el-button type="primary" style="margin-left: 5%;">Clear</el-button> <el-button type="primary" style="margin-left: 5%;">Clear</el-button>
</el-container> </el-container>
<el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio==='1'?true:false"> <el-container style="margin-top: 2%;margin-bottom: 2%;" v-if="state.radio==='1'?true:false">
<span style="line-height: 35px;"> Latitude</span> <span style="line-height: 35px;"> Latitude</span>
<el-input placeholder="wait……" style="height:35px;margin-right: 1%;" v-model="state.dislat" readonly="readonly"> </el-input> <el-input placeholder="请输入内容" style="height:35px;margin-right: 1%;" v-model="state.dislat"></el-input>
<span style="line-height: 35px;">Longitude</span> <span style="line-height: 35px;">Longitude</span>
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input> <el-input placeholder="请输入内容" style="height:35px;" ></el-input>
</el-container> </el-container>
<Map style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></Map> <Map style="height:350px ; width:100% ;margin-bottom: 10px;" ref="map"></Map>
<el-form-item label="Disaster Time"> <el-form-item label="Disaster Time">
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD" <el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
placeholder="Select date and time" /> placeholder="Select date and time" />
@ -141,40 +153,30 @@
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<selectUser ref ="select" @callback="getTableData"></selectUser>
</el-config-provider> </el-config-provider>
</div> </div>
</template> </template>
<script setup name="userResponse"> <script setup name="userResponse">
import en from 'element-plus/dist/locale/en.mjs' import en from 'element-plus/dist/locale/en.mjs'
import '@geoman-io/leaflet-geoman-free';
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
import { reactive, onMounted, ref, nextTick,watchEffect } from 'vue'; import { reactive, onMounted, ref, nextTick,watchEffect } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus'; import { ElMessageBox, ElMessage } from 'element-plus';
import { getList, review } from '/@/api/disasterInfo/index'; import { getList, review } from '/@/api/disasterInfo/index';
import { getDictionary } from '/@/api/system/dictbiz'; import { getDictionary } from '/@/api/system/dictbiz';
import { useVariableStore } from '/@/stores/index.ts'
// //
import Map from '/@/components/Map.vue'; import Map from '/@/components/Map.vue';
import { useDateFormat } from '@vueuse/shared'; import { useDateFormat } from '@vueuse/shared';
import selectUser from './component/selectUser.vue';
import L from "leaflet"; import L from "leaflet";
import "leaflet/dist/leaflet.css"; import "leaflet/dist/leaflet.css";
import 'leaflet-draw/dist/leaflet.draw' import 'leaflet-draw/dist/leaflet.draw'
import 'leaflet-draw/dist/leaflet.draw.css' import 'leaflet-draw/dist/leaflet.draw.css'
import { map } from 'lodash'; const map = ref();
const variableStore = useVariableStore();
const mapRef = ref();
const activeName = ref('first'); const activeName = ref('first');
const select = ref();
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
state.selectName = tab.props.name; state.selectName = tab.props.name;
getTableData(); getTableData();
}; };
const onAllocation = (row) => {
select.value.openDialog(row)
};
const dateFormat = (date) => { const dateFormat = (date) => {
return useDateFormat(date, 'YYYY-MM-DD').value; return useDateFormat(date, 'YYYY-MM-DD').value;
} }
@ -198,8 +200,7 @@ const state = reactive({
edit: {}, edit: {},
radio:null, radio:null,
dislat:'', dislat:'',
dislon:'', dislon:''
wktPoint:undefined
}); });
// //
const getTableData = () => { const getTableData = () => {
@ -210,6 +211,7 @@ const getTableData = () => {
} else { } else {
state.tableData.param.respondStatus = 2; state.tableData.param.respondStatus = 2;
} }
console.log(activeName.value);
getList(state.tableData.param).then((res) => { getList(state.tableData.param).then((res) => {
state.tableData.data = res.records; state.tableData.data = res.records;
state.tableData.total = res.total; state.tableData.total = res.total;
@ -223,55 +225,25 @@ const onHandleSizeChange = (val) => {
const onOpenEditRole = (type, row) => { const onOpenEditRole = (type, row) => {
// //
state.edit = JSON.parse(JSON.stringify(row)); state.edit = JSON.parse(JSON.stringify(row));
state.dialogVisible = true;
nextTick(() => { nextTick(() => {
state.radio = "1" console.log(map.value);
// mapRef.value.mapOperations.removeAll()
// //
if(state.wktPoint){ //TODO
mapRef.value.mapOperations.removeLayer( state.wktPoint) map.mapOperations.wktParseToMap(row.geometry)
}
state.wktPoint= mapRef.value.mapOperations.wktParseToMap(row.geometry)
// mapRef.value.mapOperations.on("click", (res)=>{
// mapRef.value.mapOperations.clearPolygon()
// mapRef.value.mapOperations.removeLayer( state.wktPoint)
// mapRef.value.mapOperations.addInteractMarker(res.latlng.lat, res.latlng.lng)
// })
mapEvents('1')
}); });
state.dialogVisible = true;
}; };
const mapEvents = (ev)=>{
if(ev == '1'){
mapRef.value.mapOperations.clearPolygon()
mapRef.value.mapOperations.on("click", mapClick)
mapRef.value.mapOperations.on("mousemove", changelatlon)
}else{
mapRef.value.mapOperations.off("click",mapClick);
mapRef.value.mapOperations.drawPolygon()
mapRef.value.mapOperations.drawCreated()
}
};
const mapClick=(res)=>{
mapRef.value.mapOperations.removeLayer( state.wktPoint)
changelatlon(res);
mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3))
}
const reviews = (index) => { const reviews = (index) => {
//state.edit.geometry //state.edit.geometry
//TODO //TODO
//state.edit.geometry = map.mapOperations.getWkt(); //state.edit.geometry = map.mapOperations.getWkt();
//index //index
if (index === 1) { if (index === 1) {
state.edit.respondStatus = 1; state.edit.respondStatus = 1;
} else { } else {
state.edit.respondStatus = 2; state.edit.respondStatus = 2;
} }
state.edit.geometry = variableStore.layerGroupPoint === null ? variableStore.layerGroupPoly : variableStore.layerGroupPoint;
// //
state.edit.disasterTime = useDateFormat(state.edit.disasterTime, 'YYYY-MM-DD').value + " 00:00:00"; state.edit.disasterTime = useDateFormat(state.edit.disasterTime, 'YYYY-MM-DD').value + " 00:00:00";
review(state.edit).then((res) => { review(state.edit).then((res) => {
@ -282,19 +254,20 @@ const reviews = (index) => {
} }
// //
const onHandleCurrentChange = (val) => { const onHandleCurrentChange = (val) => {
console.log(val);
state.tableData.param.pageNum = val; state.tableData.param.pageNum = val;
getTableData(); getTableData();
}; };
const onMapClick = (e) => { const onMapClick = (e) => {
state.lat = e.latlng.lat.toFixed(3); state.lat = e.latlng.lat.toFixed(3);
state.lon = e.latlng.lng.toFixed(3); state.lon = e.latlng.lng.toFixed(3);
map.value.mapOperations.addInteractMarker(state.lat, state.lon)
mapRef.value.mapOperations.addInteractMarker(state.lat, state.lon)
} }
const changelatlon = (e) => { const changelatlon = (e) => {
//e
state.dislat = e.latlng.lat.toFixed(3); state.dislat = e.latlng.lat.toFixed(3);
state.dislon = e.latlng.lng.toFixed(3); state.dislon = e.latlng.lng.toFixed(3);
// state.lon = state.lon % 360;
// if (state.lon < 0) { // if (state.lon < 0) {
// state.lon = state.lon + 360; // state.lon = state.lon + 360;
// } // }
@ -342,13 +315,13 @@ onMounted(() => {
}); });
watchEffect(() => { watchEffect(() => {
if (state.radio== "1") { if (state.radio== "1") {
// mapRef.value.mapOperations.on("click", onMapClick) // map.value.mapOperations.on("click", onMapClick)
// map.value.mapOperations.clearPolygon() // map.value.mapOperations.clearPolygon()
// map.value.mapOperations.on("mousemove", changelatlon) // map.value.mapOperations.on("mousemove", changelatlon)
// variableStore.polygoncontrol = "option1" // variableStore.polygoncontrol = "option1"
} }
else { else {
// mapRef.value.mapOperations.off("click", onMapClick) // map.value.mapOperations.off("click", onMapClick)
// map.value.mapOperations.drawPolygon() // map.value.mapOperations.drawPolygon()
// map.value.mapOperations.drawCreated() // map.value.mapOperations.drawCreated()
// variableStore.polygoncontrol = "option2" // variableStore.polygoncontrol = "option2"