Browse Source

修改提交

wangqin
Joe 10 months ago
parent
commit
16a2b64f10
  1. 16
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
  2. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

16
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue

@ -22,9 +22,10 @@ import Form from '@screen/components/FormConfig';
import { cloneDeep } from "lodash"
import { delay } from "@screen/utils/common.js"
import request from "@/utils/request";
import { Message } from "element-ui";
import { axiosIns } from "@screen/utils/axios/auth.js";
// import { axiosIns } from "@screen/utils/axios/auth.js";
const workStatus = [
{
@ -142,7 +143,10 @@ export default {
handler(bool) {
if (!bool) return;
axiosIns.post(`business/device/functions/${this.deviceId}/${51}`)
request({
url: `business/device/functions/${this.deviceId}/${51}`,
method: "post",
})
.then(async (result) => {
if (result.code != 200) return;
@ -197,10 +201,14 @@ export default {
/**
* 接口 地址
*
* https://www.showdoc.com.cn/2450725213006196/10877717880262686
*/
axiosIns.post(`business/device/functions/${this.deviceId}/${functionId}`, result)
request({
url: `business/device/functions/${this.deviceId}/${functionId}`,
method: "post",
params: result,
})
.then((result) => {
if (result.code != 200) return Message.error(`设备操作失败!`);

22
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

@ -71,20 +71,28 @@ export function controlCamera(camId, cmdType) {
* @returns
*/
export async function getRoadInfoByStakeMark(stakeMarkId) {
const stakeMarkInfo = await axiosIns.get(
`/business/stakeMark/${stakeMarkId}`
);
const stakeMarkInfo = await request({
url: `/business/stakeMark/${stakeMarkId}`,
method: "get",
// params
});
if (!stakeMarkInfo.data?.section_id) return {};
const roadSectionInfo = await axiosIns.get(
`/business/roadSection/${stakeMarkInfo.data.section_id}`
);
const roadSectionInfo = await request({
url: `/business/roadSection/${stakeMarkInfo.data.section_id}`,
method: "get",
});
if (!roadSectionInfo.data?.road_id) return {};
return (
(await axiosIns.get(`/business/road/${roadSectionInfo.road_id}`)).data || {}
(
await request({
url: `/business/road/${roadSectionInfo.road_id}`,
method: "get",
})
).data || {}
);
}

Loading…
Cancel
Save