This commit is contained in:
weibl
2026-02-05 19:06:43 +08:00
4 changed files with 18 additions and 5 deletions

View File

@@ -14,6 +14,11 @@ const PREFIX = env.VITE_API_PREFIX_PROJECT;
export const addDemandApi = (params: any) => {
return post(`${PREFIX}demand/addDemand`, params);
};
// 新增需求(不鉴权)
export const addDemandNoPermissionApi = (params: any) => {
return post(`${PREFIX}demand/addDemandNoPermission`, params);
};
/**
*
* @param type 0 新增待办 1是我确认的

View File

@@ -58,7 +58,6 @@ export const getUserSimulationType = () => {
/** 获取当前用户能看到的学科 */
export const getSeeDisciplines = () => {
const roleSimulationInfo: any = getDisciplineByRole(getUserRoleCodes());
console.log('roleSimulationInfo', roleSimulationInfo);
return roleSimulationInfo.discipline;
// return ['结构'];
};

View File

@@ -417,6 +417,7 @@ const filterTaskParams = reactive({
const tableLoad = ref(false);
const tableDataLoadFun = () => {
tableLoad.value = false;
localStorage.setItem('HOME_TASK_PARAMS', 'total');
};
const filterTaskFun = (filterItem: any) => {
if (filterItem.value === 'total' || tableLoad.value) {
@@ -493,6 +494,7 @@ defineExpose({
// 预制参数_从首页点击跳转过来的参数
const gettParams = () => {
const params = localStorage.getItem('HOME_TASK_PARAMS');
console.log('SPDM_ROUTER_CHANGE', params);
if (params) {
const paramsObj = filterBtnList.value.find((item) => item.key === params);
if (paramsObj) {
@@ -506,9 +508,9 @@ const gettParams = () => {
filterTaskFun(paramsObj);
}
}
localStorage.removeItem('HOME_TASK_PARAMS');
};
emitter.on('SPDM_ROUTER_CHANGE', (data: any) => {
console.log('SPDM_ROUTER_CHANGE', data);
if (data.path === '/spdm/task/execute') {
gettParams();
}
@@ -520,7 +522,9 @@ onMounted(() => {
if (!props.hideSpecialSearch) {
initTaskCount();
}
gettParams();
if (window.location.pathname === '/spdm/task/execute') {
gettParams();
}
});
</script>

View File

@@ -101,7 +101,12 @@
import { nextTick, reactive, ref } from 'vue';
import Dialog from '@/components/common/dialog/index.vue';
import TableForm from '@/components/common/table/tableForm.vue';
import { addDemandApi, deleteDemandApi, demandListApi, editDemandApi } from '@/api/project/demand';
import {
addDemandNoPermissionApi,
deleteDemandApi,
demandListApi,
editDemandApi,
} from '@/api/project/demand';
import { getChildrenNodeList } from '../../projectDetail/components/projectApi';
import { NODE_TYPE } from '@/utils/enum/node';
// import { upload } from '@/api/request';
@@ -386,7 +391,7 @@ const createDemandApiFun = async (fromData: any) => {
};
// console.log('params', params, editFormInfo.value);
// return;
const res: any = await addDemandApi(params);
const res: any = await addDemandNoPermissionApi(params);
if (res.code === 200) {
formVisible.value = false;
ElMessage.success('创建成功');