Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
dfd148897b
@ -2,7 +2,7 @@
|
||||
<el-dialog v-dialogDrag title="复制地图为" :visible.sync="dialogVisible" width="30%" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -19,6 +19,7 @@ export default {
|
||||
name: '',
|
||||
copyOtherData: false
|
||||
},
|
||||
loading: false,
|
||||
mapId: '',
|
||||
form:{
|
||||
labelWidth: '100px',
|
||||
@ -46,10 +47,18 @@ export default {
|
||||
this.mapId = row.id;
|
||||
},
|
||||
doSave() {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
copyMapAs(this.mapId, this.formModel).then(resp =>{
|
||||
this.$message.success('复制地图成功!');
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('refresh');
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(`复制地图失败!`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -45,6 +45,7 @@ export default {
|
||||
project: false,
|
||||
projectCode: ''
|
||||
},
|
||||
loading: false,
|
||||
projectCodeShow: false,
|
||||
booleanValue: {
|
||||
t: true,
|
||||
@ -63,10 +64,17 @@ export default {
|
||||
doSave() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
setMapProject(this.formModel).then(resp =>{
|
||||
this.$message.success('设置归属项目成功!');
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('refresh');
|
||||
}).catch( ()=>{
|
||||
this.$messageBox(`设置归属项目失败!`);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user