Merge branch 'main' of http://192.168.65.198:3000/Front_Team/SPDM
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
v-model="modelValue"
|
||||
:options="options"
|
||||
@change="handleChange"
|
||||
:placeholder="disabled ? '' : '请输入'"
|
||||
:disabled="disabled"
|
||||
v-bind="$attrs"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -15,12 +18,14 @@ interface Props {
|
||||
nodeType: any
|
||||
parentId?: string | null
|
||||
modelValue?: string | null
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
nodeType: NODE_TYPE.PROJECT,
|
||||
parentId: '',
|
||||
modelValue: '',
|
||||
disabled: false,
|
||||
});
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'update:nodeInfo']);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<Dialog
|
||||
v-if="hasDialog"
|
||||
v-model="visible"
|
||||
show-footer
|
||||
show-cancel-button
|
||||
@@ -26,25 +27,38 @@
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
<TableForm v-else ref="tableFormRef" :tableName="tableName" @change="onFormChangeFun" :showDisabled="true">
|
||||
<template #form-analysisDirectionId>
|
||||
<node-level-select
|
||||
v-model="form.analysisDirectionId"
|
||||
:parentId="form.projectId"
|
||||
:nodeType="disciplineNodeType"
|
||||
disabled
|
||||
/>
|
||||
</template>
|
||||
</TableForm>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed, nextTick } from 'vue';
|
||||
import { ref, onMounted, computed, nextTick, watchEffect } from 'vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import nodeLevelSelect from '@/components/project/nodeLevelSelect.vue';
|
||||
import { CommonStore } from '@/stores/common';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { init } from 'echarts/types/src/echarts.all.js';
|
||||
|
||||
const commonStore = CommonStore();
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean;
|
||||
detail: any,
|
||||
folder: any,
|
||||
hasDialog?:boolean;
|
||||
modelValue?: boolean;
|
||||
detail?: any;
|
||||
folder?: any;
|
||||
tableName: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
hasDialog: true,
|
||||
modelValue: false,
|
||||
detail: null,
|
||||
folder: null,
|
||||
@@ -87,18 +101,22 @@ const form = ref<RuleForm>({
|
||||
|
||||
const onShowFun = () => {
|
||||
resetFun();
|
||||
};
|
||||
const initData = () => {
|
||||
const file = [{
|
||||
name: props.detail.originalName,
|
||||
}];
|
||||
tableFormRef.value?.setFormDataFun({ ...props.detail, ...{ originalName: file } });
|
||||
form.value.projectId = props.detail.projectId;
|
||||
form.value.analysisDirectionId = props.detail.analysisDirectionId;
|
||||
};
|
||||
watchEffect(() => {
|
||||
nextTick(() => {
|
||||
if (props.detail) {
|
||||
const file = [{
|
||||
name: props.detail.originalName,
|
||||
}];
|
||||
tableFormRef.value?.setFormDataFun({ ...props.detail, ...{ originalName: file } });
|
||||
form.value.projectId = props.detail.projectId;
|
||||
form.value.analysisDirectionId = props.detail.analysisDirectionId;
|
||||
initData();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
});
|
||||
const resetFun = () => {
|
||||
tableFormRef.value?.resetFun();
|
||||
};
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
<template>
|
||||
<div>知识库审核预览{{ data.cidFlowId }}</div>
|
||||
<knowledgeDetailModal :hasDialog="false" tableName="SIMULATION_KNOWLEDGE" :detail="knowledgeDetail"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import knowledgeDetailModal from '@/views/competenceCenter/knowledge/components/knowledgeDetailModal.vue';
|
||||
import { ref, watchEffect } from 'vue';
|
||||
|
||||
interface Props {
|
||||
data: any;
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
data: {},
|
||||
});
|
||||
const knowledgeDetail = ref<any>(null);
|
||||
watchEffect(() => {
|
||||
if (props.data) {
|
||||
const approveContents = JSON.parse(props.data?.approveContents || '{}');
|
||||
knowledgeDetail.value = approveContents.beforeData || null;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
42
src/views/index/approvalPreview/components/taskPool.vue
Normal file
42
src/views/index/approvalPreview/components/taskPool.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div>工况清单库:{{ poolName }}</div>
|
||||
<loadCaseTable
|
||||
:editMode="false"
|
||||
ref="treeTableRef"
|
||||
readonly
|
||||
tableName="TASK_POOL"
|
||||
:data="fullTableData"
|
||||
:hasOperationColumn="false"
|
||||
> </loadCaseTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watchEffect } from 'vue';
|
||||
import loadCaseTable from '@/components/common/treeCaseTable/loadCaseTable.vue';
|
||||
import {
|
||||
transformPoolNodesToTree,
|
||||
} from '@/utils/node';
|
||||
|
||||
interface Props {
|
||||
data: any;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
data: {},
|
||||
});
|
||||
|
||||
const poolName = ref();
|
||||
const approveContents = ref<any>(null);
|
||||
const approveDetail = ref<any>({
|
||||
addNodeArray: [],
|
||||
});
|
||||
const fullTableData = ref([])
|
||||
|
||||
watchEffect(() => {
|
||||
if (props.data) {
|
||||
approveContents.value = JSON.parse(props.data?.approveContents || '{}');
|
||||
poolName.value = approveContents.value?.poolBrief?.poolName;
|
||||
approveDetail.value.addNodeArray = transformPoolNodesToTree(approveContents.value?.addNodeArray[0]?.nodes);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="gl-page-content">
|
||||
<div class="content">
|
||||
<Knowledge v-if="data.approveType === 2" :data="data" />
|
||||
<TaskPool v-if="data.approveType === 1" :data="data" />
|
||||
<Knowledge v-else-if="data.approveType === 2" :data="data" />
|
||||
<div v-else>其他审核预览{{ data.cidFlowId }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,6 +12,7 @@
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { systemQueryApproveInstanceApi } from '@/api/system/systemApprove';
|
||||
import TaskPool from './components/taskPool.vue';
|
||||
import Knowledge from './components/knowledge.vue';
|
||||
|
||||
const w: any = window;
|
||||
|
||||
Reference in New Issue
Block a user