Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jfpt-Vue
| | |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | console.log(this.$route.query.status,1); |
| | | console.log(this.$route.query.type,2); |
| | | console.log(this.$route.query,3); |
| | | if (this.$route.query.type!=undefined && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if (this.$route.query.status != undefined) { |
| | | this.page.currentPage = 1; |
| | |
| | | status:this.$route.query.status, |
| | | type:this.$route.query.type |
| | | } |
| | | console.log(params,111); |
| | | } else { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | type:this.$route.query.type |
| | | }; |
| | | console.log(params,222); |
| | | } |
| | | }else if(this.$route.query.status != undefined){ |
| | | params = { |
| | |
| | | status:this.$route.query.status, |
| | | type:this.$route.query.type |
| | | } |
| | | console.log(params,444); |
| | | } |
| | | |
| | | if (dateTime) { |
| | |
| | | ...this.query, |
| | | }; |
| | | } |
| | | console.log(params,555); |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | |
| | | //包裹分页数据 |
| | | handleStartParcel(data){ |
| | | debugger; |
| | | console.log(data[0]); |
| | | this.$router.push({ |
| | | path: `/parcel/index`, |
| | | query: data[0] |
| | |
| | | |
| | | </avue-crud> |
| | | <el-dialog |
| | | height="30%" |
| | | top="10%" |
| | | :visible.sync="dialogTableVisible" |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | @opened="parcelConversation = true" |
| | | @close="(parcelConversation = false), (oldParcelSatart = false)" > |
| | | <div> |
| | | <el-image style="width: 60%;height:40%" :src="'data:image/png;base64,'+imgUrl" :preview-src-list="'data:image/png;base64,'+imgUrl"> |
| | | <el-image :src="'data:image/png;base64,'+imgUrl" :preview-src-list="'data:image/png;base64,'+imgUrl"> |
| | | </el-image> |
| | | <!-- <img v-image-preview src="'data:image/png;base64,'+imgUrl"/> --> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | <script> |
| | | import {getList, getDetail, getParcelPic} from "@/api/parcel/parcel"; |
| | | import {mapGetters} from "vuex"; |
| | | // import VueDirectiveImagePreviewer from 'vue-directive-image-previewer'; |
| | | // import 'vue-directive-image-previewer/dist/assets/style.css'; |
| | | // import Vue from 'vue'; |
| | | // Vue.use(VueDirectiveImagePreviewer); |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | prop: "imgUrl", |
| | | hide:true |
| | | }, |
| | | // { |
| | | // label: '包裹图片', |
| | | // prop: 'imgUrl', |
| | | // type: 'upload', |
| | | // width: 300, |
| | | // listType: 'data:image/png;base64', |
| | | // span: 24, |
| | | // propsHttp: { |
| | | // res: 'data' |
| | | // }, |
| | | // canvasOption: { |
| | | // text: 'avue', |
| | | // ratio: 0.1 |
| | | // } |
| | | // }, |
| | | { |
| | | label: "安检时间", |
| | | prop: "samplingTime", |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | debugger; |
| | | const { dateTime } = this.query; |
| | | let values = { |
| | | ...params, |
| | |
| | | }); |
| | | }, |
| | | handleParcelPic(row) { |
| | | console.log(row.imgUrl); |
| | | getParcelPic(row.imgUrl).then(res => { |
| | | this.imgUrl = res.data.data.imgBase64; |
| | | }); |
| | | this.dialogTableVisible = true; |
| | | this.dialogTableVisible=true; |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | |
| | | </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; |
| | | } |
| | | } |
| | | }; |