人员列表

This commit is contained in:
徐哼唧L
2024-01-18 16:40:05 +08:00
parent 31ff846431
commit 9508a6b216
7 changed files with 222 additions and 169 deletions

View File

@@ -37,26 +37,36 @@
</u-grid-item>
</u-grid>
</view>
<!-- 吴门之光-吴门之徽 -->
<!-- 吴门之光-吴门之徽 -->
<view class="titleList" v-if="curOneCateIndex == 2&&curTwoCateIndex == 2">
<u-grid :col="3" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id"
@click="previewImage(item.url)" style="align-items: flex-start;">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="previewImage(item.url)"
style="align-items: flex-start;">
<!-- <view :class="['titleItem']">{{item.name}}</view> -->
<img :src="item.url" alt="" class="wmzhimg" mode="aspectFit">
<img :src="item.url" alt="" class="wmzhimg" mode="aspectFit">
</u-grid-item>
</u-grid>
<u-divider v-else text="暂无数据哦~"></u-divider>
</view>
<!-- 其他 -->
<!-- 其他 -->
<view class="titleList" v-else>
<u-grid :col="1" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id"
@click="gotoDetail(item)" style="align-items: flex-start;border-bottom: 2px solid #fff;">
<u-grid :col="1" v-if="titleList.length > 0&&(curOneCateIndex==0||curOneCateIndex==2)">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.name}}</view>
</u-grid-item>
</u-grid>
<u-divider v-else text="暂无数据哦~"></u-divider>
<view :col="1" v-if="titleList.length > 0&&curOneCateIndex==1">
<view v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;display: flex;padding: 20rpx 0;">
<view style="width: 280rpx;text-align: center;">
<img src="" v-if="item.imageslist&&item.imageslist.length==0" class="chImage">
<img :src="item.imageslist&&item.imageslist[0]" v-else class="chImage">
</view>
<view :class="['titleItem']">{{item.name}}</view>
</view>
</view>
<u-divider text="暂无数据哦~" v-if="titleList.length==0"></u-divider>
</view>
</view>
</view>
@@ -99,13 +109,13 @@
playData: {},
searchValue: '',
oneCateList: [{
title: "专著出版",
title: "专著出版",
type: 'medicaldesBookType'
},{
title: "学术传承",
}, {
title: "学术传承",
type: 'inheritType'
},{
title: "吴门之光",
}, {
title: "吴门之光",
type: 'lightType'
}], // 一级分类标题1
twoCateList: [], // 二级分类标题
@@ -168,107 +178,111 @@
},
// 详情
gotoDetail(item) {
console.log('111',item)
console.log('this.curOneCateIndex',this.curOneCateIndex)
console.log('this.curTwoCateIndex',this.curTwoCateIndex)
if(this.curOneCateIndex==0){
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: '../eBook/bookContent?Id=' + item.id
})
return
}
if(this.curOneCateIndex==1){
uni.navigateTo({
url: "./medicaldesDetail?id=" + item.id
})
return
}
if(this.curOneCateIndex == 2){
console.log('111',item)
console.log('111', item)
console.log('this.curOneCateIndex', this.curOneCateIndex)
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
if (this.curOneCateIndex == 0) {
uni.navigateTo({
url: './video?title=' + item.name +'&src='+ item.url
})
return
// url: '../bookShop/commodityDetail?id=' + item.id
url: '../eBook/bookContent?Id=' + item.id
})
return
}
if (this.curOneCateIndex == 1) {
uni.navigateTo({
url: "./medicaldesDetail?id=" + item.id
})
return
}
if (this.curOneCateIndex == 2) {
console.log('111', item)
uni.navigateTo({
url: './video?title=' + item.name + '&src=' + item.url
})
return
}
},
// 获取名称
getTitles(dictType) {
console.log('dictType',dictType)
if(this.curOneCateIndex==0){
$http.request({
url: "book/medicaldes/bookListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if(this.curOneCateIndex==1){
$http.request({
url: "book/medicaldes/inheritListByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
'dictType': dictType,
"limit": 1000,
"current": 1
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.records.length > 0) {
this.titleList = res.result.records
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if(this.curOneCateIndex==2){
$http.request({
url: "book/medicaldes/lightListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
console.log('dictType', dictType)
if (this.curOneCateIndex == 0) {
$http.request({
url: "book/medicaldes/bookListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if (this.curOneCateIndex == 1) {
$http.request({
url: "book/medicaldes/inheritListByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
'dictType': dictType,
"limit": 1000,
"current": 1
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.records.length > 0) {
this.titleList = res.result.records
for (let i = 0; i < this.titleList.length; i++) {
this.titleList[i].imageslist = [];
this.titleList[i].imageslist = this.titleList[i].img.split(";");
}
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if (this.curOneCateIndex == 2) {
$http.request({
url: "book/medicaldes/lightListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
},
setTwoCateIndex(item, index) {
let dictType = item.dictType
@@ -303,7 +317,7 @@
this.searchList = []
this.showSearchList = false
// if (index != 2) {
this.getTowCateList(type)
this.getTowCateList(type)
// } else {
// this.getJFList(dictType)
// }
@@ -323,9 +337,18 @@
console.log(res, '二级分类获取成功')
if (res.code == 0 && res.result.length >= 0) {
this.twoCateList = res.result
if(this.curOneCateIndex==2){
this.twoCateList = [{'dictType':"1","dictValue":"吴门之歌"},{'dictType':"2","dictValue":"巴山夜语"},{'dictType':"3","dictValue":"吴门之徽"}]
}
if (this.curOneCateIndex == 2) {
this.twoCateList = [{
'dictType': "1",
"dictValue": "吴门之歌"
}, {
'dictType': "2",
"dictValue": "巴山夜语"
}, {
'dictType': "3",
"dictValue": "吴门之徽"
}]
}
this.getTitles(this.twoCateList[0].dictType)
} else {
this.twoCateList = []
@@ -393,19 +416,19 @@
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '脉穴分类获取成功')
// if (res.code == 0 && res.list.length > 0) {
// this.oneCateList = res.list
this.getTowCateList(this.oneCateList[0].type)
// } else {
// this.oneCateList = []
// }
// console.log(res, '脉穴分类获取成功')
// if (res.code == 0 && res.list.length > 0) {
// this.oneCateList = res.list
this.getTowCateList(this.oneCateList[0].type)
// } else {
// this.oneCateList = []
// }
// }).catch(e => {
// this.oneCateList = []
// console.log(e)
// })
},
// 放大图片
previewImage(url) {
console.log(url)
@@ -581,10 +604,10 @@
border-bottom: 0.5px solid #f8f9fa;
}
.wmzhimg{
width: 220rpx;
height: 220rpx;
}
.wmzhimg {
width: 220rpx;
height: 220rpx;
}
}
}
@@ -639,9 +662,13 @@
.uni-modal .uni-modal__bd {
text-align: left;
}
.limiTy{
.limiTy {
font-size: 28rpx;
line-height: 46rpx;
}
.chImage {
height: 100rpx;
}
</style>