|
@@ -44,13 +44,13 @@
|
|
|
<!--</el-option>-->
|
|
|
<!--</el-select>-->
|
|
|
<!--</el-form-item>-->
|
|
|
- <el-form-item label="临界量(T):" prop="criticality" label-width="100px">
|
|
|
- <el-input
|
|
|
- maxlength="5"
|
|
|
+ <el-form-item class="criticality-input" label="临界量(T):" prop="criticality" label-width="100px" v-if="formData.chemicalClassify == 1">
|
|
|
+ <el-input-number
|
|
|
+ :precision="2"
|
|
|
+ :step="0.01" :max="10000"
|
|
|
style="width:220px;"
|
|
|
v-model="formData.criticality"
|
|
|
- onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"
|
|
|
- placeholder="请输入化学品名"
|
|
|
+ placeholder="请输入临界量"
|
|
|
clearable
|
|
|
size="small"/>
|
|
|
</el-form-item>
|
|
@@ -265,6 +265,9 @@
|
|
|
console.log('this.addPropsData',this.addPropsData);
|
|
|
if(this.addPropsData.id){
|
|
|
//编辑
|
|
|
+ if(this.formData.chemicalClassify != 1){
|
|
|
+ this.formData.criticality = 0;
|
|
|
+ }
|
|
|
this.formData.classifyAttribute = this.formData.classifyAttribute+'';
|
|
|
putHxpChemical(this.formData).then(response => {
|
|
|
if(response.code == 200){
|
|
@@ -274,6 +277,9 @@
|
|
|
});
|
|
|
}else{
|
|
|
//新增
|
|
|
+ if(this.formData.chemicalClassify != 1){
|
|
|
+ this.formData.criticality = 0;
|
|
|
+ }
|
|
|
this.formData.classifyAttribute = this.formData.classifyAttribute+'';
|
|
|
addHxpChemical(this.formData).then(response => {
|
|
|
if(response.code == 200){
|
|
@@ -361,3 +367,16 @@
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
+<style lang="scss">
|
|
|
+ .criticality-input{
|
|
|
+ .el-input-number__decrease,.el-input-number__increase{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .el-input-number .el-input{
|
|
|
+ input{
|
|
|
+ padding:0 15px;
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|