Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
b74337f2f0
|
@ -52,7 +52,7 @@
|
||||||
<div class="add-icon" style="margin: 0 5px;">
|
<div class="add-icon" style="margin: 0 5px;">
|
||||||
<i class="el-icon-upload2" />
|
<i class="el-icon-upload2" />
|
||||||
</div>
|
</div>
|
||||||
<div class="add-icon" @click.prevent="handleAdd(item)">
|
<div class="add-icon" @click.prevent="handleAddOrEdit('add',item)">
|
||||||
<i class="el-icon-plus" />
|
<i class="el-icon-plus" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,7 +63,6 @@
|
||||||
:ref="item.Id"
|
:ref="item.Id"
|
||||||
:data="item.TableQuestions.Answers"
|
:data="item.TableQuestions.Answers"
|
||||||
max-height="600"
|
max-height="600"
|
||||||
style="width:100%;"
|
|
||||||
>
|
>
|
||||||
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -72,7 +71,7 @@
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="index"
|
type="index"
|
||||||
width="50"
|
width="40px"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="q of item.TableQuestions.Questions"
|
v-for="q of item.TableQuestions.Questions"
|
||||||
|
@ -80,6 +79,7 @@
|
||||||
:prop="q.Id"
|
:prop="q.Id"
|
||||||
:label="q.QuestionName"
|
:label="q.QuestionName"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
:render-header="renderHeader"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="readingTaskState < 2"
|
v-if="readingTaskState < 2"
|
||||||
|
@ -88,10 +88,10 @@
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" @click="handleEdit('edit',item, scope.$index)">
|
<el-button type="text" size="mini" @click="handleAddOrEdit('edit',item, scope.$index)">
|
||||||
{{ $t('common:button:edit') }}
|
{{ $t('common:button:edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.IsCurrentTaskAdd === 'True'" type="text" size="mini" @click="handleDelete(question, scope.$index)">
|
<el-button v-if="scope.row.IsCurrentTaskAdd === 'True'" type="text" size="mini" @click="handleDelete(item, scope.$index)">
|
||||||
{{ $t('common:button:delete') }}
|
{{ $t('common:button:delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -241,21 +241,13 @@ export default {
|
||||||
return {
|
return {
|
||||||
height: window.innerHeight - 140,
|
height: window.innerHeight - 140,
|
||||||
questions: [],
|
questions: [],
|
||||||
activeName: '',
|
|
||||||
activeItem: {
|
|
||||||
activeRowIndex: null,
|
|
||||||
activeCollapseId: null
|
|
||||||
},
|
|
||||||
visitTaskId: '',
|
visitTaskId: '',
|
||||||
isCurrentTask: false,
|
isCurrentTask: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
unSaveTargets: [],
|
|
||||||
temporaryLesions: [],
|
|
||||||
readingTaskState: 2,
|
readingTaskState: 2,
|
||||||
isBaseLineTask: false,
|
isBaseLineTask: false,
|
||||||
taskBlindName: '',
|
taskBlindName: '',
|
||||||
tableQuestions: [],
|
tableQuestions: [],
|
||||||
isFirstRender: false,
|
|
||||||
CriterionType: null,
|
CriterionType: null,
|
||||||
subjectCode: '',
|
subjectCode: '',
|
||||||
questionForm: {},
|
questionForm: {},
|
||||||
|
@ -325,9 +317,6 @@ export default {
|
||||||
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
|
this.readingTaskState = this.visitTaskList[i].ReadingTaskState
|
||||||
this.isBaseLineTask = this.visitTaskList[i].IsBaseLineTask
|
this.isBaseLineTask = this.visitTaskList[i].IsBaseLineTask
|
||||||
this.isCurrentTask = this.visitTaskList[i].IsCurrentTask
|
this.isCurrentTask = this.visitTaskList[i].IsCurrentTask
|
||||||
this.activeName = ''
|
|
||||||
this.activeItem.activeRowIndex = null
|
|
||||||
this.activeItem.activeCollapseId = null
|
|
||||||
if (!this.visitTaskList[i].IsInit) {
|
if (!this.visitTaskList[i].IsInit) {
|
||||||
var loading = this.$loading({ fullscreen: true })
|
var loading = this.$loading({ fullscreen: true })
|
||||||
var triald = this.trialId = this.$router.currentRoute.query.trialId
|
var triald = this.trialId = this.$router.currentRoute.query.trialId
|
||||||
|
@ -442,37 +431,6 @@ export default {
|
||||||
isCanActiveTool(toolName) {
|
isCanActiveTool(toolName) {
|
||||||
return { isCanActiveTool: true, reason: '' }
|
return { isCanActiveTool: true, reason: '' }
|
||||||
},
|
},
|
||||||
|
|
||||||
async handleAdd(qs) {
|
|
||||||
if (!!qs.MaxQuestionCount && qs.MaxQuestionCount <= qs.TableQuestions.Answers.length) {
|
|
||||||
let msg = this.$t('trials:reading:warnning:msg14')
|
|
||||||
// msg = msg.replace('xxx', qs.QuestionName)
|
|
||||||
msg = msg.replace('xxx', qs.MaxQuestionCount)
|
|
||||||
this.$confirm(msg, {
|
|
||||||
type: 'warning',
|
|
||||||
showCancelButton: false,
|
|
||||||
callback: action => {}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// saveTypeEnum: 0
|
|
||||||
var obj = { saveTypeEnum: 0 }
|
|
||||||
// var questions = qs.TableQuestions.Questions.find(item => item.QuestionMark === 3)
|
|
||||||
// if (questions) {
|
|
||||||
// console.log(questions)
|
|
||||||
// var maxIndex = this.getMaxRowIndex(qs.TableQuestions.Answers)
|
|
||||||
// obj.RowIndex = `${maxIndex + 1}.00`
|
|
||||||
// obj[questions.Id] = `${qs.OrderMark}${String(maxIndex + 1).padStart(2, '0')}`
|
|
||||||
// }
|
|
||||||
var maxIndex = this.getMaxRowIndex(qs.TableQuestions.Answers)
|
|
||||||
obj.RowIndex = `${maxIndex + 1}.00`
|
|
||||||
obj.IsDicomReading = true
|
|
||||||
await store.dispatch('reading/addReadingQuestionAndAnswer', { lesionType: qs.LesionType, visitTaskId: this.visitTaskId, lesionObj: obj })
|
|
||||||
|
|
||||||
this.activeItem.activeRowIndex = String(obj.RowIndex)
|
|
||||||
this.activeItem.activeCollapseId = qs.Id
|
|
||||||
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getMaxRowIndex(answerList) {
|
getMaxRowIndex(answerList) {
|
||||||
if (answerList.length > 0) {
|
if (answerList.length > 0) {
|
||||||
var arr = []
|
var arr = []
|
||||||
|
@ -568,10 +526,6 @@ export default {
|
||||||
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
const res = await resetReadingTask({ visitTaskId: this.visitTaskId })
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
// 刷新标注、表单、报告页信息
|
|
||||||
this.activeName = ''
|
|
||||||
this.activeItem.activeRowIndex = null
|
|
||||||
this.activeItem.activeCollapseId = null
|
|
||||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
const triald = this.$router.currentRoute.query.trialId
|
const triald = this.$router.currentRoute.query.trialId
|
||||||
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId })
|
||||||
|
@ -612,13 +566,18 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleEdit(type, row, index) {
|
handleAddOrEdit(type, row, index) {
|
||||||
this.addOrEdit.title = row.QuestionName
|
this.addOrEdit.title = row.QuestionName
|
||||||
this.qsList = row.TableQuestions.Questions
|
this.qsList = row.TableQuestions.Questions
|
||||||
this.qsForm = {}
|
this.qsForm = {}
|
||||||
this.qsForm.questionId = row.Id
|
this.qsForm.questionId = row.Id
|
||||||
this.qsForm.rowId = type === 'add' ? null : row.TableQuestions.Answers && row.TableQuestions.Answers[index] ? row.TableQuestions.Answers[index].RowId : null
|
this.qsForm.rowId = type === 'add' ? null : row.TableQuestions.Answers && row.TableQuestions.Answers[index] ? row.TableQuestions.Answers[index].RowId : null
|
||||||
this.qsForm.rowIndex = type === 'add' ? null : row.TableQuestions.Answers && row.TableQuestions.Answers[index] ? row.TableQuestions.Answers[index].RowIndex : null
|
if (type === 'add') {
|
||||||
|
var maxIndex = this.getMaxRowIndex(row.TableQuestions.Answers)
|
||||||
|
this.qsForm.rowIndex = `${maxIndex + 1}.00`
|
||||||
|
} else {
|
||||||
|
this.qsForm.rowIndex = row.TableQuestions.Answers && row.TableQuestions.Answers[index] ? row.TableQuestions.Answers[index].RowIndex : null
|
||||||
|
}
|
||||||
row.TableQuestions.Questions.map(i => {
|
row.TableQuestions.Questions.map(i => {
|
||||||
if (i.QuestionMark === 1001) {
|
if (i.QuestionMark === 1001) {
|
||||||
this.eemId = i.Id
|
this.eemId = i.Id
|
||||||
|
@ -681,7 +640,7 @@ export default {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if (confirm !== 'confirm') return
|
if (confirm !== 'confirm') return
|
||||||
if (this.questionForm.RowId) {
|
if (row.TableQuestions.Answers[index].RowId) {
|
||||||
var param = {
|
var param = {
|
||||||
visitTaskId: this.visitTaskId,
|
visitTaskId: this.visitTaskId,
|
||||||
questionId: row.Id,
|
questionId: row.Id,
|
||||||
|
@ -689,6 +648,7 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await deleteReadingRowAnswer(param)
|
const res = await deleteReadingRowAnswer(param)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
|
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||||
DicomEvent.$emit('getReportInfo', true)
|
DicomEvent.$emit('getReportInfo', true)
|
||||||
// '删除成功!'
|
// '删除成功!'
|
||||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||||
|
@ -699,6 +659,14 @@ export default {
|
||||||
loading.close()
|
loading.close()
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
renderHeader(h, { column, $index }) {
|
||||||
|
const span = document.createElement('span')
|
||||||
|
span.innerText = column.label
|
||||||
|
document.body.appendChild(span)
|
||||||
|
column.minWidth = span.getBoundingClientRect().width + 15
|
||||||
|
document.body.removeChild(span)
|
||||||
|
return h('span', column.label)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -829,7 +797,7 @@ export default {
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
}
|
}
|
||||||
/deep/ .el-table .cell {
|
/deep/ .el-table .cell {
|
||||||
line-height: 15px;
|
line-height: 14px;
|
||||||
}
|
}
|
||||||
/deep/ .el-table__cell {
|
/deep/ .el-table__cell {
|
||||||
padding: 5px 0;
|
padding: 5px 0;
|
||||||
|
@ -841,7 +809,6 @@ export default {
|
||||||
/deep/.el-table__fixed-body-wrapper tr:hover > td {
|
/deep/.el-table__fixed-body-wrapper tr:hover > td {
|
||||||
background-color: #000 !important;
|
background-color: #000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue