|
@@ -1,6 +1,6 @@
|
|
import { ref, reactive, onMounted } from "vue";
|
|
import { ref, reactive, onMounted } from "vue";
|
|
import { useDictStore } from "@/store/modules/useDictStore/index";
|
|
import { useDictStore } from "@/store/modules/useDictStore/index";
|
|
-import { getList, deleteProject } from "./useAxios.hook";
|
|
|
|
|
|
+import { getList, postUpdate, deleteProject } from "./useAxios.hook";
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
|
|
// 数据初始化
|
|
// 数据初始化
|
|
@@ -64,6 +64,7 @@ export const useDataListInit = () => {
|
|
const review_status = dictStore.dictData.review_status;
|
|
const review_status = dictStore.dictData.review_status;
|
|
const requirement_type = dictStore.dictData.requirement_type;
|
|
const requirement_type = dictStore.dictData.requirement_type;
|
|
|
|
|
|
|
|
+ console.log('review_status ===>', review_status)
|
|
|
|
|
|
const formFields = [
|
|
const formFields = [
|
|
{
|
|
{
|
|
@@ -170,9 +171,61 @@ export const useDataListInit = () => {
|
|
fetchList();
|
|
fetchList();
|
|
};
|
|
};
|
|
|
|
|
|
- const onUpdate = (row: any) => {
|
|
|
|
- updateInfo.value = row;
|
|
|
|
- updateVisible.value = true;
|
|
|
|
|
|
+ const onUpdate = async (row: any, isExamine: boolean) => {
|
|
|
|
+ if (isExamine) {
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
+ "请确认要通过名称为【" + row.patentName + "】的专利运营需求审核",
|
|
|
|
+ "提示信息",
|
|
|
|
+ {
|
|
|
|
+ confirmButtonText: "通过",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ .then(async () => {
|
|
|
|
+ const data = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ status: "1",
|
|
|
|
+ };
|
|
|
|
+ const res = (await postUpdate(data)) as unknown as any;
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "操作成功",
|
|
|
|
+ });
|
|
|
|
+ fetchList();
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "error",
|
|
|
|
+ message: "操作失败,请联系管理员",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "info",
|
|
|
|
+ message: "取消删除",
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ const data = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ status: "0",
|
|
|
|
+ };
|
|
|
|
+ const res = (await postUpdate(data)) as unknown as any;
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "操作成功",
|
|
|
|
+ });
|
|
|
|
+ fetchList();
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "error",
|
|
|
|
+ message: "操作失败,请联系管理员",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
const onFieldChange = (newTargetKeys: string | string[]) => {
|
|
const onFieldChange = (newTargetKeys: string | string[]) => {
|
|
@@ -206,7 +259,7 @@ export const useDataListInit = () => {
|
|
// 执行删除专利,记得加提示
|
|
// 执行删除专利,记得加提示
|
|
const onDelete = (row: any) => {
|
|
const onDelete = (row: any) => {
|
|
ElMessageBox.confirm(
|
|
ElMessageBox.confirm(
|
|
- "请确认要删除专利名称为【" + row.patentsName + "】的专利信息",
|
|
|
|
|
|
+ "请确认要删除专利名称为【" + row.patentName + "】的专利信息",
|
|
"提示信息",
|
|
"提示信息",
|
|
{
|
|
{
|
|
confirmButtonText: "确认",
|
|
confirmButtonText: "确认",
|