thoroughDeleteFn(row) {
this.$confirm('确认要彻底删除该事务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
thoroughDeleteAffair({
affairQueryprocInsId: row.affairQueryprocInsId
})
.then((res) => {
if (res.status === 0) {
this.$message.success('删除事务数据成功');
let totalPage = Math.ceil((this.total - 1) / this.pageSize)
let currentPage = this.currentPage > totalPage ? totalPage : this.currentPage
this.currentPage = currentPage < 1 ? 1 : currentPage
this.getData();
} else {
this.$message.error(res.msg);
}
})
.catch(() => {
this.$message.error('删除事务数据失败');
});
})
.catch(() => {});
},
handlePreview(file) {
if (!file) {
this.$message.error('文件不存在');
return false;
}
if (!file.fileUrl) {
this.$message.error('上传时文件不能下载');
return false;
}
const self = this;
const a = file.fileUrl.substring(file.fileUrl.indexOf('/templates/'));
file.fileUrl = baseURL + a;
var url = file.fileUrl;
var xhr = new XMLHttpRequest();
xhr.open('get', url, true);
xhr.responseType = 'blob'; // 返回类型blob
// 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
xhr.onload = function() {
console.log(this.status)
// 请求完成
if (this.status === 200) {
// 返回200
var blob = this.response;
var href = window.URL.createObjectURL(blob); // 创建下载的链接
// 判断是否是IE浏览器,是的话返回true
if (window.navigator.msSaveBlob) {
try {
window.navigator.msSaveBlob(blob, file.name)
} catch (e) {
console.log(e);
}
} else {
// 谷歌浏览器 创建a标签 添加download属性下载
var downloadElement = document.createElement('a');
downloadElement.href = href;
// downloadElement.target = '_blank';
downloadElement.download = file.name; // 下载后文件名
document.body.appendChild(downloadElement);
downloadElement.click(); // 点击下载
document.body.removeChild(downloadElement); // 下载完成移除元素
window.URL.revokeObjectURL(href); // 释放掉blob对象
}
} else {
self.$message.error('文件不存在')
}
}
xhr.send()
}
},
<el-table-column prop="deadlineTime" label="有效期截止时间" width="220" >
<template slot-scope="scope">
<el-popover trigger="manual" placement="top">
<upload class="upload-demo allWith" :limit="1" :disabledBtn="disabledBtn" :uploadType="uploadType"
@disableds="disableds" :fileList="fileList" :typeList="'zhengwen'" @fileLists="fileLists" />
<div slot="reference" class="name-wrapper">
<el-date-picker v-model="scope.row.deadlineTime" type="datetime" placeholder="选择有效期截止时间"
value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm">
</el-date-picker>
</div>
</el-popover>
</template>
</el-table-column>
------------------------
this.tableData = this.tableData.filter( (v) => v.taskId !== row.taskId ); this.total = this.total - 1;
-----------------------
watch: {
menuArr: {
handler(val) {
const a = getIconTitle(this.tabs, this.menuArr);
this.tagName = a[0];
this.icon = a[1];
this.bgColor = a[2];
},
deep: true
}
},
dataZoom: [{
type: 'inside',
show: true,
realtime: true,
start: 50,
}],
dataZoom: [
//滑动条
{
xAxisIndex: 0, //这里是从X轴的0刻度开始
show: true, //是否显示滑动条,不影响使用
type: "slider", // 这个 dataZoom 组件是 slider 型 dataZoom 组件
startValue: 0, // 从头开始。
endValue: 15, // 一次性展示6个。
},
],
this.$notify.closeAll() 关闭所有右下角弹框
Layui 点击气泡
layer.tips(obj.data.retreatOperReason, $(index).parent());