mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 06:16:46 +08:00
取消默认阶段以及题干问题
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
<span>创建投票题干:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<CreateVote v-model:options="formData.voteStemDtoList">
|
||||
<CreateVote v-model:options="formData.voteStemDtoList" :list="formData.voteStemDtoList">
|
||||
<button class="xkbtn">
|
||||
{{ formData.voteStemDtoList.length ? "编辑" : "创建" }}投票题干
|
||||
</button>
|
||||
|
||||
@@ -71,28 +71,58 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineEmits, defineProps, ref} from "vue";
|
||||
import {defineEmits, defineProps, ref, watch} from "vue";
|
||||
import VoteQuestion from "./VoteQuestion.vue";
|
||||
|
||||
defineProps({
|
||||
options: []
|
||||
const prop = defineProps({
|
||||
options: [],
|
||||
list: []
|
||||
})
|
||||
const emit = defineEmits({})
|
||||
const formData = ref({list: []})
|
||||
const formData = ref({list: [{}]})
|
||||
const initData = ref({list: [{}]})
|
||||
|
||||
console.log(prop.options.length);
|
||||
|
||||
const visible = ref(false)
|
||||
|
||||
function openDrawer() {
|
||||
|
||||
if (prop.options.length > 0) {
|
||||
|
||||
for(let i in initData.value) {
|
||||
console.log(formData.value[i])
|
||||
if (initData.value[i].valueSingle != formData.value[i].valueSingle) {
|
||||
console.log('不等于')
|
||||
formData.value[i].valueSingle = initData.value[i].valueSingle
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
formData.value.list = []
|
||||
setTimeout(() =>{
|
||||
formData.value.list = [{}]
|
||||
}, 100)
|
||||
}
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
watch(formData.value, () => {
|
||||
console.log('111',formData.value)
|
||||
})
|
||||
|
||||
const closeDrawer = () => {
|
||||
console.log('formData',formData.value)
|
||||
// formData.value = JSON.parse(JSON.stringify(initData.value));
|
||||
visible.value = false
|
||||
};
|
||||
|
||||
async function confirm() {
|
||||
console.log('confirm');
|
||||
initData.value = JSON.parse(JSON.stringify(formData.value));
|
||||
emit('update:options', formData.value.list)
|
||||
closeDrawer()
|
||||
// closeDrawer()
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
|
||||
@@ -62,6 +62,7 @@ const emit = defineEmits({})
|
||||
const formData = ref({optionDetailList: []})
|
||||
|
||||
watch(formData.value, () => {
|
||||
console.log(formData.value)
|
||||
emit('update:item', formData.value)
|
||||
})
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
><div style="display: flex">
|
||||
<img class="img2" src="../../assets/images/leveladd/back.png" />
|
||||
<div class="return">返回</div>
|
||||
</div></router-link
|
||||
</div>
|
||||
</router-link
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -332,7 +333,7 @@
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-tab-pane>
|
||||
<!--
|
||||
|
||||
<a-tab-pane key="3" tab="项目积分">
|
||||
<div class="split"></div>
|
||||
<div class="projectscore">
|
||||
@@ -478,7 +479,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
-->
|
||||
|
||||
|
||||
<a-tab-pane key="4" tab="设置">
|
||||
<div class="split"></div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>1
|
||||
<template>
|
||||
<div class="taskadd">
|
||||
<div style="display: flex">
|
||||
<div class="left clearfix">
|
||||
@@ -14,8 +14,8 @@
|
||||
</div>
|
||||
<div class="maincon" style="background-color: #fff">
|
||||
<Draggable v-model="projectInfo.stageList" chosenClass="chosen" ghostClass="ghost" forceFallback="true"
|
||||
group="stage" animation="500">
|
||||
<template #item="{ element,index }">
|
||||
group="stage" animation="500" v-if="JSON.stringify(projectInfo.stageList[0].taskDraftDtoList[0]) != '{}'">
|
||||
<template #item="{ element,index }" >
|
||||
<div class="items" v-if="element.id !=='0' && !element.deleted"
|
||||
:class="activeIndex === index ? 'active' : ''"
|
||||
@click="changeStageIndex(index)">
|
||||
|
||||
Reference in New Issue
Block a user