测试支付
This commit is contained in:
436
src/component/LibraryPage/searchLabel.vue
Normal file
436
src/component/LibraryPage/searchLabel.vue
Normal file
@@ -0,0 +1,436 @@
|
||||
<template>
|
||||
<a-modal class="library_rename_modal_component"
|
||||
v-model:visible="renameVisivle"
|
||||
:footer="null"
|
||||
:title="$t('LibraryPage.Rename')"
|
||||
width="78%"
|
||||
:keyboard="false"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
@onCancel="closeRenameModal"
|
||||
>
|
||||
<div class="collection_rename_content">
|
||||
<div class="collection_rename_title">{{$t('LibraryPage.Name')}}</div>
|
||||
<div class="rename_form_content">
|
||||
<input class="rename_form_input" :placeholder="$t('LibraryPage.inputContent3')" v-model="newPicName" @keydown.enter="confrimRename()">
|
||||
</div>
|
||||
<div class="collection_rename_title">{{$t('LibraryPage.Tag')}}</div>
|
||||
<el-cascader
|
||||
:options="options"
|
||||
:filterable="true"
|
||||
v-model="value.editLabelValue"
|
||||
:collapse-tags="true"
|
||||
:show-all-levels="false"
|
||||
:placeholder="$t('LibraryPage.Select')"
|
||||
:clearable="true"
|
||||
:max-collapse-tags=6
|
||||
:props="props"
|
||||
ref="cascader1"
|
||||
:collapse-tags-tooltip="true"
|
||||
@visible-change="dropdownVisibleChange1"
|
||||
>
|
||||
<template #empty>
|
||||
<div>
|
||||
{{$t('LibraryPage.Select')}}
|
||||
</div>
|
||||
</template>
|
||||
</el-cascader>
|
||||
<div v-show="selectCode == 'Sketchboard'" class="collection_rename_title">{{$t('LibraryPage.Category')}}</div>
|
||||
<!-- <div v-show="selectCode == 'Sketchboard'" class="collection_rename_title">{{$t('LibraryPage.Category')}}</div> -->
|
||||
<div v-show="selectCode == 'Sketchboard'" class="rename_form_content">
|
||||
<div class="select_block">
|
||||
<a-select
|
||||
ref="select"
|
||||
v-model:value="editSex.value"
|
||||
:options="sexList"
|
||||
@change="getPosition"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<!-- <span
|
||||
class="icon iconfont icon-xiala"
|
||||
style="color: #343579"
|
||||
></span> -->
|
||||
<i class="el-icon el-input__icon icon-arrow-down"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path></svg></i>
|
||||
</template>
|
||||
</a-select>
|
||||
<a-select
|
||||
ref="select"
|
||||
v-model:value="editDesignType.value"
|
||||
:options="disignTypeList"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<!-- <span
|
||||
class="icon iconfont icon-xiala"
|
||||
style="color: #343579"
|
||||
></span> -->
|
||||
<i class="el-icon el-input__icon icon-arrow-down"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path></svg></i>
|
||||
</template>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rename_button_list">
|
||||
<div class="rename_button_item rename_cancel_button" @click="closeRenameModal()">{{ $t('LibraryPage.Cancel') }}</div>
|
||||
<div class="rename_button_item rename_submit_button" @click="confrimRename()">{{ $t('LibraryPage.Sure') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,createVNode,watch,nextTick,inject} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
// import {dataURLtoFile,base64toFile} from "@/tool/util"
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
// import { getCookie } from "@/tool/cookie";
|
||||
import 'vue-cropper/dist/index.css'
|
||||
import { VueCropper } from "vue-cropper";
|
||||
// import { useStore } from "vuex";
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Modal,message,Upload,CascaderProps } from 'ant-design-vue';
|
||||
import { ElCascader } from 'element-plus'
|
||||
|
||||
export default defineComponent({
|
||||
components:{
|
||||
VueCropper,
|
||||
ElCascader,
|
||||
},
|
||||
setup() {
|
||||
let newPicName:any = ref('')
|
||||
let renameVisivle:any = ref(false)
|
||||
let editDesignType:any = ref({
|
||||
value:''
|
||||
})
|
||||
let selectCode:any = ref('')
|
||||
let {t} = useI18n()
|
||||
let value = ref({
|
||||
labelValue:[],
|
||||
editLabelValue:[],
|
||||
})
|
||||
let disignTypeList:any = [
|
||||
|
||||
]
|
||||
let props = {
|
||||
multiple: true,
|
||||
checkStrictly: true,
|
||||
emitPath:true,
|
||||
children:'childList',
|
||||
value:'id',
|
||||
label:'classificationName',
|
||||
}
|
||||
let selectSingleImg:any = ref({}) //保存单个图片数据
|
||||
const options:any = ref([
|
||||
]);
|
||||
let editSex:any = ref({
|
||||
value:''
|
||||
})
|
||||
let sexList:any = [
|
||||
|
||||
]
|
||||
let sex:any = ref('Meal')
|
||||
let designType:any = ref('Outwear')
|
||||
let renameType:any = ref('single')//修改名字的方式single-单个 batch-批量
|
||||
let selectImgList:any = ref([])
|
||||
|
||||
return {
|
||||
newPicName,
|
||||
renameVisivle,
|
||||
editDesignType,
|
||||
selectCode,
|
||||
value,
|
||||
t,
|
||||
disignTypeList,
|
||||
props,
|
||||
selectSingleImg,
|
||||
options,
|
||||
editSex,
|
||||
sexList,
|
||||
sex,
|
||||
designType,
|
||||
renameType,
|
||||
selectImgList,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
setLabelShow:false,
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
methods:{
|
||||
init(data:any,type:any){
|
||||
let parent:any = this.$parent
|
||||
this.selectCode = parent.selectCode || ''
|
||||
this.value = parent.value || ''
|
||||
this.disignTypeList = parent.disignTypeList || ''
|
||||
this.sexList = parent.sexList || ''
|
||||
this.sex = parent.sex || ''
|
||||
this.designType = parent.designType || ''
|
||||
this.selectImgList = parent.selectImgList || ''
|
||||
this.options = parent.options || ''
|
||||
|
||||
this.newPicName = ''
|
||||
this.editSex = this.sex
|
||||
this.editDesignType = this.designType
|
||||
if(type =='batch' && !this.selectImgList.length){ //批量但未选中
|
||||
this.newPicName = ''
|
||||
return
|
||||
}
|
||||
this.getPresentClass(data,type)
|
||||
this.renameType = type
|
||||
this.renameVisivle = true
|
||||
},
|
||||
getPresentClass(data:any,type:any){
|
||||
let classData = {
|
||||
"classificationIdList": [],
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"deleteConfirm": 0,
|
||||
"id": 0,
|
||||
"isDeleted": 0,
|
||||
"libraryIdList": [data.id],
|
||||
"parentId": 0,
|
||||
"type": "",
|
||||
"updateTime": "",
|
||||
"userId": 0
|
||||
}
|
||||
this.value.editLabelValue = []
|
||||
this.selectSingleImg = data
|
||||
this.newPicName = data.name
|
||||
if(type === 'single'){
|
||||
Https.axiosPost(Https.httpUrls.getRelClassificationIdList, classData).then(
|
||||
(rv: any) => {
|
||||
this.value.editLabelValue = rv
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}else{
|
||||
classData.libraryIdList = data
|
||||
Https.axiosPost(Https.httpUrls.getRelPublicClassificationIdList, classData).then(
|
||||
(rv: any) => {
|
||||
this.value.editLabelValue = rv
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
},
|
||||
async getPosition(){
|
||||
let params
|
||||
if(this.sex.value == 'Female'){
|
||||
params = 'FemalePosition'
|
||||
}else{
|
||||
params = 'MalePosition'
|
||||
}
|
||||
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,
|
||||
})
|
||||
});
|
||||
this.designType = arr[0]
|
||||
this.editDesignType = arr[0]
|
||||
this.disignTypeList = arr
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}
|
||||
})
|
||||
},
|
||||
closeRenameModal(){
|
||||
this.renameVisivle= false;
|
||||
this.newPicName = ''
|
||||
this.value.editLabelValue = []
|
||||
// this.value.labelValue = []
|
||||
},
|
||||
async confrimRename(){
|
||||
let data = {
|
||||
libraryIds:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
libraryName:this.newPicName,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
}
|
||||
let designType = this.selectCode == 'Sketchboard' || this.selectCode == 'MarketingSketch' ? this.designType.value : ''
|
||||
let labelArr:any = []
|
||||
this.value.editLabelValue.forEach((item:any)=>{
|
||||
labelArr.push(item[item.length-1]?item[item.length-1]:item)
|
||||
})
|
||||
let data2 = {
|
||||
"classificationIdList": labelArr,
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"id": 0,
|
||||
"libraryIdList": this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
"type": this.selectCode,
|
||||
"updateTime": "",
|
||||
"userId": 0
|
||||
}
|
||||
let bor = false
|
||||
if(this.newPicName){//多选修改名字
|
||||
await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then(
|
||||
(rv: any) => {
|
||||
// if(this.renameType ==='batch'){
|
||||
// this.selectImgList = []
|
||||
// }
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
if(this.renameType == 'single'){//多选修改标签
|
||||
await Https.axiosPost(Https.httpUrls.relationLibrary, data2).then(
|
||||
(rv: any) => {
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}else{
|
||||
await Https.axiosPost(Https.httpUrls.editRelPublicClassificationIdList, data2).then(
|
||||
(rv: any) => {
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
let data3 = {
|
||||
libraryId:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
level2Type:this.editDesignType.value,
|
||||
}
|
||||
if(this.selectCode == 'Sketchboard'){
|
||||
await Https.axiosPost(Https.httpUrls.setSketchLibrary,data3).then(
|
||||
(rv) => {
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
let parent:any = this.$parent
|
||||
parent.getLibraryList('')
|
||||
this.closeRenameModal()
|
||||
},
|
||||
dropdownVisibleChange1(){
|
||||
let element:any = this.$refs.cascader1
|
||||
let el = element.contentRef?.getElementsByClassName('el-cascader-menu__empty-text')?.[0]
|
||||
if(el){
|
||||
el.innerHTML = this.t('LibraryPage.NoLabel')
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style lang="less">
|
||||
.library_rename_modal_component{
|
||||
|
||||
.collection_rename_content{
|
||||
padding:0 6.8rem 1.8rem;
|
||||
|
||||
.collection_rename_title{
|
||||
margin: 2rem 0rem 1rem 0;
|
||||
font-size: var(--aida-fsize1-8);
|
||||
}
|
||||
.rename_form_content{
|
||||
|
||||
.rename_form_input{
|
||||
width: 100%;
|
||||
height: 4.6rem;
|
||||
border: 0.1rem solid #d9d9d9;
|
||||
padding-left: 2.1rem;
|
||||
line-height: 4.6rem;
|
||||
font-size: 1.8rem;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
|
||||
&::placeholder {
|
||||
color:#adabb9
|
||||
}
|
||||
}
|
||||
.select_block{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 1.8rem;
|
||||
color:#adabb9;
|
||||
font-weight: 300;
|
||||
.ant-select{
|
||||
border-radius: 4px;
|
||||
width: 48%;
|
||||
border: 0.1rem solid #d9d9d9 !important;
|
||||
.ant-select-arrow{
|
||||
.icon-xiala{
|
||||
margin-left: -0rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-select-selection-item{
|
||||
color:#262626;
|
||||
font-weight: 300;
|
||||
}
|
||||
.ant-select-selector{
|
||||
margin-left: 0rem;
|
||||
color:#adabb9;
|
||||
width: 100%;
|
||||
padding-left: 2.1rem;
|
||||
}
|
||||
.icon-xiala{
|
||||
color: #adabb9 !important;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rename_button_list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
margin-top: 3rem;
|
||||
|
||||
.rename_button_item{
|
||||
width: 8.6rem;
|
||||
height: 3.2rem;
|
||||
line-height: 3.2rem;
|
||||
text-align: center;
|
||||
font-size: 1.4rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.rename_cancel_button{
|
||||
background: #E4E5EB;
|
||||
color: #030303;
|
||||
margin-right: 1.8rem;
|
||||
}
|
||||
|
||||
.rename_submit_button{
|
||||
background: #343579;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
.el-cascader{
|
||||
.el-input--suffix{
|
||||
--el-input-hover-border-color: #d9d9d9;
|
||||
// border: .1rem solid #d9d9d9;
|
||||
}
|
||||
height: 4.6rem;
|
||||
.el-tag__content{
|
||||
line-height: 2.5;
|
||||
.el-cascader__tags{
|
||||
|
||||
}
|
||||
}
|
||||
.el-input__wrapper{
|
||||
padding-left: 0;
|
||||
}
|
||||
.el-cascader__search-input,.el-input__inner{
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 4.6rem;
|
||||
padding-left: 2.1rem;
|
||||
line-height: 4.6rem;
|
||||
font-size: 1.8rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -41,6 +41,11 @@ const routes: Array<RouteRecordRaw> = [
|
||||
// name: 'oldHistory',
|
||||
// component: _import('OldHistoryPage')
|
||||
// },
|
||||
{
|
||||
path: '/paySucceed',
|
||||
name: 'paySucceed',
|
||||
component: _import('paySucceed')
|
||||
},
|
||||
{
|
||||
path: '/library',
|
||||
name: 'library',
|
||||
|
||||
@@ -29,8 +29,8 @@ let httpIp = process.env.NODE_ENV == 'development' ? "" : "";
|
||||
// let httpIp = process.env.NODE_ENV == 'development' ? "https://192.168.0.102:10086" : "";
|
||||
// console.log(httpIp,process.env.VUE_APP_BASE_URL);
|
||||
|
||||
axios.defaults.baseURL = httpIp; //配置接口地址
|
||||
// axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
||||
// axios.defaults.baseURL = httpIp; //配置接口地址
|
||||
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
|
||||
|
||||
// console.log(process.env.VUE_APP_BASE_URL);
|
||||
//POST传参序列化(添加请求拦截器)
|
||||
@@ -85,7 +85,7 @@ axios.interceptors.response.use((res) =>{
|
||||
|
||||
}, function(error) {
|
||||
if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login
|
||||
router.replace('/login')
|
||||
// router.replace('/login')
|
||||
return Promise.reject()
|
||||
}
|
||||
let data_new = error?.response?.data
|
||||
|
||||
@@ -10,15 +10,48 @@
|
||||
<div class="history_page_body">
|
||||
<div class="history_header">{{ $t('HistoryPage.History') }}</div>
|
||||
<div class="history_table_search">
|
||||
<a-range-picker class="range_picker" v-model:value="rangePickerValue" :placeholder="[$t('HistoryPage.StartDate'), $t('HistoryPage.EndDate')]" valueFormat="YYYY-MM-DD">
|
||||
|
||||
<!-- <div class="content_search_block">
|
||||
<input class="search_input" :placeholder="$t('HistoryPage.inputContent1')" v-model="searchCollectionName" @keydown.enter="searchHistoryList()">
|
||||
<div class="search_icon_block" @click="searchHistoryList()"><span class="icon iconfont icon-sousuo"></span></div>
|
||||
</div> -->
|
||||
<div class="content_search_block">
|
||||
<a-range-picker class="range_picker" v-model:value="rangePickerValue" :placeholder="[$t('HistoryPage.StartDate'), $t('HistoryPage.EndDate')]" valueFormat="YYYY-MM-DD">
|
||||
<template #suffixIcon>
|
||||
<span class="icon iconfont range_picker_icon icon-rili"></span>
|
||||
</template>
|
||||
</a-range-picker>
|
||||
<div class="content_search_block">
|
||||
<input class="search_input" :placeholder="$t('HistoryPage.inputContent1')" v-model="searchCollectionName" @keydown.enter="searchHistoryList()">
|
||||
<div class="search_icon_block" @click="searchHistoryList()"><span class="icon iconfont icon-sousuo"></span></div>
|
||||
</div>
|
||||
<input class="search_input" :placeholder="$t('LibraryPage.inputContent1')" v-model="searchCollectionName" @keydown.enter="searchHistoryList()">
|
||||
<div class="search_cascader">
|
||||
<el-cascader
|
||||
:options="options"
|
||||
filterable
|
||||
v-model="value.labelValue"
|
||||
:collapse-tags="true"
|
||||
:show-all-levels="false"
|
||||
:clearable="true"
|
||||
:placeholder="$t('LibraryPage.Select')"
|
||||
:max-collapse-tags=3
|
||||
:props="props"
|
||||
:collapse-tags-tooltip="true"
|
||||
ref="cascader"
|
||||
popper-class="libraryPageCascader"
|
||||
@visible-change="dropdownVisibleChange"
|
||||
>
|
||||
<template #empty>
|
||||
<div>
|
||||
{{$t('LibraryPage.Select')}}
|
||||
</div>
|
||||
</template>
|
||||
</el-cascader>
|
||||
</div>
|
||||
<div class="intersection">
|
||||
<div :title="$t('LibraryPage.unionSet')" @click="()=>intersection = 1" v-show="intersection == 0" :class="['icon', 'iconfont','icon-bingji',]"></div>
|
||||
<div :title="$t('LibraryPage.intersection')" @click="()=>intersection = 0" v-show="intersection == 1" :class="['icon', 'iconfont','icon-bingji1',]"></div>
|
||||
</div>
|
||||
<!-- <div class="search_icon_block" @click="getLibraryList('')"><span class="icon iconfont icon-sousuo"></span></div> -->
|
||||
<div class="generage_btn search_icon_block" @click="searchHistoryList()"><span class="icon iconfont icon-sousuo"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="history_table_content" ref="historyTable">
|
||||
@@ -62,11 +95,12 @@
|
||||
<div class="rename_submit_button" @click="confrimRename()">{{ $t('HistoryPage.Submit') }}</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<setLabel ref="setLabel"></setLabel>
|
||||
<RobotAssist></RobotAssist>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,createVNode,computed} from 'vue'
|
||||
import { defineComponent,ref,createVNode,computed,nextTick} from 'vue'
|
||||
import HeaderComponent from "@/component/HomePage/Header.vue";
|
||||
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
|
||||
import { Https } from "@/tool/https";
|
||||
@@ -74,12 +108,17 @@ import { formatTime } from "@/tool/util"
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { ElCascader } from 'element-plus'
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import setLabel from '@/component/LibraryPage/setLabel.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
HeaderComponent,
|
||||
HistoryDetail,
|
||||
RobotAssist
|
||||
RobotAssist,
|
||||
setLabel,
|
||||
ElCascader
|
||||
},
|
||||
setup() {
|
||||
let rangePickerValue:any = ref([])
|
||||
@@ -105,12 +144,32 @@ export default defineComponent({
|
||||
});
|
||||
let collectionList:any = ref([])
|
||||
let {t} = useI18n()
|
||||
const options:any = ref([
|
||||
]);
|
||||
let value = ref({
|
||||
labelValue:[],
|
||||
editLabelValue:[],
|
||||
})
|
||||
let props = {
|
||||
multiple: true,
|
||||
checkStrictly: true,
|
||||
emitPath:true,
|
||||
children:'childList',
|
||||
value:'id',
|
||||
label:'classificationName',
|
||||
}
|
||||
let intersection = ref(1)
|
||||
|
||||
return {
|
||||
rangePickerValue,
|
||||
columns,
|
||||
collectionList,
|
||||
renameData,
|
||||
t,
|
||||
options,
|
||||
value,
|
||||
props,
|
||||
intersection,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -165,8 +224,14 @@ export default defineComponent({
|
||||
}
|
||||
Https.axiosPost( Https.httpUrls.queryUserGroup, data).then(
|
||||
(rv: any) => {
|
||||
this.collectionList = rv.content
|
||||
this.total = rv.total
|
||||
if(this.currentPage > 1 && rv.content.length == 0){
|
||||
this.currentPage = 1
|
||||
this.getHistoryList()
|
||||
}else{
|
||||
this.collectionList = rv.content
|
||||
this.total = rv.total
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -227,7 +292,74 @@ export default defineComponent({
|
||||
|
||||
retrieveHome(record:any){
|
||||
this.$router.push({name:'home',params: {id:record.id}})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
removeLabel(){
|
||||
let setLabel:any = this.$refs.setLabel
|
||||
let cascader:any = this.$refs.cascader
|
||||
cascader.togglePopperVisible()
|
||||
let event = new Event('click', {"bubbles":true, "cancelable":true});
|
||||
document.dispatchEvent(event);
|
||||
setLabel.init('add',this.options)
|
||||
},
|
||||
dropdownVisibleChange(){
|
||||
let element:any = this.$refs.cascader
|
||||
nextTick().then(()=>{
|
||||
let cascader = document.getElementsByClassName('libraryPageCascader')[0]
|
||||
let cascaderChild = cascader
|
||||
let element:any = this.$refs.cascader
|
||||
if(cascader.children.length > 3 ){
|
||||
}else{
|
||||
let button1:any = document.createElement("span")
|
||||
button1.classList.add('started_btn','cascader_btn1')
|
||||
let button2:any = document.createElement("span")
|
||||
button2.classList.add('started_btn','cascader_btn2')
|
||||
let divMax:any = document.createElement("div")
|
||||
divMax.classList.add('cascader_btn_max')
|
||||
button1.textContent = 'Edit'
|
||||
// button2.textContent = '删除'
|
||||
button1.addEventListener('click',this.removeLabel,false)
|
||||
divMax.appendChild(button1)
|
||||
// divMax.appendChild(button2)
|
||||
cascaderChild?.insertAdjacentElement("afterbegin", divMax);
|
||||
|
||||
// cascader.addEventListener('click',this.cascaderClick)
|
||||
}
|
||||
})
|
||||
let el = element.contentRef?.getElementsByClassName('el-cascader-menu__empty-text')?.[0]
|
||||
if(el){
|
||||
el.innerHTML = this.t('LibraryPage.NoLabel')
|
||||
}
|
||||
},
|
||||
getClass(){
|
||||
let data = {
|
||||
"classificationIdList": [],
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"deleteConfirm": '',
|
||||
"id": '',
|
||||
"libraryId": '',
|
||||
"parentId": '',
|
||||
"type": '',
|
||||
"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)=>{
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -274,8 +406,9 @@ export default defineComponent({
|
||||
|
||||
.range_picker{
|
||||
width: 36rem;
|
||||
height: 4.8rem;
|
||||
|
||||
height: 3rem;
|
||||
margin-right: 2rem;
|
||||
|
||||
.ant-picker-input > input{
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
@@ -284,40 +417,56 @@ export default defineComponent({
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.content_search_block{
|
||||
margin-left: 4rem;
|
||||
display: flex;
|
||||
|
||||
.search_input{
|
||||
width: 32.8rem;
|
||||
padding-left: 1.5rem;
|
||||
height: 4.8rem;
|
||||
line-height: 4.6rem;
|
||||
background: #FFFFFF;
|
||||
border: 0.1rem solid #F1F1F1;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 400;
|
||||
|
||||
&::placeholder {
|
||||
color: #C2C2C2;
|
||||
}
|
||||
}
|
||||
|
||||
.search_icon_block{
|
||||
width: 7.2rem;
|
||||
height: 4.8rem;
|
||||
line-height: 4.8rem;
|
||||
text-align: center;
|
||||
background: #343579;
|
||||
cursor: pointer;
|
||||
|
||||
.icon-sousuo{
|
||||
font-size: 2rem;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-picker:hover, .ant-picker-focused{
|
||||
border-color: #d5d8df;
|
||||
}
|
||||
.content_search_block{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 140rem;
|
||||
.search_input{
|
||||
height: 3rem;
|
||||
border-radius: 0.5rem;
|
||||
width: 20rem;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
padding-left: 1.5rem;
|
||||
border: 0.2rem solid #d5d8df;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 400;
|
||||
margin-right: 2rem;
|
||||
&::placeholder {
|
||||
color: #C2C2C2;
|
||||
}
|
||||
}
|
||||
.search_cascader{
|
||||
// width: 53%;
|
||||
width: 38rem;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
|
||||
}
|
||||
.search_icon_block{
|
||||
width: 5.2rem;
|
||||
height: 2.8rem;
|
||||
line-height: 2.8rem;
|
||||
text-align: center;
|
||||
background: #343579;
|
||||
background-color: #39215b;
|
||||
cursor: pointer;
|
||||
border-radius: 2rem;
|
||||
margin-left: 3rem;
|
||||
.icon-sousuo{
|
||||
font-size: 1.6rem;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
.intersection{
|
||||
margin-left: 3rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.history_table_content{
|
||||
|
||||
@@ -94,23 +94,6 @@
|
||||
<div class="content_search_block">
|
||||
<input class="search_input" :placeholder="$t('LibraryPage.inputContent1')" v-model="searchPictureName" @keydown.enter="getLibraryList('')">
|
||||
<div class="search_cascader">
|
||||
<!-- <a-cascader
|
||||
@click.stop="dropdownVisibleChange"
|
||||
ref="cascader"
|
||||
v-model:value="value.labelValue"
|
||||
style="width: 100%"
|
||||
:field-names="{ label: 'label', value: 'value', children: 'childList'}"
|
||||
multiple
|
||||
@change="setLabel1"
|
||||
:changeOnSelect="false"
|
||||
max-tag-count="responsive"
|
||||
:options="options"
|
||||
placeholder="Please select"
|
||||
:show-search="{ filter }"
|
||||
:open="false"
|
||||
dropdownClassName="libraryPageCascader"
|
||||
>
|
||||
</a-cascader> -->
|
||||
<el-cascader
|
||||
:options="options"
|
||||
filterable
|
||||
@@ -326,82 +309,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-modal class="library_rename_modal_component"
|
||||
v-model:visible="renameVisivle"
|
||||
:footer="null"
|
||||
:title="$t('LibraryPage.Rename')"
|
||||
width="78%"
|
||||
:keyboard="false"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
@onCancel="closeRenameModal"
|
||||
>
|
||||
<div class="collection_rename_content">
|
||||
<div class="collection_rename_title">{{$t('LibraryPage.Name')}}</div>
|
||||
<div class="rename_form_content">
|
||||
<input class="rename_form_input" :placeholder="$t('LibraryPage.inputContent3')" v-model="newPicName" @keydown.enter="confrimRename()">
|
||||
</div>
|
||||
<div class="collection_rename_title">{{$t('LibraryPage.Tag')}}</div>
|
||||
<el-cascader
|
||||
:options="options"
|
||||
:filterable="true"
|
||||
v-model="value.editLabelValue"
|
||||
:collapse-tags="true"
|
||||
:show-all-levels="false"
|
||||
:placeholder="$t('LibraryPage.Select')"
|
||||
:clearable="true"
|
||||
:max-collapse-tags=6
|
||||
:props="props"
|
||||
ref="cascader1"
|
||||
:collapse-tags-tooltip="true"
|
||||
@visible-change="dropdownVisibleChange1"
|
||||
>
|
||||
<template #empty>
|
||||
<div>
|
||||
{{$t('LibraryPage.Select')}}
|
||||
</div>
|
||||
</template>
|
||||
</el-cascader>
|
||||
<div v-show="selectCode == 'Sketchboard'" class="collection_rename_title">{{$t('LibraryPage.Category')}}</div>
|
||||
<!-- <div v-show="selectCode == 'Sketchboard'" class="collection_rename_title">{{$t('LibraryPage.Category')}}</div> -->
|
||||
<div v-show="selectCode == 'Sketchboard'" class="rename_form_content">
|
||||
<div class="select_block">
|
||||
<a-select
|
||||
ref="select"
|
||||
v-model:value="editSex.value"
|
||||
:options="sexList"
|
||||
@change="getPosition"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<!-- <span
|
||||
class="icon iconfont icon-xiala"
|
||||
style="color: #343579"
|
||||
></span> -->
|
||||
<i class="el-icon el-input__icon icon-arrow-down"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path></svg></i>
|
||||
</template>
|
||||
</a-select>
|
||||
<a-select
|
||||
ref="select"
|
||||
v-model:value="editDesignType.value"
|
||||
:options="disignTypeList"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<!-- <span
|
||||
class="icon iconfont icon-xiala"
|
||||
style="color: #343579"
|
||||
></span> -->
|
||||
<i class="el-icon el-input__icon icon-arrow-down"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path></svg></i>
|
||||
</template>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rename_button_list">
|
||||
<div class="rename_button_item rename_cancel_button" @click="closeRenameModal()">{{ $t('LibraryPage.Cancel') }}</div>
|
||||
<div class="rename_button_item rename_submit_button" @click="confrimRename()">{{ $t('LibraryPage.Sure') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<searchLabel ref="searchLabel"></searchLabel>
|
||||
<scaleImage ref="scaleImage"></scaleImage>
|
||||
<ModelPlacement ref="ModelPlacement" @submitModelPlacement="getLibraryList"></ModelPlacement>
|
||||
<ModelPlacementMobile ref="ModelPlacementMobile" @submitModelPlacement="getLibraryList"></ModelPlacementMobile>
|
||||
@@ -427,6 +335,7 @@ import HeaderComponent from "@/component/HomePage/Header.vue";
|
||||
import ModelPlacement from '@/component/LibraryPage/ModelPlacement.vue';
|
||||
import setLabel from '@/component/LibraryPage/setLabel.vue';
|
||||
import ModelPlacementMobile from '@/component/LibraryPage/ModelPlacementMobile.vue';
|
||||
import searchLabel from '@/component/LibraryPage/searchLabel.vue';
|
||||
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
|
||||
import { Modal,message,Upload,CascaderProps } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
@@ -444,6 +353,7 @@ export default defineComponent({
|
||||
ModelPlacement,
|
||||
setLabel,
|
||||
ModelPlacementMobile,
|
||||
searchLabel,
|
||||
RobotAssist,
|
||||
ElCascader,
|
||||
scaleImage,
|
||||
@@ -473,23 +383,13 @@ export default defineComponent({
|
||||
let disignTypeList:any = [
|
||||
|
||||
]
|
||||
let editSex:any = ref({
|
||||
value:''
|
||||
})
|
||||
let editDesignType:any = ref({
|
||||
value:''
|
||||
})
|
||||
let imgList = ref([])
|
||||
let currentPage:any = ref(1)
|
||||
let pageSize:any = ref(18)
|
||||
let total:any = ref(20)
|
||||
let renameVisivle:any = ref(false)
|
||||
let renameType:any = ref('single')//修改名字的方式single-单个 batch-批量
|
||||
let newPicName:any = ref('')
|
||||
let uploadUrl:any = ref('')
|
||||
let currentUploadFileNum:any = ref(0) //当次上传文件数量
|
||||
let isShowMark:any = ref(false) //蒙层
|
||||
let selectSingleImg:any = ref({}) //保存单个图片数据
|
||||
let store = useStore();
|
||||
let uploadGenerate:any = ref('Upload')
|
||||
let checkbox = ref([
|
||||
@@ -519,8 +419,6 @@ export default defineComponent({
|
||||
name:useI18n().t('LibraryPage.Model1')
|
||||
})
|
||||
let {t} = useI18n()
|
||||
const options:any = ref([
|
||||
]);
|
||||
let type:any = {
|
||||
selectCode:selectCode,
|
||||
designType:designType
|
||||
@@ -531,15 +429,6 @@ export default defineComponent({
|
||||
editLabelValue:[],
|
||||
})
|
||||
|
||||
|
||||
let props = {
|
||||
multiple: true,
|
||||
checkStrictly: true,
|
||||
emitPath:true,
|
||||
children:'childList',
|
||||
value:'id',
|
||||
label:'classificationName',
|
||||
}
|
||||
let intersection = ref(1)
|
||||
let isTest = ref()
|
||||
let driver__:any = computed(()=>{
|
||||
@@ -552,6 +441,16 @@ export default defineComponent({
|
||||
let remGenerate:any = ref(false)
|
||||
let remGenerateTime:any = ref()
|
||||
let getLibraryListInputTime:any = ref()
|
||||
const options:any = ref([
|
||||
]);
|
||||
let props = {
|
||||
multiple: true,
|
||||
checkStrictly: true,
|
||||
emitPath:true,
|
||||
children:'childList',
|
||||
value:'id',
|
||||
label:'classificationName',
|
||||
}
|
||||
return {
|
||||
menuList,
|
||||
selectImgList,
|
||||
@@ -561,20 +460,14 @@ export default defineComponent({
|
||||
sexList,
|
||||
sex,
|
||||
disignTypeList,
|
||||
editSex,
|
||||
editDesignType,
|
||||
designType,
|
||||
imgList,
|
||||
currentPage,
|
||||
pageSize,
|
||||
total,
|
||||
renameVisivle,
|
||||
renameType,
|
||||
newPicName,
|
||||
uploadUrl,
|
||||
currentUploadFileNum,
|
||||
isShowMark,
|
||||
selectSingleImg,
|
||||
store,
|
||||
uploadGenerate,
|
||||
checkbox,
|
||||
@@ -586,9 +479,7 @@ export default defineComponent({
|
||||
selectGenerateList,
|
||||
printModel,
|
||||
value,
|
||||
options,
|
||||
t,
|
||||
props,
|
||||
intersection,
|
||||
isTest,
|
||||
driver__,
|
||||
@@ -599,6 +490,8 @@ export default defineComponent({
|
||||
remGenerate,
|
||||
remGenerateTime,
|
||||
getLibraryListInputTime,
|
||||
props,
|
||||
options,
|
||||
}
|
||||
},
|
||||
data(this_) {
|
||||
@@ -679,7 +572,6 @@ export default defineComponent({
|
||||
})
|
||||
});
|
||||
this.designType = arr[0]
|
||||
this.editDesignType = arr[0]
|
||||
this.disignTypeList = arr
|
||||
// this.workspaceItem.position = this.singleTypeList[0].label
|
||||
}
|
||||
@@ -728,7 +620,6 @@ export default defineComponent({
|
||||
// this.sex = 'Female',
|
||||
// this.designType = 'Outwear',
|
||||
this.selectImgList = []
|
||||
this.selectSingleImg = {}
|
||||
this.value.labelValue = []
|
||||
this.getLibraryList('')
|
||||
this.getClass()
|
||||
@@ -822,129 +713,11 @@ export default defineComponent({
|
||||
this.selectImgList = this.imgList.map((v:any) => v.id)
|
||||
}
|
||||
},
|
||||
|
||||
closeRenameModal(){
|
||||
this.renameVisivle= false;
|
||||
this.newPicName = ''
|
||||
this.value.editLabelValue = []
|
||||
this.value.labelValue = []
|
||||
},
|
||||
|
||||
//确定修改名称
|
||||
async confrimRename(){
|
||||
let data = {
|
||||
libraryIds:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
libraryName:this.newPicName,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
}
|
||||
let designType = this.selectCode == 'Sketchboard' || this.selectCode == 'MarketingSketch' ? this.designType.value : ''
|
||||
let labelArr:any = []
|
||||
this.value.editLabelValue.forEach((item:any)=>{
|
||||
// if(item.length > 1){
|
||||
// }else{
|
||||
// labelArr.push(item[0])
|
||||
// }
|
||||
labelArr.push(item[item.length-1]?item[item.length-1]:item)
|
||||
})
|
||||
let data2 = {
|
||||
"classificationIdList": labelArr,
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"id": 0,
|
||||
"libraryIdList": this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
"type": this.selectCode,
|
||||
"updateTime": "",
|
||||
"userId": 0
|
||||
}
|
||||
let bor = false
|
||||
if(this.newPicName){//多选修改名字
|
||||
await Https.axiosPost(Https.httpUrls.batchUpdateLibraryName, data).then(
|
||||
(rv: any) => {
|
||||
// if(this.renameType ==='batch'){
|
||||
// this.selectImgList = []
|
||||
// }
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
if(this.renameType == 'single'){//多选修改标签
|
||||
await Https.axiosPost(Https.httpUrls.relationLibrary, data2).then(
|
||||
(rv: any) => {
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}else{
|
||||
await Https.axiosPost(Https.httpUrls.editRelPublicClassificationIdList, data2).then(
|
||||
(rv: any) => {
|
||||
bor = true
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
let data3 = {
|
||||
libraryId:this.renameType === 'single' ? [this.selectSingleImg.id] : this.selectImgList,
|
||||
level2Type:this.editDesignType.value,
|
||||
}
|
||||
if(this.selectCode == 'Sketchboard'){
|
||||
await Https.axiosPost(Https.httpUrls.setSketchLibrary,data3).then(
|
||||
(rv) => {
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
// if(bor){
|
||||
|
||||
// }
|
||||
this.value.labelValue = []
|
||||
this.getLibraryList('')
|
||||
this.closeRenameModal()
|
||||
},
|
||||
|
||||
//打开修改名称弹窗
|
||||
showRenameModal(data:any,type:any){
|
||||
this.newPicName = ''
|
||||
this.editSex = this.sex
|
||||
this.editDesignType = this.designType
|
||||
if(type =='batch' && !this.selectImgList.length){ //批量但未选中
|
||||
this.newPicName = ''
|
||||
return
|
||||
}
|
||||
let classData = {
|
||||
"classificationIdList": [],
|
||||
"classificationName": "",
|
||||
"createTime": "",
|
||||
"deleteConfirm": 0,
|
||||
"id": 0,
|
||||
"isDeleted": 0,
|
||||
"libraryIdList": [data.id],
|
||||
"parentId": 0,
|
||||
"type": "",
|
||||
"updateTime": "",
|
||||
"userId": 0
|
||||
}
|
||||
this.value.editLabelValue = []
|
||||
this.selectSingleImg = data
|
||||
this.newPicName = data.name
|
||||
if(type === 'single'){
|
||||
Https.axiosPost(Https.httpUrls.getRelClassificationIdList, classData).then(
|
||||
(rv: any) => {
|
||||
this.value.editLabelValue = rv
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}else{
|
||||
classData.libraryIdList = data
|
||||
Https.axiosPost(Https.httpUrls.getRelPublicClassificationIdList, classData).then(
|
||||
(rv: any) => {
|
||||
this.value.editLabelValue = rv
|
||||
}
|
||||
).catch((res)=>{
|
||||
});
|
||||
}
|
||||
this.renameType = type
|
||||
this.renameVisivle = true
|
||||
let searchLabel:any = this.$refs.searchLabel
|
||||
searchLabel.init(data,type)
|
||||
return
|
||||
},
|
||||
upLoad(){
|
||||
|
||||
@@ -1436,17 +1209,8 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
},
|
||||
dropdownVisibleChange1(){
|
||||
let element:any = this.$refs.cascader1
|
||||
let el = element.contentRef?.getElementsByClassName('el-cascader-menu__empty-text')?.[0]
|
||||
if(el){
|
||||
el.innerHTML = this.t('LibraryPage.NoLabel')
|
||||
}
|
||||
},
|
||||
dropdownVisibleChange(){
|
||||
let element:any = this.$refs.cascader
|
||||
// element.contentRef._value.textContent = 123123
|
||||
// element.contentRef._value.outerText = 123123
|
||||
nextTick().then(()=>{
|
||||
let cascader = document.getElementsByClassName('libraryPageCascader')[0]
|
||||
let cascaderChild = cascader
|
||||
@@ -1673,14 +1437,6 @@ export default defineComponent({
|
||||
align-items: center;
|
||||
width: 75rem;
|
||||
.search_input{
|
||||
// width: 20.8rem;
|
||||
// padding-left: 1.5rem;
|
||||
// height: 2.8rem;
|
||||
// line-height: 3.6rem;
|
||||
// background: #FFFFFF;
|
||||
// border: 0.1rem solid #F1F1F1;
|
||||
// font-size: 1.6rem;
|
||||
// font-weight: 400;
|
||||
height: 3rem;
|
||||
border-radius: 0.5rem;
|
||||
width: 20rem;
|
||||
|
||||
Reference in New Issue
Block a user