glj-代码提交

This commit is contained in:
glj 2023-07-10 16:44:30 +08:00
parent 3fa1b7c991
commit 8ddaad2138
7 changed files with 40 additions and 29 deletions

View File

@ -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
}
})
}

View File

@ -87,7 +87,7 @@ const state = reactive({
//ID
tenantId: website.value.tenantId,
//
userName: "792163605@qq.com",
userName: "",
//
password: "",
//

View File

@ -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);

View File

@ -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>

View File

@ -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>

View File

@ -78,7 +78,7 @@ const state = reactive({
//ID
tenantId: website.value.tenantId,
//
userName: "792163605@qq.com",
userName: "",
//
password: "",
//

View File

@ -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 dataWhether 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 dataWhether 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');
})