|
@@ -5,53 +5,60 @@
|
|
|
<ul class="demand-list">
|
|
<ul class="demand-list">
|
|
|
<li v-for="(item, index) in list" :key="index">
|
|
<li v-for="(item, index) in list" :key="index">
|
|
|
<div class="flex-center-between">
|
|
<div class="flex-center-between">
|
|
|
- <div class="title">{{ item.title }}</div>
|
|
|
|
|
|
|
+ <div class="flex-align-center">
|
|
|
|
|
+ <div v-if="form.activeName == 1" class="tag">报名中</div>
|
|
|
|
|
+ <div class="title">{{ item.title }}</div>
|
|
|
|
|
+ </div>
|
|
|
<div class="price">¥{{ item.budgetMin }}-{{ item.budgetMax }}</div>
|
|
<div class="price">¥{{ item.budgetMin }}-{{ item.budgetMax }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex-align-center content">
|
|
<div class="flex-align-center content">
|
|
|
<div class="flex-align-center">
|
|
<div class="flex-align-center">
|
|
|
- <el-button type="primary" size="small" plain>{{ item.categoryName2 }}</el-button>
|
|
|
|
|
|
|
+ <!-- <el-button type="primary" size="small" plain>{{ item.categoryName1 }}</el-button> -->
|
|
|
|
|
+ <!-- <el-button type="primary" size="small" plain>{{ item.categoryName2 }}</el-button> -->
|
|
|
<el-button type="primary" size="small" plain>{{ item.categoryName3 }}</el-button>
|
|
<el-button type="primary" size="small" plain>{{ item.categoryName3 }}</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<ul class="flex-align-center list">
|
|
<ul class="flex-align-center list">
|
|
|
<div class="li">
|
|
<div class="li">
|
|
|
<img src="/src/assets/imgs/yuangong.png" alt="">
|
|
<img src="/src/assets/imgs/yuangong.png" alt="">
|
|
|
- <div class="">{{ item.publishCount || 0}}{{ $t('common.renbaoming') }}</div>
|
|
|
|
|
|
|
+ <div class="">{{ item.questApplyCount || 0 }}{{ $t('common.renbaoming') }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="li">
|
|
<div class="li">
|
|
|
<img src="/src/assets/imgs/rili.png" alt="">
|
|
<img src="/src/assets/imgs/rili.png" alt="">
|
|
|
- <div class="">{{ $t('common.signUpDeadline') }}:{{ item.publishTime }}</div>
|
|
|
|
|
|
|
+ <div class="">{{ $t('common.signUpDeadline') }}:{{ item.deadline }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</ul>
|
|
</ul>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="description">{{ item.requirements }}</div>
|
|
<div class="description">{{ item.requirements }}</div>
|
|
|
<div class="info">
|
|
<div class="info">
|
|
|
<div class="info-left">
|
|
<div class="info-left">
|
|
|
- <el-avatar :size="30" :src="appStore.avatarDefault" />
|
|
|
|
|
|
|
+ <el-avatar :size="30" :src="item.userAvatar || appStore.avatarDefault" />
|
|
|
<div class="name">{{ item.nickName }}</div>
|
|
<div class="name">{{ item.nickName }}</div>
|
|
|
<div class="date">{{ item.publishTime }} {{ $t('common.publish') }}</div>
|
|
<div class="date">{{ item.publishTime }} {{ $t('common.publish') }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="info-right flex-align-center">
|
|
<div class="info-right flex-align-center">
|
|
|
<template v-if="form.activeName === 0">
|
|
<template v-if="form.activeName === 0">
|
|
|
- <div class="btn" @click="changeItem(item,index,0)">
|
|
|
|
|
|
|
+ <div class="btn" @click="changeItem(item, index, 0)">
|
|
|
<img src="/src/assets/imgs/my/jilu@2x.png" alt="">
|
|
<img src="/src/assets/imgs/my/jilu@2x.png" alt="">
|
|
|
<div>{{ $t('personalCenter.viewSignUpRecord') }}</div>
|
|
<div>{{ $t('personalCenter.viewSignUpRecord') }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="btn">
|
|
|
|
|
- <img src="/src/assets/imgs/my/bianji@2x.png" alt="">
|
|
|
|
|
- <div>{{ $t('common.edit') }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="btn">
|
|
|
|
|
- <img src="/src/assets/imgs/my/guanbi@2x.png" alt="">
|
|
|
|
|
- <div class="red">{{ $t('personalCenter.endActivity') }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="btn">
|
|
|
|
|
|
|
+ <template v-if="item.applyStatus == 1">
|
|
|
|
|
+ <div class="btn" @click="changeItem(item, index, 1)">
|
|
|
|
|
+ <img src="/src/assets/imgs/my/bianji@2x.png" alt="">
|
|
|
|
|
+ <div>{{ $t('common.edit') }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="btn" @click="changeItem(item, index, 2)">
|
|
|
|
|
+ <img src="/src/assets/imgs/my/guanbi@2x.png" alt="">
|
|
|
|
|
+ <div class="red">{{ $t('personalCenter.endActivity') }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="btn" @click="changeItem(item, index, 3)">
|
|
|
<img src="/src/assets/imgs/my/shanchu@2x.png" alt="">
|
|
<img src="/src/assets/imgs/my/shanchu@2x.png" alt="">
|
|
|
<div class="red">{{ $t('common.delete') }}</div>
|
|
<div class="red">{{ $t('common.delete') }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <div class="btn" v-else>
|
|
|
|
|
|
|
+ <div class="btn" v-else @click="changeItem(item, index, 4)">
|
|
|
<img src="/src/assets/imgs/my/quxiao@2x.png" alt="">
|
|
<img src="/src/assets/imgs/my/quxiao@2x.png" alt="">
|
|
|
<div class="red">{{ $t('personalCenter.cancelSignUp') }}</div>
|
|
<div class="red">{{ $t('personalCenter.cancelSignUp') }}</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -62,10 +69,11 @@
|
|
|
</ul>
|
|
</ul>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
- <template v-if="list.length">
|
|
|
|
|
- <Pagination :total="form.total" :page-size="form.pageSize" :current-page="form.pageNum" @page-change="handlePageChange" />
|
|
|
|
|
- </template>
|
|
|
|
|
- <el-empty v-else :description="$t('common.empty')" />
|
|
|
|
|
|
|
+ <template v-if="list.length">
|
|
|
|
|
+ <Pagination :total="form.total" :page-size="form.pageSize" :current-page="form.pageNum"
|
|
|
|
|
+ @page-change="handlePageChange" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <el-empty v-else :description="$t('common.empty')" />
|
|
|
|
|
|
|
|
<el-dialog v-model="dialogVisible" :title="$t('personalCenter.viewSignUpRecord')" width="1138">
|
|
<el-dialog v-model="dialogVisible" :title="$t('personalCenter.viewSignUpRecord')" width="1138">
|
|
|
<div class="detail">
|
|
<div class="detail">
|
|
@@ -137,14 +145,29 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { ref,onMounted } from 'vue'
|
|
|
|
|
|
|
+import { ref, onMounted } from 'vue'
|
|
|
import { useAppStore } from '@/pinia/appStore'
|
|
import { useAppStore } from '@/pinia/appStore'
|
|
|
import type { TabsPaneContext } from 'element-plus'
|
|
import type { TabsPaneContext } from 'element-plus'
|
|
|
import Pagination from '@/components/Pagination.vue'
|
|
import Pagination from '@/components/Pagination.vue'
|
|
|
|
|
|
|
|
-import { getWorkflowApplyByUserId,userQuestList,appliList } from '@/api/my.js'
|
|
|
|
|
|
|
+import { getWorkflowApplyByUserId, userQuestList, appliList, updateQuestStatus, delectQuest, cancelApply } from '@/api/my.js'
|
|
|
|
|
+
|
|
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
+
|
|
|
|
|
+import DGTMessage from '@/utils/message'
|
|
|
|
|
+
|
|
|
|
|
+import { ElMessageBox } from 'element-plus'
|
|
|
|
|
+
|
|
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
|
|
+
|
|
|
|
|
+const { t } = useI18n()
|
|
|
|
|
|
|
|
const appStore = useAppStore();
|
|
const appStore = useAppStore();
|
|
|
|
|
+
|
|
|
|
|
+const route = useRoute()
|
|
|
|
|
+
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
+
|
|
|
const tabs = ref([
|
|
const tabs = ref([
|
|
|
{ label: 'personalCenter.publishDemandRecord', name: 0 },
|
|
{ label: 'personalCenter.publishDemandRecord', name: 0 },
|
|
|
{ label: 'personalCenter.myDemandRecord', name: 1 }
|
|
{ label: 'personalCenter.myDemandRecord', name: 1 }
|
|
@@ -154,18 +177,86 @@ const dialogVisible = ref(false)
|
|
|
|
|
|
|
|
const list = ref([])
|
|
const list = ref([])
|
|
|
const form = ref({
|
|
const form = ref({
|
|
|
- pageNum:1,
|
|
|
|
|
- pageSize:10,
|
|
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
total: 0,
|
|
total: 0,
|
|
|
- activeName:0
|
|
|
|
|
|
|
+ activeName: 0
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const changeItem = async (item,index,type) =>{
|
|
|
|
|
|
|
+const itemData = ref({})
|
|
|
|
|
+
|
|
|
|
|
+const changeItem = async (item, index, type) => {
|
|
|
|
|
+ itemData.value = item;
|
|
|
if (type == 0) {
|
|
if (type == 0) {
|
|
|
-
|
|
|
|
|
- let res = await appliList({questId:item.questId})
|
|
|
|
|
|
|
+
|
|
|
|
|
+ let res = await appliList({ questId: item.questId })
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
dialogVisible.value = true;
|
|
dialogVisible.value = true;
|
|
|
|
|
+ } else if (type == 1) {
|
|
|
|
|
+ router.push({ path: `/workflow-trade/workflow-trade-add`, query: { id: item.questId } });
|
|
|
|
|
+ } else if (type == 2) {
|
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
|
+ 'proxy will permanently delete the file. Continue?',
|
|
|
|
|
+ 'Warning',
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: 'OK',
|
|
|
|
|
+ cancelButtonText: 'Cancel',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(async () => {
|
|
|
|
|
+ let res = await updateQuestStatus({
|
|
|
|
|
+ questId: item.questId
|
|
|
|
|
+ })
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ getList()
|
|
|
|
|
+ DGTMessage.success(`${t('common.success')}`)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (type == 3) {
|
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
|
+ 'proxy will permanently delete the file. Continue?',
|
|
|
|
|
+ 'Warning',
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: 'OK',
|
|
|
|
|
+ cancelButtonText: 'Cancel',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(async () => {
|
|
|
|
|
+ let res = await delectQuest(item.questId)
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ getList()
|
|
|
|
|
+ DGTMessage.success(`${t('common.delete')}${t('common.success')}`)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (type == 4) {
|
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
|
+ 'proxy will permanently delete the file. Continue?',
|
|
|
|
|
+ 'Warning',
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: 'OK',
|
|
|
|
|
+ cancelButtonText: 'Cancel',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(async () => {
|
|
|
|
|
+ let res = await cancelApply(item.id)
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ getList()
|
|
|
|
|
+ DGTMessage.success(`${t('common.cancel')}${t('common.success')}`)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -177,20 +268,20 @@ const handleClick = (tab: TabsPaneContext) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 获取列表
|
|
// 获取列表
|
|
|
-const getList = async () =>{
|
|
|
|
|
|
|
+const getList = async () => {
|
|
|
let res = await (form.value.activeName === 0 ? userQuestList(form.value) : getWorkflowApplyByUserId(form.value))
|
|
let res = await (form.value.activeName === 0 ? userQuestList(form.value) : getWorkflowApplyByUserId(form.value))
|
|
|
- console.log(res.rows)
|
|
|
|
|
|
|
+
|
|
|
list.value = res.rows || [];
|
|
list.value = res.rows || [];
|
|
|
form.value.total = res.total;
|
|
form.value.total = res.total;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const handlePageChange = (page) =>{
|
|
|
|
|
|
|
+const handlePageChange = (page) => {
|
|
|
list.value = []
|
|
list.value = []
|
|
|
form.value.pageNum = page;
|
|
form.value.pageNum = page;
|
|
|
getList()
|
|
getList()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-onMounted(()=>{
|
|
|
|
|
|
|
+onMounted(() => {
|
|
|
getList()
|
|
getList()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -221,6 +312,16 @@ onMounted(()=>{
|
|
|
color: #333333;
|
|
color: #333333;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .tag {
|
|
|
|
|
+ padding: 0 12px;
|
|
|
|
|
+ line-height: 30px;
|
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ background: #2D71FF;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ margin-right: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
.description {
|
|
.description {
|