update
This commit is contained in:
@@ -1,28 +1,38 @@
|
||||
<script setup>
|
||||
import Api from "../../../../../api/index.js";
|
||||
import XSelect from "../../../../../components/XSelect/index.vue";
|
||||
import FormTitle from "../../../../../components/FormTitle/index.vue";
|
||||
import {reactive} from "vue";
|
||||
import Backfill from "./Backfill.vue";
|
||||
import {v4} from "uuid";
|
||||
import XTimePicker from "../../../../../components/XTimePicker/XTimePicker.vue";
|
||||
|
||||
const INDEX = ['一', '二', '三'];
|
||||
const htList = reactive([]);
|
||||
htList.push({
|
||||
id: v4(),
|
||||
time: null,
|
||||
content: null,
|
||||
const {form} = defineProps({
|
||||
form: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
const emits = defineEmits(['success']);
|
||||
const INDEX = ['一', '二', '三'];
|
||||
const emits = defineEmits(['success', 'prev']);
|
||||
const po = reactive({
|
||||
name: null,
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
is_other: 0,
|
||||
backfill: []
|
||||
});
|
||||
|
||||
po.backfill.push({
|
||||
id: v4(),
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
content_id: null
|
||||
});
|
||||
|
||||
const addHT = () => {
|
||||
htList.push({
|
||||
po.backfill.push({
|
||||
id: v4(),
|
||||
time: null,
|
||||
content: null,
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
content_id: null
|
||||
});
|
||||
}
|
||||
|
||||
@@ -39,10 +49,10 @@ const success = () => {
|
||||
class="mt-[30px]"
|
||||
:model="po"
|
||||
label-align="right"
|
||||
:label-col-props="{span: 3}"
|
||||
:label-col-props="{span: 4}"
|
||||
:wrapper-col-props="{span: 12, offset: 1}">
|
||||
<a-form-item label="任务可接时间段" extra="达人可在此时段内接受任务,超出将无法领取任务">
|
||||
<a-time-picker type="time-range"></a-time-picker>
|
||||
<x-time-picker v-model:start="po.start_time" v-model:end="po.end_time"></x-time-picker>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item extra="*达人未回传,但不能确定素材是否被发布">
|
||||
@@ -53,18 +63,18 @@ const success = () => {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<a-radio-group v-model:model-value="po.name" direction="vertical">
|
||||
<a-radio value="0">该子任务不可被其他达人可领取</a-radio>
|
||||
<a-radio value="1">该子任务可被其他达人可领取</a-radio>
|
||||
<a-radio-group v-model:model-value="po.is_other" direction="vertical">
|
||||
<a-radio :value="0">该子任务不可被其他达人可领取</a-radio>
|
||||
<a-radio :value="1">该子任务可被其他达人可领取</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
|
||||
|
||||
<a-form-item
|
||||
v-for="(item, index) in htList"
|
||||
v-for="(item, index) in po.backfill"
|
||||
:key="item.id"
|
||||
:label="`第${INDEX[index]}次回填`">
|
||||
<div class="flex flex-col gap-[20px]">
|
||||
<Backfill></Backfill>
|
||||
<Backfill :form="form" v-model:po="po.backfill[index]"></Backfill>
|
||||
|
||||
<div class="flex gap-[8px]">
|
||||
<a-button type="outline">
|
||||
@@ -74,8 +84,8 @@ const success = () => {
|
||||
查看指引
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="htList.length > 1"
|
||||
@click="htList.splice(index, 1)"
|
||||
v-if="po.backfill.length > 1"
|
||||
@click="po.backfill.splice(index, 1)"
|
||||
type="outline"
|
||||
status="danger">
|
||||
<template #icon>
|
||||
@@ -84,7 +94,7 @@ const success = () => {
|
||||
删除
|
||||
</a-button>
|
||||
<a-button
|
||||
v-if="htList.length < 3 && htList.length === index + 1"
|
||||
v-if="po.backfill.length < 3 && po.backfill.length === index + 1"
|
||||
@click="addHT"
|
||||
type="outline">
|
||||
<template #icon>
|
||||
@@ -97,6 +107,7 @@ const success = () => {
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item class="mt-[30px]">
|
||||
<a-button class="mr-[24px]" @click="emits('prev')">上一步</a-button>
|
||||
<a-button type="primary" @click="success">下一步</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
Reference in New Issue
Block a user