| | |
| | | |
| | | <script> |
| | | import {getAuthTree,getUsedTemplateByClassifyOid,getCodeRule,addSaveCode} from '@/api/code/codeApply.js' |
| | | |
| | | import func from '@/util/func'; |
| | | export default { |
| | | name: "codeApply", |
| | | components: { FormTemplate: () => import('@/components/FormTemplate/FormTemplate') }, |
| | |
| | | // 进行表单校验 |
| | | const formValidate = await this.$refs.FormTemplate.validate(); |
| | | if (!formValidate) return; |
| | | let codeValidate = true; |
| | | // 进行码值申请校验 |
| | | // if (this.showCodeApply) { |
| | | // codeValidate = await this.$refs.CodeApply.validate(); |
| | | // if (!codeValidate) { |
| | | // this.activeName = "codeApply"; |
| | | // return false; |
| | | // } |
| | | // } |
| | | let resembleQueryList = []; |
| | | if (this.showResembleQuery && this.$refs.resembleQueryRef) { |
| | | // 进行相似项查询 |
| | |
| | | resForm.codeRuleOid = this.codeRuleOid; |
| | | resForm.templateOid = this.templateOid; |
| | | // this.$emit("submit", resForm); |
| | | if(func.notEmpty(resForm.ts)) { |
| | | resForm.ts = func.formattedDateTime(resForm.ts); |
| | | // resForm.ts = resForm.ts.toISOString().replace("Z", ""); |
| | | } |
| | | addSaveCode(resForm).then(res => { |
| | | this.$nextTick(() => { |
| | | this.addvisible = false; |
| | |
| | | this.onLoad() |
| | | }) |
| | | }) |
| | | console.log(resForm) |
| | | // console.log(resForm) |
| | | }, |
| | | getDefaultValueAndFormValues(form) { |
| | | let defaultValue = {}; |