zouyu
2023-11-10 69be1e17629ee50cbc2f63aec9627360535d61f0
	modified:   src/views/common/param-mergeTemplate.vue
已修改1个文件
30 ■■■■ 文件已修改
src/views/common/param-mergeTemplate.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/param-mergeTemplate.vue
@@ -16,7 +16,7 @@
            </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>
@@ -133,30 +133,28 @@
       }
    },
    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) => {