设备管理代码调整
This commit is contained in:
parent
8d18151425
commit
ac9a39f94c
@ -117,3 +117,13 @@ export function setCctvConfig(id, data) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 添加/修改CCTV工作站配置 */
|
||||||
|
export function setVrPsdConfig(id, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/device/${id}/config/vrpsd`,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -403,6 +403,10 @@ export default {
|
|||||||
if (this.$route.query.type == 'LSW') {
|
if (this.$route.query.type == 'LSW') {
|
||||||
console.log('进入', `/bigSplitScreen/${resp.data.map.id}`);
|
console.log('进入', `/bigSplitScreen/${resp.data.map.id}`);
|
||||||
this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
|
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 {
|
} else {
|
||||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||||
}
|
}
|
||||||
|
@ -44,9 +44,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</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">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig } from '@/api/project';
|
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig } from '@/api/project';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EditConfig',
|
name: 'EditConfig',
|
||||||
@ -120,6 +120,19 @@ export default {
|
|||||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
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() {
|
handleClose() {
|
||||||
|
@ -179,7 +179,7 @@ export default {
|
|||||||
this.$refs.editConfig.doShow(row);
|
this.$refs.editConfig.doShow(row);
|
||||||
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD') {
|
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD') {
|
||||||
this.$refs.editConfigGateway.doShow(row);
|
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);
|
this.$refs.editConfigScreen.doShow(row);
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('暂无配置内容');
|
this.$messageBox('暂无配置内容');
|
||||||
|
Loading…
Reference in New Issue
Block a user