import { i as n } from "./utils-4kGecFw2.js";
import { _ as r } from "./mount_head-c1OIlkSj.js";
import { n as e, c as i } from "./index-BcLRpF0n.js";
import "./index-YqpN0yec.js";
import "./index-CZypPRsn.js";
import "vue";
import "vue-clipboard2";
import "interactjs";
import "prismjs";
import "prismjs/themes/prism-okaidia.css";
import "@liveqing/liveplayer";
import "jquery";
import "mqtt/dist/mqtt";
import "vuex";
import "axios";
import "element-ui";
import "vue-router";
import "moment";
import "terraformer-wkt-parser";
import "dayjs";
import "file-saver";
import "nanoid";
import "jspack";
import "recorder-core";
import "recorder-core/src/engine/mp3";
import "recorder-core/src/engine/mp3-engine";
import "recorder-core/src/engine/pcm";
import "js-base64";
import "element-ui/lib/theme-chalk/index.css";
var t = {
  data: function data() {
    return {
      holderModelDomV2: 1,
      control_speed: 3,
      ptz_mode: 0,
      pitch: 0,
      yaw: 0,
      regList: [{
        val: "复位",
        num: 0
      }, {
        val: "30",
        num: -30
      }, {
        val: "60",
        num: -60
      }, {
        val: "90",
        num: -90
      }],
      drd: {
        ptz_mode: [{
          id: 0,
          label: "锁定"
        }, {
          id: 1,
          label: "跟随"
        }, {
          id: 2,
          label: "回中"
        }]
      },
      timer: null
    };
  },
  mounted: function mounted() {
    var _this = this;
    this.$nextTick(function () {
      _this.init_rocker();
    });
  },
  methods: {
    handle_change_ptz_mode: function handle_change_ptz_mode(r) {
      this.holderModelDomV2 = r;
      var e = n.gimbal_mode_ctrl(r);
      this.commit_directive(e);
    },
    handle_change_pitch: function handle_change_pitch(r) {
      this.pitch = r;
      var e = n.change_pitch_angle(this.pitch);
      this.commit_directive(e);
    },
    handle_change_yaw: function handle_change_yaw() {
      var r = n.change_yaw_angle(this.yaw);
      this.commit_directive(r);
    },
    commit_directive: function commit_directive(n) {
      this.$emit("directive", n);
    },
    fangxiang: function fangxiang(r) {
      var _this2 = this;
      var e = null;
      switch (r) {
        case "up":
        case "right":
          console.log(r, "方向"), e = n.gimbal_pitch_ctrl(1, this.control_speed), this.commit_directive(e);
          break;
        case "left":
        case "down":
          console.log(r, "方向"), e = n.gimbal_pitch_ctrl(-1, this.control_speed), this.commit_directive(e);
      }
      this.timer = setTimeout(function () {
        clearTimeout(_this2.timer), e = n.gimbal_pitch_ctrl(0, _this2.control_speed), _this2.commit_directive(e), e = n.gimbal_yaw_ctrl(0, _this2.control_speed), _this2.commit_directive(e);
      }, 500);
    },
    init_rocker: function init_rocker() {
      var _this3 = this;
      var r = null;
      joystick({
        onstart: function onstart(e) {
          switch (e) {
            case "up":
              r = n.gimbal_pitch_ctrl(1, _this3.control_speed), _this3.commit_directive(r);
              break;
            case "right":
              r = n.gimbal_yaw_ctrl(1, _this3.control_speed), _this3.commit_directive(r);
              break;
            case "left":
              r = n.gimbal_yaw_ctrl(-1, _this3.control_speed), _this3.commit_directive(r);
              break;
            case "down":
              r = n.gimbal_pitch_ctrl(-1, _this3.control_speed), _this3.commit_directive(r);
          }
        },
        onend: function onend() {
          r = n.gimbal_pitch_ctrl(0, _this3.control_speed), _this3.commit_directive(r), r = n.gimbal_yaw_ctrl(0, _this3.control_speed), _this3.commit_directive(r);
        }
      });
    }
  }
};
var o = function o() {
    var n = this,
      r = n.$createElement,
      e = n._self._c || r;
    return e("div", {
      staticClass: "cpt-MMC_Gimbal_ZT1"
    }, [e("div", {
      directives: [{
        name: "interact",
        rawName: "v-interact"
      }],
      staticClass: "hd"
    }, [n._m(0), n._v(" "), e("div", {
      staticClass: "close",
      on: {
        click: function click(r) {
          return n.$emit("close");
        }
      }
    }, [n._v("关闭")])]), n._v(" "), e("div", {
      staticClass: "bd"
    }, [e("div", {
      staticClass: "form-wrap"
    }, [e("div", {
      staticClass: "form-item"
    }, [e("div", {
      staticClass: "label-box"
    }, [n._v("控制速度")]), n._v(" "), e("div", {
      staticClass: "input-box"
    }, [e("div", {
      staticClass: "speedC"
    }, n._l(new Array(5).fill(1), function (r, i) {
      return e("div", {
        key: i,
        staticClass: "speed",
        style: n.control_speed == i + 1 ? "background: #FFFFFF;color: #333333;" : "",
        on: {
          click: function click(r) {
            n.control_speed = i + 1;
          }
        }
      }, [n._v("\n              " + n._s(i + 1) + "\n            ")]);
    }), 0)])]), n._v(" "), e("div", {
      staticClass: "form-item"
    }, [e("div", {
      staticClass: "label-box"
    }, [n._v("云台模式")]), n._v(" "), e("div", {
      staticClass: "input-box"
    }, [e("div", {
      staticClass: "mono"
    }, [e("div", {
      staticClass: "mono-long"
    }, [e("div", {
      staticClass: "mono-left mono_box",
      "class": {
        active: 0 == n.holderModelDomV2
      },
      on: {
        click: function click(r) {
          return n.handle_change_ptz_mode(0);
        }
      }
    }), n._v(" "), e("div", {
      staticClass: "mono-middle mono_box",
      "class": {
        active: 1 == n.holderModelDomV2
      },
      on: {
        click: function click(r) {
          return n.handle_change_ptz_mode(1);
        }
      }
    }), n._v(" "), e("div", {
      staticClass: "mono-right mono_box",
      "class": {
        active: 2 == n.holderModelDomV2
      },
      on: {
        click: function click(r) {
          return n.handle_change_ptz_mode(2);
        }
      }
    })]), n._v(" "), n._m(1)])])]), n._v(" "), e("div", {
      staticClass: "form-item"
    }, [e("div", {
      staticClass: "label-box"
    }, [n._v("俯       仰")]), n._v(" "), e("div", {
      staticClass: "input-box"
    }, [e("div", {
      staticClass: "speedC"
    }, n._l(n.regList, function (r, i) {
      return e("div", {
        key: i,
        staticClass: "pitch",
        style: n.pitch == r.num ? "background: #FFFFFF;color: #333333;" : "",
        on: {
          click: function click(e) {
            return n.handle_change_pitch(r.num);
          }
        }
      }, [n._v("\n              " + n._s(r.val) + "\n            ")]);
    }), 0)])])]), n._v(" "), e("div", {
      staticClass: "rocker-wrap"
    }, [e("div", {
      staticClass: "title-box"
    }), n._v(" "), e("div", {
      ref: "rocker",
      staticClass: "rocker"
    }, [e("div", {
      staticClass: "shangUp",
      on: {
        click: function click(r) {
          return n.fangxiang("up");
        }
      }
    }), n._v(" "), e("div", {
      staticClass: "xaiUp",
      on: {
        click: function click(r) {
          return n.fangxiang("down");
        }
      }
    }), n._v(" "), e("div", {
      staticClass: "zuoUp",
      on: {
        click: function click(r) {
          return n.fangxiang("right");
        }
      }
    }), n._v(" "), e("div", {
      staticClass: "youUp",
      on: {
        click: function click(r) {
          return n.fangxiang("left");
        }
      }
    })])])])]);
  },
  a = [function () {
    var n = this,
      e = n.$createElement,
      i = n._self._c || e;
    return i("div", {
      staticClass: "left ml8"
    }, [i("img", {
      attrs: {
        src: r
      }
    }), n._v(" "), i("div", {
      staticClass: "title"
    }, [n._v("红外热成像")])]);
  }, function () {
    var n = this,
      r = n.$createElement,
      e = n._self._c || r;
    return e("div", {
      staticClass: "text"
    }, [e("div", {
      staticClass: "text-left"
    }, [n._v("锁定")]), n._v(" "), e("div", {
      staticClass: "text-right"
    }, [n._v("跟随")]), n._v(" "), e("div", {
      staticClass: "text-right"
    }, [n._v("回中")])]);
  }];
