123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523 |
- <template>
- <el-container class="container">
- <el-header class="header">
- <el-row>
- <el-col :span="20">云台操作</el-col>
- <el-col :span="4">
- <i v-show="fold" class="hide-icon pointer" @click="fold = !fold"></i>
- <i v-show="!fold" class="show-icon pointer" @click="fold = !fold"></i>
- </el-col>
- </el-row>
- </el-header>
- <el-main class="main" v-show="!fold">
- <!-- 云台圆盘 -->
- <div class="holder-disc">
- <div class="s1" :class="brand !== 'lechange' ? 'box' : 'disable-box'">
- <!-- 左上 -->
- <i v-show="brand !== 'lechange'" class="north-west-icon" @mousedown="holderClick(false, '4')" @mouseup="holderClick(true, '4')"></i>
- </div>
- <div class="s2 box">
- <!-- 上 -->
- <i class="north-west-icon" @mousedown="holderClick(false, '0')" @mouseup="holderClick(true, '0')"></i>
- </div>
- <div class="s3" :class="brand !== 'lechange' ? 'box' : 'disable-box'">
- <!-- 右上 -->
- <i v-show="brand !== 'lechange'" class="north-west-icon" @mousedown="holderClick(false, '6')" @mouseup="holderClick(true, '6')"></i>
- </div>
- <div class="s4 box">
- <!-- 右 -->
- <i class="north-west-icon" @mousedown="holderClick(false, '3')" @mouseup="holderClick(true, '3')"></i>
- </div>
- <div class="s5 box">
- <!-- 左 -->
- <i class="north-west-icon" @mousedown="holderClick(false, '2')" @mouseup="holderClick(true, '2')"></i>
- </div>
- <div class="s6" :class="brand !== 'lechange' ? 'box' : 'disable-box'">
- <!-- 左下 -->
- <i v-show="brand !== 'lechange'" class="north-west-icon" @mousedown="holderClick(false, '5')" @mouseup="holderClick(true, '5')"></i>
- </div>
- <div class="s7 box">
- <!-- 下 -->
- <i class="north-west-icon" @mousedown="holderClick(false, '1')" @mouseup="holderClick(true, '1')"></i>
- </div>
- <div class="s8" :class="brand !== 'lechange' ? 'box' : 'disable-box'">
- <!-- 右下 -->
- <i v-show="brand !== 'lechange'" class="north-west-icon" @mousedown="holderClick(false, '7')" @mouseup="holderClick(true, '7')"></i>
- </div>
- <div class="center center-icon"></div>
- </div>
- <!-- 云台步长 -->
- <div class="holder-step-length">
- <el-row>
- <el-col :span="4" class="lh38 text-right">步长</el-col>
- <el-col :span="12" :offset="2">
- <el-slider
- v-model="stepLength"
- :min="1"
- :max="8"
- :show-tooltip="false"
- ></el-slider>
- </el-col>
- <el-col :span="4" :offset="2" class="lh38">{{ stepLength }}</el-col>
- </el-row>
- </div>
- <!-- 云台操作 -->
- <div class="holder-operate">
- <el-row class="operate-row">
- <el-col :span="8" class="border-right-ccc">
- <i
- class="focus-up-icon"
- title="聚焦+"
- @mousedown="holderHandle('ptzFocusOperation', true, false)"
- @mouseup="holderHandle('ptzFocusOperation', true, true)"
- ></i>
- <i
- class="focus-down-icon"
- title="聚焦-"
- @mousedown="holderHandle('ptzFocusOperation', false, false)"
- @mouseup="holderHandle('ptzFocusOperation', false, true)"
- ></i>
- </el-col>
- <el-col :span="8" class="border-right-ccc">
- <i
- class="scale-add-icon"
- title="变倍+"
- @mousedown="holderHandle('ptzZoomOperation', true, false)"
- @mouseup="holderHandle('ptzZoomOperation', true, true)"
- ></i>
- <i
- class="scale-minus-icon"
- title="变倍-"
- @mousedown="holderHandle('ptzZoomOperation', false, false)"
- @mouseup="holderHandle('ptzZoomOperation', false, true)"
- ></i>
- </el-col>
- <el-col :span="8">
- <i
- class="aperture-up-icon"
- title="光圈+"
- @mousedown="holderHandle('ptzApertureOperation', true, false)"
- @mouseup="holderHandle('ptzApertureOperation', true, true)"
- ></i>
- <i
- class="aperture-down-icon"
- title="光圈-"
- @mousedown="holderHandle('ptzApertureOperation', false, false)"
- @mouseup="holderHandle('ptzApertureOperation', false, true)"
- ></i>
- </el-col>
- </el-row>
- </div>
- </el-main>
- </el-container>
- </template>
- <script>
- module.exports = {
- data() {
- return {
- data: [],
- value: [1, 4],
- cruiseForm: {
- num: "",
- name: "",
- },
- fold: true,
- moreFold: true,
- stepLength: 1,
- searchKey: "",
- prepointDialogVisible: false,
- cruiseDialogVisible: false,
- num: ""
- };
- },
- watch: {
- fold(val) {
- this.$emit("switch-fold", val)
- }
- },
- props: {
- brand: {
- type: String,
- default: 'general'
- }
- },
- methods: {
- holderClick(bStop, direct) {
- this.$emit("holder-click", {
- direct: direct,
- stepLength: this.stepLength,
- bStop: bStop,
- });
- },
- holderHandle(method, add, bStop) {
- this.$emit("holder-handle", {
- method: method,
- bStop: bStop,
- add: add,
- });
- },
- },
- };
- </script>
-
- <style scoped>
- /deep/ .el-transfer-panel {
- width: 260px;
- }
- /deep/ .cruise-dialog-div .el-transfer__button {
- border-color: #ee371f;
- background-color: #ee371f;
- }
- /deep/ .cruise-dialog-div .el-transfer__button.is-disabled {
- background-color: #fab6b6;
- border-color: #fab6b6;
- }
- /deep/ .cruise-dialog-div .el-form-item {
- margin-bottom: 15px;
- }
- .empty-prepoint-list {
- height: 200px;
- padding-top: 80px;
- text-align: center;
- color: #888;
- }
- .prepoint-list-row {
- padding: 5px 10px;
- border-bottom: 1px solid #ddd;
- }
- .prepoint-title {
- width: 60px;
- line-height: 28px;
- }
- .h200 {
- height: 200px;
- }
- .mgl70 {
- margin-left: 70px;
- }
- .mgt5 {
- margin-top: 5px;
- }
- .pt5 {
- padding-top: 5px;
- }
- .mgr30 {
- margin-right: 30px;
- }
- .mgr5 {
- margin-right: 5px;
- }
- .mgr10 {
- margin-right: 10px;
- }
- .pdt5 {
- padding-top: 5px;
- }
- .pdb5 {
- padding-bottom: 5px;
- }
- .header {
- color: #000;
- font-size: 20px;
- }
- .show-icon {
- background: url("../img/ptz/show.png");
- background-size: 100% 100%;
- width: 16px;
- height: 16px;
- display: inline-block;
- }
- .hide-icon {
- background: url("../img/ptz/hide.png");
- background-size: 100% 100%;
- width: 16px;
- height: 16px;
- display: inline-block;
- }
- .add-icon {
- background: url("../img/ptz/ptzEx2/add-n.png");
- background-size: 100% 100%;
- width: 14px;
- height: 14px;
- display: inline-block;
- vertical-align: middle;
- }
- .add-icon:hover {
- background: url("../img/ptz/ptzEx2/add-h.png");
- }
- .center-icon {
- background: url("../img/ptz/center.png") no-repeat top left;
- width: 48px;
- height: 48px;
- display: inline-block;
- }
- .operate-row {
- border-top: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
- padding: 5px 0px;
- }
- .operate-row .el-col {
- text-align: center;
- }
- .border-right-ccc {
- border-right: 1px solid #ccc;
- }
- .focus-up-icon {
- background: url("../img/ptz/ptzEx2/FocusUp_n.png");
- background-size: 100% 100%;
- width: 20px;
- height: 20px;
- display: inline-block;
- margin-right: 4px;
- }
- .focus-up-icon:hover {
- background: url("../img/ptz/ptzEx2/FocusUp_h.png");
- background-size: 100% 100%;
- }
- .focus-down-icon {
- background: url("../img/ptz/ptzEx2/FocusDown_n.png");
- background-size: 100% 100%;
- width: 20px;
- height: 20px;
- display: inline-block;
- }
- .focus-down-icon:hover {
- background: url("../img/ptz/ptzEx2/FocusDown_h.png");
- background-size: 100% 100%;
- }
- .scale-add-icon {
- background: url("../img/ptz/ptzEx2/scaleAdd_n.png");
- background-size: 100% 100%;
- width: 20px;
- height: 20px;
- display: inline-block;
- margin-right: 4px;
- }
- .scale-add-icon:hover {
- background: url("../img/ptz/ptzEx2/scaleAdd_h.png");
- background-size: 100% 100%;
- }
- .scale-minus-icon {
- background: url("../img/ptz/ptzEx2/scaleMinus_n.png");
- background-size: 100% 100%;
- width: 20px;
- height: 20px;
- display: inline-block;
- }
- .scale-minus-icon:hover {
- background: url("../img/ptz/ptzEx2/scaleMinus_h.png");
- background-size: 100% 100%;
- }
- .aperture-up-icon {
- background: url("../img/ptz/ptzEx2/ApertureUp_n.png");
- background-size: 100% 100%;
- width: 20px;
- height: 20px;
- display: inline-block;
- margin-right: 4px;
- }
- .aperture-up-icon:hover {
- background: url("../img/ptz/ptzEx2/ApertureUp_h.png");
- background-size: 100% 100%;
- }
- .aperture-down-icon {
- background: url("../img/ptz/ptzEx2/ApertureDown_n.png");
- background-size: 100% 100%;
- width: 20px;
- height: 20px;
- display: inline-block;
- }
- .aperture-down-icon:hover {
- background: url("../img/ptz/ptzEx2/ApertureDown_h.png");
- background-size: 100% 100%;
- }
- .p5-10 {
- padding: 5px 10px;
- }
- .holder-more-row {
- border-bottom: 1px solid #ccc;
- }
- .prepoint-h-icon {
- background: url("../img/ptz/ptzEx2/Prepoint-h.png");
- background-size: 100% 100%;
- width: 16px;
- height: 16px;
- display: inline-block;
- }
- .prepoint-n-icon {
- background: url("../img/ptz/ptzEx2/prepoint-n.png");
- background-size: 100% 100%;
- width: 16px;
- height: 16px;
- display: inline-block;
- }
- .prepoint-n-icon:hover {
- background: url("../img/ptz/ptzEx2/Prepoint-h.png");
- background-size: 100% 100%;
- }
- .modify-n-icon {
- background: url("../img/ptz/ptzEx2/modify-n.png");
- background-size: 100% 100%;
- width: 14px;
- height: 14px;
- display: inline-block;
- margin-right: 3px;
- }
- .modify-n-icon:hover {
- background: url("../img/ptz/ptzEx2/modify-h.png");
- background-size: 100% 100%;
- }
- .delete-n-icon {
- background: url("../img/ptz/ptzEx2/delete-n.png");
- background-size: 100% 100%;
- width: 14px;
- height: 14px;
- display: inline-block;
- margin-right: 3px;
- }
- .delete-n-icon:hover {
- background: url("../img/ptz/ptzEx2/delete-h.png");
- background-size: 100% 100%;
- }
- .play-n-icon {
- background: url("../img/ptz/ptzEx2/play-n.png");
- background-size: 100% 100%;
- width: 14px;
- height: 14px;
- display: inline-block;
- margin-right: 3px;
- }
- .play-n-icon:hover {
- background: url("../img/ptz/ptzEx2/play-h.png");
- background-size: 100% 100%;
- }
- .cruise-h-icon {
- background: url("../img/ptz/ptzEx2/Cruise-h.png");
- background-size: 100% 100%;
- width: 16px;
- height: 16px;
- display: inline-block;
- }
- .cruise-n-icon {
- background: url("../img/ptz/ptzEx2/Cruise-n.png");
- background-size: 100% 100%;
- width: 16px;
- height: 16px;
- display: inline-block;
- }
- .cruise-n-icon:hover {
- background: url("../img/ptz/ptzEx2/Cruise-h.png");
- background-size: 100% 100%;
- }
- .el-icon-caret-top {
- position: relative;
- top: 32px;
- left: 8px;
- transform: rotate(-64deg);
- font-size: x-large;
- }
- .container {
- position: absolute;
- bottom: 0px;
- background: #fff;
- width: 100%;
- height: auto;
- }
- .el-header {
- background: #ddd;
- }
- .holder-disc {
- width: 132px;
- height: 132px;
- border-radius: 50%;
- margin-left: 37px;
- margin-top: 10px;
- }
- .holder-disc .box, .holder-disc .disable-box {
- position: absolute;
- width: 130px;
- height: 130px;
- border-radius: 50%;
- clip: rect(0px, 65px, 65px, 0);
- clip-path: polygon(0px 0px, 65px 65px, 0px 65px);
- }
- .holder-disc .box {
- transition: 0.5s;
- background: #e6e6e6;
- cursor: pointer;
- }
- .holder-disc .disable-box {
- background: #e6e6e6;
- }
- .holder-disc .box:hover {
- background: #ccc;
- }
- .north-west-icon {
- background: url("../img/ptz/northWest.png") no-repeat top left;
- width: 13px;
- height: 13px;
- display: inline-block;
- position: relative;
- top: 40px;
- left: 16px;
- transform: rotate(-23deg);
- }
- .north-west-icon:hover {
- background: url("../img/ptz/northWest_hover.png");
- }
- .holder-disc .s1 {
- transform: rotate(22.5deg);
- }
- .holder-disc .s2 {
- transform: rotate(67.5deg);
- }
- .holder-disc .s3 {
- transform: rotate(112.5deg);
- }
- .holder-disc .s4 {
- transform: rotate(157.5deg);
- }
- .holder-disc .s5 {
- transform: rotate(-22.5deg);
- }
- .holder-disc .s6 {
- transform: rotate(-67.5deg);
- }
- .holder-disc .s7 {
- transform: rotate(-112.5deg);
- }
- .holder-disc .s8 {
- transform: rotate(-157.5deg);
- }
- .holder-disc .center {
- position: absolute;
- left: 78px;
- top: 112px;
- border-radius: 50%;
- }
- .lh38 {
- line-height: 38px;
- }
- </style>
|