Browse Source

2024-05-21 修改mes中的compents的Detail.vue组件,同步更新

master_hella_20240701
zhousq 6 months ago
parent
commit
ccb7925edb
  1. 3
      src/views/mes/abilityInfo/index.vue
  2. 38
      src/views/mes/components/Detail.vue

3
src/views/mes/abilityInfo/index.vue

@ -66,7 +66,6 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '../components/Detail.vue' import Detail from '../components/Detail.vue'
import {MesOrderMonthMain} from "@/views/mes/ordermonthplan/mesOrderMonthMain.data";
defineOptions({ name: 'AbilityInfo' }) defineOptions({ name: 'AbilityInfo' })
@ -190,7 +189,7 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicAbilityInfo') detailRef.value.openDetail(row, titleName, titleValue, 'AbilityInfo')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */

38
src/views/mes/components/Detail.vue

@ -40,7 +40,7 @@
</ContentWrap> </ContentWrap>
<div class="flex"> <div class="flex">
<!-- 详情 --> <!-- 详情 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAliasLabel&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&tabsList[current].label!='主数据'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 --> <ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAlias.label&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&tabsList[current].label!='主数据'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 -->
<TableHead <TableHead
v-if="!isBasic" v-if="!isBasic"
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@ -114,6 +114,7 @@
<div v-for="(annexItem ,index) in annexTableData" :key="index" v-show="annexItem.label==tabsList[current].label" class="w-[100%]" :style="{height:annexItem.hasSubDetail?'100%':remarkHeight+'px'}"> <div v-for="(annexItem ,index) in annexTableData" :key="index" v-show="annexItem.label==tabsList[current].label" class="w-[100%]" :style="{height:annexItem.hasSubDetail?'100%':remarkHeight+'px'}">
<ContentWrap class="w-[100%]"> <ContentWrap class="w-[100%]">
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}"> <ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexItem.label" <Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem" :annexData="annexItem"
@handleAnnexSuccess="updateAnnexTableHandle" @handleAnnexSuccess="updateAnnexTableHandle"
@ -138,25 +139,37 @@
</div> </div>
<!-- 附件/备注/变更记录 --> <!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAliasLabel||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}"> <ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAlias.label" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 --> <!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}"> <ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexAliasLabel" <Annex
:annexData="annexData" :annexData="annexData"
:showDownload = "annexAlias.showDownload"
:hiddenDelete = "annexAlias.hiddenDelete"
@handleAnnexSuccess="handleAnnexSuccess" @handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess" @deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data" :upData="remarksData.data"
:key="count" :key="count"
/> />
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='备注'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- 备注组件 --> <!-- 备注组件 -->
<Remarks v-show="tabsList[current].label=='备注'" <Remarks
:remarksData="remarksData" :remarksData="remarksData"
class="mt-20px" class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess" @remarksSubmitScuess="remarksSubmitScuess"
:key="count" :key="count"
/> />
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- 变更记录组件 --> <!-- 变更记录组件 -->
<ChangeRecord v-show="tabsList[current].label=='变更记录'" :changeRecordData="changeRecordData" class="mt-20px" :key="count"/> <ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" :key="count"/>
</ElScrollbar> </ElScrollbar>
</ContentWrap> </ContentWrap>
</div> </div>
@ -226,10 +239,15 @@ const props = defineProps({
default: ()=>[] default: ()=>[]
}, },
//tab //tab
annexAliasLabel: { annexAlias: {
type: String, type: Object,
required: false, required: false,
default: '附件' default: ()=>({
label: '附件',
showDownload:false,
showPreview:false,
hiddenDelete:false
})
}, },
// //
isBasic: { isBasic: {
@ -402,7 +420,7 @@ const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
// } // }
const otherList = [...props.annexTable,{ const otherList = [...props.annexTable,{
label:props.annexAliasLabel, label:props.annexAlias.label,
prop:'Annex' prop:'Annex'
},{ },{
label:'备注', label:'备注',
@ -503,6 +521,7 @@ const getAnnexFileList = async (row:id) => {
} }
/** 添加附件 */ /** 添加附件 */
const handleAnnexSuccess = () => { const handleAnnexSuccess = () => {
getFileList() getFileList()
getChangeRecordList() getChangeRecordList()
} }
@ -520,6 +539,7 @@ const updateAnnexTableHandle = () => {
// Tabs // Tabs
const current = ref(0) const current = ref(0)
const change = (item, index) => { const change = (item, index) => {
current.value = index current.value = index
emit('changeTabs', item) emit('changeTabs', item)
if(otherList.find(other=>other.label==item.label)){ if(otherList.find(other=>other.label==item.label)){

Loading…
Cancel
Save