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