Browse Source

图片放大

dingxin 6 years ago
parent
commit
6c925aed78

+ 2
- 0
package.json View File

17
     "element-ui": "^2.10.1",
17
     "element-ui": "^2.10.1",
18
     "normalize.css": "^8.0.1",
18
     "normalize.css": "^8.0.1",
19
     "nprogress": "^0.2.0",
19
     "nprogress": "^0.2.0",
20
+    "v-viewer": "^1.4.2",
20
     "vue": "^2.6.6",
21
     "vue": "^2.6.6",
21
     "vue-echarts": "^4.0.1",
22
     "vue-echarts": "^4.0.1",
23
+    "vue-photo-preview": "^1.1.3",
22
     "vue-router": "^3.0.2",
24
     "vue-router": "^3.0.2",
23
     "vuex": "^3.1.0"
25
     "vuex": "^3.1.0"
24
   },
26
   },

+ 1
- 1
src/config/api.js View File

399
         url: `${commPrefix}/tdSpec/update`
399
         url: `${commPrefix}/tdSpec/update`
400
       },
400
       },
401
       delete: {
401
       delete: {
402
-        method: 'delete',
402
+        method: 'put',
403
         url: `${commPrefix}/tdSpec/delete/:id`
403
         url: `${commPrefix}/tdSpec/delete/:id`
404
       },
404
       },
405
     },
405
     },

+ 4
- 0
src/main.js View File

14
 
14
 
15
 Vue.use(Element)
15
 Vue.use(Element)
16
 
16
 
17
+import preview from 'vue-photo-preview'
18
+import 'vue-photo-preview/dist/skin.css'
19
+Vue.use(preview)
20
+
17
 Vue.config.productionTip = false
21
 Vue.config.productionTip = false
18
 Vue.component('v-chart', ECharts)
22
 Vue.component('v-chart', ECharts)
19
 Vue.component('xm-icon', XMIcon)
23
 Vue.component('xm-icon', XMIcon)

+ 2
- 4
src/views/carManagement/management.vue View File

29
               prop="carImage"
29
               prop="carImage"
30
               label="车辆图片">
30
               label="车辆图片">
31
               <template slot-scope="scope">
31
               <template slot-scope="scope">
32
-              <el-image
33
-                  style="width: 100px; height: 100px"
34
-                  :src="scope.row.carImage"
35
-                  fit="fill"></el-image>
32
+              <el-image :src="scope.row.carImage" preview  style="width: 96px;" ></el-image>
36
               </template>
33
               </template>
37
       </el-table-column>
34
       </el-table-column>
38
           <el-table-column
35
           <el-table-column
154
     },
151
     },
155
     getPage() {
152
     getPage() {
156
       this.getManagement(this.formInline);
153
       this.getManagement(this.formInline);
154
+      this.$previewRefresh()
157
     },
155
     },
158
     handleSizeChange(val) {
156
     handleSizeChange(val) {
159
       // console.log(`每页 ${val} 条`)
157
       // console.log(`每页 ${val} 条`)

+ 1
- 4
src/views/cart/list.vue View File

40
               align='center'
40
               align='center'
41
               label="驾驶员照片">
41
               label="驾驶员照片">
42
         <template slot-scope="scope">
42
         <template slot-scope="scope">
43
-          <el-image
44
-                  style="width: 100px; height: 100px"
45
-                  :src="scope.row.driverImage"
46
-                  fit="fill"></el-image>
43
+          <el-image style="width: 96px;" :src="scope.row.driverImage" preview fit="fill"></el-image>
47
         </template>
44
         </template>
48
       </el-table-column>
45
       </el-table-column>
49
       <!-- <el-table-column
46
       <!-- <el-table-column

+ 2
- 0
src/views/followup/list.vue View File

52
       label="头像">
52
       label="头像">
53
       <template slot-scope="scope">
53
       <template slot-scope="scope">
54
         <el-image
54
         <el-image
55
+          preview
55
           style="width: 100px; height: 100px"
56
           style="width: 100px; height: 100px"
56
           :src="scope.row.avatar"
57
           :src="scope.row.avatar"
57
           fit="fill">
58
           fit="fill">
241
     },
242
     },
