| | |
| | | iSYS_ROLE_PROD, |
| | | } from './model/systemModel'; |
| | | import { defHttp } from '/@/utils/http/axios'; |
| | | import { isNullOrEmpty, isTimeType } from '/@/utils/is'; |
| | | import { isDate, isNullOrEmpty, isTimeType } from '/@/utils/is'; |
| | | import { MES_ROUTE_EDGE, MES_ROUTE_NODE } from './model/router'; |
| | | |
| | | export enum Api { |
| | |
| | | Keys[k] != '0' && |
| | | !Keys[k].toString().endsWith('PSelect_0') |
| | | ) { |
| | | if (!isNullOrEmpty(params[Keys[k]].length) && isTimeType(params[Keys[k]][0])) { |
| | | if (!isNullOrEmpty(params[Keys[k]].length) && isDate(params[Keys[k]][0])) { |
| | | sqlcmd += ` And ${Keys[k]} > '${params[Keys[k]][0]}'`; |
| | | sqlcmd += ` And ${Keys[k]} < '${params[Keys[k]][1]}'`; |
| | | } else { |
| | |
| | | ); |
| | | } |
| | | |
| | | //获取服务器Json文件返回Json数据 |
| | | /** |
| | | * @description: 根据条件删除 |
| | | * @param {string} sqlcmd |
| | | * @param {string} entityName |
| | | * @return {*} |
| | | */ |
| | | export const DeleteWhere = async (sqlcmd: string, entityName: string) => { |
| | | const usParams = genAction(entityName, sqlcmd); |
| | | return await defHttp.post( |
| | | { url: Api.DeleteWhere, params: usParams }, |
| | | { |
| | | errorMessageMode: 'none', |
| | | isTransformResponse: false, |
| | | }, |
| | | ); |
| | | }; |
| | | |
| | | /** |
| | | * @description: 获取服务器Json文件返回Json数据 |
| | | * @param {string} url |
| | | * @return {*} |
| | | */ |
| | | export async function fetchJson(url: string) { |
| | | try { |
| | | const response = await fetch(url); |