Merge branch 'main' of http://carsafe.uicp.cn/Front_Team/SPDM
This commit is contained in:
@@ -213,7 +213,7 @@ import HeadSearch from './headSearch.vue';
|
||||
import { getFormConfigureApi } from '@/api/system/systemData';
|
||||
import { formOptionsFormat } from './lib';
|
||||
import { exportFile, fileUploadAllocationIconFun } from '@/utils/file';
|
||||
import { cloneDeep, isString, isEqual } from 'lodash-es';
|
||||
import { cloneDeep, isString } from 'lodash-es';
|
||||
import { CommonStore } from '@/stores/common';
|
||||
|
||||
const commonStore = CommonStore();
|
||||
@@ -346,10 +346,8 @@ watch(
|
||||
|
||||
watch(
|
||||
() => props.params,
|
||||
(newVal: any, oldVal: any) => {
|
||||
if (!isEqual(newVal, oldVal)) {
|
||||
resetSearchFun(newVal);
|
||||
}
|
||||
(val: any) => {
|
||||
resetSearchFun(val);
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
</el-form>
|
||||
</template>
|
||||
</BaseTable>
|
||||
|
||||
<planningRecordDetail v-if="showDetail" :plan-info="currentRow" @close="closeDetailFun"></planningRecordDetail>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -31,6 +33,7 @@ import { getChildrenNodeListApi } from '@/api/project/node';
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { queryDesignVersionsApi } from '@/api/project/project';
|
||||
import planningRecordDetail from './planningRecordDetail.vue';
|
||||
|
||||
const props = defineProps({
|
||||
projectInfo: {
|
||||
@@ -41,6 +44,7 @@ const props = defineProps({
|
||||
|
||||
const phaseList = ref<any>([]);
|
||||
const baseTableRef = ref();
|
||||
const showDetail = ref(false);
|
||||
const formData = reactive<any>({
|
||||
projectId: '',
|
||||
phaseId: '',
|
||||
@@ -65,13 +69,14 @@ const getProjectPhaseListFun = async () => {
|
||||
} catch {}
|
||||
};
|
||||
|
||||
const currentRow = ref<any>({});
|
||||
const actionList = ref([
|
||||
{
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
click: (row: any) => {
|
||||
const data = JSON.parse(row.versionContents);
|
||||
console.log(data);
|
||||
currentRow.value = row;
|
||||
showDetail.value = true;
|
||||
},
|
||||
},
|
||||
]);
|
||||
@@ -93,6 +98,10 @@ const getTableDataFun = async () => {
|
||||
} catch {}
|
||||
};
|
||||
|
||||
const closeDetailFun = () => {
|
||||
showDetail.value = false;
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
if (props.projectInfo) {
|
||||
formData.projectId = props.projectInfo.uuid;
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<Dialog v-model="visible" diaTitle="策划详情" :width="'70%'" :height="'70%'" @close="closeFun">
|
||||
<div class="detail-page">
|
||||
<simulationPlan v-if="cidFlowId" :page-data="approvalData"></simulationPlan>
|
||||
<loadCaseTable
|
||||
v-else
|
||||
:editMode="false"
|
||||
ref="treeTableRef"
|
||||
readonly
|
||||
tableName="PROJECT_TASK_PLANNING"
|
||||
:data="mergedPreviewTree"
|
||||
:hasOperationColumn="false"
|
||||
:showCheckBox="false"
|
||||
>
|
||||
</loadCaseTable>
|
||||
</div>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import simulationPlan from '@/views/index/approvalPreview/components/simulationPlan.vue';
|
||||
import { systemQueryApproveInstanceApi } from '@/api/system/systemApprove';
|
||||
import loadCaseTable from '@/components/common/treeCaseTable/loadCaseTable.vue';
|
||||
import { translateLoadcaseTree } from '@/utils/node';
|
||||
|
||||
const emits = defineEmits(['close']);
|
||||
const props = defineProps({
|
||||
planInfo: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
const visible = ref(true);
|
||||
const cidFlowId = ref<any>('');
|
||||
const approvalData = ref<any>({});
|
||||
const mergedPreviewTree = ref<any>([]);
|
||||
const closeFun = () => {
|
||||
emits('close');
|
||||
};
|
||||
|
||||
const getApprovalInfo = async () => {
|
||||
const param = {
|
||||
flowId: cidFlowId.value,
|
||||
};
|
||||
try {
|
||||
const res: any = await systemQueryApproveInstanceApi(param);
|
||||
if (res && res.code === 200) {
|
||||
approvalData.value = res.data;
|
||||
}
|
||||
} catch {}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.planInfo,
|
||||
async (newVal) => {
|
||||
if (newVal) {
|
||||
console.log(newVal, 'newVal');
|
||||
cidFlowId.value = newVal?.cidFlowId;
|
||||
|
||||
if (cidFlowId.value) {
|
||||
await getApprovalInfo();
|
||||
} else {
|
||||
mergedPreviewTree.value = translateLoadcaseTree(JSON.parse(newVal.versionContents || '{}'));
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true,
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -292,7 +292,7 @@
|
||||
v-model="dialogApproveUserVisible"
|
||||
:isInitial="isEmptyPool"
|
||||
:moduleCode="'SIMULATION_PLAN_APPROVAL'"
|
||||
:show-b-new-version="false"
|
||||
:show-b-new-version="true"
|
||||
@confirm="onAddApproveConfirmFun"
|
||||
@close="closeApproveFun"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user