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