| | |
| | | * 获取已提交的线索问题 |
| | | * @param {string} clueId 线索id |
| | | */ |
| | | getQuestion(clueId) { |
| | | getQuestion(clueId, internal) { |
| | | return $clue |
| | | .get(`clue/question/fetch?clueId=${clueId}`) |
| | | .get(`clue/question/fetch`, { |
| | | params: { clueId, internal } |
| | | }) |
| | | .then((res) => { |
| | | return getClueQuestionList(res.data); |
| | | }); |
| | |
| | | files.forEach((e) => { |
| | | formData.append('images', e); |
| | | }); |
| | | return $clue.post(`clue/question/upload`, formData).then((res) => res.data); |
| | | return $clue |
| | | .post(`clue/question/upload`, formData) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 修改线索问题 |
| | | * @param {object} question 问题描述 |
| | | * @param {*} files 问题图片 |
| | | * @param {Array} deleteImgUrl 删除的图片相对路径,用;分割 |
| | | * @returns |
| | | */ |
| | | updateQuestion(question, files, deleteImgUrl) { |
| | | const formData = new FormData(); |
| | | formData.append('question', JSON.stringify(question)); |
| | | formData.append('deleteImg', deleteImgUrl); |
| | | files.forEach((e) => { |
| | | formData.append('images', e); |
| | | }); |
| | | return $clue |
| | | .post(`clue/question/update`, formData) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | deleteQuestion(questionId) { |
| | | return $clue.delete(`clue/question`, { params: { questionId } }).then((res) => res.data); |
| | | return $clue |
| | | .delete(`clue/question`, { params: { questionId } }) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | uploadQuestionUrl() { |
| | |
| | | * @returns |
| | | */ |
| | | pushQuestion(questionIdList) { |
| | | return $clue.post(`clue/question/push`, questionIdList).then((res) => res.data); |
| | | return $clue |
| | | .post(`clue/question/push`, questionIdList) |
| | | .then((res) => res.data); |
| | | } |
| | | }; |