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