|
@@ -15,7 +15,7 @@
|
|
|
<div class="flex-1 radius-base fill-blank tree-card">
|
|
|
<div class="flex items-center justify-between">
|
|
|
<span>选择评卷员</span>
|
|
|
- <el-button :loading="loading" size="small" type="primary" @click="onHandOutForceCheck">分发考核卷</el-button>
|
|
|
+ <el-button :loading="loading" size="small" type="primary" @click="sendHandler">分发考核卷</el-button>
|
|
|
</div>
|
|
|
<div class="flex direction-column m-t-extra-base p-base radius-base fill-lighter tree-box">
|
|
|
<el-input v-model="filterText" placeholder="输入评卷员账号或名称筛选" clearable></el-input>
|
|
@@ -46,6 +46,32 @@
|
|
|
</template>
|
|
|
</base-table>
|
|
|
</div>
|
|
|
+
|
|
|
+ <base-dialog v-model="forceCheckVisible" :title="dialogTitle" destroy-on-close :width="500">
|
|
|
+ <div class="dialog-body-wrap">
|
|
|
+ <div class="q-title flex items-center">
|
|
|
+ <img src="../../../assets/images/main_question.png" />
|
|
|
+ <span>{{ questionName }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="choose-list-box">
|
|
|
+ <div class="row">
|
|
|
+ <span class="label"> 强制考核卷组: </span>
|
|
|
+ <div class="value">{{ `第${model.forceGroupNumber}组` }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <span class="label"> 分发给: </span>
|
|
|
+ <div class="value">
|
|
|
+ {{ previewChecked }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="flex justify-center">
|
|
|
+ <confirm-button @confirm="onHandOutForceCheck" @cancel="forceCheckVisible = false"></confirm-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </base-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -55,18 +81,19 @@ import { reactive, ref, computed, watch } from 'vue'
|
|
|
import { ElButton, ElInput, ElTree, ElMessage } from 'element-plus'
|
|
|
import BaseForm from '@/components/element/BaseForm.vue'
|
|
|
import BaseTable from '@/components/element/BaseTable.vue'
|
|
|
+import BaseDialog from '@/components/element/BaseDialog.vue'
|
|
|
import Empty from '@/components/common/Empty.vue'
|
|
|
import useForm from '@/hooks/useForm'
|
|
|
import useFetch from '@/hooks/useFetch'
|
|
|
import useOptions from '@/hooks/useOptions'
|
|
|
import useVW from '@/hooks/useVW'
|
|
|
-
|
|
|
+import ConfirmButton from '@/components/common/ConfirmButton.vue'
|
|
|
import type { ExtractApiParams, ExtractApiResponse } from '@/api/api'
|
|
|
import type { FormGroup, EpFormItem, EpFormRules, EpTableColumn } from 'global-type'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
import { TreeKey } from 'element-plus/es/components/tree/src/tree.type'
|
|
|
const route = useRoute()
|
|
|
-
|
|
|
+const forceCheckVisible = ref(false)
|
|
|
const { subjectList, mainQuestionList, dataModel, onOptionInit, changeModelValue } = useOptions(['subject', 'question'])
|
|
|
|
|
|
const markerIds = ref()
|
|
@@ -240,9 +267,69 @@ const onSearch = async () => {
|
|
|
onOptionInit((data) => {
|
|
|
getMarkerTree({ subjectCode: data?.subject || '', mainNumber: data?.question, name: '' })
|
|
|
})
|
|
|
+
|
|
|
+const dialogTitle = computed(() => {
|
|
|
+ let target = (subjectList.value || []).find((item: any) => {
|
|
|
+ return item.code == model.subjectCode
|
|
|
+ })
|
|
|
+ return `${target?.code} - ${target?.name}`
|
|
|
+})
|
|
|
+const questionName = computed(() => {
|
|
|
+ let target = (mainQuestionList.value || []).find((item: any) => {
|
|
|
+ return item.mainNumber == model.mainNumber
|
|
|
+ })
|
|
|
+ return `${target?.label}`
|
|
|
+})
|
|
|
+const previewChecked = ref('')
|
|
|
+const sendHandler = () => {
|
|
|
+ const checked: any = treeRef?.value?.getCheckedNodes()
|
|
|
+ if (!checked.length) {
|
|
|
+ ElMessage.error('请选择评卷员')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ previewChecked.value = checked
|
|
|
+ .filter((person: any) => !!person.name)
|
|
|
+ .map((person: any) => {
|
|
|
+ return `第${person.markingGroupNumber}组:${person.name}`
|
|
|
+ })
|
|
|
+ .join('; ')
|
|
|
+ console.log('checked:', checked)
|
|
|
+ forceCheckVisible.value = true
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+.dialog-body-wrap {
|
|
|
+ .choose-list-box {
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ border-radius: 6px;
|
|
|
+ padding: 20px;
|
|
|
+ max-height: 600px;
|
|
|
+ overflow: auto;
|
|
|
+ .row {
|
|
|
+ display: flex;
|
|
|
+ line-height: 28px;
|
|
|
+ .label {
|
|
|
+ width: 90px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .val {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .q-title {
|
|
|
+ margin-bottom: 15px;
|
|
|
+ img {
|
|
|
+ height: 20px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ color: #444;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
.top-box {
|
|
|
height: 395px;
|
|
|
.tree-card {
|