zhouwx
2024-11-07 bfb8feb317f69b849994106025d9ef62eb34bd59
src/views/experiment/developing/index.vue
@@ -52,10 +52,10 @@
                            <span>{{scope.row.siteList.map(i=>i.siteName).join(',')}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="experimentType" label="实验类别">
                          <template #default="scope">
                            <span>{{developState.experimentTypeList.find(i=>i.id == scope.row.experimentType)?.name}}</span>
                          </template>
                        <el-table-column prop="experimentTypeName" label="实验类别" width="130">
<!--                          <template #default="scope">-->
<!--                            <span>{{developState.experimentTypeList.find(i=>i.id == scope.row.experimentType)?.name}}</span>-->
<!--                          </template>-->
                        </el-table-column>
                        <el-table-column prop="status" label="评估申请">
                          <template #default="scope">
@@ -92,11 +92,19 @@
<!--                        <el-table-column prop="updateByUserName" label="最后修改人" show-overflow-tooltip></el-table-column>-->
                        <el-table-column label="操作" width="250" fixed="right">
                            <template #default="scope">
                              <div v-if="scope.row.stagingTag === 1">
                                <el-button size="small" text type="primary" :icon="View" @click="openProjectDialog('查看', scope.row)">查看</el-button>
                                <el-button size="small" text type="primary" :icon="View" v-if="scope.row.stage == 4" @click="openReportDialog('查看',scope.row)">查看评估报告</el-button>
                                <el-button size="small" :disabled="scope.row.stage == 2 ? true : false" text type="primary" :icon="Edit" @click="applyAccess( scope.row)">申请评估</el-button>
                                <el-button size="small" :disabled="(scope.row.status == 2 && scope.row.stage == 1) ? false : true" text type="warning" :icon="RefreshLeft" @click="cancelAccess( scope.row)">撤销评估</el-button>
                                <el-button size="small" type="warning" v-if="scope.row.rectifyStatus == 1" text :icon="Edit" @click="openProjectDialog('整改', scope.row)">整改</el-button>
                                <el-button size="small" text type="primary" :icon="Edit" @click="openProjectDialog('编辑', scope.row)">编辑</el-button>
                              </div>
                              <div v-else>
                                <el-button size="small" text type="primary" :icon="Edit" @click="openProjectDialog('编辑', scope.row)">编辑</el-button>
                                <el-button size="small" text type="primary" :icon="Finished"  @click="saveDevelop(scope.row)">提交</el-button>
                              </div>
                            </template>
                        </el-table-column>
                    </el-table>
@@ -117,7 +125,7 @@
import {defineAsyncComponent, onMounted, reactive, ref} from "vue";
import {projectApi} from "/@/api/experiment/project";
import {ElMessage, ElMessageBox} from "element-plus";
import { View,Edit, Plus, RefreshLeft } from '@element-plus/icons-vue';
import { View,Edit, Plus, RefreshLeft,Finished } from '@element-plus/icons-vue';
import {roomApi} from "/@/api/basic/room";
const ReportDialog = defineAsyncComponent(() => import('../../analyse/assessApply/components/reportDialog.vue'));
const DevelopDialog = defineAsyncComponent(() => import('./components/developDialog.vue'));
@@ -236,7 +244,6 @@
        type: 'warning'
    })
        .then(async () => {
            debugger
            let res = await projectApi().deleteProjectById({ id: val.id });
            if (res.data.code === 100) {
                ElMessage({
@@ -255,6 +262,31 @@
        .catch((error) => {
        });
}
const saveDevelop = async (data: any) => {
  ElMessageBox.confirm(`此操作将提交该实验:“${data.experimentName}”,是否继续?`, '提示', {
    confirmButtonText: '确认',
    cancelButtonText: '取消',
    type: 'warning'
  }).then(async () => {
    let res = await projectApi().addDevelop(data);
    if(res.data.code === 100){
      ElMessage({
        type: 'success',
        message: '提交成功'
      })
      await getdevelopData();
    }else{
      ElMessage({
        type: 'warning',
        message: res.data.msg,
      });
    }
})
.catch((error) => {
});
}
const onHandleSizeChange = (val: number) => {
    developState.searchQuery.pageSize = val;