设备管理代码调整

This commit is contained in:
joylink_cuiweidong 2020-07-07 18:25:05 +08:00
parent 8d18151425
commit ac9a39f94c
5 changed files with 29 additions and 5 deletions

View File

@ -117,3 +117,13 @@ export function setCctvConfig(id, data) {
data: data
});
}
/** 添加/修改CCTV工作站配置 */
export function setVrPsdConfig(id, data) {
return request({
url: `/api/device/${id}/config/vrpsd`,
method: 'put',
data: data
});
}

View File

@ -403,6 +403,10 @@ export default {
if (this.$route.query.type == 'LSW') {
console.log('进入', `/bigSplitScreen/${resp.data.map.id}`);
this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
} else if (this.$route.query.type == 'CCTV') {
// this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
} else if (this.$route.query.type == 'VR_PSD') {
// this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
} else {
this.$router.push({ path: `/jointTrainingNew`, query: query });
}

View File

@ -44,9 +44,6 @@
</el-select>
</el-form-item>
</el-form>
<el-form v-show="data.type === 'LSW'" ref="formLw" :model="formLw" label-width="100px" :rules="rulesLw">
</el-form>
<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>

View File

@ -31,7 +31,7 @@
</template>
<script>
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig } from '@/api/project';
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig } from '@/api/project';
export default {
name: 'EditConfig',
@ -120,6 +120,19 @@ export default {
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
});
});
} else if (this.data.type == 'VR_PSD') {
this.$refs.form.validate(() => {
const param = {
deviceCode: this.formData.deviceCode
};
setVrPsdConfig(this.data.id, param).then(response => {
self.$message.success('设置虚拟屏蔽门工作站配置成功');
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
});
});
}
},
handleClose() {

View File

@ -179,7 +179,7 @@ export default {
this.$refs.editConfig.doShow(row);
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD') {
this.$refs.editConfigGateway.doShow(row);
} else if (row.type == 'LSW' || row.type == 'CCTV') {
} else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD') {
this.$refs.editConfigScreen.doShow(row);
} else {
this.$messageBox('暂无配置内容');