编辑产品表头等

dev
Jo 3 years ago
parent d29e0878a7
commit adb72bf10d
  1. 4
      src/views/data/Framework.vue
  2. 5
      src/views/data/Introduce.vue

@ -128,9 +128,7 @@
<el-table :data="previewData" class="table" stripe header-align="center" row-key="id" :key="editIndex"> <el-table :data="previewData" class="table" stripe header-align="center" row-key="id" :key="editIndex">
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.custom"> <template v-if="scope.row.custom">序号</template>
<el-input placeholder="请输入" size="medium" v-model="curComment[0].comment"></el-input>
</template>
<template v-else>{{ scope.$index }}</template> <template v-else>{{ scope.$index }}</template>
</template> </template>
</el-table-column> </el-table-column>

@ -84,7 +84,9 @@ export default {
}, },
methods: { methods: {
getData(){ getData(){
//
this.$post(this.api.getTableByClassification).then(res => { this.$post(this.api.getTableByClassification).then(res => {
// idlabel
function handleId(data){ function handleId(data){
data.map(n => { data.map(n => {
n.id = String(n.id) n.id = String(n.id)
@ -98,15 +100,16 @@ export default {
this.typeList = res this.typeList = res
// id // id
this.dataSource = res[0].dataSource
if(res[0].children.length){ if(res[0].children.length){
let item = res[0].children[0] let item = res[0].children[0]
this.categoryId = item.id this.categoryId = item.id
this.dataSource = res[0].children[0].dataSource
this.defaultActive = [item.id] this.defaultActive = [item.id]
this.introduceText = item.introduce this.introduceText = item.introduce
this.introduce = item.introduce this.introduce = item.introduce
}else{ }else{
this.categoryId = res[0].id this.categoryId = res[0].id
this.dataSource = res[0].dataSource
this.defaultActive = [res[0].id] this.defaultActive = [res[0].id]
this.introduceText = res[0].introduce this.introduceText = res[0].introduce
this.introduce = res[0].introduce this.introduce = res[0].introduce

Loading…
Cancel
Save