检查新增移除按钮
							parent
							
								
									1cc0cac20b
								
							
						
					
					
						commit
						82dfda0f05
					
				| 
						 | 
				
			
			@ -62,7 +62,7 @@
 | 
			
		|||
      highlight-current-row
 | 
			
		||||
      @selection-change="handleSelectChange"
 | 
			
		||||
      @sort-change="handleSortByColumn"
 | 
			
		||||
      :default-sort="{ prop: 'StudyTime', order: 'descending' }"
 | 
			
		||||
      :default-sort="{ prop: 'StudyTime', order: 'ascending' }"
 | 
			
		||||
    >
 | 
			
		||||
      <el-table-column type="selection" align="center" width="45" />
 | 
			
		||||
      <el-table-column type="index" width="40" />
 | 
			
		||||
| 
						 | 
				
			
			@ -151,6 +151,14 @@
 | 
			
		|||
            class="detail"
 | 
			
		||||
            >{{ $t("trials:trials-list:action:panel") }}</el-button
 | 
			
		||||
          >
 | 
			
		||||
          <!-- 移除 -->
 | 
			
		||||
          <el-button
 | 
			
		||||
            type="text"
 | 
			
		||||
            @click.stop="remove(scope.row)"
 | 
			
		||||
            class="detail"
 | 
			
		||||
            :disabled="!scope.row.SubjectVisitId"
 | 
			
		||||
            >{{ $t("common:button:remove") }}</el-button
 | 
			
		||||
          >
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
| 
						 | 
				
			
			@ -176,12 +184,13 @@ import {
 | 
			
		|||
  addSubjectPatientStudyBinding,
 | 
			
		||||
  submitVisitStudyBinding,
 | 
			
		||||
} from "@/api/inspection.js";
 | 
			
		||||
import { updateSubjectVisitStudyBinding } from "@/api/trials/visit.js";
 | 
			
		||||
 | 
			
		||||
