Browse Source

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

liuchang 4 years ago
parent
commit
d57d427078

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

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

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

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

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

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

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

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