|  |  | 
 |  |  |         callback(new Error("请输入设备国标编号")); | 
 |  |  |       } else { | 
 |  |  |         var exit = await this.deviceGBIdExit(value); | 
 |  |  |         console.log(exit); | 
 |  |  |         console.log(exit == "true"); | 
 |  |  |         console.log(exit === "true"); | 
 |  |  |         if (exit) { | 
 |  |  |           callback(new Error("设备国标编号已存在")); | 
 |  |  |         } else { | 
 |  |  | 
 |  |  |       onSubmit_text: "立即创建", | 
 |  |  |  | 
 |  |  |       platform: { | 
 |  |  |         id: null, | 
 |  |  |         enable: true, | 
 |  |  |         ptz: true, | 
 |  |  |         rtcp: false, | 
 |  |  |         name: "测试001", | 
 |  |  |         serverGBId: "34020000002000000001", | 
 |  |  |         serverGBDomain: "3402000000", | 
 |  |  |         serverIP: "192.168.1.141", | 
 |  |  |         serverPort: "5060", | 
 |  |  |         deviceGBId: "34020000001320001101", | 
 |  |  |         deviceIp: "192.168.1.20", | 
 |  |  |         devicePort: "5060", | 
 |  |  |         username: "34020000001320001101", | 
 |  |  |         password: "12345678", | 
 |  |  |         name: null, | 
 |  |  |         serverGBId: null, | 
 |  |  |         serverGBDomain: null, | 
 |  |  |         serverIP: null, | 
 |  |  |         serverPort: null, | 
 |  |  |         deviceGBId: null, | 
 |  |  |         deviceIp: null, | 
 |  |  |         devicePort: null, | 
 |  |  |         username: null, | 
 |  |  |         password: null, | 
 |  |  |         expires: 300, | 
 |  |  |         keepTimeout: 60, | 
 |  |  |         transport: "UDP", | 
 |  |  | 
 |  |  |   methods: { | 
 |  |  |     openDialog: function (platform, callback) { | 
 |  |  |       var that = this; | 
 |  |  |       this.$axios | 
 |  |  |         .get(`/api/platform/server_config`) | 
 |  |  |         .then(function (res) { | 
 |  |  |       if (platform == null) { | 
 |  |  |         this.onSubmit_text = "立即创建"; | 
 |  |  |         this.$axios({ | 
 |  |  |           method: 'get', | 
 |  |  |           url:`/api/platform/server_config` | 
 |  |  |         }).then(function (res) { | 
 |  |  |           console.log(res); | 
 |  |  |           that.platform.deviceGBId = res.data.username; | 
 |  |  |           that.platform.deviceIp = res.data.deviceIp; | 
 |  |  |           that.platform.devicePort = res.data.devicePort; | 
 |  |  |           that.platform.username = res.data.username; | 
 |  |  |           that.platform.password = res.data.password; | 
 |  |  |         }) | 
 |  |  |         .catch(function (error) { | 
 |  |  |         }).catch(function (error) { | 
 |  |  |           console.log(error); | 
 |  |  |         }); | 
 |  |  |       this.showDialog = true; | 
 |  |  |       this.listChangeCallback = callback; | 
 |  |  |       if (platform != null) { | 
 |  |  |       }else { | 
 |  |  |         this.platform = platform; | 
 |  |  |         this.onSubmit_text = "保存"; | 
 |  |  |       } else { | 
 |  |  |         this.onSubmit_text = "立即创建"; | 
 |  |  |       } | 
 |  |  |       this.showDialog = true; | 
 |  |  |       this.listChangeCallback = callback; | 
 |  |  |     }, | 
 |  |  |     onSubmit: function () { | 
 |  |  |       console.log("onSubmit"); | 
 |  |  |       var that = this; | 
 |  |  |       that.$axios | 
 |  |  |         .post(`/api/platform/save`, that.platform) | 
 |  |  |         .then(function (res) { | 
 |  |  |           console.log(res); | 
 |  |  |           console.log(res.data == "success"); | 
 |  |  |       that.$axios({ | 
 |  |  |         method: 'post', | 
 |  |  |         url:`/api/platform/save`, | 
 |  |  |         data: that.platform | 
 |  |  |       }).then(function (res) { | 
 |  |  |           if (res.data == "success") { | 
 |  |  |             that.$message({ | 
 |  |  |               showClose: true, | 
 |  |  | 
 |  |  |               that.listChangeCallback(); | 
 |  |  |             } | 
 |  |  |           } | 
 |  |  |         }) | 
 |  |  |         .catch(function (error) { | 
 |  |  |         }).catch(function (error) { | 
 |  |  |           console.log(error); | 
 |  |  |         }); | 
 |  |  |     }, | 
 |  |  | 
 |  |  |     deviceGBIdExit: async function (deviceGbId) { | 
 |  |  |       var result = false; | 
 |  |  |       var that = this; | 
 |  |  |       await that.$axios | 
 |  |  |         .post(`/api/platform/exit/${deviceGbId}`) | 
 |  |  |       await that.$axios({ | 
 |  |  |                 method: 'post', | 
 |  |  |                 url:`/api/platform/exit/${deviceGbId}`}) | 
 |  |  |         .then(function (res) { | 
 |  |  |           result = res.data; | 
 |  |  |         }) |