style: GBK编码问题

This commit is contained in:
TsMask committed 2023-09-28 11:22:53 +08:00
1 parent 0dee0fecc0
commit 6d164cfdf2
1 file changed
+15 -16
+15 -16
View File
@@ -1,13 +1,12 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch'; import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils'; import { parseObjLineToHump } from '@/utils/parse-utils';
import { toRaw } from '@vue/reactivity';
import { stringify } from 'querystring';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import useUserStore from '@/store/modules/user'; import useUserStore from '@/store/modules/user';
/** /**
* ��ѯ�б� * 查询列表
* @param query ��ѯ���� * @param query 查询参数
* @returns object * @returns object
*/ */
export async function listAct(query: Record<string, any>) { export async function listAct(query: Record<string, any>) {
@@ -15,16 +14,16 @@ export async function listAct(query: Record<string, any>) {
let totalSQL = `select count(*) as total from alarm where alarm_status='1' ${filterData} `; let totalSQL = `select count(*) as total from alarm where alarm_status='1' ${filterData} `;
let rowsSQL = `select * from alarm where alarm_status='1' ${filterData}`; let rowsSQL = `select * from alarm where alarm_status='1' ${filterData}`;
// ��ѯ // 查询
let querySQL = ''; let querySQL = '';
if (query.alarm_code) { if (query.alarm_code) {
querySQL += ` and alarm_code = '${query.alarm_code}' `; querySQL += ` and alarm_code = '${query.alarm_code}' `;
} }
if (query.alarm_type) { if (query.alarm_type) {
querySQL += ` and alarm_type = ${query.alarm_type} `; querySQL += ` and alarm_type = '${query.alarm_type}' `;
} }
if (query.pv_flag) { if (query.pv_flag) {
querySQL += ` and pv_flag = ${query.pv_flag} `; querySQL += ` and pv_flag = '${query.pv_flag}' `;
} }
if (query.orig_severity) { if (query.orig_severity) {
querySQL += ` and orig_severity in (${query.orig_severity} )`; querySQL += ` and orig_severity in (${query.orig_severity} )`;
@@ -39,11 +38,11 @@ export async function listAct(query: Record<string, any>) {
querySQL += ` and ne_type like '%${query.ne_type}%' `; querySQL += ` and ne_type like '%${query.ne_type}%' `;
} }
// ��ҳ // 分页
const pageNum = (query.pageNum - 1) * query.pageSize; const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` order by event_time desc limit ${pageNum},${query.pageSize} `; const limtSql = ` order by event_time desc limit ${pageNum},${query.pageSize} `;
// �������� // 发起请求
const result = await request({ const result = await request({
url: `/databaseManagement/v1/select/omc_db/alarm`, url: `/databaseManagement/v1/select/omc_db/alarm`,
method: 'get', method: 'get',
@@ -53,7 +52,7 @@ export async function listAct(query: Record<string, any>) {
}, },
}); });
// �������� // 解析数据
if (result.code === RESULT_CODE_SUCCESS) { if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = { const data: DataList = {
total: 0, total: 0,
@@ -77,8 +76,8 @@ export async function listAct(query: Record<string, any>) {
} }
/** /**
* ȷ�ϸ澯��Ϣ * 确认告警信息
* @param data ��Ȩ���� * @param data 鉴权对象
* @returns object * @returns object
*/ */
export function updateConfirm(data: Record<string, any>) { export function updateConfirm(data: Record<string, any>) {
@@ -100,8 +99,8 @@ export function updateConfirm(data: Record<string, any>) {
} }
/** /**
* ȡ��ȷ�ϸ澯 * 取消确认告警
* @param data ��Ȩ���� * @param data 鉴权对象
* @returns object * @returns object
*/ */
export function cancelConfirm(data: (string | number)[]) { export function cancelConfirm(data: (string | number)[]) {
@@ -125,8 +124,8 @@ export function cancelConfirm(data: (string | number)[]) {
} }
/** /**
* �ֹ�ͬ�� * 手工同步
* @param data ��Ȩ���� * @param data 鉴权对象
* @returns object * @returns object
*/ */
export function listSync() { export function listSync() {