242
     getPage() {
243
     getPage() {
243
       this.getFollowup(this.formInline)
244
       this.getFollowup(this.formInline)
245
+      this.$previewRefresh()
244
       // window.console.log(this.$store)
246
       // window.console.log(this.$store)
245
       // this.$store.commit('security/foo')
247
       // this.$store.commit('security/foo')
246
       // this.$store.dispatch('security/getSecurity')
248
       // this.$store.dispatch('security/getSecurity')

+ 1
- 0
src/views/goodsManager/GoodsType.vue View File

160
         }
160
         }
161
 
161
 
162
         this.$message('操作成功')
162
         this.$message('操作成功')
163
+        this.getList()
163
       }).catch((err) => {
164
       }).catch((err) => {
164
         this.$message.error(err.message || err)
165
         this.$message.error(err.message || err)
165
       })
166
       })

+ 1
- 1
src/views/goodsManager/goodManager/index.vue View File

29
         <el-table-column prop="goodsName" label="商品名称"></el-table-column>
29
         <el-table-column prop="goodsName" label="商品名称"></el-table-column>
30
         <el-table-column label="图片" width="300">
30
         <el-table-column label="图片" width="300">
31
           <template slot-scope="scope">
31
           <template slot-scope="scope">
32
-            <img :src="scope.row.imgUrl" style="width: 96px;" />
32
+            <img :src="scope.row.imgUrl" preview style="width: 96px;" />
33
           </template>
33
           </template>
34
         </el-table-column>
34
         </el-table-column>
35
         <el-table-column label="类型">
35
         <el-table-column label="类型">

+ 1
- 1
src/views/lobby/list.vue View File

46
     </el-table-column>
46
     </el-table-column>
47
     <el-table-column label="头像" width="150" >
47
     <el-table-column label="头像" width="150" >
48
            <template slot-scope="scope">
48
            <template slot-scope="scope">
49
-              <img :src="scope.row.carImage" width="150" class="head_pic"/>
49
+              <img :src="scope.row.carImage" preview width="150" class="head_pic"/>
50
           </template>
50
           </template>
51
     </el-table-column>
51
     </el-table-column>
52
     <el-table-column
52
     <el-table-column

+ 1
- 1
src/views/person/list.vue View File

52
           label="照片">
52
           label="照片">
53
           <template slot-scope="scope">
53
           <template slot-scope="scope">
54
             <div class="avatar">
54
             <div class="avatar">
55
-              <img :src="scope.row.avatar" alt="" />
55
+              <img :src="scope.row.avatar" preview alt="" />
56
             </div>
56
             </div>
57
           </template>
57
           </template>
58
         </el-table-column>
58
         </el-table-column>

+ 2
- 1
src/views/security/list.vue View File

69
               prop="carImage"
69
               prop="carImage"
70
               label="车辆图片">
70
               label="车辆图片">
71
               <template slot-scope="scope">
71
               <template slot-scope="scope">
72
-              <el-image
72
+              <el-image preview
73
                   style="width: 100px; height: 100px"
73
                   style="width: 100px; height: 100px"
74
                   :src="scope.row.carImage"
74
                   :src="scope.row.carImage"
75
                   fit="fill"></el-image>
75
                   fit="fill"></el-image>
129
     },
129
     },
130
     getPage() {
130
     getPage() {
131
       this.getSecurity(this.formInline)
131
       this.getSecurity(this.formInline)
132
+      this.$previewRefresh()
132
       // window.console.log(this.$store)
133
       // window.console.log(this.$store)
133
       // this.$store.commit('security/foo')
134
       // this.$store.commit('security/foo')
134
       // this.$store.dispatch('security/getSecurity')
135
       // this.$store.dispatch('security/getSecurity')