| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- import { postJ, post, get } from '@/utils/request'
- import Vue from 'vue'
- /**
- * 登录
- */
- export async function login(data) {
- const res = await postJ(Vue.prototype.apiUrl + '/main/user/login', data)
- if (res.code == 0) {
- return res
- }
- return Promise.reject(res.message)
- }
- /**
- * 获取用户信息
- */
- export async function getLoginUser(data) {
- const res = await get(Vue.prototype.apiUrl + '/system/account/getLoginUser', data)
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(res.message)
- }
- // 公司名称
- export async function usName() {
- const data = await get(Vue.prototype.apiUrl + `/pda/mes/us/indexName`)
- if (data.code == 0) {
- return data.data
- }
- return Promise.reject(data.message)
- }
- // 工序列表
- export async function producetaskList() {
- const data = await get(Vue.prototype.apiUrl + `/main/producetask/list`)
- if (data.code == 0) {
- return data.data
- }
- return Promise.reject(data.message)
- }
- /**
- * 查询机构列表
- * @param params 查询条件
- */
- export async function listOrganizations(params) {
- const res = await get(Vue.prototype.apiUrl + `/main/group/getGroupList`, params)
- console.log(res.code, '=====')
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(new Error(res.message))
- }
- /**
- * 查询人员列表
- * @param params 查询条件
- */
- export async function getUserPage(params) {
- // let par = new URLSearchParams(params);
- const res = await get(Vue.prototype.apiUrl + `/main/user/getUserPage`, params)
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(new Error(res.message))
- }
- /**
- * 获取所有用户
- *
- */
- export async function listAllUserBind() {
- const res = await get(Vue.prototype.apiUrl + `/main/user/listAllUserBind`)
- if (res.code == 0) {
- return res.data
- }
- return Promise.reject(new Error(res.message))
- }
|