diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..2a0de1c --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,48 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..3546835 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js index 93aa92d..a14dc00 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -18,6 +18,8 @@ module.exports = antfu( 'unused-imports/no-unused-vars': 'off', 'unused-imports/no-unused-imports': 'off', 'jsdoc/require-returns-description': 'off', + "jsdoc/check-param-names": "off", + 'jsdoc/require-param-name': 'off', 'eqeqeq': 'off', 'vue/custom-event-name-casing': 'off', 'vue/eqeqeq': 'off', @@ -26,6 +28,7 @@ module.exports = antfu( process.env.MODE === 'production' ? 2 : 0, ], 'array-callback-return': ['error', { allowImplicit: true }], + curly: ['off'] }, }, ) diff --git a/src/api/dictionary/index.ts b/src/api/dictionary/index.ts index 58ef25e..2444479 100644 --- a/src/api/dictionary/index.ts +++ b/src/api/dictionary/index.ts @@ -274,7 +274,6 @@ export async function getIzprojecttypeList(enabled: string) { /** * 获取发布地区 - * @param enabled * @returns */ export async function getIzvisitcityList() { diff --git a/src/api/final/index.ts b/src/api/final/index.ts index c60dce5..e959c3c 100644 --- a/src/api/final/index.ts +++ b/src/api/final/index.ts @@ -65,6 +65,7 @@ export async function repetitionTask() { /** * 获取小结重复列表 + * @param params * @returns */ export async function getRepeatList(params: FinalParam) { diff --git a/src/api/home/filter.ts b/src/api/home/filter.ts index 17305e2..c9207ca 100644 --- a/src/api/home/filter.ts +++ b/src/api/home/filter.ts @@ -3,8 +3,12 @@ import type { FilterCondition, FilterParam, FilterSearchParam, FilterUpdate, Pag /** * 获取过滤条件列表 - * @param params - * @returns 1 + * + * @param page + * @param searchParam + * @param type + * @returns + * */ export async function getConditionList(page: PageParam, searchParam: FilterSearchParam, type: number): Promise { const res = await http.request({ @@ -52,7 +56,7 @@ export async function updateCondition(params: FilterUpdate) { /** * 删除过滤条件 - * @param params + * @param { ids: string } params * @returns */ export async function deleteCondition(params: { ids: string }) { @@ -90,7 +94,7 @@ export async function setFilter(params: FilterParam): Promise { /** * 收藏 - * @param params + * @param searchid * @returns */ export async function favorite(searchid: string): Promise { @@ -103,7 +107,7 @@ export async function favorite(searchid: string): Promise { /** * 取消收藏 - * @param params + * @param searchid * @returns */ export async function unfavorite(searchid: string): Promise { diff --git a/src/api/task/task.ts b/src/api/task/task.ts index bfc7a85..bcbbb09 100644 --- a/src/api/task/task.ts +++ b/src/api/task/task.ts @@ -1,7 +1,4 @@ -import qs from 'qs' import { http } from '@/utils/http/axios' -import type { ApprovalParam, PageParam } from '/#/api' -import { ContentTypeEnum } from '@/enums/httpEnum' /** * 获取审核列表 diff --git a/src/components/NotPassed.vue b/src/components/NotPassed.vue index baef5f7..7d6a84d 100644 --- a/src/components/NotPassed.vue +++ b/src/components/NotPassed.vue @@ -22,7 +22,6 @@ const cardStyle = { } function showModal(value) { - console.log(value) state.detail = value show.value = true } @@ -54,8 +53,6 @@ async function handleSumbit(e: MouseEvent) { // selectRejectId.value === 'other' // emit('commit', unref(comomitValue), unref(selectBackId), showOther.value) - console.log(state.detail) - console.log(comomitValue) const param = { formid: [state.detail.id], taskId: ['66b06dda-e673-11ee-a934-0242bc74e4f3'], @@ -87,7 +84,6 @@ onBeforeMount(async () => { }) async function selectChange(id) { - console.log(id, 'selectChange') selectItem.value = reasonOptions.value.find(v => v.id == id) } diff --git a/src/components/RichEditor/Quill.vue b/src/components/RichEditor/Quill.vue index 471eeba..3d482bb 100644 --- a/src/components/RichEditor/Quill.vue +++ b/src/components/RichEditor/Quill.vue @@ -30,9 +30,7 @@ function initHandler() { queryNote().then((res) => { if (res.data) note.value = res.data.notecontent - - console.log('note:', note.value) - }).catch(e => console.log(e)) + }).catch(e => console.error('Quill file -> Error in initHandler function', e)) } const saveHandler = debounce(() => { diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index 479b7d6..19a5e8c 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -122,8 +122,6 @@ const layout = debounce(() => { // } // el.value!.scrollTo({ top: height, behavior: 'instant' }) loading = false - console.log('loading---------------', loading) - console.log('pagination.pageNo---------------', pagination.pageNo) if (pagination.pageNo == 3) { let timer if (timer) @@ -131,7 +129,6 @@ const layout = debounce(() => { timer = setTimeout(() => { isTop.value = false - console.log('isTop.value---------------', isTop.value) }, 1000) } }) @@ -152,7 +149,6 @@ useInfiniteScroll( el as any, () => { loading = false - console.log('加载了000000000000000---------------------------') loadMore() }, { distance: 10, canLoadMore: () => canloadMore }, @@ -161,23 +157,11 @@ useInfiniteScroll( 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 }) - const { data, pageCount } = result - // canloadMore = pageCount >= pagination.pageNo && pageCount > 0; + const { data } = result canloadMore = data.pages >= pagination.pageNo && data.pages > 0 - console.log('canloadMore------------', canloadMore) return result.data.records - // const list = data.map((item) => { - // return { - // imgUrl: randomUrl(), - // } - // }) - // return list } catch (error) { canloadMore = false @@ -186,14 +170,12 @@ async function featchList() { } async function loadMore() { - 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() } @@ -246,25 +228,10 @@ function imUpdateSelectIds(x: number, y: number, w: number, h: number) { if (rect.right > x && rect.bottom > y && rect.left < x + w && rect.top < y + h) index === -1 && selectIds.value.push(item.dataset.id!) else index !== -1 && selectIds.value.splice(index, 1) - - // let tempApproveIndex = -1; - // selectedApproveItems.value.map((approveItem, approveIndex) => { - // console.log("approveItem and item", approveItem, item ); - // if(approveItem.selfId == item.dataset.id) { - // tempApproveIndex = approveIndex; - // } - // }) - // if (tempApproveIndex === -1 && item.className.indexOf('grid-item-selected') != -1) { - // let tempItem: any = cloneDeep(item); - // tempItem.selfId = item.dataset.id; - // selectedApproveItems.value.push(tempItem) - // } else { - // selectedApproveItems.value.splice(tempApproveIndex, 1); - // } }) selectedApproveItems.value = [] // 选中复选框 - listData.value.map((item) => { + listData.value.forEach((item) => { if (selectIds.value.includes(String(item.pictureId))) { item.checked = true selectedApproveItems.value.push(item) @@ -450,7 +417,6 @@ async function commit() { } } function remove() { - // console.log("finally-selectedApproveItems------------", selectedApproveItems.value); if (!selectIds.value || selectIds.value.length === 0) { message.error('至少选中一个') return @@ -530,7 +496,6 @@ function approvalHandler(items?: any) { // 任务包图片 => 点击 => 通过/不通过按钮 if (items !== undefined && !(items instanceof PointerEvent)) processItems = [items] - console.log('batch-------------', batch.value, selectedApproveItems.value, processItems) const msg = validate(processItems) if (msg !== null) { @@ -603,7 +568,6 @@ async function refreshHandler(filtersearchId?: any) { useInfiniteScroll( el as any, () => { - console.log('加载了333333333333333333333333---------------------------') loadMore() }, { distance: 10, canLoadMore: () => canloadMore }, @@ -617,13 +581,11 @@ watch(() => show.value, async (newVal) => { pagination.pageNo = 1 const list = await featchList() listData.value = list - console.log('加载了1111111111111---------------------------', listData.value) layout() } }) watch(() => pagination.pageNo, (newVal, oldVal) => { - console.log('加载了22222222222222222---------------------------', newVal, oldVal, canloadMore) if (newVal == oldVal) return diff --git a/src/layout/components/Menu/index.vue b/src/layout/components/Menu/index.vue index edf26a4..41dfddb 100644 --- a/src/layout/components/Menu/index.vue +++ b/src/layout/components/Menu/index.vue @@ -68,14 +68,11 @@ export default defineComponent({ return v }) } - console.log(userInfo.frontmenuTList, 'frontmenuTList') - console.log(menus.value, 'menus') updateSelectedKeys() } // 点击菜单 function clickMenuItem(key: string) { - console.log('clickMenuItem', key) if (/http(s)?:/.test(key)) window.open(key) else router.push({ name: key }) diff --git a/src/router/guards.ts b/src/router/guards.ts index 905d19e..471bbb8 100644 --- a/src/router/guards.ts +++ b/src/router/guards.ts @@ -85,7 +85,6 @@ export function createRouterGuards(router: Router) { router.afterEach((to, _, failure) => { document.title = (to?.meta?.title as string) || document.title if (isNavigationFailure(failure)) { - // console.log('failed navigation', failure) } const asyncRouteStore = useAsyncRoute() // 在这里设置需要缓存的组件名称 @@ -108,7 +107,6 @@ export function createRouterGuards(router: Router) { }) router.onError((error) => { - // eslint-disable-next-line no-console - console.log(error, '路由错误') + console.error(error, '路由错误') }) } diff --git a/src/store/modules/final.ts b/src/store/modules/final.ts index 49ee281..82ba5ee 100644 --- a/src/store/modules/final.ts +++ b/src/store/modules/final.ts @@ -56,7 +56,6 @@ export const useFinalStore = defineStore({ actions: { setSystemConfig(config: AsideConfig) { this.systemConfig = config - console.log('systemConfig----------', config) }, setAsideValue(value) { this.asideValue = value @@ -82,16 +81,11 @@ export const useFinalStore = defineStore({ }, // 获取系统配置信息 async fetchConfig() { - // const response = await getConfig() - // console.log("response.data----------", response.data); - // this.setSystemConfig(response.data) - // return response.data const list: any = {} const tempAsideMap = cloneDeep(asideMap) - Object.keys(tempAsideMap).map((key) => { + Object.keys(tempAsideMap).forEach((key) => { list[key] = 'Y' }) - console.log('setSystemConfig---------------', list) this.setSystemConfig(list) return list }, @@ -100,7 +94,6 @@ export const useFinalStore = defineStore({ const res = await getFilter(1) const { data } = res const list = data && data.searchcount ? data.searchcount.split(',') : [] - console.log('listkey---------------', list) this.customConfig = list return list }, diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 1c0613d..9c77ccd 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -150,7 +150,6 @@ export const useUserStore = defineStore({ }, // 刷新token async refreshToken() { - // console.log('refresh token!') const response = await refreshToken() const { data: token, code } = response if (code === ResultEnum.SUCCESS) diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index 86a3dfc..e3d3624 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -203,7 +203,6 @@ const transform: AxiosTransform = { const config = response.config const whitelist = ['/api/captcha/captchatoken', '/api/captcha/captchaImage', '/api/backstage/adminlogin', '/api/oauthweb/token', '/api/web/smslogin/login', '/api/web/smslogin/sendcode', '/api/ocr/sUser/selectSUser'] const expirationTime = storage.get(TOKEN_EXPIRATION_TIME) - // console.log('剩余失效时间(分):', (expirationTime - Date.now()) / 1000 / 60, config.url) if (expirationTime && (expirationTime - Date.now()) <= 0 && !whitelist.includes(config.url as string)) { if (!isRefreshingToken) { @@ -231,7 +230,6 @@ const transform: AxiosTransform = { } else { return new Promise((resolve) => { - // console.log('刷新token中,暂存此请求:', config.url) requests.push((token) => { (config as Recordable).headers.logintoken = token resolve(instance(config)) // 执行请求, diff --git a/src/views/final/aside/Aside.vue b/src/views/final/aside/Aside.vue index 9bbe0e9..9e99bc0 100644 --- a/src/views/final/aside/Aside.vue +++ b/src/views/final/aside/Aside.vue @@ -115,36 +115,6 @@ onBeforeMount(async () => { nextTick(() => { finalStore.$subscribe(() => { - // const customConfig = finalStore.getCustomConfig; - // console.log("customConfig订阅aside---------------", customConfig); - // if (customConfig === null) return; - - // const showKeys: string[] = [...customConfig]; - // // const defaultKeys = Object.keys(asideMap).filter( - // // (key) => asideMap[key].isDefaultFilter - // // ); - // // showKeys.unshift(...defaultKeys); - - // Object.keys(asideMap).forEach((key) => { - // // 设置显示的或者默认显示的 - // if (key.startsWith("iz")) - // asideVisible[key] = - // asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter); - // }); - - // const items = showKeys.reduce((acc, key) => { - // if (asideMap[key]) { - // const config = { - // key, - // config: asideMap[key], - // }; - // return [...acc, config]; - // } else { - // return acc; - // } - // }, []); - // console.log("showItems111111111---------------", items); - // showItems.value = items; const config = finalStore.getSystemConfig const customConfig = finalStore.getCustomConfig if ( @@ -152,20 +122,16 @@ nextTick(() => { && isEqual(configFilterRef.value, finalStore.getFilterConfig) && customObjRef.value && isEqual(customObjRef.value, customTempObjRef.value) - ) + ) { return + } - if (config == null || customConfig == null) + if (config == null || customConfig == null) { return - // console.log("config", config, "customConfig", customConfig); - /* rao - const showKeys = [...customConfig].filter(key => !asideMap[key].isDefaultFilter)// 获取customConfig 非isDefaultFilter的选项 - const defaultKeys = Object.keys(asideMap).filter(key => asideMap[key].isDefaultFilter)// 获取asideMap isDefaultFilter的选项 - showKeys.unshift(...defaultKeys) - */ + } const sortKeyList: any = [] - finalStore.getFilterConfig.map((item: any) => { + finalStore.getFilterConfig.forEach((item: any) => { sortKeyList.push(item?.id) }) const showKeys = [...sortKeyList] @@ -178,16 +144,14 @@ nextTick(() => { }) if (customObjRef.value) { // 赋值 - Object.keys(customObjRef.value).map((key) => { - if (asideMap.hasOwnProperty(key)) { + Object.keys(customObjRef.value).forEach((key) => { + if (Object.prototype.hasOwnProperty.call(asideMap, key)) { const str = key.toLowerCase() - // console.log("customObjRef.value[str]1111111111111", customObjRef.value[str]); if (str == 'izsimilarity') { if (typeof customObjRef.value[str] == 'string') customObjRef.value[str] = customObjRef.value[str].split(',') asideValue[key] = customObjRef.value[str] // 赋值 - console.log('相似度2222222222', asideValue[key]) } else if (str == 'izyear') { if (typeof customObjRef.value[str] == 'string') { @@ -197,12 +161,8 @@ nextTick(() => { customObjRef.value[str] = time } asideValue[key] = customObjRef.value[str] // 赋值 - console.log('时间2222222222', asideValue[key]) } else if (customObjRef.value[str]) { - console.log('customObjRef.value[str]222222', customObjRef.value[str]) - // let list = customObjRef.value[str].split(','); - // console.log("list222222", list); if (typeof customObjRef.value[str] == 'string') { customObjRef.value[str] = customObjRef.value[str].split(',') asideValue[key] = customObjRef.value[str] // 赋值 @@ -218,13 +178,9 @@ nextTick(() => { } }) customTempObjRef.value = customObjRef.value - console.log('asideValue直接处理后的结果', asideValue) - console.log('customTempObjRef.value', customTempObjRef.value) const tempobj = cloneDeep(asideValue) - console.log('tempObj', tempobj) finalStore.setAsideValue(tempobj) } - // console.log("showKeys", showKeys); const items = showKeys.reduce((acc, key) => { const currentData = asideMap[key] const render = currentData?.render @@ -241,7 +197,6 @@ nextTick(() => { return acc } }, []) - console.log('showItems=================================', items) showItems.value = items configFilterRef.value = finalStore.getFilterConfig }) @@ -277,16 +232,14 @@ function scrollHandler(key: string) { async function filterHandler(searchId: string) { emitter.emit('filter-final', searchId) const res = await getFilterList({ userSearchId: searchId }) - // console.log("顾虑结果", res); if (res.code == 'OK') { const obj = res.data customObjRef.value = res.data const showKeys: any[] = [] - Object.keys(obj).map((key) => { - if (asideMap.hasOwnProperty(key)) + Object.keys(obj).forEach((key) => { + if (Object.prototype.hasOwnProperty.call(asideMap, key)) showKeys.push(key) }) - console.log('showKeys1111111111111111', showKeys) finalStore.setCustomConfig(showKeys) } } @@ -305,7 +258,6 @@ function inputChange(keyword) { emit('inputChange', keyword) } function handleOk(item: any) { - console.log('handleOk', item) if (item) { AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname) filterHandler(item.id) @@ -317,27 +269,17 @@ function handleOk(item: any) { } function updateComponent(key, e) { - console.log('跟新值', key, e) - console.log('tempAsideValue跟新值', finalStore.getAsideValue, asideValue) // let tempAsideValue = finalStore.getAsideValue || asideValue; const tempobj = cloneDeep(asideValue) - console.log(tempobj, 'tempobj') tempobj[key] = e - console.log(tempobj, 'tempobj After') customObjRef.value = tempobj // asideValue = Object.assign({}, asideValue, tempobj); - console.log('asideValue跟新值', tempobj) finalStore.setAsideValue(tempobj) }