fix:修改资质的change_date

This commit is contained in:
zty 2024-07-09 17:33:33 +08:00
parent 9ecab9688f
commit 6ef912ac23
3 changed files with 22 additions and 8 deletions

View File

@ -36,7 +36,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<script src="viewer.js"></script> <script src="viewer.js"></script>
</head> </head>
<body tabindex="1"> <body tabindex="1" oncontextmenu=self.event.returnValue=false onselectstart="return false">
<div id="outerContainer"> <div id="outerContainer">
<div id="sidebarContainer"> <div id="sidebarContainer">
@ -265,11 +265,11 @@ See https://github.com/adobe-type-tools/cmap-resources
<span data-l10n-id="open_file_label">Open</span> <span data-l10n-id="open_file_label">Open</span>
</button> </button>
<button id="print" class="toolbarButton hiddenMediumView" title="Print" tabindex="32" data-l10n-id="print"> <button id="print" class="toolbarButton hiddenMediumView" style="display:none" title="Print" tabindex="32" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span> <span data-l10n-id="print_label">Print</span>
</button> </button>
<button id="download" class="toolbarButton hiddenMediumView" title="Save" tabindex="33" data-l10n-id="save"> <button id="download" class="toolbarButton hiddenMediumView" style="display:none" title="Save" tabindex="33" data-l10n-id="save">
<span data-l10n-id="save_label">Save</span> <span data-l10n-id="save_label">Save</span>
</button> </button>

View File

@ -123,6 +123,7 @@
:on-success="handleUpSuccess" :on-success="handleUpSuccess"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-preview="handlePreview" :on-preview="handlePreview"
:before-upload="beforeUpload"
:headers="upHeaders" :headers="upHeaders"
:file-list="fileList" :file-list="fileList"
:limit="1" :limit="1"
@ -161,7 +162,7 @@ const defaultContent = {
scope: "", scope: "",
number: "", number: "",
cie_path: "", cie_path: "",
change_date:"", change_date: null,
change_reason:"" change_reason:""
}; };
@ -179,7 +180,7 @@ export default {
scope: "", scope: "",
number: "", number: "",
cie_path: "", cie_path: "",
change_date:"", change_date: null,
change_reason:"" change_reason:""
}, },
upHeaders: upHeaders(), upHeaders: upHeaders(),
@ -345,6 +346,13 @@ export default {
this.$refs["Form"].clearValidate(); this.$refs["Form"].clearValidate();
}); });
}, },
beforeUpload(file) {
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt10M;
},
handleDelete(scope) { handleDelete(scope) {
this.$confirm("确认删除?", "警告", { this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认", confirmButtonText: "确认",

View File

@ -125,6 +125,7 @@
:on-success="handleUpSuccess" :on-success="handleUpSuccess"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-preview="handlePreview" :on-preview="handlePreview"
:before-upload="beforeUpload"
:headers="upHeaders" :headers="upHeaders"
:file-list="fileList" :file-list="fileList"
:limit="1" :limit="1"
@ -146,7 +147,6 @@ import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getDictList, getDictTypeList } from "@/api/dict";
import { getAllQi, getQi, updateQi, createQi, delQi} from "@/api/qualificationInfo"; import { getAllQi, getQi, updateQi, createQi, delQi} from "@/api/qualificationInfo";
import { upUrl, upHeaders } from "@/api/file"; import { upUrl, upHeaders } from "@/api/file";
import { saveAs } from 'file-saver'; import { saveAs } from 'file-saver';
@ -180,7 +180,7 @@ export default {
scope: "", scope: "",
number: "", number: "",
cie_path: "", cie_path: "",
change_date:"" change_date: null
}, },
upHeaders: upHeaders(), upHeaders: upHeaders(),
upUrl: upUrl(), upUrl: upUrl(),
@ -300,7 +300,13 @@ export default {
handleUpSuccess(res, file, filelist) { handleUpSuccess(res, file, filelist) {
this.Content.cie_path = res.data.path; this.Content.cie_path = res.data.path;
this.Content.file = res.data.id; this.Content.file = res.data.id;
},
beforeUpload(file) {
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
this.$message.error("上传文件大小不能超过 10MB!");
}
return isLt2M;
}, },
handleRemove(file, filelist) { handleRemove(file, filelist) {
this.Content.file = null; this.Content.file = null;