| | |
| | | data() { |
| | | return { |
| | | //年代号 |
| | | dataYearValue:null, |
| | | dataYearCode: { |
| | | type: "", |
| | | value: "" |
| | | }, |
| | | filteredObject: {}, |
| | | filteredArray: [], |
| | | isSeriesType: {}, |
| | |
| | | this.$emit("isShow", newV) |
| | | } |
| | | }, |
| | | dataYearValue:{ |
| | | handler(newV){ |
| | | if(newV){ |
| | | this.$emit("dataYearValue",newV) |
| | | } |
| | | dataYearCode: { |
| | | deep:true, |
| | | immediate:true, |
| | | handler(newV) { |
| | | this.$emit("dataYearCode", newV) |
| | | } |
| | | } |
| | | }, |
| | |
| | | |
| | | let columnItem = { |
| | | change: (val) => { |
| | | console.log(val) |
| | | if (val.column.field === "drawingno") { |
| | | this.codeattrsecValue = val.value; |
| | | return; |
| | |
| | | this.isShow = false; |
| | | } |
| | | } |
| | | if(val.column.field === "releaseDate"){ |
| | | if(val.value){ |
| | | this.dataYearValue = val.column.valueFormat; |
| | | }else { |
| | | this.dataYearValue = null; |
| | | if (val.column.field === "releaseDate") { |
| | | if (val.value) { |
| | | this.dataYearCode.type = val.column.valueFormat; |
| | | this.dataYearCode.value = val.value; |
| | | } else { |
| | | this.dataYearCode.type = ""; |
| | | this.dataYearCode.value = ""; |
| | | } |
| | | } |
| | | }, |
| | |
| | | format: formItem.dateFormate, |
| | | keyAttr: formItem.keyAttr, |
| | | value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || |
| | | (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null), |
| | | (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) || |
| | | (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null), |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | | tip: formItem.tooltips, |
| | |
| | | :templateOid="templateOid" |
| | | :type="type" |
| | | data-key="masterForm" |
| | | @dataYearCode="dataYearHandler" |
| | | @getFormData="getFormData" |
| | | @isShow="isShowHandler" |
| | | @dataYearValue="dataYearHandler" |
| | | ></FormTemplate> |
| | | <div |
| | | v-if=" |
| | |
| | | }, |
| | | //系列号规则 |
| | | isShowHandler(val) { |
| | | let that = this; |
| | | this.isShowStatus = val; |
| | | |
| | | this.secVOList.forEach(item => { |
| | | if (item.name === "系列号") { |
| | | this.$set(item, "readOnly", val) |
| | | } |
| | | }) |
| | | if(this.$refs.CodeApply.changeChildItem ){ |
| | | this.secVOList.forEach(item => { |
| | | if (item.name === "系列号") { |
| | | this.$set(item, "readOnly", val) |
| | | } |
| | | }) |
| | | if (this.$refs.CodeApply) { // 添加一个判断语句,检查对象是否为undefined |
| | | this.$refs.CodeApply.changeChildItem(this.secVOList, this.TreeValue, this.type); |
| | | } |
| | | }, |
| | | //年代号 |
| | | dataYearHandler(val){ |
| | | console.log("val",val) |
| | | dataYearHandler(val) { |
| | | const readOnlyValue = val && Object.values(val).every(value => value !== ''); |
| | | |
| | | }, |
| | | this.secVOList.forEach(item => { |
| | | if (item.name === "年代号") { |
| | | const year = readOnlyValue ? val.value.slice(0, 4) : item.codeDateValue; |
| | | this.codeApplyForm[item.oid] = year; |
| | | this.$set(item, "readOnly", readOnlyValue); |
| | | } |
| | | }); |
| | | |
| | | if (this.$refs.CodeApply) { |
| | | this.$refs.CodeApply.changeChildItem(this.secVOList, this.TreeValue, this.type); |
| | | } |
| | | },, |
| | | //属性码段赋值 |
| | | attrListForm(attrListForm) { |
| | | this.attrList = attrListForm; |
| | |
| | | return item; |
| | | }); |
| | | //this.$refs.CodeApply.templateRender(this.secVOList,this.TreeValue); |
| | | this.$refs.CodeApply.changeChildItem(childItems,this.TreeValue,this.type); |
| | | this.$refs.CodeApply.changeChildItem(childItems, this.TreeValue, this.type); |
| | | }, |
| | | resembleQuerySubmit() { |
| | | this.activeName = "resembleQuery"; |