src/components/page/ticket/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/page/ticket/picture-form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/components/page/ticket/index.vue
@@ -120,6 +120,7 @@ label="备注"> </el-table-column> <el-table-column width="300px" fixed="right" header-align="center" align="center" @@ -128,7 +129,7 @@ <el-button type="text" size="small" icon="el-icon-document" @click="addOrUpdateHandle(scope.row.id)">处决书</el-button> <el-button type="text" size="small" icon="el-icon-document-checked" @click="addOrUpdateHandle2(scope.row)">送达回证</el-button> <el-button type="text" size="small" icon="el-icon-view" @click="pictureHandle(scope.row)">图像证据</el-button> <el-button type="text" size="small" icon="el-icon-delete" @click="onDelete(scope.row.id)">撤销</el-button> <el-button v-if="items==2" type="text" size="small" icon="el-icon-delete" @click="onDelete(scope.row.id)">撤销</el-button> <!-- <el-button type="text" size="small" icon="el-pay6zhifu" @click="jiaofeiHandle(scope.row.id)">现场缴费</el-button>--> </template> </el-table-column> @@ -149,6 +150,7 @@ import TableForm from './ticket-form' import TableForm2 from './ticket-form2' import pictureForm from './picture-form' import {mapState} from 'vuex' export default { data () { return { @@ -187,7 +189,9 @@ this.tableHeight = window.innerHeight - 255 }, computed: { ...mapState({ items:'roles' }), }, methods: { // 获取数据列表 src/components/page/ticket/picture-form.vue
@@ -1,22 +1,25 @@ <template> <div> <el-dialog class="pic-dia" title="图像证据" :close-on-click-modal="false" :visible.sync="visible" v-dialogDrag> <div class="previewDialog" v-for="(item,index) in pictureList" :key="index"> <img style="width: 100%" :src="item.url" :preview="item.preview" :preview-text="item.title" alt=""> <!--<div class="enlargeBox"> <img :src="item.larg" alt=""> </div>--> v-dialogDrag > <div class="demo-image__preview"> <div class="preview-box"> <div v-for="item in pictureList" :key="Math.random()" > <el-image :src="item" style="width: 100px;height: 200px" :preview-src-list="[item]" > </el-image> </div> </div> </div> </el-dialog> </div> @@ -33,33 +36,54 @@ }, methods: { init(data) { this.pictureList=[] this.visible = true this.pictureList = data.map((item,index) => { return { url: this.$systemconfig.basePath+'/ffzf/fileInfo/showImg?path='+item, title: item, preview:'1', //larg: require('@/assets/img/enlarge.png') } }) // this.pictureList = data.map((item,index) => { // return { // url: this.$systemconfig.basePath+'/ffzf/fileInfo/showImg?path='+item, // // title: item, // // preview:'1', // //larg: require('@/assets/img/enlarge.png') // } // }) for (let i = 0; i < data.length; i++) { let a= this.$systemconfig.basePath+'/ffzf/fileInfo/showImg?path='+data[i] this.pictureList.push(a.toString()) } this.$previewRefresh(); console.log(this.pictureList,'pictureList-----pictureList') console.log(this.pictureList) } } } </script> <style lang="scss"> <style lang="scss" scoped> .pswp{ z-index: 9999; display: none; } .preview-box{ display: flex; flex-wrap: wrap; overflow: auto; div{ margin: 5px; } } .pic-dia{ ::v-deep.el-dialog{ width: 40%; height: 60%; } } </style> <style lang="scss" scoped> .previewDialog{ position: relative; cursor: pointer; height: 1000px; /*.enlargeBox{*/ /* position: absolute;*/ /* z-index: 99999;*/ src/main.js
@@ -47,9 +47,7 @@ Vue.use(ViewUI); Vue.config.productionTip = false Vue.use(ElementUI, { size: 'small' }); Vue.use(ElementUI); import echarts from 'echarts' Vue.prototype.$echarts = echarts; @@ -84,7 +82,7 @@ Vue.prototype.$byutil = byUtils Vue.prototype.$stringUtil = StringUtil Vue.prototype.$tscPrintUtil = TscPrintUtil // const rolesList = JSON.parse(localStorage.getItem('userRouters')) // const rolesList = JSON.parse(localStorage.getItem('userRouters')) //使用钩子函数对路由进行权限跳转 // router.beforeEach((to, from, next) => { // let user = byUtils.getUser() @@ -95,9 +93,9 @@ // console.log(to,"触发了",router.options.routes); // // type 2 : all admin // // type 0 : 泊车 id:2 // // type 1 : 执法 id:3 // // type 1 : 执法 id:3 // next(); // //