master
2022-04-13 59ae5ac861f67e2969c2b6337d88faba88c0bb56
将模型界面导入,实现模型和参数动态加载
2个文件已修改
1个文件已添加
71 ■■■■■ 已修改文件
public/hn3d/example/00_hn_new.html 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/base/views/hn_model.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/basedevice/views/basedevice_info.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/hn3d/example/00_hn_new.html
@@ -107,7 +107,7 @@
        },
        url: `${data_url}get_dou_params`,
        success: function (data) {
          console.log(data)
          console.log(data, "ajax_data")
          dou_params = data.data
        },
        error: function (request, textStatus) {
@@ -264,7 +264,7 @@
        position: [121.406729, 31.467183, 14], // 楼栋位置
        style: {
          url: "../model/doulunji/dizuo/dizuo.gltf",
          url: "http://112.74.77.127:9100/hn/doulunji/dizuo/dizuo.gltf",
          scale: 0.6,
          heading: 120
        }
@@ -287,7 +287,7 @@
        position: [121.406729, 31.467183, 14], // 楼栋位置
        style: {
          url: "../model/doulun_0322/doulun_0322.gltf",
          url: "http://112.74.77.127:9100/hn/doulun_0322/doulun_0322.gltf",
          runAnimations: true,
          scale: 0.6
        },
@@ -300,7 +300,7 @@
        position: [121.406729, 31.467183, 14], // 楼栋位置
        style: {
          url: "../model/doulunji/zhuzhou/zhuzhou.gltf",
          url: "http://112.74.77.127:9100/hn/doulunji/zhuzhou/zhuzhou.gltf",
          heading: 0,
          scale: 0.6
        },
@@ -370,6 +370,7 @@
          model_no = 0
        }
        let item = dou_params[model_no]
        console.log(item)
        dou_move(item.longitude, item.latitude, item.elevation, item.heading_angle)
      })
src/cool/modules/base/views/hn_model.vue
New file
@@ -0,0 +1,56 @@
<template>
  <cl-crud :ref="setRefs('crud')"
           @load="onLoad">
    <iframe src="http://192.168.0.114:9100/public/hn3d/example/00_hn_new.html"
            id="ifr1"
            name="ifr1"
            scrolling="yes">
      <p>Your browser does not support iframes.</p>
    </iframe>
  </cl-crud>
</template>
<script lang="ts">
import { defineComponent, reactive } from "vue";
import { CrudLoad, Upsert, Table } from "@cool-vue/crud/types";
import { useCool } from "/@/cool";
export default defineComponent({
    setup() {
        const { refs, setRefs, service } = useCool();
        // 新增、编辑配置
        const upsert = reactive<Upsert>({
            items: []
        });
        // 表格配置
        const table = reactive<Table>({
            columns: []
        });
        // crud 加载
        function onLoad({ ctx, app }: CrudLoad) {
            // 绑定 service
            ctx.service(service.xx).done();
            app.refresh();
        }
        return {
            refs,
            setRefs,
            upsert,
            table,
            onLoad
        };
    }
});
</script>
<style lang="scss">
#ifr1 {
    width: 100%;
    height: 100%;
}
</style>
src/cool/modules/basedevice/views/basedevice_info.vue
@@ -156,6 +156,7 @@
                        name: "el-input"
                    }
                },
                {
                    label: "备注",
                    prop: "remark",
@@ -245,9 +246,10 @@
                    label: "账号",
                    prop: "device_account"
                },
                {
                    label: "负责人",
                    prop: "opertator"
                    label: "分组负责人",
                    prop: "configurator"
                },
                {
                    label: "备注",