BUG修改

This commit is contained in:
a0049873 2022-06-23 14:17:04 +08:00
parent 109b82b95d
commit fe0d925329
4 changed files with 90 additions and 24 deletions

View File

@ -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 = {}

View File

@ -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)

View File

@ -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
if (type === '数据资源') {
getDataResource({
serviceName: paramsGetResources.name, //
orderField: whoShow1.value.itShowQingDao ? 'fbrq' : 'createTime', //
orderType: paramsGetResources.orderType.toLowerCase(), //descasc
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) {

View File

@ -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) => {