|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="container normal-panel normal-margin">
|
|
|
+ <div class="container normal-panel normal-margin flex-align-center flex-between">
|
|
|
<div class="flex-align-center">
|
|
|
<p class="appname inline-16">{{routerName}}</p>
|
|
|
<div class="flex-align-center">
|
|
@@ -11,9 +11,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div>
|
|
|
+ <cpAdd :formPath="formPath" :data="editData" btnType="default" @onSuccess="onSuccess"></cpAdd>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="container normal-panel normal-margin">
|
|
|
- <el-descriptions :column="4">
|
|
|
+ <el-descriptions title="基本信息" :column="4">
|
|
|
<el-descriptions-item v-for="item in mainAreaData" :key="item.index" :label="item.label">{{item.value?item.value:'--'}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</div>
|
|
@@ -22,8 +25,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import cpAdd from '../modules/cpEdit.vue'
|
|
|
export default {
|
|
|
- props:['titleText','mainAreaData','turnPageId','idname'],
|
|
|
+ props:['titleText','mainAreaData','turnPageId','idname','formPath','editData'],
|
|
|
data () {
|
|
|
return {
|
|
|
routerName:'',
|
|
@@ -31,6 +35,9 @@ export default {
|
|
|
total:0
|
|
|
}
|
|
|
},
|
|
|
+ components:{
|
|
|
+ cpAdd
|
|
|
+ },
|
|
|
methods:{
|
|
|
async queryData (pageNumber) {
|
|
|
const res = await this.$api.requested({
|
|
@@ -53,6 +60,9 @@ export default {
|
|
|
previous () {
|
|
|
this.rowindex -= 1
|
|
|
this.queryData(this.rowindex)
|
|
|
+ },
|
|
|
+ onSuccess () {
|
|
|
+ this.$emit('onEditSuccess')
|
|
|
}
|
|
|
},
|
|
|
created () {
|