4 files modified
1 files deleted
| | |
| | | import {request} from "@/utils/index.js"; |
| | | export const getList = (data) => { |
| | | import { request } from "@/utils/requestGd/index.js" |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | // 工单用户登录接口 |
| | | export const ticketLoginInterfaceApi = (tenantId, deptId, roleId, username, password, type, key, code) => { |
| | | return request({ |
| | | url: '/drone-device-core/jobEvent/eventPage', |
| | | url: '/blade-auth/oauth/token', |
| | | method: 'post', |
| | | data, |
| | | header: { |
| | | 'Tenant-Id': tenantId, |
| | | 'Dept-Id': website.switchMode ? deptId : '', |
| | | 'Role-Id': website.switchMode ? roleId : '', |
| | | 'Captcha-Key': key, |
| | | 'Captcha-Code': code, |
| | | }, |
| | | params: { |
| | | tenantId, |
| | | username, |
| | | password, |
| | | grant_type: 'password', |
| | | scope: 'all', |
| | | type, |
| | | }, |
| | | }) |
| | | } |
| | | // 获取状态统计数据 |
| | | // 获取工单列表 |
| | | export const getGdList = data => { |
| | | return request({ |
| | | url: '/drone-gd/workOrder/gdClueEvent/list', |
| | | method: 'get', |
| | | data, |
| | | }); |
| | | }; |
| | | // 获取详情 |
| | | export const getGddetailedData = data => { |
| | | return request({ |
| | | url: '/drone-gd/workOrder/gdClueEvent/detail', |
| | | method: 'get', |
| | | data, |
| | | }); |
| | | }; |
| | | // 获取数量 |
| | | export const getstatusCount = (params) => { |
| | | return request({ |
| | | url: '/drone-device-core/jobEvent/getstatusCount', |
| | | url: '/drone-gd/workOrder/gdClueEvent/count', |
| | | method: 'get', |
| | | params, |
| | | }) |
| | | } |
| | | |
| | | export const getStepInfo = (eventNum) => { |
| | | // 退回工单 |
| | | export const backGdApi = (data) => { |
| | | return request({ |
| | | url: '/drone-device-core/jobEvent/getStepInfo', |
| | | method: 'get', |
| | | params: { eventNum } |
| | | }) |
| | | } |
| | | |
| | | // 修改接口:处理待审核状态,动态构建 FormData 提交 |
| | | export const flowEvent = (data, file) => { |
| | | const formData = new FormData() |
| | | |
| | | // 动态添加非空字段到 FormData |
| | | Object.entries(data).forEach(([key, value]) => { |
| | | if (value !== undefined && value !== null) { |
| | | formData.append(key, value) |
| | | } |
| | | }) |
| | | |
| | | // 如果 file 存在,则添加到 FormData |
| | | if (file) { |
| | | formData.append('file', file) |
| | | } |
| | | for (let [key, value] of formData.entries()) { |
| | | console.log(key, value) |
| | | } |
| | | console.log('formData',formData) |
| | | return request({ |
| | | url: '/drone-device-core/jobEvent/flowEvent', |
| | | url: '/drone-gd/workOrder/gdClueEvent/handle', |
| | | method: 'post', |
| | | data: formData, |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data', // 设置为表单数据格式 |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | // 新增接口:获取工单详细信息 |
| | | export const getTicketInfo = (id) => { |
| | | return request({ |
| | | url: '/drone-device-core/jobEvent/getTicketInfo', |
| | | method: 'get', |
| | | params: { id }, // 使用工单 ID 查询 |
| | | data, |
| | | }) |
| | | } |
| | |
| | | |
| | | <script setup> |
| | | import { getAssetsImage } from "@/utils/index.js"; |
| | | import {ticketLoginInterfaceApi} from '@/api/work/index1.js' |
| | | import {ticketLoginInterfaceApi} from '@/api/work/index.js' |
| | | import md5 from "js-md5"; |
| | | import { loginByUsername } from "@/api/user/index.js"; |
| | | import { useUserStore, useLocationStore } from "@/store/index.js"; |
| | |
| | | <script setup> |
| | | |
| | | import { useUserStore } from '@/store/index.js' |
| | | import {getGdList,getstatusCount} from '/src/api/work/index1.js' |
| | | import {getGdList,getstatusCount} from '/src/api/work/index.js' |
| | | import dayjs from 'dayjs'; |
| | | import { getStatusBarHeight } from '@/utils/common'; |
| | | const userStore = useUserStore() |
| | |
| | | <script setup> |
| | | // import { getShowImg, getSmallImg } from '@/utils/util' |
| | | import { ref, computed } from 'vue' |
| | | import {getGddetailedData,backGdApi} from '/src/api/work/index1.js' |
| | | import {getGddetailedData,backGdApi} from '/src/api/work/index.js' |
| | | import dayjs from 'dayjs' |
| | | const formatDate = dateString => { |
| | | return dayjs(dateString).format('MM/DD HH:mm') |
| | |
| | | color: #1d6fe9; |
| | | text-decoration: underline; |
| | | text-align: right; |
| | | |
| | | |
| | | padding-top: 1px; |
| | | padding-left: 5px; |
| | | padding-right: 2px; |