Compare commits

...

2 Commits

Author SHA1 Message Date
a0049873 5cab30d2cc Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
# Conflicts:
#	front/src/views/home/DetailsPageconetent.vue
2022-06-24 19:50:41 +08:00
a0049873 2bb502921f BUG修改 2022-06-24 19:47:00 +08:00
5 changed files with 124 additions and 69 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-24 19:08:22 * @LastEditTime: 2022-06-24 19:49:15
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -28,10 +28,10 @@
<!-- 站点配置 --> <!-- 站点配置 -->
<script> <script>
window.SITE_CONFIG = {}; window.SITE_CONFIG = {};
window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001'; // window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/'; // 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['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin'; // 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['backUrl'] = 'http://10.110.205.1:8001';
// window.SITE_CONFIG['previewUrl'] = 'http://10.110.205.1:8002/'; // 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['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; // 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['backUrl'] = 'http://15.2.21.238:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796'; 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['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin'; 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['backUrl'] = 'http://124.222.94.39:9797';
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/'; // window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';

View File

@ -20,7 +20,7 @@
<span class="name-text">{{ item.type }}</span> <span class="name-text">{{ item.type }}</span>
</div> </div>
<div class="organization-value"> <div class="organization-value">
<span class="num">{{ item.amount }}</span> <span class="num">{{ item.amount || 0 }}</span>
<span>{{ item.organization }}</span> <span>{{ item.organization }}</span>
</div> </div>
</div> </div>
@ -60,7 +60,7 @@
numberOfResourcesByCategory, numberOfResourcesByCategory,
sourceDepartmentStatistics, sourceDepartmentStatistics,
} from '@/api/abilityStatistics.js' } from '@/api/abilityStatistics.js'
import { zywMessage } from '@/api/home' // import { zywMessage } from '@/api/home'
import * as echarts from 'echarts' import * as echarts from 'echarts'
// //
let dataList = ref({ let dataList = ref({
@ -76,21 +76,21 @@
]) ])
// let name = ref([]) // let name = ref([])
// //
const findZywMessage = () => { // const findZywMessage = () => {
zywMessage().then((res) => { // zywMessage().then((res) => {
const { data } = res.data // const { data } = res.data
dataSourceNum.value = data.sxmlcount || 0 // dataSourceNum.value = data.sxmlcount || 0
snum() // snum()
}) // })
} // }
// //
function snum() { function snum() {
numberOfResourcesByCategory().then((res) => { numberOfResourcesByCategory().then((res) => {
dataList.value.dataList = res.data.data dataList.value.dataList = res.data.data
res.data.data.map((item, index) => { res.data.data.map((item, index) => {
if (dataList.value.dataList[index].type === '数据资源') { // if (dataList.value.dataList[index].type === '') {
dataList.value.dataList[index].amount = dataSourceNum.value || 0 // dataList.value.dataList[index].amount = dataSourceNum.value || 0
} // }
dataList.value.dataList[index].organization = '个' dataList.value.dataList[index].organization = '个'
dataList.value.dataList[index].photo = photo.value[index] dataList.value.dataList[index].photo = photo.value[index]
}) })
@ -98,7 +98,7 @@
} }
let datas = ref([]) let datas = ref([])
let laiyuanDataList = ref([]) let laiyuanDataList = ref([])
let dataSourceNum = ref(0) // let dataSourceNum = ref(0)
let bumenSum = ref([]) let bumenSum = ref([])
//- //-
@ -316,7 +316,8 @@
option && myChart.setOption(option) option && myChart.setOption(option)
} }
onMounted(() => { onMounted(() => {
findZywMessage() // findZywMessage()
snum()
sourceDepartment() sourceDepartment()
}) })
watch( watch(

View File

@ -643,7 +643,7 @@
import { import {
selectDicStoreAll, selectDicStoreAll,
pageWithAttrs, pageWithAttrs,
zywMessage, // zywMessage,
getDataResource, getDataResource,
} from '@/api/home.js' } from '@/api/home.js'
import { getSgcList } from '@/api/personalCenter' import { getSgcList } from '@/api/personalCenter'
@ -1155,21 +1155,21 @@
paramsGetResources.pageNum = val paramsGetResources.pageNum = val
getAppResources() getAppResources()
} }
const findZywMessage = () => { // const findZywMessage = () => {
zywMessage().then((res) => { // zywMessage().then((res) => {
console.log('findMessage============>', res) // console.log('findMessage============>', res)
const { data } = res.data // const { data } = res.data
shujuziyuanqingkuang.value[0].value = data.sxmlcount // shujuziyuanqingkuang.value[0].value = data.sxmlcount
shujuziyuanqingkuang.value[1].value = data.yfbfwcount // shujuziyuanqingkuang.value[1].value = data.yfbfwcount
shujuziyuanqingkuang.value[2].value = data.yfbjk // shujuziyuanqingkuang.value[2].value = data.yfbjk
shujuziyuanqingkuang.value[3].value = new Date().toLocaleString() // shujuziyuanqingkuang.value[3].value = new Date().toLocaleString()
}) // })
} // }
onMounted(() => { onMounted(() => {
listKey2.value++ listKey2.value++
console.log('45345345', Cardsname.value, tecHnosphere, appLiCation) console.log('45345345', Cardsname.value, tecHnosphere, appLiCation)
getNewList() getNewList()
findZywMessage() // findZywMessage()
// onSearch() // onSearch()
if (!tecHnosphere && !appLiCation) { if (!tecHnosphere && !appLiCation) {
getAppResources() getAppResources()

View File

@ -77,9 +77,10 @@
</template> </template>
<script setup> <script setup>
import { pageWithAttrs, getDataResource } from '@/api/home.js' import { pageWithAttrs, getDataResource } from '@/api/home.js'
import { ref } from 'vue' import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import mybus from '@/myplugins/mybus'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
const zjList = ref([]) const zjList = ref([])
@ -102,6 +103,14 @@
console.log('dataShowdev==========================>', whoShow) console.log('dataShowdev==========================>', whoShow)
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
const whoShow1 = ref(whoShow) const whoShow1 = ref(whoShow)
const interfaceSuccess = ref(0)
const object = reactive({
yyNum: '',
zjNum: '',
jcNum: '',
sjNum: '',
zsNum: '',
})
const getAppResources = (type, obj) => { const getAppResources = (type, obj) => {
paramsGetResources.type = type paramsGetResources.type = type
if (type === '数据资源' && !whoShow1.value.itShowBaoTou) { if (type === '数据资源' && !whoShow1.value.itShowBaoTou) {
@ -123,6 +132,11 @@
val.createDate = val.fbrq // val.createDate = val.fbrq //
}) })
obj.value = res.data.data.data || [] 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) { } else if (whoShow1.value.itShowXiHaiAn) {
res.data.data.list.forEach((val) => { res.data.data.list.forEach((val) => {
val.id = val.serviceId // id val.id = val.serviceId // id
@ -134,15 +148,43 @@
val.createDate = val.createTime // val.createDate = val.createTime //
}) })
obj.value = res.data.data.list || [] obj.value = res.data.data.list || []
object.sjNum = res.data.data.total
interfaceSuccess.value++
if (interfaceSuccess.value == 5) {
mybus.emit('chagneNum', object)
}
} }
}) })
} else { } else {
let type = paramsGetResources.type
pageWithAttrs(paramsGetResources).then((res) => { pageWithAttrs(paramsGetResources).then((res) => {
// console.log('============>', res.data.data.records) console.log('object个数======>', type)
obj.value = res.data.data.records 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('组件服务', zjList)
getAppResources('应用资源', yyList) getAppResources('应用资源', yyList)
getAppResources('基础设施', jcList) getAppResources('基础设施', jcList)

View File

@ -43,44 +43,56 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { selectTotal, zywMessage } from '@/api/home' // import { selectTotal } from '@/api/home'
import { ref, onMounted } from 'vue' import { ref, onMounted, onBeforeUnmount } from 'vue'
import mybus from '@/myplugins/mybus'
const yyNum = ref('') const yyNum = ref('')
const zjNum = ref('') const zjNum = ref('')
const jcNum = ref('') const jcNum = ref('')
const sjNum = ref('') const sjNum = ref('')
const zsNum = ref('') const zsNum = ref('')
selectTotal().then((res) => { mybus.on('chagneNum', (obj) => {
console.log('selectTotal===============>', res.data.data) console.log('更改数据============>', obj)
res.data.data.total.forEach((val) => { yyNum.value = obj.yyNum
switch (val.type) { zjNum.value = obj.zjNum
case '组件服务': jcNum.value = obj.jcNum
zjNum.value = val.count sjNum.value = obj.sjNum
break zsNum.value = obj.zsNum
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 = () => { // selectTotal().then((res) => {
zywMessage().then((res) => { // console.log('selectTotal===============>', res.data.data)
// console.log('findMessage============>', res) // res.data.data.total.forEach((val) => {
const { data } = res.data // switch (val.type) {
sjNum.value = data.sxmlcount // 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(() => { onMounted(() => {
findZywMessage() // findZywMessage()
})
onBeforeUnmount(() => {
mybus.off('chagneNum')
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>