gemercheung 1 anno fa
parent
commit
9eee4052fe
2 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 4 0
      src/views/map/addProjectModal.vue
  2. 3 0
      src/views/map/list.vue

+ 4 - 0
src/views/map/addProjectModal.vue

@@ -223,6 +223,10 @@
         if (!isEditMode.value) {
         if (!isEditMode.value) {
           delete pro.id;
           delete pro.id;
         }
         }
+        if (!pro.lat && !pro.lon) {
+          console.log('没有地理信息');
+          pro.isShow = 0;
+        }
         console.log('save', pro);
         console.log('save', pro);
         await AddOptOrUpdateApi(pro);
         await AddOptOrUpdateApi(pro);
         closeModal();
         closeModal();

+ 3 - 0
src/views/map/list.vue

@@ -5,8 +5,10 @@
         <a-button type="primary" @click="handleCreate">{{ t('layout.map.addPro') }}</a-button>
         <a-button type="primary" @click="handleCreate">{{ t('layout.map.addPro') }}</a-button>
       </template>
       </template>
       <template #isShow="{ record }">
       <template #isShow="{ record }">
+        <!-- gpsNum: {{ record.gpsNum }} -->
         <Switch
         <Switch
           :checked="record.isShow"
           :checked="record.isShow"
+          :disabled="record.lat === null && record.lon === null"
           :checkedValue="1"
           :checkedValue="1"
           :unCheckedValue="0"
           :unCheckedValue="0"
           @click="handleUpdateSwitch(record)"
           @click="handleUpdateSwitch(record)"
@@ -47,6 +49,7 @@
               label: t('common.delText'),
               label: t('common.delText'),
               tooltip: t('common.delText'),
               tooltip: t('common.delText'),
               popConfirm: {
               popConfirm: {
+                placement: 'left',
                 title: t('common.delConfirm'),
                 title: t('common.delConfirm'),
                 confirm: handleDelete.bind(null, record),
                 confirm: handleDelete.bind(null, record),
               },
               },