fix: 替换字典数据接口
This commit is contained in:
@@ -286,7 +286,7 @@ function fnModalVisibleByEdit(dictCode?: string | number) {
|
||||
getData(dictCode).then(res => {
|
||||
modalState.confirmLoading = false;
|
||||
hide();
|
||||
if (res.code === 200) {
|
||||
if (res.code === 1) {
|
||||
modalState.from = Object.assign(modalState.from, res.data);
|
||||
modalState.title = '修改字典数据';
|
||||
modalState.visibleByEdit = true;
|
||||
@@ -312,7 +312,7 @@ function fnModalOk() {
|
||||
message.loading({ content: '请稍等...', key });
|
||||
dictData
|
||||
.then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.code === 1) {
|
||||
message.success({
|
||||
content: `${modalState.title}成功`,
|
||||
key,
|
||||
@@ -363,7 +363,7 @@ function fnRecordDelete(dictCode: string = '0') {
|
||||
const key = 'delData';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
delData(dictCode).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.code === 1) {
|
||||
message.success({
|
||||
content: `删除成功`,
|
||||
key,
|
||||
@@ -391,7 +391,7 @@ function fnExportList() {
|
||||
const key = 'exportData';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
exportData(toRaw(queryParams)).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (res.code === 1) {
|
||||
message.success({
|
||||
content: `已完成导出`,
|
||||
key,
|
||||
@@ -425,7 +425,7 @@ function fnGetList() {
|
||||
if (tableState.loading) return;
|
||||
tableState.loading = true;
|
||||
listData(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) {
|
||||
tableState.selectedRowKeys = [];
|
||||
@@ -448,7 +448,7 @@ onMounted(() => {
|
||||
}
|
||||
if (resArr[1].status === 'fulfilled') {
|
||||
const dicts = resArr[1].value;
|
||||
if (dicts.code === 200) {
|
||||
if (dicts.code === 1) {
|
||||
dict.sysDictType = dicts.data;
|
||||
}
|
||||
}
|
||||
@@ -456,7 +456,7 @@ onMounted(() => {
|
||||
// 指定字典id列表数据
|
||||
if (dictId && dictId !== '0') {
|
||||
getType(dictId).then(res => {
|
||||
if (res.code === 200 && res.data) {
|
||||
if (res.code === 1 && res.data) {
|
||||
queryParams.dictType = res.data.dictType;
|
||||
fnGetList();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user