Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jfpt-Vue
| | |
| | | "chai": "^4.1.2", |
| | | "node-sass": "^4.14.1", |
| | | "sass-loader": "^7.0.1", |
| | | "vue-directive-image-previewer": "^2.2.2", |
| | | "vue-template-compiler": "^2.5.17", |
| | | "webpack-bundle-analyzer": "^3.0.3" |
| | | }, |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | getAnimalData(e) { |
| | | this.activeClass = e; |
| | | //type 0:本日 1:本月 2:本年 status: 0:正常 1:异常 |
| | | var params = { |
| | | type: e |
| | |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | if (this.$route.query.type && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if (this.$route.query.status != undefined && this.$route.query.status != null && this.$route.query.status != "" ) { |
| | | this.activeClass = this.$route.query.type; |
| | | 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; |
| | | params = { |
| | | status:this.$route.query.status, |
| | | type:this.$route.query.type |
| | | } |
| | | console.log(params,111); |
| | | } else { |
| | | this.activeClass = 0; |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | type:this.$route.query.type |
| | | }; |
| | | console.log(params,222); |
| | | } |
| | | }else if(this.$route.query.status != undefined && this.$route.query.status != null && this.$route.query.status != "" ){ |
| | | }else if(this.$route.query.status != undefined){ |
| | | params = { |
| | | status: this.$route.query.status, |
| | | beginTime: this.$route.query.startTime, |
| | | begTime: this.$route.query.startTime, |
| | | endTime: this.$route.query.endTime |
| | | } |
| | | }else{ |
| | |
| | | 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; |
| | |
| | | ...params, |
| | | }; |
| | | |
| | | if (this.$route.query.status && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if (this.$route.query.type != undefined && this.$route.query.type != null && this.$route.query.type != "" ) { |
| | | if (this.$route.query.status!=undefined && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if (this.$route.query.type != undefined) { |
| | | this.activeClass = this.$route.query.status; |
| | | this.page.currentPage = 1; |
| | | params = { |
| | |
| | | type:this.$route.query.status |
| | | }; |
| | | } |
| | | }else if(this.$route.query.type != undefined && this.$route.query.type != null && this.$route.query.type != "" ){ |
| | | }else if(this.$route.query.type != undefined){ |
| | | params = { |
| | | type: this.$route.query.type, |
| | | beginTime: this.$route.query.startTime, |
| | | begTime: this.$route.query.startTime, |
| | | endTime: this.$route.query.endTime |
| | | } |
| | | }else{ |
| | |
| | | @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 |
| | | 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> |
| | | <!-- <img v-image-preview src="'data:image/png;base64,'+imgUrl"/> --> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <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() { |
| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <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> |
| | | |
| | | <!-- <template> |
| | | <div> |
| | | <img v-image-preview src="'data:image/png;base64,'+imgUrl"/> |
| | | </div> |
| | | </template> --> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getKindList, getDetail} from "@/api/parcel/parcel"; |
| | | import {getKindList, 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() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | imgUrl:'', |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 4, |
| | | menuWidth:120, |
| | | menuWidth:150, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: "安检机名称", |
| | | prop: "checkMachineName", |
| | | }, |
| | | { |
| | | label: "包裹ID", |
| | | prop: "packageId", |
| | | }, |
| | |
| | | }, |
| | | { |
| | | label: "安检时间", |
| | | prop: "samplingTime", |
| | | prop: "createTime", |
| | | }, |
| | | { |
| | | label: "安检时间", |
| | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "违禁类型", |
| | | search: true, |
| | | searchLabelWidth: 120, |
| | | searchSpan: 4, |
| | | hide: true, |
| | | prop: "decisioDiagramResult", |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "是", |
| | | value: "contraband" |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: "normal" |
| | | }, |
| | | ] |
| | | }, |
| | | // { |
| | | // label: "违禁类型", |
| | | // search: true, |
| | | // searchLabelWidth: 120, |
| | | // searchSpan: 4, |
| | | // hide: true, |
| | | // prop: "decisioDiagramResult", |
| | | // type: "select", |
| | | // dicData: [ |
| | | // { |
| | | // label: "是", |
| | | // value: "contraband" |
| | | // }, |
| | | // { |
| | | // label: "否", |
| | | // value: "normal" |
| | | // }, |
| | | // ] |
| | | // }, |
| | | { |
| | | label: '违禁品名称', |
| | | prop: 'objName' |
| | |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(this.permission.parcel_pic_view, true), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false) |
| | | }; |
| | |
| | | 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; |
| | | } |
| | | } |
| | | }; |