|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="details">
|
|
|
- <!-- @tab-click="handleClick" -->
|
|
|
- <el-tabs v-model="activeName">
|
|
|
+ <!-- -->
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick(nowObj)">
|
|
|
<el-tab-pane
|
|
|
label="基本信息"
|
|
|
name="jbxx"
|
|
@@ -159,7 +159,7 @@
|
|
|
>
|
|
|
<el-button
|
|
|
type="success"
|
|
|
- v-show="['XJ', 'SJ','SJJ'].includes(route.query.dataType)"
|
|
|
+ v-show="['XJ', 'SJ', 'SJJ'].includes(route.query.dataType)"
|
|
|
:disabled="
|
|
|
!steps.find((x) =>
|
|
|
x.auditflowStep.includes(route.query.dataType + 'TJ')
|
|
@@ -210,7 +210,7 @@ const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
const formde = ref(route.query.form == "dataEntry");
|
|
|
const props = defineProps({});
|
|
|
-let nowObj = {};
|
|
|
+let nowObj = ref({});
|
|
|
const shdiaRef = ref(null);
|
|
|
const hgxdiaRef = ref(null);
|
|
|
const tjdiaRef = ref(null);
|
|
@@ -240,27 +240,37 @@ function handleClick({ id, auditflowId }) {
|
|
|
if (formde.value) {
|
|
|
getDetailsDk(id).then((res) => {
|
|
|
infoObj.value = res.data;
|
|
|
- });
|
|
|
- } else {
|
|
|
- // if (activeName.value == "jbxx")
|
|
|
- getDkjbxx(id).then((res) => {
|
|
|
- infoObj.value = res.data;
|
|
|
- });
|
|
|
- getDkjbywy(id).then((res) => {
|
|
|
- sheets.value = JSON.parse(res.data.sheetJson);
|
|
|
- ywyptab.value = sheets.value[0].sheet;
|
|
|
+ if (res.data.sheetJson) {
|
|
|
+ sheets.value = JSON.parse(res.data.sheetJson);
|
|
|
+ ywyptab.value = sheets.value[0].sheet;
|
|
|
+ }
|
|
|
+
|
|
|
console.log(sheets.value);
|
|
|
});
|
|
|
- // else if (activeName.value == "ywjl")
|
|
|
- getAuditflow({ dkjdxxId: id }).then((res) => {
|
|
|
- activities.value = res.data;
|
|
|
- });
|
|
|
- getHcInfo({ dkid: id, auditflowStep: "WYDC", auditflowId }).then((res) => {
|
|
|
- hcxxList.value = res.data;
|
|
|
- nextTick(() => {
|
|
|
- hcxxRef.value[0].init(hcxxList.value[0].sdfjs);
|
|
|
+ } else {
|
|
|
+ if (activeName.value == "jbxx")
|
|
|
+ getDkjbxx(id).then((res) => {
|
|
|
+ infoObj.value = res.data;
|
|
|
});
|
|
|
- });
|
|
|
+ else if (activeName.value == "ywyp")
|
|
|
+ getDkjbywy(id).then((res) => {
|
|
|
+ sheets.value = JSON.parse(res.data.sheetJson);
|
|
|
+ ywyptab.value = sheets.value[0].sheet;
|
|
|
+ console.log(sheets.value);
|
|
|
+ });
|
|
|
+ else if (activeName.value == "ywjl")
|
|
|
+ getAuditflow({ dkjdxxId: id }).then((res) => {
|
|
|
+ activities.value = res.data;
|
|
|
+ });
|
|
|
+ else if (activeName.value == "hcxx")
|
|
|
+ getHcInfo({ dkid: id, auditflowStep: "WYDC", auditflowId }).then(
|
|
|
+ (res) => {
|
|
|
+ hcxxList.value = res.data;
|
|
|
+ nextTick(() => {
|
|
|
+ hcxxRef.value[0].init(hcxxList.value[0].sdfjs);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
getStep({ dkjdxxId: id }).then((res) => {
|
|
|
steps.value = res.data;
|
|
@@ -275,7 +285,7 @@ function getDetails({ pcsjid, id, auditflowId }) {
|
|
|
activeName.value = "jbxx";
|
|
|
infoObj.value = {};
|
|
|
activities.value = [];
|
|
|
- // nowObj = { pcsjid, id };
|
|
|
+ nowObj.value = { pcsjid, id, auditflowId };
|
|
|
handleClick({ pcsjid, id, auditflowId });
|
|
|
}
|
|
|
function moreAct(actitem) {
|