| | |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | selectRow:{ |
| | | type:Array, |
| | | default:[] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | selectValue:"", |
| | | //年代号 |
| | | dataYearCode: { |
| | | type: "", |
| | |
| | | handler(newV) { |
| | | this.$emit("dataYearCode", newV) |
| | | } |
| | | }, |
| | | selectRow:{ |
| | | handler(newval){ |
| | | console.log(newval); |
| | | let ids = newval.map(item => item.id); |
| | | this.selectValue= ids.join(","); |
| | | }, |
| | | deep:true, |
| | | immediate:true |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | value:formItem.defaultValue || (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 == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || |
| | | (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null), |
| | | (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null) || |
| | | //父组件如果是参照数据会将selectRow置空,selectRow不为空就说明不是参照要回填源标准号数据 |
| | | (this.status === "amend" && this.selectRow && (formItem.field === "oldcode" ? this.selectValue : null)), |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | | tip: formItem.tooltips, |
| | |
| | | v-if="dialogVisible" key="masterForm" |
| | | ref="FormTemplate" |
| | | v-bind="$attrs" |
| | | :selectRow="selectRow" |
| | | :TreeValue="TreeValue" |
| | | :eventList="eventList" |
| | | :rowOid="rowOid" |
| | |
| | | type: Object, |
| | | default: () => ({}), |
| | | }, |
| | | selectRow:{ |
| | | type:Array, |
| | | default:[] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | }, |
| | | watch: { |
| | | codeApplyForm: { |
| | | handler(newval, oldval) { |
| | | // console.log('newval',newval) |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | openDialog() { |
| | |
| | | <!-- 修订--> |
| | | <FormTemplateDialog :codeClassifyOid="this.codeClassifyOid" :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" :templateOid="templateOid" :title="'数据修订'" |
| | | :visible.sync="amendvisible" status="amend" |
| | | :visible.sync="amendvisible" status="amend" :selectRow="selectRow" |
| | | type="add" @submit="amendSumbit"></FormTemplateDialog> |
| | | <!-- 新增--> |
| | | <FormTemplateDialog :TreeValue="TreeValue" :codeClassifyOid="this.codeClassifyOid" |
| | |
| | | this.LinkObject = row; |
| | | this.LinkVisible = true; |
| | | this.LinkList = Object.keys(row).map(property => property) |
| | | // console.log(result); |
| | | // console.log(this.LinkObject) |
| | | |
| | | }, |
| | | //状态搜索 |
| | | cellSelectHandler(row) { |
| | |
| | | //标准修订 |
| | | codeAMENDHandler() { |
| | | let foundItem = false; |
| | | |
| | | this.tableHeadFindData.forEach(item => { |
| | | if (item.field === "oldcode" && Object.keys(item.referConfig).length >= 1) { |
| | | foundItem = true; |
| | | } |
| | | }); |
| | | |
| | | if (foundItem) { |
| | | if(this.selectRow.length >= 1){ |
| | | this.$confirm('已有参照是否取消勾选继续执行?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.selectRow = []; |
| | | //取消勾选状态 |
| | | this.$refs.dataTable.clearSelection(); |
| | | this.amendvisible = true; |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消当前操作' |
| | | }); |
| | | }); |
| | | }else { |
| | | this.amendvisible = true; |
| | | } |
| | | } else { |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning("请至少选择一条数据"); |
| | | } else { |
| | | console.log(this.selectRow) |
| | | this.amendvisible = true; |
| | | |
| | | } |