| | |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @row-click="rowClick" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | |
| | | <!-- <template slot-scope="{ type, size, row }" slot="menu"> |
| | | |
| | | <el-button |
| | | v-if="row.imgUrl != null || row.imgUrl != ''" |
| | |
| | | @click.stop="handleParcelPic(row)" |
| | | >查看包裹图片 |
| | | </el-button> |
| | | </template> |
| | | |
| | | </template> --> |
| | | |
| | | </avue-crud> |
| | | <template> |
| | | <div> |
| | | <el-image-viewer |
| | | v-if="showViewer" |
| | | :on-close="closeViewer" |
| | | <el-image-viewer |
| | | class="img" |
| | | v-if="showViewer" |
| | | :on-close="closeViewer" |
| | | :url-list="['data:image/png;base64,'+imgUrl]" /> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | showViewer: false, // 显示查看器 |
| | | imgUrl:'', |
| | | loading: true, |
| | | dialogTableVisible: false, |
| | | parcelConversation:false, |
| | | oldParcelSatart:false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | menu:false, |
| | | height:'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | activeClass: 3, |
| | | border: true, |
| | | border: false, |
| | | stripe:true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | searchRange: true, |
| | | searchSpan: 8, |
| | | searchValue:[this.getStartTime(),this.getEndTime()], |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | { |
| | | label: "是否违禁", |
| | | search: true, |
| | | searchValue: this.getIsKindParams(), |
| | | searchLabelWidth: 120, |
| | | searchSpan: 4, |
| | | hide: true, |
| | |
| | | }, |
| | | methods: { |
| | | beforeOpen(done, type) { |
| | | console.log(type); |
| | | if (["view"].includes(type)) { |
| | | getDetail(this.form.imgUrl).then(res => { |
| | | this.form = res.data.data; |
| | |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | rowClick(row){ |
| | | var that=this; |
| | | getParcelPic(row.imgUrl).then(res => { |
| | | that.imgUrl = res.data.data.imgBase64; |
| | | this.showViewer = true |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | getStartTime(){ |
| | | if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) { |
| | | return this.$route.query.startTime |
| | | } |
| | | }, |
| | | getEndTime(){ |
| | | if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) { |
| | | return this.$route.query.endTime |
| | | } |
| | | }, |
| | | getIsKindParams(){ |
| | | if(this.$route.query.decisioDiagramResult && this.$route.query!='' && this.$route.query!=null && this.$route.query!=undefined){ |
| | | //回显 |
| | | return this.$route.query.decisioDiagramResult |
| | | } |
| | | }, |
| | | //给行加颜色 |
| | | rowStyle({row, column, rowIndex}){ |
| | | if(row.mechineMark==1){ |
| | | return { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | if (dateTime) { |
| | | values = { |
| | | ...params, |
| | |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | handleParcelPic(row) { |
| | | var that=this; |
| | | getParcelPic(row.imgUrl).then(res => { |
| | | that.imgUrl = res.data.data.imgBase64; |
| | | //that.$refs.preview.clickHandler(); |
| | | this.showViewer = true |
| | | }); |
| | | }, |
| | | // 关闭查看器 |
| | | closeViewer() { |
| | | this.showViewer = false |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .img { |
| | | .el-icon-circle-close { |
| | | color: white; |
| | | } |
| | | } |
| | | </style> |