Commit 9cd11ac9 by peiqiQQQ

添加详情页

1 parent 116ce6e1
<template>
<el-dialog
:title="'详情'"
:visible.sync="showDialog"
:close-on-click-modal="false"
width="60%"
@close="showDialog = false"
@open="handleOpen"
>
<div>
<Form
ref="addForm"
:form-options="formOptions"
label-width="120px"
></Form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="showDialog = false" size="mini">取 消</el-button>
</span>
</el-dialog >
</template>
<script>
import Form from '@/components/Form.vue'
import { buildType, analysisState } from '@/utils/dictionary'
export default {
components: { Form, },
props: {
visible: {
type: Boolean,
default: false,
},
rowData: {
type: Object,
default: () => {},
},
activeName: {
type: String,
default: '1',
},
activeName2: {
type: String,
default: '1',
}
},
computed: {
formOptions() {
let arr = [
{
label: '批次年度', // label文字
prop: 'year', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
{
label: '批次名称', // label文字
prop: 'batName', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
{
label: '需求名称', // label文字
prop: 'needName', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
{
label: '项目名称', // label文字
prop: 'prjName', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
]
if (this.activeName === '1') {
arr = [
...arr,
{
label: '建设类型', // label文字
prop: 'buildType', // 字段名
element: 'el-input', // 指定elementui组件
options: buildType,
disabled: true,
},
{
label: '技术路线表', // label文字
prop: 'techRouteState', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '',
options: analysisState,
disabled: true,
},
{
label: '架构遵从表', // label文字
prop: 'archiCompState', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '',
options: analysisState,
disabled: true,
},
{
label: '功能清单', // label文字
prop: 'functionListState', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '',
options: analysisState,
disabled: true,
},
{
label: '数据实体清单', // label文字
prop: 'dataEntityListState', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '',
options: analysisState,
disabled: true,
},
{
label: '集成系统清单', // label文字
prop: 'integrateSysListState', // 字段名
element: 'el-select', // 指定elementui组件
placeholder: '',
options: analysisState,
disabled: true,
},
]
}else{
arr = [
...arr,
{
label: '建设类型', // label文字
prop: 'buildType', // 字段名
element: 'el-select', // 指定elementui组件
options: buildType,
placeholder: '',
disabled: true,
},
]
switch (this.activeName2) {
case '1':
arr = [
...arr,
{
label: '完整性', // label文字
prop: 'createMan', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
{
label: '规范性', // label文字
prop: 'createTime', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
{
label: '审查结果', // label文字
prop: 'reviewSuggestion', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
]
break
case '2':
arr = [
...arr,
{
label: '架构遵从关系审查结果', // label文字
prop: 'remark', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
]
break
case '3':
arr = [
...arr,
{
label: '合规性检查', // label文字
prop: 'reviewSuggestion', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
]
break
default:
arr = [
...arr,
{
label: '备注', // label文字
prop: 'reviewSuggestion', // 字段名
element: 'el-input', // 指定elementui组件
disabled: true,
},
]
break
}
}
return arr
},
showDialog: {
get() {
return this.visible
},
set(value) {
this.$emit('update:visible', value)
},
},
},
methods: {
handleOpen() {
if (Object.keys(this.rowData).length) {
this.formOptions.forEach((v) => {
v.initValue = this.rowData[v.prop]
})
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
})
} else {
this.$nextTick(() => {
this.$refs['addForm'].addInitValue()
this.$refs['addForm'].onReset()
})
}
},
}
}
</script>
\ No newline at end of file
......@@ -98,6 +98,10 @@
:columns="columns"
id-key="elementId"
>
<template #prjName="{ data }">
<el-button v-if="data.row.prjName" class="detailBtn" size="medium" @click="fnDetail(data.row)">{{data.row.prjName}}</el-button >
<span v-else>{{data.row.prjName}}</span>
</template>
</table-config>
</template>
</list-page>
......@@ -107,6 +111,12 @@
title="概设材料解析内容"
:visible.sync="analysisContentVisible"
/>
<Detail
:visible.sync="visible"
:row-data="rowData"
:activeName='activeName'
:activeName2='activeName2'
/>
</div>
</template>
......@@ -115,6 +125,7 @@ import ListPage from '@/components/ListPage.vue'
import SearchForm from '@/components/SearchForm.vue'
import TableConfig from '@/components/TableConfig.vue'
import AnalysisContent from './AnalysisContent'
import Detail from './Detail.vue'
import { queryConceptualReview } from '@/api/interface'
import { exportRiskReport, analysisConceptual } from '@/api/index'
......@@ -196,6 +207,7 @@ export default {
],
analysisContentVisible: false,
rowData: {},
visible: false,
}
},
components: {
......@@ -203,6 +215,7 @@ export default {
SearchForm,
TableConfig,
AnalysisContent,
Detail
},
computed: {
formOptions() {
......@@ -262,6 +275,7 @@ export default {
label: '项目名称',
prop: 'prjName',
width: '320px',
__slotName: 'prjName',
},
]
// 这里处理不同tab下,展示的列也有所不同
......@@ -451,6 +465,10 @@ export default {
},
mounted() {},
methods: {
fnDetail(row){
this.rowData = row
this.visible = true
},
viewAnalysisContent(row) {
this.rowData = row
this.analysisContentVisible = true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!