前端代码修改
This commit is contained in:
parent
ccbb26cb2d
commit
a4351e3754
|
|
@ -47,7 +47,6 @@ service.interceptors.request.use(
|
||||||
repeatSubmit = false,
|
repeatSubmit = false,
|
||||||
skipReplayProtection = false
|
skipReplayProtection = false
|
||||||
} = headers
|
} = headers
|
||||||
console.error(process.env.NODE_ENV);
|
|
||||||
|
|
||||||
// 设置请求头
|
// 设置请求头
|
||||||
config.headers['encryptRequest'] = systemConfig.requestConfig.encryptRequest && encryptRequest ? 'true' : 'false'
|
config.headers['encryptRequest'] = systemConfig.requestConfig.encryptRequest && encryptRequest ? 'true' : 'false'
|
||||||
|
|
@ -243,7 +242,6 @@ service.interceptors.response.use(
|
||||||
) {
|
) {
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
console.log(msg);
|
|
||||||
|
|
||||||
// 账号在其他设备登录的安全提示(基于后端返回信息关键词识别)
|
// 账号在其他设备登录的安全提示(基于后端返回信息关键词识别)
|
||||||
const otherDeviceLogin = /检测到您的账号已在其他设备登录/.test(String(msg || ''))
|
const otherDeviceLogin = /检测到您的账号已在其他设备登录/.test(String(msg || ''))
|
||||||
|
|
|
||||||
|
|
@ -137,9 +137,10 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg);
|
this.$modal.msgError(res.msg);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
})
|
||||||
|
.catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
console.error('删除失败:', error);
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -146,8 +146,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -129,8 +129,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -122,8 +122,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -129,8 +129,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -138,8 +138,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
export const formLabel = [
|
||||||
|
{
|
||||||
|
isShow: false, // 是否展示label
|
||||||
|
f_type: 'ipt',
|
||||||
|
f_label: '数据类型名称',
|
||||||
|
f_model: 'dataTypeName',
|
||||||
|
f_max: 32,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
export const columnsList = [
|
||||||
|
{ t_props: 'pName', t_label: '数据分类类型' },
|
||||||
|
{ t_props: 'dataTypeName', t_label: '数据类型名称' },
|
||||||
|
{ t_props: 'updateUserName', t_label: '更新人' },
|
||||||
|
{ t_props: 'updateTime', t_label: '更新时间' },
|
||||||
|
{ t_props: 'remark', t_label: '备注' }
|
||||||
|
]
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
<template>
|
||||||
|
<!-- 数据分类管理 -->
|
||||||
|
<div class="app-container">
|
||||||
|
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="dataClassTableRef"
|
||||||
|
:columnsList="columnsList" :request-api="getListDataClassAPI">
|
||||||
|
<template slot="btn">
|
||||||
|
<el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['data:classify:add']"
|
||||||
|
@click="handleAdd">
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template slot="handle" slot-scope="{ data }">
|
||||||
|
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['data:classify:update']"
|
||||||
|
@click="handleUpdate(data)">
|
||||||
|
修改
|
||||||
|
</el-button>
|
||||||
|
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['data:classify:del']"
|
||||||
|
@click="handleDelete(data)">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</TableModel>
|
||||||
|
<!-- 新增/编辑 -->
|
||||||
|
<!-- <DataClassForm v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title"
|
||||||
|
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :disabled="loading" :width="600" /> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import TableModel from '@/components/TableModel'
|
||||||
|
import { columnsList, formLabel } from './config'
|
||||||
|
import {
|
||||||
|
deleteDataClassAPI,
|
||||||
|
getListDataClassAPI,
|
||||||
|
} from '@/api/data-collect/data-class-manage'
|
||||||
|
// import DataClassForm from './prop/dataClassForm'
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DataClassManage',
|
||||||
|
components: {
|
||||||
|
TableModel,
|
||||||
|
// DataClassForm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formLabel,
|
||||||
|
columnsList,
|
||||||
|
getListDataClassAPI,
|
||||||
|
title: "",
|
||||||
|
isflag: false,
|
||||||
|
isAdd: '',
|
||||||
|
row: {},
|
||||||
|
loading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.title = "新增";
|
||||||
|
this.isAdd = 'add';
|
||||||
|
this.isflag = true;
|
||||||
|
},
|
||||||
|
closeDialog() {
|
||||||
|
this.isflag = false;
|
||||||
|
},
|
||||||
|
showColose() {
|
||||||
|
this.isflag = false;
|
||||||
|
},
|
||||||
|
/** 修改操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.title = "修改";
|
||||||
|
this.isAdd = 'edit';
|
||||||
|
this.row = row;
|
||||||
|
this.isflag = true;
|
||||||
|
},
|
||||||
|
/* 搜索操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.dataClassTableRef.getTableList()
|
||||||
|
},
|
||||||
|
/** 删除操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$modal.confirm(`是否确认删除数据类型名称为"${row.dataTypeName}"的数据项?`).then(() => {
|
||||||
|
// 显示加载遮罩
|
||||||
|
this.$modal.loading("正在删除,请稍候...");
|
||||||
|
deleteDataClassAPI({ id: row.id }).then(res => {
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
this.handleQuery();
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
this.$modal.msgError(error);
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
// 用户取消删除,不需要处理
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -99,8 +99,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
this.$modal.msgError("删除失败,请重试");
|
this.$modal.msgError(error);
|
||||||
console.error('删除失败:', error);
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 用户取消删除,不需要处理
|
// 用户取消删除,不需要处理
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue