feat: 大屏展示 url 改成动态
							parent
							
								
									e97770267d
								
							
						
					
					
						commit
						852e419487
					
				| 
						 | 
					@ -0,0 +1,82 @@
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Created by HaijunZhang on 2019/7/23.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					import { request } from '@cmp/cmp-element'
 | 
				
			||||||
 | 
					import { wrapperParams } from 'utils'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function login(params) {
 | 
				
			||||||
 | 
					  return request.post('/sms/v1/users/login', params)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function getTokenInfo(params) {
 | 
				
			||||||
 | 
					  return request.post('/sms/v1/sso/token/info', params)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function getToken() {
 | 
				
			||||||
 | 
					  return request.post('/sms/v1/sso/check')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function getUserInfo() {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/login/detail')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function logout() {
 | 
				
			||||||
 | 
					  return request.post('/sms/v1/users/logout')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function getConfig(params) {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/logo', {
 | 
				
			||||||
 | 
					    params: wrapperParams(params)
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function getDict(data) {
 | 
				
			||||||
 | 
					  return request.get('/dict/children', {
 | 
				
			||||||
 | 
					    params: wrapperParams(data)
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function getSysconf() {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/configs')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function getSysconfCode(params) {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/configs', { params })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function modifySysconf(data) {
 | 
				
			||||||
 | 
					  return request.put('/sms/v1/configs', wrapperParams(data))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function syncLdapApi() {
 | 
				
			||||||
 | 
					  return request.post('/sms/v1/configs/syncLdap')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 获取首页概览信息
 | 
				
			||||||
 | 
					export function getPortal(params) {
 | 
				
			||||||
 | 
					  return request.get('/cmp/v1/portal/platform/stats', { params: wrapperParams(params) })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function getServiceQuota(tenantId, data) {
 | 
				
			||||||
 | 
					  return request.get(`/cos/v1/tenants/${tenantId}/quotas`, {
 | 
				
			||||||
 | 
					    params: wrapperParams(data)
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					export function replaceToken(params) {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/token', { params })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 获取用户权限
 | 
				
			||||||
 | 
					export function getUserPermissions() {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/users/permissions')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 获取系统配置信息
 | 
				
			||||||
 | 
					export function getSystemConfigs(params) {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/configs', { params })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 获取树状系统配置信息
 | 
				
			||||||
 | 
					export function getSystemTreeConfigs(params) {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/configs/tree', { params })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 更新系统配置信息
 | 
				
			||||||
 | 
					export function updateSystemConfigs(params) {
 | 
				
			||||||
 | 
					  return request.put('/sms/v1/system-configs', params, {
 | 
				
			||||||
 | 
					    headers: { 'Content-Type': 'multipart/form-data', BsmAjaxHeader: true, options: { noSeri: true } }
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 测试连接
 | 
				
			||||||
 | 
					export function testLinkApi(category) {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/configs/test', { params: { category } })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function getPermissionButtons() {
 | 
				
			||||||
 | 
					  return request.get('/sms/v1/users/button/permissions')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -1,77 +1,47 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="screen-container" title="大屏列表">
 | 
					  <div class="screen-container" title="大屏列表">
 | 
				
			||||||
    <el-row :gutter="20">
 | 
					    <el-row :gutter="20" v-if="list.length">
 | 
				
			||||||
      <el-col :lg="12" :sm="24" v-for="(item, index) in list" :key="index">
 | 
					      <el-col :lg="12" :sm="24" v-for="(item, index) in list" :key="index">
 | 
				
			||||||
        <el-card class="card" :body-style="{ padding: '0px' }" @click.native="goPage(item.path)">
 | 
					        <el-card class="card" :body-style="{ padding: '0px' }" @click.native="goPage(item.value)">
 | 
				
			||||||
          <img :src="item.bg" class="image" />
 | 
					          <img :src="item.bg" class="image" />
 | 
				
			||||||
          <div class="footer-title">
 | 
					          <div class="footer-title">
 | 
				
			||||||
            <span>{{ screenConfigs[item.code] }}</span>
 | 
					            <span>{{ item.name }}</span>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </el-card>
 | 
					        </el-card>
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
    </el-row>
 | 
					    </el-row>
 | 
				
			||||||
 | 
					    <cb-empty v-else description="暂无数据,请联系管理员查看 管理中心-系统配置-系统对接-大屏展示配置 页面是否配置正确"></cb-empty>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { reactive, toRefs, ref } from 'vue'
 | 
					import { reactive, toRefs } from 'vue'
 | 
				
			||||||
import { goScreenWeb } from './utils'
 | 
					import { getSystemTreeConfigs } from 'services/system'
 | 
				
			||||||
import { getDictChildren } from 'services/system/dictionary'
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  setup(props, context) {
 | 
					  setup() {
 | 
				
			||||||
    const state = reactive({
 | 
					    const state = reactive({
 | 
				
			||||||
      list: [
 | 
					      list: []
 | 
				
			||||||
        {
 | 
					    })
 | 
				
			||||||
          code: 'AQTS',
 | 
					    const bgMap = {
 | 
				
			||||||
          bg: require('assets/screen/aqts.jpg'),
 | 
					      AQTS: require('assets/screen/aqts.jpg'),
 | 
				
			||||||
          path: `http://bi.iaserver.online:60006/webroot/decision/view/duchamp?viewlet=%25E5%25AE%2589%25E5%2585%25A8%25E6%2580%2581%25E5%258A%25BF%25E5%25B1%2595%25E7%25A4%25BA%25E5%25A4%25A7%25E5%25B1%258F.fvs
 | 
					      SJZY: require('assets/screen/sjzy.jpg'),
 | 
				
			||||||
&ref_t=design&ref_c=959add28-890d-4735-bbc9-54a40524a84e`
 | 
					      YZY: require('assets/screen/yzydp.jpg')
 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          code: 'SJZY',
 | 
					 | 
				
			||||||
          bg: require('assets/screen/sjzy.jpg'),
 | 
					 | 
				
			||||||
          path: `http://bi.iaserver.online:60006/webroot/decision/view/duchamp?viewlet=%25E6%2595%25B0%25E6%258D%25AE%25E8%25B5%2584%25E6%25BA%2590%25E5%25B1%2595%25E7%25A4%25BA%25E5%25A4%25A7%25E5%25B1%258F.fvs
 | 
					 | 
				
			||||||
&ref_t=design&ref_c=959add28-890d-4735-bbc9-54a40524a84e&page_number=1`
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   code: 'WLTS',
 | 
					 | 
				
			||||||
        //   bg: require('assets/screen/wlts.jpg'),
 | 
					 | 
				
			||||||
        //   path: 'https://www.baidu.com'
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          code: 'YZY',
 | 
					 | 
				
			||||||
          bg: require('assets/screen/yzydp.jpg'),
 | 
					 | 
				
			||||||
          path: `http://bi.iaserver.online:60006/webroot/decision/view/duchamp?viewlet=%25E4%25BA%2591%25E8%25B5%2584%25E6%25BA%2590%25E5%25B1%2595%25E7%25A4%25BA%25E5%25A4%25A7%25E5%25B1%258F.fvs
 | 
					 | 
				
			||||||
&ref_t=design&ref_c=4a98754d-d7ec-419f-ae56-76b7104ace4c&page_number=1`
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
        //         {
 | 
					 | 
				
			||||||
        //           code: 'ZHTSZX',
 | 
					 | 
				
			||||||
        //           bg: require('assets/screen/zhtszx.png'),
 | 
					 | 
				
			||||||
        //           path: `http://bi.iaserver.online:60006/webroot/decision/view/duchamp?viewlet=%25E7%25BB%25BC%25E5%2590%2588%25E6%2580%2581%25E5%258A%25BF%25E5%25B1%2595%25E7%25A4%25BA%25E5%25A4%25A7%25E5%25B1%258F.fvs
 | 
					 | 
				
			||||||
        // &ref_t=design&ref_c=959add28-890d-4735-bbc9-54a40524a84e&page_number=1`
 | 
					 | 
				
			||||||
        //         }
 | 
					 | 
				
			||||||
      ]
 | 
					 | 
				
			||||||
    })
 | 
					 | 
				
			||||||
    const screenConfigs = ref({})
 | 
					 | 
				
			||||||
    async function getScreenConfigs() {
 | 
					    async function getScreenConfigs() {
 | 
				
			||||||
      const data = await getDictChildren({ value: 'SYSTEM_SCREEN' })
 | 
					      const res = await getSystemTreeConfigs({ category: '系统对接' })
 | 
				
			||||||
      if (data.success) {
 | 
					      if (res.success) {
 | 
				
			||||||
        const obj = {}
 | 
					        state.list = (res.data.find(item => item.name === '大屏展示配置')?.values || []).map(item => {
 | 
				
			||||||
        data.data.forEach(item => {
 | 
					          item.bg = bgMap[item.code] || bgMap.AQTS // 防止缺失
 | 
				
			||||||
          const { name, value } = item
 | 
					          return item
 | 
				
			||||||
          obj[value] = name
 | 
					 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        screenConfigs.value = obj
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    getScreenConfigs()
 | 
					    getScreenConfigs()
 | 
				
			||||||
    function goPage(path) {
 | 
					    function goPage(path) {
 | 
				
			||||||
      // goScreenWeb(path)
 | 
					 | 
				
			||||||
      location.href = path
 | 
					      location.href = path
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      ...toRefs(state),
 | 
					      ...toRefs(state),
 | 
				
			||||||
      screenConfigs,
 | 
					 | 
				
			||||||
      goPage
 | 
					      goPage
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue