|
|
@ -60,9 +60,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="台账管理" :visible.sync="dialogTableVisible">
|
|
|
|
<el-dialog title="台账管理" :visible.sync="dialogTableVisible">
|
|
|
|
<el-button type="primary" @click="importf">导入</el-button>
|
|
|
|
<el-button type="primary" @click="importf">导入</el-button>
|
|
|
|
<el-table :data="tableData">
|
|
|
|
<el-table :data="tableData">
|
|
|
|
<el-table-column :property="i" :label="i" width="200px" v-for="i in tableTh"></el-table-column>
|
|
|
|
<el-table-column :property="i" :label="i" width="200px" v-for="i in tableTh"></el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
<el-dialog title="上传" :visible.sync="uploadDialog">
|
|
|
|
<el-dialog title="上传" :visible.sync="uploadDialog">
|
|
|
|
<el-upload
|
|
|
|
<el-upload
|
|
|
@ -108,7 +108,7 @@ export default {
|
|
|
|
dialogTableVisible: false,
|
|
|
|
dialogTableVisible: false,
|
|
|
|
uploadDialog: false,
|
|
|
|
uploadDialog: false,
|
|
|
|
tableData: [],
|
|
|
|
tableData: [],
|
|
|
|
tableTh:[],
|
|
|
|
tableTh: [],
|
|
|
|
api: process.env.VUE_APP_BASE_API,
|
|
|
|
api: process.env.VUE_APP_BASE_API,
|
|
|
|
token: getToken()
|
|
|
|
token: getToken()
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -191,16 +191,16 @@ export default {
|
|
|
|
this.dialogTableVisible = true
|
|
|
|
this.dialogTableVisible = true
|
|
|
|
const data = await getRedisFile(this.$store.getters.tenantId)
|
|
|
|
const data = await getRedisFile(this.$store.getters.tenantId)
|
|
|
|
this.tableData = JSON.parse(data.content)
|
|
|
|
this.tableData = JSON.parse(data.content)
|
|
|
|
this.tableTh = Object.keys(data.Header).map(e=>data.Header[e])
|
|
|
|
this.tableTh = Object.keys(data.Header).map(e => data.Header[e])
|
|
|
|
},
|
|
|
|
},
|
|
|
|
importf() {
|
|
|
|
importf() {
|
|
|
|
this.uploadDialog = true
|
|
|
|
this.uploadDialog = true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async uploadSuccess(e){
|
|
|
|
async uploadSuccess(e) {
|
|
|
|
this.uploadDialog = false
|
|
|
|
this.uploadDialog = false
|
|
|
|
const data = await getRedisFile(this.$store.getters.tenantId)
|
|
|
|
const data = await getRedisFile(this.$store.getters.tenantId)
|
|
|
|
this.tableData = JSON.parse(data.content)
|
|
|
|
this.tableData = JSON.parse(data.content)
|
|
|
|
this.tableTh = Object.keys(data.Header).map(e=>data.Header[e])
|
|
|
|
this.tableTh = Object.keys(data.Header).map(e => data.Header[e])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|