diff --git a/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue b/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue
index 298bef3d..8e1a48f3 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/DicomCanvas.vue
@@ -14,7 +14,7 @@
-
+
@@ -222,7 +222,8 @@ export default {
visitTaskId: '',
taskBlindName: '',
frame: null,
- imageRendered: false
+ imageRendered: false,
+ isExistsClinicalData:false
// preventCache: true
},
dicomInfo: {
@@ -1058,6 +1059,7 @@ export default {
this.stack.seriesIndex = dicomSeries.seriesIndex
this.stack.sliceThickness = dicomSeries.sliceThickness
this.stack.instanceCount = dicomSeries.instanceCount
+ this.stack.isExistsClinicalData = dicomSeries.isExistsClinicalData
// this.measuredData = dicomSeries.measuredData
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === dicomSeries.visitTaskId)
this.stack.visitTaskNum = this.visitTaskList[idx].VisitTaskNum
diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue
index 2cf652e5..e1c7c3fb 100644
--- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue
@@ -18,6 +18,11 @@
+
+
+ {{question.OrderMark}}{{scope.$index + 1}}
+
+
{
@@ -511,10 +517,9 @@ export default {
},
getQuestionCalculateRelation() {
getQuestionCalculateRelation({
- TrialReadingCriterionId: this.criterionId,
ReadingQuestionId: this.question.Id
}).then(res => {
- this.CalculationList = res.Result
+ this.CalculationTabelList = res.Result
})
},
save() {
diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue
index 7d1bbbb0..91316b09 100644
--- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue
@@ -211,6 +211,12 @@ export default {
type: String,
required: true
},
+ CalculationList: {
+ type: Array,
+ default() {
+ return []
+ }
+ },
readingTaskState: {
type: Number,
required: true
@@ -248,14 +254,27 @@ export default {
digitPlaces: 0
}
},
+ // watch: {
+ // questionForm: {
+ // deep: true,
+ // immediate: true,
+ // handler(v) {
+ //
+ // }
+ // }
+ // },
watch: {
questionForm: {
deep: true,
immediate: true,
- handler(v) {
-
+ handler(v, oldv) {
+ try {
+ if (!v[this.question.Id] || !oldv[this.question.Id]) return
+ } catch (e) {
+ }
+ this.formItemNumberChange(this.question.Id, false)
}
- }
+ },
},
mounted() {
this.digitPlaces = localStorage.getItem('digitPlaces') ? parseInt(localStorage.getItem('digitPlaces')) : 0
@@ -323,8 +342,95 @@ export default {
} else {
}
},
+ logic(rules, num = 0) {
+ try {
+ if (rules.CalculateQuestionList.length === 0) {
+ return false
+ }
+ var count = 0
+ var maxList = [], minList = []
+ rules.CalculateQuestionList.forEach((o, i) => {
+ if (rules.CustomCalculateMark > 4) {
+ if (i !== 0) {
+ switch (rules.CustomCalculateMark) {
+ case 7:
+ count += parseFloat(this.questionForm[o.TableQuestionId])
+ if (i === rules.CalculateQuestionList.length - 1) {
+ num = count / rules.CalculateQuestionList.length
+ }
+ break;
+ case 8:
+ maxList.push(this.questionForm[o.TableQuestionId])
+ if (i === rules.CalculateQuestionList.length - 1) {
+ num = Math.max(...maxList)
+ }
+ break;
+ case 9:
+ minList.push(this.questionForm[o.TableQuestionId])
+ if (i === rules.CalculateQuestionList.length - 1) {
+ num = Math.min(...minList)
+ }
+ break;
+ }
+ } else {
+ maxList.push(this.questionForm[o.TableQuestionId])
+ minList.push(this.questionForm[o.TableQuestionId])
+ count = parseFloat(this.questionForm[o.TableQuestionId])
+ num = parseFloat(this.questionForm[o.TableQuestionId])
+ }
+ } else {
+ if (i !== 0) {
+ switch (rules.CustomCalculateMark) {
+ case 1:
+ num += parseFloat(this.questionForm[o.TableQuestionId])
+ break;
+ case 2:
+ num -= parseFloat(this.questionForm[o.TableQuestionId])
+ break;
+ case 3:
+ num *= parseFloat(this.questionForm[o.TableQuestionId])
+ break;
+ case 4:
+ if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
+ num = 0
+ } else {
+ num /= parseFloat(this.questionForm[o.TableQuestionId])
+ }
+ break;
+ }
+ } else {
+ num = parseFloat(this.questionForm[o.TableQuestionId])
+ }
+ }
+ })
+ } catch (e) {
+ console.log(e)
+ }
+ var digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
+ if (rules.ValueType === 2) {
+ num = num * 100
+ }
+ return num.toFixed(digitPlaces)
+ },
formItemNumberChange(v, question) {
- this.$emit('formItemTableNumberChange', v, question)
+ console.log(this.CalculationList)
+ this.CalculationList.forEach((v, i) => {
+ console.log('v', v)
+ var find = v.CalculateQuestionList.filter(o => {
+ return o.QuestionId === question.Id
+ })
+ console.log('find', find)
+ // find的自动计算值number
+ if (find) {
+ var num = this.logic(v)
+ console.log(num)
+ if (num !== false) {
+ this.$set(this.questionForm, v.QuestionId, num)
+ // this.$emit('setFormItemData', { key: v.QuestionId, val: num })
+ }
+ }
+ })
+ // this.$emit('formItemTableNumberChange', v, question)
},
resetChild(obj) {
obj.forEach(i => {
diff --git a/src/views/trials/trials-panel/setting/reading-unit/components/QuestionsForm.vue b/src/views/trials/trials-panel/setting/reading-unit/components/QuestionsForm.vue
index a6fd45bf..977bf2f0 100644
--- a/src/views/trials/trials-panel/setting/reading-unit/components/QuestionsForm.vue
+++ b/src/views/trials/trials-panel/setting/reading-unit/components/QuestionsForm.vue
@@ -447,8 +447,8 @@
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
CustomCalculateMarkChange(v)"
>
-
- {{ item.label }}
-
+
+
+ {{ item.label }}
+
+
+
+
+ {{ item.label }}
+
+
-
+
-
-
-
{
return item.QuestionId === this.form.ParentId