Compare commits
2 Commits
2caa5a859c
...
5cab30d2cc
Author | SHA1 | Date |
---|---|---|
a0049873 | 5cab30d2cc | |
a0049873 | 2bb502921f |
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-03-29 16:45:25
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-24 19:08:22
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-24 19:49:15
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
@ -28,10 +28,10 @@
|
|||
<!-- 站点配置 -->
|
||||
<script>
|
||||
window.SITE_CONFIG = {};
|
||||
window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
|
||||
window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
|
||||
window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
||||
// 包头
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://10.110.205.1:8001';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://10.110.205.1:8002/';
|
||||
|
@ -44,10 +44,10 @@
|
|||
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
|
||||
// 开发
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
|
||||
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796';
|
||||
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
// 穿透版本
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<span class="name-text">{{ item.type }}</span>
|
||||
</div>
|
||||
<div class="organization-value">
|
||||
<span class="num">{{ item.amount }}</span>
|
||||
<span class="num">{{ item.amount || 0 }}</span>
|
||||
<span>{{ item.organization }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -60,7 +60,7 @@
|
|||
numberOfResourcesByCategory,
|
||||
sourceDepartmentStatistics,
|
||||
} from '@/api/abilityStatistics.js'
|
||||
import { zywMessage } from '@/api/home'
|
||||
// import { zywMessage } from '@/api/home'
|
||||
import * as echarts from 'echarts'
|
||||
//各类资源汇聚量
|
||||
let dataList = ref({
|
||||
|
@ -76,21 +76,21 @@
|
|||
])
|
||||
// let name = ref([])
|
||||
// 获取数据资源数据
|
||||
const findZywMessage = () => {
|
||||
zywMessage().then((res) => {
|
||||
const { data } = res.data
|
||||
dataSourceNum.value = data.sxmlcount || 0
|
||||
snum()
|
||||
})
|
||||
}
|
||||
// const findZywMessage = () => {
|
||||
// zywMessage().then((res) => {
|
||||
// const { data } = res.data
|
||||
// dataSourceNum.value = data.sxmlcount || 0
|
||||
// snum()
|
||||
// })
|
||||
// }
|
||||
//各类资源数目接口
|
||||
function snum() {
|
||||
numberOfResourcesByCategory().then((res) => {
|
||||
dataList.value.dataList = res.data.data
|
||||
res.data.data.map((item, index) => {
|
||||
if (dataList.value.dataList[index].type === '数据资源') {
|
||||
dataList.value.dataList[index].amount = dataSourceNum.value || 0
|
||||
}
|
||||
// if (dataList.value.dataList[index].type === '数据资源') {
|
||||
// dataList.value.dataList[index].amount = dataSourceNum.value || 0
|
||||
// }
|
||||
dataList.value.dataList[index].organization = '个'
|
||||
dataList.value.dataList[index].photo = photo.value[index]
|
||||
})
|
||||
|
@ -98,7 +98,7 @@
|
|||
}
|
||||
let datas = ref([])
|
||||
let laiyuanDataList = ref([])
|
||||
let dataSourceNum = ref(0)
|
||||
// let dataSourceNum = ref(0)
|
||||
let bumenSum = ref([])
|
||||
|
||||
//能力统计-来源部门统计接口
|
||||
|
@ -316,7 +316,8 @@
|
|||
option && myChart.setOption(option)
|
||||
}
|
||||
onMounted(() => {
|
||||
findZywMessage()
|
||||
// findZywMessage()
|
||||
snum()
|
||||
sourceDepartment()
|
||||
})
|
||||
watch(
|
||||
|
|
|
@ -643,7 +643,7 @@
|
|||
import {
|
||||
selectDicStoreAll,
|
||||
pageWithAttrs,
|
||||
zywMessage,
|
||||
// zywMessage,
|
||||
getDataResource,
|
||||
} from '@/api/home.js'
|
||||
import { getSgcList } from '@/api/personalCenter'
|
||||
|
@ -1155,21 +1155,21 @@
|
|||
paramsGetResources.pageNum = val
|
||||
getAppResources()
|
||||
}
|
||||
const findZywMessage = () => {
|
||||
zywMessage().then((res) => {
|
||||
console.log('findMessage============>', res)
|
||||
const { data } = res.data
|
||||
shujuziyuanqingkuang.value[0].value = data.sxmlcount
|
||||
shujuziyuanqingkuang.value[1].value = data.yfbfwcount
|
||||
shujuziyuanqingkuang.value[2].value = data.yfbjk
|
||||
shujuziyuanqingkuang.value[3].value = new Date().toLocaleString()
|
||||
})
|
||||
}
|
||||
// const findZywMessage = () => {
|
||||
// zywMessage().then((res) => {
|
||||
// console.log('findMessage============>', res)
|
||||
// const { data } = res.data
|
||||
// shujuziyuanqingkuang.value[0].value = data.sxmlcount
|
||||
// shujuziyuanqingkuang.value[1].value = data.yfbfwcount
|
||||
// shujuziyuanqingkuang.value[2].value = data.yfbjk
|
||||
// shujuziyuanqingkuang.value[3].value = new Date().toLocaleString()
|
||||
// })
|
||||
// }
|
||||
onMounted(() => {
|
||||
listKey2.value++
|
||||
console.log('45345345', Cardsname.value, tecHnosphere, appLiCation)
|
||||
getNewList()
|
||||
findZywMessage()
|
||||
// findZywMessage()
|
||||
// onSearch()
|
||||
if (!tecHnosphere && !appLiCation) {
|
||||
getAppResources()
|
||||
|
|
|
@ -77,9 +77,10 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { pageWithAttrs, getDataResource } from '@/api/home.js'
|
||||
import { ref } from 'vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
const store = useStore()
|
||||
const router = useRouter()
|
||||
const zjList = ref([])
|
||||
|
@ -102,6 +103,14 @@
|
|||
console.log('dataShowdev==========================>', whoShow)
|
||||
// eslint-disable-next-line no-undef
|
||||
const whoShow1 = ref(whoShow)
|
||||
const interfaceSuccess = ref(0)
|
||||
const object = reactive({
|
||||
yyNum: '',
|
||||
zjNum: '',
|
||||
jcNum: '',
|
||||
sjNum: '',
|
||||
zsNum: '',
|
||||
})
|
||||
const getAppResources = (type, obj) => {
|
||||
paramsGetResources.type = type
|
||||
if (type === '数据资源' && !whoShow1.value.itShowBaoTou) {
|
||||
|
@ -123,6 +132,11 @@
|
|||
val.createDate = val.fbrq // 发布时间
|
||||
})
|
||||
obj.value = res.data.data.data || []
|
||||
object.sjNum = res.data.data.rows
|
||||
interfaceSuccess.value++
|
||||
if (interfaceSuccess.value == 5) {
|
||||
mybus.emit('chagneNum', object)
|
||||
}
|
||||
} else if (whoShow1.value.itShowXiHaiAn) {
|
||||
res.data.data.list.forEach((val) => {
|
||||
val.id = val.serviceId // id
|
||||
|
@ -134,15 +148,43 @@
|
|||
val.createDate = val.createTime // 发布时间
|
||||
})
|
||||
obj.value = res.data.data.list || []
|
||||
object.sjNum = res.data.data.total
|
||||
interfaceSuccess.value++
|
||||
if (interfaceSuccess.value == 5) {
|
||||
mybus.emit('chagneNum', object)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
let type = paramsGetResources.type
|
||||
pageWithAttrs(paramsGetResources).then((res) => {
|
||||
// console.log('知识库查询列表============>', res.data.data.records)
|
||||
console.log('object个数======>', type)
|
||||
obj.value = res.data.data.records
|
||||
switch (type) {
|
||||
case '组件服务':
|
||||
assignmentMethod('zjNum', res)
|
||||
break
|
||||
case '应用资源':
|
||||
assignmentMethod('yyNum', res)
|
||||
break
|
||||
case '基础设施':
|
||||
assignmentMethod('jcNum', res)
|
||||
break
|
||||
case '知识库':
|
||||
assignmentMethod('zsNum', res)
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const assignmentMethod = (type, res) => {
|
||||
object[type] = res.data.data.total
|
||||
interfaceSuccess.value++
|
||||
console.log('object个数======>', object, interfaceSuccess.value, type)
|
||||
if (interfaceSuccess.value >= 4) {
|
||||
mybus.emit('chagneNum', object)
|
||||
}
|
||||
}
|
||||
getAppResources('组件服务', zjList)
|
||||
getAppResources('应用资源', yyList)
|
||||
getAppResources('基础设施', jcList)
|
||||
|
|
|
@ -43,44 +43,56 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { selectTotal, zywMessage } from '@/api/home'
|
||||
import { ref, onMounted } from 'vue'
|
||||
// import { selectTotal } from '@/api/home'
|
||||
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
const yyNum = ref('')
|
||||
const zjNum = ref('')
|
||||
const jcNum = ref('')
|
||||
const sjNum = ref('')
|
||||
const zsNum = ref('')
|
||||
selectTotal().then((res) => {
|
||||
console.log('selectTotal===============>', res.data.data)
|
||||
res.data.data.total.forEach((val) => {
|
||||
switch (val.type) {
|
||||
case '组件服务':
|
||||
zjNum.value = val.count
|
||||
break
|
||||
case '应用资源':
|
||||
yyNum.value = val.count
|
||||
break
|
||||
case '基础设施':
|
||||
jcNum.value = val.count
|
||||
break
|
||||
case '数据资源':
|
||||
sjNum.value = val.count
|
||||
break
|
||||
case '知识库':
|
||||
zsNum.value = val.count
|
||||
break
|
||||
}
|
||||
})
|
||||
mybus.on('chagneNum', (obj) => {
|
||||
console.log('更改数据============>', obj)
|
||||
yyNum.value = obj.yyNum
|
||||
zjNum.value = obj.zjNum
|
||||
jcNum.value = obj.jcNum
|
||||
sjNum.value = obj.sjNum
|
||||
zsNum.value = obj.zsNum
|
||||
})
|
||||
const findZywMessage = () => {
|
||||
zywMessage().then((res) => {
|
||||
// console.log('findMessage============>', res)
|
||||
const { data } = res.data
|
||||
sjNum.value = data.sxmlcount
|
||||
})
|
||||
}
|
||||
// selectTotal().then((res) => {
|
||||
// console.log('selectTotal===============>', res.data.data)
|
||||
// res.data.data.total.forEach((val) => {
|
||||
// switch (val.type) {
|
||||
// case '组件服务':
|
||||
// zjNum.value = val.count
|
||||
// break
|
||||
// case '应用资源':
|
||||
// yyNum.value = val.count
|
||||
// break
|
||||
// case '基础设施':
|
||||
// jcNum.value = val.count
|
||||
// break
|
||||
// case '数据资源':
|
||||
// sjNum.value = val.count
|
||||
// break
|
||||
// case '知识库':
|
||||
// zsNum.value = val.count
|
||||
// break
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// const findZywMessage = () => {
|
||||
// zywMessage().then((res) => {
|
||||
// // console.log('findMessage============>', res)
|
||||
// const { data } = res.data
|
||||
// sjNum.value = data.sxmlcount
|
||||
// })
|
||||
// }
|
||||
onMounted(() => {
|
||||
findZywMessage()
|
||||
// findZywMessage()
|
||||
})
|
||||
onBeforeUnmount(() => {
|
||||
mybus.off('chagneNum')
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
|
Loading…
Reference in New Issue