2023-11-9-dist
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
<div class="my_material_header">
|
||||
<div class="my_material_header_right">
|
||||
<div class="content_search_block">
|
||||
<input class="search_input" :placeholder="$t('Material.inputContent1')" v-model="searchPictureName" @keydown.enter="getLibraryList()">
|
||||
<div class="search_icon_block" @click.stop="getLibraryList()"><span class="icon iconfont icon-sousuo"></span></div>
|
||||
<input class="search_input" :placeholder="$t('Material.inputContent1')" v-model="searchPictureName" @keydown.enter="getLibraryList('')">
|
||||
<div class="search_icon_block" @click.stop="getLibraryList('')"><span class="icon iconfont icon-sousuo"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -145,7 +145,7 @@ export default defineComponent({
|
||||
function callback(entries:any, observer:any) {
|
||||
entries.forEach((entry:any) => {
|
||||
if (entry.isIntersecting) {
|
||||
this_.getLibraryList()
|
||||
this_.getLibraryList('di')
|
||||
} else {
|
||||
}
|
||||
});
|
||||
@@ -193,7 +193,7 @@ export default defineComponent({
|
||||
// entries.forEach((entry:any) => {
|
||||
// if (entry.isIntersecting) {
|
||||
// console.log(111);
|
||||
// // this_.getLibraryList()
|
||||
// // this_.getLibraryList('')
|
||||
// } else {
|
||||
// }
|
||||
// });
|
||||
@@ -251,7 +251,7 @@ export default defineComponent({
|
||||
init(code:any){
|
||||
this.selectCode = code
|
||||
// this.myMaterialModalShow = true
|
||||
this.getLibraryList()
|
||||
this.getLibraryList('')
|
||||
|
||||
},
|
||||
selectImgItem(imgData:any){
|
||||
@@ -267,21 +267,24 @@ export default defineComponent({
|
||||
changePage(current: number, pageSize: number){
|
||||
this.currentPage = current
|
||||
this.pageSize = pageSize
|
||||
this.getLibraryList()
|
||||
this.getLibraryList('')
|
||||
},
|
||||
|
||||
handleChange(){
|
||||
this.getLibraryList()
|
||||
this.getLibraryList('')
|
||||
},
|
||||
|
||||
//选择所有的图片
|
||||
getLibraryList(){
|
||||
getLibraryList(str:any){
|
||||
let workspace = this.store.state.Workspace.workspace
|
||||
if(str == 'di'){
|
||||
this.currentPage = this.imgList?.[0]?.id != undefined?this.imgList?.length / this.pageSize+1:1
|
||||
}
|
||||
let data = {
|
||||
level1Type:this.selectCode,
|
||||
// level2Type:this.designType,
|
||||
modelSex:workspace?.sex,
|
||||
page: this.imgList?.[0]?.id != undefined?this.imgList?.length / this.pageSize+1:1,
|
||||
page: this.currentPage,
|
||||
// page:this.currentPage,
|
||||
pictureName:this.searchPictureName,
|
||||
size:this.pageSize,
|
||||
@@ -317,7 +320,12 @@ export default defineComponent({
|
||||
}
|
||||
aa.push(item)
|
||||
});
|
||||
this.imgList.push(...aa)
|
||||
if(aa[aa.length-1].id == this.imgList[this.imgList.length-1]?.id){
|
||||
|
||||
}else{
|
||||
this.imgList.push(...aa)
|
||||
}
|
||||
// this.imgList = aa
|
||||
this.total = rv.total
|
||||
this.isShowLoading = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user