| | |
| | | <template> |
| | | <div> |
| | | 项目管理页面 |
| | | <div class="app-container"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span=24 :xs="24"> |
| | | <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> |
| | | </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-delete" |
| | | @click="handleDelete(row)">删除</el-button> |
| | | </template> |
| | | </AppTable> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <addPorjectDialog v-if="showDialog" @close="close"></addPorjectDialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import addPorjectDialog from './components/addPorjectDialog.vue'; |
| | | import CesiumMap from "../../../utils/components/cesium-map.vue"; |
| | | export default { |
| | | name: "towers", |
| | | dicts: ['model_typpe'], |
| | | components: { |
| | | addPorjectDialog, |
| | | CesiumMap |
| | | }, |
| | | data() { |
| | | return { |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | tableColumns: [ |
| | | { |
| | | label: '模型名称', |
| | | prop: 'name' |
| | | }, |
| | | { |
| | | label: '模型类型', |
| | | prop: 'createBy' |
| | | }, |
| | | { |
| | | label: '模型路径', |
| | | prop: 'createTime' |
| | | }, |
| | | { |
| | | label: '操作', |
| | | type: 'slot', |
| | | slotName: 'operator', |
| | | width: '330px' |
| | | }, |
| | | ], |
| | | tableFilter: [ |
| | | { |
| | | title: '项目名称', |
| | | placeholder: '请输入项目名称', |
| | | fieldName: 'name', |
| | | clearable: true, |
| | | type: 'search', |
| | | } |
| | | ], |
| | | showMap:false, |
| | | showDialog:false |
| | | }; |
| | | }, |
| | | watch: { |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | // 添加数据 |
| | | handleAdd() { |
| | | this.showMap = false |
| | | this.showDialog = true |
| | | // this.$refs.shootPointDialog.show() |
| | | }, |
| | | // 更新数据 |
| | | handleUpdate(row) { |
| | | const ids = row.id || this.ids |
| | | this.$refs.shootPointDialog.show(ids) |
| | | }, |
| | | // 删除数据 |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids |
| | | const name = row.name || '' |
| | | this.$api.deleteByName('/work/tower', ids,name).then(res => { |
| | | this.$refs.AppTable.getData() |
| | | }) |
| | | }, |
| | | // 导出表格数据 |
| | | handleExport() { |
| | | this.$refs.AppTable.exportExcel() |
| | | }, |
| | | // clickRow(row){ |
| | | // console.log(row) |
| | | // this.showMap =true |
| | | // }, |
| | | close(){ |
| | | this.showDialog =false |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .left-card { |
| | | height: calc(100vh - 105px); |
| | | overflow: auto; |
| | | } |
| | | |
| | | .right-card { |
| | | height: calc(100vh - 105px); |
| | | } |
| | | </style> |