| | |
| | | delStandardTemplate, |
| | | getEditTemplatePreparation, |
| | | } from "@/api/standard/model"; |
| | | import { validateInspectionValueAnnotation } from "@/utils/inspectionValueFormat"; |
| | | export default { |
| | | name: 'Model', |
| | | components: { |
| | |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | current: 1, |
| | | }, |
| | | tableLoading: false, |
| | | }; |
| | |
| | | } |
| | | } |
| | | } |
| | | let annotationError = null; |
| | | data.data[0].celldata.forEach((a) => { |
| | | if (a.v && a.v.ps && typeof a.v.ps.value === "string") { |
| | | const error = validateInspectionValueAnnotation(a.v.ps.value); |
| | | if (!annotationError && error) annotationError = `单元格(${a.r + 1}行${a.c + 1}列):${error}`; |
| | | } |
| | | if ( |
| | | a.v.ps != undefined && |
| | | (a.v.ps.value === "检验值" || |
| | |
| | | } |
| | | } |
| | | }); |
| | | if (annotationError) { |
| | | this.loading = false; |
| | | this.$message.error(annotationError); |
| | | return; |
| | | } |
| | | upStandardTemplate({ |
| | | id: this.row.id, |
| | | thing: JSON.stringify(data), |
| | |
| | | this.loading = false; |
| | | this.$message.success("已保存"); |
| | | this.isShow = false; |
| | | }).catch((error) => { |
| | | this.loading = false; |
| | | this.$message.error(error.message || "模板保存失败"); |
| | | }); |
| | | }, |
| | | isClose(done) { |
| | |
| | | width: 88px; |
| | | font-size: 14px; |
| | | font-weight: 700; |
| | | color: #606266; |
| | | color: var(--lims-text-2); |
| | | } |
| | | .search_button { |
| | | line-height: 26px; |