瀏覽代碼

[FE]增添配置页面图片显示

liuchang 4 年之前
父節點
當前提交
d57d427078

+ 1 - 1
security-protection-platform/src/api/system/index.js

@ -1,6 +1,6 @@
1 1
import http from '@/http'
2 2
import { keysMapping, keysMappingReverse } from '@/utils/keysMapping'
3
const { $default, $http } = http
3
const { $default } = http
4 4
5 5
const mapping = {
6 6
  scheduleId: 'workShiftId',

+ 4 - 0
security-protection-platform/src/conf/axios.config.js

@ -40,7 +40,11 @@ const conf = {
40 40
  root: {
41 41
    default: {
42 42
      baseURL: 'http://10.19.90.34:8018'
43
    },
44
    picurl: {
45
      baseURL: 'http://10.19.90.34:19000/tool-image/'
43 46
    }
47
44 48
  }
45 49
}
46 50

+ 4 - 2
security-protection-platform/src/modules/system/monitor/HomePageSettings/Card.vue

@ -2,7 +2,7 @@
2 2
  <div :class="{ active: showConfirm, lock: loadingDelete }" class="masonry__item div-block">
3 3
    <div :style="{ width: gridWidth }" class="card card-has-shadowed">
4 4
      <div :style="{ height: gridHeight }" class="card-block" style="margin: 0px; padding: 0px">
5
        <img :style="{ height: gridHeight, width: gridWidth }" :src="data.pictureUrl" alt="" />
5
        <img :style="{ height: gridHeight, width: gridWidth }" :src="this.$picurl.defaults.baseURL+data.pictureUrl" alt="" />
6 6
      </div>
7 7
      <div class="opt">
8 8
        <div class="move">拖拽移动</div>
@ -28,6 +28,8 @@
28 28
29 29
<script>
30 30
import UpdateName from './UpdateName'
31
import http from '@/http'
32
const { $picurl } = http
31 33
export default {
32 34
  components: {
33 35
    UpdateName
@ -66,7 +68,7 @@ export default {
66 68
    }
67 69
  },
68 70
  mounted() {
69
71
    //  console.log(this.$picurl.defaults.baseURL)
70 72
  },
71 73
  methods: {
72 74
    handleChangeName: function (name) {

+ 3 - 3
security-protection-platform/src/modules/system/monitor/VideoMonitor/index.vue

@ -12,8 +12,8 @@
12 12
            >
13 13
              <t-option
14 14
                v-for="item in departmentList"
15
                :key="item.code"
16
                :value="item.code"
15
                :key="item.id"
16
                :value="item.id"
17 17
              >{{ item.name }}</t-option
18 18
              >
19 19
            </t-select>
@ -200,7 +200,7 @@ export default {
200 200
      sysapi.getDepartments().then((resp) => {
201 201
        this.departmentList = resp.data.data || []
202 202
        if (this.departmentList.length > 0) {
203
          this.currentWindPlaceValue = this.departmentList[0].code
203
          this.currentWindPlaceValue = this.departmentList[0].id
204 204
          this.getMonitorScene(this.currentWindPlaceValue)
205 205
        }
206 206
      })

+ 8 - 1
security-protection-platform/src/modules/system/monitor/components/ViewCard/index.vue

@ -1,7 +1,7 @@
1 1
<template>
2 2
  <div :class="{ active: showConfirm, lock: loadingDelete }" :style="{ width, height }" class="masonry__item div-block">
3 3
    <div class="card card-has-shadowed card-main">
4
      <div :style="`backgroundImage:url(${data.pictureUrl})`" class="card-bg" />
4
      <div :style="`backgroundImage:url(${this.$picurl.defaults.baseURL+data.pictureUrl})`" class="card-bg" />
5 5
      <div class="opt">
6 6
        <div class="move">拖拽移动</div>
7 7
        <t-button shape="round" icon="swap-outline" style="margin: 0px 2px 0px 2px" @click="handleEdit">替换</t-button>
@ -24,6 +24,9 @@
24 24
25 25
<script>
26 26
import UpdateName from './UpdateName'
27
import http from '@/http'
28
// eslint-disable-next-line no-unused-vars
29
const { $picurl } = http
27 30
export default {
28 31
  components: {
29 32
    UpdateName
@ -40,6 +43,10 @@ export default {
40 43
    height: {
41 44
      type: String,
42 45
      default: '100%'
46
    },
47
    monitorSceneTypeName: {
48
      type: String,
49
      require: true
43 50
    }
44 51
  },
45 52
  data() {