master
2022-04-20 7f1640ad12c63b692a8a4a7deaef46768adde198
新增告警、模型文件上传等页面
1个文件已修改
9个文件已添加
337 ■■■■■ 已修改文件
public/hn3d/example/00_hn_new.html 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/doulunji/views/doulunji_message.vue 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/warnning/components/index.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/warnning/directives/index.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/warnning/index.ts 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/warnning/pages/index.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/warnning/service/index.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/warnning/store/index.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/warnning/views/index.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/cool/modules/warnning/views/warnning_log.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/hn3d/example/00_hn_new.html
@@ -36,6 +36,10 @@
      width: 120px;
      text-align: center
    }
    .disable {
      pointer-events: none;
    }
  </style>
</head>
@@ -60,9 +64,7 @@
    <button type="button" id="meipeng_pati_madao" class="btn btn-primary" style="width: 100%;">爬梯马道</button>
    <button type="button" id="meipeng_tiejia" class="btn btn-primary" style="width: 100%;">钢结构架</button>
    <button type="button" id="meipeng_dimian" class="btn btn-primary" style="width: 100%;">煤棚地面</button>
    <!-- <button type="button" id="dou_move" class="btn btn-primary" style="width: 100%;">移动</button>
    <button type="button" id="dou_rote" class="btn btn-primary" style="width: 100%;">旋转</button>
    <button type="button" id="dou_work" class="btn btn-primary" style="width: 100%;">挖煤</button> -->
    <button type="button" id="test_btn" class="btn btn-primary" style="width: 100%;">测试</button>
    <button type="button" id="point_btn" class="btn btn-primary" style="width: 100%;">煤堆</button>
  </div>
