|
|
|
@ -2,7 +2,7 @@ |
|
|
|
<div class="g-main"> |
|
|
|
<div v-show="pageType == 'list'"> |
|
|
|
<div class="m-search"> |
|
|
|
<el-form :inline="true" :label-width="'100px'"> |
|
|
|
<el-form :inline="true" :label-width="'100px'" > |
|
|
|
<el-form-item label="表格名称"> |
|
|
|
<el-input v-model.trim="tableName" placeholder="请输入表格名称关键字" size="small" |
|
|
|
class="u-item-width-normal" clearable></el-input> |
|
|
|
@ -33,9 +33,18 @@ |
|
|
|
<div class="m-table"> |
|
|
|
<div class="div_btn"> |
|
|
|
<el-button size="small" @click="handleAdd" type="primary" icon="el-icon-plus">新建导出</el-button> |
|
|
|
<el-button |
|
|
|
@click="onDeleteBatch" |
|
|
|
style="margin: 0 10px" |
|
|
|
size="small" |
|
|
|
type="primary" |
|
|
|
> |
|
|
|
批量删除 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table :data="tableData" border v-loading="tableLoading" class="m-table-item" style="width: 100%" |
|
|
|
:height="maxTableHeight"> |
|
|
|
:height="maxTableHeight" @selection-change="onMultiSelection"> |
|
|
|
<el-table-column type="selection" fixed="left" align="center" width="50" /> |
|
|
|
<el-table-column prop="tableName" align="center" label="表格名称" :show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
@ -68,7 +77,7 @@ |
|
|
|
size="small">取消导入</el-button> --> |
|
|
|
<!-- <el-button @click="handleCloseCheck(scope.row)" v-if="scope.row.importCategory === 'processing'" type="text" size="small">确认完成</el-button> --> |
|
|
|
<el-button @click="handleAdd(scope.row)" type="text" size="small">查看</el-button> |
|
|
|
<el-button @click="handleDetail(scope.row)" type="text" size="small">删除</el-button> |
|
|
|
<el-button @click="handleDelete(scope.row)" type="text" size="small">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -111,6 +120,7 @@ |
|
|
|
agencyStaffTableListData: [], |
|
|
|
see:[], |
|
|
|
type:"", |
|
|
|
multiSelection:[], |
|
|
|
exportList: [], |
|
|
|
showDialog: false, |
|
|
|
SearchData: { |
|
|
|
@ -126,6 +136,7 @@ |
|
|
|
binaryOptionList, |
|
|
|
formData: {}, |
|
|
|
pageNo: 1, |
|
|
|
total:"", |
|
|
|
tableName:"", |
|
|
|
createdBy:"", |
|
|
|
createdTimeEnd:"", |
|
|
|
@ -201,6 +212,7 @@ |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.tableData=data.list |
|
|
|
this.total=data.total |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
@ -315,14 +327,123 @@ |
|
|
|
this.pageType="set" |
|
|
|
|
|
|
|
}, |
|
|
|
// 查看详情触发事件 |
|
|
|
async handleDetail(row) { |
|
|
|
this.pageType = "add"; |
|
|
|
const {taskId,fileCode,processStatus} = row; |
|
|
|
this.taskId = taskId; |
|
|
|
this.fileCode = fileCode; |
|
|
|
this.processStatus = processStatus; |
|
|
|
}, |
|
|
|
// 删除触发事件 |
|
|
|
async handleDelete(row) { |
|
|
|
console.log(row,"riw"); |
|
|
|
this.$confirm("确认删除?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
let ids = [row.originId]; |
|
|
|
//第一次删除,非强制删除 |
|
|
|
this.deleteImport(ids, false); |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
async deleteImport(ids) { |
|
|
|
const url = "/commonservice/exportRecord/deleteList"; |
|
|
|
// let params = { |
|
|
|
// ids |
|
|
|
// } |
|
|
|
const { data, code, msg } = await requestPost(url, ids); |
|
|
|
if (code === 0) { |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "删除成功", |
|
|
|
}); |
|
|
|
this.$emit("refreshTree"); |
|
|
|
this.recordList() |
|
|
|
|
|
|
|
} else if (code > 8000) { |
|
|
|
|
|
|
|
this.$confirm(msg, "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
|
|
|
|
this.deleteRoom(ids, true); |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 批量删除 |
|
|
|
onDeleteBatch() { |
|
|
|
if (this.multiSelection.length == 0) { |
|
|
|
this.$message.warning("请先选中至少一项"); |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log(this.multiSelection,"skhfsdb"); |
|
|
|
this.$confirm("删除之后无法恢复,确认删除?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.handleDeleteAll(this.multiSelection.map((e) => e)); |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.error(err); |
|
|
|
this.$message.error("删除失败"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 多选事件 |
|
|
|
onMultiSelection(rows) { |
|
|
|
this.multiSelection = rows; |
|
|
|
}, |
|
|
|
//批量删除 |
|
|
|
handleDeleteAll(rows){ |
|
|
|
let ides=[] |
|
|
|
console.log(rows); |
|
|
|
rows.map((item)=>{ |
|
|
|
console.log(item.originId); |
|
|
|
ides.push(item.originId) |
|
|
|
}) |
|
|
|
console.log(ides); |
|
|
|
const url = "/commonservice/exportRecord/deleteList"; |
|
|
|
// const { data, code, msg } = requestPost(url, ides); |
|
|
|
requestPost(url, ides).then(res=>{ |
|
|
|
console.log(res,"dsklf"); |
|
|
|
if (res.code === 0){ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "删除成功", |
|
|
|
}); |
|
|
|
this.$emit("refreshTree"); |
|
|
|
this.recordList() |
|
|
|
} |
|
|
|
else{ |
|
|
|
this.$message.error(res.msg); |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(data,code,msg); |
|
|
|
// if (code === 0) { |
|
|
|
// console.log("dfgldkfk"); |
|
|
|
// this.$message({ |
|
|
|
// type: "success", |
|
|
|
// message: "删除成功", |
|
|
|
// }); |
|
|
|
// this.$emit("refreshTree"); |
|
|
|
// this.recordList() |
|
|
|
|
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增弹出框组件取消事件 |
|
|
|
handleClose() { |
|
|
|
@ -389,13 +510,13 @@ |
|
|
|
handleSizeChange(val) { |
|
|
|
this.pageSize = val; |
|
|
|
window.localStorage.setItem("pageSize", val); |
|
|
|
this.getTableData(); |
|
|
|
this.recordList() |
|
|
|
}, |
|
|
|
|
|
|
|
// 分页 |
|
|
|
handleCurrentChange(val) { |
|
|
|
this.pageNo = val; |
|
|
|
this.getTableData(); |
|
|
|
this.recordList() |
|
|
|
}, |
|
|
|
// 重置 |
|
|
|
resetSearch() { |
|
|
|
|