Commit 5c0d308c by 张立顺

fix bug提交

1 parent 8c3f9041
......@@ -83,6 +83,7 @@
<!-- @click="exportFile({ contractNo: item.contractNo })" -->
</baseDialog>
<!-- 新增 -->
<!-- v-if="fileVisible" -->
<d2-dialog
:title="'新建任务'"
:is-visible="fileVisible"
......@@ -156,6 +157,7 @@
<!-- 重新导入 -->
<d2-dialog
:title="'导入'"
v-if="fileVisibleRest"
:is-visible="fileVisibleRest"
@closeDialog="handleImportRest"
@confirmDialog="handleConfirmImportRest"
......@@ -177,7 +179,7 @@
导入文件
<input
type="file"
id="fileUpload"
id="fileUploadRest"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFileRest($event)"
......@@ -508,6 +510,13 @@ export default {
},
// 上传文件,转码为base64
importFile(e) {
// var node = document.createElement("LI")
// var textnode = document.createTextNode("Water")
// node.appendChild(textnode)
// // document.getElementById("fileUpload").appendChild(node)
// // console.log("this.$refs.fileRuleForm", this.$refs.fileRuleForm)
// // this.$refs.fileRuleForm.appendChild(node)
// document.getElementsByClassName("el-dialog__body")[0].appendChild(node)
// console.log(e)
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
......@@ -519,15 +528,16 @@ export default {
})
return false
}
this.$set(this.fileForm, "fileName", e.target.files[0].name)
// // 转码base64
// this.$forceUpdate()
// 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(",")
this.fileInfo = "xlsx" + "@" + arrBase64[1]
console.log("fileName", fileName)
this.$set(this.fileForm, "fileName", fileName)
document.getElementById("fileUpload").value = ""
}
} else {
......@@ -548,8 +558,8 @@ export default {
return false
}
this.$set(this.fileFormRest, "fileName", e.target.files[0].name)
// // 转码base64
// this.$forceUpdate()
// 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => {
......@@ -659,6 +669,7 @@ export default {
handleImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
handleImportRest(row) {
......
......@@ -43,11 +43,11 @@ export default {
},
{
label: "支付时间",
prop: "payTime",
prop: "payTime"
// width: "100px",
formatter: (cellValue) => {
return Util.dateFormate(cellValue.payTime, "YYYY-MM-DD HH:mm:ss")
}
// formatter: (cellValue) => {
// return Util.dateFormate(cellValue.payTime, "YYYY-MM-DD HH:mm:ss")
// }
},
{
label: "交易参考号",
......@@ -95,13 +95,13 @@ export default {
// },
{
label: "更新时间",
prop: "updateTime",
formatter: (cellValue) => {
return Util.dateFormate(
cellValue.updatedTime,
"YYYY-MM-DD HH:mm:ss"
)
}
prop: "updateTime"
// formatter: (cellValue) => {
// return Util.dateFormate(
// cellValue.updatedTime,
// "YYYY-MM-DD HH:mm:ss"
// )
// }
},
{
label: "任务状态描述",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!