数据架构等

dev
yujialong 3 years ago
parent 2b40bb0620
commit 4048df0031
  1. 20
      src/views/data/Framework.vue
  2. 4
      src/views/user/User.vue

@ -21,7 +21,7 @@
<el-card shadow="hover"> <el-card shadow="hover">
<el-form label-width="80px" class="flex-between mgb20"> <el-form label-width="80px" class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<el-form-item label="创建日期" style="margin: 0 20px 0 0"> <el-form-item label="更新时间" style="margin: 0 20px 0 0">
<el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initData"></el-date-picker> <el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initData"></el-date-picker>
</el-form-item> </el-form-item>
<el-input placeholder="请输入数据表名称" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input> <el-input placeholder="请输入数据表名称" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input>
@ -41,7 +41,7 @@
{{scope.row.dataSize}}M {{scope.row.dataSize}}M
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="更新时间" align="center"></el-table-column> <el-table-column prop="createTime" label="更新时间" align="center"></el-table-column>
<el-table-column label="操作" width="220" align="center"> <el-table-column label="操作" width="220" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)">预览</el-button> <el-button type="text" @click="preview(scope.row)">预览</el-button>
@ -68,7 +68,7 @@
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>预览</span> <span>预览</span>
</div> </div>
<el-table :data="fieldData" stripe header-align="center"> <el-table :data="fieldData" stripe header-align="center" v-if="fieldHead.length">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column v-for="(item,index) in fieldHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column> <el-table-column v-for="(item,index) in fieldHead" :prop="item.field" :key="index" :label="item.comment" align="center"></el-table-column>
</el-table> </el-table>
@ -304,10 +304,10 @@ export default {
}) })
n.children = res.list n.children = res.list
if(!i && !this.tableName){ // if(!i && !this.tableName){
this.tableName = res.list[0].name // this.tableName = res.list[0].name
this.curId = res.list[0].id // this.curId = res.list[0].id
} // }
}).catch(res => {}) }).catch(res => {})
}, },
batchImport(){ batchImport(){
@ -349,9 +349,9 @@ export default {
}) })
setTimeout(() => { setTimeout(() => {
this.importTypeList = res this.importTypeList = res
this.defaultTypeActive = [res[0].id] // this.defaultTypeActive = [res[0].id]
if(res[0].children.length) this.defaultTypeActive.push(res[0].children[0].id) // if(res[0].children.length) this.defaultTypeActive.push(res[0].children[0].id)
this.getFields() // this.getFields()
},500) },500)
}).catch(res => {}) }).catch(res => {})

@ -104,7 +104,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="logInNumber" label="登录次数" align="center"> <el-table-column prop="logInNumber" label="登录次数" align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="270" align="center"> <el-table-column label="操作" width="300" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button> <el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="edit(scope.row)">编辑</el-button> <el-button type="text" @click="edit(scope.row)">编辑</el-button>
@ -209,7 +209,7 @@ export default {
} }
}, },
'form.date': function(val){ 'form.date': function(val){
if(val.length){ if(val && val.length){
this.form.startTime = val[0] this.form.startTime = val[0]
this.form.endTime = val[1] this.form.endTime = val[1]
}else{ }else{

Loading…
Cancel
Save