产值管理
This commit is contained in:
@ -203,7 +203,7 @@ import { ProgressCategoryVO, ProgressCategoryQuery, ProgressCategoryForm } from
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const { progress_unit_type, progress_status } = toRefs<any>(proxy?.useDict('progress_unit_type', 'progress_status'));
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
|
||||
import CreatePlan from './component/createPlan.vue';
|
||||
import CreateDaily from './component/createDaily.vue';
|
||||
import CreateDailyRate from './component/createDailyRate.vue';
|
||||
@ -212,7 +212,7 @@ type ProgressCategoryOption = {
|
||||
name: string;
|
||||
children?: ProgressCategoryOption[];
|
||||
};
|
||||
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
@ -273,7 +273,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
if (!queryParams.value.matrixId) {
|
||||
const res = await getProjectSquare(currentProject.value.id);
|
||||
if (res.data.length === 0) {
|
||||
if (!res.data || res.data.length === 0) {
|
||||
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
} else {
|
||||
let matrixList = res.data.map((item) => {
|
||||
@ -282,9 +282,13 @@ const getList = async () => {
|
||||
matrixId: item.projectId
|
||||
};
|
||||
});
|
||||
if (!matrixValue.value) matrixValue.value = matrixList[0].id;
|
||||
matrixOptions.value = matrixList;
|
||||
queryParams.value.matrixId = matrixList[0].children[0].matrixId;
|
||||
try {
|
||||
if (!matrixValue.value) matrixValue.value = matrixList[0].id;
|
||||
matrixOptions.value = matrixList;
|
||||
queryParams.value.matrixId = matrixList[0].children[0].matrixId;
|
||||
} catch (error) {
|
||||
proxy?.$modal.msgError('获取方阵失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
loading.value = true;
|
||||
|
Reference in New Issue
Block a user