main
黄海 2 years ago
parent 53188e0224
commit 7e85de944b

@ -459,11 +459,16 @@ class HuiJiModel(object):
list1, cnt = Db.paginate(sql, page, limit)
return list1, cnt
def getFormType(self):
def getFormTypeList(self):
sql = "select * from t_huiji_form_type"
list1, cnt = Db.paginate(sql, 1, 1000)
return list1, cnt
def getFormType(self, type_id):
sql = "select * from t_huiji_form_type where type_id=%s" % type_id
list1, cnt = Db.paginate(sql, 1, 1000)
return list1, cnt
def addFormType(self, type_name):
sql = "insert into t_huiji_form_type(type_id,type_name) values('%s','%s')"
type_id = uuid.uuid1()

@ -325,9 +325,16 @@ def getTaskFillInfo():
# 获取表单类型
@app.route('/Mars/getFormTypeList', methods=['GET'])
def getFormTypeList():
res, cnt = hm.getFormTypeList()
return jsonify(CommonUtil.renderJsonForLayUI(res, cnt))
@app.route('/Mars/getFormType', methods=['GET'])
def getFormType():
res, cnt = hm.getFormType()
type_id = request.args.get("type_id")
res, cnt = hm.getFormType(type_id)
return jsonify(CommonUtil.renderJsonForLayUI(res, cnt))

Loading…
Cancel
Save