modified: src/views/common/param-mergeTemplate.vue
| | |
| | | </avue-text-ellipsis> |
| | | </template> |
| | | <template slot="paramValue" slot-scope="scope"> |
| | | <el-input @blur="checkType(scope.row)" :readonly="routingTemplateId!=null" :placeholder="'请输入'+scope.row.paramType" v-model="scope.row.paramValue"/> |
| | | <el-input @blur="checkType(scope.row)" :disabled="routingTemplateId!=null" :placeholder="'请输入'+scope.row.paramType" v-model="scope.row.paramValue"/> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | |
| | | } |
| | | }, |
| | | created(){ |
| | | // this.rowSort() |
| | | // this.rowCalc() |
| | | }, |
| | | beforeMount(){ |
| | | this.rowSort() |
| | | this.rowCalc() |
| | | }, |
| | | mounted(){ |
| | | beforeDestroy(){ |
| | | console.log("销毁前"); |
| | | }, |
| | | data(){ |
| | | return { |
| | | checkType(row){ |
| | | if(row.paramType == '数值格式'){ |
| | | let val = row.paramValue |
| | | const reg = /^[0-9]*$/ |
| | | if(!reg.test(val)){ |
| | | row.paramValue = '' |
| | | this.$message.warning("请输入数值格式的数据!") |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | }, |
| | | methods:{ |
| | | checkType(row){ |
| | | if(row.paramType == '数值格式'){ |
| | | let val = row.paramValue |
| | | const reg = /^[0-9]*$/ |
| | | if(!reg.test(val)){ |
| | | row.paramValue = '' |
| | | this.$message.warning("请输入数值格式的数据!") |
| | | } |
| | | } |
| | | }, |
| | | //动态合并方法 |
| | | rowCalc() { |
| | | this.spanArr.forEach((ele, index) => { |