Merge remote-tracking branch 'origin/master'

dev
e 3 years ago
commit 5c5f18baf2
  1. 43
      src/views/data/Framework.vue
  2. 15
      src/views/data/Introduce.vue
  3. 1
      src/views/data/Product.vue

@ -36,9 +36,9 @@
<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="showName" label="产品表名称" align="center"></el-table-column>
<el-table-column label="起止日期" align="center">
<el-table-column label="起止日期" width="160" align="center">
<template slot-scope="scope">
{{scope.row.startTime + ' ~ ' + scope.row.endTime}}
{{scope.row.startTime.substr(0, 10) + ' ~ ' + scope.row.endTime.substr(0, 10)}}
</template>
</el-table-column>
<el-table-column prop="dataTotal" label="数据总量" width="100" align="center"></el-table-column>
@ -130,11 +130,18 @@
<el-dialog title="自定义表头" :visible.sync="headVisible" width="60%" center :close-on-click-modal="false">
<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>
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
<template v-if="scope.row.custom">
<el-input placeholder="请输入" size="medium" v-model="curComment[0].comment"></el-input>
</template>
<template v-else>{{ scope.$index }}</template>
</template>
</el-table-column>
<el-table-column v-for="(item,index) in previewHead" :prop="item.field" :key="index" :label="item.oldComment" align="center">
<template slot-scope="scope">
<template v-if="scope.row.custom">
<el-input placeholder="请输入" v-model="item.comment"></el-input>
<el-input placeholder="请输入" size="medium" v-model="item.comment"></el-input>
</template>
<template v-else>{{scope.row[item.field]}}</template>
</template>
@ -157,6 +164,7 @@ export default {
label: 'label'
},
defaultActive: [],
added: false,
typeVisible: false,
categoryName: '',
categoryId: '',
@ -224,17 +232,20 @@ export default {
handleId(res)
this.typeList = res
if(res[0].children.length){
this.categoryId = res[0].children[0].id
this.defaultActive = [res[0].children[0].id]
}else{
this.categoryId = res[0].id
this.defaultActive = [res[0].id]
if (!this.added) {
if(res[0].children.length){
this.categoryId = res[0].children[0].id
this.defaultActive = [res[0].children[0].id]
}else{
this.categoryId = res[0].id
this.defaultActive = [res[0].id]
}
// id
this.$nextTick(() => {
this.$refs.type.setCurrentKey(res[0].children[0].id)
})
}
// id
this.$nextTick(() => {
this.$refs.type.setCurrentKey(res[0].children[0].id)
})
this.added = false
this.getData()
}).catch(res => {})
},
@ -253,6 +264,7 @@ export default {
this.getData()
},
addType(row){
if (row) this.defaultActive = [row.data.id]
this.typeVisible = true
this.levelId = row ? row.data.id : 0
},
@ -266,6 +278,7 @@ export default {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.added = true
this.$post(`${this.api.deleteCategory}?categoryId=${row.data.id}`).then(res => {
this.$message.success('删除成功')
this.getType()
@ -275,6 +288,7 @@ export default {
confirmType(){
if(this.submited) return false
this.submited = true
this.added = true
if(this.id){
this.$post(this.api.updateCategory,{
id: this.id,
@ -330,7 +344,6 @@ export default {
if(typeof n[i] == 'string' && n[i].endsWith('+0000')) n[i] = this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n[i]))
}
})
console.log(11, data)
this.previewData = data
if (!isEdit) this.previewVisible = true
}).catch(res => {})

@ -25,27 +25,27 @@
<el-input style="width: 250px" placeholder="请输入数据源" v-model="dataSource" type="text" :disabled="!editing"></el-input>
</div>
</template>
<div class="btns" v-if="editing">
<el-button @click="editing = false"> </el-button>
<el-button type="primary" @click="confirmEdit"> </el-button>
</div>
<div class="field">
<p class="label">关键字</p>
<div class="tag-add">
<div class="tag-add" v-if="editing">
<el-input placeholder="请输入关键字" size="small" v-model="newKeyword"></el-input>
<el-button size="small" type="primary" @click="addKeyword">添加</el-button>
</div>
<div class="tag-wrap">
<el-tag
:key="tag.id"
:type="editing ? '' : 'info'"
v-for="tag in keywordList"
closable
:closable="editing"
:disable-transitions="false"
@close="delKeyword(tag)">
{{tag.keyword}}
</el-tag>
</div>
</div>
<div class="btns" v-if="editing">
<el-button @click="editing = false"> </el-button>
<el-button type="primary" @click="addKeyword"> </el-button>
</div>
</el-card>
</el-col>
</el-main>
@ -160,6 +160,7 @@ export default {
}).then(res => {
this.newKeyword = ''
this.getKeyword()
this.confirmEdit()
}).catch(res => {})
} else {
this.$message.error('请输入关键字!')

@ -310,7 +310,6 @@ export default {
getTable(res)
setTimeout(() => {
console.log(11, res)
this.typeList = res
},500)
this.importVisible = true

Loading…
Cancel
Save