|
|
@@ -724,10 +724,23 @@
|
|
|
<!--</el-upload>-->
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <div v-for="(tmpUrl, index) in scenefileurllist" :key="index">
|
|
|
+ <!-- <div v-for="(tmpUrl, index) in scenefileurllist" :key="index">
|
|
|
<el-link :href="'http://'+fileurlcut(scenefile.FileUrl, index)" target="_blank" type="primary">
|
|
|
{{scenefile.FileName.split('$')[index]}}</el-link>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <viewer :images="scenefileurllist">
|
|
|
+ <div v-for="(tmpUrl,index) in scenefileurllist" :key="index" style="vertical-align: middle; text-align: center;">
|
|
|
+ <el-link :href="'http://'+fileurlcut(scenefile.FileUrl, index)" target="_blank" type="primary"
|
|
|
+ v-if="imgFormat(scenefile.FileUrl, index)" >
|
|
|
+ {{scenefile.FileName.split('$')[index]}}</el-link>
|
|
|
+ <img
|
|
|
+ v-else
|
|
|
+ class="photoStyle" alt=""
|
|
|
+ :src="'http://'+fileurlcut(scenefile.FileUrl, index)"
|
|
|
+ :key="index">
|
|
|
+ </div>
|
|
|
+ </viewer>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
@@ -764,10 +777,17 @@ import axios from 'axios'
|
|
|
import uploadajax from '../../assets/js/uploadajax.js'
|
|
|
import ManufacturerList from '@/components/oilsupplier/manufacturerlist'
|
|
|
|
|
|
-export default {
|
|
|
-
|
|
|
+// v-viewer
|
|
|
+ import Vue from 'vue';
|
|
|
+ import Viewer from 'v-viewer'
|
|
|
+ import 'viewerjs/dist/viewer.css'
|
|
|
+ Vue.use(Viewer)
|
|
|
+ Viewer.setDefaults({
|
|
|
+ Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
|
|
|
+ })
|
|
|
|
|
|
|
|
|
+export default {
|
|
|
name: 'goodsinfo',
|
|
|
props: {
|
|
|
formData: {
|
|
|
@@ -1194,6 +1214,23 @@ export default {
|
|
|
},
|
|
|
|
|
|
|
|
|
+ imgFormat(val,index){
|
|
|
+ if(val !=null && val != undefined && val !=''){
|
|
|
+ let fileurlall = val.split('$')[index]
|
|
|
+ let fileurl = fileurlall.split('|')
|
|
|
+ if(fileurl[1] != null && fileurl[1] !='' && fileurl[1] != undefined){
|
|
|
+ let Format = fileurl[1].split(".")
|
|
|
+ if(Format[1]!=null && Format[1] !='' && Format[1] != undefined){
|
|
|
+ let pictureFormat = Format[1];
|
|
|
+ if("jpg"== pictureFormat || "bmp" ==pictureFormat || "png" ==pictureFormat || "gif" ==pictureFormat|| "jpeg" ==pictureFormat){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
fileurlcut (val, index) {
|
|
|
let fileurlall = val.split('$')[index]
|