fix: 替换参数配置接口
This commit is contained in:
@@ -23,7 +23,7 @@ export function exportConfig(
|
|||||||
*/
|
*/
|
||||||
export function listConfig(query: Record<string, any>) {
|
export function listConfig(query: Record<string, any>) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/list',
|
url: '/configManage/v1/configs',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query,
|
params: query,
|
||||||
});
|
});
|
||||||
@@ -36,7 +36,7 @@ export function listConfig(query: Record<string, any>) {
|
|||||||
*/
|
*/
|
||||||
export function getConfig(configId: string | number) {
|
export function getConfig(configId: string | number) {
|
||||||
return request({
|
return request({
|
||||||
url: `/system/config/${configId}`,
|
url: `/configManage/v1/config/${configId}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ export function getConfig(configId: string | number) {
|
|||||||
*/
|
*/
|
||||||
export function getConfigKey(configKey: string) {
|
export function getConfigKey(configKey: string) {
|
||||||
return request({
|
return request({
|
||||||
url: `/system/config/configKey/${configKey}`,
|
url: `/configManage/v1/config/${configKey}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ export function getConfigKey(configKey: string) {
|
|||||||
*/
|
*/
|
||||||
export function addConfig(data: Record<string, any>) {
|
export function addConfig(data: Record<string, any>) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config',
|
url: '/configManage/v1/config',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
@@ -73,7 +73,7 @@ export function addConfig(data: Record<string, any>) {
|
|||||||
*/
|
*/
|
||||||
export function updateConfig(data: Record<string, any>) {
|
export function updateConfig(data: Record<string, any>) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config',
|
url: '/configManage/v1/config',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
@@ -86,7 +86,7 @@ export function updateConfig(data: Record<string, any>) {
|
|||||||
*/
|
*/
|
||||||
export function delConfig(configId: string | number) {
|
export function delConfig(configId: string | number) {
|
||||||
return request({
|
return request({
|
||||||
url: `/system/config/${configId}`,
|
url: `/configManage/v1/config/${configId}`,
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ export function delConfig(configId: string | number) {
|
|||||||
*/
|
*/
|
||||||
export function refreshCache() {
|
export function refreshCache() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/config/refreshCache',
|
url: '/configManage/v1/config/refreshCache',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ function fnModalVisibleByVive(configId: string | number) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getConfig(configId).then(res => {
|
getConfig(configId).then(res => {
|
||||||
if (res.code === 200 && res.data) {
|
if (res.code === 1 && res.data) {
|
||||||
modalState.from = Object.assign(modalState.from, res.data);
|
modalState.from = Object.assign(modalState.from, res.data);
|
||||||
modalState.title = '参数配置信息';
|
modalState.title = '参数配置信息';
|
||||||
modalState.visibleByView = true;
|
modalState.visibleByView = true;
|
||||||
@@ -265,7 +265,7 @@ function fnModalVisibleByEdit(configId?: string | number) {
|
|||||||
getConfig(configId).then(res => {
|
getConfig(configId).then(res => {
|
||||||
modalState.confirmLoading = false;
|
modalState.confirmLoading = false;
|
||||||
hide();
|
hide();
|
||||||
if (res.code === 200 && res.data) {
|
if (res.code === 1 && res.data) {
|
||||||
modalState.from = Object.assign(modalState.from, res.data);
|
modalState.from = Object.assign(modalState.from, res.data);
|
||||||
modalState.title = '修改参数配置';
|
modalState.title = '修改参数配置';
|
||||||
modalState.visibleByEdit = true;
|
modalState.visibleByEdit = true;
|
||||||
@@ -291,7 +291,7 @@ function fnModalOk() {
|
|||||||
message.loading({ content: '请稍等...', key });
|
message.loading({ content: '请稍等...', key });
|
||||||
config
|
config
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 1) {
|
||||||
message.success({
|
message.success({
|
||||||
content: `${modalState.title}成功`,
|
content: `${modalState.title}成功`,
|
||||||
key,
|
key,
|
||||||
@@ -342,7 +342,7 @@ function fnRecordDelete(configId: string = '0') {
|
|||||||
const key = 'delConfig';
|
const key = 'delConfig';
|
||||||
message.loading({ content: '请稍等...', key });
|
message.loading({ content: '请稍等...', key });
|
||||||
delConfig(configId).then(res => {
|
delConfig(configId).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 1) {
|
||||||
message.success({
|
message.success({
|
||||||
content: `删除成功`,
|
content: `删除成功`,
|
||||||
key,
|
key,
|
||||||
@@ -370,7 +370,7 @@ function fnExportList() {
|
|||||||
const key = 'exportConfig';
|
const key = 'exportConfig';
|
||||||
message.loading({ content: '请稍等...', key });
|
message.loading({ content: '请稍等...', key });
|
||||||
exportConfig(toRaw(queryParams)).then(res => {
|
exportConfig(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 1) {
|
||||||
message.success({
|
message.success({
|
||||||
content: `已完成导出`,
|
content: `已完成导出`,
|
||||||
key,
|
key,
|
||||||
@@ -400,7 +400,7 @@ function fnRefreshCache() {
|
|||||||
const key = 'refreshCache';
|
const key = 'refreshCache';
|
||||||
message.loading({ content: '请稍等...', key });
|
message.loading({ content: '请稍等...', key });
|
||||||
refreshCache().then(res => {
|
refreshCache().then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 1) {
|
||||||
message.success({
|
message.success({
|
||||||
content: `刷新缓存成功`,
|
content: `刷新缓存成功`,
|
||||||
key,
|
key,
|
||||||
@@ -425,7 +425,7 @@ function fnGetList() {
|
|||||||
queryParams.beginTime = queryRangePicker.value[0];
|
queryParams.beginTime = queryRangePicker.value[0];
|
||||||
queryParams.endTime = queryRangePicker.value[1];
|
queryParams.endTime = queryRangePicker.value[1];
|
||||||
listConfig(toRaw(queryParams)).then(res => {
|
listConfig(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === 200 && Array.isArray(res.rows)) {
|
if (res.code === 1 && Array.isArray(res.rows)) {
|
||||||
// 取消勾选
|
// 取消勾选
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
tableState.selectedRowKeys = [];
|
tableState.selectedRowKeys = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user