2023-11-7-1

This commit is contained in:
X1627315083
2023-11-07 09:30:25 +08:00
parent 608468c340
commit 632959c581
6 changed files with 160 additions and 7 deletions

View File

@@ -180,6 +180,16 @@ li {
.ant-cascader-checkbox-indeterminate .ant-cascader-checkbox-inner::after {
background-color: #767676;
}
.ant-modal-mask {
background: linear-gradient(45deg, #eee4f3, #f3f4e6);
min-width: 1440px;
border-radius: 1rem;
overflow: hidden;
height: calc(100% - 7rem);
bottom: 0;
top: auto;
margin: 0 9rem;
}
.modal_component.ant-modal {
top: 0;
}

View File

@@ -191,6 +191,18 @@ ul,li{
.ant-cascader-checkbox-indeterminate .ant-cascader-checkbox-inner::after{
background-color: #767676;
}
.ant-modal-mask{
background: linear-gradient(45deg, #eee4f3, #f3f4e6);
min-width: 1440px;
border-radius: 1rem;
overflow: hidden;
height: calc(100% - 7rem);
bottom: 0;
top: auto;
margin: 0 9rem;
}
//弹窗公共样式
.modal_component{

View File

@@ -564,7 +564,7 @@ export default defineComponent({
that = this
if(this.modelType == 'System' && this.userInfo.userId == 88 || this.userInfo.userId == 83){
if(this.printObject.templateId){
this.printObject.id = this.printObject.libraryId
this.printObject.id = this.printObject.relationId
this.confrimSubmit()
}else{
this.customRequest().then((rv:any)=>{
@@ -579,7 +579,7 @@ export default defineComponent({
cropper.getCropData(async (value:any) => {
// 转换为File对象
if(this.printObject.templateId){
this.printObject.id = this.printObject.libraryId
this.printObject.id = this.printObject.relationId
this.confrimSubmit()
}else{
let file:any = base64toFile(value,this.printObject.file.name);
@@ -599,6 +599,7 @@ export default defineComponent({
},
confrimSubmit(){
let param = {
libraryId:this.printObject.id,
templateId:this.printObject.templateId || null,

View File

@@ -0,0 +1,128 @@
<template>
<a-modal class="library_setLabel"
v-model:visible="setLabelShow"
:footer="null"
title="Edit tag"
width="65%"
:maskClosable="false"
:centered="true"
@onCancel="clearSetLabel"
>
<a-cascader
v-model:value="value"
style="width: 100%"
:multiple="multiple"
max-tag-count="responsive"
:options="options"
placeholder="Please select"
></a-cascader>
</a-modal>
</template>
<script lang="ts">
import { defineComponent,ref,createVNode} from 'vue'
import { Https } from "@/tool/https";
import {dataURLtoFile,base64toFile} from "@/tool/util"
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';
export default defineComponent({
components:{
VueCropper,
},
setup() {
let cropperTime:any = ref()
let multiple = ref(false)
const options: CascaderProps['options'] = [
{
label: 'Light',
value: 'light',
children: new Array(20)
.fill(null)
.map((_, index) => ({ label: `Number ${index}`, value: index })),
},
{
label: 'Bamboo',
value: 'bamboo',
children: [
{
label: 'Little',
value: 'little',
children: [
{
label: `'Toy Fish'`,
value: 'fish',
},
{
label: 'Toy Cards',
value: 'cards',
},
{
label: 'Toy Bird',
value: 'bird',
},
],
},
],
},
];
let {t} = useI18n()
return {
multiple,
value: ref<string[]>([]),
options,
t
}
},
data(){
return{
setLabelShow:false,
}
},
mounted(){
},
watch: {
sex:{
handler(newVal:any,oldVal:any){
// let imgbox:any = this.$refs.imgbox
// let imgBoxSizeBG = imgbox?.getElementsByClassName('cropper-view-box-BG')?.[0]
// if(imgBoxSizeBG){
// if(newVal == 'Male'){
// imgBoxSizeBG.style.background = `url(./image/maleBG.png) no-repeat 0 0 / 100% 100%`
// }else{
// imgBoxSizeBG.style.background = `url(./image/femaleBG.png) no-repeat 0 0 / 100% 100%`
// }
// }
},
},
},
methods:{
init(str:any){
this.setLabelShow = true
if(str === 'add'){
this.multiple = false
}else{
this.multiple = true
}
console.log(this.$parent?.options);
},
clearSetLabel(){
this.setLabelShow = false
}
}
})
</script>
<style lang="less">
.library_setLabel{
}
</style>

View File

@@ -1300,7 +1300,6 @@ export default defineComponent({
}
</style>
<style lang="less">
.ant-modal-root{
.ant-modal-mask{
background: linear-gradient(45deg, #eee4f3, #f3f4e6);
@@ -1320,9 +1319,6 @@ export default defineComponent({
.ant-modal{
min-width: .65*1440px;
}
}
}
</style>

View File

@@ -304,7 +304,7 @@
<ModelPlacement ref="ModelPlacement" @submitModelPlacement="getLibraryList"></ModelPlacement>
<ModelPlacementMobile ref="ModelPlacementMobile"></ModelPlacementMobile>
<setLabel ref="setLabel"></setLabel>
<!-- 蒙层 start-->
<div class="mark_loading" v-show="isShowMark">
<a-spin size="large" />
@@ -319,6 +319,7 @@ import { LoadingOutlined } from "@ant-design/icons-vue";
import { defineComponent,h ,ref,createVNode,nextTick} from 'vue'
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 RobotAssist from "@/component/HomePage/RobotAssist.vue";
import { Modal,message,Upload,CascaderProps } from 'ant-design-vue';
@@ -333,6 +334,7 @@ export default defineComponent({
components: {
HeaderComponent,
ModelPlacement,
setLabel,
ModelPlacementMobile,
RobotAssist,
},
@@ -1018,9 +1020,13 @@ export default defineComponent({
removeClick(){
},
addLabel(){
let setLabel:any = this.$refs.setLabel
setLabel.init('add')
this.labelOpen = false
},
removeLabel(){
let setLabel:any = this.$refs.setLabel
setLabel.init('remove')
this.labelOpen = false
}
}