Compare commits

..

No commits in common. "f94013103e2ae424ea8546110066953ff45e2e10" and "657010202c5edfaa8f425aa5909fd750af7c6295" have entirely different histories.

2 changed files with 4 additions and 43 deletions

View File

@ -480,11 +480,3 @@ export function resetReadingRestTime() {
method: 'post' method: 'post'
}) })
} }
// 设置随机排序
export function setRandomTaskOrder(data) {
return request({
url: `/VisitTask/setRandomTaskOrder`,
method: 'post',
data
})
}

View File

@ -70,8 +70,7 @@
{{ $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>
@ -188,7 +187,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="1" @change="(value) => handleChange(scope.row, value)" :min="0"
style="width: 150px;"></el-input-number> style="width: 150px;"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
@ -205,7 +204,6 @@ 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'
@ -277,22 +275,7 @@ export default {
// //
async handleChange(row, value) { async handleChange(row, value) {
try { try {
if (!this.searchData.DoctorUserId || !this.searchData.TrialReadingCriterionId) return false console.log(row, value)
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()
}
} catch (err) { } catch (err) {
console.log(err) console.log(err)
this.loading = false this.loading = false
@ -301,20 +284,7 @@ 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
@ -355,7 +325,6 @@ 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)