zhouwenxuan
2023-12-05 93eb6650f02a734e91584c7cacad6aea8fcf6a31
src/views/safetyReview/institution/institution.vue
@@ -53,6 +53,7 @@
import {ElMessage, ElMessageBox} from "element-plus";
import institutionDialog from "./components/viewInstitution.vue"
import {changeInsitutionPublic, getInsitutionList} from "@/api/backManage/insitution";
import {changeStatus} from "@/api/sysUsers";
const { proxy } = getCurrentInstance();
const loading = ref(false);
const inRef = ref();
@@ -101,20 +102,30 @@
}
const publicity = async (val) => {
    const param = {
        id: val.id,
        publication: val.publication ===0 ? 1: 0
    }
    const res = await changeInsitutionPublic(param);
    if(res.code === 200){
        ElMessage({
            type: 'success',
            message: '成功'
        });
        getList();
    }else{
        ElMessage.warning(res.message)
    }
    ElMessageBox.confirm(
        '确定修改该机构公示状态?',
        '提示',
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
        })
        .then( async() => {
            const param = {
                id: val.id,
                publication: val.publication ===0 ? 1: 0
            }
            const res = await changeInsitutionPublic(param);
            if(res.code === 200){
                ElMessage({
                    type: 'success',
                    message: '成功'
                });
                getList()
            }else{
                ElMessage.warning(res.message)
            }
        })
}
const handleDelete = (val) => {