hcong
2024-09-27 49774b6f258cf4a348b60fe7aaf610d0ffd5b5f4
src/api/fysp/evaluateApi.js
@@ -62,5 +62,49 @@
          window.URL.revokeObjectURL(url);
        }
      });
  }
  },
  /**
   * 修改最小项得分
   */
  updateScore({itemList, subTaskId}) {
    const param = `?subTaskId=${subTaskId}`
    return $fysp.post(`/itemevaluation/update${param}`, itemList).then((res) => res.data);
  },
  /**
   * 获得所有规则父节点
   */
  getAllParentRules() {
    return $fysp.get("evaluationrule").then((res) => res.data);
  },
  /** 根据父节点id获取子规则 */
  getSubRules(id) {
    const param = `?id=${id}`
    return $fysp.get(`/evaluationsubrule/byRule${param}`).then((res) => res.data);
  },
  /**
   * 更新父节点规则
   */
  updateParentRule(data) {
    return $fysp.post("evaluationrule", data).then((res) => res.data);
  },
  /**
   * 删除父节点规则
   */
  deleteParentRuleById(id) {
    return $fysp.delete(`evaluationrule/${id}`).then((res) => res.data);
  },
  /**
   * 更新子节点规则
   */
  updateSubRule(data) {
    return $fysp.post("evaluationsubrule", data).then((res) => res.data);
  },
  /**
   * 删除子节点规则
   */
  deleteSubRuleById(id) {
    return $fysp.delete(`evaluationsubrule/${id}`).then((res) => res.data);
  },
};