|
@@ -140,7 +140,16 @@
|
|
|
size="mini"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['production:apply:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >导出全部</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExportSelected"
|
|
|
+ v-hasPermi="['production:apply:export']"
|
|
|
+ >导出选中数据</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -1383,6 +1392,8 @@ export default {
|
|
|
this.queryParams.tab = 3;
|
|
|
if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
|
|
|
this.queryParams.workArea = this.queryParams.workArea.join();
|
|
|
+ } else {
|
|
|
+ this.queryParams.workArea = "";
|
|
|
}
|
|
|
listApply(this.queryParams).then(response => {
|
|
|
if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
|
|
@@ -1636,18 +1647,44 @@ export default {
|
|
|
this.msgSuccess("删除成功");
|
|
|
})
|
|
|
},
|
|
|
- /** 导出按钮操作 */
|
|
|
+ /** 导出全部按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有SAI开项管理数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return exportApply(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 导出选中数据按钮操作 */
|
|
|
+ handleExportSelected() {
|
|
|
+ if (this.ids.length==0){
|
|
|
+ return this.$alert('请选择要导出的数据项!', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportApply(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
})
|
|
|
+ }
|
|
|
+ if (this.queryParams.workArea != null && this.queryParams.workArea != "") {
|
|
|
+ this.queryParams.workArea = this.queryParams.workArea.join();
|
|
|
+ } else {
|
|
|
+ this.queryParams.workArea = "";
|
|
|
+ }
|
|
|
+ const queryParams = this.queryParams;
|
|
|
+ queryParams.ids=this.ids;
|
|
|
+ console.log(queryParams)
|
|
|
+ this.$confirm('是否确认导出选中的SAI开项管理数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return exportApply(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
},
|
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|