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-vars': 'off',
'unused-imports/no-unused-imports': 'off', 'unused-imports/no-unused-imports': 'off',
'jsdoc/require-returns-description': 'off', 'jsdoc/require-returns-description': 'off',
"jsdoc/check-param-names": "off",
'jsdoc/require-param-name': 'off',
'eqeqeq': 'off', 'eqeqeq': 'off',
'vue/custom-event-name-casing': 'off', 'vue/custom-event-name-casing': 'off',
'vue/eqeqeq': 'off', 'vue/eqeqeq': 'off',
@ -26,6 +28,7 @@ module.exports = antfu(
process.env.MODE === 'production' ? 2 : 0, process.env.MODE === 'production' ? 2 : 0,
], ],
'array-callback-return': ['error', { allowImplicit: true }], 'array-callback-return': ['error', { allowImplicit: true }],
curly: ['off']
}, },
}, },
) )

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

@ -65,6 +65,7 @@ export async function repetitionTask() {
/** /**
* *
* @param params
* @returns * @returns
*/ */
export async function getRepeatList(params: FinalParam) { 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> { export async function getConditionList(page: PageParam, searchParam: FilterSearchParam, type: number): Promise<any> {
const res = await http.request({ const res = await http.request({
@ -52,7 +56,7 @@ export async function updateCondition(params: FilterUpdate) {
/** /**
* *
* @param params * @param { ids: string } params
* @returns * @returns
*/ */
export async function deleteCondition(params: { ids: string }) { export async function deleteCondition(params: { ids: string }) {
@ -90,7 +94,7 @@ export async function setFilter(params: FilterParam): Promise<void> {
/** /**
* *
* @param params * @param searchid
* @returns * @returns
*/ */
export async function favorite(searchid: string): Promise<void> { 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 * @returns
*/ */
export async function unfavorite(searchid: string): Promise<void> { export async function unfavorite(searchid: string): Promise<void> {

@ -1,7 +1,4 @@
import qs from 'qs'
import { http } from '@/utils/http/axios' 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) { function showModal(value) {
console.log(value)
state.detail = value state.detail = value
show.value = true show.value = true
} }
@ -54,8 +53,6 @@ async function handleSumbit(e: MouseEvent) {
// selectRejectId.value === 'other' // selectRejectId.value === 'other'
// emit('commit', unref(comomitValue), unref(selectBackId), showOther.value) // emit('commit', unref(comomitValue), unref(selectBackId), showOther.value)
console.log(state.detail)
console.log(comomitValue)
const param = { const param = {
formid: [state.detail.id], formid: [state.detail.id],
taskId: ['66b06dda-e673-11ee-a934-0242bc74e4f3'], taskId: ['66b06dda-e673-11ee-a934-0242bc74e4f3'],
@ -87,7 +84,6 @@ onBeforeMount(async () => {
}) })
async function selectChange(id) { async function selectChange(id) {
console.log(id, 'selectChange')
selectItem.value = reasonOptions.value.find(v => v.id == id) selectItem.value = reasonOptions.value.find(v => v.id == id)
} }
</script> </script>

@ -30,9 +30,7 @@ function initHandler() {
queryNote().then((res) => { queryNote().then((res) => {
if (res.data) if (res.data)
note.value = res.data.notecontent note.value = res.data.notecontent
}).catch(e => console.error('Quill file -> Error in initHandler function', e))
console.log('note:', note.value)
}).catch(e => console.log(e))
} }
const saveHandler = debounce(() => { const saveHandler = debounce(() => {

@ -122,8 +122,6 @@ const layout = debounce(() => {
// } // }
// el.value!.scrollTo({ top: height, behavior: 'instant' }) // el.value!.scrollTo({ top: height, behavior: 'instant' })
loading = false loading = false
console.log('loading---------------', loading)
console.log('pagination.pageNo---------------', pagination.pageNo)
if (pagination.pageNo == 3) { if (pagination.pageNo == 3) {
let timer let timer
if (timer) if (timer)
@ -131,7 +129,6 @@ const layout = debounce(() => {
timer = setTimeout(() => { timer = setTimeout(() => {
isTop.value = false isTop.value = false
console.log('isTop.value---------------', isTop.value)
}, 1000) }, 1000)
} }
}) })
@ -152,7 +149,6 @@ useInfiniteScroll(
el as any, el as any,
() => { () => {
loading = false loading = false
console.log('加载了000000000000000---------------------------')
loadMore() loadMore()
}, },
{ distance: 10, canLoadMore: () => canloadMore }, { distance: 10, canLoadMore: () => canloadMore },
@ -161,23 +157,11 @@ useInfiniteScroll(
async function featchList() { async function featchList() {
loading = true loading = true
try { try {
// const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value })
console.log('pagination.pageNo------------', pagination.pageNo)
const result = await dubiousfilelist({ ...pagination, ...sortObj }) const result = await dubiousfilelist({ ...pagination, ...sortObj })
// TODO const { data } = result
// result.data = Array.from({ length: 30 })
const { data, pageCount } = result
// canloadMore = pageCount >= pagination.pageNo && pageCount > 0;
canloadMore = data.pages >= pagination.pageNo && data.pages > 0 canloadMore = data.pages >= pagination.pageNo && data.pages > 0
console.log('canloadMore------------', canloadMore)
return result.data.records return result.data.records
// const list = data.map((item) => {
// return {
// imgUrl: randomUrl(),
// }
// })
// return list
} }
catch (error) { catch (error) {
canloadMore = false canloadMore = false
@ -186,14 +170,12 @@ async function featchList() {
} }
async function loadMore() { async function loadMore() {
console.log('执行l------------------------', loading, el.value, pagination.pageNo)
if (loading || el.value == null) if (loading || el.value == null)
return return
// loading = true // loading = true
pagination.pageNo = pagination.pageNo + 1 pagination.pageNo = pagination.pageNo + 1
const more = await featchList() const more = await featchList()
console.log('more------------------------', more)
listData.value.push(...more) listData.value.push(...more)
layout() 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) if (rect.right > x && rect.bottom > y && rect.left < x + w && rect.top < y + h)
index === -1 && selectIds.value.push(item.dataset.id!) index === -1 && selectIds.value.push(item.dataset.id!)
else index !== -1 && selectIds.value.splice(index, 1) 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 = [] selectedApproveItems.value = []
// //
listData.value.map((item) => { listData.value.forEach((item) => {
if (selectIds.value.includes(String(item.pictureId))) { if (selectIds.value.includes(String(item.pictureId))) {
item.checked = true item.checked = true
selectedApproveItems.value.push(item) selectedApproveItems.value.push(item)
@ -450,7 +417,6 @@ async function commit() {
} }
} }
function remove() { function remove() {
// console.log("finally-selectedApproveItems------------", selectedApproveItems.value);
if (!selectIds.value || selectIds.value.length === 0) { if (!selectIds.value || selectIds.value.length === 0) {
message.error('至少选中一个') message.error('至少选中一个')
return return
@ -530,7 +496,6 @@ function approvalHandler(items?: any) {
// => => / // => => /
if (items !== undefined && !(items instanceof PointerEvent)) if (items !== undefined && !(items instanceof PointerEvent))
processItems = [items] processItems = [items]
console.log('batch-------------', batch.value, selectedApproveItems.value, processItems)
const msg = validate(processItems) const msg = validate(processItems)
if (msg !== null) { if (msg !== null) {
@ -603,7 +568,6 @@ async function refreshHandler(filtersearchId?: any) {
useInfiniteScroll( useInfiniteScroll(
el as any, el as any,
() => { () => {
console.log('加载了333333333333333333333333---------------------------')
loadMore() loadMore()
}, },
{ distance: 10, canLoadMore: () => canloadMore }, { distance: 10, canLoadMore: () => canloadMore },
@ -617,13 +581,11 @@ watch(() => show.value, async (newVal) => {
pagination.pageNo = 1 pagination.pageNo = 1
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
console.log('加载了1111111111111---------------------------', listData.value)
layout() layout()
} }
}) })
watch(() => pagination.pageNo, (newVal, oldVal) => { watch(() => pagination.pageNo, (newVal, oldVal) => {
console.log('加载了22222222222222222---------------------------', newVal, oldVal, canloadMore)
if (newVal == oldVal) if (newVal == oldVal)
return return

@ -68,14 +68,11 @@ export default defineComponent({
return v return v
}) })
} }
console.log(userInfo.frontmenuTList, 'frontmenuTList')
console.log(menus.value, 'menus')
updateSelectedKeys() updateSelectedKeys()
} }
// //
function clickMenuItem(key: string) { function clickMenuItem(key: string) {
console.log('clickMenuItem', key)
if (/http(s)?:/.test(key)) if (/http(s)?:/.test(key))
window.open(key) window.open(key)
else router.push({ name: key }) else router.push({ name: key })

@ -85,7 +85,6 @@ export function createRouterGuards(router: Router) {
router.afterEach((to, _, failure) => { router.afterEach((to, _, failure) => {
document.title = (to?.meta?.title as string) || document.title document.title = (to?.meta?.title as string) || document.title
if (isNavigationFailure(failure)) { if (isNavigationFailure(failure)) {
// console.log('failed navigation', failure)
} }
const asyncRouteStore = useAsyncRoute() const asyncRouteStore = useAsyncRoute()
// 在这里设置需要缓存的组件名称 // 在这里设置需要缓存的组件名称
@ -108,7 +107,6 @@ export function createRouterGuards(router: Router) {
}) })
router.onError((error) => { router.onError((error) => {
// eslint-disable-next-line no-console console.error(error, '路由错误')
console.log(error, '路由错误')
}) })
} }

@ -56,7 +56,6 @@ export const useFinalStore = defineStore({
actions: { actions: {
setSystemConfig(config: AsideConfig) { setSystemConfig(config: AsideConfig) {
this.systemConfig = config this.systemConfig = config
console.log('systemConfig----------', config)
}, },
setAsideValue(value) { setAsideValue(value) {
this.asideValue = value this.asideValue = value
@ -82,16 +81,11 @@ export const useFinalStore = defineStore({
}, },
// 获取系统配置信息 // 获取系统配置信息
async fetchConfig() { async fetchConfig() {
// const response = await getConfig()
// console.log("response.data----------", response.data);
// this.setSystemConfig(response.data)
// return response.data
const list: any = {} const list: any = {}
const tempAsideMap = cloneDeep(asideMap) const tempAsideMap = cloneDeep(asideMap)
Object.keys(tempAsideMap).map((key) => { Object.keys(tempAsideMap).forEach((key) => {
list[key] = 'Y' list[key] = 'Y'
}) })
console.log('setSystemConfig---------------', list)
this.setSystemConfig(list) this.setSystemConfig(list)
return list return list
}, },
@ -100,7 +94,6 @@ export const useFinalStore = defineStore({
const res = await getFilter(1) const res = await getFilter(1)
const { data } = res const { data } = res
const list = data && data.searchcount ? data.searchcount.split(',') : [] const list = data && data.searchcount ? data.searchcount.split(',') : []
console.log('listkey---------------', list)
this.customConfig = list this.customConfig = list
return list return list
}, },

@ -150,7 +150,6 @@ export const useUserStore = defineStore({
}, },
// 刷新token // 刷新token
async refreshToken() { async refreshToken() {
// console.log('refresh token!')
const response = await refreshToken() const response = await refreshToken()
const { data: token, code } = response const { data: token, code } = response
if (code === ResultEnum.SUCCESS) if (code === ResultEnum.SUCCESS)

@ -203,7 +203,6 @@ const transform: AxiosTransform = {
const config = response.config 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 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) 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 (expirationTime && (expirationTime - Date.now()) <= 0 && !whitelist.includes(config.url as string)) {
if (!isRefreshingToken) { if (!isRefreshingToken) {
@ -231,7 +230,6 @@ const transform: AxiosTransform = {
} }
else { else {
return new Promise((resolve) => { return new Promise((resolve) => {
// console.log('刷新token中暂存此请求', config.url)
requests.push((token) => { requests.push((token) => {
(config as Recordable).headers.logintoken = token (config as Recordable).headers.logintoken = token
resolve(instance(config)) // 执行请求, resolve(instance(config)) // 执行请求,

@ -115,36 +115,6 @@ onBeforeMount(async () => {
nextTick(() => { nextTick(() => {
finalStore.$subscribe(() => { 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 config = finalStore.getSystemConfig
const customConfig = finalStore.getCustomConfig const customConfig = finalStore.getCustomConfig
if ( if (
@ -152,20 +122,16 @@ nextTick(() => {
&& isEqual(configFilterRef.value, finalStore.getFilterConfig) && isEqual(configFilterRef.value, finalStore.getFilterConfig)
&& customObjRef.value && customObjRef.value
&& isEqual(customObjRef.value, customTempObjRef.value) && isEqual(customObjRef.value, customTempObjRef.value)
) ) {
return return
}
if (config == null || customConfig == null) if (config == null || customConfig == null) {
return 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 = [] const sortKeyList: any = []
finalStore.getFilterConfig.map((item: any) => { finalStore.getFilterConfig.forEach((item: any) => {
sortKeyList.push(item?.id) sortKeyList.push(item?.id)
}) })
const showKeys = [...sortKeyList] const showKeys = [...sortKeyList]
@ -178,16 +144,14 @@ nextTick(() => {
}) })
if (customObjRef.value) { if (customObjRef.value) {
// //
Object.keys(customObjRef.value).map((key) => { Object.keys(customObjRef.value).forEach((key) => {
if (asideMap.hasOwnProperty(key)) { if (Object.prototype.hasOwnProperty.call(asideMap, key)) {
const str = key.toLowerCase() const str = key.toLowerCase()
// console.log("customObjRef.value[str]1111111111111", customObjRef.value[str]);
if (str == 'izsimilarity') { if (str == 'izsimilarity') {
if (typeof customObjRef.value[str] == 'string') if (typeof customObjRef.value[str] == 'string')
customObjRef.value[str] = customObjRef.value[str].split(',') customObjRef.value[str] = customObjRef.value[str].split(',')
asideValue[key] = customObjRef.value[str] // asideValue[key] = customObjRef.value[str] //
console.log('相似度2222222222', asideValue[key])
} }
else if (str == 'izyear') { else if (str == 'izyear') {
if (typeof customObjRef.value[str] == 'string') { if (typeof customObjRef.value[str] == 'string') {
@ -197,12 +161,8 @@ nextTick(() => {
customObjRef.value[str] = time customObjRef.value[str] = time
} }
asideValue[key] = customObjRef.value[str] // asideValue[key] = customObjRef.value[str] //
console.log('时间2222222222', asideValue[key])
} }
else if (customObjRef.value[str]) { 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') { if (typeof customObjRef.value[str] == 'string') {
customObjRef.value[str] = customObjRef.value[str].split(',') customObjRef.value[str] = customObjRef.value[str].split(',')
asideValue[key] = customObjRef.value[str] // asideValue[key] = customObjRef.value[str] //
@ -218,13 +178,9 @@ nextTick(() => {
} }
}) })
customTempObjRef.value = customObjRef.value customTempObjRef.value = customObjRef.value
console.log('asideValue直接处理后的结果', asideValue)
console.log('customTempObjRef.value', customTempObjRef.value)
const tempobj = cloneDeep(asideValue) const tempobj = cloneDeep(asideValue)
console.log('tempObj', tempobj)
finalStore.setAsideValue(tempobj) finalStore.setAsideValue(tempobj)
} }
// console.log("showKeys", showKeys);
const items = showKeys.reduce((acc, key) => { const items = showKeys.reduce((acc, key) => {
const currentData = asideMap[key] const currentData = asideMap[key]
const render = currentData?.render const render = currentData?.render
@ -241,7 +197,6 @@ nextTick(() => {
return acc return acc
} }
}, []) }, [])
console.log('showItems=================================', items)
showItems.value = items showItems.value = items
configFilterRef.value = finalStore.getFilterConfig configFilterRef.value = finalStore.getFilterConfig
}) })
@ -277,16 +232,14 @@ function scrollHandler(key: string) {
async function filterHandler(searchId: string) { async function filterHandler(searchId: string) {
emitter.emit('filter-final', searchId) emitter.emit('filter-final', searchId)
const res = await getFilterList({ userSearchId: searchId }) const res = await getFilterList({ userSearchId: searchId })
// console.log("", res);
if (res.code == 'OK') { if (res.code == 'OK') {
const obj = res.data const obj = res.data
customObjRef.value = res.data customObjRef.value = res.data
const showKeys: any[] = [] const showKeys: any[] = []
Object.keys(obj).map((key) => { Object.keys(obj).forEach((key) => {
if (asideMap.hasOwnProperty(key)) if (Object.prototype.hasOwnProperty.call(asideMap, key))
showKeys.push(key) showKeys.push(key)
}) })
console.log('showKeys1111111111111111', showKeys)
finalStore.setCustomConfig(showKeys) finalStore.setCustomConfig(showKeys)
} }
} }
@ -305,7 +258,6 @@ function inputChange(keyword) {
emit('inputChange', keyword) emit('inputChange', keyword)
} }
function handleOk(item: any) { function handleOk(item: any) {
console.log('handleOk', item)
if (item) { if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname) AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname)
filterHandler(item.id) filterHandler(item.id)
@ -317,27 +269,17 @@ function handleOk(item: any) {
} }
function updateComponent(key, e) { function updateComponent(key, e) {
console.log('跟新值', key, e)
console.log('tempAsideValue跟新值', finalStore.getAsideValue, asideValue)
// let tempAsideValue = finalStore.getAsideValue || asideValue; // let tempAsideValue = finalStore.getAsideValue || asideValue;
const tempobj = cloneDeep(asideValue) const tempobj = cloneDeep(asideValue)
console.log(tempobj, 'tempobj')
tempobj[key] = e tempobj[key] = e
console.log(tempobj, 'tempobj After')
customObjRef.value = tempobj customObjRef.value = tempobj
// asideValue = Object.assign({}, asideValue, tempobj); // asideValue = Object.assign({}, asideValue, tempobj);
console.log('asideValue跟新值', tempobj)
finalStore.setAsideValue(tempobj) finalStore.setAsideValue(tempobj)
} }
</script> </script>
<template> <template>
<div <div class="aside" :style="asideStyle" @mouseenter="asideEnter = true" @mouseleave="asideEnter = false">
class="aside"
:style="asideStyle"
@mouseenter="asideEnter = true"
@mouseleave="asideEnter = false"
>
<div v-show="showCollapse" class="aside-collapse"> <div v-show="showCollapse" class="aside-collapse">
<div class="aside-collapse-btn" @click="collapseHandler"> <div class="aside-collapse-btn" @click="collapseHandler">
<SvgIcon :name="collapseIcon" size="40" /> <SvgIcon :name="collapseIcon" size="40" />
@ -347,31 +289,20 @@ function updateComponent(key, e) {
<div class="aside-header"> <div class="aside-header">
<!-- 搜索跳转模块 --> <!-- 搜索跳转模块 -->
<Search <Search
v-show="showSearch" v-show="showSearch" @select="scrollHandler" @close="setShowSearch(false)" @input-change="inputChange"
@select="scrollHandler"
@close="setShowSearch(false)"
@input-change="inputChange"
@show-search="setShowSearch(true)" @show-search="setShowSearch(true)"
/> />
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter
v-show="!showSearch" v-show="!showSearch" ref="AdvanceFilterRef" :type="1" @select="filterHandler"
ref="AdvanceFilterRef" @update:search="setShowSearch(true)" @show-custom="showModal(customModalRef)"
:type="1"
@select="filterHandler"
@update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)"
@show-filter="showModal(filterModalRef)" @show-filter="showModal(filterModalRef)"
/> />
</div> </div>
<component <component
:is="item.config.component" :is="item.config.component" v-for="(item, index) in showItems" :id="item.key" :key="index"
v-for="(item, index) in showItems" v-model:value="asideValue[item.key]" :label="item.config.label"
:id="item.key"
:key="index"
v-model:value="asideValue[item.key]"
:label="item.config.label"
@update:value="(e) => updateComponent(item.key, e)" @update:value="(e) => updateComponent(item.key, e)"
/> />
@ -379,9 +310,7 @@ function updateComponent(key, e) {
<CustomFilterModalVue ref="customModalRef" /> <CustomFilterModalVue ref="customModalRef" />
<!-- 过滤列表 --> <!-- 过滤列表 -->
<FilterModal <FilterModal
ref="filterModalRef" ref="filterModalRef" @edit-filter="editFilter" @show-new-filter="showModal(newFilterModalRef)"
@edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)"
@handle-ok="handleOk" @handle-ok="handleOk"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
@ -433,17 +362,11 @@ function updateComponent(key, e) {
right: -20px; right: -20px;
} }
::v-deep(.n-collapse ::v-deep(.n-collapse .n-collapse-item.n-collapse-item--right-arrow-placement .n-collapse-item__header .n-collapse-item-arrow) {
.n-collapse-item.n-collapse-item--right-arrow-placement
.n-collapse-item__header
.n-collapse-item-arrow) {
margin-left: 8px; margin-left: 8px;
} }
::v-deep(.n-collapse ::v-deep(.n-collapse .n-collapse-item .n-collapse-item__header .n-collapse-item__header-main) {
.n-collapse-item
.n-collapse-item__header
.n-collapse-item__header-main) {
font-weight: bold; font-weight: bold;
justify-content: space-between; justify-content: space-between;
} }
@ -456,18 +379,11 @@ function updateComponent(key, e) {
border-top: 0px; border-top: 0px;
} }
::v-deep(.n-collapse ::v-deep(.n-collapse .n-collapse-item .n-collapse-item__content-wrapper .n-collapse-item__content-inner) {
.n-collapse-item
.n-collapse-item__content-wrapper
.n-collapse-item__content-inner) {
padding-top: 10px; padding-top: 10px;
} }
::v-deep(.n-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) {
> .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; width: 0px;
} }
} }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -2,9 +2,7 @@
import { cloneDeep, difference } from 'lodash-es' import { cloneDeep, difference } from 'lodash-es'
import { computed, defineEmits, defineProps, onMounted, ref, watch } from 'vue' import { computed, defineEmits, defineProps, onMounted, ref, watch } from 'vue'
import { VueDraggable } from 'vue-draggable-plus' import { VueDraggable } from 'vue-draggable-plus'
import { useMessage } from 'naive-ui'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter' import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
import { workPackageMap } from '@/config/workorder'
import { useUser } from '@/store/modules/user' import { useUser } from '@/store/modules/user'
const props = defineProps({ const props = defineProps({
@ -17,8 +15,6 @@ const props = defineProps({
const emit = defineEmits(['onOk']) const emit = defineEmits(['onOk'])
const message = useMessage()
// //
const offList = ref<any[]>([]) const offList = ref<any[]>([])
// //
@ -38,70 +34,10 @@ const selectCount = computed(() => {
return `显示字段(共${onList.value.length}个)` 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 show = ref(false)
const checkAll = computed(() => { const checkAll = computed(() => {
let baseNum = 0 let baseNum = 0
offList.value.map((v) => { offList.value.forEach((v) => {
if (v.fix) if (v.fix)
baseNum += 1 baseNum += 1
}) })
@ -120,10 +56,10 @@ async function handleSumbit(e: MouseEvent) {
const userStore = useUser() const userStore = useUser()
const userInfo = userStore.getUserInfo const userInfo = userStore.getUserInfo
let userFieldFixed = '' let userFieldFixed = ''
fixList.value.map((v) => { fixList.value.forEach((v) => {
userFieldFixed += `${v.id},` userFieldFixed += `${v.id},`
}) })
onList.value.map((v) => { onList.value.forEach((v) => {
userFieldFixed += `${v.id},` userFieldFixed += `${v.id},`
}) })
userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1) userFieldFixed = userFieldFixed.slice(0, userFieldFixed.length - 1)
@ -156,7 +92,7 @@ function onCheckAllChange(value) {
selectIds.value = value ? ids : [] selectIds.value = value ? ids : []
if (value) { if (value) {
offList.value.map((v) => { offList.value.forEach((v) => {
if (!v.checked) if (!v.checked)
onList.value.push(v) onList.value.push(v)
}) })
@ -228,7 +164,6 @@ watch(
index-- index--
} }
} }
console.log(onShowList.value, list, 'onShowList')
} }
}, },
) )
@ -302,7 +237,7 @@ async function getData(type = '') {
const userFieldUnFixed = useList?.userFieldUnFixed?.split(',') const userFieldUnFixed = useList?.userFieldUnFixed?.split(',')
if (!type || type == 'off') { if (!type || type == 'off') {
offList.value = [] offList.value = []
allList?.map((v) => { allList?.forEach((v) => {
const item = { const item = {
name: v.fieldDesc, name: v.fieldDesc,
id: v.name, id: v.name,
@ -319,7 +254,7 @@ async function getData(type = '') {
offList.value.unshift(...fixList.value) offList.value.unshift(...fixList.value)
} }
if (!type || type == 'on') { if (!type || type == 'on') {
useList?.userFieldFixed?.split(',').map((v) => { useList?.userFieldFixed?.split(',').forEach((v) => {
let item = allList.find(v2 => v2.name == v) let item = allList.find(v2 => v2.name == v)
if (item) { if (item) {
item = { item = {
@ -343,7 +278,7 @@ onMounted(() => getData())
const indeterminate = computed(() => { const indeterminate = computed(() => {
let baseNum = 0 let baseNum = 0
offList.value.map((v) => { offList.value.forEach((v) => {
if (v.fix) if (v.fix)
baseNum += 1 baseNum += 1
}) })

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

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

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

@ -42,9 +42,7 @@ const notPassedRef: any = ref(null)
const overTask = ref<any>(null) const overTask = ref<any>(null)
function selectHandler(id: string, index: number) { function selectHandler(id: string, index: number) {
// console.log('selectHandler',id)
workStore.setActive(index) workStore.setActive(index)
// showModal(approvalModalRef, id)
} }
useInfiniteScroll( useInfiniteScroll(
@ -76,12 +74,6 @@ async function loadMore() {
} }
} }
// onMounted(() => {
// console.log("onMounted");
// reset();
// fetchList();
// });
async function fetchList() { async function fetchList() {
try { try {
pagination.pageNo += 1 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 { useInfiniteScroll } from '@vueuse/core'
import { format } from 'date-fns' import { format } from 'date-fns'
import imagesloaded from 'imagesloaded' 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 { useDialog, useMessage } from 'naive-ui'
import { import {
computed, computed,
@ -248,21 +248,7 @@ async function sortHandler(orderby: 'similarityScore' | 'createdate') {
sortBy.orderType = sortBy.orderType === 'asc' ? 'desc' : 'asc' sortBy.orderType = sortBy.orderType === 'asc' ? 'desc' : 'asc'
refreshHandler() 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) { 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) if (validate([item]) == null && batch.value === false)
overTask.value = item overTask.value = item
} }
@ -275,11 +261,11 @@ function onEsc() {
isFullScreen.value = false isFullScreen.value = false
} }
function resizeImage() { // function resizeImage() {
const container = document.querySelector('.image-container')! // const container = document.querySelector('.image-container')!
const containerWidth = container.offsetWidth // // const containerWidth = container.offsetWidth
const containerHeight = container.offsetHeight // // const containerHeight = container.offsetHeight
} // }
onUnmounted(() => { onUnmounted(() => {
workStore.reset() workStore.reset()
@ -287,7 +273,7 @@ onUnmounted(() => {
}) })
onMounted(() => { onMounted(() => {
document.addEventListener('keydown', onEsc) document.addEventListener('keydown', onEsc)
window.addEventListener('resize', resizeImage) // window.addEventListener('resize', resizeImage)
}) })
function immersionHandler() { function immersionHandler() {
// class="wrapper" // class="wrapper"
@ -480,9 +466,13 @@ function handleRejectdubiousfileyd() {
positiveText: '确定', positiveText: '确定',
negativeText: '取消', negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
// eslint-disable-next-line ts/ban-ts-comment
// @ts-expect-error
audit(param).then(async (res) => { audit(param).then(async (res) => {
const { code } = res const { code } = res
if (code === 'OK') { if (code === 'OK') {
// eslint-disable-next-line ts/ban-ts-comment
// @ts-expect-error
dubiousfileyd(taskDetailInfo.value.pictureId).then(() => { dubiousfileyd(taskDetailInfo.value.pictureId).then(() => {
refreshHandler() refreshHandler()
}) })

1
types/api.d.ts vendored

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

Loading…
Cancel
Save