diff --git a/src/api/project/demand.ts b/src/api/project/demand.ts index 94ac8f7b..966b406b 100644 --- a/src/api/project/demand.ts +++ b/src/api/project/demand.ts @@ -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是我确认的 diff --git a/src/tenants/lyric/views/task/lyricTask.ts b/src/tenants/lyric/views/task/lyricTask.ts index b1f82493..10815dde 100644 --- a/src/tenants/lyric/views/task/lyricTask.ts +++ b/src/tenants/lyric/views/task/lyricTask.ts @@ -58,7 +58,6 @@ export const getUserSimulationType = () => { /** 获取当前用户能看到的学科 */ export const getSeeDisciplines = () => { const roleSimulationInfo: any = getDisciplineByRole(getUserRoleCodes()); - console.log('roleSimulationInfo', roleSimulationInfo); return roleSimulationInfo.discipline; // return ['结构']; }; diff --git a/src/views/task/simulationTask/components/taskTable.vue b/src/views/task/simulationTask/components/taskTable.vue index 648fc00f..9c7719c4 100644 --- a/src/views/task/simulationTask/components/taskTable.vue +++ b/src/views/task/simulationTask/components/taskTable.vue @@ -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(); + } }); diff --git a/src/views/task/simulationTask/newDemand/index.vue b/src/views/task/simulationTask/newDemand/index.vue index de23de2d..ea92877e 100644 --- a/src/views/task/simulationTask/newDemand/index.vue +++ b/src/views/task/simulationTask/newDemand/index.vue @@ -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('创建成功');