diff --git a/input/InputForm.py b/input/InputForm.py index a9ecedf..c54ab17 100644 --- a/input/InputForm.py +++ b/input/InputForm.py @@ -50,3 +50,19 @@ class InputForm: res: desc """ pass + + @staticmethod + def choose_industry_obj(): + """ + 选择行业 + Parameters: + - + Returns: + res: desc + """ + return choose_industry_script() + + @staticmethod + def questionnaire_obj(): + return questionnaire_script() + diff --git a/input/routes.py b/input/routes.py index 664625c..18faaae 100644 --- a/input/routes.py +++ b/input/routes.py @@ -68,4 +68,27 @@ def submit_general_rating_input(**kwargs): res: desc """ info = "提交成功" - return {"info": "info"} + return {"info": info} + + +@input_route.route('choose_industry', methods=['GET']) +@verify_token +def choose_industry_route(**kwargs): + """ + Notes + Parameters: + - + Returns: + res: desc + """ + input_form = InputForm() + result = input_form.choose_industry_obj() + return {"info": "查询成功", "result": result} + + +# @input_route.route('questionnaire', methods=['GET']) +# @verify_token +# def questionnaire(): +# input_form = InputForm() +# result = input_form.questionnaire_obj() +# return {"info": "题目", "result": result} \ No newline at end of file diff --git a/input/scripts.py b/input/scripts.py index b1fdc62..1f8de2f 100644 --- a/input/scripts.py +++ b/input/scripts.py @@ -138,3 +138,27 @@ def save_general_input_form(cid, input_form): """ rid = find_rating_records({"企业ID": cid, "进行状态": "进行"})[0]['评价ID'] update_general_input(rid, input_form) + + +def choose_industry_script(): + """ + 选择行业 + Parameters: + - + Returns: + res: desc + """ + data = read_json_file(file_path('/input/static/json/industry.json')) + return data + + +def questionnaire_script(): + """ + Notes + Parameters: + param: desc + Returns: + res: desc + """ + data = read_json_file(file_path('/input/static/json/制造业.json')) + return data diff --git a/input/static/json/industry.json b/input/static/json/industry.json new file mode 100644 index 0000000..d2d0b21 --- /dev/null +++ b/input/static/json/industry.json @@ -0,0 +1,19 @@ +[ + { + "value": "制造业", + "children": [ + {"value": "化学工业"}, + {"value": "森林工业"}, + {"value": "食品工业"}, + {"value": "烟草工业"}, + {"value": "纺织工业"}, + {"value": "医药工业"}, + {"value": "机械工业"}, + {"value": "电子工业"}, + {"value": "轻工业"}, + {"value": "石油加工及炼焦业"}, + {"value": "冶金工业"}, + {"value": "建材工业"} + ] + } +] \ No newline at end of file