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 { cloneDeep } from "lodash"
import { delay } from "@screen/utils/common.js" import { delay } from "@screen/utils/common.js"
import request from "@/utils/request";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { axiosIns } from "@screen/utils/axios/auth.js"; // import { axiosIns } from "@screen/utils/axios/auth.js";
const workStatus = [ const workStatus = [
{ {
@ -142,7 +143,10 @@ export default {
handler(bool) { handler(bool) {
if (!bool) return; if (!bool) return;
axiosIns.post(`business/device/functions/${this.deviceId}/${51}`) request({
url: `business/device/functions/${this.deviceId}/${51}`,
method: "post",
})
.then(async (result) => { .then(async (result) => {
if (result.code != 200) return; if (result.code != 200) return;
@ -197,10 +201,14 @@ export default {
/** /**
* 接口 地址 * 接口 地址
*
* https://www.showdoc.com.cn/2450725213006196/10877717880262686 * https://www.showdoc.com.cn/2450725213006196/10877717880262686
*/ */
request({
axiosIns.post(`business/device/functions/${this.deviceId}/${functionId}`, result) url: `business/device/functions/${this.deviceId}/${functionId}`,
method: "post",
params: result,
})
.then((result) => { .then((result) => {
if (result.code != 200) return Message.error(`设备操作失败!`); 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 * @returns
*/ */
export async function getRoadInfoByStakeMark(stakeMarkId) { export async function getRoadInfoByStakeMark(stakeMarkId) {
const stakeMarkInfo = await axiosIns.get( const stakeMarkInfo = await request({
`/business/stakeMark/${stakeMarkId}` url: `/business/stakeMark/${stakeMarkId}`,
); method: "get",
// params
});
if (!stakeMarkInfo.data?.section_id) return {}; if (!stakeMarkInfo.data?.section_id) return {};
const roadSectionInfo = await axiosIns.get( const roadSectionInfo = await request({
`/business/roadSection/${stakeMarkInfo.data.section_id}` url: `/business/roadSection/${stakeMarkInfo.data.section_id}`,
); method: "get",
});
if (!roadSectionInfo.data?.road_id) return {}; if (!roadSectionInfo.data?.road_id) return {};
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