Merge pull request '一检问题修改' (#290) from fix/change_task into test

Reviewed-on: #290
pull/292/head
赵辉 1 year ago
commit b9179b00b8

@ -1080,7 +1080,7 @@ defineExpose({
background: url(/src/assets/images/pocitypass.png) no-repeat; background: url(/src/assets/images/pocitypass.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
border-radius: 17px; border-radius: 17px;
box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3); // box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

@ -826,7 +826,7 @@ defineExpose({
background: url(/src/assets/images/pocitypass.png) no-repeat; background: url(/src/assets/images/pocitypass.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
border-radius: 17px; border-radius: 17px;
box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3); // box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

@ -72,6 +72,7 @@ const pagination = reactive({
pageNo: 0, pageNo: 0,
pageSize: 30, pageSize: 30,
}) })
function onCheckChange(checked: any, item: any) { function onCheckChange(checked: any, item: any) {
const index = selectItems.value.indexOf(item) const index = selectItems.value.indexOf(item)
item.checked = checked item.checked = checked
@ -122,7 +123,10 @@ onMounted(() => {
taskIndex.value = route.query.taskindex as string taskIndex.value = route.query.taskindex as string
isDetail.value = true isDetail.value = true
getDetail() getDetail()
} }
window.addEventListener('keydown', onEsc)
}) })
function changeimgbigshow() { function changeimgbigshow() {
@ -131,12 +135,7 @@ function changeimgbigshow() {
// //
useKeydown('right', forwardHandler) useKeydown('right', forwardHandler)
useKeydown('left', backHandler) useKeydown('left', backHandler)
useKeydown('c', () => {
isFullScreen.value = false
imgbigshow.value = false
const modal = unref(imgdetailref)! as any
modal.closeModal()
})
useKeydown('p p', () => { useKeydown('p p', () => {
const item = taskDetailInfo.value const item = taskDetailInfo.value
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) { if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
@ -439,10 +438,22 @@ function showActionsModal() {
const modal = unref(CustomSettingModalRef)! as any const modal = unref(CustomSettingModalRef)! as any
modal.showModal() modal.showModal()
} }
function onEsc(event: KeyboardEvent) {
if (event.code === 'KeyC') {
const modal = unref(MapModalRef)! as any
const modal2 = unref(imgdetailref)! as any
modal?.closeModal()
modal2?.closeModal()
imgbigshow.value = true
isFullScreen.value = false
}
}
onUnmounted(() => { onUnmounted(() => {
taskStore.reset() taskStore.reset()
window.removeEventListener('keydown', onEsc)
window.removeEventListener('scroll', checkBottom) window.removeEventListener('scroll', checkBottom)
}) })
function immersionHandler() { function immersionHandler() {

@ -105,18 +105,6 @@ function nopassfun(e= taskDetailInfo.value){
emit('nopassfun', e); emit('nopassfun', e);
// closeModal() // closeModal()
} }
useKeydown('c', () => {
closeModal()
})
useKeydown('p p', () => {
passfun()
})
useKeydown('x x', () => {
nopassfun()
})
onMounted(async () => { onMounted(async () => {

@ -37,11 +37,6 @@ function closeModal(){
show.value=false show.value=false
} }
useKeydown('c', () => {
closeModal()
})
onMounted(async () => { onMounted(async () => {

@ -313,7 +313,8 @@ function leaveTaskHandler() {
overTask.value = null overTask.value = null
} }
function onEsc(event: KeyboardEvent) { function onEsc(event: KeyboardEvent) {
const eles = ['INPUT', 'TEXTAREA']
const eles = ['INPUT', 'TEXTAREA']
const keys = ['KeyC', 'KeyP', 'KeyX'] const keys = ['KeyC', 'KeyP', 'KeyX']
const code = event.code const code = event.code
if (!(event.target instanceof Element)) if (!(event.target instanceof Element))

Loading…
Cancel
Save