Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
0d85f138a5
|
@ -480,3 +480,11 @@ export function resetReadingRestTime() {
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 设置随机排序
|
||||||
|
export function setRandomTaskOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: `/VisitTask/setRandomTaskOrder`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="skipTask"
|
@click="skipTask"
|
||||||
|
v-if="!isView"
|
||||||
>
|
>
|
||||||
<!-- 跳过 -->
|
<!-- 跳过 -->
|
||||||
{{ $t('trials:readingReport:button:skip') }}
|
{{ $t('trials:readingReport:button:skip') }}
|
||||||
|
@ -337,6 +338,11 @@ export default {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
|
computed:{
|
||||||
|
isView(){
|
||||||
|
return !this.hasPermi(['role:ir'])
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
if (this.isReadingShowPreviousResults) {
|
if (this.isReadingShowPreviousResults) {
|
||||||
|
|
|
@ -70,7 +70,8 @@
|
||||||
{{ $t('common:button:export') }}
|
{{ $t('common:button:export') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 随机排序 -->
|
<!-- 随机排序 -->
|
||||||
<el-button type="primary" @click="randomOrder">
|
<el-button type="primary" @click="randomOrder"
|
||||||
|
:disabled="!searchData.TrialReadingCriterionId || !searchData.DoctorUserId">
|
||||||
{{ $t('trials:readingTracking:button:order') }}
|
{{ $t('trials:readingTracking:button:order') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -187,7 +188,7 @@
|
||||||
sortable="custom" show-overflow-tooltip>
|
sortable="custom" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number v-model="scope.row.RandomOrder"
|
<el-input-number v-model="scope.row.RandomOrder"
|
||||||
@change="(value) => handleChange(scope.row, value)" :min="0"
|
@change="(value, old) => handleChange(scope.row, value, old)" :min="1"
|
||||||
style="width: 150px;"></el-input-number>
|
style="width: 150px;"></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -204,6 +205,7 @@ import {
|
||||||
getTrialCriterionList,
|
getTrialCriterionList,
|
||||||
getReadingTaskList,
|
getReadingTaskList,
|
||||||
getDoctorUserSelectList,
|
getDoctorUserSelectList,
|
||||||
|
setRandomTaskOrder
|
||||||
} from '@/api/trials/reading'
|
} from '@/api/trials/reading'
|
||||||
import { getReadingTaskList_Export } from '@/api/export'
|
import { getReadingTaskList_Export } from '@/api/export'
|
||||||
import BaseContainer from '@/components/BaseContainer'
|
import BaseContainer from '@/components/BaseContainer'
|
||||||
|
@ -273,10 +275,28 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 手动设置排序序号
|
// 手动设置排序序号
|
||||||
async handleChange(row, value) {
|
async handleChange(row, value, old) {
|
||||||
try {
|
try {
|
||||||
console.log(row, value)
|
if (!this.searchData.DoctorUserId || !this.searchData.TrialReadingCriterionId) return false
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
TrialReadingCriterionId: this.searchData.TrialReadingCriterionId,
|
||||||
|
DoctorUserId: this.searchData.DoctorUserId,
|
||||||
|
IsAutoSet: false,
|
||||||
|
SetList: [
|
||||||
|
{ Id: row.Id, RandomOrder: value }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
let res = await setRandomTaskOrder(data)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
row.RandomOrder = old
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
row.RandomOrder = old
|
||||||
console.log(err)
|
console.log(err)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
@ -284,7 +304,20 @@ export default {
|
||||||
// 随机排序
|
// 随机排序
|
||||||
async randomOrder() {
|
async randomOrder() {
|
||||||
try {
|
try {
|
||||||
|
if (!this.searchData.DoctorUserId || !this.searchData.TrialReadingCriterionId) return false
|
||||||
|
let data = {
|
||||||
|
TrialId: this.$route.query.trialId,
|
||||||
|
TrialReadingCriterionId: this.searchData.TrialReadingCriterionId,
|
||||||
|
DoctorUserId: this.searchData.DoctorUserId,
|
||||||
|
IsAutoSet: true,
|
||||||
|
SetList: []
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
let res = await setRandomTaskOrder(data)
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
@ -325,6 +358,7 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
if (!this.searchData.DoctorUserId || !this.searchData.TrialReadingCriterionId) return false
|
||||||
this.searchData.TrialId = this.$route.query.trialId
|
this.searchData.TrialId = this.$route.query.trialId
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getReadingTaskList(this.searchData)
|
getReadingTaskList(this.searchData)
|
||||||
|
|
|
@ -848,7 +848,6 @@ export default {
|
||||||
|
|
||||||
if (obj[v.Code]) {
|
if (obj[v.Code]) {
|
||||||
obj[v.Code] = obj[v.Code].filter(s => s && s.trim())
|
obj[v.Code] = obj[v.Code].filter(s => s && s.trim())
|
||||||
|
|
||||||
// obj[v.Code].forEach((o,i) => {
|
// obj[v.Code].forEach((o,i) => {
|
||||||
// var uo = upObj && upObj.length > 0 ? upObj[v.Code][i] : 0
|
// var uo = upObj && upObj.length > 0 ? upObj[v.Code][i] : 0
|
||||||
if (row.OptType === 'Add' || row.OptType === 'Init') {
|
if (row.OptType === 'Add' || row.OptType === 'Init') {
|
||||||
|
|
Loading…
Reference in New Issue