| | |
| | | <script> |
| | | export default { |
| | | name: "TemplatePro.vue", |
| | | props: ['ProData','crudOid','crudLCStatus','crudArray','Formlist','codeClassifyOid'], |
| | | props: ['ProData','crudOid','crudLCStatus','crudArray','Formlist','codeClassifyOid','rowIndex'], |
| | | data: function () { |
| | | return { |
| | | type: {}, |
| | |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" v-model="row[item.prop]" |
| | | @blur="saveRows"></el-input> |
| | | @blur="saveRows" ></el-input> |
| | | <el-input-number size="small" controls-position="right" v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]" |
| | | @blur="saveRows" :style="{width:(item.width-10)+'px'}"></el-input-number> |
| | | <el-select v-model="row[item.prop]" filterable allow-create default-first-option slot="prepend" v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " @blur="selectChangeHandler(item.editConfig,index)"> |
| | |
| | | } |
| | | return ''; |
| | | }, |
| | | editOpenFlag:{ |
| | | handler(newval,oldval){ |
| | | console.log(newval) |
| | | }, |
| | | deep:true, |
| | | immediate:true |
| | | } |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | //是否开启编辑 |
| | | initializing:false, |
| | | loading:false, |
| | | referConfigText:"", |
| | | referConfigVisble:false, |
| | |
| | | } else if (this.attrSelectList.length < 1) { |
| | | this.$message.warning('请选择一条模板数据') |
| | | } else if (this.attrSelectList.length === 1) { |
| | | console.log(this.injectOption) |
| | | this.injectVisible = true; |
| | | } |
| | | }, |
| | |
| | | "是否可修改": this.injectOption.classifyInvokeEditFlag |
| | | } |
| | | //单元格编辑赋值一遍 |
| | | // noinspection JSCheckFunctionSignatures |
| | | if(this.CurrentCell){ |
| | | //如果是指定层赋值为数字 |
| | | if(this.CurrentCell.classifyInvokeLevel!== 'min'){ |
| | |
| | | this.CurrentCell.classifyInvokeAttr=this.injectOption.classifyInvokeAttr, |
| | | this.CurrentCell.classifyInvokeAttrName=this.injectOption.classifyInvokeAttrName, |
| | | this.CurrentCell.classifyInvokeEditFlag=this.injectOption.classifyInvokeEditFlag, |
| | | this.$set(this.CurrentCell, "classifyInvokeText", data); |
| | | // this.$set(this.CurrentCell, 'classifyInvokeText', data) |
| | | this.CurrentCell.classifyInvokeText = data; |
| | | this.injectHandleReset() |
| | | }else {add |
| | | }else { |
| | | //勾选操作 |
| | | for (const key in this.injectOption) { |
| | | this.attrSelectList[0][key] = this.injectOption[key]; |
| | |
| | | }else { |
| | | this.injectOption.classifyNumber=0; |
| | | } |
| | | this.editOpenFlag=true |
| | | this.injectVisible = false; |
| | | |
| | | }, |
| | |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <templatePro :ProData="this.ProData" :crudOid="this.crudOid" :crudLCStatus="this.crudLCStatus" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro> |
| | | <templatePro :ProData="this.ProData" :rowIndex="this.selectRow" :crudOid="this.crudOid" :crudLCStatus="this.crudLCStatus" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro> |
| | | </span> |
| | | <!-- 编码规则--> |
| | | <el-dialog :visible.sync="MasterdialogVisible" title="为【编码规则】选取值" append-to-body> |
| | |
| | | this.crudOid=row.oid; |
| | | this.crudLCStatus=row.lcStatus; |
| | | this.crudArray.push(row); |
| | | console.log(row.$index) |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': row.oid}).then(res => { |
| | | this.ProData = res.data.data; |
| | | //分类注入数据格式 |