| | |
| | | import moment from "moment"; |
| | | import { |
| | | deviceTypes, |
| | | getLoginNameVoList, |
| | | getProjectList, |
| | | getDeviceListByType, |
| | | getDeviceDetailCheckListByType |
| | | } from './service.js' |
| | |
| | | } |
| | | |
| | | const userInfo = JSON.parse(userInfoStr); |
| | | const userId = userInfo.userId; |
| | | const clientId = userInfo.userId; |
| | | |
| | | if (!userId) { |
| | | console.error("用户信息中未找到 userId"); |
| | | if (!clientId) { |
| | | console.error("用户信息中未找到 clientId"); |
| | | return; |
| | | } |
| | | |
| | | const res = await getLoginNameVoList({ userId }); |
| | | const res = await getProjectList({ clientId }); |
| | | if (res && res) { |
| | | this.projectList = res.map((item) => ({ |
| | | label: item.name, |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // ==================== 项目端接口 ==================== |
| | | // 获取项目-委托方列表 |
| | | // 获取项目列表 |
| | | export const getProjectList = async (params) => { |
| | | return request(`/project/list`, { |
| | | method: 'get', params |
| | | }) |
| | | } |
| | | // 获取项目-委托方列表(旧接口,已废弃) |
| | | export const getLoginNameVoList = async (params) => { |
| | | return request(`/project/getLoginNameVoList`, { |
| | | method: 'get', params |
| | |
| | | import HeaderBox from "../header/index.vue"; |
| | | import moment from "moment"; |
| | | import { |
| | | getLoginNameVoList, |
| | | getProjectList, |
| | | getHiddenDangerListByType, |
| | | getHiddenDangerDetailByType, |
| | | editResponsiblePersonByType, |
| | |
| | | } |
| | | |
| | | const userInfo = JSON.parse(userInfoStr); |
| | | const userId = userInfo.userId; |
| | | const clientId = userInfo.userId; |
| | | |
| | | if (!userId) { |
| | | console.error("用户信息中未找到 userId"); |
| | | if (!clientId) { |
| | | console.error("用户信息中未找到 clientId"); |
| | | return; |
| | | } |
| | | |
| | | const res = await getLoginNameVoList({ userId }); |
| | | const res = await getProjectList({ clientId }); |
| | | if (res && res) { |
| | | this.projectList = res.map((item) => ({ |
| | | label: item.name, |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // ==================== 项目端接口 ==================== |
| | | // 获取项目-委托方列表 |
| | | export const getLoginNameVoList = async (params) => { |
| | | return request(`/project/getLoginNameVoList`, { |
| | | // 获取项目列表 |
| | | export const getProjectList = async (params) => { |
| | | return request(`/project/list`, { |
| | | method: 'get', params |
| | | }) |
| | | } |