glj-代码提交
This commit is contained in:
parent
3fa1b7c991
commit
8ddaad2138
|
@ -50,12 +50,13 @@ export const updateAdmin = (data) => {
|
|||
* @param ids
|
||||
* @returns {Promise<AxiosResponse<any>>}
|
||||
*/
|
||||
export const remove = (ids) => {
|
||||
export const remove = (ids,email) => {
|
||||
return request({
|
||||
url: '/api/' + moduleName + '/ui/administrator/delete',
|
||||
method: 'delete',
|
||||
params: {
|
||||
ids,
|
||||
email
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ const state = reactive({
|
|||
//租户ID
|
||||
tenantId: website.value.tenantId,
|
||||
//用户名
|
||||
userName: "792163605@qq.com",
|
||||
userName: "",
|
||||
//密码
|
||||
password: "",
|
||||
//账号类型
|
||||
|
|
|
@ -61,12 +61,22 @@ service.interceptors.response.use(
|
|||
} else if (error.response && error.response.data.code == '500') {
|
||||
ElMessage.error(error.response.data.msg);
|
||||
} else {
|
||||
if (error.response.data.error_description) ElMessage.error(error.response.data.error_description);
|
||||
|
||||
if (error.response.data.error == "access_denied") {
|
||||
ElMessage.error("Incorrect verification code");
|
||||
return;
|
||||
}
|
||||
if (error.response.data.error == "invalid_grant") {
|
||||
ElMessage.error("Incorrect username or password");
|
||||
return;
|
||||
}
|
||||
if (error.response.data.error_description)
|
||||
ElMessage.error(error.response.data.error_description);
|
||||
else {
|
||||
//if (error.response.data) ElMessage.error(error.response.statusText);
|
||||
//Session.clear(); // 清除浏览器全部临时缓存
|
||||
//window.location.href = '/'; // 去登录页
|
||||
ElMessage.error('接口路径找不到');
|
||||
ElMessage.error('Interface path not found');
|
||||
}
|
||||
}
|
||||
return Promise.reject(error);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<el-form-item prop="area en" label="areaEn">
|
||||
<el-input v-model="state.ruleForm.areaEn" placeholder="please enter area en" style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="frequency" label="frequency">
|
||||
<el-form-item prop="frequency" label="frequency" v-if="state.ruleForm.source==0">
|
||||
<el-input v-model="state.ruleForm.frequency" placeholder="please enter frequency" style="width: 300px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<el-form-item prop="areaEn" label="area en">
|
||||
<el-input v-model="state.ruleForm.areaEn" placeholder="please enter area en" style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="frequency" label="frequency">
|
||||
<el-form-item prop="frequency" label="frequency" v-if="state.source==0">
|
||||
<el-input v-model="state.ruleForm.frequency" placeholder="please enter frequency" style="width: 300px" type="number"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
|
@ -78,7 +78,7 @@ const state = reactive({
|
|||
//租户ID
|
||||
tenantId: website.value.tenantId,
|
||||
//用户名
|
||||
userName: "792163605@qq.com",
|
||||
userName: "",
|
||||
//密码
|
||||
password: "",
|
||||
//账号类型
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
</el-icon>
|
||||
add
|
||||
</el-button>
|
||||
<el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||
<!-- <el-button size="default" type="danger" class="ml10" @click="batchDel">
|
||||
<el-icon>
|
||||
<ele-Delete/>
|
||||
</el-icon>
|
||||
batch delete
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
<el-table :data="state.tableData.data"
|
||||
v-loading="state.tableData.loading"
|
||||
|
@ -159,25 +159,25 @@ const editUser = (row) => {
|
|||
editAdministratorRef.value.openDialog(row);
|
||||
};
|
||||
//批量删除chief管理员数据
|
||||
const batchDel = () => {
|
||||
if(state.multipleSelection.length == 0){
|
||||
ElMessage.warning("Select the data to be operated first");
|
||||
return false;
|
||||
}
|
||||
ElMessageBox.confirm(`This action batch deletes the chief data,Whether to continue?`, 'tip', {
|
||||
confirmButtonText: 'confirm',
|
||||
cancelButtonText: 'cancel',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
let id = state.multipleSelection.map(item=>item.id)
|
||||
remove(id.join()).then(res=>{
|
||||
getTableData();
|
||||
ElMessage.success('delete successfully');
|
||||
})
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
// const batchDel = () => {
|
||||
// if(state.multipleSelection.length == 0){
|
||||
// ElMessage.warning("Select the data to be operated first");
|
||||
// return false;
|
||||
// }
|
||||
// ElMessageBox.confirm(`This action batch deletes the chief data,Whether to continue?`, 'tip', {
|
||||
// confirmButtonText: 'confirm',
|
||||
// cancelButtonText: 'cancel',
|
||||
// type: 'warning',
|
||||
// })
|
||||
// .then(() => {
|
||||
// let id = state.multipleSelection.map(item=>item.id)
|
||||
// remove(id.join()).then(res=>{
|
||||
// getTableData();
|
||||
// ElMessage.success('delete successfully');
|
||||
// })
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// }
|
||||
// 删除chief管理员数据
|
||||
const deleteUser = (row) => {
|
||||
ElMessageBox.confirm(`This operation will delete the user:“${row.name}”,Whether to continue?`, 'tip', {
|
||||
|
@ -186,7 +186,7 @@ const deleteUser = (row) => {
|
|||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
remove(row.id).then(res=>{
|
||||
remove(row.id,row.email).then(res=>{
|
||||
getTableData();
|
||||
ElMessage.success('Deleted successfully');
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue