10 Commits

Author SHA1 Message Date
weibl
93672d7f42 Merge branch 'main' of http://carsafe.uicp.cn/Front_Team/SPDM 2026-03-06 16:50:56 +08:00
weibl
3acc7f4532 删除报工 2026-03-06 16:50:53 +08:00
JiangSheng
4debada5ec fix: 谱系 2026-03-06 16:44:46 +08:00
34e5a3137b merge 2026-03-06 16:39:51 +08:00
3504df9faf onlyoffice配置 2026-03-06 16:39:16 +08:00
0cb8e33871 update:演示版本恢复 2026-03-06 16:27:10 +08:00
f03016e94a update 演示版本恢复 2026-03-06 16:19:55 +08:00
4de9e3ab85 merge 2026-03-06 16:14:25 +08:00
5f915d5436 update:人员多选bug 2026-03-06 16:13:57 +08:00
weibl
ed27e092a8 小优化 2026-03-06 16:02:51 +08:00
11 changed files with 75 additions and 62 deletions

View File

@@ -20,9 +20,9 @@ VITE_API_FILE_PREVIEW_URL=http://192.168.190.161:3000/preview/onlinePreview
# 文件下载地址
VITE_API_DOWNLOAD_URL=http://192.168.190.161:9000
# onlyOffice服务
VITE_API_ONLYOFFICE_URL=http://192.168.65.161:18888
VITE_API_ONLYOFFICE_URL=http://192.168.190.161:18888
# onlyOffice回调服务
VITE_API_ONLYOFFICE_CALLBACK=http://192.168.65.161:3000/api/simulation/data/data/onlyOfficeCallback
VITE_API_ONLYOFFICE_CALLBACK=http://192.168.190.161:3000/api/simulation/data/data/onlyOfficeCallback
# 基线地址用于onlyOffice预览
VITE_API_SPDM_URL=http://192.168.190.161:3000/spdm
# CID地址

View File

