This commit is contained in:
quantulr
2022-10-19 00:22:39 +08:00
parent e2da1fd45b
commit 88e3b00298
44 changed files with 1827 additions and 1324 deletions

View File

@ -53,7 +53,7 @@
>
<template #default="{ row }">
<router-link
:to="{ path: './released', query: { id: row.id } }"
:to="{ path: './releaseTechnology', query: { id: row.id } }"
v-if="queryParams.status == 0"
>
<el-button size="small" type="text" icon="Edit">编辑</el-button>
@ -64,7 +64,7 @@
size="small"
type="text"
icon="Delete"
@click="handleDelete(scope.row.id)"
@click="handleDelete(row.id)"
>删除</el-button
>
<el-button
@ -72,7 +72,7 @@
size="small"
type="text"
icon="View"
@click="handleResults(scope.row.id)"
@click="handleResults(row.id)"
>查看匹配结果</el-button
>
<el-button
@ -97,7 +97,10 @@
</template>
<script setup name="technologyDemand">
import { technologyDemandList } from "@/api/admin/enterprise";
import {
technologyDemandList,
deleteTechnologyDemand,
} from "@/api/admin/enterprise/demand";
import { ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router";
@ -167,13 +170,16 @@ function handleQuery() {
function handleDelete(id) {
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的需求项?')
.then(function () {
return achievementDelete({ id });
console.log("delete");
return deleteTechnologyDemand(id);
})
.then(() => {
getList();
ElMessage.success("删除成功");
})
.catch(() => {});
.catch((err) => {
console.log(err);
});
}
function handleShelf(row) {
let text = row.shelf_status == 2 ? "上架" : "下架";