| | |
| | | <el-form-item label="本地IP" prop="deviceIp"> |
| | | <el-select v-model="platform.deviceIp" placeholder="请选择与上级相通的网卡" style="width: 100%"> |
| | | <el-option |
| | | v-for="ip in deviceIp" |
| | | v-for="ip in deviceIps" |
| | | :key="ip" |
| | | :label="ip" |
| | | :value="ip"> |
| | |
| | | <el-form-item> |
| | | <el-button type="primary" @click="onSubmit">{{ |
| | | onSubmit_text |
| | | }}</el-button> |
| | | }} |
| | | </el-button> |
| | | <el-button @click="close">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | administrativeDivision: "", |
| | | sendStreamIp: null, |
| | | }, |
| | | deviceIp: [], // 存储用户选择的设备IP |
| | | deviceIps: [], // 存储用户设备IP数组 |
| | | rules: { |
| | | name: [{ required: true, message: "请输入平台名称", trigger: "blur" }], |
| | | serverGBId: [ |
| | |
| | | keepTimeout: [{ required: true, message: "请输入心跳周期", trigger: "blur" }], |
| | | transport: [{ required: true, message: "请选择信令传输", trigger: "blur" }], |
| | | characterSet: [{ required: true, message: "请选择编码字符集", trigger: "blur" }], |
| | | deviceIp: [{required: true, message: "请选择本地IP", trigger: "blur"}], |
| | | }, |
| | | }; |
| | | }, |
| | | methods: { |
| | | openDialog: function (platform, callback) { |
| | | var that = this; |
| | | if (platform == null) { |
| | | this.onSubmit_text = "立即创建"; |
| | | this.saveUrl = "/api/platform/add"; |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`/api/platform/server_config` |
| | | }).then(function (res) { |
| | | console.log(res); |
| | | if (platform == null) { |
| | | if (res.data.code === 0) { |
| | | that.platform.deviceGBId = res.data.data.username; |
| | | that.deviceIp = res.data.data.deviceIp.split(','); |
| | | that.deviceIps = res.data.data.deviceIp.split(','); |
| | | that.platform.deviceIp = that.deviceIps[0]; |
| | | that.platform.devicePort = res.data.data.devicePort; |
| | | that.platform.username = res.data.data.username; |
| | | that.platform.password = res.data.data.password; |
| | | that.platform.sendStreamIp = res.data.data.sendStreamIp; |
| | | that.platform.administrativeDivision = res.data.data.username.substr(0, 6); |
| | | } |
| | | |
| | | } else { |
| | | that.deviceIps = res.data.data.deviceIp.split(','); |
| | | } |
| | | }).catch(function (error) { |
| | | console.log(error); |
| | | }); |
| | | if (platform == null) { |
| | | this.onSubmit_text = "立即创建"; |
| | | this.saveUrl = "/api/platform/add"; |
| | | }else { |
| | | this.platform.id = platform.id; |
| | | this.platform.enable = platform.enable; |
| | |
| | | this.platform.serverIP = platform.serverIP; |
| | | this.platform.serverPort = platform.serverPort; |
| | | this.platform.deviceGBId = platform.deviceGBId; |
| | | this.deviceIp = platform.deviceIp.split(','); |
| | | this.platform.deviceIp = platform.deviceIp; |
| | | this.platform.devicePort = platform.devicePort; |
| | | this.platform.username = platform.username; |
| | | this.platform.password = platform.password; |
| | |
| | | var that = this; |
| | | await that.$axios({ |
| | | method: 'get', |
| | | url:`/api/platform/exit/${deviceGbId}`}) |
| | | url: `/api/platform/exit/${deviceGbId}` |
| | | }) |
| | | .then(function (res) { |
| | | if (res.data.code === 0) { |
| | | result = res.data.data; |
| | |
| | | appearance: none; |
| | | margin: 0; |
| | | } |
| | | |
| | | /* 火狐 */ |
| | | input{ |
| | | -moz-appearance:textfield; |
| | | } |
| | | |
| | | .control-wrapper-not-used { |
| | | position: relative; |
| | | width: 6.25rem; |