From 629816217cab863ccff261cfc873f747c41e355c Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 18 Nov 2024 09:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=E6=A0=B8=E6=9F=A5?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=97=A5=E6=9C=9F=E6=94=B9=E4=B8=BA=E6=8B=8D?= =?UTF-8?q?=E7=89=87=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visit/consistency-check/index.vue | 430 +++++++++--------- 1 file changed, 227 insertions(+), 203 deletions(-) diff --git a/src/views/trials/trials-panel/visit/consistency-check/index.vue b/src/views/trials/trials-panel/visit/consistency-check/index.vue index 2b818826..ff84f979 100644 --- a/src/views/trials/trials-panel/visit/consistency-check/index.vue +++ b/src/views/trials/trials-panel/visit/consistency-check/index.vue @@ -62,7 +62,7 @@ - {{ $t("common:button:search") }} + {{ $t('common:button:search') }} - {{ $t("common:button:reset") }} + {{ $t('common:button:reset') }} - {{ $t("trials:consistencyCheck:button:export1") }} + {{ $t('trials:consistencyCheck:button:export1') }} - {{ $t("trials:consistencyCheck:button:export2") }} + {{ $t('trials:consistencyCheck:button:export2') }} - {{ $t("trials:consistencyCheck:button:download") }} + {{ $t('trials:consistencyCheck:button:download') }} @@ -106,7 +106,7 @@ icon="el-icon-upload2" @click="handleOpenUploadDialog" > - {{ $t("trials:consistencyCheck:button:upload") }} + {{ $t('trials:consistencyCheck:button:upload') }} @@ -133,10 +133,10 @@ > @@ -156,8 +156,8 @@ > {{ userTypeEnumInt === 2 - ? $fd("CheckChallengeState", 1) - : $fd("CheckChallengeState", 2) + ? $fd('CheckChallengeState', 1) + : $fd('CheckChallengeState', 2) }} {{ userTypeEnumInt === 2 - ? $fd("CheckChallengeState", 2) - : $fd("CheckChallengeState", 1) + ? $fd('CheckChallengeState', 2) + : $fd('CheckChallengeState', 1) }} {{ - $fd("CheckChallengeState", scope.row.CheckChallengeState) + $fd('CheckChallengeState', scope.row.CheckChallengeState) }} @@ -202,7 +202,7 @@ @@ -227,8 +227,32 @@ width="140" sortable="custom" > - @@ -435,9 +459,9 @@ width="600px" >
- {{ $t("common:dialogTitle:sign") }} + {{ $t('common:dialogTitle:sign') }} {{ - `(${$t("common:label:sign")}${currentUser})` + `(${$t('common:label:sign')}${currentUser})` }}
- {{ $t("common:button:cancel") }} + {{ $t('common:button:cancel') }} - {{ $t("common:button:save") }} + {{ $t('common:button:save') }} @@ -573,32 +597,33 @@ import { closeCheckChallenge, setCheckPass, getCheckChallengeDialogList, -} from "@/api/trials"; -import { DownloadCommonDoc } from "@/api/dictionary"; +} from '@/api/trials' +import { DownloadCommonDoc } from '@/api/dictionary' import { getDicomAndNoneDicomStudyList_Export, getConsistencyVerificationList_Export, -} from "@/api/export"; -import { checkBack } from "@/api/trials/visit"; -import BaseContainer from "@/components/BaseContainer"; -import BaseModel from "@/components/BaseModel"; -import ConsistencyCheckForm from "./components/consistencyCheckForm"; -import UploadExcel from "./components/uploadExcel"; -import SignForm from "@/views/trials/components/newSignForm"; -import Pagination from "@/components/Pagination"; -import const_ from "@/const/sign-code"; +} from '@/api/export' +import { checkBack } from '@/api/trials/visit' +import BaseContainer from '@/components/BaseContainer' +import BaseModel from '@/components/BaseModel' +import ConsistencyCheckForm from './components/consistencyCheckForm' +import UploadExcel from './components/uploadExcel' +import SignForm from '@/views/trials/components/newSignForm' +import Pagination from '@/components/Pagination' +import const_ from '@/const/sign-code' +import moment from 'moment' const searchDataDefault = () => { return { - TrialSiteId: "", - SubjectInfo: "", + TrialSiteId: '', + SubjectInfo: '', VisitPlanArray: [], CheckState: null, PageIndex: 1, PageSize: 20, - }; -}; + } +} export default { - name: "ConsistencyCheck", + name: 'ConsistencyCheck', components: { BaseContainer, Pagination, @@ -614,6 +639,7 @@ export default { Reason: null, Remake: null, }, + moment, searchData: searchDataDefault(), ReasonVisible: false, total: 0, @@ -625,170 +651,170 @@ export default { currentDialogList: [], siteOptions: [], visitPlanOptions: [], - userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1, + userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1, upload_cfg: { visible: false, - title: this.$t("trials:consistencyCheck:button:upload"), - width: "500px", + title: this.$t('trials:consistencyCheck:button:upload'), + width: '500px', showClose: true, }, rules: { Type: [ { required: true, - message: this.$t("common:ruleMessage:specify"), - trigger: "blur", + message: this.$t('common:ruleMessage:specify'), + trigger: 'blur', }, ], Remake: [ { required: true, - message: this.$t("common:ruleMessage:specify"), - trigger: "blur", + message: this.$t('common:ruleMessage:specify'), + trigger: 'blur', }, ], }, signVisible: false, signType: 0, // 0代表申请,1代表回退,2通过 - currentUser: zzSessionStorage.getItem("userName"), + currentUser: zzSessionStorage.getItem('userName'), OtherInfo: {}, - signCode: "", + signCode: '', trialId: this.$route.query.trialId, isReply: false, ReasonTitle: null, - }; + } }, mounted() { - this.getList(); - this.getSite(); - this.getVisitPlanOptions(); + this.getList() + this.getSite() + this.getVisitPlanOptions() }, watch: { chatVisible() { if (!this.chatVisible) { - this.$store.state.trials.checkTaskId = null; + this.$store.state.trials.checkTaskId = null } }, }, methods: { beforeClose() { - this.chatVisible = false; - this.$store.state.trials.checkTaskId = null; + this.chatVisible = false + this.$store.state.trials.checkTaskId = null }, handleExport(type) { if (type === 1) { getDicomAndNoneDicomStudyList_Export(this.searchData) .then((res) => {}) .catch(() => { - this.loading = false; - }); + this.loading = false + }) } else { getConsistencyVerificationList_Export(this.searchData) .then((res) => {}) .catch(() => { - this.loading = false; - }); + this.loading = false + }) } }, typeChange(v) { - if (v === (this.currentRow.type === "pass" ? 4 : 2)) { - this.QuestionForm.Reason = null; - this.QuestionForm.Remake = null; + if (v === (this.currentRow.type === 'pass' ? 4 : 2)) { + this.QuestionForm.Reason = null + this.QuestionForm.Remake = null } else { this.QuestionForm.Reason = this.$t( `trials:check:radio:${this.currentRow.type}reason${v}` - ); + ) } }, passOrCloes() { - if (this.currentRow.type === "pass") { - this.pass(); + if (this.currentRow.type === 'pass') { + this.pass() } else { - this.handleClose(this.currentRow); + this.handleClose(this.currentRow) } }, handleOpenReason(row, type) { - if (type === "pass") { + if (type === 'pass') { // 手动通过一次性核查原因 this.ReasonTitle = this.$t( - "trials:consistencyCheck:dialogTitle:xfpassManually" - ); + 'trials:consistencyCheck:dialogTitle:xfpassManually' + ) } else { // 关闭一致性核查原因 this.ReasonTitle = this.$t( - "trials:consistencyCheck:dialogTitle:xfclose" - ); + 'trials:consistencyCheck:dialogTitle:xfclose' + ) } - this.currentRow = { ...row, Reason: null }; - this.currentRow.type = type; + this.currentRow = { ...row, Reason: null } + this.currentRow.type = type this.QuestionForm = { Type: null, Reason: null, Remake: null, - }; - this.ReasonVisible = true; + } + this.ReasonVisible = true }, // 获取质疑列表 getList() { - this.loading = true; - this.searchData.TrialId = this.trialId; + this.loading = true + this.searchData.TrialId = this.trialId getConsistencyVerificationList(this.searchData) .then((res) => { - this.loading = false; - this.list = res.Result.CurrentPageData; - this.total = res.Result.TotalCount; - this.OtherInfo = res.OtherInfo; + this.loading = false + this.list = res.Result.CurrentPageData + this.total = res.Result.TotalCount + this.OtherInfo = res.OtherInfo }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, // 回复质疑 handleReply(row) { - this.loading = true; + this.loading = true getCheckChallengeDialogList(row.Id) .then((res) => { - this.loading = false; + this.loading = false if (res.IsSuccess) { - Object.assign(row, res.Result.SubjectVisitCheck); - this.currentRow = { ...row }; - this.$store.state.trials.checkTaskId = row.Id; - this.currentDialogList = res.Result.DialogList; - this.isReply = true; - this.chatVisible = true; + Object.assign(row, res.Result.SubjectVisitCheck) + this.currentRow = { ...row } + this.$store.state.trials.checkTaskId = row.Id + this.currentDialogList = res.Result.DialogList + this.isReply = true + this.chatVisible = true } }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, getDialogList() { - this.loading = true; - this.$refs["chatForm"].loading = true; + this.loading = true + this.$refs['chatForm'].loading = true getCheckChallengeDialogList(this.currentRow.Id) .then((res) => { - this.loading = false; + this.loading = false if (res.IsSuccess) { var i = this.list.findIndex( (item) => item.Id === this.currentRow.Id - ); + ) if (i > -1) { this.currentRow = Object.assign( this.list[i], res.Result.SubjectVisitCheck - ); - this.currentDialogList = res.Result.DialogList; - this.$refs["chatForm"].addMessage( + ) + this.currentDialogList = res.Result.DialogList + this.$refs['chatForm'].addMessage( res.Result.DialogList[res.Result.DialogList.length - 1] - ); + ) // this.$refs['chatForm'].getMessageList(res.Result.DialogList) } } }) .catch(() => { - this.loading = false; - this.$refs["chatForm"].loading = false; - }); + this.loading = false + this.$refs['chatForm'].loading = false + }) }, // 回退 // handleBack(row) { @@ -799,127 +825,125 @@ export default { // this.signVisible = true // }, handleBack() { - this.signType = 1; - const { DataFallback } = const_.processSignature; - this.signCode = DataFallback; - this.signVisible = true; + this.signType = 1 + const { DataFallback } = const_.processSignature + this.signCode = DataFallback + this.signVisible = true }, pass() { this.$refs.reasonForm.validate((valid) => { - if (!valid) return; - this.btnLoading = true; + if (!valid) return + this.btnLoading = true if (this.QuestionForm.Type === 4) { // 问题无法解决强制关闭质疑,已提醒中心下次注意 - this.QuestionForm.Reason = `${this.QuestionForm.Remake}`; + this.QuestionForm.Reason = `${this.QuestionForm.Remake}` } var params = { Id: this.currentRow.Id, ManualPassReason: this.QuestionForm.Reason, - }; + } setCheckPass(this.trialId, params) .then((res) => { - this.btnLoading = false; + this.btnLoading = false if (res.IsSuccess) { - this.getList(); - this.QuestionForm.Type = null; - this.ReasonVisible = false; - this.$message.success( - this.$t("common:message:savedSuccessfully") - ); + this.getList() + this.QuestionForm.Type = null + this.ReasonVisible = false + this.$message.success(this.$t('common:message:savedSuccessfully')) } }) .catch(() => { - this.btnLoading = false; - }); - }); + this.btnLoading = false + }) + }) }, back(signInfo) { - this.loading = true; + this.loading = true var params = { data: { id: this.currentRow.Id }, signInfo: signInfo, - }; + } checkBack(params) .then((res) => { - this.loading = false; + this.loading = false if (signInfo) { - this.$refs["signForm"].btnLoading = false; - this.signVisible = false; + this.$refs['signForm'].btnLoading = false + this.signVisible = false } if (res.IsSuccess) { - this.getList(); + this.getList() // this.getDialogList() - this.chatVisible = false; + this.chatVisible = false // 回退成功 this.$message.success( - this.$t("trials:consistencyCheck:message:fallbackSuccessfully") - ); + this.$t('trials:consistencyCheck:message:fallbackSuccessfully') + ) } }) .catch(() => { - this.loading = false; + this.loading = false if (signInfo) { - this.$refs["signForm"].btnLoading = false; + this.$refs['signForm'].btnLoading = false } - }); + }) }, // 关闭质疑 handleClose(row) { this.$refs.reasonForm.validate((valid) => { - if (!valid) return; - var item = Object.assign({}, row); - item.CheckChallengeState = 3; - this.btnLoading = true; + if (!valid) return + var item = Object.assign({}, row) + item.CheckChallengeState = 3 + this.btnLoading = true if (this.QuestionForm.Type === 2) { // 问题无法解决强制关闭质疑,已提醒中心下次注意 this.QuestionForm.Reason = `${this.$t( - "trials:qcQuality:message:problemNotSolved" - )}

${this.$t("trials:consistencyCheck:title:note")}${ + 'trials:qcQuality:message:problemNotSolved' + )}

${this.$t('trials:consistencyCheck:title:note')}${ this.QuestionForm.Remake - }`; + }` } var params = { SubjectVisitId: row.Id, CloseCheckChallenge: this.QuestionForm.Reason, - }; + } closeCheckChallenge(this.trialId, params) .then((res) => { - this.btnLoading = false; + this.btnLoading = false if (res.IsSuccess) { - this.getList(); - this.ReasonVisible = false; - this.QuestionForm.Type = null; + this.getList() + this.ReasonVisible = false + this.QuestionForm.Type = null // 关闭成功 this.$message.success( - this.$t("trials:consistencyCheck:message:closedSuccessfully") - ); + this.$t('trials:consistencyCheck:message:closedSuccessfully') + ) } }) .catch(() => { - this.btnLoading = false; - }); - }); + this.btnLoading = false + }) + }) }, handleDownload() { - this.loading = true; - DownloadCommonDoc("VisitCheck_Template") + this.loading = true + DownloadCommonDoc('VisitCheck_Template') .then((data) => { - this.loading = false; + this.loading = false }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, // 打开上传excel弹窗 handleOpenUploadDialog() { - this.upload_cfg.visible = true; - this.upload_cfg.title = this.$t("common:button:upload"); + this.upload_cfg.visible = true + this.upload_cfg.title = this.$t('common:button:upload') }, // 查看 handleView(row) { - this.currentRow = { ...row }; - this.isReply = false; - this.chatVisible = true; + this.currentRow = { ...row } + this.isReply = false + this.chatVisible = true }, // crc申请回退 // handleApplyBack(row) { @@ -933,92 +957,92 @@ export default { // }).catch(() => {}) // }, handleApplyBack() { - this.$confirm(this.$t("trials:consistencyCheck:message:apply"), { - type: "warning", + this.$confirm(this.$t('trials:consistencyCheck:message:apply'), { + type: 'warning', distinguishCancelAndClose: true, }) .then(() => { - this.apply(); + this.apply() }) - .catch(() => {}); + .catch(() => {}) }, apply() { - this.loading = true; + this.loading = true cRCRequstCheckBack(this.trialId, this.currentRow.Id) .then((res) => { - this.loading = false; + this.loading = false if (res.IsSuccess) { // this.getList() - this.getDialogList(); + this.getDialogList() // 申请成功 // this.$message.success(this.$t('trials:consistencyCheck:message:appledSuccessfully')) } }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, // 关闭签名弹窗 closeSignDialog(isRefresh, signInfo) { if (!isRefresh) { - this.signVisible = false; + this.signVisible = false } else { // 1代表回退,2通过 if (this.signType === 1) { - this.back(signInfo); + this.back(signInfo) } } }, // 通过一致性核查 handlePassCheck(row) { - this.signType = 2; - this.currentRow = { ...row }; - const { ConsistencyCheckPassed } = const_.processSignature; - this.signCode = ConsistencyCheckPassed; - this.signVisible = true; + this.signType = 2 + this.currentRow = { ...row } + const { ConsistencyCheckPassed } = const_.processSignature + this.signCode = ConsistencyCheckPassed + this.signVisible = true }, // 重置 handleReset() { - this.searchData = searchDataDefault(); - this.getList(); + this.searchData = searchDataDefault() + this.getList() this.$nextTick(() => { - this.$refs.consistencyTable.clearSort(); - }); + this.$refs.consistencyTable.clearSort() + }) }, // 查询 handleSearch() { - this.searchData.PageIndex = 1; - this.getList(); + this.searchData.PageIndex = 1 + this.getList() }, // 排序 handleSortByColumn(column) { - if (column.order === "ascending") { - this.searchData.Asc = true; + if (column.order === 'ascending') { + this.searchData.Asc = true } else { - this.searchData.Asc = false; + this.searchData.Asc = false } - this.searchData.SortField = column.prop; - this.searchData.PageIndex = 1; - this.getList(); + this.searchData.SortField = column.prop + this.searchData.PageIndex = 1 + this.getList() }, refreshTable() { - this.upload_cfg.visible = false; - this.getList(); + this.upload_cfg.visible = false + this.getList() }, // 获取site下拉框数据 getSite() { getTrialSiteSelect(this.trialId).then((res) => { - this.siteOptions = res.Result; - }); + this.siteOptions = res.Result + }) }, // 获取访视下拉框数据 getVisitPlanOptions() { getTrialVisitStageSelect(this.trialId).then((res) => { - this.visitPlanOptions = res.Result; - }); + this.visitPlanOptions = res.Result + }) }, }, -}; +}