123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <template>
- <div>
- <preview-visible-file :height="height" :width="width" :img-url="imageUrl"></preview-visible-file>
- </div>
- </template>
- <script lang="ts">
- import {defineComponent, ref} from 'vue';
- import PreviewVisibleFile from "@/components/file/previewVisibleFile.vue";
- import {get} from "@/api/common";
- export default defineComponent({
- components: {PreviewVisibleFile},
- props: {
- height: {
- type: Number,
- default: 295
- },
- width: {
- type: Number,
- default: 500
- },
- wellname: {
- type: String
- },
- },
- name: 'ChartImage',
- setup(props, context) {
- const imageUrl = ref("")
- console.log("ChartImage setup", props, context);
- function getImageUrl (name: any) {
- get('/wellInfo/downFileImage', {fileName: name}).then((data: any) => {
- imageUrl.value = `data:image/png;base64,${data}`;
- })
- }
- return{
- imageUrl,
- getImageUrl
- }
- },
- mounted() {
- // this.getImageUrl()
- }
- })
- </script>
- <style lang="less" scoped></style>
|