| | |
| | | }, |
| | | |
| | | /** |
| | | * 根据巡查任务获取评分细则 |
| | | */ |
| | | fetchItemEvaluation(subTaskId) { |
| | | const params = `?subTaskId=${subTaskId}`; |
| | | return $fysp.get(`evaluationsubrule/score${params}`).then((res) => res.data); |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * 批量更新评分细则得分 |
| | | */ |
| | | updateItemEvaluation(param) { |
| | | return $fysp.post(`itemevaluation/uplist`, param).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 查询评估总规则 |
| | | * @param {Object} param |
| | | * @returns |
| | |
| | | return $fysp.post(`evaluation/auto`, param).then((res) => res.data); |
| | | }, |
| | | |
| | | downloadAutoEvaluation(param) { |
| | | /** |
| | | * 下载规范性评估与分析报告 |
| | | */ |
| | | downloadAutoEvaluation(param, forceUpdate) { |
| | | return $fysp |
| | | .post(`evaluation/auto/record/download`, param, { responseType: 'blob' }) |
| | | .post(`evaluation/auto/record/download?forceUpdate=${forceUpdate}`, param, { responseType: 'blob' }) |
| | | .then((res) => { |
| | | // 文档未生成,已启动文档生成后台任务 |
| | | if (res.data.type == 'application/json') { |
| | |
| | | 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); |
| | | }, |
| | | }; |