| | |
| | | width: 120px; |
| | | text-align: center |
| | | } |
| | | |
| | | .disable { |
| | | pointer-events: none; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | |
| | | <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> |
| | |
| | | |
| | | // 请求数据库数据,对斗轮机模型进行操作 |
| | | $("#test_btn").click(function () { |
| | | $("#test_btn").addClass("disable"); |
| | | console.log(dou_params) |
| | | if (model_no < dou_params.length - 1) { |
| | | model_no++ |
| | |
| | | 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); |
| | | }) |
| | | |
| | | |
| | |
| | | |
| | | |
| | | $("#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, |
| New file |
| | |
| | | <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>
|
| New file |
| | |
| | | export default {}; |
| New file |
| | |
| | | export default {}; |
| New file |
| | |
| | | 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 |
| | | }; |
| New file |
| | |
| | | export default []; |
| New file |
| | |
| | | export default {}; |
| New file |
| | |
| | | export default {}; |
| New file |
| | |
| | | export default []; |
| New file |
| | |
| | | <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>
|