fix: 兼容原有不含配置单次抽奖人数的数据

This commit is contained in:
ex_zhangwenlei@exiot.cmcc
2024-01-24 23:01:59 +08:00
parent 00655fa3fd
commit f1a56a80c9
3 changed files with 6 additions and 6 deletions

View File

@@ -174,7 +174,7 @@ onMounted(() => {
<input type="file" class="" id="explore" style="display: none" @change="handleFileChange"
:accept="limitType" />
<span class="btn btn-primary btn-sm">上传文件</span>
<span class="btn btn-primary btn-sm">导入人员数据</span>
</div>
</label>
<!-- <button class="btn btn-primary btn-sm">上传excel</button> -->

View File

@@ -67,7 +67,7 @@ const selectPrize = (item: IPrizeConfig) => {
const changePrizeStatus=(item:IPrizeConfig)=>{
if(item.isUsed==true){
item.isUsedCount=0;
if(item.separateCount.countList.length){
if(item.separateCount&&item.separateCount.countList.length){
item.separateCount.countList.forEach((countItem:any)=>{
countItem.isUsedCount=0;
})
@@ -75,7 +75,7 @@ const changePrizeStatus=(item:IPrizeConfig)=>{
}
else{
item.isUsedCount=item.count;
if(item.separateCount.countList.length){
if(item.separateCount&&item.separateCount.countList.length){
item.separateCount.countList.forEach((countItem:any)=>{
countItem.isUsedCount=countItem.count;
})
@@ -206,7 +206,7 @@ watch(() => prizeList.value, (val: IPrizeConfig[]) => {
</option>
</select>
</label>
<label class="w-full max-w-xs mb-10 form-control">
<label class="w-full max-w-xs mb-10 form-control" v-if="item.separateCount">
<div class="label">
<span class="label-text">单次抽取个数</span>
</div>