feat: 应用中心对接

develop
时启龙 2024-08-27 10:46:20 +08:00
parent 9384b1e4d4
commit 85225d411b
11 changed files with 281 additions and 88 deletions

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统1</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1619.000000, -113.000000)" fill="#FFAF00">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18" transform="translate(13.500000, 51.650343)">
<g id="编组-17" transform="translate(20.000000, 15.349657)">
<g id="编组-13" transform="translate(8.336538, 0.000000)">
<rect id="矩形" opacity="0.100000001" x="0.0697830444" y="0" width="38" height="38" rx="5"></rect>
<g id="编组-16" transform="translate(9.663462, 7.650343)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-8" opacity="0.5" transform="translate(14.500000, 5.656854) rotate(-315.000000) translate(-14.500000, -5.656854) " x="10.5" y="1.65685425" width="8" height="8" rx="2"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统2</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1718.000000, -113.000000)" fill="#08CDFE">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18备份" transform="translate(111.500000, 51.650343)">
<g id="编组-17" transform="translate(20.000000, 15.349657)">
<g id="编组-13" transform="translate(9.336538, 0.000000)">
<path d="M5,0 L33,0 C35.7614237,-5.07265313e-16 38,2.23857625 38,5 L38,33 C38,35.7614237 35.7614237,38 33,38 L5,38 C2.23857625,38 -5.50001544e-16,35.7614237 0,33 L0,5 C-3.38176876e-16,2.23857625 2.23857625,-3.80913106e-16 5,0 Z" id="矩形" opacity="0.100000001"></path>
<g id="编组-16" transform="translate(9.663462, 7.650343)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-8" opacity="0.5" transform="translate(14.500000, 5.656854) rotate(-315.000000) translate(-14.500000, -5.656854) " x="10.5" y="1.65685425" width="8" height="8" rx="2"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统3</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1815.000000, -112.000000)" fill="#57D484">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18备份-2" transform="translate(209.500000, 51.650343)">
<g id="编组-17" transform="translate(20.000000, 14.346847)">
<g id="编组-13" transform="translate(8.336538, 0.000000)">
<rect id="矩形" opacity="0.100000001" x="9.09494702e-13" y="0" width="38" height="38" rx="5"></rect>
<g id="编组-16" transform="translate(9.663462, 8.653153)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-8" opacity="0.5" transform="translate(14.500000, 5.656854) rotate(-315.000000) translate(-14.500000, -5.656854) " x="10.5" y="1.65685425" width="8" height="8" rx="2"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统4</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1619.000000, -218.000000)" fill="#30CCBE">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18备份-3" transform="translate(13.500000, 156.650343)">
<g id="编组-17" transform="translate(20.000000, 15.349657)">
<g id="编组-13" transform="translate(8.336538, 0.000000)">
<rect id="矩形" opacity="0.100000001" x="0" y="0" width="38" height="38" rx="5"></rect>
<g id="编组-16" transform="translate(9.663462, 7.650343)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-8" opacity="0.5" transform="translate(14.500000, 5.656854) rotate(-315.000000) translate(-14.500000, -5.656854) " x="10.5" y="1.65685425" width="8" height="8" rx="2"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统5</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1717.000000, -218.000000)" fill="#5A90FA">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18备份-4" transform="translate(111.500000, 156.650343)">
<g id="编组-17" transform="translate(20.000000, 15.349657)">
<g id="编组-13" transform="translate(8.336538, 0.000000)">
<rect id="矩形" opacity="0.100000001" x="0" y="0" width="38" height="38" rx="5"></rect>
<g id="编组-16" transform="translate(9.663462, 7.650343)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-8" opacity="0.5" transform="translate(14.500000, 5.656854) rotate(-315.000000) translate(-14.500000, -5.656854) " x="10.5" y="1.65685425" width="8" height="8" rx="2"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统6</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1815.000000, -218.000000)" fill="#FF6A9B">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18备份-5" transform="translate(209.500000, 156.650343)">
<g id="编组-17" transform="translate(20.000000, 15.349657)">
<g id="编组-13" transform="translate(8.336538, 0.000000)">
<rect id="矩形" opacity="0.100000001" x="0" y="0" width="38" height="38" rx="5"></rect>
<g id="编组-16" transform="translate(9.663462, 7.650343)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-8" opacity="0.5" transform="translate(14.500000, 5.656854) rotate(-315.000000) translate(-14.500000, -5.656854) " x="10.5" y="1.65685425" width="8" height="8" rx="2"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统7</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1620.000000, -323.000000)" fill="#266EEB">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18备份-6" transform="translate(13.500000, 261.650343)">
<g id="编组-17" transform="translate(20.000000, 15.349657)">
<g id="编组-13" transform="translate(9.336538, 0.000000)">
<rect id="矩形" opacity="0.100000001" x="9.09494702e-13" y="0" width="38" height="38" rx="5"></rect>
<g id="编组-16" transform="translate(9.663462, 7.650343)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-8" opacity="0.5" transform="translate(14.500000, 5.656854) rotate(-315.000000) translate(-14.500000, -5.656854) " x="10.5" y="1.65685425" width="8" height="8" rx="2"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统8</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1718.000000, -323.000000)" fill="#FA5A5A">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18备份-7" transform="translate(111.500000, 261.650343)">
<g id="编组-17" transform="translate(20.000000, 15.349657)">
<g id="编组-13" transform="translate(9.336538, 0.000000)">
<path d="M5,0 L33,0 C35.7614237,-5.07265313e-16 38,2.23857625 38,5 L38,33 C38,35.7614237 35.7614237,38 33,38 L5,38 C2.23857625,38 -5.50001544e-16,35.7614237 0,33 L0,5 C-3.38176876e-16,2.23857625 2.23857625,-3.80913106e-16 5,0 Z" id="矩形" opacity="0.100000001"></path>
<g id="编组-16" transform="translate(9.663462, 7.650343)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<path d="M15.9142136,1.41421356 L18.7426407,4.24264069 C19.5236893,5.02368927 19.5236893,6.29001923 18.7426407,7.07106781 L15.9142136,9.89949494 C15.133165,10.6805435 13.866835,10.6805435 13.0857864,9.89949494 L10.2573593,7.07106781 C9.47631073,6.29001923 9.47631073,5.02368927 10.2573593,4.24264069 L13.0857864,1.41421356 C13.866835,0.633164979 15.133165,0.633164979 15.9142136,1.41421356 Z" id="矩形备份-8" opacity="0.5"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>系统9</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="下拉" transform="translate(-1815.000000, -323.000000)" fill="#837BFA">
<g id="下啦" transform="translate(1577.163462, 46.000000)">
<g id="编组-18备份-8" transform="translate(209.500000, 261.650343)">
<g id="编组-17" transform="translate(20.000000, 15.349657)">
<g id="编组-13" transform="translate(8.336538, 0.000000)">
<rect id="矩形" opacity="0.100000001" x="0" y="0" width="38" height="38" rx="5"></rect>
<g id="编组-16" transform="translate(9.663462, 7.650343)">
<rect id="矩形" x="0" y="1.15685425" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-6" x="0" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-7" x="10" y="11.1568542" width="9" height="9" rx="2"></rect>
<rect id="矩形备份-8" opacity="0.5" transform="translate(14.500000, 5.656854) rotate(-315.000000) translate(-14.500000, -5.656854) " x="10.5" y="1.65685425" width="8" height="8" rx="2"></rect>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -16,11 +16,16 @@
</el-input> </el-input>
</div> </div>
</template> </template>
<div v-for="item in appList" :key="item.id" class="list-group-item" @click="goPage(item)" :style="{ cursor: !item.enable ? 'not-allowed' : 'pointer' }"> <el-scrollbar>
<div v-for="item in appList" :key="item.id" class="list-group-item" @click="goPage(item)" :style="{ cursor: !item.useFlag ? 'not-allowed' : 'pointer' }">
<el-icon style="font-size: 38px"><svg-icon :icon-name="item.icon" /></el-icon> <el-icon style="font-size: 38px"><svg-icon :icon-name="item.icon" /></el-icon>
<span class="text-content">{{ item.name }}</span> <span class="text-content" v-if="item.appName.length <= 6">{{ item.appName }}</span>
<el-tooltip v-else effect="dark" :content="item.appName" placement="bottom">
<span class="text-content">{{ item.appName }}</span>
</el-tooltip>
</div> </div>
<empty v-if="appList.length === 0"></empty> <empty v-if="appList.length === 0"></empty>
</el-scrollbar>
</el-card> </el-card>
</template> </template>
</el-dropdown> </el-dropdown>
@ -28,101 +33,35 @@
<script> <script>
import { ref } from 'vue' import { ref } from 'vue'
import { getTrxToken } from 'utils/auth' import { getTrxToken } from 'utils/auth'
import { getMessage } from '@/services/message' import { getAppList } from '@/services'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
let iconIndex = 1
const getAppIcon = () => {
if (iconIndex > 9) iconIndex = 1
return `svg-app${iconIndex++}`
}
export default { export default {
setup() { setup() {
const appName = ref('') const appName = ref('')
const allAppList = ref([]) const allAppList = ref([])
const getAppList = async () => { const getAppsList = async () => {
const data = await getMessage({ const data = await getAppList()
page: 1,
rows: 5
})
if (data.success) { if (data.success) {
allAppList.value = [ allAppList.value = data.data.map(item => {
{ item.icon = getAppIcon()
name: 'a系统', return item
id: 1, })
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'b系统',
id: 2,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'c系统',
id: 3,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'd系统',
id: 4,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'e系统',
id: 5,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'f系统',
id: 6,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'g系统',
id: 7,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'h系统',
id: 8,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'i系统',
id: 9,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: true
},
{
name: 'j系统',
id: 10,
icon: 'svg-apps',
url: 'https://www.baidu.com',
enable: false
}
]
} }
} }
getAppList() getAppsList()
const appList = computed(() => { const appList = computed(() => {
if (!appName.value) return allAppList.value if (!appName.value) return allAppList.value
return allAppList.value.filter(item => item.name.includes(appName.value)) return allAppList.value.filter(item => item.appName.includes(appName.value))
}) })
const goPage = item => { const goPage = item => {
if (!item.enable) return if (!item.useFlag) return
const url = new URL(item.url) if (!item.appAddress) return ElMessage.error('缺少appAddress, 请联系管理员')
const url = new URL(item.appAddress)
const trxToken = getTrxToken() const trxToken = getTrxToken()
if (!trxToken) return ElMessage.error('缺少trxToken, 请联系管理员') if (!trxToken) return ElMessage.error('缺少trxToken, 请联系管理员')
url.searchParams.append('SYS_AUTH_TOKEN', trxToken) url.searchParams.append('SYS_AUTH_TOKEN', trxToken)
@ -169,6 +108,7 @@ export default {
width: 33%; width: 33%;
margin: 18px 0; margin: 18px 0;
.text-content { .text-content {
width: 100%;
display: block; display: block;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -176,9 +116,16 @@ export default {
color: #273478; color: #273478;
margin-top: 11px; margin-top: 11px;
font-size: 14px; font-size: 14px;
text-align: center;
} }
} }
} }
::v-deep {
.czhj-card__body {
height: 70vh;
position: relative;
}
}
</style> </style>
<style> <style>
.custom-dropdown-popper.custom-dropdown-message { .custom-dropdown-popper.custom-dropdown-message {

View File

@ -79,3 +79,42 @@ export function testLinkApi(category) {
export function getWinhongToken() { export function getWinhongToken() {
return request.get('/sms/v1/system/home/winhong/token') return request.get('/sms/v1/system/home/winhong/token')
} }
// 右上角应用列表
// 应用信息说明
// 字段 类型 字段说明
// appState int 应用状态0注册 3上线 1发布 2下线
// softwareDesc String 应用描述
// approveManager String 应用管理员
// appAddress String 访问地址
// appCode String 应用编码
// appIcon String 应用图标
// softwareOperations String 软件研发单位
// updateUid String 更新人ID
// appId String 应用ID
// softwarePublishTime String 应用上线时间
// createUid String 创建人ID
// appDepartment String 应用单位
// area String 所属区域
// linkNum String 应用管理员联系电话
// assumeDept String 软件承制单位
// useFlag int 应用是否可用标志1可用 0不可用
// softwareVersion String 应用版本
// appSecrecyLevel String 应用密级
// appInfo String 应用信息
// appDirection String 应用方向
// appTheme String 应用专题
// modelSystem String 型号系统
// assumeLinkman String 软件承制单位联系人
// linkmanNum String 软件承制单位联系人电话
// appType String 软件类型
// appPlatform" String 应用平台
// appName String 应用名称
// publishArea String 应用发布区域中心编码
// sysPlace String 部署位置
// appLevel String 应用级别
// updateTime String 更新时间
// createTime String 注册时间
export function getAppList(params) {
return request.get('/sms/v1/index/userAppList', { params })
}