update
This commit is contained in:
@@ -1,16 +1,34 @@
|
||||
<script setup lang="ts">
|
||||
import {nextTick, ref, useTemplateRef} from "vue";
|
||||
<script setup>
|
||||
import {nextTick, ref, useTemplateRef, watch} from "vue";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const {limit} = defineProps({
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
}
|
||||
});
|
||||
const inputTagRef = useTemplateRef('inputTagRef');
|
||||
const modelValue = defineModel();
|
||||
const input = ref('');
|
||||
|
||||
watch(
|
||||
() => modelValue.value,
|
||||
(val) => {
|
||||
if (val) {
|
||||
if (val.length > limit) {
|
||||
val.length = limit;
|
||||
Message.warning(`最多可设置${limit}个话题`)
|
||||
}
|
||||
}
|
||||
},
|
||||
{deep: true}
|
||||
)
|
||||
|
||||
const changeInput = (e) => {
|
||||
if (e.match(/#(\S+?)(?=\s)/g)) {
|
||||
if (modelValue.value === void 0) {
|
||||
console.log('进来了')
|
||||
}
|
||||
console.log(modelValue.value)
|
||||
modelValue.value.push(...e.match(/#(\S+?)(?=\s)/g).map(tag => tag.slice(1)));
|
||||
input.value = null;
|
||||
nextTick(() => {
|
||||
|
||||
@@ -12,7 +12,7 @@ const {color, content} = defineProps({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-tooltip :content="content">
|
||||
<a-tooltip :content="content" v-if="content">
|
||||
<a-badge>
|
||||
<template v-slot:content>
|
||||
<icon-question-circle :style="{ verticalAlign: 'middle', color: 'rgb(var(--primary-6))' }"/>
|
||||
@@ -24,6 +24,10 @@ const {color, content} = defineProps({
|
||||
</a-tag>
|
||||
</a-badge>
|
||||
</a-tooltip>
|
||||
|
||||
<a-tag v-else :color="color" class="cursor-pointer">
|
||||
<slot></slot>
|
||||
</a-tag>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import {reactive, ref, watch} from "vue";
|
||||
import {nextTick, reactive, ref, watch} from "vue";
|
||||
import Api from "../../../../../api/index.js";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
@@ -40,6 +40,17 @@ watch(
|
||||
)
|
||||
|
||||
const success = async () => {
|
||||
if (
|
||||
form.real_price === null ||
|
||||
form.security_level === null ||
|
||||
form.time_level === null
|
||||
) {
|
||||
Message.warning('填写信息不能为空');
|
||||
nextTick(() => {
|
||||
visible.value = true;
|
||||
})
|
||||
return;
|
||||
}
|
||||
const {msg, code} = await Api.admin.passTask(form);
|
||||
if (code === 1) Message.success(msg);
|
||||
emits('success');
|
||||
|
||||
@@ -7,6 +7,7 @@ import TaskPassedReviewModal from "./components/TaskPassedReviewModal.vue";
|
||||
import RejectTaskModal from "./components/RejectTaskModal.vue";
|
||||
import TerminateTask from "../../../../components/TerminateTask/TerminateTask.js";
|
||||
import {toPath} from "../../../../utils/index.js";
|
||||
import TooltipTag from "../../../../components/TooltipTag/index.vue";
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -155,17 +156,24 @@ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
|
||||
<a-tag v-if="record.check_status===-1" color="red">{{ record.check_status_text }}</a-tag>
|
||||
</template>
|
||||
<template v-slot:status_text="{record}">
|
||||
<a-tag v-if="record.status===0 || record.status===2 || record.status===3" color="cyan">
|
||||
{{ record.status_text }}
|
||||
</a-tag>
|
||||
<a-tag v-if="record.status===1 || record.status === -2" color="orangered">{{
|
||||
record.status_text
|
||||
}}
|
||||
</a-tag>
|
||||
<a-tag v-if="record.status===-1" color="orange">{{ record.status_text }}</a-tag>
|
||||
<a-tag v-if="record.status===4" color="arcoblue">{{ record.status_text }}</a-tag>
|
||||
<a-tag v-if="record.status===-3" color="red">{{ record.status_text }}</a-tag>
|
||||
<a-tag v-if="record.status===5" color="green">{{ record.status_text }}</a-tag>
|
||||
<TooltipTag v-if="record.status === 0" color="cyan" :content="record.check_remark">待完善
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 1" color="red" :content="record.check_remark">审核中
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -1" color="red" :content="record.check_remark">未通过
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 2" color="magenta" :content="record.check_remark">请完善子任务
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 3" color="magenta" :content="record.check_remark">待付款
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 4" color="blue" :content="record.check_remark">投放中
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -2" color="orangered" :content="record.check_remark">暂停中
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -3" color="purple" :content="record.check_remark">终止
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 5" color="green" :content="record.check_remark">已完成
|
||||
</TooltipTag>
|
||||
</template>
|
||||
<template v-slot:action="{record}">
|
||||
<div class="flex items-center gap-[20px]">
|
||||
|
||||
@@ -34,6 +34,7 @@ const success = async () => {
|
||||
});
|
||||
Message.success(msg);
|
||||
Object.keys(form).forEach(key => form[key] = null);
|
||||
form.is_reply = 0;
|
||||
visible.value = false;
|
||||
emits('success');
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import UploadButton from "../../../components/upload/UploadButton.vue";
|
||||
import Api from "../../../api/index.js";
|
||||
import {v4} from "uuid";
|
||||
import MaterialSource from "./MaterialSource.vue";
|
||||
import {Message} from "@arco-design/web-vue";
|
||||
|
||||
const MaterialSourceRef = ref();
|
||||
const visible = ref(false);
|
||||
@@ -35,7 +34,7 @@ watch(
|
||||
if (val) {
|
||||
MaterialSourceRef.value.getMaterialList();
|
||||
targetList.length = 0;
|
||||
material.material_arr.forEach(v => uploadSuccess(v));
|
||||
material.material.forEach(v => uploadSuccess(v));
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -49,12 +48,7 @@ defineExpose({
|
||||
});
|
||||
|
||||
const success = async () => {
|
||||
const {msg} = await Api.merchant.editChildrenMaterial({
|
||||
id: material.id,
|
||||
image: targetList.map(v => v.image),
|
||||
});
|
||||
Message.success(msg);
|
||||
emits('success');
|
||||
emits('success', targetList.map(v => v.image));
|
||||
MaterialSourceRef.value.handleImage();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,6 +15,21 @@ const {form, index} = defineProps({
|
||||
}
|
||||
});
|
||||
const po = defineModel('po');
|
||||
|
||||
function range(start, end) {
|
||||
const result = [];
|
||||
for (let i = start; i < end; i++) {
|
||||
result.push(i);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
const getDisabledTime = (date) => {
|
||||
return {
|
||||
disabledHours: () => range(0, dayjs(form.start_time).hour()),
|
||||
disabledMinutes: () => range(0, dayjs(form.start_time).add(1, 'minute').minute()),
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -23,7 +38,8 @@ const po = defineModel('po');
|
||||
:auto-label-width="true">
|
||||
<a-form-item label="回填时间">
|
||||
<x-time-picker
|
||||
:disabledDate="(current) => dayjs(current).isBefore(dayjs(form.start_time))"
|
||||
:disabledDate="(current) => dayjs(current).add(1, 'day').isBefore(dayjs(form.start_time))"
|
||||
:disabledTime="getDisabledTime"
|
||||
v-model:start="po.start_time"
|
||||
v-model:end="po.end_time">
|
||||
</x-time-picker>
|
||||
|
||||
@@ -19,14 +19,19 @@ const visible = ref(false);
|
||||
const detail = reactive([]);
|
||||
const activeKey = ref(0);
|
||||
|
||||
const getData = async () => {
|
||||
const getData = async (update) => {
|
||||
Api.merchant.getTaskChildrenInfo(task.id).then(({data}) => {
|
||||
if (update) {
|
||||
detail.forEach((v, index) => {
|
||||
v.comment = data[index].comment;
|
||||
});
|
||||
} else {
|
||||
detail.length = 0;
|
||||
detail.push(...data.map(v => ({
|
||||
...v,
|
||||
tags: v.tags_arr
|
||||
})));
|
||||
console.log('我看看我看看', data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -86,34 +91,38 @@ const update = async () => {
|
||||
<a-tag v-if="task.status === 5" color="green">已结算</a-tag>
|
||||
<a-tag v-if="task.status === 6" color="arcoblue">已终止</a-tag>
|
||||
</a-form-item>
|
||||
<a-form-item label="标题">
|
||||
<a-input v-model:model-value="item.title" :max-length="20" allow-clear
|
||||
show-word-limit></a-input>
|
||||
<a-form-item label="标题" v-if="item.material_type.title_limit>0">
|
||||
<a-input
|
||||
v-model:model-value="item.title"
|
||||
:max-length="item.material_type.title_limit"
|
||||
allow-clear
|
||||
show-word-limit>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="正文">
|
||||
<a-form-item label="正文" v-if="item.material_type.desc_limit>0">
|
||||
<a-textarea
|
||||
:max-length="1000"
|
||||
:max-length="item.material_type.desc_limit"
|
||||
show-word-limit
|
||||
v-model:model-value="item.content">
|
||||
</a-textarea>
|
||||
</a-form-item>
|
||||
<a-form-item label="话题">
|
||||
<Talk v-model:model-value="item.tags"></Talk>
|
||||
<a-form-item label="话题" v-if="item.material_type.tags_limit>0">
|
||||
<Talk v-model:model-value="item.tags" :limit="item.material_type.tags_limit"></Talk>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="素材">
|
||||
<div class="flex flex-wrap gap-[16px]">
|
||||
<x-image
|
||||
v-for="(v, index) in item.material_arr"
|
||||
:hide-delete="true"
|
||||
v-for="(v, index) in item.material"
|
||||
@delete="item.material.splice(index, 1)"
|
||||
:key="index"
|
||||
width="60px"
|
||||
height="60px"
|
||||
:src="v">
|
||||
</x-image>
|
||||
<add-material
|
||||
@success="val => item.material = val"
|
||||
ref="AddMaterialRef"
|
||||
@success="getData"
|
||||
:id="task.task_id"
|
||||
:material="item">
|
||||
<div
|
||||
@@ -128,10 +137,10 @@ const update = async () => {
|
||||
<a-form-item label="评论区内容" v-if="task.is_comment === 1">
|
||||
<div class="flex-grow">
|
||||
<div v-if="item.comment.length > 0" class="flex flex-col gap-[8px] w-full mb-[12px]">
|
||||
<comment :data="item.comment" @success="getData"></comment>
|
||||
<comment :data="item.comment" @success="getData(true)"></comment>
|
||||
</div>
|
||||
<add-comment
|
||||
@success="getData"
|
||||
@success="getData(true)"
|
||||
:material="task"
|
||||
:item="item">
|
||||
<a-button>
|
||||
|
||||
@@ -210,7 +210,7 @@ const passTask = async (id, task_backfill_id) => {
|
||||
<template v-slot:action2="{record}">
|
||||
<div class="flex gap-[16px] justify-center items-center">
|
||||
<PreviewTaskMaterialModal title="查看素材" :task="record" @success="fetchData">
|
||||
<a-link :hoverable="false" :disabled="record.check_status === 1">查看素材</a-link>
|
||||
<a-link :hoverable="false">查看素材</a-link>
|
||||
</PreviewTaskMaterialModal>
|
||||
<a-dropdown>
|
||||
<a-link :hoverable="false">
|
||||
|
||||
@@ -206,15 +206,24 @@ const viewMiniTask = (record) => {
|
||||
@page-change="(e) => pagination.current = e"
|
||||
:pagination="pagination">
|
||||
<template v-slot:status="{record}">
|
||||
<TooltipTag v-if="record.status === 0" color="cyan">待完善</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 1" color="red">审核中</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -1" color="red">未通过</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 2" color="magenta">请完善子任务</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 3" color="magenta">待付款</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 4" color="blue">投放中</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -2" color="orangered">暂停中</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -3" color="purple">终止</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 5" color="green">已完成</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 0" color="cyan" :content="record.check_remark">待完善
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 1" color="red" :content="record.check_remark">审核中
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -1" color="red" :content="record.check_remark">未通过
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 2" color="magenta" :content="record.check_remark">请完善子任务
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 3" color="magenta" :content="record.check_remark">待付款
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 4" color="blue" :content="record.check_remark">投放中
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -2" color="orangered" :content="record.check_remark">暂停中
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === -3" color="purple" :content="record.check_remark">终止
|
||||
</TooltipTag>
|
||||
<TooltipTag v-if="record.status === 5" color="green" :content="record.check_remark">已完成
|
||||
</TooltipTag>
|
||||
</template>
|
||||
<template v-slot:start="{record}">
|
||||
<a-switch
|
||||
|
||||
Reference in New Issue
Block a user