代码更新
This commit is contained in:
@@ -214,7 +214,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="碳平衡" prop="c_balance">
|
||||
<el-input-number :precision="3" :step="0.001" :max="100" v-model="formData.c_balance" :controls="false" placeholder="%" style="width: 200px;"/>
|
||||
<el-button type="success" icon="el-icon-refresh" :loading="sync_flg" @click="sync">同步</el-button>
|
||||
<el-button type="success" icon="el-icon-refresh" v-if="is_sync" :loading="sync_flg" @click="sync">同步</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -324,6 +324,7 @@ export default {
|
||||
return {
|
||||
headers: { 'Authorization': getToken() },
|
||||
formData: {},
|
||||
is_sync: false,
|
||||
material_id: '',
|
||||
file_name: '',
|
||||
dialogUpload: false,
|
||||
@@ -420,6 +421,11 @@ export default {
|
||||
}
|
||||
crudMaterialparameters.queryMaterialParam(param).then(res => {
|
||||
this.formData = res
|
||||
if (this.formData.is_sync === '0') {
|
||||
this.is_sync = false
|
||||
} else {
|
||||
this.is_sync = true
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user