diff --git a/src/views/trials/trials-panel/reading/dicoms/components/WL.vue b/src/views/trials/trials-panel/reading/dicoms/components/WL.vue
index 1a5b642..e145085 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/WL.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/WL.vue
@@ -125,7 +125,7 @@ export default {
diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionItem.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionItem.vue
index 881b083..3afc559 100644
--- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionItem.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionItem.vue
@@ -140,7 +140,6 @@
![]()
@@ -236,11 +235,11 @@ export default {
mounted() {
if (this.question.Type === 'upload') {
if (this.questionForm[this.question.Id]) {
+ this.accept = this.question.Accept
this.urls = this.questionForm[this.question.Id].split('|')
this.fileList = []
-
this.urls.map(url => {
- this.fileList.push({ name: '', url: `/${url}` })
+ this.fileList.push({ name: '', url: `/api/${url}` })
})
}
}
@@ -273,11 +272,9 @@ export default {
lock: true,
spinner: 'el-icon-loading'
})
- var fileName = param.file.name
- let file = await this.fileToBlob(param.file)
- let res = await this.OSSclient.put(`/${this.$route.query.trialId}/Customize/${this.visitTaskId}/${fileName}`, file)
- this.fileList.push({ name: `${this.$t('trials:emailManageCfg:title:fileName')}${this.fileList.length + 1}`, url: this.$getObjectName(res.url) })
- console.log('fileList', this.fileList)
+ var file = await this.fileToBlob(param.file)
+ const res = await this.OSSclient.put(`/${this.trialId}/ReadAttachment/${this.subjectId}/${this.visitTaskId}/${param.file.name}`, file)
+ this.fileList.push({ name: param.file.name, url: this.$getObjectName(res.url) })
this.urls.push(this.$getObjectName(res.url))
this.$emit('setFormItemData', { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '' })
loading.close()
@@ -288,11 +285,13 @@ export default {
// this.fileList = []
return true
} else {
- this.$alert(`必须是 ${this.accept} 格式`)
+ const msg = this.$t('trials:adReview:title:msg4').replace('xxx', this.accept)
+ this.$alert(msg)
return false
}
},
checkFileSuffix(fileName) {
+ console.log(this.accept)
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
if (this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === -1) {
@@ -321,7 +320,7 @@ export default {
margin-bottom: 0px;
}
.disabled{
- >>>.el-upload--picture-card {
+ /deep/ .el-upload--picture-card {
display: none;
}
}
@@ -330,10 +329,10 @@ export default {
flex-direction: column;
align-items: flex-start;
}
->>>.el-input.is-disabled .el-input__inner{
+/deep/ .el-input.is-disabled .el-input__inner{
background-color: #646464a1;
}
- >>>.el-select.is-disabled .el-input__inner{
+ /deep/ .el-select.is-disabled .el-input__inner{
background-color: #646464a1;
}
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 ae0a788..91316b0 100644
--- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue
@@ -6,7 +6,7 @@
:prop="question.Id"
:rules="[
{ required: (question.IsRequired === 0 || (question.IsRequired ===1 && question.RelevanceId && !!~question.RelevanceValueList.indexOf(questionForm[question.RelevanceId]))) && question.Type!=='group' && question.Type!=='summary',
- message: '请注明', trigger: ['blur', 'change']},
+ message: $t('common:ruleMessage:select'), trigger: ['blur', 'change']},
]"
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
>
@@ -150,7 +150,6 @@
![]()
@@ -178,9 +177,9 @@
:visible.sync="imgVisible"
width="600px"
>
-
+
- 加载中...
+ {{$t('trials:readingUnit:qsList:message:loading')}}...
@@ -212,6 +211,12 @@ export default {
type: String,
required: true
},
+ CalculationList: {
+ type: Array,
+ default() {
+ return []
+ }
+ },
readingTaskState: {
type: Number,
required: true
@@ -225,6 +230,16 @@ export default {
default: 'add'
}
},
+ computed: {
+ calculationValue: {
+ get() {
+ return this.questionForm[this.question.Id]
+ },
+ set() {
+
+ }
+ }
+ },
data() {
return {
addOrEdit: { visible: false, title: '' },
@@ -239,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
@@ -255,7 +283,7 @@ export default {
this.urls = this.questionForm[this.question.Id].split('|')
this.fileList = []
this.urls.map(url => {
- this.fileList.push({ name: '', url: `/${url}` })
+ this.fileList.push({ name: '', url: `${url}` })
})
}
}
@@ -272,7 +300,7 @@ export default {
},
openAddTableCol(row) {
this.addOrEdit.visible = true
- this.addOrEdit.title = row.QuestionName + '表格问题'
+ this.addOrEdit.title = row.QuestionName + this.$t('trials:readingUnit:qsList:title:tableQs')
this.QuestionsList = row.TableQuestions.Questions
this.AnswersList = row.TableQuestions.Answers
this.QuestionsForm = {}
@@ -314,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 => {
@@ -344,6 +459,7 @@ export default {
var subjectId = this.$route.query.trialId
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${param.file.name}`, file)
+ console.log(res)
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url)})
this.urls.push(this.$getObjectName(res.url))
this.$emit('setFormTableItemData', this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '')
@@ -386,7 +502,7 @@ export default {
diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/WL.vue b/src/views/trials/trials-panel/reading/dicoms/customize/WL.vue
index f337227..f994f7f 100644
--- a/src/views/trials/trials-panel/reading/dicoms/customize/WL.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/customize/WL.vue
@@ -117,7 +117,7 @@ export default {