코드수정정
This commit is contained in:
parent
9e4207de95
commit
c51da7f56d
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="data.voteMembers.some(item => item.MEMBERSEQ === userStore.user.id)"
|
||||
class="card mb-6" :class="{ 'disabled-class': data.localVote.LOCVOTDDT && (topVoters.length == 1 || data.localVote.LOCVOTRES || voteResult == 0)}">
|
||||
class="card mb-6" :class="{ 'disabled-class': data.localVote.LOCVOTDDT && (topVoters.length == 1 || data.localVote.LOCVOTRES || voteResult == 0)}">
|
||||
<div class="card-body" v-if="!data.localVote.LOCVOTDEL" >
|
||||
<h5 class="card-title mb-1">
|
||||
<div class="list-unstyled users-list d-flex align-items-center gap-1">
|
||||
@ -11,29 +11,29 @@
|
||||
@error="$event.target.src = '/img/icons/icon.png'"
|
||||
alt="user"
|
||||
/>
|
||||
<div class="w-100">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="user-info">
|
||||
<h6 class="mb-1">{{ data.localVote.MEMBERNAM }}</h6>
|
||||
<!-- 투표완료시 -->
|
||||
</div>
|
||||
<div class="add-btn d-flex align-items-center">
|
||||
<!-- 투표작성자만 수정/삭제/종료 가능 -->
|
||||
<div v-if="userStore.user.id === data.localVote.LOCVOTREG">
|
||||
<button
|
||||
v-if="!data.localVote.LOCVOTDDT"
|
||||
type="button"
|
||||
class="btn btn-label-danger btn-icon m-1"
|
||||
@click="endBtn(data.localVote.LOCVOTSEQ)"
|
||||
><i class="bx bx-power-off"></i>
|
||||
</button>
|
||||
<DeleteBtn v-if="!data.localVote.LOCVOTDDT" @click="voteDelete(data.localVote.LOCVOTSEQ)" />
|
||||
<div class="w-100">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="user-info">
|
||||
<h6 class="mb-1">{{ data.localVote.MEMBERNAM }}</h6>
|
||||
<!-- 투표완료시 -->
|
||||
</div>
|
||||
<div class="add-btn d-flex align-items-center">
|
||||
<!-- 투표작성자만 수정/삭제/종료 가능 -->
|
||||
<div v-if="userStore.user.id === data.localVote.LOCVOTREG">
|
||||
<button
|
||||
v-if="!data.localVote.LOCVOTDDT"
|
||||
type="button"
|
||||
class="btn btn-label-danger btn-icon m-1"
|
||||
@click="endBtn(data.localVote.LOCVOTSEQ)"
|
||||
><i class="bx bx-power-off"></i>
|
||||
</button>
|
||||
<DeleteBtn v-if="!data.localVote.LOCVOTDDT" @click="voteDelete(data.localVote.LOCVOTSEQ)" />
|
||||
</div>
|
||||
<p v-if="data.localVote.LOCVOTDDT" class="btn-icon btn-danger rounded-2"><i class="bx bx-power-off"></i></p>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="data.localVote.LOCVOTDDT" class="btn-icon btn-danger rounded-2"><i class="bx bx-power-off"></i></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h5>
|
||||
<h5 class="mb-1">{{ data.localVote.LOCVOTTTL }}
|
||||
<i v-if="yesVotetotal != '0'" class="bx bxs-check-circle link-success"></i>
|
||||
@ -44,21 +44,21 @@
|
||||
<small class="text-primary text-uppercase">투표 결과없음 (😂아무도 투표하지 않았습니다)</small>
|
||||
</div>
|
||||
<div v-else>
|
||||
<vote-card-check
|
||||
v-if="yesVotetotal == 0 && !data.localVote.LOCVOTDDT"
|
||||
@addContents="addContents"
|
||||
@checkedNames="checkedNames"
|
||||
:data="data.voteDetails"
|
||||
:voteInfo="data.localVote"
|
||||
:total="data.voteDetails.length "/>
|
||||
<small v-if="yesVotetotal != 0 && !data.localVote.LOCVOTDDT">투표 완료 : 종료시 투표 결과가 나타납니다.</small>
|
||||
<!-- 투표 결과 -->
|
||||
<div v-if="data.localVote.LOCVOTDDT" class="mt-3">
|
||||
<vote-result-list :data="topVoters" @randomList="randomList" :randomResultNum="data.localVote.LOCVOTRES" :locvotreg="data.localVote.LOCVOTREG"/>
|
||||
</div>
|
||||
<!-- 투표완/미완 인원 -->
|
||||
<vote-user-list
|
||||
:data="data.voteMembers"/>
|
||||
<vote-card-check
|
||||
v-if="yesVotetotal == 0 && !data.localVote.LOCVOTDDT"
|
||||
@addContents="addContents"
|
||||
@checkedNames="checkedNames"
|
||||
:data="data.voteDetails"
|
||||
:voteInfo="data.localVote"
|
||||
:total="data.voteDetails.length "/>
|
||||
<small v-if="yesVotetotal != 0 && !data.localVote.LOCVOTDDT">투표 완료 : 종료시 투표 결과가 나타납니다.</small>
|
||||
<!-- 투표 결과 -->
|
||||
<div v-if="data.localVote.LOCVOTDDT" class="mt-3">
|
||||
<vote-result-list :data="topVoters" @randomList="randomList" :randomResultNum="data.localVote.LOCVOTRES" :locvotreg="data.localVote.LOCVOTREG"/>
|
||||
</div>
|
||||
<!-- 투표완/미완 인원 -->
|
||||
<vote-user-list
|
||||
:data="data.voteMembers"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="card-body">
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
<div class="card-text">
|
||||
<div class="demo-inline-spacing">
|
||||
<!-- 투표리스트 -->
|
||||
<div v-for="(item, index) in data"
|
||||
:key="index">
|
||||
<div v-for="(item, index) in data" :key="index">
|
||||
<vote-card-check-list
|
||||
:data="item"
|
||||
:multiIs = voteInfo.LOCVOTMUL
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
<div class="d-flex align-items-center ">
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap border-top-0 p-0">
|
||||
<div class="d-flex flex-wrap align-items-center">
|
||||
<ul class="list-unstyled users-list d-flex align-items-center avatar-group m-0 me-2">
|
||||
<vote-in-complete-user-list-card :data="data" />
|
||||
</ul>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap align-items-center">
|
||||
<ul class="list-unstyled users-list d-flex align-items-center avatar-group m-0 me-2">
|
||||
<vote-in-complete-user-list-card :data="data" />
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
class="avatar pull-up"
|
||||
:aria-label="data.MEMBERSEQ"
|
||||
:data-bs-original-title="getTooltipTitle(data)">
|
||||
<img
|
||||
class="rounded-circle user-avatar border border-3"
|
||||
:src="`${baseUrl}upload/img/profile/${data.MEMBERPRF}`"
|
||||
:style="`border-color: ${data.usercolor} !important;`"
|
||||
@error="$event.target.src = '/img/icons/icon.png'"
|
||||
alt="user"
|
||||
/>
|
||||
<img
|
||||
class="rounded-circle user-avatar border border-3"
|
||||
:src="`${baseUrl}upload/img/profile/${data.MEMBERPRF}`"
|
||||
:style="`border-color: ${data.usercolor} !important;`"
|
||||
@error="$event.target.src = '/img/icons/icon.png'"
|
||||
alt="user"
|
||||
/>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</span>
|
||||
<div class="timeline-event ps-1">
|
||||
<div class="timeline-header">
|
||||
<small class="text-primary text-uppercase">투표결과</small>
|
||||
<small class="text-primary text-uppercase">투표결과</small>
|
||||
</div>
|
||||
<h6 v-if="data" class="my-50">{{ data[0].LOCVOTCON }}</h6>
|
||||
<h6 v-if="randomResultNum" class="my-50">{{randomResultNum }}</h6>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
random..
|
||||
</button>
|
||||
<div class="d-grid w-100 mt-6" v-if="userStore.user.id === locvotreg">
|
||||
<button v-if="!isRandom && !randomResultNum" @click="randomList" class="btn btn-primary"><i class='bx bx-sync'></i></button>
|
||||
<button v-if="!isRandom && !randomResultNum" @click="randomList" class="btn btn-primary"><i class='bx bx-sync'></i></button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<div class="">
|
||||
<!-- 투표 작성 -->
|
||||
<WriteBtn @click="voteWrite" />
|
||||
|
||||
<!-- 투표마감/투표중 셀렉트 -->
|
||||
<div v-for="(item, index) in categoryList" @change="selectHandler"
|
||||
:key="index"
|
||||
@ -11,13 +12,15 @@
|
||||
:value="index" v-model="category">
|
||||
<label class="form-check-label" :for="'inlineRadio' + index">{{ item }}</label>
|
||||
</div>
|
||||
|
||||
<!-- 내가한 투표 보기 -->
|
||||
<div class="">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="defaultCheck1" v-model="ischeked" @change="changeCheck">
|
||||
<label class="form-check-label" for="defaultCheck1"> 내가 한 투표 </label>
|
||||
<input class="form-check-input" type="checkbox" value="" id="defaultCheck1" v-model="ischeked" @change="changeCheck">
|
||||
<label class="form-check-label" for="defaultCheck1"> 내가 한 투표 </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 투표리스트 -->
|
||||
<div v-if="voteListCardData.length == 0 " >투표가 없습니다.</div>
|
||||
<vote-list
|
||||
@ -41,8 +44,8 @@
|
||||
:currentPage="currentPage"
|
||||
@update:currentPage="handlePageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getCurrentInstance, onMounted, ref } from 'vue';
|
||||
|
||||
@ -1,88 +1,88 @@
|
||||
<template>
|
||||
<div class="container-xxl flex-grow-1 container-p-y">
|
||||
<div class="card mb-6">
|
||||
<div class="card-body">
|
||||
<div class="user-list-container">
|
||||
<ul class="timeline mb-1">
|
||||
<li class="timeline-item timeline-item-transparent">
|
||||
<span class="timeline-point timeline-point-info"></span>
|
||||
<div class="timeline-event">
|
||||
<div class="timeline-header mb-2">
|
||||
<h6 class="mb-0">투표 인원</h6>
|
||||
</div>
|
||||
<UserList @userListInfo="userSet" @user-list-update="handleUserListUpdate" class="mb-3" />
|
||||
<div v-if="UserListAlert" class="red">2명이상 선택해주세요 </div>
|
||||
<form-input
|
||||
title="제목"
|
||||
name="title"
|
||||
:is-essential="true"
|
||||
:is-alert="titleAlert"
|
||||
v-model="title"
|
||||
@keyup="ValidHandler('title')"
|
||||
/>
|
||||
<form-input
|
||||
title="종료날짜"
|
||||
name="endDate"
|
||||
type="date"
|
||||
:is-essential="true"
|
||||
:is-alert="endDateAlert"
|
||||
v-model="endDate"
|
||||
:min="today"
|
||||
@change="ValidHandlerendDate"
|
||||
/>
|
||||
<!-- 항목 입력 반복 -->
|
||||
<div v-for="(item, index) in itemList" :key="index">
|
||||
<form-input
|
||||
:title="'항목 ' + (index + 1)"
|
||||
:name="'content' + index"
|
||||
:is-essential="index < 2"
|
||||
:is-alert="contentAlerts[index]"
|
||||
v-model="item.content"
|
||||
@keyup="ValidHandler('content' + (index + 1))"
|
||||
:is-btn="true"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<delete-btn @click="removeItem(index)" :disabled="index < 2" />
|
||||
</template>
|
||||
</form-input>
|
||||
<div class="card-body">
|
||||
<div class="user-list-container">
|
||||
<ul class="timeline mb-1">
|
||||
<li class="timeline-item timeline-item-transparent">
|
||||
<span class="timeline-point timeline-point-info"></span>
|
||||
<div class="timeline-event">
|
||||
<div class="timeline-header mb-2">
|
||||
<h6 class="mb-0">투표 인원</h6>
|
||||
</div>
|
||||
<UserList @userListInfo="userSet" @user-list-update="handleUserListUpdate" class="mb-3" />
|
||||
<div v-if="UserListAlert" class="red">2명이상 선택해주세요 </div>
|
||||
<form-input
|
||||
title="제목"
|
||||
name="title"
|
||||
:is-essential="true"
|
||||
:is-alert="titleAlert"
|
||||
v-model="title"
|
||||
@keyup="ValidHandler('title')"
|
||||
/>
|
||||
<form-input
|
||||
title="종료날짜"
|
||||
name="endDate"
|
||||
type="date"
|
||||
:is-essential="true"
|
||||
:is-alert="endDateAlert"
|
||||
v-model="endDate"
|
||||
:min="today"
|
||||
@change="ValidHandlerendDate"
|
||||
/>
|
||||
<!-- 항목 입력 반복 -->
|
||||
<div v-for="(item, index) in itemList" :key="index">
|
||||
<form-input
|
||||
:title="'항목 ' + (index + 1)"
|
||||
:name="'content' + index"
|
||||
:is-essential="index < 2"
|
||||
:is-alert="contentAlerts[index]"
|
||||
v-model="item.content"
|
||||
@keyup="ValidHandler('content' + (index + 1))"
|
||||
:is-btn="true"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<delete-btn @click="removeItem(index)" :disabled="index < 2" />
|
||||
</template>
|
||||
</form-input>
|
||||
|
||||
<link-input v-model="item.url" class="mb-1"/>
|
||||
</div>
|
||||
<link-input v-model="item.url" class="mb-1"/>
|
||||
</div>
|
||||
|
||||
<plus-btn @click="addItem" :disabled="itemList.length >= 10" class="mb-3" />
|
||||
<div>
|
||||
<label class="list-group-item">
|
||||
<input
|
||||
class="form-check-input me-1"
|
||||
type="checkbox"
|
||||
id="addvoteitem"
|
||||
v-model="addvoteitem"
|
||||
/>
|
||||
항목 추가여부
|
||||
</label>
|
||||
<label class="list-group-item">
|
||||
<input
|
||||
class="form-check-input me-1"
|
||||
type="checkbox"
|
||||
id="addvotemulti"
|
||||
v-model="addvotemulti"
|
||||
/>
|
||||
다중투표 허용여부
|
||||
</label>
|
||||
</div>
|
||||
<plus-btn @click="addItem" :disabled="itemList.length >= 10" class="mb-3" />
|
||||
<div>
|
||||
<label class="list-group-item">
|
||||
<input
|
||||
class="form-check-input me-1"
|
||||
type="checkbox"
|
||||
id="addvoteitem"
|
||||
v-model="addvoteitem"
|
||||
/>
|
||||
항목 추가여부
|
||||
</label>
|
||||
<label class="list-group-item">
|
||||
<input
|
||||
class="form-check-input me-1"
|
||||
type="checkbox"
|
||||
id="addvotemulti"
|
||||
v-model="addvotemulti"
|
||||
/>
|
||||
다중투표 허용여부
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="mb-4 d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-info" @click="goList">
|
||||
<i class="bx bx-left-arrow-alt"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary ms-1" @click="saveValid">
|
||||
<i class="bx bx-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="mb-4 d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-info" @click="goList">
|
||||
<i class="bx bx-left-arrow-alt"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary ms-1" @click="saveValid">
|
||||
<i class="bx bx-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user