Merge remote-tracking branch 'origin/v2.x' into v2.x

pull/78/head
猿小天 2022-11-04 00:15:22 +08:00
commit ccee4ada56
7 changed files with 6 additions and 11937 deletions

View File

@ -10,7 +10,6 @@ import logging
import traceback import traceback
from django.db.models import ProtectedError from django.db.models import ProtectedError
from rest_framework import exceptions
from rest_framework.exceptions import APIException as DRFAPIException, AuthenticationFailed from rest_framework.exceptions import APIException as DRFAPIException, AuthenticationFailed
from rest_framework.views import set_rollback from rest_framework.views import set_rollback
@ -37,9 +36,6 @@ def CustomExceptionHandler(ex, context):
elif isinstance(ex, DRFAPIException): elif isinstance(ex, DRFAPIException):
set_rollback() set_rollback()
msg = ex.detail msg = ex.detail
elif isinstance(ex, exceptions.APIException):
set_rollback()
msg = ex.detail
elif isinstance(ex, ProtectedError): elif isinstance(ex, ProtectedError):
set_rollback() set_rollback()
msg = "删除失败:该条数据与其他数据有相关绑定" msg = "删除失败:该条数据与其他数据有相关绑定"

View File

@ -1,6 +1,6 @@
{ {
"name": "django-vue-admin", "name": "django-vue-admin",
"version": "2.0.4", "version": "2.0.6",
"scripts": { "scripts": {
"serve": "vue-cli-service serve --open", "serve": "vue-cli-service serve --open",
"start": "npm run serve", "start": "npm run serve",

View File

@ -56,13 +56,7 @@ function closeWebsocket () {
// close() // close()
this.socket.close() this.socket.close()
} }
function close () {
// this.socket.close() // 关闭 websocket
// this.socket.onclose = function (e) {
// console.log(e)// 监听关闭事件
// console.log('关闭')
// }
}
function webSocketSend (message) { function webSocketSend (message) {
this.socket.send(JSON.stringify(message)) this.socket.send(JSON.stringify(message))
} }

View File

@ -160,8 +160,8 @@ export default {
routerViewKey () { routerViewKey () {
// key __transition-n-/foo // key __transition-n-/foo
// key __transition-n-__stamp-time-/foo // key __transition-n-__stamp-time-/foo
const stamp = this.$route.meta[`__stamp-${this.$route.fullpath}`] || '' const stamp = this.$route.meta[`__stamp-${this.$route.fullPath}`] || ''
return `${stamp ? `__stamp-${stamp}-` : ''}${this.$route.fullpath}` return `${stamp ? `__stamp-${stamp}-` : ''}${this.$route.fullPath}`
}, },
/** /**
* @description 最外层容器的背景图片样式 * @description 最外层容器的背景图片样式

View File

@ -1,9 +1,8 @@
import { request } from '@/api/service' import { request } from '@/api/service'
import { urlPrefix as deptPrefix } from '../dept/api'
import util from '@/libs/util' import util from '@/libs/util'
export const crudOptions = (vm) => { export const crudOptions = (vm) => {
util.filterParams(vm, ['dept_name', 'role_info{name}','dept_name_all']) util.filterParams(vm, ['dept_name', 'role_info{name}', 'dept_name_all'])
return { return {
pageOptions: { pageOptions: {
compact: true compact: true

File diff suppressed because it is too large Load Diff