数据相关bug修复

dev
Jo 3 years ago
parent 1981bff09d
commit a65643bbb9
  1. 3
      src/views/data/Data.vue
  2. 6
      src/views/data/Framework.vue
  3. 9
      src/views/data/Introduce.vue

@ -23,7 +23,7 @@ import Introduce from './Introduce.vue';
export default {
data() {
return {
active: 'first',
active: this.$route.query.tab ? this.$route.query.tab : 'first',
userId: this.$store.state.userId,
tabs: {
first: '产品管理',
@ -44,6 +44,7 @@ export default {
methods: {
tabChange(index){
this.active = index
this.$router.push(`/data?tab=${index}`)
},
}
};

@ -34,7 +34,11 @@
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="70" label="序号" align="center"></el-table-column>
<el-table-column prop="tableComment" label="数据表名称" align="center"></el-table-column>
<el-table-column prop="tableComment" label="数据表名称" align="center">
<template slot-scope="scope">
{{scope.row.tableComment ? scope.row.tableComment : scope.row.showName}}
</template>
</el-table-column>
<el-table-column prop="showName" label="产品表名称" align="center"></el-table-column>
<el-table-column prop="timeRange" label="起止日期" width="180" align="center"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" width="100" align="center"></el-table-column>

@ -63,6 +63,7 @@ export default {
},
defaultActive: [],
editing: false,
edited: false,
introduce: '',
dataSource: '',
introduceText: '',
@ -100,6 +101,7 @@ export default {
this.typeList = res
// id
if (!this.edited) {
if(res[0].children.length){
let item = res[0].children[0]
this.categoryId = item.id
@ -114,12 +116,14 @@ export default {
this.introduceText = res[0].introduce
this.introduce = res[0].introduce
}
}
this.getKeyword()
}).catch(res => {})
},
typeClick(data,node){
this.editing = false
this.categoryId = data.id
this.defaultActive = [data.id]
this.introduceText = data.introduce
this.introduce = data.introduce
this.dataSource = data.dataSource
@ -137,14 +141,17 @@ export default {
this.introduce = this.introduceText
},
confirmEdit(){
const id = this.categoryId
this.$post(this.api.updateCategory,{
id: this.categoryId,
id,
introduce: this.introduce,
dataSource: this.dataSource
}).then(res => {
this.$message.success(this.introduceText ? '编辑成功' : '新增成功')
this.introduceText = this.introduce
this.editing = false
this.edited = true
this.getData()
}).catch(res => {})
},
delKeyword(item) {

Loading…
Cancel
Save