소스 검색

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_lc_web into lixin

tags/v1.2.0
lixin 1 년 전
부모
커밋
49d89480a4
3개의 변경된 파일51개의 추가작업 그리고 17개의 파일을 삭제
  1. +1
    -1
      .env.localhost
  2. +43
    -15
      src/views/dashboard/components/ControlPanel.vue
  3. +7
    -1
      src/views/dashboard/index.vue

+ 1
- 1
.env.localhost 파일 보기

VITE_APP_USE_MOCK = false VITE_APP_USE_MOCK = false


# proxy # proxy
VITE_PROXY = [["/api-local","https://lcxj-test.t-aaron.com/api"],["/api-mock","http://127.0.0.1:8003"]]
VITE_PROXY = [["/api-local","http://127.0.0.1:8002/api"],["/api-mock","http://127.0.0.1:8003"]]


# base api # base api
VITE_APP_GLOB_BASE_API = '/api-local' VITE_APP_GLOB_BASE_API = '/api-local'

+ 43
- 15
src/views/dashboard/components/ControlPanel.vue 파일 보기

</n-icon> </n-icon>
</div> </div>
<div class="square__panel"> <div class="square__panel">
<n-icon size="24" color="#fff">
<PlusOutlined />
</n-icon>
<div
class="panel__button"
@mousedown="handleEvent('down',{yuntai:'05'})"
@mouseup="handleEvent('up',{yuntai:'05'})"
@mouseleave="handleEvent('leave',{yuntai:'05'})"
>
<n-icon size="24" color="#fff">
<PlusOutlined />
</n-icon>
</div>
<p>焦距</p> <p>焦距</p>
<n-icon size="24" color="#fff">
<LineOutlined />
</n-icon>
<div
class="panel__button"
@mousedown="handleEvent('down',{yuntai:'06'})"
@mouseup="handleEvent('up',{yuntai:'06'})"
@mouseleave="handleEvent('leave',{yuntai:'06'})"
>
<n-icon size="24" color="#fff">
<LineOutlined />
</n-icon>
</div>
</div> </div>
<div class="panel__title">云台控制</div> <div class="panel__title">云台控制</div>
</div> </div>
</n-icon> </n-icon>
</div> </div>
<div class="crcle__panel"> <div class="crcle__panel">
<div class="pannel__item item-1" @click="handleClick(1)" />
<div class="pannel__item item-2" @click="handleClick(1)" />
<div class="pannel__item item-3" @click="handleClick(1)" />
<div class="pannel__item item-4" @click="handleClick(1)" />
<div
v-for="(item,index) in moveList"
:key="index"
class="pannel__item"
:class="`item-${index+1}`"
@mousedown="handleEvent('down',item.list,item.key)"
@mouseup="handleEvent('up',item.list,item.key)"
@mouseleave="handleEvent('leave',item.list,item.key)"
/>
<n-icon class="top" size="24" color="#fff"> <n-icon class="top" size="24" color="#fff">
<UpOutlined /> <UpOutlined />
</n-icon> </n-icon>
default: () => ['camera', 'locus'] default: () => ['camera', 'locus']
} }
}, },
emits: ['start', 'reset'],
emits: ['instruct'],
setup(props, { emit }) { setup(props, { emit }) {
const data = reactive({ const data = reactive({
cameraShow: true, cameraShow: true,
let reset = {} let reset = {}
if (key) { if (key) {
params.pwm = data.config[key] params.pwm = data.config[key]
reset = { yaogan: '12', pwm: '200' }
reset = { yaogan: '12', pwm: data.config.move }
} else { } else {
reset = { yuntai: '09' } reset = { yuntai: '09' }
} }
switch (event) { switch (event) {
case 'down': case 'down':
data.hasEvent = true data.hasEvent = true
emit('start', params)
emit('instruct', params)
break break
case 'up': case 'up':
if (data.hasEvent) { if (data.hasEvent) {
emit('reset', reset)
emit('instruct', reset)
data.hasEvent = false data.hasEvent = false
} }
break break
case 'leave': case 'leave':
if (data.hasEvent) { if (data.hasEvent) {
emit('reset', reset)
emit('instruct', reset)
data.hasEvent = false data.hasEvent = false
} }
break break
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
.panel__button{
width: 100%;
text-align: center;
cursor: pointer;
.n-icon{
pointer-events: none;
}
}

} }
&.open{ &.open{
transition: width 1s; transition: width 1s;

+ 7
- 1
src/views/dashboard/index.vue 파일 보기

<OneMap ref="Map" /> <OneMap ref="Map" />
<Extend ref="extendRef" class="extend" @send="getmessage" /> <Extend ref="extendRef" class="extend" @send="getmessage" />


<!-- <ControlPanel @instruct="handleInstruct" /> -->
</div> </div>
</template> </template>


import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import OneMap from './components/OneMap.vue' import OneMap from './components/OneMap.vue'
import Extend from './components/Extend.vue' import Extend from './components/Extend.vue'
import ControlPanel from './components/ControlPanel.vue'
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
export default { export default {
name: 'HomePage', name: 'HomePage',
components: { OneMap, Extend },
components: { OneMap, Extend, ControlPanel },
setup(props) { setup(props) {
const router = useRouter() const router = useRouter()
const extendRef = ref() const extendRef = ref()
onMounted(() => { onMounted(() => {
extendRef.value.handleClick(0) extendRef.value.handleClick(0)
}) })
// const handleInstruct = (params) => {
// console.log(params)
// }
return { return {
data, data,
toSystem, toSystem,
extendRef, extendRef,
getmessage, getmessage,
Map Map
// handleInstruct
} }
} }
} }

Loading…
취소
저장