chore: remove log and fix eslint error

refactor/project
LiZhong 1 year ago
parent a0e7b1fe5d
commit 34119160fd

8
.idea/.gitignore vendored

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,48 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="15">
<item index="0" class="java.lang.String" itemvalue="PyMuPDF" />
<item index="1" class="java.lang.String" itemvalue="scikit-image" />
<item index="2" class="java.lang.String" itemvalue="shapely" />
<item index="3" class="java.lang.String" itemvalue="opencv-contrib-python" />
<item index="4" class="java.lang.String" itemvalue="opencv-python" />
<item index="5" class="java.lang.String" itemvalue="cython" />
<item index="6" class="java.lang.String" itemvalue="numpy" />
<item index="7" class="java.lang.String" itemvalue="attrdict" />
<item index="8" class="java.lang.String" itemvalue="imgaug" />
<item index="9" class="java.lang.String" itemvalue="premailer" />
<item index="10" class="java.lang.String" itemvalue="lxml" />
<item index="11" class="java.lang.String" itemvalue="visualdl" />
<item index="12" class="java.lang.String" itemvalue="openpyxl" />
<item index="13" class="java.lang.String" itemvalue="lanms-neo" />
<item index="14" class="java.lang.String" itemvalue="Polygon3" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N802" />
<option value="N806" />
<option value="N812" />
<option value="N801" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="image_tools.image_similarity.calculate" />
<option value="float.*" />
</list>
</option>
</inspection_tool>
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="$PROJECT_DIR$/../../../webutils/ai/PaddleOCR/.conda" project-jdk-type="Python SDK" />
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

@ -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']
},
},
)

