fix: 修复请求没有使用vue原型链上的axios实例

main
wu.jian2 2 years ago
parent 9c2051100a
commit 8acf6342a4

@ -1,6 +1,6 @@
{ {
"name": "@gcpaas/data-room-ui", "name": "@gcpaas/data-room-ui",
"version": "1.0.1-2023071901-Alpha", "version": "1.0.1-2023072003-Alpha",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -2445,11 +2445,6 @@
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==",
"dev": true "dev": true
}, },
"@popperjs/core": {
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"@sideway/address": { "@sideway/address": {
"version": "4.1.4", "version": "4.1.4",
"resolved": "https://registry.npmmirror.com/@sideway/address/-/address-4.1.4.tgz", "resolved": "https://registry.npmmirror.com/@sideway/address/-/address-4.1.4.tgz",
@ -3351,27 +3346,6 @@
"whatwg-fetch": "^3.6.2" "whatwg-fetch": "^3.6.2"
}, },
"dependencies": { "dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.10.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz",
"integrity": "sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"acorn-walk": { "acorn-walk": {
"version": "8.2.0", "version": "8.2.0",
"resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz", "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz",
@ -3443,26 +3417,6 @@
"tapable": "^2.0.0" "tapable": "^2.0.0"
} }
}, },
"json5": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
}
},
"loader-utils": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^1.0.1"
}
},
"ms": { "ms": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
@ -3779,6 +3733,47 @@
"lodash": "^4.17.4" "lodash": "^4.17.4"
} }
}, },
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.10.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz",
"integrity": "sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
},
"json5": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
}
},
"loader-utils": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^1.0.1"
}
}
}
},
"@vue/vue2-jest": { "@vue/vue2-jest": {
"version": "27.0.0", "version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz", "resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
@ -3993,9 +3988,9 @@
} }
}, },
"@wjjj/utils": { "@wjjj/utils": {
"version": "0.1.2", "version": "0.1.5",
"resolved": "https://registry.npmjs.org/@wjjj/utils/-/utils-0.1.2.tgz", "resolved": "https://registry.npmjs.org/@wjjj/utils/-/utils-0.1.5.tgz",
"integrity": "sha512-ha0TIHwBYvvfOxMdeKyr0odWB12Tdv+C2kGUepDh74Ktm6uR5vq25QmMYNt6nMN/bH3KuPH82ynlDvfK+slZfg==", "integrity": "sha512-TW2m6BXUuP089GBB8BAHpeb+eJoRpMzhiGt1gUibvCQUwze7Coamlio1rHkTnBaRGs0JLhE6ToTMrjqJowfNgQ==",
"requires": { "requires": {
"element-plus": "^2.3.8", "element-plus": "^2.3.8",
"npm": "^9.8.0", "npm": "^9.8.0",
@ -7737,6 +7732,11 @@
"normalize-wheel-es": "^1.2.0" "normalize-wheel-es": "^1.2.0"
}, },
"dependencies": { "dependencies": {
"@popperjs/core": {
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"async-validator": { "async-validator": {
"version": "4.2.5", "version": "4.2.5",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz", "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz",

@ -53,7 +53,7 @@
"@amap/amap-jsapi-loader": "^1.0.1", "@amap/amap-jsapi-loader": "^1.0.1",
"@antv/g2plot": "2.4.0", "@antv/g2plot": "2.4.0",
"@jiaminghi/data-view": "2.10.0", "@jiaminghi/data-view": "2.10.0",
"@wjjj/utils": "^0.1.2", "@wjjj/utils": "^0.1.5",
"axios": "0.18.1", "axios": "0.18.1",
"babel-polyfill": "6.26.0", "babel-polyfill": "6.26.0",
"echarts": "^5.2.2", "echarts": "^5.2.2",

@ -15,7 +15,6 @@ import * as echarts from 'echarts'
import commonMixins from 'data-room-ui/js/mixins/commonMixins.js' import commonMixins from 'data-room-ui/js/mixins/commonMixins.js'
import paramsMixins from 'data-room-ui/js/mixins/paramsMixins' import paramsMixins from 'data-room-ui/js/mixins/paramsMixins'
import linkageMixins from 'data-room-ui/js/mixins/linkageMixins' import linkageMixins from 'data-room-ui/js/mixins/linkageMixins'
import { get } from 'data-room-ui/js/utils/http'
export default { export default {
name: 'MapCharts', name: 'MapCharts',
mixins: [paramsMixins, commonMixins, linkageMixins], mixins: [paramsMixins, commonMixins, linkageMixins],
@ -60,7 +59,7 @@ export default {
}, },
methods: { methods: {
chartInit () { chartInit () {
let config = this.config const config = this.config
// keycodelist // keycodelist
if (this.config.code === this.config.key || this.isPreview) { if (this.config.code === this.config.key || this.isPreview) {
// //
@ -255,20 +254,9 @@ export default {
} }
} }
const mapUrl = `${window.BS_CONFIG?.httpConfigs?.baseURL}/static/chinaMap/${config.customize.level}/${config.customize.dataMap}` const mapUrl = `${window.BS_CONFIG?.httpConfigs?.baseURL}/static/chinaMap/${config.customize.level}/${config.customize.dataMap}`
const map = await get(decodeURI(mapUrl), {}, true) const map = await this.$dataRoomAxios.get(decodeURI(mapUrl), {}, true)
echarts.registerMap(config.customize.scope, map) echarts.registerMap(config.customize.scope, map)
this.charts.setOption(option) this.charts.setOption(option)
// this.charts.on('click', (params) => {
// get(
// `${window.BS_CONFIG?.httpConfigs?.baseURL}/static/chinaMap/province/${params.name}.json`,
// {},
// true
// ).then((res) => {
// option.geo.map = params.name
// echarts.registerMap(params.name, res)
// this.charts.setOption(option, true)
// })
// })
} }
} }
} }

@ -227,7 +227,6 @@ import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
import { chartSettingMixins } from 'data-room-ui/js/mixins/chartSettingMixins' import { chartSettingMixins } from 'data-room-ui/js/mixins/chartSettingMixins'
import ColorSelect from 'data-room-ui/ColorMultipleSelect/index.vue' import ColorSelect from 'data-room-ui/ColorMultipleSelect/index.vue'
import ColorPicker from 'data-room-ui/ColorPicker/index.vue' import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
import { get } from 'data-room-ui/js/utils/http'
import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue' import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
export default { export default {
name: 'BarSetting', name: 'BarSetting',
@ -271,9 +270,7 @@ export default {
}, },
methods: { methods: {
getMapList () { getMapList () {
get( this.$dataRoomAxios.get(`${window.BS_CONFIG?.httpConfigs?.baseURL}/bigScreen/design/map/list/${this.config.customize.level}`).then((res) => {
`${window.BS_CONFIG?.httpConfigs?.baseURL}/bigScreen/design/map/list/${this.config.customize.level}`
).then((res) => {
this.mapList = res this.mapList = res
}) })
}, },

@ -66,6 +66,7 @@
> >
<el-date-picker <el-date-picker
v-model="config.endTime" v-model="config.endTime"
style="position: relative;"
popper-class="bs-el-date-picker" popper-class="bs-el-date-picker"
type="datetime" type="datetime"
align="left" align="left"

@ -1,37 +1,96 @@
<template> <template>
<el-dialog title="组件库" :visible.sync="dialogVisible" width="80%" :modal="true" :modal-append-to-body="false" <el-dialog
:appen-to-body="true" class="bs-dialog-wrap bs-el-dialog" @closed="close"> title="组件库"
:visible.sync="dialogVisible"
width="80%"
:modal="true"
:modal-append-to-body="false"
:appen-to-body="true"
class="bs-dialog-wrap bs-el-dialog"
@closed="close"
>
<div class="content"> <div class="content">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="自定义组件" name="combination"> <el-tab-pane
label="自定义组件"
name="combination"
>
<div class="big-screen-list-wrap"> <div class="big-screen-list-wrap">
<div class="top-search-wrap"> <div class="top-search-wrap">
<el-input v-model="searchKey" class="bs-el-input" placeholder="请输入组件名称" prefix-icon="el-icon-search" <el-input
clearable @clear="reSearch" @keyup.enter.native="reSearch" /> v-model="searchKey"
<el-select v-model="code" class="bs-el-select" popper-class="bs-el-select" placeholder="请选择分组" clearable class="bs-el-input"
@change="reSearch"> placeholder="请输入组件名称"
<el-option v-for="item in options" :key="item.code" :label="item.name" :value="item.code" /> prefix-icon="el-icon-search"
clearable
@clear="reSearch"
@keyup.enter.native="reSearch"
/>
<el-select
v-model="code"
class="bs-el-select"
popper-class="bs-el-select"
placeholder="请选择分组"
clearable
@change="reSearch"
>
<el-option
v-for="item in options"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select> </el-select>
<el-button size="small" style="margin-right: 20px" type="primary" @click="reSearch"> <el-button
size="small"
style="margin-right: 20px"
type="primary"
@click="reSearch"
>
搜索 搜索
</el-button> </el-button>
</div> </div>
<div v-if="list.length !== 0" v-loading="loading" class="list-wrap bs-scrollbar" element-loading-text="" <div
v-if="list.length !== 0"
v-loading="loading"
class="list-wrap bs-scrollbar"
element-loading-text="加载中"
:style="{ :style="{
display: gridComputed ? 'grid' : 'flex', display: gridComputed ? 'grid' : 'flex',
justifyContent: gridComputed ? 'space-around' : 'flex-start' justifyContent: gridComputed ? 'space-around' : 'flex-start'
}"> }"
>
<!-- <div v-if="list.length !== 0"> --> <!-- <div v-if="list.length !== 0"> -->
<div v-for="screen in list" :key="screen.id" class="big-screen-card-wrap" :style="{ <div
width: gridComputed ? 'auto' : '290px' v-for="screen in list"
}" @click="chooseComponent(screen)"> :key="screen.id"
<div :class="focus.id == screen.id ? 'focus' : ''" class="big-screen-card-inner"> class="big-screen-card-wrap"
:style="{
width: gridComputed ? 'auto' : '290px'
}"
@click="chooseComponent(screen)"
>
<div
:class="focus.id == screen.id ? 'focus' : ''"
class="big-screen-card-inner"
>
<div class="big-screen-card-img"> <div class="big-screen-card-img">
<el-image :src="screen.coverPicture" fit="contain" style="width: 100%; height: 100%"> <el-image
<div slot="placeholder" class="image-slot"> :src="screen.coverPicture"
fit="contain"
style="width: 100%; height: 100%"
>
<div
slot="placeholder"
class="image-slot"
>
加载中··· 加载中···
</div> </div>
<div slot="error" class="image-slot" style="font-size: 20px"> <div
slot="error"
class="image-slot"
style="font-size: 20px"
>
<div class="error-img-text"> <div class="error-img-text">
{{ screen.name }} {{ screen.name }}
</div> </div>
@ -39,55 +98,122 @@
</el-image> </el-image>
</div> </div>
<div class="big-screen-bottom"> <div class="big-screen-bottom">
<div class="left-bigscreen-title" :title="screen.name"> <div
class="left-bigscreen-title"
:title="screen.name"
>
{{ screen.name }} {{ screen.name }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div v-else class="empty"> <div
v-else
class="empty"
>
暂无数据 暂无数据
</div> </div>
<div class="footer-pagination-wrap"> <div class="footer-pagination-wrap">
<div class="bs-pagination"> <div class="bs-pagination">
<el-pagination class="bs-el-pagination" popper-class="bs-el-pagination" background <el-pagination
layout="total, prev, pager, next, sizes" :page-size="size" prev-text="上一页" next-text="下一页" class="bs-el-pagination"
:total="totalCount" :page-sizes="[10, 20, 50, 100]" :current-page="current" popper-class="bs-el-pagination"
@current-change="currentChangeHandle" @size-change="sizeChangeHandle" /> background
layout="total, prev, pager, next, sizes"
:page-size="size"
prev-text="上一页"
next-text="下一页"
:total="totalCount"
:page-sizes="[10, 20, 50, 100]"
:current-page="current"
@current-change="currentChangeHandle"
@size-change="sizeChangeHandle"
/>
</div> </div>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="业务组件" name="bizComponent"> <el-tab-pane
label="业务组件"
name="bizComponent"
>
<div class="big-screen-list-wrap"> <div class="big-screen-list-wrap">
<div class="top-search-wrap"> <div class="top-search-wrap">
<el-input v-model="name" class="bs-el-input" placeholder="请输入组件名称" prefix-icon="el-icon-search" clearable <el-input
@clear="reSearch" @keyup.enter.native="reSearch" /> v-model="name"
<el-select v-model="code" class="bs-el-select" popper-class="bs-el-select" placeholder="请选择分组" clearable class="bs-el-input"
@change="reSearch"> placeholder="请输入组件名称"
<el-option v-for="item in options" :key="item.code" :label="item.name" :value="item.code" /> prefix-icon="el-icon-search"
clearable
@clear="reSearch"
@keyup.enter.native="reSearch"
/>
<el-select
v-model="code"
class="bs-el-select"
popper-class="bs-el-select"
placeholder="请选择分组"
clearable
@change="reSearch"
>
<el-option
v-for="item in options"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select> </el-select>
<el-button size="small" style="margin-right: 20px" type="primary" @click="reSearch"> <el-button
size="small"
style="margin-right: 20px"
type="primary"
@click="reSearch"
>
搜索 搜索
</el-button> </el-button>
</div> </div>
<div v-if="bizComponentList.length !== 0" v-loading="loading" class="list-wrap bs-scrollbar" <div
element-loading-text="加载中" :style="{ v-if="bizComponentList.length !== 0"
v-loading="loading"
class="list-wrap bs-scrollbar"
element-loading-text="加载中"
:style="{
display: bizFridComputed ? 'grid' : 'flex', display: bizFridComputed ? 'grid' : 'flex',
justifyContent: bizFridComputed ? 'space-around' : 'flex-start' justifyContent: bizFridComputed ? 'space-around' : 'flex-start'
}"> }"
>
<!-- <div v-if="list.length !== 0"> --> <!-- <div v-if="list.length !== 0"> -->
<div v-for="screen in bizComponentList" :key="screen.id" class="big-screen-card-wrap" :style="{ <div
width: bizFridComputed ? 'auto' : '290px' v-for="screen in bizComponentList"
}" @click="chooseComponent(screen)"> :key="screen.id"
<div :class="focus.id == screen.id ? 'focus' : ''" class="big-screen-card-inner"> class="big-screen-card-wrap"
:style="{
width: bizFridComputed ? 'auto' : '290px'
}"
@click="chooseComponent(screen)"
>
<div
:class="focus.id == screen.id ? 'focus' : ''"
class="big-screen-card-inner"
>
<div class="big-screen-card-img"> <div class="big-screen-card-img">
<el-image :src="screen.coverPicture" fit="contain" style="width: 100%; height: 100%"> <el-image
<div slot="placeholder" class="image-slot"> :src="screen.coverPicture"
fit="contain"
style="width: 100%; height: 100%"
>
<div
slot="placeholder"
class="image-slot"
>
加载中··· 加载中···
</div> </div>
<div slot="error" class="image-slot" style="font-size: 20px"> <div
slot="error"
class="image-slot"
style="font-size: 20px"
>
<div class="error-img-text"> <div class="error-img-text">
{{ screen.name }} {{ screen.name }}
</div> </div>
@ -95,68 +221,123 @@
</el-image> </el-image>
</div> </div>
<div class="big-screen-bottom"> <div class="big-screen-bottom">
<div class="left-bigscreen-title" :title="screen.name"> <div
class="left-bigscreen-title"
:title="screen.name"
>
{{ screen.name }} {{ screen.name }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div v-else class="empty"> <div
v-else
class="empty"
>
暂无数据 暂无数据
</div> </div>
<div class="footer-pagination-wrap"> <div class="footer-pagination-wrap">
<div class="bs-pagination"> <div class="bs-pagination">
<el-pagination class="bs-el-pagination" popper-class="bs-el-pagination" background <el-pagination
layout="total, prev, pager, next, sizes" :page-size="size" prev-text="上一页" next-text="下一页" class="bs-el-pagination"
:total="totalCount" :page-sizes="[10, 20, 50, 100]" :current-page="current" popper-class="bs-el-pagination"
@current-change="currentChangeHandle" @size-change="sizeChangeHandle" /> background
layout="total, prev, pager, next, sizes"
:page-size="size"
prev-text="上一页"
next-text="下一页"
:total="totalCount"
:page-sizes="[10, 20, 50, 100]"
:current-page="current"
@current-change="currentChangeHandle"
@size-change="sizeChangeHandle"
/>
</div> </div>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="系统组件" name="remote"> <el-tab-pane
label="系统组件"
name="remote"
>
<div class="big-screen-list-wrap"> <div class="big-screen-list-wrap">
<div v-if="remoteComponentlist.length !== 0" v-loading="loading" class="list-wrap bs-scrollbar" <div
element-loading-text="加载中" :style="{ v-if="remoteComponentlist.length !== 0"
v-loading="loading"
class="list-wrap bs-scrollbar"
element-loading-text="加载中"
:style="{
display: remoteComponentsGridComputed ? 'grid' : 'flex', display: remoteComponentsGridComputed ? 'grid' : 'flex',
justifyContent: remoteComponentsGridComputed ? 'space-around' : 'flex-start' justifyContent: remoteComponentsGridComputed ? 'space-around' : 'flex-start'
}"> }"
<div v-for="component in remoteComponentlist" :key="component.title" class="big-screen-card-wrap" :style="{ >
width: remoteComponentsGridComputed ? 'auto' : '290px' <div
}" @click="chooseComponent(component)"> v-for="component in remoteComponentlist"
<div :class="component.title == focus.title ? 'focus' : ''" class="big-screen-card-inner"> :key="component.title"
class="big-screen-card-wrap"
:style="{
width: remoteComponentsGridComputed ? 'auto' : '290px'
}"
@click="chooseComponent(component)"
>
<div
:class="component.title == focus.title ? 'focus' : ''"
class="big-screen-card-inner"
>
<div class="big-screen-card-img"> <div class="big-screen-card-img">
<el-image :src="component.img" fit="contain" style="width: 100%; height: 100%"> <el-image
<div slot="placeholder" class="image-slot"> :src="component.img"
fit="contain"
style="width: 100%; height: 100%"
>
<div
slot="placeholder"
class="image-slot"
>
加载中··· 加载中···
</div> </div>
</el-image> </el-image>
</div> </div>
<div class="big-screen-bottom"> <div class="big-screen-bottom">
<div class="left-bigscreen-title" :title="component.title"> <div
class="left-bigscreen-title"
:title="component.title"
>
{{ component.title }} {{ component.title }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div v-else class="empty"> <div
v-else
class="empty"
>
暂无数据 暂无数据
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div slot="footer" class="dialog-footer"> <div
<el-button class="bs-el-button-default" @click="dialogVisible = false"> slot="footer"
class="dialog-footer"
>
<el-button
class="bs-el-button-default"
@click="dialogVisible = false"
>
取消 取消
</el-button> </el-button>
<el-button type="primary" @click="confirm"> <el-button
type="primary"
@click="confirm"
>
确定 确定
</el-button> </el-button>
<el-button <el-button
type='primary' type="primary"
@click="jumpto" @click="jumpto"
> >
组件管理 组件管理
@ -165,7 +346,6 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { get } from 'data-room-ui/js/utils/http'
import { pageMixins } from 'data-room-ui/js/mixins/page' import { pageMixins } from 'data-room-ui/js/mixins/page'
import _ from 'lodash' import _ from 'lodash'
import innerRemoteComponents, { getRemoteComponents, getRemoteComponentConfig } from 'data-room-ui/RemoteComponents/remoteComponentsList' import innerRemoteComponents, { getRemoteComponents, getRemoteComponentConfig } from 'data-room-ui/RemoteComponents/remoteComponentsList'
@ -174,7 +354,7 @@ export default {
name: 'ComponentDialog', name: 'ComponentDialog',
mixins: [pageMixins], mixins: [pageMixins],
props: {}, props: {},
data() { data () {
return { return {
dialogVisible: false, dialogVisible: false,
loading: false, loading: false,
@ -191,34 +371,34 @@ export default {
} }
}, },
computed: { computed: {
gridComputed() { gridComputed () {
return this.list.length > 3 return this.list.length > 3
}, },
remoteComponentsGridComputed() { remoteComponentsGridComputed () {
return this.remoteComponentlist.length > 3 return this.remoteComponentlist.length > 3
}, },
bizFridComputed() { bizFridComputed () {
return this.bizComponentList.length > 3 return this.bizComponentList.length > 3
} }
}, },
watch: { watch: {
activeName() { activeName () {
this.getCatalogList() this.getCatalogList()
} }
}, },
mounted() { mounted () {
this.remoteComponentlist = [...innerRemoteComponents, ...getRemoteComponents()] this.remoteComponentlist = [...innerRemoteComponents, ...getRemoteComponents()]
}, },
methods: { methods: {
jumpto(){ jumpto () {
let {href} = this.$router.resolve(`/big-screen-components?edit=1`) const { href } = this.$router.resolve('/big-screen-components?edit=1')
window.open(href,'_blank') window.open(href, '_blank')
}, },
chooseComponent(component) { chooseComponent (component) {
this.focus = _.cloneDeep(component) this.focus = _.cloneDeep(component)
}, },
close() { }, close () { },
init() { init () {
this.dialogVisible = true this.dialogVisible = true
this.current = 1 this.current = 1
this.searchKey = '' this.searchKey = ''
@ -228,7 +408,7 @@ export default {
this.getCatalogList() this.getCatalogList()
}, },
// //
confirm() { confirm () {
this.dialogVisible = false this.dialogVisible = false
if (this.activeName === 'combination') { if (this.activeName === 'combination') {
if (Object.keys(this.focus).length) { if (Object.keys(this.focus).length) {
@ -250,7 +430,7 @@ export default {
this.$emit('setRemoteComponent', config) this.$emit('setRemoteComponent', config)
} }
}, },
getDataList() { getDataList () {
this.loading = true this.loading = true
this.$dataRoomAxios.get('/bigScreen/design/page', { this.$dataRoomAxios.get('/bigScreen/design/page', {
parentCode: this.code || null, parentCode: this.code || null,
@ -280,9 +460,9 @@ export default {
}) })
}, },
// //
getCatalogList() { getCatalogList () {
const url = this.activeName === 'combination' ? '/bigScreen/type/list/componentCatalog' : '/bigScreen/type/list/bizComponentCatalog' const url = this.activeName === 'combination' ? '/bigScreen/type/list/componentCatalog' : '/bigScreen/type/list/bizComponentCatalog'
get(url) this.$dataRoomAxios.get(url)
.then((data) => { .then((data) => {
this.options = data this.options = data
}) })

@ -82,7 +82,6 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { get } from 'data-room-ui/js/utils/http'
export default { export default {
name: 'BgImgDialog', name: 'BgImgDialog',
props: { props: {

@ -1,66 +1,143 @@
<template> <template>
<el-dialog title="资源库" :visible.sync="dialogVisible" width="80%" :modal="true" :modal-append-to-body="false" <el-dialog
:appen-to-body="true" class="bs-dialog-wrap bs-el-dialog" @closed="close"> title="资源库"
:visible.sync="dialogVisible"
width="80%"
:modal="true"
:modal-append-to-body="false"
:appen-to-body="true"
class="bs-dialog-wrap bs-el-dialog"
@closed="close"
>
<div class="content"> <div class="content">
<div class="big-screen-list-wrap"> <div class="big-screen-list-wrap">
<div class="top-search-wrap"> <div class="top-search-wrap">
<el-input v-model="searchKey" class="bs-el-input" placeholder="请输入图片名称" prefix-icon="el-icon-search" clearable <el-input
@clear="reSearch" @keyup.enter.native="reSearch" /> v-model="searchKey"
<el-select v-model="code" class="bs-el-select" popper-class="bs-el-select" placeholder="请选择类型" clearable class="bs-el-input"
@change="reSearch"> placeholder="请输入图片名称"
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.code" /> prefix-icon="el-icon-search"
clearable
@clear="reSearch"
@keyup.enter.native="reSearch"
/>
<el-select
v-model="code"
class="bs-el-select"
popper-class="bs-el-select"
placeholder="请选择类型"
clearable
@change="reSearch"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.code"
/>
</el-select> </el-select>
<el-button size="small" style="margin-right: 20px" type="primary" @click="reSearch"> <el-button
size="small"
style="margin-right: 20px"
type="primary"
@click="reSearch"
>
搜索 搜索
</el-button> </el-button>
</div> </div>
<div v-if="list.length !== 0" v-loading="loading" class="list-wrap bs-scrollbar" element-loading-text="" <div
v-if="list.length !== 0"
v-loading="loading"
class="list-wrap bs-scrollbar"
element-loading-text="加载中"
:style="{ :style="{
display: gridComputed ? 'grid' : 'flex', display: gridComputed ? 'grid' : 'flex',
justifyContent: gridComputed ? 'space-around' : 'flex-start' justifyContent: gridComputed ? 'space-around' : 'flex-start'
}"> }"
>
<!-- <div v-if="list.length !== 0"> --> <!-- <div v-if="list.length !== 0"> -->
<div v-for="screen in list" :key="screen.id" class="big-screen-card-wrap" :style="{ <div
width: gridComputed ? 'auto' : '290px' v-for="screen in list"
}" @click="chooseImg(screen)"> :key="screen.id"
<div :class="focus.id == screen.id ? 'focus' : ''" class="big-screen-card-inner"> class="big-screen-card-wrap"
:style="{
width: gridComputed ? 'auto' : '290px'
}"
@click="chooseImg(screen)"
>
<div
:class="focus.id == screen.id ? 'focus' : ''"
class="big-screen-card-inner"
>
<div class="big-screen-card-img"> <div class="big-screen-card-img">
<el-image :src="screen.url" fit="contain" style="width: 100%; height: 100%"> <el-image
<div slot="placeholder" class="image-slot"> :src="screen.url"
fit="contain"
style="width: 100%; height: 100%"
>
<div
slot="placeholder"
class="image-slot"
>
加载中··· 加载中···
</div> </div>
</el-image> </el-image>
</div> </div>
<div class="big-screen-bottom"> <div class="big-screen-bottom">
<div class="left-bigscreen-title" :title="screen.originalName"> <div
class="left-bigscreen-title"
:title="screen.originalName"
>
{{ screen.originalName }} {{ screen.originalName }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div v-else class="empty"> <div
v-else
class="empty"
>
暂无数据 暂无数据
</div> </div>
<div class="footer-pagination-wrap"> <div class="footer-pagination-wrap">
<div class="bs-pagination"> <div class="bs-pagination">
<el-pagination class="bs-el-pagination" popper-class="bs-el-pagination" background <el-pagination
layout="total, prev, pager, next, sizes" :page-size="size" prev-text="上一页" next-text="下一页" class="bs-el-pagination"
:total="totalCount" :page-sizes="[10, 20, 50, 100]" :current-page="current" popper-class="bs-el-pagination"
@current-change="currentChangeHandle" @size-change="sizeChangeHandle" /> background
layout="total, prev, pager, next, sizes"
:page-size="size"
prev-text="上一页"
next-text="下一页"
:total="totalCount"
:page-sizes="[10, 20, 50, 100]"
:current-page="current"
@current-change="currentChangeHandle"
@size-change="sizeChangeHandle"
/>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div
<el-button class="bs-el-button-default" @click="dialogVisible = false"> slot="footer"
class="dialog-footer"
>
<el-button
class="bs-el-button-default"
@click="dialogVisible = false"
>
取消 取消
</el-button> </el-button>
<el-button type="primary" @click="confirm"> <el-button
type="primary"
@click="confirm"
>
确定 确定
</el-button> </el-button>
<el-button <el-button
type='primary' type="primary"
@click="jumpto" @click="jumpto"
> >
资源管理 资源管理
@ -69,14 +146,13 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { get } from 'data-room-ui/js/utils/http'
import { pageMixins } from 'data-room-ui/js/mixins/page' import { pageMixins } from 'data-room-ui/js/mixins/page'
import _ from 'lodash' import _ from 'lodash'
export default { export default {
name: 'SourceDialog', name: 'SourceDialog',
mixins: [pageMixins], mixins: [pageMixins],
props: {}, props: {},
data() { data () {
return { return {
dialogVisible: false, dialogVisible: false,
loading: false, loading: false,
@ -88,21 +164,21 @@ export default {
} }
}, },
computed: { computed: {
gridComputed() { gridComputed () {
return this.list.length > 3 return this.list.length > 3
} }
}, },
mounted() { }, mounted () { },
methods: { methods: {
jumpto(){ jumpto () {
let {href} = this.$router.resolve(`/big-screen-source?edit=1`) const { href } = this.$router.resolve('/big-screen-source?edit=1')
window.open(href,'_blank') window.open(href, '_blank')
}, },
chooseImg(img) { chooseImg (img) {
this.focus = _.cloneDeep(img) this.focus = _.cloneDeep(img)
}, },
close() { }, close () { },
init() { init () {
this.dialogVisible = true this.dialogVisible = true
this.current = 1 this.current = 1
this.searchKey = '' this.searchKey = ''
@ -111,13 +187,13 @@ export default {
this.getDataList() this.getDataList()
this.getCatalogList() this.getCatalogList()
}, },
confirm() { confirm () {
this.dialogVisible = false this.dialogVisible = false
if (this.focus !== -1) { if (this.focus !== -1) {
this.$emit('getImg', this.focus) this.$emit('getImg', this.focus)
} }
}, },
getDataList() { getDataList () {
this.loading = true this.loading = true
this.$dataRoomAxios.get('/bigScreen/file', { this.$dataRoomAxios.get('/bigScreen/file', {
module: this.code, module: this.code,
@ -135,7 +211,7 @@ export default {
}) })
}, },
// //
getCatalogList() { getCatalogList () {
this.$dataRoomAxios.get('/bigScreen/type/list/resourceCatalog') this.$dataRoomAxios.get('/bigScreen/type/list/resourceCatalog')
.then((data) => { .then((data) => {
this.options = data this.options = data

@ -239,8 +239,6 @@ import BigScreenRun from 'data-room-ui/BigScreenRun/index.vue'
import Icon from 'data-room-ui/assets/images/pageIcon/export' import Icon from 'data-room-ui/assets/images/pageIcon/export'
import { getPageType } from './utils' import { getPageType } from './utils'
import _ from 'lodash' import _ from 'lodash'
// import axios from 'axios'
// import { post } from 'data-room-ui/js/utils/http'
import IconSvg from 'data-room-ui/SvgIcon' import IconSvg from 'data-room-ui/SvgIcon'
let dashBoardPageCode = null let dashBoardPageCode = null
export default { export default {

@ -34,7 +34,6 @@
<NotPermission v-else /> <NotPermission v-else />
</template> </template>
<script> <script>
import { get } from 'data-room-ui/js/utils/http'
import RenderCard from 'data-room-ui/Render/RenderCard.vue' import RenderCard from 'data-room-ui/Render/RenderCard.vue'
import { mapActions, mapMutations, mapState } from 'vuex' import { mapActions, mapMutations, mapState } from 'vuex'
import { getThemeConfig } from 'data-room-ui/js/api/bigScreenApi' import { getThemeConfig } from 'data-room-ui/js/api/bigScreenApi'

@ -596,9 +596,9 @@
} }
//el-date-picker //el-date-picker
.bs-date-popper-class { .bs-el-date-picker {
background-color: var(--bs-background-1) !important;
left: -115px !important; left: -115px !important;
background-color: var(--bs-background-1) !important;
.el-picker-panel__footer { .el-picker-panel__footer {
background-color: var(--bs-background-1) !important; background-color: var(--bs-background-1) !important;
border-top: 1px solid var(--bs-background-2); border-top: 1px solid var(--bs-background-2);

Loading…
Cancel
Save