jihongshun
2025-07-18 d8662fba10c3aab8366f46a216b9c2fc615901d2
src/views/system/shootPoint/index.vue
@@ -2,15 +2,15 @@
  <div class="app-container">
     <el-row :gutter="20">
       <el-col :span="showMap ? 12 : 24" :xs="24">
        <AppTable ref="AppTable" selection :showDeptSearch="false" :url="'device/towers/list'" :tableColumns="tableColumns"
          :tableFilter="tableFilter"  @clickRow="clickRow">
        <AppTable ref="AppTable" selection :showDeptSearch="false" :url="'tower/point/list'" :tableColumns="tableColumns"
          :tableFilter="tableFilter">
          <template #operatorBox="{ row }">
            <el-button type="primary" plain icon="el-icon-plus" size="mini"
              @click="handleAdd">新增模型</el-button>
              @click="handleAdd">新增模板</el-button>
          </template>
          <template #operator="{ row }">
            <el-button size="mini" type="text" icon="el-icon-edit"
              @click="handleUpdate(row)">修改</el-button>
            <el-button size="mini" type="text" icon="el-icon-view"
              @click="preview(row)">预览</el-button>
            <el-button size="mini" type="text" icon="el-icon-delete"
              @click="handleDelete(row)">删除</el-button>
          </template>
@@ -21,7 +21,7 @@
       </el-col>
     </el-row>
    
    <shootPointDialog  v-if="showDialog" @close="close"></shootPointDialog>
    <shootPointDialog  @on-submit="$refs.AppTable.getData()"  v-if="showDialog" @close="close" :templateId="templateId"></shootPointDialog>
  </div>
</template>
@@ -30,7 +30,7 @@
import CesiumMap from "../../../utils/components/cesium-map.vue";
export default {
  name: "towers",
  dicts: ['model_type'],
  dicts: ['model_typpe'],
  components: {
    shootPointDialog,
    CesiumMap
@@ -45,16 +45,12 @@
      multiple: true,
      tableColumns: [
        {
          label: '模型名称',
          prop: 'name'
          label: '模板名称',
          prop: 'templateName'
        },
        {
          label: '模型类型',
          prop: 'createBy'
        },
        {
          label: '模型路径',
          prop: 'createTime'
          label: '模型ID',
          prop: 'modelId'
        },
        {
          label: '操作',
@@ -73,7 +69,8 @@
        }
      ],
      showMap:false,
      showDialog:false
      showDialog:false,
      templateId:null
    };
  },
  watch: {
@@ -85,6 +82,7 @@
  methods: {
    // 添加数据
    handleAdd() {
      this.templateId = null
      this.showMap  = false
      this.showDialog = true
      // this.$refs.shootPointDialog.show()
@@ -97,8 +95,9 @@
    // 删除数据
    handleDelete(row) {
      const ids = row.id || this.ids
      const name = row.name || ''
      this.$api.deleteByName('/work/tower', ids,name).then(res => {
      // const name = row.name || ''
      const name = ids
      this.$api.deleteByName('/tower/point', ids,name).then(res => {
        this.$refs.AppTable.getData()
      })
    },
@@ -106,12 +105,17 @@
    handleExport() {
      this.$refs.AppTable.exportExcel()
    },
    clickRow(row){
      console.log(row)
      this.showMap =true
    },
    // clickRow(row){
    //   console.log(row)
    //   this.showMap =true
    // },
    close(){
      this.showDialog =false
    },
    preview(row){
      console.log(row)
      this.templateId = row.id
      this.showDialog = true
    }
  },
};