54 lines
1.4 KiB
Vue
54 lines
1.4 KiB
Vue
|
<template>
|
||
|
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="60%" :before-close="handleClose" center :close-on-click-modal="false">
|
||
|
<data-form ref="datatop" :form="formTop" :inline="inline" :form-model="formModel" :rules="topRules" />
|
||
|
<span slot="footer" class="dialog-footer">
|
||
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||
|
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||
|
</span>
|
||
|
</el-dialog>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import { getDeviceDetail, setIbpConfig} from '@/api/project';
|
||
|
export default {
|
||
|
name: 'EditConfigIbp',
|
||
|
data() {
|
||
|
return {
|
||
|
title: '编辑IBP盘配置',
|
||
|
formTop: {},
|
||
|
formModel: {},
|
||
|
topRules: {},
|
||
|
dialogVisible: false,
|
||
|
inline: true
|
||
|
};
|
||
|
},
|
||
|
computed: {
|
||
|
},
|
||
|
methods: {
|
||
|
doShow() {
|
||
|
this.dialogVisible = true;
|
||
|
},
|
||
|
initData(row) {
|
||
|
getDeviceDetail(row.id).then(resp => {
|
||
|
if (resp.data.config) {
|
||
|
this.formModel = JSON.parse(resp.data.config);
|
||
|
}
|
||
|
}).catch(()=> {
|
||
|
this.$message.error('获取项目设备详情失败!');
|
||
|
});
|
||
|
},
|
||
|
doSave() {
|
||
|
|
||
|
},
|
||
|
handleClose() {
|
||
|
this.formModel = {};
|
||
|
this.dialogVisible = false;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
|
||
|
</style>
|