Loading src/store/modules/user.js +2 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ const useUserStore = defineStore( getInfo().then(res => { const user = res.user console.log('%c [ user ]-38', 'font-size:13px; background:pink; color:#bf2c9f;', user) const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar; const avatar = (user.avatar == "" || user.avatar == null) ? defAva : 'http://192.168.4.206'+ user.avatar; // const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar; if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 this.roles = res.roles Loading src/utils/request.js +2 −2 Original line number Diff line number Diff line Loading @@ -111,9 +111,9 @@ service.interceptors.response.use(res => { console.log('err' + error) let { message } = error; if (message == "Network Error") { message = "后端接口连接异常"; message = "亲,加载失败,请稍后再试。"; } else if (message.includes("timeout")) { message = "系统接口请求超时"; message = "亲,网络超时啦。提示您检查网络连接,如路由器、移动数据。引导您重启网络设备或稍等再操作。"; } else if (message.includes("Request failed with status code")) { message = "系统接口" + message.substr(message.length - 3) + "异常"; } Loading src/views/algorithmControl/index.vue +0 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ plain icon="Plus" @click="handleAdd" v-hasPermi="['monitor:job:add']" >新增</el-button> </el-col> <!-- <el-col :span="1.5"> Loading src/views/algorithmList/components/algorithmDown.vue +6 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ </el-form> <template #footer> <div class="dialog-footer"> <el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" :loading="butLoading" @click="submitForm">确 定</el-button> <el-button @click="cancel">取 消</el-button> </div> </template> Loading @@ -87,6 +87,7 @@ const { proxy } = getCurrentInstance(); const emit = defineEmits(); const open = ref(false); const openAdd = ref(false); const butLoading = ref(false); const title = ref(""); const titleLevel = ref(""); const loading = ref(true); Loading @@ -109,6 +110,7 @@ const { queryParams, form, rules } = toRefs(data); /** 表单重置 */ function reset() { butLoading.value = false; form.value = { id: undefined, alarmName: undefined, Loading Loading @@ -157,16 +159,19 @@ function submitForm() { proxy.$refs["algLevelRef"].validate(valid => { if (valid) { form.value.alarmShowType=form.value.alarmShowType.join() butLoading.value = true; if (form.value.id != undefined) { updateAlgLevel(form.value).then(response => { proxy.$modal.msgSuccess("修改成功"); openAdd.value = false; butLoading.value = false; getLevelList(); }); } else { addAlgLevel(form.value).then(response => { proxy.$modal.msgSuccess("新增成功"); openAdd.value = false; butLoading.value = false; getLevelList(); }); } Loading Loading
src/store/modules/user.js +2 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,8 @@ const useUserStore = defineStore( getInfo().then(res => { const user = res.user console.log('%c [ user ]-38', 'font-size:13px; background:pink; color:#bf2c9f;', user) const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar; const avatar = (user.avatar == "" || user.avatar == null) ? defAva : 'http://192.168.4.206'+ user.avatar; // const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar; if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 this.roles = res.roles Loading
src/utils/request.js +2 −2 Original line number Diff line number Diff line Loading @@ -111,9 +111,9 @@ service.interceptors.response.use(res => { console.log('err' + error) let { message } = error; if (message == "Network Error") { message = "后端接口连接异常"; message = "亲,加载失败,请稍后再试。"; } else if (message.includes("timeout")) { message = "系统接口请求超时"; message = "亲,网络超时啦。提示您检查网络连接,如路由器、移动数据。引导您重启网络设备或稍等再操作。"; } else if (message.includes("Request failed with status code")) { message = "系统接口" + message.substr(message.length - 3) + "异常"; } Loading
src/views/algorithmControl/index.vue +0 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ plain icon="Plus" @click="handleAdd" v-hasPermi="['monitor:job:add']" >新增</el-button> </el-col> <!-- <el-col :span="1.5"> Loading
src/views/algorithmList/components/algorithmDown.vue +6 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ </el-form> <template #footer> <div class="dialog-footer"> <el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" :loading="butLoading" @click="submitForm">确 定</el-button> <el-button @click="cancel">取 消</el-button> </div> </template> Loading @@ -87,6 +87,7 @@ const { proxy } = getCurrentInstance(); const emit = defineEmits(); const open = ref(false); const openAdd = ref(false); const butLoading = ref(false); const title = ref(""); const titleLevel = ref(""); const loading = ref(true); Loading @@ -109,6 +110,7 @@ const { queryParams, form, rules } = toRefs(data); /** 表单重置 */ function reset() { butLoading.value = false; form.value = { id: undefined, alarmName: undefined, Loading Loading @@ -157,16 +159,19 @@ function submitForm() { proxy.$refs["algLevelRef"].validate(valid => { if (valid) { form.value.alarmShowType=form.value.alarmShowType.join() butLoading.value = true; if (form.value.id != undefined) { updateAlgLevel(form.value).then(response => { proxy.$modal.msgSuccess("修改成功"); openAdd.value = false; butLoading.value = false; getLevelList(); }); } else { addAlgLevel(form.value).then(response => { proxy.$modal.msgSuccess("新增成功"); openAdd.value = false; butLoading.value = false; getLevelList(); }); } Loading