zhouwenxuan
2023-12-13 c71dc4c3abb3fcbbafc68b34e2bcb98cf0f8b346
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();
@@ -78,7 +79,9 @@
        dataList.value = res.data.list.map(item => {
            return {
                ...item,
                publicMsg: item.publication ===0 ? '取消公示' : "公示"
                publicMsg: item.publication ===0 ? '取消公示' : "公示",
                issueDate: item.issueDate.substring(0,10),
                validDate: item.validDate.substring(0,10)
            }
        })
        total.value = res.data.total
@@ -88,6 +91,7 @@
    loading.value = false;
}
const handleSizeChange = (val) => {
    data.queryParams.pageNum = 1
    data.queryParams.pageSize = val
    getList()
}
@@ -101,20 +105,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) => {