修复用户管理部门树显示,回退sqlalchemy引用,修复头像修改

This commit is contained in:
不胜舟
2023-11-14 19:44:38 +08:00
parent af6fb5d273
commit 2683e1214c
3 changed files with 41 additions and 42 deletions
+1 -2
View File
@@ -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 (
+4 -4
View File
@@ -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})
} }
} }
}) })
+1 -1
View File
@@ -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,