Browse Source

数据看板架构背景颜色修改,智能导入下载失败文件接口调整

feature
mk 2 years ago
parent
commit
fb664911ff
  1. 2
      src/components/GridTree/nodeWrap.vue
  2. 52
      src/views/modules/base/smartImport/cpts/completeTask.vue

2
src/components/GridTree/nodeWrap.vue

@ -35,7 +35,7 @@
</div> </div>
</div> </div>
<div v-if="item.level === 'unit_chief'"> <div v-if="item.level === 'unit_chief'">
<div @click="gotoPersonnel(item)" :class="[ item.id === '1704434839867420673'?'dyzxhYellow':'dyzxhGreen']" :title="item.organizationName"> <div @click="gotoPersonnel(item)" :class="[item.categoryWarn === 'red' ? 'dyzxhRed' : item.categoryWarn === 'yellow' ? 'dyzxhYellow' : item.categoryWarn === 'green' ? 'dyzxhGreen' : '', item.children && item.children.length > 0 ? 'dyzxhHover' : 'dyzxh']" :title="item.organizationName">
<!-- {{ spliceNameFun(item.organizationName, 3) }} --> <!-- {{ spliceNameFun(item.organizationName, 3) }} -->
{{ item.organizationName }} {{ item.organizationName }}
</div> </div>

52
src/views/modules/base/smartImport/cpts/completeTask.vue

@ -42,12 +42,11 @@
>查看</el-button >查看</el-button
> >
<i class="el-icon-download" style="margin-left: 16px;"></i> <i class="el-icon-download" style="margin-left: 16px;"></i>
<a <el-button
v-if="resultDescFile" v-if="this.importFailNum>0"
:href="resultDescFile" type="text"
target="_blank" @click="handelClickDownFile"
style="color: #ff4d4f; cursor: pointer" >下载导入失败数据</el-button
>下载导入失败数据</a
> >
</el-col> </el-col>
</el-row> </el-row>
@ -92,6 +91,7 @@
</template> </template>
<script> <script>
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import axios from "axios";
export default { export default {
data() { data() {
return { return {
@ -105,7 +105,9 @@ export default {
pageNo:1, pageNo:1,
pageSize:20, pageSize:20,
total:0, total:0,
tableType:null tableType:null,
resultDescFilePath:null,
originFileName:null,
}; };
}, },
props: { props: {
@ -169,6 +171,39 @@ export default {
}, },
handelClickBackList() { handelClickBackList() {
this.$emit("handelClickBack"); this.$emit("handelClickBack");
},
handelClickDownFile(){
const url = "/actual/base/intelligentImportData/downloadFailExcel";
let parm = {
originFileName:this.originFileName,
resultDescFilePath :this.resultDescFilePath,
};
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data:parm,
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
}, },
async getTaskInfo() { async getTaskInfo() {
let url = "/actual/base/intelligentImportData/getTaskInfo"; let url = "/actual/base/intelligentImportData/getTaskInfo";
@ -181,7 +216,8 @@ export default {
this.importFailNum = data.importFailNum.toString(); this.importFailNum = data.importFailNum.toString();
this.importSuccessNum = data.importSuccessNum.toString(); this.importSuccessNum = data.importSuccessNum.toString();
this.importCategory = data.importCategory; this.importCategory = data.importCategory;
this.resultDescFile = data.resultDescFile; this.originFileName = data.originFileName;
this.resultDescFilePath = data.resultDescFile;
this.$emit("updateoperatorName", { this.$emit("updateoperatorName", {
operatorName: data.operatorName, operatorName: data.operatorName,
createdTime: data.createdTime, createdTime: data.createdTime,

Loading…
Cancel
Save