o._withStripped = !0;
var A = e({
  render: o,
  staticRenderFns: a
}, function (n) {
  n && n("data-v-378e5284_0", {
    source: '.cpt-MMC_Gimbal_ZT1[data-v-378e5284] {\n  position: absolute;\n  top: 0;\n  right: 0;\n  background: rgba(0, 23, 79, 0.7);\n  box-shadow: 0 2px 4px 0 rgba(1, 162, 255, 0.35), inset 0 0 40px 0 rgba(0, 184, 255, 0.5);\n  border-radius: 10px;\n  background-size: 100% 100%;\n  width: 500px;\n  height: 218px;\n  box-sizing: border-box;\n}\n.cpt-MMC_Gimbal_ZT1 .hd[data-v-378e5284] {\n  height: 32px;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: rgba(16, 65, 215, 0.2);\n  box-shadow: inset 0 0 15px 0 rgba(0, 182, 255, 0.6);\n  border-radius: 10px 10px 0 0;\n}\n.cpt-MMC_Gimbal_ZT1 .hd .left[data-v-378e5284] {\n  display: flex;\n  align-items: center;\n}\n.cpt-MMC_Gimbal_ZT1 .hd .left .title[data-v-378e5284] {\n  font-size: 20px;\n  font-family: YouSheBiaoTiHei;\n  color: #14faff;\n  line-height: 26px;\n  text-shadow: 0px 1px 1px rgba(2, 32, 56, 0.2);\n  background: linear-gradient(135deg, #e3aa77 0%, #f5cda9 38%, #f9ecd3 58%, #fcdbb1 79%, #edb07a 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n}\n.cpt-MMC_Gimbal_ZT1 .hd .close[data-v-378e5284] {\n  font-size: 14px;\n  font-family: MicrosoftYaHei;\n  color: #d2dfff;\n  margin-right: 8px;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd[data-v-378e5284] {\n  padding: 10px 20px;\n  display: flex;\n  justify-content: space-between;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap[data-v-378e5284] {\n  flex-shrink: 0;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item[data-v-378e5284] {\n  display: flex;\n  align-items: center;\n  height: 40px;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .label-box[data-v-378e5284] {\n  color: #cbd0eb;\n  width: 75px;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box[data-v-378e5284] {\n  display: flex;\n  align-items: center;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono[data-v-378e5284] {\n  display: flex;\n  flex-direction: column;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono .mono-long[data-v-378e5284] {\n  display: flex;\n  justify-content: space-between;\n  width: 168px;\n  height: 17px;\n  background: url("../assets/images/mount_long.png") no-repeat;\n  background-size: 100%;\n  margin-bottom: 5px;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono .mono-long .mono_box[data-v-378e5284] {\n  width: 28px;\n  height: 13px;\n  border-radius: 3px;\n  margin-top: 2px;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono .mono-long .active[data-v-378e5284] {\n  background: url("../assets/images/mount/mount_control.png") no-repeat !important;\n  background-size: 100% 100%;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono .text[data-v-378e5284] {\n  font-size: 14px;\n  font-family: MicrosoftYaHei;\n  color: #ffffff;\n  display: flex;\n  justify-content: space-between;\n  font-size: 14px;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap[data-v-378e5284] {\n  flex: 1;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .title-box .title[data-v-378e5284] {\n  color: #cbd0eb;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker[data-v-378e5284] {\n  margin: 10px auto 0;\n  width: 150px;\n  height: 150px;\n  position: relative;\n  margin: 0 auto;\n  background: center url("../assets/images/accident/caozuo.png") no-repeat;\n  background-size: 100% 100%;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker .shangUp[data-v-378e5284] {\n  position: absolute;\n  left: 37%;\n  top: 4px;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  border: 0px solid red;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker .xaiUp[data-v-378e5284] {\n  position: absolute;\n  left: 37%;\n  bottom: 4px;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  border: 0px solid red;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker .zuoUp[data-v-378e5284] {\n  position: absolute;\n  left: 4px;\n  top: 37%;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  border: 0px solid red;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker .youUp[data-v-378e5284] {\n  position: absolute;\n  right: 4px;\n  top: 37%;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  border: 0px solid red;\n  cursor: pointer;\n}\n[data-v-378e5284] .el-select {\n  width: 165px;\n  margin-right: 5px;\n}\n[data-v-378e5284] .el-select .el-input .el-input__inner {\n  background: #000000;\n  border: 1px solid #08c2d1;\n  color: #dce9ff;\n}\n[data-v-378e5284] .el-input {\n  width: 165px;\n  margin-right: 5px;\n}\n[data-v-378e5284] .el-input .el-input__inner {\n  background: #000000;\n  border: 1px solid #08c2d1;\n  color: #dce9ff;\n}\n[data-v-378e5284] .el-radio-group .el-radio .el-radio__input.is-checked .el-radio__inner {\n  border-color: #08c2d1;\n  background: #08c2d1;\n}\n[data-v-378e5284] .el-radio-group .el-radio .el-radio__label {\n  color: #cbd0eb;\n}\n[data-v-378e5284] .el-button {\n  background: #2aefed;\n  color: #000;\n  border: none;\n}\n[data-v-378e5284] .el-slider__bar {\n  background: #fff;\n}\n.speedC[data-v-378e5284] {\n  width: 203px;\n  height: 24px;\n  display: flex;\n  background: rgba(13, 34, 79, 0.65);\n  border: 1px solid #43deff;\n  border-radius: 12px;\n}\n.speedC .speed[data-v-378e5284] {\n  width: 41px;\n  color: #ffffff;\n  border-radius: 12px;\n  text-align: center;\n  line-height: 24px;\n}\n.speedC .pitch[data-v-378e5284] {\n  font-size: 12px;\n  margin-left: 12px;\n  width: 34px;\n  height: 24px;\n  border-radius: 12px;\n  text-align: center;\n  line-height: 24px;\n  color: #fff;\n}\n.iconfont[data-v-378e5284] {\n  color: #2aefed;\n}\n\n/*# sourceMappingURL=index.vue.map */',
    map: {
      version: 3,
      sources: ["E:\\work\\standardization\\mmc-stl-module\\src\\components\\MMCFlightControlCenter\\components\\mount\\MMC_Gimbal_ZT1\\index.vue", "index.vue"],
      names: [],
      mappings: "AA8QA;EACA,kBAAA;EACA,MAAA;EACA,QAAA;EACA,gCAAA;EACA,wFAAA;EACA,mBAAA;EACA,0BAAA;EACA,YAAA;EACA,aAAA;EACA,sBAAA;AC7QA;AD+QA;EACA,YAAA;EACA,aAAA;EACA,8BAAA;EACA,mBAAA;EACA,kCAAA;EACA,mDAAA;EACA,4BAAA;AC7QA;AD+QA;EACA,aAAA;EACA,mBAAA;AC7QA;AD8QA;EACA,eAAA;EACA,4BAAA;EACA,cAAA;EACA,iBAAA;EACA,6CAAA;EACA,oGAAA;EAQA,6BAAA;EACA,oCAAA;ACnRA;ADuRA;EACA,eAAA;EACA,2BAAA;EACA,cAAA;EACA,iBAAA;EACA,eAAA;ACrRA;ADwRA;EACA,kBAAA;EACA,aAAA;EACA,8BAAA;ACtRA;ADuRA;EACA,cAAA;ACrRA;ADsRA;EACA,aAAA;EACA,mBAAA;EACA,YAAA;ACpRA;ADqRA;EACA,cAAA;EACA,WAAA;ACnRA;ADqRA;EACA,aAAA;EACA,mBAAA;ACnRA;ADoRA;EACA,aAAA;EACA,sBAAA;AClRA;ADmRA;EACA,aAAA;EACA,8BAAA;EACA,YAAA;EACA,YAAA;EACA,4DAAA;EACA,qBAAA;EACA,kBAAA;ACjRA;ADkRA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;EACA,eAAA;EACA,eAAA;AChRA;ADkRA;EACA,gFAAA;EACA,0BAAA;AChRA;ADmRA;EACA,eAAA;EACA,2BAAA;EACA,cAAA;EACA,aAAA;EACA,8BAAA;EACA,eAAA;ACjRA;ADuRA;EACA,OAAA;ACrRA;ADuRA;EACA,cAAA;ACrRA;ADwRA;EACA,mBAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,cAAA;EACA,wEAAA;EACA,0BAAA;ACtRA;ADuRA;EACA,kBAAA;EACA,SAAA;EACA,QAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,qBAAA;EACA,eAAA;ACrRA;ADuRA;EACA,kBAAA;EACA,SAAA;EACA,WAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,qBAAA;EACA,eAAA;ACrRA;ADuRA;EACA,kBAAA;EACA,SAAA;EACA,QAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,qBAAA;EACA,eAAA;ACrRA;ADuRA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,qBAAA;EACA,eAAA;ACrRA;AD6RA;EACA,YAAA;EACA,iBAAA;AC1RA;AD4RA;EACA,mBAAA;EACA,yBAAA;EACA,cAAA;AC1RA;AD8RA;EACA,YAAA;EACA,iBAAA;AC5RA;AD6RA;EACA,mBAAA;EACA,yBAAA;EACA,cAAA;AC3RA;ADkSA;EACA,qBAAA;EACA,mBAAA;AChSA;ADoSA;EACA,cAAA;AClSA;ADsSA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;ACpSA;ADuSA;EACA,gBAAA;ACpSA;ADsSA;EACA,YAAA;EACA,YAAA;EACA,aAAA;EACA,kCAAA;EACA,yBAAA;EACA,mBAAA;ACnSA;ADoSA;EACA,WAAA;EAEA,cAAA;EACA,mBAAA;EACA,kBAAA;EACA,iBAAA;ACnSA;ADqSA;EACA,eAAA;EACA,iBAAA;EACA,WAAA;EACA,YAAA;EACA,mBAAA;EACA,kBAAA;EACA,iBAAA;EACA,WAAA;ACnSA;ADsSA;EACA,cAAA;ACnSA;;AAEA,oCAAoC",
      file: "index.vue",
      sourcesContent: ['<template>\r\n  <div class="cpt-MMC_Gimbal_ZT1">\r\n    <div v-interact class="hd">\r\n      <div class="left ml8">\r\n        <img src="../assets/images/mount/mount_head.png" />\r\n        <div class="title">红外热成像</div>\r\n      </div>\r\n      <div class="close" @click="$emit(\'close\')">关闭</div>\r\n    </div>\r\n    <div class="bd">\r\n      <div class="form-wrap">\r\n        <div class="form-item">\r\n          <div class="label-box">控制速度</div>\r\n          <div class="input-box">\r\n            <div class="speedC">\r\n              <div\r\n                v-for="(item, index) in new Array(5).fill(1)"\r\n                :key="index"\r\n                class="speed"\r\n                :style="control_speed == index + 1 ? \'background: #FFFFFF;color: #333333;\' : \'\'"\r\n                @click="control_speed = index + 1"\r\n              >\r\n                {{ index + 1 }}\r\n              </div>\r\n            </div>\r\n            \x3c!-- <el-select\r\n              v-model="control_speed"\r\n              size="mini"\r\n              placeholder="请选择控制速度"\r\n            >\r\n              <el-option\r\n                v-for="(item, index) in new Array(5).fill(1)"\r\n                :key="index"\r\n                :label="index + 1"\r\n                :value="index + 1"\r\n              ></el-option>\r\n            </el-select> --\x3e\r\n          </div>\r\n        </div>\r\n        <div class="form-item">\r\n          <div class="label-box">云台模式</div>\r\n          <div class="input-box">\r\n            <div class="mono">\r\n              <div class="mono-long">\r\n                <div\r\n                  class="mono-left mono_box"\r\n                  :class="{ active: holderModelDomV2 == 0 }"\r\n                  @click="handle_change_ptz_mode(0)"\r\n                />\r\n                <div\r\n                  class="mono-middle mono_box"\r\n                  :class="{ active: holderModelDomV2 == 1 }"\r\n                  @click="handle_change_ptz_mode(1)"\r\n                />\r\n                <div\r\n                  class="mono-right mono_box"\r\n                  :class="{ active: holderModelDomV2 == 2 }"\r\n                  @click="handle_change_ptz_mode(2)"\r\n                />\r\n              </div>\r\n              <div class="text">\r\n                <div class="text-left">锁定</div>\r\n                <div class="text-right">跟随</div>\r\n                <div class="text-right">回中</div>\r\n              </div>\r\n            </div>\r\n            \x3c!-- <el-radio-group @change="handle_change_ptz_mode" v-model="ptz_mode">\r\n              <el-radio\r\n                size="mini"\r\n                v-for="item in drd.ptz_mode"\r\n                :key="item.id"\r\n                :label="item.id"\r\n                >{{ item.label }}</el-radio\r\n              >\r\n            </el-radio-group> --\x3e\r\n          </div>\r\n        </div>\r\n        <div class="form-item">\r\n          <div class="label-box">俯&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;仰</div>\r\n          <div class="input-box">\r\n            <div class="speedC">\r\n              <div\r\n                v-for="(item, index) in regList"\r\n                :key="index"\r\n                class="pitch"\r\n                :style="pitch == item.num ? \'background: #FFFFFF;color: #333333;\' : \'\'"\r\n                @click="handle_change_pitch(item.num)"\r\n              >\r\n                {{ item.val }}\r\n              </div>\r\n            </div>\r\n            \x3c!-- <el-input\r\n              v-model.number="pitch"\r\n              size="mini"\r\n              placeholder="请输入俯仰"\r\n            />\r\n            <span class="iconfont icon-shanchu3" @click="pitch--"></span>\r\n            <span\r\n              class="iconfont icon-tianjia1 mr5 ml3"\r\n              @click="pitch++"\r\n            ></span>\r\n            <el-button @click="handle_change_pitch" size="mini" type="primary"\r\n              >设置</el-button\r\n            > --\x3e\r\n          </div>\r\n        </div>\r\n        \x3c!-- <div class="form-item">\r\n          <div class="label-box">\r\n            航&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;向\r\n          </div>\r\n          <div class="input-box">\r\n            <el-input\r\n              v-model.number="yaw"\r\n              size="mini"\r\n              placeholder="请输入航向"\r\n            />\r\n            <span class="iconfont icon-shanchu3" @click="yaw--"></span>\r\n            <span class="iconfont icon-tianjia1 mr5 ml3" @click="yaw++"></span>\r\n            <el-button @click="handle_change_yaw" size="mini" type="primary"\r\n              >设置</el-button\r\n            >\r\n          </div>\r\n        </div> --\x3e\r\n      </div>\r\n      <div class="rocker-wrap">\r\n        <div class="title-box">\r\n          \x3c!-- <div class="title">控制</div> --\x3e\r\n        </div>\r\n        <div ref="rocker" class="rocker">\r\n          <div class="shangUp" @click="fangxiang(\'up\')" />\r\n          <div class="xaiUp" @click="fangxiang(\'down\')" />\r\n          <div class="zuoUp" @click="fangxiang(\'right\')" />\r\n          <div class="youUp" @click="fangxiang(\'left\')" />\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nimport { MMC_Gimbal_ZT1 } from \'../utils\';\r\nexport default {\r\n  data() {\r\n    return {\r\n      holderModelDomV2: 1,\r\n      control_speed: 3,\r\n      ptz_mode: 0,\r\n      pitch: 0,\r\n      yaw: 0,\r\n      regList: [\r\n        {\r\n          val: \'复位\',\r\n          num: 0\r\n        },\r\n        {\r\n          val: \'30\',\r\n          num: -30\r\n        },\r\n        {\r\n          val: \'60\',\r\n          num: -60\r\n        },\r\n        {\r\n          val: \'90\',\r\n          num: -90\r\n        }\r\n      ],\r\n      drd: {\r\n        ptz_mode: [\r\n          { id: 0, label: \'锁定\' },\r\n          { id: 1, label: \'跟随\' },\r\n          { id: 2, label: \'回中\' }\r\n        ]\r\n      },\r\n      timer: null\r\n    };\r\n  },\r\n  mounted() {\r\n    this.$nextTick(() => {\r\n      this.init_rocker();\r\n    });\r\n  },\r\n  methods: {\r\n    handle_change_ptz_mode(value) {\r\n      this.holderModelDomV2 = value;\r\n      const buffer = MMC_Gimbal_ZT1.gimbal_mode_ctrl(value);\r\n      this.commit_directive(buffer);\r\n    },\r\n    handle_change_pitch(num) {\r\n      this.pitch = num;\r\n      const buffer = MMC_Gimbal_ZT1.change_pitch_angle(this.pitch);\r\n      this.commit_directive(buffer);\r\n    },\r\n    handle_change_yaw() {\r\n      const buffer = MMC_Gimbal_ZT1.change_yaw_angle(this.yaw);\r\n      this.commit_directive(buffer);\r\n    },\r\n    commit_directive(buffer) {\r\n      this.$emit(\'directive\', buffer);\r\n    },\r\n    fangxiang(type) {\r\n      let buffer = null;\r\n      switch (type) {\r\n        case \'up\':\r\n          console.log(type, \'方向\');\r\n          buffer = MMC_Gimbal_ZT1.gimbal_pitch_ctrl(1, this.control_speed);\r\n          this.commit_directive(buffer);\r\n          break;\r\n        case \'right\':\r\n          console.log(type, \'方向\');\r\n          buffer = MMC_Gimbal_ZT1.gimbal_pitch_ctrl(1, this.control_speed);\r\n          this.commit_directive(buffer);\r\n          break;\r\n        case \'left\':\r\n          console.log(type, \'方向\');\r\n          buffer = MMC_Gimbal_ZT1.gimbal_pitch_ctrl(-1, this.control_speed);\r\n          this.commit_directive(buffer);\r\n          break;\r\n        case \'down\':\r\n          console.log(type, \'方向\');\r\n          buffer = MMC_Gimbal_ZT1.gimbal_pitch_ctrl(-1, this.control_speed);\r\n          this.commit_directive(buffer);\r\n      }\r\n      this.timer = setTimeout(() => {\r\n        clearTimeout(this.timer);\r\n        buffer = MMC_Gimbal_ZT1.gimbal_pitch_ctrl(0, this.control_speed);\r\n        this.commit_directive(buffer);\r\n        buffer = MMC_Gimbal_ZT1.gimbal_yaw_ctrl(0, this.control_speed);\r\n        this.commit_directive(buffer);\r\n      }, 500);\r\n    },\r\n    init_rocker() {\r\n      let buffer = null;\r\n      joystick({\r\n        // zone: this.$refs["rocker"],\r\n        // mode: "static",\r\n        // position: { left: "50%", top: "50%" },\r\n        // color: "#9bacbe",\r\n        onstart: (type) => {\r\n          switch (type) {\r\n            case \'up\':\r\n              buffer = MMC_Gimbal_ZT1.gimbal_pitch_ctrl(1, this.control_speed);\r\n              this.commit_directive(buffer);\r\n              break;\r\n            case \'right\':\r\n              buffer = MMC_Gimbal_ZT1.gimbal_yaw_ctrl(1, this.control_speed);\r\n              this.commit_directive(buffer);\r\n              break;\r\n            case \'left\':\r\n              buffer = MMC_Gimbal_ZT1.gimbal_yaw_ctrl(-1, this.control_speed);\r\n              this.commit_directive(buffer);\r\n              break;\r\n            case \'down\':\r\n              buffer = MMC_Gimbal_ZT1.gimbal_pitch_ctrl(-1, this.control_speed);\r\n              this.commit_directive(buffer);\r\n          }\r\n        },\r\n        onend: () => {\r\n          buffer = MMC_Gimbal_ZT1.gimbal_pitch_ctrl(0, this.control_speed);\r\n          this.commit_directive(buffer);\r\n          buffer = MMC_Gimbal_ZT1.gimbal_yaw_ctrl(0, this.control_speed);\r\n          this.commit_directive(buffer);\r\n        }\r\n      });\r\n    }\r\n  }\r\n};\r\n<\/script>\r\n\r\n<style lang="scss" scoped>\r\n.cpt-MMC_Gimbal_ZT1 {\r\n  position: absolute;\r\n  top: 0;\r\n  right: 0;\r\n  background: rgba(0, 23, 79, 0.7);\r\n  box-shadow: 0 2px 4px 0 rgba(1, 162, 255, 0.35), inset 0 0 40px 0 rgba(0, 184, 255, 0.5);\r\n  border-radius: 10px;\r\n  background-size: 100% 100%;\r\n  width: 500px;\r\n  height: 218px;\r\n  box-sizing: border-box;\r\n  // padding: 10px 20px;\r\n  .hd {\r\n    height: 32px;\r\n    display: flex;\r\n    justify-content: space-between;\r\n    align-items: center;\r\n    background: rgba(16, 65, 215, 0.2);\r\n    box-shadow: inset 0 0 15px 0 rgba(0, 182, 255, 0.6);\r\n    border-radius: 10px 10px 0 0;\r\n\r\n    .left {\r\n      display: flex;\r\n      align-items: center;\r\n      .title {\r\n        font-size: 20px;\r\n        font-family: YouSheBiaoTiHei;\r\n        color: #14faff;\r\n        line-height: 26px;\r\n        text-shadow: 0px 1px 1px rgba(2, 32, 56, 0.2);\r\n        background: linear-gradient(\r\n          135deg,\r\n          #e3aa77 0%,\r\n          #f5cda9 38%,\r\n          #f9ecd3 58%,\r\n          #fcdbb1 79%,\r\n          #edb07a 100%\r\n        );\r\n        -webkit-background-clip: text;\r\n        -webkit-text-fill-color: transparent;\r\n      }\r\n    }\r\n\r\n    .close {\r\n      font-size: 14px;\r\n      font-family: MicrosoftYaHei;\r\n      color: #d2dfff;\r\n      margin-right: 8px;\r\n      cursor: pointer;\r\n    }\r\n  }\r\n  .bd {\r\n    padding: 10px 20px;\r\n    display: flex;\r\n    justify-content: space-between;\r\n    .form-wrap {\r\n      flex-shrink: 0;\r\n      .form-item {\r\n        display: flex;\r\n        align-items: center;\r\n        height: 40px;\r\n        .label-box {\r\n          color: #cbd0eb;\r\n          width: 75px;\r\n        }\r\n        .input-box {\r\n          display: flex;\r\n          align-items: center;\r\n          .mono {\r\n            display: flex;\r\n            flex-direction: column;\r\n            .mono-long {\r\n              display: flex;\r\n              justify-content: space-between;\r\n              width: 168px;\r\n              height: 17px;\r\n              background: url(\'../assets/images/mount_long.png\') no-repeat;\r\n              background-size: 100%;\r\n              margin-bottom: 5px;\r\n              .mono_box {\r\n                width: 28px;\r\n                height: 13px;\r\n                border-radius: 3px;\r\n                margin-top: 2px;\r\n                cursor: pointer;\r\n              }\r\n              .active {\r\n                background: url(\'../assets/images/mount/mount_control.png\') no-repeat !important;\r\n                background-size: 100% 100%;\r\n              }\r\n            }\r\n            .text {\r\n              font-size: 14px;\r\n              font-family: MicrosoftYaHei;\r\n              color: #ffffff;\r\n              display: flex;\r\n              justify-content: space-between;\r\n              font-size: 14px;\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n    .rocker-wrap {\r\n      flex: 1;\r\n      .title-box {\r\n        .title {\r\n          color: #cbd0eb;\r\n        }\r\n      }\r\n      .rocker {\r\n        margin: 10px auto 0;\r\n        width: 150px;\r\n        height: 150px;\r\n        position: relative;\r\n        margin: 0 auto;\r\n        background: center url(\'../assets/images/accident/caozuo.png\') no-repeat;\r\n        background-size: 100% 100%;\r\n        .shangUp {\r\n          position: absolute;\r\n          left: 37%;\r\n          top: 4px;\r\n          border-radius: 50%;\r\n          width: 40px;\r\n          height: 40px;\r\n          border: 0px solid red;\r\n          cursor: pointer;\r\n        }\r\n        .xaiUp {\r\n          position: absolute;\r\n          left: 37%;\r\n          bottom: 4px;\r\n          border-radius: 50%;\r\n          width: 40px;\r\n          height: 40px;\r\n          border: 0px solid red;\r\n          cursor: pointer;\r\n        }\r\n        .zuoUp {\r\n          position: absolute;\r\n          left: 4px;\r\n          top: 37%;\r\n          border-radius: 50%;\r\n          width: 40px;\r\n          height: 40px;\r\n          border: 0px solid red;\r\n          cursor: pointer;\r\n        }\r\n        .youUp {\r\n          position: absolute;\r\n          right: 4px;\r\n          top: 37%;\r\n          border-radius: 50%;\r\n          width: 40px;\r\n          height: 40px;\r\n          border: 0px solid red;\r\n          cursor: pointer;\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n::v-deep {\r\n  .el-select {\r\n    width: 165px;\r\n    margin-right: 5px;\r\n    .el-input {\r\n      .el-input__inner {\r\n        background: #000000;\r\n        border: 1px solid #08c2d1;\r\n        color: #dce9ff;\r\n      }\r\n    }\r\n  }\r\n  .el-input {\r\n    width: 165px;\r\n    margin-right: 5px;\r\n    .el-input__inner {\r\n      background: #000000;\r\n      border: 1px solid #08c2d1;\r\n      color: #dce9ff;\r\n    }\r\n  }\r\n  .el-radio-group {\r\n    .el-radio {\r\n      .el-radio__input {\r\n        &.is-checked {\r\n          .el-radio__inner {\r\n            border-color: #08c2d1;\r\n            background: #08c2d1;\r\n          }\r\n        }\r\n      }\r\n      .el-radio__label {\r\n        color: #cbd0eb;\r\n      }\r\n    }\r\n  }\r\n  .el-button {\r\n    background: #2aefed;\r\n    color: #000;\r\n    border: none;\r\n  }\r\n}\r\n::v-deep .el-slider__bar {\r\n  background: #fff;\r\n}\r\n.speedC {\r\n  width: 203px;\r\n  height: 24px;\r\n  display: flex;\r\n  background: rgba(13, 34, 79, 0.65);\r\n  border: 1px solid #43deff;\r\n  border-radius: 12px;\r\n  .speed {\r\n    width: 41px;\r\n    // background: #FFFFFF;\r\n    color: #ffffff;\r\n    border-radius: 12px;\r\n    text-align: center;\r\n    line-height: 24px;\r\n  }\r\n  .pitch {\r\n    font-size: 12px;\r\n    margin-left: 12px;\r\n    width: 34px;\r\n    height: 24px;\r\n    border-radius: 12px;\r\n    text-align: center;\r\n    line-height: 24px;\r\n    color: #fff;\r\n  }\r\n}\r\n.iconfont {\r\n  color: #2aefed;\r\n}\r\n</style>\r\n', '.cpt-MMC_Gimbal_ZT1 {\n  position: absolute;\n  top: 0;\n  right: 0;\n  background: rgba(0, 23, 79, 0.7);\n  box-shadow: 0 2px 4px 0 rgba(1, 162, 255, 0.35), inset 0 0 40px 0 rgba(0, 184, 255, 0.5);\n  border-radius: 10px;\n  background-size: 100% 100%;\n  width: 500px;\n  height: 218px;\n  box-sizing: border-box;\n}\n.cpt-MMC_Gimbal_ZT1 .hd {\n  height: 32px;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  background: rgba(16, 65, 215, 0.2);\n  box-shadow: inset 0 0 15px 0 rgba(0, 182, 255, 0.6);\n  border-radius: 10px 10px 0 0;\n}\n.cpt-MMC_Gimbal_ZT1 .hd .left {\n  display: flex;\n  align-items: center;\n}\n.cpt-MMC_Gimbal_ZT1 .hd .left .title {\n  font-size: 20px;\n  font-family: YouSheBiaoTiHei;\n  color: #14faff;\n  line-height: 26px;\n  text-shadow: 0px 1px 1px rgba(2, 32, 56, 0.2);\n  background: linear-gradient(135deg, #e3aa77 0%, #f5cda9 38%, #f9ecd3 58%, #fcdbb1 79%, #edb07a 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n}\n.cpt-MMC_Gimbal_ZT1 .hd .close {\n  font-size: 14px;\n  font-family: MicrosoftYaHei;\n  color: #d2dfff;\n  margin-right: 8px;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd {\n  padding: 10px 20px;\n  display: flex;\n  justify-content: space-between;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap {\n  flex-shrink: 0;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item {\n  display: flex;\n  align-items: center;\n  height: 40px;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .label-box {\n  color: #cbd0eb;\n  width: 75px;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box {\n  display: flex;\n  align-items: center;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono {\n  display: flex;\n  flex-direction: column;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono .mono-long {\n  display: flex;\n  justify-content: space-between;\n  width: 168px;\n  height: 17px;\n  background: url("../assets/images/mount_long.png") no-repeat;\n  background-size: 100%;\n  margin-bottom: 5px;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono .mono-long .mono_box {\n  width: 28px;\n  height: 13px;\n  border-radius: 3px;\n  margin-top: 2px;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono .mono-long .active {\n  background: url("../assets/images/mount/mount_control.png") no-repeat !important;\n  background-size: 100% 100%;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .form-wrap .form-item .input-box .mono .text {\n  font-size: 14px;\n  font-family: MicrosoftYaHei;\n  color: #ffffff;\n  display: flex;\n  justify-content: space-between;\n  font-size: 14px;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap {\n  flex: 1;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .title-box .title {\n  color: #cbd0eb;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker {\n  margin: 10px auto 0;\n  width: 150px;\n  height: 150px;\n  position: relative;\n  margin: 0 auto;\n  background: center url("../assets/images/accident/caozuo.png") no-repeat;\n  background-size: 100% 100%;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker .shangUp {\n  position: absolute;\n  left: 37%;\n  top: 4px;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  border: 0px solid red;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker .xaiUp {\n  position: absolute;\n  left: 37%;\n  bottom: 4px;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  border: 0px solid red;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker .zuoUp {\n  position: absolute;\n  left: 4px;\n  top: 37%;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  border: 0px solid red;\n  cursor: pointer;\n}\n.cpt-MMC_Gimbal_ZT1 .bd .rocker-wrap .rocker .youUp {\n  position: absolute;\n  right: 4px;\n  top: 37%;\n  border-radius: 50%;\n  width: 40px;\n  height: 40px;\n  border: 0px solid red;\n  cursor: pointer;\n}\n\n::v-deep .el-select {\n  width: 165px;\n  margin-right: 5px;\n}\n::v-deep .el-select .el-input .el-input__inner {\n  background: #000000;\n  border: 1px solid #08c2d1;\n  color: #dce9ff;\n}\n::v-deep .el-input {\n  width: 165px;\n  margin-right: 5px;\n}\n::v-deep .el-input .el-input__inner {\n  background: #000000;\n  border: 1px solid #08c2d1;\n  color: #dce9ff;\n}\n::v-deep .el-radio-group .el-radio .el-radio__input.is-checked .el-radio__inner {\n  border-color: #08c2d1;\n  background: #08c2d1;\n}\n::v-deep .el-radio-group .el-radio .el-radio__label {\n  color: #cbd0eb;\n}\n::v-deep .el-button {\n  background: #2aefed;\n  color: #000;\n  border: none;\n}\n\n::v-deep .el-slider__bar {\n  background: #fff;\n}\n\n.speedC {\n  width: 203px;\n  height: 24px;\n  display: flex;\n  background: rgba(13, 34, 79, 0.65);\n  border: 1px solid #43deff;\n  border-radius: 12px;\n}\n.speedC .speed {\n  width: 41px;\n  color: #ffffff;\n  border-radius: 12px;\n  text-align: center;\n  line-height: 24px;\n}\n.speedC .pitch {\n  font-size: 12px;\n  margin-left: 12px;\n  width: 34px;\n  height: 24px;\n  border-radius: 12px;\n  text-align: center;\n  line-height: 24px;\n  color: #fff;\n}\n\n.iconfont {\n  color: #2aefed;\n}\n\n/*# sourceMappingURL=index.vue.map */']
    },
    media: void 0
  });
}, t, "data-v-378e5284", false, undefined, !1, i);
export { A as default };
