提交 2b511691 authored 作者: 赵世杰's avatar 赵世杰

1

上级 cce14ef1
...@@ -64,3 +64,11 @@ export function industryListAll(query) { ...@@ -64,3 +64,11 @@ export function industryListAll(query) {
params: query params: query
}) })
} }
// 上下架
export function recruitStatus(query) {
return request({
url: '/recruit/u/status',
method: 'post',
data: query
})
}
\ No newline at end of file
...@@ -87,11 +87,18 @@ ...@@ -87,11 +87,18 @@
{{ row.province }} {{ row.city }} {{ row.region }} {{ row.address }} {{ row.province }} {{ row.city }} {{ row.region }} {{ row.address }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="status">
<template #default="{row}">
{{ row.status == 'up' ? '上架' : '下架' }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime" align="center" width="160"/> <el-table-column label="创建时间" prop="createTime" align="center" width="160"/>
<el-table-column label="操作" width="120" align="center" class-name="small-padding fixed-width" > <el-table-column label="操作" width="230" align="center" class-name="small-padding fixed-width" >
<template #default="{row}"> <template #default="{row}">
<el-button link type="primary" icon="Edit" @click="visibleOpenpay = true; detailInfo = row">编辑</el-button> <el-button v-if="row.status == 'up'" link type="primary" icon="Edit" @click="toggleStatus(row)">下架</el-button>
<el-button link type="primary" icon="Delete" @click="del(row)">删除</el-button> <el-button v-if="row.status == 'down'" link type="primary" icon="Edit" @click="toggleStatus(row)">上架</el-button>
<el-button v-if="row.status == 'down'" link type="primary" icon="Edit" @click="visibleOpenpay = true; detailInfo = row">编辑</el-button>
<el-button v-if="row.status == 'down'" link type="primary" icon="Delete" @click="del(row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -114,7 +121,7 @@ ...@@ -114,7 +121,7 @@
</template> </template>
<script setup> <script setup>
import { recruitList,recruitDel,recruitTypeAll,experienceAll,qualificationAll,orgListAll,industryListAll } from "@/api/recruit"; import { recruitList,recruitDel,recruitTypeAll,experienceAll,qualificationAll,orgListAll,industryListAll,recruitStatus } from "@/api/recruit";
import { ref } from "vue"; import { ref } from "vue";
import Add from "./add.vue"; import Add from "./add.vue";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -150,7 +157,15 @@ experienceAll().then(res => { ...@@ -150,7 +157,15 @@ experienceAll().then(res => {
qualificationAll().then(res => { qualificationAll().then(res => {
qualificationList.value = res.data.list qualificationList.value = res.data.list
}) })
function toggleStatus(row) {
const text = row.status == 'up' ? '下架' : '上架'
proxy.$modal.confirm(`确定要${text}吗?`).then(function() {
return recruitStatus({id: row.id});
}).then(() => {
getList();
proxy.$modal.msgSuccess(`${text}成功`);
}).catch(() => {});
}
/** 查询列表 */ /** 查询列表 */
function getList() { function getList() {
const form = { ...queryParams.value } const form = { ...queryParams.value }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论