|
|
@@ -32,7 +32,6 @@
|
|
|
<empty :isShow="false" v-if="content.length == 0" />
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="buttons flex align-center">
|
|
|
<view class="button pain" @click="showTipPopup = true">Ai一键解析简历</view>
|
|
|
<view class="button primary" @click="goResumeUpload">简历上传</view>
|
|
|
@@ -150,7 +149,8 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
loading: false,
|
|
|
- showTipPopup: false
|
|
|
+ showTipPopup: false,
|
|
|
+ showWXUploadBtn: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -165,9 +165,10 @@ export default {
|
|
|
// 获取状态栏高度
|
|
|
let systemInfo = uni.getSystemInfoSync();
|
|
|
this.statusBarHeight = systemInfo.statusBarHeight || 0;
|
|
|
-
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
this.getUserInfo()
|
|
|
- // this.avatar = uni.getStorageSync('avatar')
|
|
|
+ this.getWXUploadConfigData()
|
|
|
},
|
|
|
methods: {
|
|
|
// 返回上一页
|
|
|
@@ -279,13 +280,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);
|
|
|
@@ -529,6 +537,45 @@ 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()
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取微信上传配置数据
|
|
|
+ getWXUploadConfigData() {
|
|
|
+ this.$Request.getT('/app/dict/list', {
|
|
|
+ type: '小程序入口'
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 0 && res.data?.length > 0) {
|
|
|
+ this.showWXUploadBtn = res.data[0].code == '开'
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
// userphone(){
|