This commit is contained in:
X1627315083
2024-06-20 10:36:45 +08:00
parent 814dd1205c
commit dc93403506
28 changed files with 1506 additions and 394 deletions

View File

@@ -29,9 +29,15 @@
</div>
</div>
</div>
<div class="habitSetStyle_ok started_btn" @click="setOk">
OK
<div class="habitSetStyle_ok">
<div class="started_btn" @click="setOk()">
OK
</div>
<div class="started_btn" @click="setClear()">
Clear
</div>
</div>
</div>
<div class="mark_loading" v-show="isShowMark">
<a-spin size="large" />
@@ -42,11 +48,12 @@
<script lang="ts">
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
// import { getCookie } from "@/tool/cookie";
import { message,Modal } from "ant-design-vue";
import { LoadingOutlined ,ExclamationCircleOutlined} from "@ant-design/icons-vue";
import { Https } from "@/tool/https";
import { getCookie,setCookie } from "@/tool/cookie";
// import domTurnImg from '@/tool/domTurnImg'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { Modal,message } from 'ant-design-vue';
import { downloadIamge } from "@/tool/util";
export default defineComponent({
@@ -55,6 +62,7 @@ emits:['setParentData','setWorkspaceStyle'],
setup(props,{emit}) {
let habitSetStyle: any = ref(false);//弹窗
let habitSetStyleMask:any = ref(false)//弹窗遮罩
let oldDataId = ''
let habitSetStyleData:any = reactive({
styleList:[],
selectStyle:{
@@ -85,6 +93,7 @@ setup(props,{emit}) {
if(habitSetStyleData.styleList.length == 0){
getStyleList()
}
oldDataId = data.styleId
habitSetStyleData.selectStyle.id = data.styleId
habitSetStyleData.selectStyle.name = data.styleName
// habitSetStyleData.selectStyleId = 'feng2'
@@ -108,8 +117,38 @@ setup(props,{emit}) {
cleardata()
}
let setOk= ()=>{
emit('setWorkspaceStyle',habitSetStyleData.selectStyle.id)
cleardata()
let data = {
id:habitSetStyleData.selectStyle.id,
name:habitSetStyleData.selectStyle.name,
isRevampModel:false,
}
if(oldDataId == data.id){
cleardata()
}else{
let _this = this
Modal.confirm({
title: 'It is detected that you have modified the style, may I ask whether the model is changed to the model corresponding to the style',
icon: createVNode(ExclamationCircleOutlined),
okText: 'Yes',
cancelText: 'No',
mask:false,
centered:true,
zIndex:1050,
onOk() {
data.isRevampModel = true
emit('setWorkspaceStyle',data)
cleardata()
},
onCancel() {
emit('setWorkspaceStyle',data)
cleardata()
},
});
}
}
let setClear = ()=>{
habitSetStyleData.selectStyle.id = ''
habitSetStyleData.selectStyle.name = ''
}
let setItemSelect = (item:any)=>{
habitSetStyleData.selectStyle = item
@@ -123,6 +162,7 @@ setup(props,{emit}) {
cancelDsign,
setItemSelect,
setOk,
setClear,
};
},
data() {
@@ -231,6 +271,11 @@ methods: {
width: 60%;
text-align: center;
margin: 0 auto;
display: flex;
justify-content: space-around;
>div{
width: 40%;
}
}
}