| | |
| | | |
| | | |
| | | </avue-crud> |
| | | <el-dialog |
| | | :visible.sync="dialogTableVisible" |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | @opened="parcelConversation = true" |
| | | @close="(parcelConversation = false), (oldParcelSatart = false)" > |
| | | <div> |
| | | <el-image :src="'data:image/png;base64,'+imgUrl" :preview-src-list="'data:image/png;base64,'+imgUrl"> |
| | | </el-image> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- <template> |
| | | <div> |
| | | <img v-image-preview src="'data:image/png;base64,'+imgUrl"/> |
| | | <div style="width: 100%; height: 100%;"> |
| | | <el-image ref="image" v-image-preview :src="'data:image/png;base64,'+imgUrl"/> |
| | | </div> |
| | | </template> --> |
| | | </template> --> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | import VueDirectiveImagePreviewer from 'vue-directive-image-previewer'; |
| | | import 'vue-directive-image-previewer/dist/assets/style.css'; |
| | | import Vue from 'vue'; |
| | | Vue.use(VueDirectiveImagePreviewer); |
| | | Vue.use(VueDirectiveImagePreviewer, { |
| | | zIndex: 9999, //层级显示 |
| | | previewSize: 3 //三倍图 |
| | | }); |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | form: {}, |
| | | query: {}, |
| | | imgUrl:'', |
| | | isShow:true, |
| | | loading: true, |
| | | dialogTableVisible: false, |
| | | parcelConversation:false, |
| | | oldParcelSatart:false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | }, |
| | | methods: { |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | // handleParcelPic(row) { |
| | | // getParcelPic(row.imgUrl).then(res => { |
| | | // this.imgUrl = res.data.data.imgBase64; |
| | | // }); |
| | | // setTimeout(() => { |
| | | // //代码 |
| | | // this.$refs.image.$el.click(); |
| | | // }, 1000); |
| | | // }, |
| | | handleParcelPic(row) { |
| | | console.log(row.imgUrl); |
| | | getParcelPic(row.imgUrl).then(res => { |
| | | this.imgUrl = res.data.data.imgBase64; |
| | | }); |
| | | this.dialogTableVisible = true; |
| | | this.dialogTableVisible=true; |
| | | } |
| | | } |
| | | }; |