Compare commits
10 Commits
feature-19
...
93672d7f42
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93672d7f42 | ||
|
|
3acc7f4532 | ||
|
|
4debada5ec | ||
| 34e5a3137b | |||
| 3504df9faf | |||
| 0cb8e33871 | |||
| f03016e94a | |||
| 4de9e3ab85 | |||
| 5f915d5436 | |||
|
|
ed27e092a8 |
@@ -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地址
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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 });
|
||||
|
||||
@@ -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' },
|
||||
],
|
||||
|
||||
@@ -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>([]);
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user