__init__.py
4.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# coding=utf-8
#author: 4N
#createtime: 2021/3/1
#email: nheweijun@sina.com
from flasgger import swag_from
from flask import Blueprint
from app.util import BlueprintApi
from . import field_edit
from . import table_list
from . import field_list
from . import table_edit
from . import table_info
from . import table_refresh
from . import table_delete
from . import table_view
from . import table_vacuate
from . import table_vacuate_one
from . import table_vacuate_info
from . import table_vacuate_detail
from . import table_vacuate_ref
from . import table_vacuate_delete
from . import field_value
from . import table_check
import configure
from app.decorators.auth_decorator import auth_decorator
class DataManager(BlueprintApi):
bp = Blueprint("DataManager", __name__, url_prefix="/API/Manager")
@staticmethod
@bp.route('/FieldEdit', methods=['POST'])
@swag_from(field_edit.Api.api_doc)
@auth_decorator(configure.DataPermission)
def field_edit():
"""
修改属性别名
"""
return field_edit.Api().result
@staticmethod
@bp.route('/FieldList', methods=['POST'])
@swag_from(field_list.Api.api_doc)
def field_list():
"""
属性列表
"""
return field_list.Api().result
@staticmethod
@bp.route('/FieldValue', methods=['POST'])
@swag_from(field_value.Api.api_doc)
@auth_decorator(configure.DataPermission)
def field_value():
"""
属性值
"""
return field_value.Api().result
@staticmethod
@bp.route('/TableList', methods=['POST'])
@swag_from(table_list.Api.api_doc)
def table_list():
"""
数据列表
"""
return table_list.Api().result
@staticmethod
@bp.route('/TableEdit', methods=['POST'])
@swag_from(table_edit.Api.api_doc)
@auth_decorator(configure.DataPermission)
def table_edit():
"""
修改数据
"""
return table_edit.Api().result
@staticmethod
@bp.route('/TableDelete', methods=['POST'])
@swag_from(table_delete.Api.api_doc)
@auth_decorator(configure.DataPermission)
def table_delete():
"""
删除数据
"""
return table_delete.Api().result
@staticmethod
@bp.route('/TableInfo', methods=['POST'])
@swag_from(table_info.Api.api_doc)
def table_info():
"""
数据信息
"""
return table_info.Api().result
@staticmethod
@bp.route('/TableCheck', methods=['POST'])
@swag_from(table_check.Api.api_doc)
def table_check():
"""
检查表是否存在
"""
return table_check.Api().result
@staticmethod
@bp.route('/TableRefresh', methods=['POST'])
@swag_from(table_refresh.Api.api_doc)
@auth_decorator(configure.DataPermission)
def table_refresh():
"""
刷新数据
"""
return table_refresh.Api().result
@staticmethod
@bp.route('/TableView', methods=['POST'])
@swag_from(table_view.Api.api_doc)
def table_view():
"""
数据浏览
"""
return table_view.Api().result
@staticmethod
@bp.route('/TableVacuate', methods=['POST'])
@swag_from(table_vacuate.Api.api_doc)
@auth_decorator(configure.DataPermission)
def table_vacuate():
"""
数据抽稀
"""
return table_vacuate.Api().result
@staticmethod
@bp.route('/TableVacuateOne', methods=['POST'])
@swag_from(table_vacuate_one.Api.api_doc)
@auth_decorator(configure.DataPermission)
def api_table_vacuate_one():
"""
单独数据抽稀
"""
return table_vacuate_one.Api().result
@staticmethod
@bp.route('/TableVacuateInfo', methods=['POST'])
@swag_from(table_vacuate_info.Api.api_doc)
def api_table_vacuate_info():
"""
数据抽稀情况
"""
return table_vacuate_info.Api().result
@staticmethod
@bp.route('/TableVacuateDetail', methods=['GET'])
@swag_from(table_vacuate_detail.Api.api_doc)
def api_table_vacuate_detail():
"""
数据抽稀详情
"""
return table_vacuate_detail.Api().result
@staticmethod
@bp.route('/TableVacuateRef', methods=['POST'])
@swag_from(table_vacuate_ref.Api.api_doc)
def api_table_vacuate_ref():
"""
数据抽稀参考
"""
return table_vacuate_ref.Api().result
@staticmethod
@bp.route('/TableVacuateDelete', methods=['POST'])
@swag_from(table_vacuate_delete.Api.api_doc)
@auth_decorator(configure.DataPermission)
def api_table_vacuate_delete():
"""
数据抽稀删除
"""
return table_vacuate_delete.Api().result