BUG修改
This commit is contained in:
parent
31eee8d607
commit
2bb502921f
|
@ -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(
|
||||||
|
|
|
@ -669,7 +669,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'
|
||||||
|
@ -1186,21 +1186,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()
|
||||||
|
@ -1336,7 +1336,7 @@
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.resultListSearchInput-father {
|
.resultListSearchInput-father {
|
||||||
background: #f3f5f9;
|
background: #f3f5f9;
|
||||||
padding-left: 0.2rem;
|
padding-left: 0.2rem;
|
||||||
padding-top: 0.2rem;
|
padding-top: 0.2rem;
|
||||||
|
@ -1351,8 +1351,8 @@
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.resultListSearchInput {
|
.resultListSearchInput {
|
||||||
margin-left: 0.1rem;
|
margin-left: 0.1rem;
|
||||||
:deep(.ant-input) {
|
:deep(.ant-input) {
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
|
@ -1374,8 +1374,8 @@
|
||||||
:deep(.ant-input-group-addon) {
|
:deep(.ant-input-group-addon) {
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.button-reset {
|
.button-reset {
|
||||||
border: 0;
|
border: 0;
|
||||||
outline: none;
|
outline: none;
|
||||||
width: 0.8rem;
|
width: 0.8rem;
|
||||||
|
@ -1388,8 +1388,8 @@
|
||||||
line-height: 0.34rem;
|
line-height: 0.34rem;
|
||||||
margin-left: 2.5rem;
|
margin-left: 2.5rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.details-pageconetent {
|
.details-pageconetent {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1692,8 +1692,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.shrinkTag {
|
.shrinkTag {
|
||||||
width: 0.5rem;
|
width: 0.5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -1702,12 +1702,12 @@
|
||||||
span {
|
span {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.shrink {
|
.shrink {
|
||||||
height: unset !important;
|
height: unset !important;
|
||||||
overflow: unset !important;
|
overflow: unset !important;
|
||||||
}
|
}
|
||||||
.talk-monitor {
|
.talk-monitor {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0.5rem;
|
bottom: 0.5rem;
|
||||||
right: 0.1rem;
|
right: 0.1rem;
|
||||||
|
@ -1720,8 +1720,8 @@
|
||||||
background: url('~@/assets/home/icon-talk.png');
|
background: url('~@/assets/home/icon-talk.png');
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.top-content-father {
|
.top-content-father {
|
||||||
width: 10.87rem;
|
width: 10.87rem;
|
||||||
padding-left: 0.2rem;
|
padding-left: 0.2rem;
|
||||||
// margin-bottom: .2rem;
|
// margin-bottom: .2rem;
|
||||||
|
@ -1799,11 +1799,11 @@
|
||||||
.top-content:nth-child(1) {
|
.top-content:nth-child(1) {
|
||||||
margin-top: 0.41rem !important;
|
margin-top: 0.41rem !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:deep(.ant-card-grid) {
|
:deep(.ant-card-grid) {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
-webkit-line-clamp: 1;
|
-webkit-line-clamp: 1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
// selectTotal().then((res) => {
|
||||||
const findZywMessage = () => {
|
// console.log('selectTotal===============>', res.data.data)
|
||||||
zywMessage().then((res) => {
|
// res.data.data.total.forEach((val) => {
|
||||||
// console.log('findMessage============>', res)
|
// switch (val.type) {
|
||||||
const { data } = res.data
|
// case '组件服务':
|
||||||
sjNum.value = data.sxmlcount
|
// 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>
|
||||||
|
|
Loading…
Reference in New Issue