|
@@ -10,7 +10,7 @@
|
|
|
<template #form-item-short>
|
|
|
<div class="flex items-center" style="width: 100%">
|
|
|
<span style="color: #666; width: 60px; font-size: 12px">快捷方式</span>
|
|
|
- <base-select
|
|
|
+ <!-- <base-select
|
|
|
v-model="shortQueryConfigIndex"
|
|
|
class="flex-1"
|
|
|
clearable
|
|
@@ -18,7 +18,34 @@
|
|
|
:options="customQueryConfigList?.map((v, i) => ({ label: v.name, value: i }))"
|
|
|
@clear="fastParamClear"
|
|
|
@change="fastParamChange"
|
|
|
- ></base-select>
|
|
|
+ ></base-select> -->
|
|
|
+ <el-select
|
|
|
+ v-model="shortQueryConfigIndex"
|
|
|
+ class="flex-1"
|
|
|
+ clearable
|
|
|
+ value-key="secretNumber"
|
|
|
+ @clear="fastParamClear"
|
|
|
+ @change="fastParamChange"
|
|
|
+ >
|
|
|
+ <el-option v-for="(v, i) in customQueryConfigList" :key="i" :label="v.name" :value="i">
|
|
|
+ <div class="flex items-center justify-between">
|
|
|
+ <span>{{ v.name }}</span>
|
|
|
+ <el-popconfirm
|
|
|
+ width="220"
|
|
|
+ confirm-button-text="确定"
|
|
|
+ cancel-button-text="取消"
|
|
|
+ title="是否删除该快捷方式?"
|
|
|
+ @confirm="deleteFastQuery(v, i)"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <el-button type="primary" style="height: 26px" size="small" @click.stop="() => {}"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </div>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
</template>
|
|
|
</base-form>
|
|
@@ -40,7 +67,7 @@
|
|
|
/** 阅卷-自定义查询 */
|
|
|
import { computed, reactive, ref, watch, inject } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-import { ElButton, ElInput } from 'element-plus'
|
|
|
+import { ElButton, ElInput, ElSelect, ElOption, ElPopconfirm, ElMessage } from 'element-plus'
|
|
|
import { omit } from 'lodash-es'
|
|
|
import { filterEmpty } from '@/utils/common'
|
|
|
import BaseForm from '@/components/element/BaseForm.vue'
|
|
@@ -79,7 +106,7 @@ const model = reactive<FormModel>({
|
|
|
subjectCode: dataModel.subject,
|
|
|
mainNumber: dataModel.question,
|
|
|
markingGroupNumber: dataModel.group,
|
|
|
- checked: void 0,
|
|
|
+ checked: false,
|
|
|
arbitration: false,
|
|
|
markerId: void 0,
|
|
|
scoreEnd: void 0,
|
|
@@ -455,6 +482,18 @@ const onSetCustomQueryConfig = async () => {
|
|
|
console.error(error)
|
|
|
}
|
|
|
}
|
|
|
+const deleteFastQuery = (v: any, i: number) => {
|
|
|
+ console.log(i, shortQueryConfigIndex.value)
|
|
|
+ useFetch('deleteCustomQuery')
|
|
|
+ .fetch({ id: v.id })
|
|
|
+ .then(() => {
|
|
|
+ ElMessage.success('删除成功')
|
|
|
+ if (i == shortQueryConfigIndex.value) {
|
|
|
+ shortQueryConfigIndex.value = void 0
|
|
|
+ getCustomQueryConfigList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|