const defaultSearchData = () => {
 | 
			
		||||
  return {
 | 
			
		||||
    EarliestStudyTime: null,
 | 
			
		||||
    LatestStudyTime: null,
 | 
			
		||||
    Asc: false,
 | 
			
		||||
    Asc: true,
 | 
			
		||||
    SortField: "StudyTime",
 | 
			
		||||
    PageIndex: 1,
 | 
			
		||||
    PageSize: 20,
 | 
			
		||||
| 
						 | 
				
			
			@ -227,6 +236,35 @@ export default {
 | 
			
		|||
    };
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 移除检查与访视绑定关系
 | 
			
		||||
    async remove(item) {
 | 
			
		||||
      try {
 | 
			
		||||
        let confirm = await this.$confirm(
 | 
			
		||||
          this.$t("trials:sitesList:message:removeSite"),
 | 
			
		||||
          {
 | 
			
		||||
            type: "warning",
 | 
			
		||||
            distinguishCancelAndClose: true,
 | 
			
		||||
            confirmButtonText: this.$t("common:button:confirm"),
 | 
			
		||||
            cancelButtonText: this.$t("recompose:button:cancel"),
 | 
			
		||||
          }
 | 
			
		||||
        );
 | 
			
		||||
        if (confirm !== "confirm") return;
 | 
			
		||||
        let data = {
 | 
			
		||||
          isAdd: false,
 | 
			
		||||
          TrialId: this.submitMessage.TrialId,
 | 
			
		||||
          SubjectId: this.submitMessage.SubjectId,
 | 
			
		||||
          SubjectVisitId: item.SubjectVisitId,
 | 
			
		||||
          ScpStudyId: item.SCPStudyId,
 | 
			
		||||
        };
 | 
			
		||||
        let res = await updateSubjectVisitStudyBinding(data);
 | 
			
		||||
        if (res.IsSuccess) {
 | 
			
		||||
          this.getList();
 | 
			
		||||
          this.$message.success(this.$t("common:message:removedSuccessfully"));
 | 
			
		||||
        }
 | 
			
		||||
      } catch (err) {
 | 
			
		||||
        console.log(err);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    // 切换状态
 | 
			
		||||
    changeVisitStatus(flag = false) {
 | 
			
		||||
      this.visitStatus = "submit";
 | 
			
		||||
| 
						 | 
				
			
			@ -412,10 +450,10 @@ export default {
 | 
			
		|||
      if (!fd) return;
 | 
			
		||||
      let data = {
 | 
			
		||||
        TrialId: this.submitMessage.TrialId,
 | 
			
		||||
        SubjectVisitIdList : [],
 | 
			
		||||
        SubjectVisitIdList: [],
 | 
			
		||||
      };
 | 
			
		||||
      this.tableSelectData.forEach((item) => {
 | 
			
		||||
        data.SubjectVisitIdList .push(item.SubjectVisitId);
 | 
			
		||||
        data.SubjectVisitIdList.push(item.SubjectVisitId);
 | 
			
		||||
      });
 | 
			
		||||
      try {
 | 
			
		||||
        this.btnLoading2 = true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,13 +11,14 @@
 | 
			
		|||
    :inline="true"
 | 
			
		||||
  >
 | 
			
		||||
    <el-row>
 | 
			
		||||
      <!-- 项目码 v-if="trialForm.Id !== ''"-->
 | 
			
		||||
      <!-- 项目码 -->
 | 
			
		||||
      <el-form-item
 | 
			
		||||
        :label="$t('trials:trials-list:table:trialId')"
 | 
			
		||||
        prop="TrialCode"
 | 
			
		||||
        v-if="trialForm.Id !== ''"
 | 
			
		||||
      >
 | 
			
		||||
        <!-- <el-input v-model="trialForm.TrialCode" disabled /> -->
 | 
			
		||||
        <el-input v-model="trialForm.TrialCode" />
 | 
			
		||||
        <el-input v-model="trialForm.TrialCode" disabled />
 | 
			
		||||
        <!-- <el-input v-model="trialForm.TrialCode" /> -->
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <!-- 项目类型 -->
 | 
			
		||||
      <el-form-item
 | 
			
		||||
| 
						 | 
				
			
			@ -148,13 +149,13 @@
 | 
			
		|||
        :label="$t('trials:trials-list:table:durationAuthorized')"
 | 
			
		||||
        prop="AuthorizationYear"
 | 
			
		||||
      >
 | 
			
		||||
        <div style="position: relative;">
 | 
			
		||||
        <div style="position: relative">
 | 
			
		||||
          <el-input
 | 
			
		||||
            v-model="trialForm.AuthorizationYear"
 | 
			
		||||
            type="number"
 | 
			
		||||
            clearable
 | 
			
		||||
          />
 | 
			
		||||
          <span style="position: absolute;right:-20px;top:0">年</span>
 | 
			
		||||
          <span style="position: absolute; right: -20px; top: 0">年</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <!-- 授权时间 -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -245,29 +245,41 @@
 | 
			
		|||
        </el-table-column>
 | 
			
		||||
        <el-table-column
 | 
			
		||||
          :label="$t('common:action:action')"
 | 
			
		||||
          min-width="100"
 | 
			
		||||
          min-width="120"
 | 
			
		||||
          fixed="right"
 | 
			
		||||
        >
 | 
			
		||||
          <template slot-scope="scope">
 | 
			
		||||
            <!-- 查看 -->
 | 
			
		||||
            <el-button
 | 
			
		||||
              type="text"
 | 
			
		||||
              circle
 | 
			
		||||
              icon="el-icon-info"
 | 
			
		||||
              @click="handleViewStudy(scope.row)"
 | 
			
		||||
              v-hasPermi="['trials:trials-panel:study:view']"
 | 
			
		||||
              >{{ $t("trials:studyList:button:view") }}</el-button
 | 
			
		||||
            >
 | 
			
		||||
              :title="$t('trials:studyList:button:view')"
 | 
			
		||||
            />
 | 
			
		||||
            <!-- 修改访视 -->
 | 
			
		||||
            <el-button
 | 
			
		||||
              type="text"
 | 
			
		||||
              circle
 | 
			
		||||
              icon="el-icon-edit-outline"
 | 
			
		||||
              @click="editVisitFn(scope.row)"
 | 
			
		||||
              v-if="activeName === 'notSubmit'"
 | 
			
		||||
              v-hasPermi="['trials:trials-panel:study:editVisit']"
 | 
			
		||||
              >{{
 | 
			
		||||
              :title="
 | 
			
		||||
                scope.row.SubjectVisitId
 | 
			
		||||
                  ? $t("trials:study:button:editVisit")
 | 
			
		||||
                  : $t("trials:study:button:bindVisit")
 | 
			
		||||
              }}</el-button
 | 
			
		||||
            >
 | 
			
		||||
                  ? $t('trials:study:button:editVisit')
 | 
			
		||||
                  : $t('trials:study:button:bindVisit')
 | 
			
		||||
              "
 | 
			
		||||
            />
 | 
			
		||||
            <!-- 移除 -->
 | 
			
		||||
            <el-button
 | 
			
		||||
              circle
 | 
			
		||||
              icon="el-icon-delete"
 | 
			
		||||
              @click.stop="remove(scope.row)"
 | 
			
		||||
              class="detail"
 | 
			
		||||
              :disabled="!scope.row.SubjectVisitId"
 | 
			
		||||
              v-if="activeName === 'notSubmit'"
 | 
			
		||||
              :title="$t('common:button:remove')"
 | 
			
		||||
            />
 | 
			
		||||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
      </el-table>
 | 
			
		||||
| 
						 | 
				
			
			@ -299,6 +311,8 @@ import {
 | 
			
		|||
  getTrialPatientStudyList,
 | 
			
		||||
  autoBindingPatientStudyVisit,
 | 
			
		||||
} from "@/api/trials/study.js";
 | 
			
		||||
import { updateSubjectVisitStudyBinding } from "@/api/trials/visit.js";
 | 
			
		||||
 | 
			
		||||
const defaultSearchData = () => {
 | 
			
		||||
  return {
 | 
			
		||||
    SubjectCode: null,
 | 
			
		||||
| 
						 | 
				
			
			@ -347,6 +361,35 @@ export default {
 | 
			
		|||
    this.getList();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 移除检查与访视绑定关系
 | 
			
		||||
    async remove(item) {
 | 
			
		||||
      try {
 | 
			
		||||
        let confirm = await this.$confirm(
 | 
			
		||||
          this.$t("trials:sitesList:message:removeSite"),
 | 
			
		||||
          {
 | 
			
		||||
            type: "warning",
 | 
			
		||||
            distinguishCancelAndClose: true,
 | 
			
		||||
            confirmButtonText: this.$t("common:button:confirm"),
 | 
			
		||||
            cancelButtonText: this.$t("recompose:button:cancel"),
 | 
			
		||||
          }
 | 
			
		||||
        );
 | 
			
		||||
        if (confirm !== "confirm") return;
 | 
			
		||||
        let data = {
 | 
			
		||||
          isAdd: false,
 | 
			
		||||
          TrialId: this.$route.query.trialId,
 | 
			
		||||
          SubjectId: item.SubjectId,
 | 
			
		||||
          SubjectVisitId: item.SubjectVisitId,
 | 
			
		||||
          ScpStudyId: item.StudyId,
 | 
			
		||||
        };
 | 
			
		||||
        let res = await updateSubjectVisitStudyBinding(data);
 | 
			
		||||
        if (res.IsSuccess) {
 | 
			
		||||
          this.getList();
 | 
			
		||||
          this.$message.success(this.$t("common:message:removedSuccessfully"));
 | 
			
		||||
        }
 | 
			
		||||
      } catch (err) {
 | 
			
		||||
        console.log(err);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    // 自动绑定
 | 
			
		||||
    async automaticBind() {
 | 
			
		||||
      try {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue