-
{{ $t('device.device-edit.148398-37') }}
+
+
{{ $t('device.device-edit.148398-37')
+ }}
@@ -107,8 +140,12 @@
- {{ $t('device.device-timer.433369-33') }}
- {{ $t('device.device-timer.433369-32') }}
+ {{
+ $t('device.device-timer.433369-33') }}
+ {{
+ $t('device.device-timer.433369-32') }}
@@ -118,31 +155,34 @@
-
+
{{ $t('device.device-edit.148398-42') }}
-
-
-
+
+
+
{{ $t('device.device-edit.148398-45') }}
-
+
{{ $t('device.device-edit.148398-47') }}
-
+
{{ $t('device.device-user.037521-12') }}
-
+
{{ $t('device.device-edit.148398-49') }}
-
+
{{ $t('device.device-edit.148398-50') }}
@@ -156,7 +196,8 @@
- {{ $t('device.device-edit.148398-53') }}
+ {{ $t('device.device-edit.148398-53')
+ }}
@@ -165,14 +206,16 @@
-
+
{{ $t('device.device-edit.148398-55') }}
-
+
{{ $t('device.device-edit.148398-56') }}
@@ -189,29 +232,82 @@
{{ $t('device.device-edit.148398-56') }}
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -230,7 +326,7 @@ import deviceTimer from './device-timer';
import DeviceFunc from './device-functionlog';
import vueQr from 'vue-qr';
import { loadBMap } from '@/utils/map.js';
-import { deviceSynchronization, getDevice, addDevice, updateDevice, generatorDeviceNum, getMqttConnect } from '@/api/iot/device';
+import { deviceSynchronization, getDevice, addDevice, updateDevice, generatorDeviceNum, getMqttConnect, getSipConfig } from '@/api/iot/device';
import { getDeviceRunningStatus } from '@/api/iot/device';
import { cacheJsonThingsModel } from '@/api/iot/model';
import deviceLiveStream from '@/views/components/player/deviceLiveStream';
@@ -320,8 +416,19 @@ export default {
clientId: 0,
username: '',
passwd: '',
- subscribeTopic: '',
- reportTopic: '',
+ port: '',
+ },
+ GBform: {
+ domainAlias: '',
+ serverSipid: '',
+ password: '',
+ port: '',
+ },
+ httpForm: {
+ type: '',
+ username: '',
+ password: '',
+ clientId: '',
port: '',
},
openTip: false,
@@ -486,7 +593,7 @@ export default {
//获取子组件订阅的设备状态
getDeviceStatusData(status) {
- this.form.status = status;
+ this.form.status = status;
},
getPlayerData(data) {
this.activeName = data.tabName;
@@ -881,7 +988,7 @@ export default {
this.form.serialNumber = devsipid;
},
// 获取选中的用户
- getUserData(user) {},
+ getUserData(user) { },
/**关闭物模型 */
openSummaryDialog() {
let json = {
@@ -898,9 +1005,9 @@ export default {
this.openSummary = false;
this.openViewMqtt = false;
},
- doCopy(type) {
- if (type == 2) {
- const input = document.createElement('input');
+ doCopy() {
+ const input = document.createElement('input');
+ if (this.form.transport == 'MQTT' || this.form.transport == 'COAP') {
input.value =
'{"clientId":"' +
this.listQuery.clientId +
@@ -915,12 +1022,39 @@ export default {
'","port":"' +
this.listQuery.port +
'"}';
- document.body.appendChild(input);
- input.select(); //选中输入框
- document.execCommand('Copy'); //复制当前选中文本到前切板
- document.body.removeChild(input);
- this.$message.success('复制成功');
+ } else if (this.form.transport == 'TCP') {
+ input.value = '{enrollPackage:' + this.listQuery.enrollPackage + ',port:' + this.listQuery.port + '}';
+ } else if (this.form.transport == 'HTTP') {
+ input.value =
+ '{clientId:' +
+ this.httpForm.clientId +
+ ',type:' +
+ this.httpForm.type +
+ ',username:' +
+ this.httpForm.username +
+ ',password:' +
+ this.httpForm.password +
+ '","port":"' +
+ this.httpForm.port +
+ '"}';
}
+ if (this.form.transport == 'GB28181') {
+ input.value =
+ '{domainAlias:' +
+ this.GBform.domainAlias +
+ ',serverSipid:' +
+ this.GBform.serverSipid +
+ ',password:' +
+ this.GBform.password +
+ ',port:' +
+ this.GBform.port +
+ '}';
+ }
+ document.body.appendChild(input);
+ input.select(); //选中输入框
+ document.execCommand('Copy'); //复制当前选中文本到剪切板
+ document.body.removeChild(input);
+ this.$message.success(this.$t('device.device-edit.148398-71'));
},
openCodeDialog() {
let json = {
@@ -967,15 +1101,35 @@ export default {
handleViewMqtt() {
this.openViewMqtt = true;
this.loading = true;
- const params = {
- deviceId: this.form.deviceId,
- };
- getMqttConnect(params).then((response) => {
- if (response.code == 200) {
- this.listQuery = response.data;
- this.loading = false;
- }
- });
+ if (this.form.transport === 'MQTT' || this.form.transport === 'TCP' || this.form.transport === 'COAP') {
+ const params = {
+ deviceId: this.form.deviceId,
+ };
+ getMqttConnect(params).then((response) => {
+ if (response.code == 200) {
+ this.listQuery = response.data;
+ this.loading = false;
+ }
+ });
+ } else if (this.form.transport === 'GB28181') {
+ const deviceSipId = this.form.deviceId;
+ getSipConfig(deviceSipId).then((response) => {
+ if (response.code == 200) {
+ this.GBform = response.data;
+ this.loading = false;
+ }
+ });
+ } else if (this.form.transport === 'HTTP') {
+ const params = {
+ deviceId: this.form.deviceId,
+ };
+ getHttpConfig(params).then((response) => {
+ if (response.code == 200) {
+ this.httpForm = response.data;
+ this.loading = false;
+ }
+ });
+ }
},
},
};
diff --git a/vue/src/views/iot/sip/sipidGen.vue b/vue/src/views/iot/sip/sipidGen.vue
index 1861301e..473d2ff7 100644
--- a/vue/src/views/iot/sip/sipidGen.vue
+++ b/vue/src/views/iot/sip/sipidGen.vue
@@ -1,21 +1,27 @@
-
-
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+