修复用户管理部门树显示,回退sqlalchemy引用,修复头像修改
This commit is contained in:
@@ -2,8 +2,7 @@ import datetime
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from flask import Flask, request
|
from flask import Flask, request
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy, BaseQuery
|
||||||
from flask_sqlalchemy.query import Query as BaseQuery
|
|
||||||
from flask_marshmallow import Marshmallow
|
from flask_marshmallow import Marshmallow
|
||||||
from marshmallow import fields
|
from marshmallow import fields
|
||||||
from marshmallow.validate import (
|
from marshmallow.validate import (
|
||||||
|
|||||||
@@ -80,10 +80,10 @@
|
|||||||
elem: '#selectParent',
|
elem: '#selectParent',
|
||||||
url: '/system/dept/tree',
|
url: '/system/dept/tree',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
selectInputName: { nodeId: 'deptId', context: 'deptName' },
|
selectInputName: {nodeId: 'deptId', context: 'deptName'},
|
||||||
skin: 'layui',
|
skin: 'layui',
|
||||||
dataFormat: 'list',
|
dataFormat: 'list',
|
||||||
response: { treeId: 'deptId', parentId: 'parentId', title: 'deptName' },
|
response: {treeId: 'id', parentId: 'parent_id', title: 'dept_name'},
|
||||||
selectInitVal: "{{ user.dept_id }}"
|
selectInitVal: "{{ user.dept_id }}"
|
||||||
})
|
})
|
||||||
form.on('submit(user-update)', function (data) {
|
form.on('submit(user-update)', function (data) {
|
||||||
@@ -101,12 +101,12 @@
|
|||||||
type: 'put',
|
type: 'put',
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
layer.msg(result.msg, { icon: 1, time: 1000 }, function () {
|
layer.msg(result.msg, {icon: 1, time: 1000}, function () {
|
||||||
parent.layer.close(parent.layer.getFrameIndex(window.name))//关闭当前页
|
parent.layer.close(parent.layer.getFrameIndex(window.name))//关闭当前页
|
||||||
parent.layui.table.reload('user-table')
|
parent.layui.table.reload('user-table')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
layer.msg(result.msg, { icon: 2, time: 1000 })
|
layer.msg(result.msg, {icon: 2, time: 1000})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
formData.append('fileToken', timeStamp)
|
formData.append('fileToken', timeStamp)
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: '/admin/file/upload', //用于文件上传的服务器端请求地址
|
url: '/system/file/upload', //用于文件上传的服务器端请求地址
|
||||||
data: formData,
|
data: formData,
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user