@@ -19,6 +19,7 @@
class="checkbox-group"
v-model="checkedChildren"
@change="handleCheckedChange"
+ :min="1"
>
<el-checkbox v-for="item in childrenData" :key="item" :label="item" :value="item">
{{ item }}
@@ -184,7 +184,7 @@ export function parseMultiPolygon(multipolygonStr,type="MULTIPOLYGON") {
return result;
}
-//POINT (113.61702297075017 23.584863449735067) 转换为 113.61702297075017,23.584863449735067 方法
+//POINT (113.61702297075017 23.584863449735067) 转换为 [113.61702297075017,23.584863449735067] 方法
export function convertPointToArray(pointString) {
// 去除字符串两端的空格(如果有的话)
pointString = pointString.trim();
@@ -203,4 +203,4 @@ export function convertPointToArray(pointString) {
// 如果没有匹配到,返回原始字符串或抛出错误(根据需要)
return pointString; // 或者 throw new Error('Invalid point string format');
- }
+}
@@ -123,6 +123,7 @@ const reportData = ref([])
const curIndex = ref(0)
const handleActive = ({index,key}) =>{
+ if(index===-1) return
curIndex.value = index
if(key==='物候指标'){
phenologyObj.value = handleData('物候指标')
@@ -61,7 +61,10 @@ watch(()=>props.list,(newValue,oldValue)=>{
watch(()=>props.active,(newValue,oldValue)=>{
if(newValue){
const index = props.list.findIndex(item =>item===newValue)
- active.value = index
+ if(index!==-1){
+ active.value = index
+ handleActive(newValue,index)
+ }
})
</script>
@@ -201,6 +201,7 @@ const handleTab = async ({name,id,isUpdate,params}) =>{
}else{
+ console.log('456456');
getFarmIndexReport((()=>{
if(isUpdate){
handleTabItem(params)
@@ -223,6 +224,7 @@ function areaId({areaId,farmId}){
//选项卡子项事件监听
const handleTabItem = (e) =>{
+ console.log('e',e);
if(reportData.value.blueZoneList){
const index = reportData.value.blueZoneList.findIndex(item => item.key===e)
let arr = []
@@ -170,7 +170,6 @@ sessionStorage.removeItem("farmId")
const hideChatMapLayer = ref(true)
const handleMapLayer = ({mapName}) => {
hideChatMapLayer.value = false
- console.log('mapName', mapName);
staticMapPointLayers.hidePoint()
staticMapLayers.hideAll()
@@ -24,7 +24,6 @@ class HomeMap {
let level = 9;
let coordinate = util.wktCastGeom(location).getFirstCoordinate();
this.kmap = new KMap.Map(target, level, coordinate[0], coordinate[1], null, 9, 22);
- eventBus.emit('warningMap:init', this.kmap);
this.addMapListen()
// 添加比例尺控件
const scaleLine = new ScaleLine({