mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-24 05:57:49 +08:00
增加接入信息展示
This commit is contained in:
parent
6a2ecd937d
commit
5b89145337
@ -40,12 +40,12 @@ export function add(form) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deleteDeviceById(deviceId) {
|
export function deleteDevice(phoneNumber) {
|
||||||
return request({
|
return request({
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
url: '/api/jt1078/terminal/delete',
|
url: '/api/jt1078/terminal/delete',
|
||||||
params: {
|
params: {
|
||||||
deviceId: deviceId
|
phoneNumber: phoneNumber
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
add,
|
add,
|
||||||
addChannel,
|
addChannel, deleteDevice,
|
||||||
deleteDeviceById, fillLight,
|
deleteDeviceById, fillLight,
|
||||||
play, ptz,
|
play, ptz,
|
||||||
queryChannels,
|
queryChannels,
|
||||||
@ -51,9 +51,9 @@ const actions = {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
deleteDeviceById({ commit }, deviceId) {
|
deleteDevice({ commit }, phoneNumber) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
deleteDeviceById(deviceId).then(response => {
|
deleteDevice(phoneNumber).then(response => {
|
||||||
const { data } = response
|
const { data } = response
|
||||||
resolve(data)
|
resolve(data)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
<div id="app" style="height: calc(100vh - 124px);">
|
<div id="app" style="height: calc(100vh - 124px);">
|
||||||
<el-form :inline="true" size="mini">
|
<el-form :inline="true" size="mini">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="add">接入新设备
|
<el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="add">新设备</el-button>
|
||||||
</el-button>
|
<el-button icon="el-icon-info" style="margin-right: 1rem;" @click="showInfo()">接入信息
|
||||||
</el-form-item>
|
</el-button></el-form-item>
|
||||||
<el-form-item style="float: right;">
|
<el-form-item style="float: right;">
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-refresh-right"
|
icon="el-icon-refresh-right"
|
||||||
@ -124,16 +124,18 @@
|
|||||||
@current-change="currentChange"
|
@current-change="currentChange"
|
||||||
/>
|
/>
|
||||||
<deviceEdit ref="deviceEdit" />
|
<deviceEdit ref="deviceEdit" />
|
||||||
|
<configInfo ref="configInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import deviceEdit from './edit.vue'
|
import deviceEdit from './edit.vue'
|
||||||
|
import configInfo from '../dialog/configInfo.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
components: {
|
components: {
|
||||||
deviceEdit
|
deviceEdit, configInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -188,7 +190,7 @@ export default {
|
|||||||
center: true,
|
center: true,
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$store.dispatch('jtDevice/deleteDeviceById', row.id)
|
this.$store.dispatch('jtDevice/deleteDevice', row.phoneNumber)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
@ -230,6 +232,13 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.info('尚不支持')
|
this.$message.info('尚不支持')
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
showInfo: function() {
|
||||||
|
this.$store.dispatch('server/getSystemConfig')
|
||||||
|
.then((data) => {
|
||||||
|
this.serverId = data.addOn.serverId
|
||||||
|
this.$refs.configInfo.openDialog(data, 'jt1078Config')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user