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