@@ -22,3 +22,7 @@ export const updateWorkApi = (params: any) => {
export const queryWorkApi = (params: any) => {
return post(`${PREFIX}work/queryWork`, params);
};
export const deleteWorkApi = (params: any) => {
return post(`${PREFIX}work/deleteWork`, params);
};

View File

@@ -39,6 +39,7 @@ const props = withDefaults(defineProps<Props>(), {
});
const listData = ref<any>([]);
const choseList = ref<any>([]);
const usedListData = ref<any>([]);
const remote = ref(enableConfigByTenant([TENANT_ENUM.LYRIC]));
const emit = defineEmits(['update:modelValue', 'change', 'clear']);
@@ -71,8 +72,7 @@ const getUserDataByKeyFun = (query: string) => {
label: `${item.nickname || item.realName}${item.username}`,
};
});
listData.value = build;
listData.value = dataUserRateSort('userId', build, 'user');
dataFormatFun(build);
}
});
};
@@ -91,12 +91,28 @@ const getAllUsersFun = () => {
label: item.nickname || item.realName,
};
});
listData.value = build;
listData.value = dataUserRateSort('userId', build, 'user');
dataFormatFun(build);
}
});
};
const dataFormatFun = (build: any) => {
listData.value = build;
listData.value = dataUserRateSort('userId', build, 'user');
usedListData.value = mergeListFun(usedListData.value, build);
};
const mergeListFun = (arr1: any, arr2: any) => {
const map = new Map();
arr1.forEach((item: any) => {
map.set(item.userId, item);
});
arr2.forEach((item: any) => {
map.set(item.userId, item);
});
return Array.from(map.values());
};
watch(
() => props.modelValue,
(val: any) => {
@@ -115,7 +131,7 @@ const changeFun = () => {
const ids = choseList.value.join(',');
emit('update:modelValue', ids);
const changeData: any[] = [];
listData.value.forEach((item: any) => {
usedListData.value.forEach((item: any) => {
if (choseList.value.includes(String(item.userId))) {
changeData.push(item);
dataUseRate(item.userId, 'user');
@@ -125,7 +141,7 @@ const changeFun = () => {
} else {
emit('update:modelValue', choseList.value);
let changeData: any = {};
listData.value.some((item: any) => {
usedListData.value.some((item: any) => {
if (choseList.value === String(item.userId)) {
changeData = item;
dataUseRate(item.userId, 'user');

View File

@@ -77,7 +77,7 @@ import Dialog from '@/components/common/dialog/index.vue';
import { computed, ref } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import TableForm from '@/components/common/table/tableForm.vue';
import { addWorkApi, updateWorkApi } from '@/api/project/work';
import { addWorkApi, deleteWorkApi, updateWorkApi } from '@/api/project/work';
import { ElMessage } from 'element-plus';
import { useDict } from '@/utils/useDict';
import { disposeMemberList } from '@/views/task/projectDetail/components/project';
@@ -162,9 +162,13 @@ const actionList = ref([
},
{
title: '删除',
type: 'error',
type: 'danger',
needConfirm: true,
confirmTip: '确认删除吗?',
hide: () => props.operateType !== 'addWork',
click: () => {},
click: (row: any) => {
deleteWorkApiFun(row);
},
},
]);
@@ -220,6 +224,15 @@ const updateWorkApiFun = async (params: any) => {
ElMessage.error(res.message);
}
};
const deleteWorkApiFun = async (row: any) => {
const res: any = await deleteWorkApi({ delIdList: [row.id] });
if (res.code === 200) {
ElMessage.success(res.message);
tableRef.value.resetFun();
} else {
ElMessage.error(res.message);
}
};
// const nextPageFun = () => {
// if (hasSameValue()) return;
// emits('update:currentProjectBaseInfo', { ...tableFormRef.value.getFormDataFun(), nodeType: NODE_TYPE.PROJECT });

View File

@@ -21,7 +21,7 @@ export const permissionGroups = [
{
name: '需求管理',
permissions: [
{ btn: '需求管理-创建需求', code: 'demand_add_demand' },
{ btn: '需求管理-创建待办', code: 'demand_add_demand' },
{ btn: '需求管理-编辑需求', code: 'demand_edit_demand' },
{ btn: '需求管理-删除需求', code: 'demand_delete_demand' },
],

View File

@@ -162,34 +162,17 @@ const { RESULT_ACHIEVE_STATUS, TASK_ACHIEVE_STATUS, PERFORMANCE_TYPE, PERFORMANC
'PERFORMANCE_TYPE'
);
const props = defineProps({
// 演示使用 增加了modelValue
modelValue: {
type: Boolean,
default: false,
},
analysisData: {
type: Object,
default: () => {},
},
});
// 演示使用 增加了watch
watch(
() => props.modelValue,
(val: boolean) => {
if (val) {
diaVisible.value = true;
} else {
diaVisible.value = false;
}
}
);
const cloumnWidth = ref('200');
const checkTableRef = ref();
// 演示使用 true改为了false
const diaVisible = ref(false);
const diaVisible = ref(true);
const checkAnalysisList = ref<any>([]);
const checktableData = ref<any>([]);

View File

@@ -21,14 +21,13 @@
<div v-else>
<el-button type="primary" link @click="reviewFun(item)">预览</el-button>
<el-button type="primary" link @click="downLoadFun(item)">下载</el-button>
<el-button type="primary" link @click="compareFun(item)">对比</el-button>
<!-- <el-button type="primary" link @click="compareFun(item)">对比</el-button> -->
</div>
</div>
</template>
</BaseTable>
<FilePreview v-model="previewVisible" :fileId="fileId"></FilePreview>
<!-- 演示使用 v-if改为了v-model -->
<compareTextFile v-model="compareVisible" @close="compareVisible = false"></compareTextFile>
<!-- <compareTextFile v-if="compareVisible" @close="compareVisible = false"></compareTextFile> -->
</div>
</template>
@@ -38,7 +37,7 @@ import BaseTable from '@/components/common/table/baseTable.vue';
import { objectTypeArrayRemovesDuplicates } from '@/utils/common';
import FilePreview from '@/components/common/filePreview/index.vue';
import { downloadFileByStream, fileUploadAllocationIconFun } from '@/utils/file';
import compareTextFile from './compareTextFile.vue';
// import compareTextFile from './compareTextFile.vue';
const props = defineProps({
checkTaskInfo: {

View File

@@ -21,14 +21,13 @@
<div v-else>
<el-button type="primary" link @click="reviewFun(item)">预览</el-button>
<el-button type="primary" link @click="downLoadFun(item)">下载</el-button>
<el-button type="primary" link @click="compareFun(item)">对比</el-button>
<!-- <el-button type="primary" link @click="compareFun(item)">对比</el-button> -->
</div>
</div>
</template>
</BaseTable>
<FilePreview v-model="previewVisible" :fileId="fileId"></FilePreview>
<!-- 演示使用 v-if改为了v-model -->
<compareTextFile v-model="compareVisible" @close="compareVisible = false"></compareTextFile>
<!-- <compareTextFile v-if="compareVisible" @close="compareVisible = false"></compareTextFile> -->
</div>
</template>
@@ -38,7 +37,7 @@ import BaseTable from '@/components/common/table/baseTable.vue';
import { objectTypeArrayRemovesDuplicates } from '@/utils/common';
import FilePreview from '@/components/common/filePreview/index.vue';
import { downloadFileByStream, fileUploadAllocationIconFun } from '@/utils/file';
import compareTextFile from './compareTextFile.vue';
// import compareTextFile from './compareTextFile.vue';
const props = defineProps({
checkTaskInfo: {

View File

@@ -266,9 +266,8 @@
:run-info="currentRunInfo"
@close="showRunDetailDialog = false"
/>
<!-- 演示使用 v-if改为了v-model -->
<analysisDataDialog
v-model="loadcaseAnalysisVisable"
v-if="loadcaseAnalysisVisable"
@close="closeAnalysisFun"
:analysis-data="selectAnalysisData"
/>

View File

@@ -113,13 +113,13 @@
>
<el-icon> <CirclePlus /> </el-icon>新建算例
</p>
<p
<!-- <p
class="menuButton"
v-if="rightClickNodeInfo?.nodeType === NODE_TYPE.TASK"
@click="showDiaFun('updateTask')"
>
<el-icon> <Operation /> </el-icon>状态修改
</p>
</p> -->
<!-- <p class="menuButton" v-if="rightClickNodeInfo?.nodeType === NODE_TYPE.TASK" @click="showDiaFun('inputParam')">
<el-icon>
<SetUp />

View File

@@ -30,14 +30,14 @@
type="primary"
v-permission="'demand_add_demand'"
@click="visibleDialog(true)"
>创建需求</el-button
>创建待办</el-button
>
</template>
</demandTable>
<Dialog
v-model="formVisible"
:loading="loadingInterface"
:diaTitle="isCreateDialog ? '创建需求' : '编辑需求'"
:diaTitle="isCreateDialog ? '创建待办' : '编辑需求'"
width="60%"
:height="700"
@close="closeFun"
@@ -341,7 +341,7 @@ const confirmFun = async () => {
}
if (isCreateDialog.value) {
const demandId = await createDemandApiFun(editFormInfo.value);
// 没有demandId就是创建需求失败
// 没有demandId就是创建待办失败
if (demandId && editFormInfo.value.attachments?.length > 0) {
const files = editFormInfo.value.attachments.filter((item: any) => item.raw);
if (files.length > 0) {
@@ -401,7 +401,7 @@ const createDemandApiFun = async (fromData: any) => {
// 待办所属类型
demandType: simulationType.value,
// 是否走利元亨创建需求直接创建任务逻辑
// 是否走利元亨创建待办直接创建任务逻辑
isLyric: enableConfigByTenant([TENANT_ENUM.LYRIC]),
};
// return;
@@ -664,23 +664,23 @@ const disposeDeptMember = async () => {
}
return pMemberId;
}
const disFun = (simType: string) => {
for (let index = 0; index < deptList.value.length; index++) {
if (deptList.value[index].deptName.includes(simType)) {
editFormInfo.value.pMemberList =
deptList.value[index].userId + '-' + deptList.value[index].deptName;
pMemberId = deptList.value[index].userId;
}
}
return pMemberId;
};
if (editFormInfo.value.simType.includes('流体')) {
return disFun('流体');
}
// const disFun = (simType: string) => {
// for (let index = 0; index < deptList.value.length; index++) {
// if (deptList.value[index].deptName.includes(simType)) {
// editFormInfo.value.pMemberList =
// deptList.value[index].userId + '-' + deptList.value[index].deptName;
// pMemberId = deptList.value[index].userId;
// }
// }
// return pMemberId;
// };
// if (editFormInfo.value.simType.includes('流体')) {
// return disFun('流体');
// }
if (editFormInfo.value.simType.includes('热力学')) {
return disFun('热力学');
}
// if (editFormInfo.value.simType.includes('热力学')) {
// return disFun('热力学');
// }
const matchingDeptList = deptList.value.filter((item: any) => {
return item.deptName.indexOf(currentProjectUndertaker.value) !== -1;
});