|
|
@@ -278,13 +278,20 @@ export default {
|
|
|
|
|
|
},
|
|
|
more(id) {
|
|
|
- var that = this
|
|
|
uni.showActionSheet({
|
|
|
- itemList: ["删除"],
|
|
|
+ itemList: ["AI解析", "删除"],
|
|
|
itemColor: "#3273db",
|
|
|
- success(res) {
|
|
|
- if (res.tapIndex == 0)
|
|
|
- that.deleteAttachment(id)
|
|
|
+ success: res => {
|
|
|
+ if (res.tapIndex == 0) {
|
|
|
+ let [resume] = this.content.filter(item => item.resumesAttachmentId == id)
|
|
|
+ if (resume) {
|
|
|
+ this.analyserResumeByUrl(resume?.attachmentAddress)
|
|
|
+ } else {
|
|
|
+ this.$queue.showToast('获取简历失败')
|
|
|
+ }
|
|
|
+ } else if (res.tapIndex == 1) {
|
|
|
+ this.deleteAttachment(id)
|
|
|
+ }
|
|
|
},
|
|
|
fail(res) {
|
|
|
console.log(res.errMsg);
|
|
|
@@ -528,6 +535,34 @@ export default {
|
|
|
content,
|
|
|
showCancel: false
|
|
|
})
|
|
|
+ },
|
|
|
+
|
|
|
+ // 通过文件地址解析简历
|
|
|
+ analyserResumeByUrl(filePath) {
|
|
|
+ this.showLoadCard = true
|
|
|
+ this.$Request.getT('/app/resumes/resumesAnalysisAttach', {
|
|
|
+ filePath
|
|
|
+ }, null, 480000, true).then(res => {
|
|
|
+ if (!res) {
|
|
|
+ this.showModal('解析失败,请稍后重试')
|
|
|
+ this.stopLoadStatus()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (res.code == 0 && res.data) {
|
|
|
+ // 识别前,先清空数据
|
|
|
+ this.clearResumeData()
|
|
|
+ this.setAiResumesAnalysis(JSON.parse(res.data))
|
|
|
+
|
|
|
+ this.getUserInfo()
|
|
|
+ } else {
|
|
|
+ this.showModal(res?.msg || '解析失败,请稍后重试')
|
|
|
+ }
|
|
|
+
|
|
|
+ this.stopLoadStatus()
|
|
|
+ }).catch(err => {
|
|
|
+ this.showModal('解析失败,请稍后重试')
|
|
|
+ this.stopLoadStatus()
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
// userphone(){
|