|
@@ -122,7 +122,7 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row style="margin-top:20px">
|
|
<el-row style="margin-top:20px">
|
|
|
<el-col :span="13">
|
|
<el-col :span="13">
|
|
|
- <el-button type="primary" style="width:80px" plain>导出</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" style="width:80px" plain @click="handleDownload(item)">导出</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
|
<el-button type="primary" style="width:80px" plain @click="handleDeleteHr(item)">删除</el-button>
|
|
<el-button type="primary" style="width:80px" plain @click="handleDeleteHr(item)">删除</el-button>
|
|
@@ -196,7 +196,7 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row style="margin-top:20px">
|
|
<el-row style="margin-top:20px">
|
|
|
<el-col :span="13">
|
|
<el-col :span="13">
|
|
|
- <el-button type="primary" style="width:80px" plain>导出</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" style="width:80px" plain @click="handleDownload(item)">导出</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
|
<el-button type="primary" style="width:80px" plain @click="handleDelete(item)">删除</el-button>
|
|
<el-button type="primary" style="width:80px" plain @click="handleDelete(item)">删除</el-button>
|
|
@@ -270,7 +270,7 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row style="margin-top:20px">
|
|
<el-row style="margin-top:20px">
|
|
|
<el-col :span="13">
|
|
<el-col :span="13">
|
|
|
- <el-button type="primary" style="width:80px" plain>导出</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" style="width:80px" plain @click="handleDownload(item)">导出</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="11">
|
|
<el-col :span="11">
|
|
|
<el-button type="primary" style="width:80px" plain @click="handleDeleteCollection(item)">删除</el-button>
|
|
<el-button type="primary" style="width:80px" plain @click="handleDeleteCollection(item)">删除</el-button>
|
|
@@ -309,6 +309,7 @@ import "nprogress/nprogress.css"; // progress bar style
|
|
|
import dataDictionaryApi from "@/api/sys/dataDictionary";
|
|
import dataDictionaryApi from "@/api/sys/dataDictionary";
|
|
|
import SelectTree from "@/components/SelectTree";
|
|
import SelectTree from "@/components/SelectTree";
|
|
|
import workCategoryApi from "@/api/job/workCategory";
|
|
import workCategoryApi from "@/api/job/workCategory";
|
|
|
|
|
+import jobUserApi from "@/api/job/jobUser";
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -678,6 +679,45 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ handleDownload(row){
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+
|
|
|
|
|
+ self.loading = true;
|
|
|
|
|
+ self.loading2 = true;
|
|
|
|
|
+ self.loading3 = true;
|
|
|
|
|
+
|
|
|
|
|
+ var formData = new FormData();
|
|
|
|
|
+
|
|
|
|
|
+ formData.append("id", row.jobUserId);
|
|
|
|
|
+
|
|
|
|
|
+ jobUserApi
|
|
|
|
|
+ .exportXls(formData)
|
|
|
|
|
+ .then(function (response) {
|
|
|
|
|
+ self.loading = false;
|
|
|
|
|
+ self.loading2 = false;
|
|
|
|
|
+ self.loading3 = 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.loading2 = false;
|
|
|
|
|
+ self.loading3 = false;
|
|
|
|
|
+ // self.$message.error(error + "");
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
onDetailModalClose(refreshed) {
|
|
onDetailModalClose(refreshed) {
|
|
|
//保存成功后回调
|
|
//保存成功后回调
|
|
|
this.showModal = false;
|
|
this.showModal = false;
|