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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 dataWhether to continue?`, 'tip', { // ElMessageBox.confirm(`This action batch deletes the chief dataWhether 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');
}) })