feat : 项目详情中立项/编辑页面demo

This commit is contained in:
2024-06-08 00:05:28 +08:00
parent 86ff3c2e94
commit 521e40cf3d
2 changed files with 291 additions and 25 deletions

View File

@@ -11,19 +11,32 @@
v-model:value="auditOpinion"
/>
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
<ApprovalDetail type="approval" v-show="showActive == '20'" :formData="commonForm.formData"
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
v-model:value="auditOpinion"/>
<ApprovalDetail type="approval" v-show="showActive == '20'&&!showApply&&!showTabs" :formData="commonForm.formData"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
v-model:value="auditOpinion"/>
<project-apply v-if="showApply"/>
<el-tabs v-if="showTabs" v-model="activeName">
<el-tab-pane label="详情" name="first">
<ApprovalDetail type="approval" idName="applyDetail" :formData="commonForm.formData"
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
</el-tab-pane>
<el-tab-pane label="重新提交" name="second">
<project-apply/>
</el-tab-pane>
</el-tabs>
</template>
</steps>
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId" v-model:value="auditOpinion"/>
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"
v-model:value="auditOpinion"/>
</template>
<script setup lang="jsx">
@@ -37,6 +50,8 @@ import Opinion from "@/components/DetailComponent/Opinion.vue";
const route = useRoute()
const activeName = ref('first')
const showApply = ref(false)
const showTabs = ref(false)
const loading = ref(false)
const processStore = useProcessStore()
const fileListShow = ref('READ')
@@ -64,8 +79,8 @@ const getAllInfo = async (state) => {
message: msg,
type: 'error'
})
if(msg==='查询结果为空'){
commonForm.value=[]
if (msg === '查询结果为空') {
commonForm.value = []
}
loading.close()
}
@@ -79,7 +94,7 @@ const getAllInfo = async (state) => {
processStore.passList.value = data.passList;
nextTick(() => {
commonProvessViewer.value = true
if (data.formPermMap["fileList"]) {
if (data.formPermMap && data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
})
@@ -88,41 +103,53 @@ const getAllInfo = async (state) => {
loading.close()
}
}
const changeModel = (active) => {
if (route.query.state === '0' && active === '20') {
showApply.value = true
} else if (route.query.state === '3' && active === '20') {
//tab左侧详情, 右侧重新提交
showTabs.value = true
getAllInfo(active)
} else {
showApply.value = false
showTabs.value = false
getAllInfo(active)
}
}
const setDetail = (active) => {
showActive.value = active
getAllInfo(active)
changeModel(active)
}
const stepChange = (data) => {
showActive.value = data.active
getAllInfo(data.active)
changeModel(data.active)
}
</script>
<style scoped lang="scss">
.detail-block {
padding-top: 15px;
}
:deep(.el-tabs__nav-scroll) {
width: 100%;
:deep(.el-tabs__nav-scroll) {
width: 100%;
display: flex;
.el-tabs__nav {
display: flex;
flex: 1;
.el-tabs__nav {
display: flex;
.el-tabs__item {
flex: 1;
.el-tabs__item {
flex: 1;
font-size: 16px;
}
.is-active {
color: black;
background-color: #DED0B2;
}
font-size: 16px;
}
//.is-active {
// color: black;
// //background-color: #DED0B2;
//}
}
}
</style>