8324edc9 by weimo934

feat(fjcl):添加文件预览

1 parent fda0ca9f
......@@ -30,12 +30,21 @@
</tr>
<tr v-for="(item,i) in mjftData.list" :key="i">
<td @click="delRow(i)" class="cz">-</td>
<td class="dzwdm"><input type="text" class="formInput" v-model="item.dzwdm"/></td>
<td class="syqmj"><input type="number" class="formInput" v-model="item.tdsyqsyqmj" @keydown="oninput"/>
<td class="dzwdm">
<el-input v-model="item.dzwdm" >
</el-input>
</td>
<td class="dytdmj"><input type="number" class="formInput" v-model="item.dydytdmj" @keydown="oninput"/>
<td class="syqmj">
<el-input
oninput="if(isNaN(value)) { value = null } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+4)}"
v-model="item.tdsyqsyqmj"
></el-input>
</td>
<td class="fttjmj"><input type="number" class="formInput" v-model="item.fttdmj" @keydown="oninput"/>
<td class="dytdmj">
<el-input v-model="item.dydytdmj" oninput="if(isNaN(value)) { value = null } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+4)}"></el-input>
</td>
<td class="fttjmj">
<el-input v-model="item.fttdmj" oninput="if(isNaN(value)) { value = null } if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+4)}"></el-input>
</td>
</tr>
<tr>
......@@ -111,7 +120,14 @@
})
},
oninput(e) {
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
/* e.target.value = (e.target.value.match(/^(1|2|3|4|5|6|7|8|9|0)*(\.?\d{0,2})/g)[0]) || null*/
let value = e.target.value
if (isNaN(value)) {
value = null
}
if (value.indexOf('.') > 0) {
value = value.slice(0, value.indexOf('.') + 4)
}
},
addRow() {
this.mjftData.list.push({
......