123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import { $httpWithMsg } from "../../plugins/axios";
- import { QUESTION_API } from "@/constants/constants.js";
- const transformFormData = (datas) => {
- let formData = new FormData();
- Object.keys(datas).forEach((k) => {
- formData.append(k, datas[k]);
- });
- return formData;
- };
- // synthesis paper
- export const synthesizePaperPageListApi = (datas) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/synthesize/paper/page`,
- transformFormData(datas)
- );
- };
- export const synthesizePaperDeleteApi = (ids) => {
- return $httpWithMsg.post(
- QUESTION_API + "/synthesize/paper/delete",
- {},
- {
- params: { ids: ids.join() },
- }
- );
- };
- export const synthesizePaperDownloadApi = (datas) => {
- return $httpWithMsg.post(
- QUESTION_API + "/synthesize/paper/download",
- transformFormData(datas),
- {
- responseType: "blob",
- }
- );
- };
- export const paperPageListApi = (datas) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/synthesize/paper/source/page`,
- transformFormData(datas)
- );
- // return $httpWithMsg.post(`${QUESTION_API}/user/assignteacher/1/100`, datas);
- };
- export const courseQueryApi = (name, enable) => {
- return $httpWithMsg.get(`${QUESTION_API}/course/query`, {
- params: {
- name,
- enable: enable || undefined,
- },
- });
- };
- export const synthesisBuildPaperApi = (datas) => {
- return $httpWithMsg.post(`${QUESTION_API}/synthesize/paper/build`, datas);
- };
- //
- export const orgAiTransactionListApi = (rootOrgId) => {
- return $httpWithMsg.post(
- `${QUESTION_API}/ai/transaction/list`,
- {},
- { params: { rootOrgId } }
- );
- };
- export const orgAiTransactionSaveApi = (datas) => {
- return $httpWithMsg.post(`${QUESTION_API}/ai/transaction/save`, datas);
- };
|