md
This commit is contained in:
parent
a9f50bc4be
commit
c4b64a8abe
57
src/views/emis/EmisBaseTools/ExchangeRatePanel.vue
Normal file
57
src/views/emis/EmisBaseTools/ExchangeRatePanel.vue
Normal file
@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div>
|
||||
{{from}}->{{to}}:{{ svalue }}
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getValidExchangeRate } from "@/api/emis/emisExchangeRate";
|
||||
export default {
|
||||
name: "ExchangeRatePanel",
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
from: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
to: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
svalue: this.value,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
from(newVal,oldVal) {
|
||||
this.queryData();
|
||||
},
|
||||
to(newVal,oldVal) {
|
||||
this.queryData();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.queryData();
|
||||
},
|
||||
methods: {
|
||||
queryData() {
|
||||
let queryParams = {
|
||||
from:this.from,
|
||||
to:this.to
|
||||
};
|
||||
getValidExchangeRate(this.queryParams).then(response => {
|
||||
this.value = response.data;
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user