| | |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (imgUrl) => { |
| | | export const getParcelPic = (imgUrl) => { |
| | | return request({ |
| | | url: '/api/blade-jfpts/parcel/parcel/getParcelPic', |
| | | method: 'get', |
| | |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | |
| | | <template slot="menu"> |
| | | <el-button type="text" @click="dialogVisible=true">查看包裹图片</el-button> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | |
| | | <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose"> |
| | | <span>这是一段信息</span> |
| | | </el-dialog> |
| | | <el-button |
| | | v-if="row.imgUrl != null || row.imgUrl != ''" |
| | | icon="el-icon-view" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="handleParcelPic(row)" |
| | | >查看包裹图片 |
| | | </el-button> |
| | | |
| | | </template> |
| | | |
| | | |
| | | |
| | | </avue-crud> |
| | | <el-dialog class="parcel-dialog" title="包裹图片" :visible.sync="dialogTableVisible" :append-to-body="true" :close-on-click-modal="false" |
| | | @opened="parcelConversation = true" @close="(parcelConversation = false), (oldParcelSatart = false)" > |
| | | <div> |
| | | <img :src="'data:image/png;base64,'+imgUrl" > |
| | | </div> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/parcel/parcel"; |
| | | import {getList, getDetail, getParcelPic} from "@/api/parcel/parcel"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | imgUrl:'', |
| | | loading: true, |
| | | dialogVisible: false, |
| | | dialogTableVisible: false, |
| | | parcelConversation:false, |
| | | oldParcelSatart:false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | handleParcelPic(row) { |
| | | console.log(row.imgUrl); |
| | | getParcelPic(row.imgUrl).then(res => { |
| | | this.imgUrl = res.data.data.imgBase64; |
| | | }); |
| | | this.dialogTableVisible = true; |
| | | } |
| | | } |
| | | }; |