需求省市区
This commit is contained in:
@ -19,7 +19,8 @@
|
||||
>
|
||||
<el-radio-button :label="0">待受理</el-radio-button>
|
||||
<el-radio-button :label="1">已受理</el-radio-button>
|
||||
<el-radio-button :label="2">已结束</el-radio-button>
|
||||
<el-radio-button :label="2">已驳回</el-radio-button>
|
||||
<el-radio-button :label="4">已结束</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" style="margin-top: 20px">
|
||||
@ -43,13 +44,13 @@
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="queryParams.type == 2"
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
@click="handleDelete(row.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -57,7 +58,7 @@
|
||||
size="small"
|
||||
type="text"
|
||||
icon="Close"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
@click="handleDelete(row.id)"
|
||||
>取消发布</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -65,9 +66,16 @@
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="handleEdit(scope.row.id)"
|
||||
@click="handleEdit(row.id)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="text"
|
||||
icon="View"
|
||||
@click="complete(row.id)"
|
||||
>完成</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -84,6 +92,8 @@
|
||||
|
||||
<script setup>
|
||||
import { demandList } from "@/api/admin/enterprise";
|
||||
import { updateDemand } from "@/api/admin/enterprise/demand";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { onActivated } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
@ -151,20 +161,31 @@ function resetQuery() {
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(id) {
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除订单号为"' + id + '"的数据项?')
|
||||
ElMessageBox.confirm('是否确认删除订单号为"' + id + '"的数据项?')
|
||||
.then(function () {
|
||||
return demandDelete(postIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
function handleEdit(id) {
|
||||
router.push({ path: "./releaseService", query: { id } });
|
||||
}
|
||||
|
||||
// 修改为完成状态
|
||||
const complete = (id) => {
|
||||
ElMessageBox.confirm(`是否确认结束编号为${id}的数据项?`)
|
||||
.then(async () => {
|
||||
await updateDemand({ id, status: 4 });
|
||||
getList();
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
getList();
|
||||
onActivated(() => {
|
||||
getList();
|
||||
|
Reference in New Issue
Block a user