@ -274,7 +274,6 @@ export async function getIzprojecttypeList(enabled: string) {
/**
*
* @param enabled
* @returns
*/
export async function getIzvisitcityList() {

@ -65,6 +65,7 @@ export async function repetitionTask() {
/**
*
* @param params
* @returns
*/
export async function getRepeatList(params: FinalParam) {

@ -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<any> {
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<void> {
/**
*
* @param params
* @param searchid
* @returns
*/
export async function favorite(searchid: string): Promise<void> {
@ -103,7 +107,7 @@ export async function favorite(searchid: string): Promise<void> {
/**
*
* @param params
* @param searchid
* @returns
*/
export async function unfavorite(searchid: string): Promise<void> {

@ -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'
/**
*

@ -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)
}
</script>

@ -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(() => {

@ -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

@ -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 })

@ -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, '路由错误')
})
}

@ -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
},

@ -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)

@ -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)) // 执行请求,

@ -115,36 +115,6 @@ onBeforeMount(async () => {
nextTick(() => {
finalStore.$subscribe(() => {
// const customConfig = finalStore.getCustomConfig;
// console.log("customConfigaside---------------", 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)
}
</script>
<template>
<div
class="aside"
:style="asideStyle"
@mouseenter="asideEnter = true"
@mouseleave="asideEnter = false"
>
<div class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false">
<div v-show="showCollapse" class="aside-collapse">
<div class="aside-collapse-btn" @click="collapseHandler">
<SvgIcon :name="collapseIcon" size="40" />
@ -347,31 +289,20 @@ function updateComponent(key, e) {
<div class="aside-header">
<!-- 搜索跳转模块 -->
<Search
v-show="showSearch"
@select="scrollHandler"
@close="setShowSearch(false)"
@input-change="inputChange"
v-show="showSearch" @select="scrollHandler" @close="setShowSearch(false)" @input-change="inputChange"
@show-search="setShowSearch(true)"
/>
<!-- 高级筛选 -->
<AdvanceFilter
v-show="!showSearch"
ref="AdvanceFilterRef"
:type="1"
@select="filterHandler"
@update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)"
v-show="!showSearch" ref="AdvanceFilterRef" :type="1" @select="filterHandler"
@update:search="setShowSearch(true)" @show-custom="showModal(customModalRef)"
@show-filter="showModal(filterModalRef)"
/>
</div>
<component
:is="item.config.component"
v-for="(item, index) in showItems"
:id="item.key"
:key="index"
v-model:value="asideValue[item.key]"
:label="item.config.label"
:is="item.config.component" v-for="(item, index) in showItems" :id="item.key" :key="index"
v-model:value="asideValue[item.key]" :label="item.config.label"
@update:value="(e) => updateComponent(item.key, e)"
/>
@ -379,9 +310,7 @@ function updateComponent(key, e) {
<CustomFilterModalVue ref="customModalRef" />
<!-- 过滤列表 -->
<FilterModal
ref="filterModalRef"
@edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)"
ref="filterModalRef" @edit-filter="editFilter" @show-new-filter="showModal(newFilterModalRef)"
@handle-ok="handleOk"
/>
<!-- 新增过滤 -->
@ -433,17 +362,11 @@ function updateComponent(key, e) {
right: -20px;
}
::v-deep(.n-collapse
.n-collapse-item.n-collapse-item--right-arrow-placement
.n-collapse-item__header
.n-collapse-item-arrow) {
::v-deep(.n-collapse .n-collapse-item.n-collapse-item--right-arrow-placement .n-collapse-item__header .n-collapse-item-arrow) {
margin-left: 8px;
}
::v-deep(.n-collapse
.n-collapse-item
.n-collapse-item__header
.n-collapse-item__header-main) {
::v-deep(.n-collapse .n-collapse-item .n-collapse-item__header .n-collapse-item__header-main) {
font-weight: bold;
justify-content: space-between;
}
@ -456,18 +379,11 @@ function updateComponent(key, e) {
border-top: 0px;
}
::v-deep(.n-collapse
.n-collapse-item
.n-collapse-item__content-wrapper
.n-collapse-item__content-inner) {
::v-deep(.n-collapse .n-collapse-item .n-collapse-item__content-wrapper .n-collapse-item__content-inner) {
padding-top: 10px;
}
::v-deep(.n-scrollbar
> .n-scrollbar-rail.n-scrollbar-rail--vertical
> .n-scrollbar-rail__scrollbar, .n-scrollbar
+ .n-scrollbar-rail.n-scrollbar-rail--vertical
> .n-scrollbar-rail__scrollbar) {
::v-deep(.n-scrollbar > .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar, .n-scrollbar + .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar) {
width: 0px;
}
}

@ -13,6 +13,13 @@ const selectIds = ref<string[]>([])
const tempList = ref<string[]>([])
const extraCustomConfig: any = []
//
const offList = ref<any[]>([])
//
const onList = ref<any[]>([])
const offKeyword = ref('')
const onKeyword = ref('')
Object.keys(asideMap).forEach((key) => {
const { isDefaultFilter } = asideMap[key]
if (isDefaultFilter)
@ -26,8 +33,6 @@ function showModal() {
const config = finalStore.getSystemConfig
const customConfig = finalStore.getCustomConfig
console.log('开启了啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦筛选条件----------------', config, customConfig)
console.log('开启了啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦筛选条件----------------', tempList.value, finalStore.getFilterConfig)
if (config == null || customConfig == null)
return
if (tempList.value.length > 0 && isEqual(tempList.value, finalStore.getFilterConfig))
@ -35,7 +40,6 @@ function showModal() {
const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList)
console.log('tempList.value开启了lllllllllllllllllll', showList, hideList)
if (tempList.value.length > 0)
finalStore.setFilterConfig(tempList.value)
@ -52,11 +56,6 @@ function closeModal() {
show.value = false
}
//
const offList = ref<any[]>([])
//
const onList = ref<any[]>([])
const allCount = computed(() => {
return `全部筛选(共${offList.value.length}个)`
})
@ -90,39 +89,16 @@ function generateDefaultList(config) {
}
function generatList(config, customConfig) {
const keys = Object.keys(config)
let onList: object[] = []
const offList: any = []
const showKeys = []
const showKeys: any[] = []
const tempShowKeys = [...customConfig, ...extraCustomConfig]
tempShowKeys.map((item) => {
tempShowKeys.forEach((item) => {
if (!showKeys.includes(item))
showKeys.push(item)
})
console.log('原始筛选条件showKeys', showKeys)
console.log('原始筛选条件config customConfig', config, customConfig)
// for (const key of keys) {
// if (!key.startsWith('iz') || config[key] === 'N' || asideMap[key] === undefined)
// continue
// const name = asideMap[key]?.label
// const isDefaultFilter = asideMap[key]?.isDefaultFilter
// // Y
// if (!isDefaultFilter) {
// const isChecked = asideMap[key].isDefaultFilter || showKeys.includes(key)
// offList.push({
// id: key,
// name: name || '',
// fix: isDefaultFilter,
// checked: isChecked,
// })
// if (isChecked && !selectIds.value.includes(key))
// isChecked && selectIds.value.push(key)
// }
// }
Object.keys(asideMap).map((key) => {
Object.keys(asideMap).forEach((key) => {
const name = asideMap[key]?.label
const isDefaultFilter = asideMap[key]?.isDefaultFilter
@ -158,41 +134,30 @@ function generatList(config, customConfig) {
return acc
}
}, [])
console.log('原始筛选条件onList', onList)
const fixedList = generateDefaultList(config)
// offList.unshift(...fixedList)
console.log('原始筛选条件fixedList', fixedList)
onList.unshift(...fixedList)
console.log('原始筛选条件customConfig', customConfig)
// onListcustomConfig
const tempOnList = cloneDeep(onList)
console.log('原始筛选条件tempOnList', tempOnList)
const sortKeyList: any = []
finalStore.getFilterConfig.map((item: any) => {
console.log('tFilterConfig item000000000000000', item)
finalStore.getFilterConfig.forEach((item: any) => {
sortKeyList.push(item.id)
})
console.log('原始筛选条件sortKeyList', sortKeyList)
console.log('原始筛选条件showKeys', showKeys)
const sortList: any = []
if (sortKeyList.length > 0) {
sortKeyList.map((key) => {
sortKeyList.forEach((key) => {
const tempItem = tempOnList.find(item => item.id == key)
if (tempItem)
sortList.push(tempItem)
})
}
else {
showKeys.map((key) => {
showKeys.forEach((key) => {
const tempItem = tempOnList.find(item => item.id == key)
if (tempItem)
sortList.push(tempItem)
})
}
console.log('原始筛选条件showList', sortList)
console.log('原始筛选条件hideList', offList)
console.log('原始筛选条件configStore.getFilterConfig', finalStore.getFilterConfig)
// return { showList: onList, hideList: offList }
return { showList: sortList, hideList: offList }
}
@ -203,20 +168,16 @@ finalStore.$subscribe(() => {
if (config == null || customConfig == null)
return
console.log('订阅tempList.value-----------', tempList.value)
console.log('订阅finalStore.getFilterConfig-----------', finalStore.getFilterConfig)
if (tempList.value.length > 0 && isEqual(tempList.value, finalStore.getFilterConfig))
return
const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList)
console.log('订阅克隆条件', tempList.value)
if (tempList.value.length > 0)
finalStore.setFilterConfig(tempList.value)
// setTimeout(() => {
// }, 500);
console.log('订阅showList, hideList-----------', showList, hideList)
onList.value = showList
offList.value = hideList
})
@ -229,16 +190,13 @@ async function handleSumbit(e: MouseEvent) {
await setFilter({ searchcount: param, type: 1 })
const obj = await finalStore.fetchCustomConfig()
console.log('obj-------------------------------', obj)
const tempOnList = cloneDeep(onList.value)
console.log('提交筛选条件tempOnList', tempOnList)
const sortList: any = []
obj.map((key) => {
obj.forEach((key) => {
const tempItem = tempOnList.find(item => item.id == key)
if (tempItem)
sortList.push(tempItem)
})
console.log('finalStore.sortList提交---------------', sortList)
// setTimeout(() => {
if (sortList.length > 0)
finalStore.setFilterConfig(sortList)
@ -353,9 +311,6 @@ function removeHandler(id: string) {
onList.value.splice(index, 1)
}
const offKeyword = ref('')
const onKeyword = ref('')
const leftInputHandler = debounce((keyword) => {
offKeyword.value = keyword
}, 300)
@ -364,19 +319,6 @@ const rightInputHandler = debounce((keyword) => {
onKeyword.value = keyword
}, 300)
// async function getfield() {
// let res
// res = await getAllfieldList(3)
// const userStore = useUser()
// const userInfo = userStore.getUserInfo
// res = await getfieldList(3, userInfo.id)
// }
function onMove(e) {
// e
if (e?.related?.className?.indexOf('fix') !== -1)
return false
}
onMounted(() => {
// getfield()
})

@ -251,7 +251,6 @@ const tableRef = ref<InstanceType<typeof NDataTable>>()
onMounted(() => {
nextTick(() => {
console.log(tableRef.value, 'tableRef')
})
})
@ -288,14 +287,12 @@ function onEnd(event: SortableEvent) {
// -1+1
const order = insertafter ? index - 1 : index + 1
// console.log('dragid:', dragId, 'order:', order)
sort(dragId, order)
}
function onMove(evt: any) {
relatedId = evt.related?.dataset?.id
insertafter = evt.willInsertAfter
// console.log(`${evt.dragged.dataset.id},${evt.related}`, 'insertafter', evt.willInsertAfter)
}
function destory() {

@ -54,14 +54,6 @@ async function query() {
sortname: '',
})
const { data } = result
// console.log(data)
// // const list = []
// // data.forEach((items) => {
// // items.repeatedTaskList.forEach((item) => {
// // list.push(item)
// // })
// // })
// console.log(data)
emit('reject', data)
closeModal()
}

@ -190,8 +190,6 @@ async function query(page: number, pageSize: number) {
pageNo: pagination.page,
sortname: '',
})
console.log(666666)
console.log(result)
const { data, pageCount, totalCount } = result
total.value = totalCount
@ -288,7 +286,6 @@ function batchApproval() {
message.error(msg)
return
}
console.log(items)
const list: any = []
items.forEach((item) => {
list.push({

@ -483,7 +483,6 @@ const message = useMessage()
const finalStore = useFinal()
async function query(page: number, pageSize: number, filterId?: any, taskName?: string) {
console.log('query', taskName)
const asideParmas = unref(finalStore.getAsideValue)
// 使使
// let params = filterId ? { userSearchId: filterId } : asideParmas
@ -498,7 +497,7 @@ async function query(page: number, pageSize: number, filterId?: any, taskName?:
taskName,
...params,
})
const { data, pageCount, totalCount } = result
const { data, totalCount } = result
tableData.value = data
total.value = totalCount
pagination.page = page
@ -708,7 +707,7 @@ function resetHandler() {
// TODO
// const result = await resetApproval()
},
onNegativeClick: () => {},
onNegativeClick: () => { },
})
}
@ -749,7 +748,6 @@ function batchApproval() {
message.error(msg)
return
}
console.log(items)
const list: any = []
items.forEach((item) => {
list.push({
@ -774,7 +772,6 @@ function batchApproval() {
//
function repeatBatchReject(items) {
console.log(items)
rejectHandler(items)
}
@ -815,7 +812,7 @@ function doAudit(param: any) {
}
})
},
onNegativeClick: () => {},
onNegativeClick: () => { },
})
}
@ -860,7 +857,6 @@ async function refreshHandler(searchId?: any) {
if (id_param)
searchKeyword = id_param[0].slice(1, -1)
}
console.log('refreshHandler', searchKeyword)
query(pagination.page, pagination.pageSize, searchId, searchKeyword)
}
@ -869,8 +865,10 @@ function filterTableData(keyword) {
pagination.pageSize = 10
if (keyword) {
query(pagination.page, pagination.pageSize, '', keyword)
else
}
else {
query(pagination.page, pagination.pageSize)
}
}
defineExpose({
@ -883,20 +881,10 @@ defineExpose({
<div class="wrapper-header">
<div class="wrapper-header-left">
<span class="wrapper-header-font">任务管理列表</span>
<SvgIcon
style="cursor: pointer"
size="16"
name="list-mode"
@click="changeContent"
/>
<SvgIcon style="cursor: pointer" size="16" name="list-mode" @click="changeContent" />
</div>
<div>
<SvgIcon
style="margin-right: 6px"
size="13"
name="summary"
@click="showModal(repeatModalRef)"
/>
<SvgIcon style="margin-right: 6px" size="13" name="summary" @click="showModal(repeatModalRef)" />
<NButton class="xjcc" text @click="showModal(repeatModalRef)">
小结查重
</NButton>
@ -916,27 +904,16 @@ defineExpose({
</NButton>
<img
class="btn-approval btn-left"
src="@/assets/images/task/btn-not-pass.png"
alt=""
class="btn-approval btn-left" src="@/assets/images/task/btn-not-pass.png" alt=""
@click.stop="batchReject"
>
<SvgIcon size="24" name="vs" />
<img
class="btn-approval"
src="@/assets/images/task/btn-pass.png"
alt=""
@click.stop="batchApproval"
>
<img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" @click.stop="batchApproval">
</div>
<n-popover
ref="popover"
:style="{ padding: '0px' }"
style="width: 148px"
:show-arrow="false"
placement="bottom-start"
trigger="click"
ref="popover" :style="{ padding: '0px' }" style="width: 148px" :show-arrow="false"
placement="bottom-start" trigger="click"
>
<template #trigger>
<div class="icon-wrap">
@ -977,46 +954,22 @@ defineExpose({
</div>
</div> -->
<div class="wrapper-settings">
<SvgIcon
style="cursor: pointer"
size="18"
name="column"
@click="showModal(customTabelRef)"
/>
<SvgIcon style="cursor: pointer" size="18" name="column" @click="showModal(customTabelRef)" />
</div>
<div class="wrapper-content">
<NDataTable
id="table"
ref="tableRef"
v-model:checked-row-keys="checkedRowKeys"
remote
:columns="columnsRef"
:scroll-x="scrollX"
:max-height="maxHeight"
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="rowKey"
@update:page="handlePageChange"
@update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
@update:sorter="handleSorterChange"
id="table" ref="tableRef" v-model:checked-row-keys="checkedRowKeys" remote :columns="columnsRef"
:scroll-x="scrollX" :max-height="maxHeight" :data="tableData" :loading="loading" :pagination="pagination"
:row-key="rowKey" @update:page="handlePageChange" @update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck" @update:sorter="handleSorterChange"
/>
</div>
<CustomTabelModal ref="customTabelRef" @commit="commitHandler" />
<ImportExcelModal
ref="importExcelRef"
:on-success="sucessHandler"
:header-config="headRules"
/>
<ImportExcelModal ref="importExcelRef" :on-success="sucessHandler" :header-config="headRules" />
<NotPassed ref="notPassModalRef" @success="reload" />
<RepeatModal
ref="repeatModalRef"
@reject="repeatBatchReject"
@viewrepeat="showModal(repeatTaskTableModalRef)"
/>
<RepeatModal ref="repeatModalRef" @reject="repeatBatchReject" @viewrepeat="showModal(repeatTaskTableModalRef)" />
<RepeatTaskTableModal ref="repeatTaskTableModalRef" />
</div>
</template>

@ -9,9 +9,7 @@ import {
ref,
shallowRef,
unref,
watch,
} from 'vue'
import dayjs from 'dayjs'
import { cloneDeep, isEqual } from 'lodash-es'
import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from './comp/modals'
import Search from './comp/Search.vue'
@ -19,11 +17,9 @@ import AdvanceFilter from './comp/AdvanceFilter.vue'
import { getViewportOffset } from '@/utils/domUtils'
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import { useConfig } from '@/store/modules/asideConfig'
import type { Filter } from '/#/home'
import type { AsideEntity } from '@/config/aside'
import { asideMap } from '@/config/aside'
import type { AsideConfig } from '/#/api'
import emitter from '@/utils/mitt'
import { getFilterList } from '@/api/home/main'
const configStore = useConfig()
@ -57,9 +53,7 @@ function showModal(modalRef: any) {
onMounted(() => {
nextTick(() => {
computeSlideHeight()
const tempAsideValue = cloneDeep(asideValue)
// configStore.setAsideValue(tempAsideValue);
console.log('asideMap和asideValue', tempAsideValue)
})
})
@ -115,7 +109,6 @@ nextTick(() => {
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
@ -143,13 +136,11 @@ nextTick(() => {
// if (asideMap.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(customObjRef.value, 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') {
@ -159,16 +150,13 @@ nextTick(() => {
customObjRef.value[str] = time
}
asideValue[key] = customObjRef.value[str] //
console.log('时间2222222222', asideValue[key])
}
else if (
str != 'izsimilarity'
&& str != 'izyear'
&& customObjRef.value[str]
) {
console.log('customObjRef.value[str]222222', customObjRef.value[str])
// let list = customObjRef.value[str].split(',');
// console.log("list222222", list);
asideValue[key] = customObjRef.value[str] //
}
else {
@ -179,33 +167,28 @@ nextTick(() => {
return key
})
customTempObjRef.value = customObjRef.value
console.log('asideValue直接处理后的结果', asideValue)
console.log('customTempObjRef.value', customTempObjRef.value)
const tempobj = cloneDeep(asideValue)
console.log('tempObj', tempobj)
configStore.setAsideValue(tempobj)
}
// console.log("showKeys", showKeys);
const items = showKeys.reduce((acc, key) => {
const currentData = asideMap[key]
const render = currentData?.render
if (render !== false) {
const str = key?.toLowerCase()
const o = {
key: str,
config: asideMap[str],
};
return [...acc, o];
} else {
return acc;
}
}, []);
console.log("showItems=================================", items);
showItems.value = items;
configFilterRef.value = configStore.getFilterConfig;
});
const o = {
key: str,
config: asideMap[str],
}
return [...acc, o]
}
else {
return acc
}
}, [])
showItems.value = items
configFilterRef.value = configStore.getFilterConfig
})
})
const asideEnter = ref(false)
@ -236,7 +219,6 @@ function scrollHandler(key: string) {
async function filterHandler(searchId: string) {
// emitter.emit('filter', searchId)
const res = await getFilterList({ userSearchId: searchId })
// console.log("", res);
if (res.code == 'OK') {
const obj = res.data
customObjRef.value = res.data
@ -249,7 +231,6 @@ async function filterHandler(searchId: string) {
return key
})
// console.log(showKeys);
configStore.setCustomConfig(showKeys)
}
}
@ -261,21 +242,14 @@ function editFilter(filter: any) {
}
function updateComponent(key, e) {
console.log('跟新值', key, e)
console.log('tempAsideValue跟新值', configStore.getAsideValue, asideValue)
// let tempAsideValue = configStore.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)
configStore.setAsideValue(tempobj)
}
function handleOk(item: any) {
console.log('handleOk', item)
if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname)
filterHandler(item.id)
@ -285,20 +259,10 @@ function handleOk(item: any) {
filterHandler('')
}
}
// watch(asideValue, (newVal) => {
// console.log("asideValue", newVal);
// configStore.setAsideValue(newVal)
// }, { deep: true })
</script>
<template>
<div
class="aside"
:style="asideStyle"
@mouseenter="asideEnter = true"
@mouseleave="asideEnter = false"
>
<div class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false">
<div v-show="showCollapse" class="aside-collapse">
<div class="aside-collapse-btn" @click="collapseHandler">
<SvgIcon :name="collapseIcon" size="40" />
@ -307,38 +271,24 @@ function handleOk(item: any) {
<n-scrollbar trigger="none">
<div class="aside-header">
<!-- 搜索跳转模块 -->
<Search
v-show="showSearch"
@select="scrollHandler"
@close="setShowSearch(false)"
/>
<Search v-show="showSearch" @select="scrollHandler" @close="setShowSearch(false)" />
<!-- 高级筛选 -->
<AdvanceFilter
v-show="!showSearch"
ref="AdvanceFilterRef"
:type="0"
@select="filterHandler"
@update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)"
v-show="!showSearch" ref="AdvanceFilterRef" :type="0" @select="filterHandler"
@update:search="setShowSearch(true)" @show-custom="showModal(customModalRef)"
@show-filter="showModal(filterModalRef)"
/>
</div>
<component
:is="item.config?.component"
v-for="item in showItems"
:id="item.key"
:key="item.key"
v-model:value="asideValue[item.key]"
:label="item.config?.label"
:is="item.config?.component" v-for="item in showItems" :id="item.key" :key="item.key"
v-model:value="asideValue[item.key]" :label="item.config?.label"
@update:value="(e) => updateComponent(item.key, e)"
/>
<!-- 过滤列表 -->
<FilterModalVue
ref="filterModalRef"
@edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)"
ref="filterModalRef" @edit-filter="editFilter" @show-new-filter="showModal(newFilterModalRef)"
@handle-ok="handleOk"
/>
<!-- 新增过滤 -->
@ -392,17 +342,11 @@ function handleOk(item: any) {
right: -20px;
}
::v-deep(.n-collapse
.n-collapse-item.n-collapse-item--right-arrow-placement
.n-collapse-item__header
.n-collapse-item-arrow) {
::v-deep(.n-collapse .n-collapse-item.n-collapse-item--right-arrow-placement .n-collapse-item__header .n-collapse-item-arrow) {
margin-left: 8px;
}
::v-deep(.n-collapse
.n-collapse-item
.n-collapse-item__header
.n-collapse-item__header-main) {
::v-deep(.n-collapse .n-collapse-item .n-collapse-item__header .n-collapse-item__header-main) {
font-weight: bold;
justify-content: space-between;
}
@ -415,18 +359,11 @@ function handleOk(item: any) {
border-top: 0px;
}
::v-deep(.n-collapse
.n-collapse-item
.n-collapse-item__content-wrapper
.n-collapse-item__content-inner) {
::v-deep(.n-collapse .n-collapse-item .n-collapse-item__content-wrapper .n-collapse-item__content-inner) {
padding-top: 10px;
}
::v-deep(.n-scrollbar
> .n-scrollbar-rail.n-scrollbar-rail--vertical
> .n-scrollbar-rail__scrollbar, .n-scrollbar
+ .n-scrollbar-rail.n-scrollbar-rail--vertical
> .n-scrollbar-rail__scrollbar) {
::v-deep(.n-scrollbar > .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar, .n-scrollbar + .n-scrollbar-rail.n-scrollbar-rail--vertical > .n-scrollbar-rail__scrollbar) {
width: 0px;
}
}

@ -13,8 +13,12 @@ const emit = defineEmits<{
(e: 'update:value', value: string[]): void
}>()
const isLoadValue = ref(false)
const configUseStore = useConfig()
const formValue = ref({
plans: props.value,
})
configUseStore.$subscribe(() => {
if (isLoadValue.value) {
isLoadValue.value = false
@ -24,17 +28,13 @@ configUseStore.$subscribe(() => {
if (asideValue.izApprovalStatus && typeof asideValue.izApprovalStatus == 'string') {
const list = asideValue.izApprovalStatus.split(',')
formValue.value.plans = list
console.log('formValue.value.izApprovalStatus', formValue.value.plans)
}
else {
formValue.value.plans = []
}
})
const formValue = ref({
plans: props.value,
})
if (typeof formValue.value.plans == 'string') {
const list = formValue.value.plans.split(',')
const list = (formValue.value.plans as string).split(',')
formValue.value.plans = list
}
const rules: FormRules = {
@ -57,7 +57,6 @@ onBeforeMount(async () => {
const list = await configStore.fetchizApprovalStatusList()
options.value = list
})
const isLoadValue = ref(false)
function onChange(value: Array<string>) {
isLoadValue.value = true
emit('update:value', value)

@ -1,6 +1,6 @@
<script lang="ts" setup>
import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui'
import { onBeforeMount, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
@ -13,6 +13,11 @@ const emit = defineEmits<{
(e: 'update:value', value: string[]): void
}>()
const formValue = ref({
plans: props.value,
})
const isLoadValue = ref(false)
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
@ -29,22 +34,16 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izcustomlevel
}
console.log('formValue.value.izcustomlevel', formValue.value.plans)
}
else {
formValue.value.plans = []
}
})
const formValue = ref({
plans: props.value,
})
if (typeof formValue.value.plans == 'string') {
const list = formValue.value.plans.split(',')
const list = (formValue.value.plans as string).split(',')
formValue.value.plans = list
}
console.log('formValue.value.izcustomlevel22222', formValue.value.plans)
const rules: FormRules = {
plans: [
@ -66,7 +65,6 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzcustomlevelList()
options.value = list
})
const isLoadValue = ref(false)
function onChange(value: Array<string>) {
isLoadValue.value = true
emit('update:value', value)

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izcustomname
}
console.log('formValue.value.izcustomname', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izcustomtype
}
console.log('formValue.value.izcustomtype', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izcustomtypes
}
console.log('formValue.value.izcustomtypes', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izproductname
}
console.log('formValue.value.izproductname', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -30,7 +30,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izproject
}
console.log('formValue.value.izproject', formValue.value.plans)
}
else {
formValue.value.plans = []
@ -52,7 +51,6 @@ finalStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izproject
}
console.log('formValue.value.izproject', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izprojecttype
}
console.log('formValue.value.izprojecttype', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izsearch
}
console.log('formValue.value.izsearch', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izsearchmanager
}
console.log('formValue.value.izsearchmanager', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izshow
}
console.log('formValue.value.izshow', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -30,7 +30,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izstatus
}
console.log('formValue.value.izstatus', formValue.value.plans)
}
else {
formValue.value.plans = []
@ -52,7 +51,6 @@ finalStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izstatus
}
console.log('formValue.value.izstatus', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -1,8 +1,9 @@
<script lang="ts" setup>
import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui'
import { onBeforeMount, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { isString } from '@/utils/is'
const props = defineProps<{
value: string[] | null
@ -15,6 +16,11 @@ const emit = defineEmits<{
const configUseStore = useConfig()
const formValue = ref({
plans: props.value,
})
const isLoadValue = ref(false)
configUseStore.$subscribe(() => {
if (isLoadValue.value) {
isLoadValue.value = false
@ -29,17 +35,13 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izvisitcity
}
console.log('formValue.value.izvisitcity', formValue.value.plans)
}
else {
formValue.value.plans = []
}
})
const formValue = ref({
plans: props.value,
})
if (typeof formValue.value.plans == 'string') {
const list = formValue.value.plans.split(',')
if (isString(formValue.value.plans)) {
const list = (formValue.value.plans as string).split(',')
formValue.value.plans = list
}
const rules: FormRules = {
@ -62,7 +64,6 @@ onBeforeMount(async () => {
const list = await configStore.fetchizvisitcityList()
options.value = list
})
const isLoadValue = ref(false)
function onChange(value: Array<string>) {
isLoadValue.value = true
emit('update:value', value)

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izfiled17
}
console.log('formValue.value.izfiled17', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izfiled2
}
console.log('formValue.value.izfiled2', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izfiled3
}
console.log('formValue.value.izfiled3', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izfiled6
}
console.log('formValue.value.izfiled6', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izfirm
}
console.log('formValue.value.izfirm', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -17,7 +17,6 @@ const emit = defineEmits<{
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
console.log('isLoadValue.value', isLoadValue.value, 'configUseStore.getAsideValue', configUseStore.getAsideValue)
if (isLoadValue.value) {
isLoadValue.value = false
return
@ -31,7 +30,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.iztaskrrom
}
console.log('formValue.value.iztaskrrom', formValue.value.plans)
}
else {
formValue.value.plans = []
@ -53,7 +51,6 @@ finalStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.iztaskrrom
}
console.log('formValue.value.iztaskrrom', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -29,7 +29,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.iztaskstatus
}
console.log('formValue.value.iztaskstatus', formValue.value.plans)
}
else {
formValue.value.plans = []

@ -1,8 +1,9 @@
<script lang="ts" setup>
import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui'
import { onBeforeMount, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { isString } from '@/utils/is'
const props = defineProps<{
value: string[] | null
@ -13,7 +14,11 @@ const emit = defineEmits<{
(e: 'update:value', value: string[]): void
}>()
const formValue = ref({
plans: props.value,
})
const configUseStore = useConfig()
const isLoadValue = ref(false)
configUseStore.$subscribe(() => {
if (isLoadValue.value) {
@ -29,17 +34,13 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izvisitpro
}
console.log('formValue.value.izvisitpro', formValue.value.plans)
}
else {
formValue.value.plans = []
}
})
const formValue = ref({
plans: props.value,
})
if (typeof formValue.value.plans == 'string') {
const list = formValue.value.plans.split(',')
if (isString(formValue.value.plans)) {
const list = (formValue.value.plans as string).split(',')
formValue.value.plans = list
}
const rules: FormRules = {
@ -62,7 +63,6 @@ onBeforeMount(async () => {
const list = await configStore.fetchIzvisitproList()
options.value = list
})
const isLoadValue = ref(false)
function onChange(value: Array<string>) {
isLoadValue.value = true
emit('update:value', value)

@ -1,9 +1,10 @@
<script lang="ts" setup>
import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui'
import { onBeforeMount, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
import { isString } from '@/utils/is'
const props = defineProps<{
value: string[] | null
@ -14,6 +15,11 @@ const emit = defineEmits<{
(e: 'update:value', value: string[]): void
}>()
const formValue = ref({
plans: props.value || [],
})
const isLoadValue = ref(false)
const configUseStore = useConfig()
configUseStore.$subscribe(() => {
@ -30,7 +36,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izplan
}
console.log('formValue.value.izplan', formValue.value.plans)
}
else {
formValue.value.plans = []
@ -52,18 +57,14 @@ finalStore.$subscribe(() => {
else {
formValue.value.plans = asideValue.izplan
}
console.log('formValue.value.izplan', formValue.value.plans)
}
else {
formValue.value.plans = []
}
})
const formValue = ref({
plans: props.value || [],
})
if (typeof formValue.value.plans == 'string') {
const list = formValue.value.plans.split(',')
if (isString(formValue.value.plans)) {
const list = (formValue.value.plans as string).split(',')
formValue.value.plans = list
}
const rules: FormRules = {
@ -86,7 +87,6 @@ onBeforeMount(async () => {
const planList = await configStore.fetchPlanList()
planOptons.value = planList
})
const isLoadValue = ref(false)
function onChange(value: Array<string>) {
isLoadValue.value = true
emit('update:value', value)

@ -1,9 +1,10 @@
<script lang="ts" setup>
import { onBeforeMount, onMounted, onUpdated, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui'
import { onBeforeMount, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
import { isString } from '@/utils/is'
const props = defineProps<{
value: string[] | null
@ -16,9 +17,12 @@ const emit = defineEmits<{
const configUseStore = useConfig()
const formValue = ref({
users: props.value || [],
})
const isLoadValue = ref(false)
configUseStore.$subscribe(() => {
const asideValue = configUseStore.getAsideValue
console.log('asideValue接受到的', asideValue)
if (isLoadValue.value) {
isLoadValue.value = false
return
@ -31,7 +35,6 @@ configUseStore.$subscribe(() => {
else {
formValue.value.users = asideValue.izupuser
}
console.log('formValue.value.users1111111111', formValue.value.users)
}
else {
formValue.value.users = []
@ -39,9 +42,9 @@ configUseStore.$subscribe(() => {
})
const finalStore = useFinal()
finalStore.$subscribe(() => {
const asideValue = finalStore.getAsideValue
console.log('asideValue接受到的', asideValue)
if (isLoadValue.value) {
isLoadValue.value = false
return
@ -54,21 +57,15 @@ finalStore.$subscribe(() => {
else {
formValue.value.users = asideValue.izupuser
}
console.log('formValue.value.users222222222222222', formValue.value.users)
}
else {
formValue.value.users = []
}
})
const formValue = ref({
users: props.value || [],
})
if (typeof formValue.value.users == 'string') {
const list = formValue.value.users.split(',')
const list = isString(formValue.value.users) ? (formValue.value.users as string).split(',') : []
formValue.value.users = list
}
console.log('formValue.value.users2222222222222', formValue.value.users)
const rules: FormRules = {
users: [
{
@ -90,9 +87,7 @@ onBeforeMount(async () => {
personOptions.value = personList
})
const isLoadValue = ref(false)
function onChange(value: Array<string>) {
console.log('user选中 ', value)
isLoadValue.value = true
emit('update:value', value)
}

@ -13,6 +13,8 @@ const emit = defineEmits<{
const configUseStore = useConfig()
const isLoadValue = ref(false)
const range = ref<[number, number]>(props.value || [])
configUseStore.$subscribe(() => {
if (isLoadValue.value) {
isLoadValue.value = false
@ -24,19 +26,16 @@ configUseStore.$subscribe(() => {
else
range.value = [0, 100]
console.log(range.value, 'range.value')
// else {
// range.value = [0, 100];
// }
})
const range = ref<[number, number]>(props.value || [])
const marks = {
0: '0',
50: '50',
100: '100',
}
const isLoadValue = ref(false)
function onChange(value: number & number[]) {
range.value = value as any
isLoadValue.value = true

@ -1,6 +1,6 @@
<script lang="ts" setup>
import dayjs from 'dayjs'
import { onMounted, onUpdated, ref, watch } from 'vue'
import { onMounted, ref } from 'vue'
import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
@ -15,6 +15,8 @@ const emit = defineEmits<{
const configUseStore = useConfig()
const isLoadValue = ref(false)
const time = ref<[number, number] | null>(props.value)
configUseStore.$subscribe(() => {
if (isLoadValue.value) {
isLoadValue.value = false
@ -26,7 +28,6 @@ configUseStore.$subscribe(() => {
else
time.value = null
})
const finalStore = useFinal()
finalStore.$subscribe(() => {
if (isLoadValue.value) {
@ -34,15 +35,12 @@ finalStore.$subscribe(() => {
return
}
const asideValue = finalStore.getAsideValue
console.log('asideValue izyear', asideValue)
if (asideValue && asideValue.izyear)
time.value = asideValue.izyear
else
time.value = null
})
const time = ref<[number, number] | null>(props.value)
const isLoadValue = ref(false)
function onChange(value: [number, number]) {
isLoadValue.value = true
emit('update:value', value)
@ -56,7 +54,6 @@ onMounted(() => {
const startDate = currentDate.subtract(3, 'month').toDate()
//
time.value = [startDate.getTime(), endDate.getTime()]
console.log('time init', startDate.getTime(), endDate.getTime())
setTimeout(() => {
emit('update:value', [startDate.getTime(), endDate.getTime()])
}, 300)

@ -29,15 +29,9 @@ function showModal() {
const config = configStore.getConfig
const customConfig = configStore.getCustomConfig
if (config == null || customConfig == null)
return
if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig))
return
console.log(
'开启了啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦筛选条件----------------',
customConfig,
)
if (config == null || customConfig == null) { return }
if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig)) { return }
const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList)
if (tempList.value.length > 0)
@ -46,7 +40,7 @@ function showModal() {
onList.value = showList
offList.value = hideList
//
checkAll.value = hideList.every(item => item.checked)
checkAll.value = hideList.every((item: any) => item.checked)
//
offKeyword.value = ''
onKeyword.value = ''
@ -136,17 +130,14 @@ function generatList(config, customConfig) {
const fixedList = generateDefaultList(config)
offList.unshift(...fixedList)
onList.unshift(...fixedList)
console.log('原始筛选条件customConfig', customConfig)
// onListcustomConfig
const tempOnList = cloneDeep(onList)
console.log('原始筛选条件tempOnList', tempOnList)
const sortKeyList: any = []
configStore.getFilterConfig.map((item: any) => {
sortKeyList.push(item?.id)
return item
})
console.log('原始筛选条件sortKeyList', sortKeyList)
const sortList: any = []
if (sortKeyList.length > 0) {
sortKeyList.map((key) => {
@ -162,8 +153,6 @@ function generatList(config, customConfig) {
return key
})
}
console.log('原始筛选条件sortList', sortList)
console.log('原始筛选条件configStore.getFilterConfig', configStore.getFilterConfig)
// return { showList: onList, hideList: offList }
return { showList: sortList, hideList: offList }
}
@ -172,16 +161,11 @@ configStore.$subscribe(() => {
const config = configStore.getConfig
const customConfig = configStore.getCustomConfig
if (config == null || customConfig == null)
return
console.log('tempList.value-----------', tempList.value)
console.log('configStore.getFilterConfig-----------', configStore.getFilterConfig)
if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig))
return
if (config == null || customConfig == null) { return }
if (tempList.value.length > 0 && isEqual(tempList.value, configStore.getFilterConfig)) { return }
const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList)
console.log('克隆条件', tempList.value)
if (tempList.value.length > 0)
configStore.setFilterConfig(tempList.value)
@ -201,16 +185,13 @@ async function handleSumbit(e: MouseEvent) {
await setFilter({ searchcount: param, type: 0 })
const obj = await configStore.fetchCustomConfig()
console.log('obj-------------------------------', obj)
const tempOnList = cloneDeep(onList.value)
console.log('原始筛选条件tempOnList', tempOnList)
const sortList: any = []
obj.map((key) => {
const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem)
return key
})
console.log('configStore.sortList---------------', sortList)
// setTimeout(() => {
if (sortList.length > 0)
configStore.setFilterConfig(sortList)
@ -336,16 +317,10 @@ const rightInputHandler = debounce((keyword) => {
}, 300)
async function getfield() {
let res
res = await getAllfieldList(3)
await getAllfieldList(3)
const userStore = useUser()
const userInfo = userStore.getUserInfo
res = await getfieldList(3, userInfo.id)
}
function onMove(e) {
// e
if (e?.related?.className?.indexOf('fix') !== -1)
return false
await getfieldList(3, userInfo.id)
}
onMounted(() => {
@ -355,13 +330,7 @@ onMounted(() => {
<template>
<n-modal v-model:show="show" transform-origin="center" :mask-closable="false">
<n-card
class="cardstyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<n-card class="cardstyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<div class="wrapper">
<span class="wrapper-title">自定义筛选</span>
<div class="wrapper-bar">
@ -373,10 +342,7 @@ onMounted(() => {
<n-grid cols="24" class="mt-4 proCard" responsive="screen" :x-gap="24">
<n-grid-item span="11">
<NCard
:title="allCount"
class="dragcardStyle"
:segmented="{ content: true, footer: true }"
size="small"
:title="allCount" class="dragcardStyle" :segmented="{ content: true, footer: true }" size="small"
:bordered="false"
>
<div class="input_wrap">
@ -385,29 +351,20 @@ onMounted(() => {
<SvgIcon size="14px" name="magnifying-1-color999" />
</template>
</n-input>
<n-scrollbar
style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px"
>
<n-scrollbar style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px">
<div class="draggable-ul">
<div class="draggable-li">
<n-checkbox
v-model:checked="checkAll"
label="全选"
:indeterminate="!checkAll"
v-model:checked="checkAll" label="全选" :indeterminate="!checkAll"
@update:checked="onCheckAllChange"
/>
</div>
<div
v-for="item in offList"
v-show="item.name.includes(offKeyword)"
:key="item.id"
:class="{ 'disable-check': item.fix }"
class="draggable-li"
v-for="item in offList" v-show="item.name.includes(offKeyword)" :key="item.id"
:class="{ 'disable-check': item.fix }" class="draggable-li"
>
<n-checkbox
v-model:checked="item.checked"
:label="item.name"
:disabled="item.fix"
v-model:checked="item.checked" :label="item.name" :disabled="item.fix"
@update:checked="onCheckChange($event, item)"
/>
</div>
@ -421,10 +378,7 @@ onMounted(() => {
</n-grid-item>
<n-grid-item span="11">
<NCard
:title="selectCount"
class="dragcardStyle"
:segmented="{ content: true, footer: true }"
size="small"
:title="selectCount" class="dragcardStyle" :segmented="{ content: true, footer: true }" size="small"
:bordered="false"
>
<template #header-extra>
@ -436,31 +390,17 @@ onMounted(() => {
<SvgIcon size="14px" name="magnifying-1-color999" />
</template>
</n-input>
<n-scrollbar
style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px"
class="scroll"
>
<VueDraggable
v-model="onList"
class="draggable-ul"
:animation="150"
group="shared"
>
<n-scrollbar style="max-height: 500px; border: 1px solid #cad2dd; border-radius: 2px" class="scroll">
<VueDraggable v-model="onList" class="draggable-ul" :animation="150" group="shared">
<div
v-for="item in onList"
v-show="item.name.includes(onKeyword)"
:key="item.id"
:draggable="true"
v-for="item in onList" v-show="item.name.includes(onKeyword)" :key="item.id" :draggable="true"
class="cursor-move draggable-li"
>
<SvgIcon name="drag" size="24" />
<span class="ml-2">{{ item.name }}</span>
<SvgIcon
v-if="!item.fix"
size="16px"
style="display: block; margin-left: auto; cursor: pointer"
name="clear"
@click="removeHandler(item.id)"
v-if="!item.fix" size="16px" style="display: block; margin-left: auto; cursor: pointer"
name="clear" @click="removeHandler(item.id)"
/>
</div>
</VueDraggable>
@ -475,11 +415,7 @@ onMounted(() => {
<n-button type="info" @click="handleSumbit">
确定
</n-button>
<n-button
secondary
style="margin-left: 15px; border: 1px solid #cad2dd"
@click="closeModal"
>
<n-button secondary style="margin-left: 15px; border: 1px solid #cad2dd" @click="closeModal">
取消
</n-button>
</div>
@ -508,9 +444,11 @@ onMounted(() => {
&-footer {
display: flex;
justify-content: flex-end;
.n-button--info-type {
background: #507afd !important;
}
.n-button--default-type {
background: #fff !important;
color: #333333;
@ -537,6 +475,7 @@ onMounted(() => {
.dragcardStyle {
--n-padding-bottom: 0px !important;
--n-padding-left: 0px !important;
::v-deep(.n-card__content) {
padding-left: 0 !important;
padding-right: 0 !important;
@ -586,32 +525,39 @@ onMounted(() => {
--n-padding-top: 0px;
--n-padding-bottom: 12px;
}
::v-deep(.n-card > .n-card-header .n-card-header__main) {
font-weight: lighter !important;
font-size: 14px;
color: #666;
}
::v-deep(.n-scrollbar) {
border-left: 1px solid #cad2dd !important;
border-right: 1px solid #cad2dd !important;
border-bottom: 1px solid #e8e8e8 !important;
border-top: 1px solid #e8e8e8 !important;
}
::v-deep(.n-card__content) {
padding: 20px 24px 0 24px !important;
}
::v-deep(.n-card__footer) {
padding: 0 24px 16px 24px !important;
}
::v-deep(.n-input .n-input-wrapper) {
height: 44px !important;
border: 1px solid #cad2dd !important;
border-bottom: none !important;
// margin-bottom: -3px;
.n-input__input input {
height: 44px !important;
}
}
::v-deep(.n-button--info-type) {
background: #507afd !important;
}

@ -10,11 +10,10 @@ import {
unref,
} from 'vue'
import { NDataTable, useModal } from 'naive-ui'
import type { DataTableColumns, DataTableRowKey } from 'naive-ui'
import type { DataTableColumns, DataTableRowKey, ModalReactive } from 'naive-ui'
import type { SortableEvent } from 'sortablejs'
import Sortable from 'sortablejs'
import { debounce } from 'lodash-es'
import selection from 'naive-ui/es/_internal/selection'
import Action from '../Action.vue'
import { deleteCondition, getConditionList, sort } from '@/api/home/filter'
import type { FilterSearchParam } from '/#/api'
@ -37,10 +36,13 @@ const emit = defineEmits<{
const modal = useModal()
// eslint-disable-next-line ts/ban-ts-comment
// @ts-expect-error
const $message = window.$message
const show = ref(false)
const tableData = ref<Array<RowData>>([])
const cardStyle = {
'width': '808px',
'height': '840px',
@ -58,7 +60,6 @@ interface RowData {
}
function sortData(row) {
console.log('sortData', row)
if (row.order == 'descend') {
tableData.value.sort(
(a, b) =>
@ -165,7 +166,6 @@ const pagination = reactive({
showQuickJumper: true,
prefix: () => `${total.value} 条数据`,
})
const tableData = ref<Array<RowData>>([])
const keyword = ref('')
async function query(page: number, pageSize: number) {
@ -206,19 +206,20 @@ function handleCheck(rowKeys: DataTableRowKey[]) {
}
function select(key: number, id: string) {
let modalInst: ModalReactive | null = null
switch (key) {
case 1:
editSelection(id)
break
case 2:
const modalInst = modal.create({
modalInst = modal.create({
title: '确认提示',
content: '确认删除该条过滤条件吗?',
positiveText: '确定',
negativeText: '取消',
preset: 'dialog',
onPositiveClick: () => deleteSelection(id),
onNegativeClick: () => modalInst.destroy(),
onNegativeClick: () => (modalInst as ModalReactive).destroy(),
})
break
default:
@ -227,11 +228,6 @@ function select(key: number, id: string) {
}
function editSelection(id) {
// const $message = window["$message"];
// if (selectionIds.value.length === 0 || selectionIds.value.length > 1) {
// $message.error("");
// return;
// }
const selectedId = id
const selectedFilter = tableData.value.find((item: any) => {
return item.id === selectedId
@ -321,14 +317,12 @@ function onEnd(event: SortableEvent) {
// -1+1
const order = insertafter ? index - 1 : index + 1
// console.log('dragid:', dragId, 'order:', order)
sort(dragId, order)
}
function onMove(evt: any) {
relatedId = evt.related?.dataset?.id
insertafter = evt.willInsertAfter
// console.log(`${evt.dragged.dataset.id},${evt.related}`, 'insertafter', evt.willInsertAfter)
}
function destory() {
@ -440,8 +434,7 @@ function handleOk() {
<span>已选中
<span style="color: #507afd; font-size: 16px">{{
selectionIds.length
}}</span>
</span>
}}</span></span>
<a @click="selectionIds = []">清空</a>
</div>
</div>
@ -596,8 +589,6 @@ function handleOk() {
position: relative;
left: -80px;
}
.modal_wrapper {
}
::v-deep(.n-input .n-input__input-el) {
height: 24px;
}

@ -279,7 +279,6 @@ function leaveHandler() {
function edit(editFilter: any) {
currentStatus.value = 'edit'
console.log(editFilter, 'editFilter')
const { searchname, ocrUsersearchchildList, id } = editFilter
currentEditId = id
formValue.name = searchname

@ -21,7 +21,6 @@ import {
unref,
watch,
} from 'vue'
import axios from 'axios'
import CheckingTaskModal from './modal/CheckingTaskModal.vue'
import FinishPackageModal from './modal/FinishPackageModal.vue'
import GeneratePackageModal from './modal/GeneratePackageModal.vue'
@ -30,14 +29,13 @@ import PackageSettingsModal from './modal/PackageSettingsModal.vue'
import QueryRepeatedTasksModal from './modal/QueryRepeatedTasksModal.vue'
import type { PictureSortParam } from '/#/api'
import defaultAvatar from '@/assets/icons/avatar.svg'
import baseImg from '@/assets/images/baseImg.png'
import { getImgUrl } from '@/utils/urlUtils'
import emitter from '@/utils/mitt'
import { hideDownload } from '@/utils/image'
import { getViewportOffset } from '@/utils/domUtils'
import { useConfig } from '@/store/modules/asideConfig'
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import { timeOptions, viewOptions } from '@/config/home'
import { viewOptions } from '@/config/home'
import avatar from '@/assets/images/avatar.jpg'
import {
createPackage,
@ -81,6 +79,8 @@ const isRefresh = ref(true) // 生成任务包前,点击刷新数据,并将
let canloadMore = true
let filterId = null
const timer = ref()
const listData = ref<any[]>([])
async function computeListHeight() {
const headEl = document.querySelector('.wrapper-content')!
const { bottomIncludeBody } = getViewportOffset(headEl)
@ -139,21 +139,6 @@ onUpdated(() => {
})
const timeRange = ref('')
const timeLabel = computed(() => {
const item = timeOptions.find((option) => {
return option.value === timeRange.value
})
return item?.label
})
const viewLabel = computed(() => {
const item = viewOptions.find((option) => {
return option.value === viewMode.value
})
return item?.label
})
const isAllowDownload = ref(true)
const calNum = ref(0)
@ -161,12 +146,9 @@ const searchValue = ref('')
const isInitSeaerch = ref(false) //
configStore.$subscribe(() => {
console.log('subscribe', 'configStore')
isAllowDownload.value = configStore.isAllowDownload
calNum.value = configStore.getTimeNum
// console.log("calNum.value----------", calNum.value);
searchValue.value = configStore.getSearchValue
console.log(configStore.getSearchValue, 'getSearchValue')
})
watch(
@ -190,8 +172,6 @@ watch(
},
)
const listData = ref<any[]>([])
async function featchList(userSearchId?: string) {
loading.value = true
try {
@ -244,7 +224,7 @@ async function featchList(userSearchId?: string) {
totalCount.value = total
canloadMore = pageCount >= pagination.pageNo && pageCount > 0
const list = data.map((item) => {
const list = data.map((item: any) => {
return {
imgUrl: item.imgurl,
thumburl: item.serverThumbnailUrl || item.imgurl,
@ -294,7 +274,6 @@ const gridHeight = computed(() => {
async function oneCheck() {
const asideVal = cloneDeep(configStore.getAsideValue)
asideVal.upUserName = searchValue.value
console.log('searchValue', asideVal, searchValue.value)
if (asideVal.izyear && asideVal.izyear.length == 2) {
asideVal.izyear
@ -307,13 +286,11 @@ async function oneCheck() {
const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
console.log('calNum.value111111111111111', calNum.value, checkTaskStatus.value)
if (calNum.value == 0 && isRefresh.value) {
if (timer.value)
clearInterval(timer.value)
timer.value = setInterval(() => {
console.log('calNum.value2222222222222', calNum.value, checkTaskStatus.value)
if (checkDuplicateNo.value) {
getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => {
if (res.code === 'OK') {
@ -418,11 +395,6 @@ async function commitHandler(settingParam) {
onMounted(() => {
emitter.on('filter', refreshHandler)
// emitter.on("filter", (searchId)=>{
// console.log("emitter on filter" + searchId)
// reset();
// featchList(searchId);
// });
//
getLastCheckNo().then((res) => {
if (res.code === 'OK')
@ -539,8 +511,6 @@ function previewHandler(index: number, event: MouseEvent) {
(imageRef.value?.[index] as any).click()
}
const timer = ref()
/**
* 检查查重状态
*/
@ -576,9 +546,7 @@ function refresh(val?: any) {
loadMore()
configStore.setTimeNum(0)
}
else if (checkTaskStatus.value === 1) {
}
else if (checkTaskStatus.value === 1) { /* empty */ }
}
})
}
@ -624,11 +592,6 @@ const dropdownOptions = ref([
},
])
function loadImgOver(item) {
console.log('loadImgOver', item)
setTimeout(() => (item.loadOver = true), 2000)
}
defineExpose({
showLoginSuccessModal,
})
@ -668,15 +631,8 @@ defineExpose({
<div class="wrapper-content">
<div style="display: flex; justify-content: space-between">
<div class="form">
<!-- <n-popselect v-model:value="timeRange" :options="timeOptions" trigger="click">
<div class="dropdown">
<span>{{ timeLabel || '请选择' }}</span>
<SvgIcon class="gap" name="arrow-botton" size="14" />
</div>
</n-popselect> -->
<n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click">
<div class="dropdown">
<!-- <span>{{ viewLabel || '请选择' }}</span> -->
<span>视图</span>
<SvgIcon class="gap" name="arrow-botton" size="14" />
</div>

@ -37,7 +37,6 @@ function cancel() {
const time = ref()
onMounted(() => {
time.value = setInterval(() => {
// console.log("00000000-----------");
show.value && refresh()
}, 5000)
})

@ -50,7 +50,6 @@ async function getList(type = '') {
pageSize: '20',
msgCategory: tab.value,
})
console.log('getMessageList', res.data)
if (type == 'more') {
if (res.code == 'OK') {
if (tab.value === 1) {
@ -100,7 +99,6 @@ function switchTab(type: number) {
}
function goFinalDetail(row) {
console.log(row)
router.push({
name: 'final-detail',
query: { id: row.tag.fromId, packageid: row.packageid },
@ -119,15 +117,13 @@ function goDetail(item) {
}
async function clearMsgOne(id) {
const res = await readMsg({ msgid: id })
await readMsg({ msgid: id })
}
function getMore() {
state.pageNo += 1
getList('more')
}
console.log(tabList)
</script>
<template>

@ -27,7 +27,6 @@ const svgName = computed(() => {
watch(
() => props.listItem,
(newVal) => {
console.log(props.listItem)
listItem.value = newVal
},
)

@ -27,8 +27,6 @@ const pagination = reactive({
function selectHandler(item, index: number) {
activeId.value = item.id
console.log(activeId.value, item.id)
console.log(index)
taskStore.setActive(index, item.id)
}
@ -81,10 +79,9 @@ watch(
watch(
() => taskStore.inFileId,
async (newVal) => {
const newlist = []
async (newVal: any) => {
const newlist: any[] = []
const filterid = newVal.taskname
console.log(filterid)
const index = data.value.findIndex(person => person.fromtaskname === filterid)
const ovelist = data.value.filter(item => item.fromtaskname !== filterid)
@ -136,7 +133,6 @@ onMounted(() => {
searchId.value = id
data.value = await fetchList()
activeId.value = data.value[0].id
console.log(data.value)
})
})

@ -1,7 +1,6 @@
<script lang="ts" setup>
import {
computed,
nextTick,
onMounted,
onUnmounted,
reactive,
@ -57,7 +56,6 @@ const sortBy: any = {
orderType: 'desc',
orderName: 'similarityScore',
}
const el = ref<HTMLDivElement | null>(null)
const pagination = reactive({
pageNo: 0,
pageSize: 30,
@ -117,7 +115,7 @@ onMounted(() => {
})
let lastKeyPressTime = 0
let keyPressTimer = null
let keyPressTimer: null | any = null
function changeimgbigshow() {
imgbigshow.value = !imgbigshow.value
}
@ -148,7 +146,7 @@ function handleKeydown(event) {
//
if (now - lastKeyPressTime < doubleClickInterval) {
//
clearTimeout(keyPressTimer)
clearTimeout(keyPressTimer as any)
const item = taskDetailInfo.value
if (
item?.userapprove?.statshis === 2
@ -282,8 +280,6 @@ function approvalHandler(items?: any) {
return
}
console.log(processItems)
const list: any = []
processItems.forEach((item) => {
list.push({
@ -317,18 +313,12 @@ function approvalHandler(items?: any) {
},
})
}
function approvalHandlerx(item?: any) {
console.log(item)
alert(1)
}
function singleRejectHandlex(item?: any) {
console.log(item)
const modal = unref(notPassModalRef)! as any
modal.showModal([item])
}
function rejectHandler(items?: any) {
console.log(items)
const modal = unref(notPassModalRef)! as any
modal.showModal(items)
}
@ -364,7 +354,6 @@ function backHandler() {
}
async function handleDragEnd(event, item) {
console.log(event, item)
//
const flag = taskStore.getInFile
if (flag) {
@ -381,7 +370,6 @@ async function handleDragEnd(event, item) {
}
async function addSuspicious() {
taskStore.setInFileId(taskDetailInfo.value.ocrPicture)
console.log(taskDetailInfo.value.ocrPicture)
if (taskDetailInfo.value.ocrPicture.pictureid) {
const res = await dubiousfileyd({
pictureid: taskDetailInfo.value.ocrPicture.id,
@ -401,7 +389,7 @@ async function addSuspicious() {
}
async function getTableData() {
const useInfo = userStore.getUserInfo
const listData = []
const listData: any[] = []
const reviewType = 3 //
let res = await getAllfieldList(reviewType)
const fieldList = (res as any)?.data
@ -416,7 +404,7 @@ async function getTableData() {
'拜访项目类别',
]
fieldList.map((v) => {
fieldList.forEach((v) => {
if (userFieldList.includes(v.name)) {
let locationobj = { address: '' }
if (v.name == 'location')
@ -572,13 +560,10 @@ function overTaskHandelr(item: any) {
overTasktwo.value = item
}
function closePassno() {
console.log(notPassModalRef.value)
overTask.value = null
}
// const loadingx = ref(false);
const items = ref([])
const scrollContainer = ref(null)
let debounceTimer
let debounceTimer: any = null
async function fetchData() {
if (loading.value)
return //
@ -598,7 +583,6 @@ let num = 1
//
function checkBottom() {
const container = scrollContainer.value
// console.log(1)
if (!container)
return
@ -616,18 +600,15 @@ function checkBottom() {
debounceTimer = setTimeout(() => {
if (scrollTop + clientHeight >= scrollHeight - 10) {
num = num + 1
console.log(num)
fetchData() //
}
}, 500)
}
async function loadMore() {
console.log(loading.value)
if (loading.value) {
const more = await fetchList()
taskDetailPictureList.value.push(...more)
console.log(taskDetailPictureList)
}
}
let canloadMore = true
@ -648,14 +629,7 @@ async function fetchList() {
return []
}
}
async function reset() {
pagination.pageNo = 0
pagination.pageSize = 30
taskDetailPictureList.value.length = 0
loading.value = false
canloadMore = true
// layout()
}
async function refreshHandler() {
getImgList()
}

@ -8,7 +8,7 @@ import { useMessage } from 'naive-ui'
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import { getViewportOffset, off, on } from '@/utils/domUtils'
import { timeOptions, viewOptions } from '@/config/home'
import { viewOptions } from '@/config/home'
import { useTask } from '@/store/modules/task'
import { TASK_STATUS_OBJ } from '@/enums/index'
import { formatToDateHMS } from '@/utils/dateUtil'
@ -26,25 +26,10 @@ const cardStyle = {
}
const totalCount = ref(0)
const timeRange = ref('all')
const taskId = ref('')
const timeLabel = computed(() => {
const item = timeOptions.find((option) => {
return option.value === timeRange.value
})
return item?.label
})
const viewMode = ref('masonry')
const viewLabel = computed(() => {
const item = viewOptions.find((option) => {
return option.value === viewMode.value
})
return item?.label
})
const deviceHeight = ref(600)
const taskStore = useTask()
@ -112,17 +97,7 @@ watch(viewMode, () => {
let canloadMore = true
// useInfiniteScroll(
// el as any,
// () => {
// console.log(123456)
// loadMore()
// },
// { distance: 10, canLoadMore: () => canloadMore },
// )
async function loadMore() {
console.log('loadMore')
if (loading.value || el.value == null)
return
@ -337,10 +312,6 @@ function reset() {
layout()
}
function onChange() {
reload()
}
async function refreshHandler() {
reset()
if (!taskId.value)

@ -64,7 +64,6 @@ onBeforeMount(async () => {
})
async function selectChange(id) {
console.log(id, 'selectChange')
selectItem.value = reasonOptions.value.find(v => v.id == id)
}
</script>

@ -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<any[]>([])
//
@ -38,70 +34,10 @@ 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
offList.value.map((v) => {
offList.value.forEach((v) => {
if (v.fix)
baseNum += 1
})
@ -120,10 +56,10 @@ async function handleSumbit(e: MouseEvent) {
const userStore = useUser()
const userInfo = userStore.getUserInfo
let userFieldFixed = ''
fixList.value.map((v) => {
fixList.value.forEach((v) => {
userFieldFixed += `${v.id},`
})
onList.value.map((v) => {
onList.value.forEach((v) => {
userFieldFixed += `${v.id},`
})
userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1)
@ -156,7 +92,7 @@ function onCheckAllChange(value) {
selectIds.value = value ? ids : []
if (value) {
offList.value.map((v) => {
offList.value.forEach((v) => {
if (!v.checked)
onList.value.push(v)
})
@ -228,7 +164,6 @@ watch(
index--
}
}
console.log(onShowList.value, list, 'onShowList')
}
},
)
@ -302,7 +237,7 @@ async function getData(type = '') {
const userFieldUnFixed = useList?.userFieldUnFixed?.split(',')
if (!type || type == 'off') {
offList.value = []
allList?.map((v) => {
allList?.forEach((v) => {
const item = {
name: v.fieldDesc,
id: v.name,
@ -319,7 +254,7 @@ async function getData(type = '') {
offList.value.unshift(...fixList.value)
}
if (!type || type == 'on') {
useList?.userFieldFixed?.split(',').map((v) => {
useList?.userFieldFixed?.split(',').forEach((v) => {
let item = allList.find(v2 => v2.name == v)
if (item) {
item = {
@ -343,7 +278,7 @@ onMounted(() => getData())
const indeterminate = computed(() => {
let baseNum = 0
offList.value.map((v) => {
offList.value.forEach((v) => {
if (v.fix)
baseNum += 1
})

@ -1,7 +1,6 @@
<script lang="ts" setup>
import { computed, defineEmits, defineProps, onMounted, ref } from 'vue'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
import { ReportInfoConfig } from '@/config/workorder'
import { useUser } from '@/store/modules/user'
const props = defineProps({
@ -13,6 +12,8 @@ const props = defineProps({
})
const emit = defineEmits(['onOk'])
const selectIds = ref<string[]>([])
const offList = ref<any[]>([])
onMounted(async () => {
const userStore = useUser()
const userInfo = userStore.getUserInfo
@ -29,7 +30,7 @@ onMounted(async () => {
*/
const userFieldFixed = useList.userFieldFixed?.split(',')
const userFieldUnFixed = useList.userFieldUnFixed?.split(',')
allList.map((v) => {
allList.forEach((v) => {
const item = {
name: v.fieldDesc,
id: v.name,
@ -45,52 +46,6 @@ onMounted(async () => {
})
})
const offList = ref<any[]>([])
function generatList() {
const keys = Object.keys(ReportInfoConfig)
const hideList: object[] = []
for (const key of keys) {
const name = ReportInfoConfig[key]?.label
const isDefault = ReportInfoConfig[key]?.isDefault
// Y
if (!isDefault) {
hideList.push({
id: key,
name: name || '未配置',
fix: isDefault,
checked: ReportInfoConfig[key].isDefault,
})
}
}
const fixedList = generateDefaultList()
hideList.unshift(...fixedList)
offList.value = hideList
return { hideList }
}
function generateDefaultList() {
return Object.keys(ReportInfoConfig).reduce((acc, key) => {
const { label, isDefault } = ReportInfoConfig[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(() => {
return offList.value.length == selectIds.value.length
@ -107,7 +62,7 @@ async function handleSumbit(e: MouseEvent) {
const userStore = useUser()
const userInfo = userStore.getUserInfo
let userField = ''
offList.value.map((v) => {
offList.value.forEach((v) => {
if (v.checked)
userField += `${v.id},`
})
@ -122,10 +77,6 @@ defineExpose({
showModal,
})
// generatList();
const selectIds = ref<string[]>([])
function onCheckAllChange(value) {
const ids: string[] = []
@ -153,22 +104,13 @@ const indeterminate = computed(() => {
<template>
<n-modal v-model:show="show" transform-origin="center">
<n-card
class="cardstyle"
:bordered="false"
size="huge"
role="dialog"
aria-modal="true"
>
<n-card class="cardstyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<div class="wrapper">
<span class="wrapper-title">自定义填报信息</span>
<n-grid cols="4" class="mt-4 proCard" responsive="screen" :x-gap="24">
<n-grid-item span="4">
<NCard
title=""
class="dragcardStyle"
:segmented="{ content: true, footer: true }"
size="small"
title="" class="dragcardStyle" :segmented="{ content: true, footer: true }" size="small"
:bordered="false"
>
<div>
@ -176,25 +118,17 @@ const indeterminate = computed(() => {
<!-- j -->
<div class="draggable-li" style="background: #f8f8f8 !important">
<n-checkbox
v-model:checked="checkAll"
label="全选"
:class="{ checkAll: indeterminate }"
:indeterminate="indeterminate"
@update:checked="onCheckAllChange"
v-model:checked="checkAll" label="全选" :class="{ checkAll: indeterminate }"
:indeterminate="indeterminate" @update:checked="onCheckAllChange"
/>
</div>
<div class="content">
<div
v-for="item in offList"
:key="item.id"
style="width: 170px"
:class="{ 'disable-check': item.fix }"
class="draggable-li"
v-for="item in offList" :key="item.id" style="width: 170px"
:class="{ 'disable-check': item.fix }" class="draggable-li"
>
<n-checkbox
v-model:checked="item.checked"
:label="item.name"
:disabled="item.fix"
v-model:checked="item.checked" :label="item.name" :disabled="item.fix"
@update:checked="onCheckChange($event, item)"
/>
</div>
@ -312,11 +246,13 @@ const indeterminate = computed(() => {
--n-padding-top: 0px;
--n-padding-bottom: 12px;
}
::v-deep(.wrapper-title){
::v-deep(.wrapper-title) {
font-weight: 500;
color: #333333;
}
::v-deep(.style-btn){
::v-deep(.style-btn) {
border: 1px solid #CAD2DD !important;
}
</style>

@ -204,7 +204,6 @@ function closeModal() {
function generateAllData(): Option[] {
const initVal: Option[] = []
console.log(asideTaskMap, 'asideTaskMap')
const list = Object.keys(asideTaskMap).reduce((acc, value) => {
if (value.startsWith('iz') && asideTaskMap[value]?.inFilterList !== false) {
const name = asideTaskMap[value]?.label
@ -224,8 +223,6 @@ function generateAllData(): Option[] {
typeOptions.value = generateAllData()
function getOptions(key: string) {
console.log('key', key, 'getOptions')
console.log(formValue.conditions, 'formValue.conditions')
const getterName = `get${key}`
const options = unref(dicStore[getterName])
return options || []

@ -24,7 +24,6 @@ defineOptions({ name: 'AsideContent' })
const emit = defineEmits(['ApprovalOver'])
const route = useRoute()
const searchContent = route.query.searchContent
console.log(searchContent)
const collapse = ref(false)
const workStore = useWorkOrder()
const filterModalRef = ref(null)
@ -64,12 +63,6 @@ function computeListHeight() {
listHeight.value = height - 25
}
const listStyle = computed(() => {
return {
height: `${listHeight.value}px`,
}
})
useWindowSizeFn(computeListHeight, 280)
async function getshowFieldList() {
@ -78,10 +71,10 @@ async function getshowFieldList() {
const userInfo = userStore.getUserInfo
let res
res = await getAllfieldList(reviewType) //
const allList = res.data
const allList = res.data as any[]
dicts.value = res.data
res = await getfieldList(reviewType, userInfo.id) //
const useList = res.data
const useList = res.data as any
/**
* name 标题
* id 键值
@ -89,7 +82,7 @@ async function getshowFieldList() {
* checked 是否选中
*/
if (useList.userFieldFixed) {
useList.userFieldFixed?.split(',').map((v) => {
useList.userFieldFixed?.split(',').forEach((v) => {
let item = allList.find(v2 => v2.name == v)
if (item) {
item = {
@ -104,7 +97,7 @@ async function getshowFieldList() {
}
else {
//
allList.map((v) => {
allList.forEach((v) => {
if (v.isrequired == 2) {
const item = {
name: v.fieldDesc,

@ -42,9 +42,7 @@ const notPassedRef: any = ref(null)
const overTask = ref<any>(null)
function selectHandler(id: string, index: number) {
// console.log('selectHandler',id)
workStore.setActive(index)
// showModal(approvalModalRef, id)
}
useInfiniteScroll(
@ -76,12 +74,6 @@ async function loadMore() {
}
}
// onMounted(() => {
// console.log("onMounted");
// reset();
// fetchList();
// });
async function fetchList() {
try {
pagination.pageNo += 1

@ -1,209 +0,0 @@
<script setup lang="ts">
import { ref } from 'vue'
const props = defineProps({
imgurl: String,
isFullScreen: Boolean,
imgbigshow: Boolean,
taskDetailInfo: Object,
batch: Boolean,
})
const imageRef = ref<ComponentElRef | null>()
const overTask = ref<any>(null)
const overTasktwo = ref<any>(null)
function overTaskHandle() {
const item = props.taskDetailInfo
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
overTask.value = null
return
}
if (validate([item]) == null && props.batch === false)
overTask.value = item
}
// states:1234
function validate(items: any[]) {
if (items.length === 0)
return '至少选中一个任务'
// const useInfo = userStore.getUserInfo
// const username = useInfo.loginname
// for (const item of items) {
// const { iztrueorfalse, states, assignee } = item
// if (iztrueorfalse === null)
// return ''
// else if (states !== 2)
// return ''
// else if (assignee !== username)
// return ''
// }
return null
}
function leaveTaskHandler() {
overTask.value = null
overTasktwo.value = null
}
function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation()
event.stopPropagation()
if (imageRef.value && (imageRef.value as any).src)
(imageRef.value as any).mergedOnClick()
}
</script>
<template>
<div
class="left"
:style="
isFullScreen
? imgbigshow
? {
'position': 'relative',
'flex': 2,
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
}
: {
'height': '92vh',
'flex': 2,
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
}
: {
'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`,
}
"
@mouseover="overTaskHandle"
@mouseleave="leaveTaskHandler"
@click="previewHandler"
>
<div v-show="overTask" class="action">
<SvgIcon
style="cursor: pointer"
name="t1"
size="74.95"
@click.stop="approvalHandler"
/>
<SvgIcon
style="cursor: pointer; margin-left: 32px"
name="t2"
size="74.95"
@click.stop="singleRejectHandler"
/>
<SvgIcon
style="cursor: pointer; margin-left: 32px"
name="t9"
size="74.95"
@click.stop="addSuspicious"
/>
</div>
<div class="check">
<n-checkbox
v-show="batch && taskDetailInfo?.userapprove?.statshis === 1"
v-model:checked="taskDetailInfo.checked"
@click.stop
@update:checked="onCheckChange($event, taskDetailInfo)"
/>
</div>
<div class="status">
<img
v-show="taskDetailInfo?.userapprove?.statshis === 2"
class="img-status"
src="@/assets/images/task/pass.png"
alt=""
>
<img
v-show="taskDetailInfo?.userapprove?.statshis === 3"
class="img-status"
src="@/assets/images/task/not_pass.png"
alt=""
>
</div>
<div class="mark">
<SvgIcon
v-show="taskDetailInfo?.iztrueorfalse === 0"
size="128"
name="jia"
/>
</div>
<div class="mark">
<SvgIcon
v-show="taskDetailInfo?.iztrueorfalse === 1"
size="128"
name="zhen"
/>
</div>
<div class="big-mark" />
<div class="preview" @click="previewHandler">
<SvgIcon size="16" name="zoom-out" />
</div>
<div class="info img-info">
<n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1">
<span>
<img
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
>
</span>
</n-gi>
<n-gi span="8" class="gi2">
<span class="value">{{
TASK_STATUS_OBJ[taskDetailInfo?.userapprove?.statshis]
}}</span>
<span class="label">审批状态</span>
</n-gi>
<n-gi span="4" class="gi1">
<span>
<img
class="icon-status"
src="@/assets/images/task/similarity.png"
alt=""
>
</span>
</n-gi>
<n-gi span="8" class="gi2">
<span class="value num">{{ totalCount }}<span class="unit"></span>
</span>
<span class="label">相似匹配</span>
</n-gi>
</n-grid>
</div>
<div class="time">
<div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<span>{{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-" }}</span>
</div>
<div class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
<span>{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.submitDateTimestamp),
)
: "-"
}}</span>
</div>
</div>
<div style="display: none">
<n-image
ref="imageRef"
:img-props="{ onClick: hideDownload }"
:src="taskDetailInfo?.ocrPicture?.imgurl"
/>
</div>
<div class="leftback" />
</div>
</template>
<style>
</style>

@ -11,7 +11,7 @@ import emitter from '@/utils/mitt'
import { useInfiniteScroll } from '@vueuse/core'
import { format } from 'date-fns'
import imagesloaded from 'imagesloaded'
import { clone, cloneDeep, debounce, pickBy } from 'lodash-es'
import { clone, cloneDeep, debounce } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui'
import {
computed,
@ -248,21 +248,7 @@ async function sortHandler(orderby: 'similarityScore' | 'createdate') {
sortBy.orderType = sortBy.orderType === 'asc' ? 'desc' : 'asc'
refreshHandler()
}
const propertys = computed(() => {
const { ocrPicture } = taskDetailInfo.value
const v = pickBy(ocrPicture, (value, key: string) => {
return key.startsWith('field') && value !== null
})
return v
})
function overTaskHandelr(item: any) {
// console.log(item, 'item')
// if (item?.historyStates === 2 || item?.historyStates == 3) {
// overTask.value = null
// return
// }
if (validate([item]) == null && batch.value === false)
overTask.value = item
}
@ -275,11 +261,11 @@ function onEsc() {
isFullScreen.value = false
}
function resizeImage() {
const container = document.querySelector('.image-container')!
const containerWidth = container.offsetWidth
const containerHeight = container.offsetHeight
}
// function resizeImage() {
// const container = document.querySelector('.image-container')!
// // const containerWidth = container.offsetWidth
// // const containerHeight = container.offsetHeight
// }
onUnmounted(() => {
workStore.reset()
@ -287,7 +273,7 @@ onUnmounted(() => {
})
onMounted(() => {
document.addEventListener('keydown', onEsc)
window.addEventListener('resize', resizeImage)
// window.addEventListener('resize', resizeImage)
})
function immersionHandler() {
// class="wrapper"
@ -480,9 +466,13 @@ function handleRejectdubiousfileyd() {
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
// eslint-disable-next-line ts/ban-ts-comment
// @ts-expect-error
audit(param).then(async (res) => {
const { code } = res
if (code === 'OK') {
// eslint-disable-next-line ts/ban-ts-comment
// @ts-expect-error
dubiousfileyd(taskDetailInfo.value.pictureId).then(() => {
refreshHandler()
})

1
types/api.d.ts vendored

@ -129,6 +129,7 @@ export interface FinalParam {
sortname: string
pageSize: number
currPage: number
pageNo: number
}
export interface ResetParam {

Loading…
Cancel
Save