|
@@ -101,54 +101,56 @@
|
|
|
},
|
|
|
openUpload() {
|
|
|
//
|
|
|
-
|
|
|
- this.$parent.showLoading('上传中...')
|
|
|
- let res = this.hasList.filter(i => {
|
|
|
- console.log(i.sceneNum)
|
|
|
- if (this.value == i.sceneNum) {
|
|
|
- return i
|
|
|
- }
|
|
|
- })
|
|
|
- if (res.length > 0) {
|
|
|
- this.$parent.hideLoading()
|
|
|
- this.$message({
|
|
|
- message: '请勿重复添加数据集',
|
|
|
- type: 'error',
|
|
|
- duration: 2000,
|
|
|
- });
|
|
|
- return
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- axios.post(`/indoor/${sceneNum}/api/merge/${this.value}`).then(res => {
|
|
|
- this.$parent.hideLoading()
|
|
|
- this.value = ''
|
|
|
- if (res.data.code == 0) {
|
|
|
- this.getHasSceneList()
|
|
|
+ if (this.value!='') {
|
|
|
+ this.$parent.showLoading('上传中...')
|
|
|
+ let res = this.hasList.filter(i => {
|
|
|
+ console.log(i.sceneNum)
|
|
|
+ if (this.value == i.sceneNum) {
|
|
|
+ return i
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (res.length > 0) {
|
|
|
+ this.$parent.hideLoading()
|
|
|
this.$message({
|
|
|
- message: '数据集添加成功,请点击左侧【数据集】查看',
|
|
|
- type: 'success',
|
|
|
+ message: '请勿重复添加数据集',
|
|
|
+ type: 'error',
|
|
|
duration: 2000,
|
|
|
});
|
|
|
- IV.api.AuthenticationService.sendAuthenticationChanged()
|
|
|
- } else {
|
|
|
+ return
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ axios.post(`/indoor/${sceneNum}/api/merge/${this.value}`).then(res => {
|
|
|
+ this.$parent.hideLoading()
|
|
|
+ this.value = ''
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ this.getHasSceneList()
|
|
|
+ this.$message({
|
|
|
+ message: '数据集添加成功,请点击左侧【数据集】查看',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ IV.api.AuthenticationService.sendAuthenticationChanged()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: '数据集添加失败,请重试',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(err => {
|
|
|
+ this.value = ''
|
|
|
+ this.$parent.hideLoading()
|
|
|
this.$message({
|
|
|
message: '数据集添加失败,请重试',
|
|
|
type: 'error',
|
|
|
duration: 2000,
|
|
|
});
|
|
|
- }
|
|
|
|
|
|
- }).catch(err => {
|
|
|
- this.value = ''
|
|
|
- this.$parent.hideLoading()
|
|
|
- this.$message({
|
|
|
- message: '数据集添加失败,请重试',
|
|
|
- type: 'error',
|
|
|
- duration: 2000,
|
|
|
- });
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
|
|
|
|
|
|
},
|