@@ -362,6 +364,7 @@
      // 请求数据库数据,对斗轮机模型进行操作
      $("#test_btn").click(function () {
        $("#test_btn").addClass("disable");
        console.log(dou_params)
        if (model_no < dou_params.length - 1) {
          model_no++
@@ -371,6 +374,9 @@
        let item = dou_params[model_no]
        console.log(item)
        dou_move(item.longitude, item.latitude, item.elevation, item.heading_angle)
        setTimeout(function () {
          $("#test_btn").removeClass("disable");
        }, 5000);
      })
@@ -506,7 +512,7 @@
      $("#point_btn").click(function () {
        var data_path = 'http://112.74.77.127:9100/hn/pointcloud/hn4.txt'
        var data_path = 'http://112.74.77.127:9100/hn/pointcloud/hn.txt'
        console.log("我点击了")
        $.ajax({
          url: data_path,
src/cool/modules/doulunji/views/doulunji_message.vue
New file
@@ -0,0 +1,206 @@
<template>
  <cl-crud :ref="setRefs('crud')"
           @load="onLoad">
    <el-row type="flex"
            align="middle">
      <!-- 刷新按钮 -->
      <cl-refresh-btn />
      <!-- 新增按钮 -->
      <cl-add-btn />
      <!-- 删除按钮 -->
      <cl-multi-delete-btn />
      <cl-flex1 />
      <!-- 关键字搜索 -->
      <cl-search-key />
    </el-row>
    <el-row>
      <!-- 数据表格 -->
      <cl-table :ref="setRefs('table')"
                v-bind="table" />
    </el-row>
    <el-row type="flex">
      <cl-flex1 />
      <!-- 分页控件 -->
      <cl-pagination />
    </el-row>
    <!-- 新增、编辑 -->
    <cl-upsert :ref="setRefs('upsert')"
               v-bind="upsert" />
  </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: [
                {
                    label: "逻辑ID",
                    prop: "logic_id",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "设备名称",
                    prop: "name",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "模型文件",
                    prop: "data_path",
                    component: {
                        name: "cl-upload"
                    }
                },
                {
                    label: "经度",
                    prop: "longitude",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "纬度",
                    prop: "latitude",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "高度",
                    prop: "height",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "旋转角",
                    prop: "heading",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "俯仰角",
                    prop: "peatch",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "横滚角",
                    prop: "roll",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "备注",
                    prop: "remark",
                    component: {
                        name: "el-input"
                    }
                },
                {
                    label: "状态",
                    prop: "status",
                    component: {
                        name: "el-input"
                    }
                }
            ]
        });
        // 表格配置
        const table = reactive<Table>({
            columns: [
                {
                    label: "id",
                    prop: "id"
                },
                {
                    label: "模型名称",
                    prop: "name"
                },
                {
                    label: "路径信息",
                    prop: "data_path"
                },
                {
                    label: "经度",
                    prop: "longitude"
                },
                {
                    label: "纬度",
                    prop: "latitude"
                },
                {
                    label: "高度",
                    prop: "height"
                },
                {
                    label: "旋转角",
                    prop: "heading"
                },
                {
                    label: "翻滚角",
                    prop: "roll"
                },
                {
                    label: "俯仰角",
                    prop: "peatch"
                },
                {
                    label: "缩放比例",
                    prop: "scale"
                },
                {
                    label: "路径信息",
                    prop: "data_path"
                },
                {
                    label: "备注",
                    prop: "remark"
                },
                {
                    label: "状态",
                    prop: "status"
                },
                {
                    label: "操作",
                    type: "op"
                }
            ]
        });
        // crud 加载
        function onLoad({ ctx, app }: CrudLoad) {
            // 绑定 service
            ctx.service(service.business.modelstatic).done();
            app.refresh();
        }
        return {
            refs,
            setRefs,
            upsert,
            table,
            onLoad
        };
    }
});
</script>
src/cool/modules/warnning/components/index.ts
New file
@@ -0,0 +1 @@
export default {};
src/cool/modules/warnning/directives/index.ts
New file
@@ -0,0 +1 @@
export default {};
src/cool/modules/warnning/index.ts
New file
@@ -0,0 +1,15 @@
import components from "./components";
import directives from "./directives";
import service from "./service";
import store from "./store";
import pages from "./pages";
import views from "./views";
export default {
    components,
    directives,
    service,
    store,
    pages,
    views
};
src/cool/modules/warnning/pages/index.ts
New file
@@ -0,0 +1 @@
export default [];
src/cool/modules/warnning/service/index.ts
New file
@@ -0,0 +1 @@
export default {};
src/cool/modules/warnning/store/index.ts
New file
@@ -0,0 +1 @@
export default {};
src/cool/modules/warnning/views/index.ts
New file
@@ -0,0 +1 @@
export default [];
src/cool/modules/warnning/views/warnning_log.vue
New file
@@ -0,0 +1,96 @@
<template>
  <cl-crud :ref="setRefs('crud')"
           @load="onLoad">
    <el-row type="flex"
            align="middle">
      <!-- 刷新按钮 -->
      <cl-refresh-btn />
      <!-- 新增按钮 -->
      <cl-add-btn />
      <!-- 删除按钮 -->
      <cl-multi-delete-btn />
      <cl-flex1 />
      <!-- 关键字搜索 -->
      <cl-search-key />
    </el-row>
    <el-row>
      <!-- 数据表格 -->
      <cl-table :ref="setRefs('table')"
                v-bind="table" />
    </el-row>
    <el-row type="flex">
      <cl-flex1 />
      <!-- 分页控件 -->
      <cl-pagination />
    </el-row>
    <!-- 新增、编辑 -->
    <cl-upsert :ref="setRefs('upsert')"
               v-bind="upsert" />
  </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: [
                {
                    label: "告警类型",
                    prop: "alarm_type"
                },
                {
                    label: "告警时间",
                    prop: "report_time"
                },
                {
                    label: "告警内容",
                    prop: "report_content"
                },
                {
                    label: "备注",
                    prop: "remark"
                },
                {
                    label: "状态",
                    prop: "status"
                },
                {
                    label: "操作",
                    type: "op"
                }
            ]
        });
        // crud 加载
        function onLoad({ ctx, app }: CrudLoad) {
            // 绑定 service
            ctx.service(service.business.alarm).done();
            app.refresh();
        }
        return {
            refs,
            setRefs,
            upsert,
            table,
            onLoad
        };
    }
});
</script>