diff --git a/.vscode/settings.json b/.vscode/settings.json
index 65d1d01..947c6ee 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -38,5 +38,6 @@
"json",
"jsonc",
"yaml"
- ]
+ ],
+ "vue3snippets.enable-compile-vue-file-on-did-save-code": true
}
diff --git a/src/App.vue b/src/App.vue
index 3fa67ec..edb37dd 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,13 +1,13 @@
@@ -59,10 +57,10 @@ const getThemeOverrides = computed(() => {
:date-locale="dateZhCN"
:theme-overrides="getThemeOverrides"
>
-
-
-
-
+
+
+
+
@@ -80,14 +78,28 @@ const getThemeOverrides = computed(() => {
color: #666666 !important;
font-size: 14px !important;
}
-::v-deep(.n-base-clear > .n-base-clear__clear){
+::v-deep(.n-base-clear > .n-base-clear__clear) {
color: #c9c9c9 !important;
}
-.n-form-item.n-form-item--top-labelled .n-form-item-label{
+.n-form-item.n-form-item--top-labelled .n-form-item-label {
flex-direction: row-reverse !important;
justify-content: flex-end !important;
}
-.n-form-item .n-form-item-label .n-form-item-label__asterisk{
- transform:rotate(-90deg) !important;
+.n-form-item .n-form-item-label .n-form-item-label__asterisk {
+ transform: rotate(-90deg) !important;
+}
+.n-scrollbar-content {
+ padding: 0 7.97px 0 4px;
+}
+.n-form-item .n-form-item-label {
+ font-size: 14px !important;
+ color: #333333 !important;
+}
+.n-slider-dots > .n-slider-dot:nth-child(2) {
+ display: none !important;
+}
+.n-collapse-item-arrow i svg {
+ width: 14px !important;
+ height: 14px !important;
}
diff --git a/src/components/Approval/NotPassed.vue b/src/components/Approval/NotPassed.vue
index 7d3ea14..111b839 100644
--- a/src/components/Approval/NotPassed.vue
+++ b/src/components/Approval/NotPassed.vue
@@ -4,7 +4,7 @@ import { useMessage } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { audit } from '@/api/task/task'
-const emit = defineEmits(['success'])
+const emit = defineEmits(['success','close'])
const message = useMessage()
const loading = ref(false)
@@ -42,6 +42,11 @@ function showModal(value) {
function closeModal() {
show.value = false
+ emit('close')
+
+ formData.disposeTypeId='262403670085013522'
+ formData.failCauseId= '260402999231251188'
+ formData.comment= ''
}
defineExpose({
@@ -113,6 +118,9 @@ async function handleSumbit(e: MouseEvent) {
}
}
})
+ formData.disposeTypeId='262403670085013522'
+ formData.failCauseId= '260402999231251188'
+ formData.comment= ''
}
async function selectChange(id) {
diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue
index 459189e..46688d4 100644
--- a/src/layout/components/Header/RecycleModal.vue
+++ b/src/layout/components/Header/RecycleModal.vue
@@ -111,11 +111,17 @@ watch(viewMode, () => {
layout()
})
+onBeforeMount(async () => {
+
+})
+
let canloadMore = true
useInfiniteScroll(
el as any,
() => {
+ loading = false
+ console.log("加载了000000000000000---------------------------");
loadMore()
},
{ distance: 10, canLoadMore: () => canloadMore },
@@ -125,13 +131,15 @@ async function featchList() {
loading = true
try {
// const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value })
+ console.log("pagination.pageNo------------", pagination.pageNo);
const result = await dubiousfilelist({ ...pagination, ...sortObj })
// TODO:测试数据
// result.data = Array.from({ length: 30 })
- result.pageCount = 1
const { data, pageCount } = result
- pagination.pageNo += 1
- canloadMore = pageCount >= pagination.pageNo
+ // canloadMore = pageCount >= pagination.pageNo && pageCount > 0;
+ canloadMore = data.pages >= pagination.pageNo && data.pages > 0;
+ console.log("canloadMore------------", canloadMore);
+
return result.data.records
// const list = data.map((item) => {
// return {
@@ -141,18 +149,23 @@ async function featchList() {
// return list
}
catch (error) {
+ canloadMore = false;
return []
}
}
async function loadMore() {
- console.log("执行l------------------------", loading, el.value);
+
+ console.log("执行l------------------------", loading, el.value, pagination.pageNo);
if (loading || el.value == null)
return
// loading = true
+ pagination.pageNo = pagination.pageNo + 1;
const more = await featchList()
+ console.log("more------------------------", more);
listData.value.push(...more)
+ layout()
}
onUpdated(() => {
@@ -170,11 +183,6 @@ onUpdated(() => {
layout()
})
-onBeforeMount(async () => {
- // const list = await featchList()
- // listData.value = list
-})
-
let start: { x: number, y: number } | null = null
let selectionBox: HTMLDivElement | null
const selectIds = ref([])
@@ -308,7 +316,7 @@ function upHandler(event: MouseEvent) {
listData.value.map(item => {
item.checked = false;
});
- batch.value = false;
+ // batch.value = false;
}
}
@@ -351,7 +359,7 @@ function afterLeave() {
removeListeners()
}
-onMounted(() => {
+onMounted(async() => {
show.value && addListeners()
removeDom()
})
@@ -476,7 +484,7 @@ function rejectHandler() {
function reset() {
batch.value = false;
// pagination.pageNo = 1;
- pagination.pageNo = 0;
+ pagination.pageNo = 1;
pagination.pageSize = 20;
selectIds.value = [];
selectedApproveItems.value.length = 0;
@@ -489,13 +497,13 @@ function validate(items: any[]) {
return null;
}
function approvalHandler(items?: any) {
- if (batch.value) {
+ // if (batch.value) {
processItems = selectedApproveItems.value
- }
+ // }
// 任务包图片 => 点击 => 通过/不通过按钮
if (items !== undefined && !(items instanceof PointerEvent))
processItems = [items]
-
+ console.log("batch-------------",batch.value,selectedApproveItems.value,processItems);
const msg = validate(processItems)
if (msg !== null) {
@@ -553,9 +561,10 @@ function reloadList() {
async function refreshHandler(filtersearchId?: any) {
// 注释 rao start
reset()
+ pagination.pageNo = 1;
const list = await featchList()
listData.value = list
- // layout()
+ layout()
// 注释 rao end
// reset();
@@ -568,6 +577,7 @@ async function refreshHandler(filtersearchId?: any) {
useInfiniteScroll(
el as any,
() => {
+ console.log("加载了333333333333333333333333---------------------------");
loadMore();
},
{ distance: 10, canLoadMore: () => canloadMore }
@@ -576,6 +586,36 @@ async function refreshHandler(filtersearchId?: any) {
});
}
+watch(() => show.value,
+ async(newVal) => {
+ if(show.value) {
+ pagination.pageNo = 1;
+ const list = await featchList()
+ listData.value = list
+ console.log("加载了1111111111111---------------------------", listData.value);
+ layout()
+ }
+ },
+)
+
+
+watch(() => pagination.pageNo,
+ (newVal, oldVal) => {
+ if(newVal == oldVal) {
+ return
+ }
+ if((newVal == 1 || newVal == 2) && canloadMore) {
+ setTimeout(() => {
+ nextTick(() => {
+ console.log("加载了22222222222222222---------------------------", newVal);
+ loading = false
+ loadMore();
+ })
+ }, 500)
+ }
+ },
+);
+
diff --git a/src/layout/components/Header/index.vue b/src/layout/components/Header/index.vue
index d9d301c..6b0b8b9 100644
--- a/src/layout/components/Header/index.vue
+++ b/src/layout/components/Header/index.vue
@@ -198,12 +198,10 @@ export default defineComponent({
-
当前位置:{{ routename }}