Merge branch 'ljj' of http://xny.yj-3d.com:3000/taoge/mk_system into dhr
This commit is contained in:
@ -8,14 +8,12 @@
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import { handleThemeStyle } from '@/utils/theme';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { getProjectTeam } from './utils/projectTeam';
|
||||
const appStore = useAppStore();
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
// 初始化主题样式
|
||||
handleThemeStyle(useSettingsStore().theme);
|
||||
getProjectTeam();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -134,6 +134,7 @@ export const useUserStore = defineStore('user', () => {
|
||||
roles.value = projectRole;
|
||||
const projectPermissions = permissionList.value.find((item) => item.projectId == selectedProject.value?.id)?.projectPermissions || [];
|
||||
permissions.value = projectPermissions;
|
||||
getProjectTeam();
|
||||
};
|
||||
|
||||
// 注销
|
||||
|
@ -2,7 +2,13 @@ import $cache from '@/plugins/cache';
|
||||
//获取班组列表
|
||||
import { listProjectTeam } from '@/api/project/projectTeam';
|
||||
import { ProjectTeamVO } from '@/api/project/projectTeam/types';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
export const getProjectTeam = async () => {
|
||||
const isPermission = useUserStore().permissions.some((item) => item == 'project:team:list');
|
||||
console.log(useUserStore().permissions);
|
||||
|
||||
if (!isPermission && useUserStore().permissions[0] != '*:*:*') return;
|
||||
|
||||
const { id } = $cache.local.getJSON('selectedProject');
|
||||
const res = await listProjectTeam({
|
||||
pageNum: 1,
|
||||
|
@ -8,7 +8,7 @@
|
||||
<el-date-picker v-model="queryParams.planMonth" type="month" value-format="YYYY-MM" placeholder="请选择计划月份" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产值类型" prop="valueType">
|
||||
<el-select v-model="queryParams.valueType" placeholder="请选择产值类型">
|
||||
<el-select v-model="queryParams.valueType" placeholder="全部">
|
||||
<el-option v-for="item in out_value_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -113,6 +113,13 @@ import { useUserStoreHook } from '@/store/modules/user';
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const month = computed(() => {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0'); // getMonth() 从0开始
|
||||
const currentMonth = `${year}-${month}`;
|
||||
return currentMonth;
|
||||
});
|
||||
const monthPlanList = ref<MonthPlanVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
@ -152,7 +159,8 @@ const data = reactive({
|
||||
planValue: undefined,
|
||||
completeValue: undefined,
|
||||
differenceValue: undefined,
|
||||
planMonth: undefined,
|
||||
planMonth: month.value,
|
||||
|
||||
valueType: undefined,
|
||||
planAuditStatus: undefined,
|
||||
completeAuditStatus: undefined,
|
||||
|
@ -80,6 +80,13 @@ import { useUserStoreHook } from '@/store/modules/user';
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const month = computed(() => {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0'); // getMonth() 从0开始
|
||||
const currentMonth = `${year}-${month}`;
|
||||
return currentMonth;
|
||||
});
|
||||
const monthPlanAuditList = ref<MonthPlanAuditVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
const loading = ref(true);
|
||||
@ -116,7 +123,7 @@ const data = reactive<PageData<MonthPlanAuditForm, MonthPlanAuditQuery>>({
|
||||
purchaseValue: undefined,
|
||||
constructionValue: undefined,
|
||||
totalValue: undefined,
|
||||
planMonth: undefined,
|
||||
planMonth: month.value,
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
|
Reference in New Issue
Block a user