Merge remote-tracking branch 'origin/StableVersion' into develop

This commit is contained in:
X1627315083
2024-09-25 11:07:49 +08:00
parent f840b03c0d
commit 309cdf16a9
33 changed files with 3462 additions and 748 deletions

View File

@@ -128,7 +128,7 @@
:clearable="true"
:placeholder="$t('LibraryPage.Select')"
:max-collapse-tags=3
:props="props"
:props="prop"
:collapse-tags-tooltip="true"
ref="cascader"
popper-class="libraryPageCascader"
@@ -342,12 +342,9 @@
<createSlogan ref="createSlogan" @setSloganData="setSloganData"></createSlogan>
<!-- 蒙层 start-->
<div class="mark_loading" v-show="isShowMark">
<a-spin size="large" />
<!-- <div v-show="remGenerate" class="mark_loading_btn" @click="removeGenerate">{{$t('Generate.Close')}}</div> -->
</div>
<div class="mark_loading" v-show="isShowMark || getLangIsShowMark">
<a-spin size="large" />
</div>
<!-- 蒙层 end-->
<!-- <RobotAssist></RobotAssist> -->
@@ -355,7 +352,7 @@
</template>
<script lang="ts">
import { LoadingOutlined } from "@ant-design/icons-vue";
import { defineComponent,h ,ref,createVNode,nextTick,reactive,provide,computed} from 'vue'
import { defineComponent,h ,ref,createVNode,nextTick,watch,provide,computed} from 'vue'
// import HeaderComponent from "@/component/HomePage/Header.vue";
import ModelPlacement from '@/component/LibraryPage/ModelPlacement.vue';
// import ModelPlacement from '@/component/LibraryPage/ModelPlacementUpdata.vue';
@@ -388,7 +385,13 @@ export default defineComponent({
sketchCategory,
createSlogan,
},
setup() {
props:{
getLangIsShowMark:{
type:Boolean,
}
},
setup(props) {
const store = useStore();
let menuList = computed(()=>{
return [
@@ -503,7 +506,7 @@ export default defineComponent({
let getLibraryListInputTime:any = ref()
const options:any = ref([
]);
let props = {
let prop = {
multiple: true,
checkStrictly: true,
emitPath:true,
@@ -512,9 +515,97 @@ export default defineComponent({
label:'classificationName',
}
let isTextarea = ref(false)
let workspace:any = ref({})
let workspace:any = computed(()=>{
return store?.state?.Workspace?.workspace
})
let generateLevel2:any = {}
let isSloganHint:any = ref('')
watch(
() => props.getLangIsShowMark, // 这里使用了一个 getter 函数
(newValue, oldValue) => {
if(!newValue){
getLibraryList('')
getClass()
getSex()
}
})
let getSex = () =>{
sex.value = store.state.UserHabit.sex.value[0].value
sexList.value = store.state.UserHabit.sex.value
getPosition()
}
let getPosition = ()=>{
store.commit('setPosition',sex.value)
designType.value = designTypeList.value.Sketchboard?.[0].value
}
let getLibraryList = (str:any)=>{
let labelArr:any = []
value.value.labelValue.forEach((item:any)=>{
labelArr.push(item[item.length-1])
})
let design = ''
if(selectCode.value == 'Sketchboard' || selectCode.value == 'DesignElements' || selectCode.value == 'Printboard'){
design = designType.value
}
let data = {
classificationIdList:labelArr,
level1Type:selectCode.value,
level2Type:design,
page:1,
modelSex:sex.value?sex.value:'',
pictureName:searchPictureName.value,
size:pageSize.value,
intersection:intersection.value,
}
if(str == 'page'){
data.page = currentPage.value
}else{
currentPage.value = 1
}
isShowMark.value = true
Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then(
(rv: any) => {
if(rv.content?.length == 0 && currentPage.value != 1){
currentPage.value = 1
getLibraryList('')
}else{
imgList.value = rv.content
total.value = rv.total
isShowMark.value = false
}
}
).catch((res)=>{
isShowMark.value = false
});
}
let getClass = ()=>{
let data = {
"classificationIdList": [],
"classificationName": "",
"createTime": "",
"deleteConfirm": '',
"id": '',
"libraryId": '',
"parentId": '',
"type": selectCode.value,
"updateTime": "",
"userId": ''
}
Https.axiosPost(Https.httpUrls.queryClassification, data).then(
(rv: any) => {
options.value = rv
rv.forEach((rvItem:any,rvIndex:number) => {
options.value[rvIndex].value = rvItem.id
options.value[rvIndex].label = rvItem.classificationName
rvItem.childList.forEach((childItem:any,index:number) => {
options.value[rvIndex].childList[index].value = childItem.id
options.value[rvIndex].childList[index].label = childItem.classificationName
});
});
}
).catch((res)=>{
});
}
return {
menuList,
selectImgList,
@@ -554,12 +645,15 @@ export default defineComponent({
scene,
dragIdx,
getLibraryListInputTime,
props,
prop,
options,
isTextarea,
workspace,
generateLevel2,
isSloganHint,
getPosition,
getLibraryList,
getClass,
}
},
data(this_) {
@@ -611,59 +705,13 @@ export default defineComponent({
this.isTest =JSON.parse(isTest)
this.userInfo = JSON.parse(userInfo);
this.uploadUrl = getUploadUrl()
this.getLibraryList('')
this.getClass()
this.getSex()
this.token = getCookie("token") || "";
this.workspace = computed(()=>{
return this.store?.state?.Workspace?.workspace
})
this.token = getCookie("token") || "";
},
methods:{
getSex(){
Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:'Sex'}}).then((rv: any) => {
if (rv) {
let arr:any = []
rv.forEach((item:any) => {
arr.push({
value:item.name,
label:item.value,
})
});
this.sex = arr[0].value
this.sexList = arr
this.getPosition()
}
})
},
async getPosition(){
// let params
// if(this.sex.value == 'Female'){
// params = 'FemalePosition'
// }else{
// params = 'MalePosition'
// }
this.store.commit('setPosition',this.sex)
this.designType = this.designTypeList.Sketchboard?.[0].value
// await Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:params}}).then((rv: any) => {
// if (rv) {
// let arr:any = []
// rv.forEach((item:any) => {
// arr.push({
// value:item.name,
// label:item.value,
// name:item.value
// })
// });
// this.designType = arr[0]
// this.designTypeList['Sketchboard'] = arr
// // this.workspaceItem.position = this.totalTypeList[0].label
// }
// })
},
likeFile(item:any,str:string){
let designType = ''
if(this.selectCode == 'DesignElements' || this.selectCode == 'Printboard'){
@@ -1045,46 +1093,7 @@ export default defineComponent({
}
});
},
getLibraryList(str:any){
let labelArr:any = []
this.value.labelValue.forEach((item:any)=>{
labelArr.push(item[item.length-1])
})
let designType = ''
if(this.selectCode == 'Sketchboard' || this.selectCode == 'DesignElements' || this.selectCode == 'Printboard'){
designType = this.designType
}
let data = {
classificationIdList:labelArr,
level1Type:this.selectCode,
level2Type:designType,
page:1,
modelSex:this.sex?this.sex:'',
pictureName:this.searchPictureName,
size:this.pageSize,
intersection:this.intersection,
}
if(str == 'page'){
data.page = this.currentPage
}else{
this.currentPage = 1
}
this.isShowMark = true
Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then(
(rv: any) => {
if(rv.content?.length == 0 && this.currentPage != 1){
this.currentPage = 1
this.getLibraryList('')
}else{
this.imgList = rv.content
this.total = rv.total
this.isShowMark = false
}
}
).catch((res)=>{
this.isShowMark = false
});
},
//编辑模特打点
editPlacementClick(data:any){
@@ -1447,34 +1456,6 @@ export default defineComponent({
})
},
getClass(){
let data = {
"classificationIdList": [],
"classificationName": "",
"createTime": "",
"deleteConfirm": '',
"id": '',
"libraryId": '',
"parentId": '',
"type": this.selectCode,
"updateTime": "",
"userId": ''
}
Https.axiosPost(Https.httpUrls.queryClassification, data).then(
(rv: any) => {
this.options = rv
rv.forEach((rvItem:any,rvIndex:number) => {
this.options[rvIndex].value = rvItem.id
this.options[rvIndex].label = rvItem.classificationName
rvItem.childList.forEach((childItem:any,index:number) => {
this.options[rvIndex].childList[index].value = childItem.id
this.options[rvIndex].childList[index].label = childItem.classificationName
});
});
}
).catch((res)=>{
});
},
scaleImage(index:any){
let scaleImage:any = this.$refs.scaleImage