<template>
|
<nut-category :category="category" @change="change" class="category-page-inner">
|
<nut-category-pane :categoryChild="data.categoryChild" @onChange="onChange">
|
</nut-category-pane>
|
</nut-category>
|
</template>
|
|
<script setup lang="ts">
|
import Taro from '@tarojs/taro';
|
import { useCheckReceiveTasks, useDictionaryDataSelect, useTaskList } from '@12333/hooks';
|
import { CategoryCode, PositionCodeEnum } from '@12333/constants';
|
import dayjs from 'dayjs';
|
import { categorydata } from './3x_categoryData';
|
|
defineOptions({
|
name: 'InnerPage',
|
});
|
|
const router = Taro.useRouter();
|
const id = router.params?.id ?? '';
|
|
const data = reactive({
|
categoryInfo: categorydata.categoryInfo,
|
category: categorydata.categoryInfo.category,
|
categoryChild: categorydata.categoryChild,
|
});
|
|
const { dictionaryDataList: positionList } = useDictionaryDataSelect({
|
categoryCode: CategoryCode.Position,
|
field1: PositionCodeEnum.Housekeeping,
|
});
|
|
const category = computed(() =>
|
positionList.value.map((x) => ({
|
...x,
|
catName: x.label,
|
}))
|
);
|
|
const change = (index: number) => {
|
data.categoryChild = [].concat(data.categoryInfo.category[index + 1].children);
|
};
|
const onChange = () => {
|
console.log('当前分类数据');
|
};
|
</script>
|
|
<style lang="scss">
|
@import '@/styles/common.scss';
|
|
.task-page-wrapper {
|
.category-page-inner {
|
height: 100%;
|
background-color: transparent;
|
}
|
}
|
</style>
|