BUG修改
This commit is contained in:
parent
109b82b95d
commit
fe0d925329
|
@ -2,12 +2,12 @@
|
|||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2020-07-07 16:03:23
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-22 16:18:47
|
||||
* @LastEditTime: 2022-06-23 10:53:31
|
||||
* @Description: 数据资源参数配置
|
||||
*/
|
||||
// const newLocation = 'qingdao'
|
||||
// const newLocation = 'baotou'
|
||||
const newLocation = 'qingdao'
|
||||
const newLocation = 'xihaian'
|
||||
|
||||
// 数据资源数据
|
||||
const whoShow = {}
|
||||
|
|
|
@ -129,7 +129,28 @@ instance.interceptors.response.use(
|
|||
if (error.response && error.response.data) {
|
||||
console.log('接口返回', response)
|
||||
console.log('接口返回headers', response.headers)
|
||||
console.log('接口返回REDIRECT', response.headers.redirect)
|
||||
console.log('接口返回REDIRECT1111', response.headers.redirect)
|
||||
if (response.headers.redirect === '/#/login') {
|
||||
var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
|
||||
if (keys) {
|
||||
for (var i = keys.length; i--; ) {
|
||||
document.cookie =
|
||||
keys[i] + '=0;path=/;expires=' + new Date(0).toUTCString() //清除当前域名下的,例如:m.kevis.com
|
||||
document.cookie =
|
||||
keys[i] +
|
||||
'=0;path=/;domain=' +
|
||||
document.domain +
|
||||
';expires=' +
|
||||
new Date(0).toUTCString() //清除当前域名下的,例如 .m.kevis.com
|
||||
document.cookie =
|
||||
keys[i] +
|
||||
'=0;path=/;domain=kevis.com;expires=' +
|
||||
new Date(0).toUTCString() //清除一级域名下的或指定的,例如 .kevis.com
|
||||
}
|
||||
}
|
||||
console.log('已清除')
|
||||
location.reload()
|
||||
}
|
||||
if (response.headers.redirect) {
|
||||
window.location.href = response.headers.redirect
|
||||
return Promise.reject(error)
|
||||
|
|
|
@ -34,24 +34,28 @@
|
|||
</div>
|
||||
<div class="item">
|
||||
<div class="jc">基础设施</div>
|
||||
<div class="name">1-J1-党建展示区走廊-北向</div>
|
||||
<div class="name">2-J2-党建数据中心机房</div>
|
||||
<div class="name">3-J3-党建展示区走廊-南向</div>
|
||||
<div class="name">4-J4-党建大厅电动门</div>
|
||||
<div class="name name-last">5-J5-指挥席位东北向</div>
|
||||
<div
|
||||
class="name"
|
||||
v-for="(item, index) in jcList"
|
||||
:key="item.id"
|
||||
:class="index == 4 ? 'name-last' : ''"
|
||||
@click="selectOne(item.id)"
|
||||
>
|
||||
{{ index + 1 }}-{{ item.name }}
|
||||
</div>
|
||||
<div class="btn" @click="jumpPage('基础设施')">查看更多</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="sj">数据资源</div>
|
||||
<div class="name">1-扬尘数据接口</div>
|
||||
<div class="name">2-根据证件号码查询全员核酸检测信息(人社专用)</div>
|
||||
<div class="name">
|
||||
3-根据身份证号、姓名、开始日期、结束日期获取医保住院结算信息(市人社局专用)
|
||||
<div
|
||||
class="name"
|
||||
v-for="(item, index) in sjList"
|
||||
:key="item.id"
|
||||
:class="index == 4 ? 'name-last' : ''"
|
||||
@click="selectOne(item.id)"
|
||||
>
|
||||
{{ index + 1 }}-{{ item.name }}
|
||||
</div>
|
||||
<div class="name">
|
||||
4-根据身份证号、姓名、年度查询医保参保缴费信息(市委组织部专用)
|
||||
</div>
|
||||
<div class="name name-last">5-"金种子"人才培养经费查询API</div>
|
||||
<div class="btn" @click="jumpPage('数据资源')">查看更多</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
@ -72,13 +76,15 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { pageWithAttrs } from '@/api/home.js'
|
||||
import { pageWithAttrs, getDataResource } from '@/api/home.js'
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
const store = useStore()
|
||||
const router = useRouter()
|
||||
const zjList = ref([])
|
||||
const jcList = ref([])
|
||||
const sjList = ref([])
|
||||
const yyList = ref([])
|
||||
// 知识库模块数据
|
||||
const zsList = ref([])
|
||||
|
@ -93,15 +99,54 @@
|
|||
orderField: 'total', // total 综合 visits 访问量 applyCount 申请量 score 评分 collectCount 收藏量
|
||||
orderType: 'DESC', // ASC 升序 DESC 降序
|
||||
}
|
||||
console.log('dataShowdev==========================>', whoShow)
|
||||
// eslint-disable-next-line no-undef
|
||||
const whoShow1 = ref(whoShow)
|
||||
const getAppResources = (type, obj) => {
|
||||
paramsGetResources.type = type
|
||||
pageWithAttrs(paramsGetResources).then((res) => {
|
||||
console.log('知识库查询列表============>', res.data.data.records)
|
||||
obj.value = res.data.data.records
|
||||
})
|
||||
if (type === '数据资源') {
|
||||
getDataResource({
|
||||
serviceName: paramsGetResources.name, //资源名称
|
||||
orderField: whoShow1.value.itShowQingDao ? 'fbrq' : 'createTime', //排序字段
|
||||
orderType: paramsGetResources.orderType.toLowerCase(), //排序方式:desc,asc
|
||||
pageNum: paramsGetResources.pageNum, //页码
|
||||
pageSize: paramsGetResources.pageSize, //分页大小
|
||||
}).then((res) => {
|
||||
console.log('数据资源==================>', res.data.data)
|
||||
if (whoShow1.value.itShowQingDao) {
|
||||
res.data.data.data.forEach((val) => {
|
||||
val.id = val.guid // id
|
||||
val.name = val.zyname // 名字
|
||||
val.sjlCount = val.sjcczl // 数据量
|
||||
val.applyCount = val.syqk // 申请量
|
||||
val.deptName = val.TGBM // 部门
|
||||
val.createDate = val.fbrq // 发布时间
|
||||
})
|
||||
obj.value = res.data.data.data || []
|
||||
} else if (whoShow1.value.itShowXiHaiAn) {
|
||||
res.data.data.list.forEach((val) => {
|
||||
val.id = val.serviceId // id
|
||||
val.name = val.serviceName // 名字
|
||||
val.sjlCount = val.requestQuantity // 数据量
|
||||
val.applyCount = val.requestCount // 申请量
|
||||
val.deptName = val.departmentName // 部门
|
||||
val.createTime = val.createTime.split('.')[0]
|
||||
val.createDate = val.createTime // 发布时间
|
||||
})
|
||||
obj.value = res.data.data.list || []
|
||||
}
|
||||
})
|
||||
} else {
|
||||
pageWithAttrs(paramsGetResources).then((res) => {
|
||||
console.log('知识库查询列表============>', res.data.data.records)
|
||||
obj.value = res.data.data.records
|
||||
})
|
||||
}
|
||||
}
|
||||
getAppResources('组件服务', zjList)
|
||||
getAppResources('应用资源', yyList)
|
||||
getAppResources('基础设施', jcList)
|
||||
getAppResources('数据资源', sjList)
|
||||
getAppResources('知识库', zsList)
|
||||
|
||||
function jumpPage(type) {
|
||||
|
|
|
@ -47,9 +47,9 @@
|
|||
import { ref, onMounted } from 'vue'
|
||||
const yyNum = ref('')
|
||||
const zjNum = ref('')
|
||||
const jcNum = ref('23万')
|
||||
const sjNum = ref('10372')
|
||||
const zsNum = ref('14')
|
||||
const jcNum = ref('')
|
||||
const sjNum = ref('')
|
||||
const zsNum = ref('')
|
||||
selectTotal().then((res) => {
|
||||
console.log('selectTotal===============>', res.data.data)
|
||||
res.data.data.total.forEach((val) => {
|
||||
|
|
Loading…
Reference in New Issue