| | |
| | | width="70%"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="showMap ? 12 : 24" :xs="24"> |
| | | <AppTable ref="AppTable" :showDeptSearch="false" :url="'device/towers/list'" :tableColumns="tableColumns" :showSearchBtn="false"> |
| | | <AppTable ref="AppTable" :showDeptSearch="false" :url="'tower/model/list'" :tableColumns="tableColumns" :showSearchBtn="false"> |
| | | <template #operator="{ row }"> |
| | | <el-button size="mini" type="text" |
| | | @click="clickRow(row)">预览</el-button> |
| | | <el-button size="mini" type="text" |
| | | @click="chooseRow(row)">选择</el-button> |
| | | </template> |
| | | <template #modelType="{ row }"> |
| | | <DictTag :options="dict.type.model_type" :value="row.modelType"></DictTag> |
| | | </template> |
| | | </AppTable> |
| | | </el-col> |
| | |
| | | import CesiumMap from "../../../../utils/components/cesium-map.vue"; |
| | | export default { |
| | | name:'chooseModelDialog', |
| | | dicts: ['model_type'], |
| | | components: { |
| | | CesiumMap |
| | | }, |
| | |
| | | tableColumns: [ |
| | | { |
| | | label: '模型名称', |
| | | prop: 'name' |
| | | prop: 'modelName' |
| | | }, |
| | | { |
| | | { |
| | | label: '模型类型', |
| | | prop: 'createBy' |
| | | type: 'slot', |
| | | slotName: 'modelType' |
| | | }, |
| | | { |
| | | label: '模型路径', |
| | | prop: 'createTime' |
| | | prop: 'modelRoute' |
| | | }, |
| | | { |
| | | label: '操作', |
| | |
| | | this.$emit('getRowData',row) |
| | | }, |
| | | clickRow(row){ |
| | | console.log(row) |
| | | this.showMap =true |
| | | setTimeout(()=>{ |
| | | const position = Cesium.Cartesian3.fromDegrees(0, 0, 0); |
| | |
| | | position: position, |
| | | orientation: orientation, |
| | | model: { |
| | | uri: "/Model/tower.glb", // 替换成你的模型路径 |
| | | uri: row.modelRoute, // 替换成你的模型路径 |
| | | scale: 1000, |
| | | }, |
| | | }); |