|
|
@@ -114,8 +114,8 @@
|
|
|
<span>期望薪资:{{formModel.dreamMoneyName}}</span>
|
|
|
</div>
|
|
|
<div class="descDivBottom">
|
|
|
- <el-button type="primary" plain icon="el-icon-star-off" @click="handleCollection">收藏简历</el-button>
|
|
|
- <el-button type="primary" icon="el-icon-download">下载简历</el-button>
|
|
|
+ <el-button type="primary" plain icon="el-icon-star-off" @click="handleCollection(formModel.resumeId)">收藏简历</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-download" @click="handleDownload">下载简历</el-button>
|
|
|
<el-button type="warning" icon="el-icon-phone">立即沟通</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -186,11 +186,11 @@ export default {
|
|
|
});
|
|
|
this.$store.state.tagsView.visitedViews.splice(this.$store.state.tagsView.visitedViews.findIndex(item => item.path === this.$route.path), 1)
|
|
|
},
|
|
|
- handleCollection(){
|
|
|
+ handleCollection(resumeId){
|
|
|
var self = this;
|
|
|
|
|
|
(function() {
|
|
|
- self.formModel.resumeId = self.id;
|
|
|
+ self.formModel.resumeId = resumeId;
|
|
|
|
|
|
return recruitmentCollectionApi.add(self.formModel);
|
|
|
})().then(function(response) {
|
|
|
@@ -210,7 +210,40 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleDownload(){
|
|
|
+ var self = this;
|
|
|
+
|
|
|
+ self.loading = true;
|
|
|
+
|
|
|
+ var formData = new FormData();
|
|
|
+
|
|
|
+ formData.append("id",self.id);
|
|
|
+
|
|
|
+ jobUserApi
|
|
|
+ .exportXls(formData)
|
|
|
+ .then(function (response) {
|
|
|
+ self.loading = false;
|
|
|
+
|
|
|
+ var jsonData = response.data;
|
|
|
+
|
|
|
+ if(jsonData.result) {
|
|
|
+ //导出
|
|
|
+ self.$message({
|
|
|
+ showClose: true,
|
|
|
+ type: "success",
|
|
|
+ message: `报表已生成,<a href="${jsonData.data}">请点击链接下载</a>`,
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ duration: 30000,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ self.loading = false;
|
|
|
+ // self.$message.error(error + "");
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
async mounted() {
|
|
|
var self = this;
|
|
|
@@ -226,8 +259,8 @@ export default {
|
|
|
self.loading = false;
|
|
|
|
|
|
if (jsonData.result) {
|
|
|
- self.formModel = jsonData.data;
|
|
|
- self.formModel.id = this.businessKey;
|
|
|
+ self.formModel = jsonData.data;
|
|
|
+ self.formModel.id = this.businessKey;
|
|
|
} else {
|
|
|
self.$message.error(jsonData.message + "");
|
|
|
}
|