| | |
| | | let value='' |
| | | formItemList.forEach((formItem) => { |
| | | formItem = this.resetFormConfig(formItem); |
| | | console.log('formItem',formItem) |
| | | // console.log('formItem',formItem) |
| | | // console.log('formItem.dicData.value',formItem.dicData) |
| | | if (formItem.type === "line") { |
| | | group.push({ |
| | |
| | | valueFormat:formItem.dateFormate, |
| | | format: formItem.dateFormate, |
| | | keyAttr: formItem.keyAttr, |
| | | value: formItem.dicData && formItem.dicData.length > 0 && formItem.type == 'combox' ? formItem.dicData[0].id : null, |
| | | value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || |
| | | (formItem.secType == "codedatesec"?formItem.codeDateFormatStr: null), |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | | tip: formItem.tooltips, |
| | | // hidden:formItem.secType && formItem.codeValueApplyStatus == 3 ? true : false, |
| | | // readonly:formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ?true : false , |
| | | display: !formItem.hidden, |
| | | maxlength: formItem.maxlength, |
| | |
| | | }; |
| | | // console.log('columnItem',columnItem) |
| | | slotColumnList.push(columnItem); |
| | | // console.log('slotColumnList',slotColumnList) |
| | | if (group.length === 0) { |
| | | column.push(columnItem); |
| | | } else { |
| | |
| | | |
| | | this.geDictData(dictKeys); |
| | | this.getFormDetail(); |
| | | // console.log('selfColumnConfig',this.selfColumnConfig) |
| | | |
| | | }, |
| | | // 使用传入的表单数据配置 |
| | |
| | | if (Object.hasOwnProperty.call(element, newAttr)) { |
| | | const oldAttr = element[newAttr]; |
| | | formItem[newAttr] = formItem[oldAttr]; |
| | | // console.log(formItem) |
| | | // console.log(newAttr,oldAttr) |
| | | // console.log(formItem[newAttr],formItem[oldAttr]) |
| | | } |
| | | } |
| | | } else if (configType === "directVoluation") { |
| | |
| | | ); |
| | | }, |
| | | setReferValue(data) { |
| | | console.log(data) |
| | | // console.log(data) |
| | | if (data.field) { |
| | | this.form[data.field] = data.value || ""; |
| | | this.form[data.showField] = data.text || ""; |
| | |
| | | coderefersec: "refer",//引用码段 |
| | | codeattrsec: "text", |
| | | codelevelsec: "text", |
| | | codedatesec: "date" |
| | | codedatesec: "text" |
| | | }, |
| | | selfColumnConfig: { |
| | | function: { |
| | |
| | | }, |
| | | // 获取码值申请数据 |
| | | getCodeRule() { |
| | | getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => { |
| | | let that = this; |
| | | getCodeRule({ codeClassifyOid: that.codeClassifyOid }).then((res) => { |
| | | if (res.data && res.data.code === 200) { |
| | | this.codeRuleOid = res.data.data.oid; |
| | | that.codeRuleOid = res.data.data.oid; |
| | | const typeList = [ |
| | | //属性码段 只读 |
| | | "codeattrsec", |
| | |
| | | "codelevelsec", |
| | | //流水码段 隐藏 |
| | | ]; |
| | | this.secVOList = (res.data.data.secVOList || []).filter((item) => |
| | | that.secVOList = (res.data.data.secVOList || []).filter((item) => |
| | | typeList.includes(item.secType) |
| | | ); |
| | | if (this.secVOList.length > 0 && this.type === "add") { |
| | | this.showCodeApply = true; |
| | | this.activeName = "codeApply"; |
| | | this.$nextTick(() => { |
| | | this.$refs.CodeApply.templateRender(this.secVOList); |
| | | if (that.secVOList.length > 0 && that.type === "add") { |
| | | that.showCodeApply = true; |
| | | that.activeName = "codeApply"; |
| | | that.$nextTick(() => { |
| | | that.$refs.CodeApply.templateRender(that.secVOList); |
| | | }); |
| | | } else { |
| | | this.showCodeApply = false; |
| | | that.showCodeApply = false; |
| | | } |
| | | } |
| | | // console.log(' this.secVOList',this.secVOList) |
| | | // console.log(' this.secVOList',that.secVOList) |
| | | // console.log(' res.data.data.secVOList',res.data.data.secVOList) |
| | | }); |
| | | }, |
| | |
| | | this.$delete(formValue, item); |
| | | }); |
| | | const keys = Object.keys(formValue); |
| | | debugger |
| | | keys.forEach((item, index) => { |
| | | keys.forEach((itm, idx) => { |
| | | if ((item === ('$' + itm)) && idx !== index) { |
| | |
| | | } else if (item.secType == "coderefersec") { |
| | | //引用码段 |
| | | params = JSON.parse(item.referValueInfo); |
| | | // console.log('item',item) |
| | | console.log('params',params) |
| | | } |
| | | return params; |
| | | }, |
| | |
| | | isRequired(item) { |
| | | return item.nullableFlag != "true"; |
| | | }, |
| | | //默认值 |
| | | getOptionList(item) { |
| | | if ( |
| | | Array.isArray(item.fixedValueVOList) && |
| | |
| | | <template> |
| | | <template> |
| | | <el-container> |
| | | <el-main> |
| | | <basic-container> |
| | |
| | | <!-- 选择枚举时的弹窗 --> |
| | | <el-dialog title="枚举列表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" |
| | | style="height: 115vh;"> |
| | | <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" |
| | | <avue-crud ref="eunmTable" :option="enumRefer.option" @on-load="enumOnLoad" :data="enumRefer.data" class="enumTable" |
| | | @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="enumRefer.selectRow" :label="row.$index"> |
| | |
| | | this.initAttributeReferTypeList(); |
| | | }, |
| | | methods: { |
| | | enumOnLoad(){ |
| | | getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize).then(res => { |
| | | this.enumRefer.enumPage.total = res.data.data.total; |
| | | this.enumRefer.data = res.data.data.records; |
| | | }) |
| | | }, |
| | | closeSubmitDialog() { |
| | | this.resetAttributeForm(); |
| | | this.showSubmitDialog = false; |