feat(资源配置-->编辑组件): 新增“bdFree”开关

This commit is contained in:
tianfeng 2026-04-01 12:04:22 +08:00
parent b63f164bc5
commit 525ec41e75

View File

@ -8,7 +8,13 @@
width="450px"
>
<div v-loading="submitLoading">
<el-form ref="form" :model="form" :rules="ruleVlide()" label-width="110px" style="margin-right:50px;">
<el-form
ref="form"
:model="form"
:rules="ruleVlide()"
label-width="110px"
style="margin-right:50px;"
>
<el-form-item label="系统" prop="sysOrigin">
<el-select
v-model="form.sysOrigin"
@ -21,8 +27,12 @@
:label="item.label"
:value="item.value"
>
<span style="float: left;"> <sys-origin-icon :icon="item.value" :desc="item.value" /></span>
<span style="float: left;margin-left:10px">{{ item.label }}</span>
<span style="float: left;">
<sys-origin-icon :icon="item.value" :desc="item.value"
/></span>
<span style="float: left;margin-left:10px">{{
item.label
}}</span>
</el-option>
</el-select>
</el-form-item>
@ -34,7 +44,12 @@
class="filter-item"
@change="selectdTheme"
>
<el-option v-for="item in propsTypes" :key="item.value" :label="item.name" :value="item.value" />
<el-option
v-for="item in propsTypes"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="封面" prop="cover">
@ -49,10 +64,18 @@
:on-remove="handleCoverFileRemove"
accept="image/*"
>
<i slot="default" v-loading="coverUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="coverUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'RED_PACKET'" label="封面预览图" prop="sourceUrl">
<el-form-item
v-show="selectedTypeName === 'RED_PACKET'"
label="封面预览图"
prop="sourceUrl"
>
<el-upload
:disabled="sourceUploadLoading"
:file-list="sourceUrlFileList"
@ -64,10 +87,18 @@
:on-remove="handleSourceFileRemove"
accept="image/*"
>
<i slot="default" v-loading="sourceUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="sourceUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'RED_PACKET'" label="房间发送页图" prop="roomSendCoverUrl">
<el-form-item
v-show="selectedTypeName === 'RED_PACKET'"
label="房间发送页图"
prop="roomSendCoverUrl"
>
<el-upload
:disabled="roomSendCoverUrlUploadLoading"
:file-list="roomSendCoverFileList"
@ -79,10 +110,18 @@
:on-remove="handleRoomSendCoverFileRemove"
accept="image/*"
>
<i slot="default" v-loading="roomSendCoverUrlUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="roomSendCoverUrlUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'RED_PACKET'" label=" 房间拆红包大图" prop="roomNotOpenedUrl">
<el-form-item
v-show="selectedTypeName === 'RED_PACKET'"
label=" 房间拆红包大图"
prop="roomNotOpenedUrl"
>
<el-upload
:disabled="roomNotOpenedUrlUploadLoading"
:file-list="roomNotOpenedUrlFileList"
@ -94,10 +133,18 @@
:on-remove="handleRoomNotOpenedUrlFileRemove"
accept="image/*"
>
<i slot="default" v-loading="roomNotOpenedUrlUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="roomNotOpenedUrlUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'RED_PACKET'" label="房间红包已打开大图" prop="roomOpenedUrl">
<el-form-item
v-show="selectedTypeName === 'RED_PACKET'"
label="房间红包已打开大图"
prop="roomOpenedUrl"
>
<el-upload
:disabled="roomOpenedUrlUploadLoading"
:file-list="roomOpenedUrlFileList"
@ -109,10 +156,18 @@
:on-remove="handleRoomOpenedUrlFileRemove"
accept="image/*"
>
<i slot="default" v-loading="roomOpenedUrlUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="roomOpenedUrlUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'RED_PACKET'" label="IM发送页图" prop="imSendCoverUrl">
<el-form-item
v-show="selectedTypeName === 'RED_PACKET'"
label="IM发送页图"
prop="imSendCoverUrl"
>
<el-upload
:disabled="imSendCoverUrlUploadLoading"
:file-list="imSendCoverUrlFileList"
@ -124,10 +179,18 @@
:on-remove="handleImSendCoverUrlFileRemove"
accept="image/*"
>
<i slot="default" v-loading="imSendCoverUrlUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="imSendCoverUrlUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'RED_PACKET'" label="IM/房间封面未打开小图" prop="imNotOpenedUrl">
<el-form-item
v-show="selectedTypeName === 'RED_PACKET'"
label="IM/房间封面未打开小图"
prop="imNotOpenedUrl"
>
<el-upload
:disabled="imNotOpenedUrlUploadLoading"
:file-list="imNotOpenedUrlFileList"
@ -139,10 +202,18 @@
:on-remove="handleImNotOpenedUrlFileRemove"
accept="image/*"
>
<i slot="default" v-loading="imNotOpenedUrlUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="imNotOpenedUrlUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'RED_PACKET'" label="IM/房间封面已打开小图" prop="imOpenedUrl">
<el-form-item
v-show="selectedTypeName === 'RED_PACKET'"
label="IM/房间封面已打开小图"
prop="imOpenedUrl"
>
<el-upload
:disabled="imOpenedUrlUploadLoading"
:file-list="imOpenedUrlFileList"
@ -154,11 +225,19 @@
:on-remove="handleImOpenedUrlFileRemove"
accept="image/*"
>
<i slot="default" v-loading="imOpenedUrlUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="imOpenedUrlUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'RED_PACKET'" label="IM/房间封面已打开小图2" prop="imOpenedUrlTwo">
<el-form-item
v-show="selectedTypeName === 'RED_PACKET'"
label="IM/房间封面已打开小图2"
prop="imOpenedUrlTwo"
>
<el-upload
:disabled="imOpenedUrlTwoUploadLoading"
:file-list="imOpenedUrlTwoFileList"
@ -170,11 +249,19 @@
:on-remove="handleImOpenedUrlTwoFileRemove"
accept="image/*"
>
<i slot="default" v-loading="imOpenedUrlTwoUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="imOpenedUrlTwoUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="isSvga && form.type !== 'RED_PACKET'" label="svga" prop="sourceUrl">
<el-form-item
v-show="isSvga && form.type !== 'RED_PACKET'"
label="svga"
prop="sourceUrl"
>
<el-upload
:disabled="sourceUploadLoading"
:class="{ 'upload-but-hide': !isShowSourceUpload }"
@ -186,7 +273,12 @@
accept=".svga,.pag,.mp4"
>
<div class="upload-but">
<el-button :loading="sourceUploadLoading" size="small" type="primary">点击上传</el-button>
<el-button
:loading="sourceUploadLoading"
size="small"
type="primary"
>点击上传</el-button
>
<div slot="tip" class="el-upload__tip">
只能上传svga/pag/mp4文件
</div>
@ -194,7 +286,11 @@
</el-upload>
<svgaplayer v-if="!isShowSourceUpload" :url="form.sourceUrl" />
</el-form-item>
<el-form-item v-show="selectedTypeName === 'CHAT_BUBBLE'" label="iOS 资源 " prop="sourceUrl">
<el-form-item
v-show="selectedTypeName === 'CHAT_BUBBLE'"
label="iOS 资源 "
prop="sourceUrl"
>
<el-upload
:disabled="sourceUploadLoading"
:file-list="sourceUrlFileList"
@ -206,10 +302,18 @@
:on-remove="handleSourceFileRemove"
accept="image/*"
>
<i slot="default" v-loading="sourceUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="sourceUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-show="selectedTypeName === 'CHAT_BUBBLE'" label="Android 资源 " prop="expand">
<el-form-item
v-show="selectedTypeName === 'CHAT_BUBBLE'"
label="Android 资源 "
prop="expand"
>
<el-upload
:disabled="expandUploadLoading"
:file-list="expandFileList"
@ -221,10 +325,18 @@
:on-remove="handleExpandFileRemove"
accept="image/*"
>
<i slot="default" v-loading="expandUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="expandUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item v-if="isBackground" label="房间装扮背景" prop="sourceUrl">
<el-form-item
v-if="isBackground"
label="房间装扮背景"
prop="sourceUrl"
>
<el-upload
:disabled="sourceUploadLoading"
:file-list="sourceUrlFileList"
@ -236,7 +348,11 @@
:on-remove="handleSourceFileRemove"
accept="image/*"
>
<i slot="default" v-loading="sourceUploadLoading" class="el-icon-plus" />
<i
slot="default"
v-loading="sourceUploadLoading"
class="el-icon-plus"
/>
</el-upload>
</el-form-item>
<el-form-item label="名称" prop="name">
@ -247,38 +363,53 @@
style="width: 100%"
class="filter-item"
>
<el-option v-for="item in nobleVipTabs" :key="item.value" :label="item.name" :value="item.value" />
<el-option
v-for="item in nobleVipTabs"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
<el-input v-else v-model.trim="form.name" type="text" />
</el-form-item>
<el-form-item v-if="!isUpdate" label="编码" prop="code">
<el-input v-model.trim="form.code" type="text" placeholder="编码添加后不能修改" />
<el-input
v-model.trim="form.code"
type="text"
placeholder="编码添加后不能修改"
/>
</el-form-item>
<el-form-item v-if="isPrice" label="底价" prop="amount">
<el-input v-model.trim="form.amount" v-number type="text" />
</el-form-item>
<el-form-item label="admin free" prop="amount">
<el-form-item label="admin free" prop="adminFree">
<el-switch
v-model="form.adminFree"
active-text="是"
inactive-text="否"
></el-switch>
</el-form-item>
<el-form-item label="bd free" prop="bdFree">
<el-switch
v-model="form.bdFree"
active-text="是"
inactive-text="否"
></el-switch>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm()">保存</el-button>
<el-button @click="handleClose()">取消</el-button>
</el-form-item>
</el-form>
</div>
</el-dialog>
</div>
</template>
<script>
import { addPropsSource, updatePropsSource } from '@/api/props'
import { propsTypes, nobleVipTabs } from '@/constant/type'
import { deepClone, getElementUiUploadFile } from '@/utils'
import { mapGetters } from 'vuex'
import { addPropsSource, updatePropsSource } from "@/api/props";
import { propsTypes, nobleVipTabs } from "@/constant/type";
import { deepClone, getElementUiUploadFile } from "@/utils";
import { mapGetters } from "vuex";
export default {
props: {
@ -290,8 +421,8 @@ export default {
},
data() {
const commonRules = [
{ required: true, message: '必填字段不可为空', trigger: 'blur' }
]
{ required: true, message: "必填字段不可为空", trigger: "blur" }
];
return {
nobleVipTabs,
svgaplayerVisable: false,
@ -321,25 +452,26 @@ export default {
isBackground: false,
submitLoading: false,
uploadLoading: false,
selectedTypeName: '',
selectedTypeName: "",
form: {
id: '',
cover: '',
sourceUrl: '',
name: '',
type: '',
code: '',
amount: '',
expand: '',
sysOrigin: '',
roomSendCoverUrl: '',
roomOpenedUrl: '',
roomNotOpenedUrl: '',
imSendCoverUrl: '',
imOpenedUrl: '',
imOpenedUrlTwo: '',
imNotOpenedUrl: '',
adminFree: false
id: "",
cover: "",
sourceUrl: "",
name: "",
type: "",
code: "",
amount: "",
expand: "",
sysOrigin: "",
roomSendCoverUrl: "",
roomOpenedUrl: "",
roomNotOpenedUrl: "",
imSendCoverUrl: "",
imOpenedUrl: "",
imOpenedUrlTwo: "",
imNotOpenedUrl: "",
adminFree: false,
bdFree: false
},
formRules: {
sysOrigin: commonRules,
@ -381,306 +513,359 @@ export default {
type: commonRules,
code: commonRules
}
}
};
},
computed: {
...mapGetters(['permissionsSysOriginPlatforms']),
...mapGetters(["permissionsSysOriginPlatforms"]),
isShowRoomSendCoverUpload() {
return !this.form.roomSendCoverUrl
return !this.form.roomSendCoverUrl;
},
isShowRoomNotOpenedUrlUpload() {
return !this.form.roomNotOpenedUrl
return !this.form.roomNotOpenedUrl;
},
isShowRoomOpenedUrlUpload() {
return !this.form.roomOpenedUrl
return !this.form.roomOpenedUrl;
},
isShowImSendCoverUrlUpload() {
return !this.form.imSendCoverUrl
return !this.form.imSendCoverUrl;
},
isShowImNotOpenedUrlUpload() {
return !this.form.imNotOpenedUrl
return !this.form.imNotOpenedUrl;
},
isShowImOpenedUrlUpload() {
return !this.form.imOpenedUrl
return !this.form.imOpenedUrl;
},
isShowImOpenedUrlTwoUpload() {
return !this.form.imOpenedUrlTwo
return !this.form.imOpenedUrlTwo;
},
isShowCoverUpload() {
return !this.form.cover
return !this.form.cover;
},
isShowSourceUpload() {
return !this.form.sourceUrl
return !this.form.sourceUrl;
},
isShowExpandUpload() {
return this.form.type === 'CHAT_BUBBLE' && !this.form.expand
return this.form.type === "CHAT_BUBBLE" && !this.form.expand;
},
textOptTitle() {
return this.row && this.row.id ? '修改' : '添加'
return this.row && this.row.id ? "修改" : "添加";
},
isUpdate() {
return this.row && this.row.id
return this.row && this.row.id;
}
},
watch: {
row: {
handler(newVal) {
if (!newVal) {
return
return;
}
this.form = deepClone(newVal)
this.form = deepClone(newVal);
if (this.form.sourceUrl) {
this.sourceUrlFileList = getElementUiUploadFile(this.form.sourceUrl)
this.sourceUrlFileList = getElementUiUploadFile(this.form.sourceUrl);
}
if (this.form.cover) {
this.coverFileList = getElementUiUploadFile(this.form.cover)
this.coverFileList = getElementUiUploadFile(this.form.cover);
}
if (this.form.expand) {
this.expandFileList = getElementUiUploadFile(this.form.expand)
this.expandFileList = getElementUiUploadFile(this.form.expand);
}
if (this.form.roomSendCoverUrl) {
this.roomSendCoverFileList = getElementUiUploadFile(this.form.roomSendCoverUrl)
this.roomSendCoverFileList = getElementUiUploadFile(
this.form.roomSendCoverUrl
);
}
if (this.form.roomNotOpenedUrl) {
this.roomNotOpenedUrlFileList = getElementUiUploadFile(this.form.roomNotOpenedUrl)
this.roomNotOpenedUrlFileList = getElementUiUploadFile(
this.form.roomNotOpenedUrl
);
}
if (this.form.roomOpenedUrl) {
this.roomOpenedUrlFileList = getElementUiUploadFile(this.form.roomOpenedUrl)
this.roomOpenedUrlFileList = getElementUiUploadFile(
this.form.roomOpenedUrl
);
}
if (this.form.imSendCoverUrl) {
this.imSendCoverUrlFileList = getElementUiUploadFile(this.form.imSendCoverUrl)
this.imSendCoverUrlFileList = getElementUiUploadFile(
this.form.imSendCoverUrl
);
}
if (this.form.imNotOpenedUrl) {
this.imNotOpenedUrlFileList = getElementUiUploadFile(this.form.imNotOpenedUrl)
this.imNotOpenedUrlFileList = getElementUiUploadFile(
this.form.imNotOpenedUrl
);
}
if (this.form.imOpenedUrl) {
this.imOpenedUrlFileList = getElementUiUploadFile(this.form.imOpenedUrl)
this.imOpenedUrlFileList = getElementUiUploadFile(
this.form.imOpenedUrl
);
}
if (this.form.imOpenedUrlTwo) {
this.imOpenedUrlTwoFileList = getElementUiUploadFile(this.form.imOpenedUrlTwo)
this.imOpenedUrlTwoFileList = getElementUiUploadFile(
this.form.imOpenedUrlTwo
);
}
this.isSvga = this.form.type !== 'THEME' && this.form.type !== 'LAYOUT' && this.form.type !== 'CHAT_BUBBLE' && this.form.type !== 'RED_PACKET'
this.selectedTypeName = this.form.type
this.isBackground = this.form.type === 'LAYOUT'
this.isSvga =
this.form.type !== "THEME" &&
this.form.type !== "LAYOUT" &&
this.form.type !== "CHAT_BUBBLE" &&
this.form.type !== "RED_PACKET";
this.selectedTypeName = this.form.type;
this.isBackground = this.form.type === "LAYOUT";
},
immediate: true
}
},
methods: {
ruleVlide() {
if (this.selectedTypeName === 'RED_PACKET') {
return this.formRules3
if (this.selectedTypeName === "RED_PACKET") {
return this.formRules3;
}
if (this.selectedTypeName === 'CUSTOMIZE' || this.selectedTypeName === 'FRAGMENTS') {
this.form.amount = 0
return this.formRulesCustomize
if (
this.selectedTypeName === "CUSTOMIZE" ||
this.selectedTypeName === "FRAGMENTS"
) {
this.form.amount = 0;
return this.formRulesCustomize;
}
return !this.isSvga ? this.formRules2 : this.formRules
return !this.isSvga ? this.formRules2 : this.formRules;
},
uploadCover(file) {
const that = this
that.coverUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover).then(res => {
that.coverUploadLoading = false
that.form.cover = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.coverUploadLoading = false
const that = this;
that.coverUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover)
.then(res => {
that.coverUploadLoading = false;
that.form.cover = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.coverUploadLoading = false;
});
},
handleCoverFileRemove(file, fileList) {
this.form.cover = ''
this.coverUploadLoading = false
this.form.cover = "";
this.coverUploadLoading = false;
},
roomSendUploadCover(file) {
const that = this
that.roomSendCoverUrlUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover).then(res => {
that.roomSendCoverUrlUploadLoading = false
that.form.roomSendCoverUrl = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.roomSendCoverUrlUploadLoading = false
const that = this;
that.roomSendCoverUrlUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover)
.then(res => {
that.roomSendCoverUrlUploadLoading = false;
that.form.roomSendCoverUrl = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.roomSendCoverUrlUploadLoading = false;
});
},
handleRoomSendCoverFileRemove(file, fileList) {
this.form.roomSendCoverUrl = ''
this.roomSendCoverUrlUploadLoading = false
this.form.roomSendCoverUrl = "";
this.roomSendCoverUrlUploadLoading = false;
},
roomNotOpenedUrlUploadCover(file) {
const that = this
that.roomNotOpenedUrlUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover).then(res => {
that.roomNotOpenedUrlUploadLoading = false
that.form.roomNotOpenedUrl = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.roomNotOpenedUrlUploadLoading = false
const that = this;
that.roomNotOpenedUrlUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover)
.then(res => {
that.roomNotOpenedUrlUploadLoading = false;
that.form.roomNotOpenedUrl = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.roomNotOpenedUrlUploadLoading = false;
});
},
handleRoomNotOpenedUrlFileRemove(file, fileList) {
this.form.roomNotOpenedUrl = ''
this.roomNotOpenedUrlUploadLoading = false
this.form.roomNotOpenedUrl = "";
this.roomNotOpenedUrlUploadLoading = false;
},
roomOpenedUrlUploadCover(file) {
const that = this
that.roomOpenedUrlUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover).then(res => {
that.roomOpenedUrlUploadLoading = false
that.form.roomOpenedUrl = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.roomOpenedUrlUploadLoading = false
const that = this;
that.roomOpenedUrlUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover)
.then(res => {
that.roomOpenedUrlUploadLoading = false;
that.form.roomOpenedUrl = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.roomOpenedUrlUploadLoading = false;
});
},
handleRoomOpenedUrlFileRemove(file, fileList) {
this.form.roomOpenedUrl = ''
this.roomOpenedUrlUploadLoading = false
this.form.roomOpenedUrl = "";
this.roomOpenedUrlUploadLoading = false;
},
imSendCoverUrlUploadCover(file) {
const that = this
that.imSendCoverUrlUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover).then(res => {
that.imSendCoverUrlUploadLoading = false
that.form.imSendCoverUrl = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.imSendCoverUrlUploadLoading = false
const that = this;
that.imSendCoverUrlUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover)
.then(res => {
that.imSendCoverUrlUploadLoading = false;
that.form.imSendCoverUrl = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.imSendCoverUrlUploadLoading = false;
});
},
handleImSendCoverUrlFileRemove(file, fileList) {
this.form.imSendCoverUrl = ''
this.imSendCoverUrlUploadLoading = false
this.form.imSendCoverUrl = "";
this.imSendCoverUrlUploadLoading = false;
},
imNotOpenedUrlUploadCover(file) {
const that = this
that.imNotOpenedUrlUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover).then(res => {
that.imNotOpenedUrlUploadLoading = false
that.form.imNotOpenedUrl = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.imNotOpenedUrlUploadLoading = false
const that = this;
that.imNotOpenedUrlUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover)
.then(res => {
that.imNotOpenedUrlUploadLoading = false;
that.form.imNotOpenedUrl = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.imNotOpenedUrlUploadLoading = false;
});
},
handleImNotOpenedUrlFileRemove(file, fileList) {
this.form.imNotOpenedUrl = ''
this.imNotOpenedUrlUploadLoading = false
this.form.imNotOpenedUrl = "";
this.imNotOpenedUrlUploadLoading = false;
},
imOpenedUrlUploadCover(file) {
const that = this
that.imOpenedUrlUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover).then(res => {
that.imOpenedUrlUploadLoading = false
that.form.imOpenedUrl = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.imOpenedUrlUploadLoading = false
const that = this;
that.imOpenedUrlUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover)
.then(res => {
that.imOpenedUrlUploadLoading = false;
that.form.imOpenedUrl = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.imOpenedUrlUploadLoading = false;
});
},
handleImOpenedUrlFileRemove(file, fileList) {
this.form.imOpenedUrl = ''
this.imOpenedUrlUploadLoading = false
this.form.imOpenedUrl = "";
this.imOpenedUrlUploadLoading = false;
},
imOpenedUrlTwoUploadCover(file) {
const that = this
that.imOpenedUrlTwoUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover).then(res => {
that.imOpenedUrlTwoUploadLoading = false
that.form.imOpenedUrlTwo = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.imOpenedUrlTwoUploadLoading = false
const that = this;
that.imOpenedUrlTwoUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgaCover)
.then(res => {
that.imOpenedUrlTwoUploadLoading = false;
that.form.imOpenedUrlTwo = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.imOpenedUrlTwoUploadLoading = false;
});
},
handleImOpenedUrlTwoFileRemove(file, fileList) {
this.form.imOpenedUrlTwo = ''
this.imOpenedUrlTwoUploadLoading = false
this.form.imOpenedUrlTwo = "";
this.imOpenedUrlTwoUploadLoading = false;
},
sourceUpload(file) {
const that = this
that.sourceUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgasource).then(res => {
that.sourceUploadLoading = false
that.form.sourceUrl = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.sourceUploadLoading = false
const that = this;
that.sourceUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgasource)
.then(res => {
that.sourceUploadLoading = false;
that.form.sourceUrl = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.sourceUploadLoading = false;
});
},
handleSourceFileRemove(file, fileList) {
this.form.sourceUrl = ''
this.sourceUploadLoading = false
this.form.sourceUrl = "";
this.sourceUploadLoading = false;
},
expandUpload(file) {
const that = this
that.expandUploadLoading = true
that.$simpleUploadFlie(file, that.$application.fileBucket.svgasource).then(res => {
that.expandUploadLoading = false
that.form.expand = that.$getAccessImgUrl(res.name)
}).catch(er => {
that.expandUploadLoading = false
const that = this;
that.expandUploadLoading = true;
that
.$simpleUploadFlie(file, that.$application.fileBucket.svgasource)
.then(res => {
that.expandUploadLoading = false;
that.form.expand = that.$getAccessImgUrl(res.name);
})
.catch(er => {
that.expandUploadLoading = false;
});
},
handleExpandFileRemove(file, fileList) {
this.form.expand = ''
this.expandUploadLoading = false
this.form.expand = "";
this.expandUploadLoading = false;
},
handleClose() {
this.$emit('close')
this.$emit("close");
},
selectdTheme(typeName) {
this.isSvga = true
this.isPrice = true
this.isBackground = false
this.selectedTypeName = typeName
if (typeName === 'THEME' || typeName === 'CHAT_BUBBLE') {
this.isSvga = false
return
this.isSvga = true;
this.isPrice = true;
this.isBackground = false;
this.selectedTypeName = typeName;
if (typeName === "THEME" || typeName === "CHAT_BUBBLE") {
this.isSvga = false;
return;
}
if (typeName === 'LAYOUT') {
this.isSvga = false
this.isBackground = true
return
if (typeName === "LAYOUT") {
this.isSvga = false;
this.isBackground = true;
return;
}
if (typeName === 'CUSTOMIZE' || typeName === 'FRAGMENTS') {
this.isPrice = false
return
if (typeName === "CUSTOMIZE" || typeName === "FRAGMENTS") {
this.isPrice = false;
return;
}
},
submitForm() {
const that = this
const that = this;
that.$refs.form.validate(valid => {
if (!valid) {
console.error('error submit!!')
return false
console.error("error submit!!");
return false;
}
that.submitLoading = true
that.submitLoading = true;
if (that.isUpdate) {
updatePropsSource(that.form).then(res => {
that.submitLoading = false
that.$emit('success', res)
}).catch(er => {
that.submitLoading = false
that.$emit('fail')
console.error(er)
updatePropsSource(that.form)
.then(res => {
that.submitLoading = false;
that.$emit("success", res);
})
return
.catch(er => {
that.submitLoading = false;
that.$emit("fail");
console.error(er);
});
return;
}
addPropsSource(that.form).then(res => {
that.submitLoading = false
that.$emit('success', res)
}).catch(er => {
that.submitLoading = false
that.$emit('fail')
console.error(er)
})
addPropsSource(that.form)
.then(res => {
that.submitLoading = false;
that.$emit("success", res);
})
.catch(er => {
that.submitLoading = false;
that.$emit("fail");
console.error(er);
});
});
},
clickSvgaplayer() {
this.svgaplayerVisable = true
}
this.svgaplayerVisable = true;
}
}
};
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>