diff --git a/src/views/task/modal/CustomFieldModal.vue b/src/views/task/modal/CustomFieldModal.vue index 107c241..c551181 100644 --- a/src/views/task/modal/CustomFieldModal.vue +++ b/src/views/task/modal/CustomFieldModal.vue @@ -2,9 +2,7 @@ import { cloneDeep, difference } from 'lodash-es' import { computed, defineEmits, defineProps, onMounted, ref, watch } from 'vue' import { VueDraggable } from 'vue-draggable-plus' -import { useMessage } from 'naive-ui' import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter' -import { workPackageMap } from '@/config/workorder' import { useUser } from '@/store/modules/user' const props = defineProps({ @@ -17,8 +15,6 @@ const props = defineProps({ const emit = defineEmits(['onOk']) -const message = useMessage() - // 左侧隐藏列表 const offList = ref([]) // 右侧显示列表 @@ -38,66 +34,6 @@ const selectCount = computed(() => { return `显示字段(共${onList.value.length}个)` }) -function generatList() { - const keys = Object.keys(workPackageMap) - let showList: object[] = [] - const hideList: object[] = [] - const showStr = 'status' - const showKeys = showStr.split(',').map((key: string) => key.toLowerCase()) - - for (const key of keys) { - const name = workPackageMap[key]?.label - const isDefault = workPackageMap[key]?.isDefault - - // 系统配置为Y且不是默认配置 - if (!isDefault) { - hideList.push({ - id: key, - name: name || '未配置', - fix: isDefault, - checked: workPackageMap[key].isDefault, - }) - } - } - - showList = showKeys.reduce((acc, key) => { - const config = { - id: key, - name: workPackageMap[key].label || '未配置', - fix: workPackageMap[key].isDefault, - } - return [...acc, config] - }, []) - - const fixedList = generateDefaultList() - - hideList.unshift(...fixedList) - showList.unshift(...fixedList) - - onList.value = showList - offList.value = hideList - return { showList, hideList } -} - -function generateDefaultList() { - return Object.keys(workPackageMap).reduce((acc, key) => { - const { label, isDefault } = workPackageMap[key] - - if (isDefault) { - const config = { - id: key, - name: label || '未配置', - fix: true, - checked: true, - } - return [...acc, config] - } - else { - return acc - } - }, []) -} - const show = ref(false) const checkAll = computed(() => { let baseNum = 0 @@ -137,8 +73,6 @@ defineExpose({ showModal, }) -// generatList(); - const selectIds = ref([]) function onCheckAllChange(value) { @@ -181,8 +115,7 @@ function onCheckChange(checked: any, item: any) { offList.value[currentIndex].checked = checked if (index === -1 && checked) selectIds.value.push(item.id) - else - selectIds.value.splice(index, 1) + else selectIds.value.splice(index, 1) } const showIds = computed(() => { diff --git a/src/views/worksheet/content/Content.vue b/src/views/worksheet/content/Content.vue index 7d4ba0b..094d600 100644 --- a/src/views/worksheet/content/Content.vue +++ b/src/views/worksheet/content/Content.vue @@ -16,7 +16,7 @@ import { useInfiniteScroll } from '@vueuse/core' import { format } from 'date-fns' import imagesloaded from 'imagesloaded' import { clone, cloneDeep, debounce, pickBy } from 'lodash-es' -import { useDialog, useMessage, useModal } from 'naive-ui' +import { useDialog, useMessage } from 'naive-ui' import { computed, onMounted, @@ -37,7 +37,6 @@ const message = useMessage() const dialog = useDialog() const totalCount = ref(0) let _imagesload: any -const modal = useModal() function setBatch(value: boolean) { if (value && batch.value) @@ -161,7 +160,6 @@ async function featchList() { totalCount.value = total canloadMore = pageCount >= taskpagination.pageNo && pageCount > 0 - console.log(data, 'dataaaaaaaaaa') return data } catch (error) { @@ -319,14 +317,13 @@ function onEsc(event) { } // 双击x键审核不通过 if (code === 'KeyX') { - console.log('keyx') const currentKTime = Date.now() - console.log(currentKTime - keyXLastTime) if (currentKTime - keyXLastTime < 500) handleRejectMainImage() - else keyXLastTime = currentKTime + + else + keyXLastTime = currentKTime } - // console.log('keyp') } function resizeImage() {