Commit e3765ee1 authored by wanli's avatar wanli

update

parent 31711b57
No preview for this file type
...@@ -23,7 +23,7 @@ config = dict( ...@@ -23,7 +23,7 @@ config = dict(
'filename': "../{}".format(conf.get('database', 'filename')), 'filename': "../{}".format(conf.get('database', 'filename')),
'create_db': True, 'create_db': True,
}, },
TABLE_PREFIX='klx_', TABLE_PREFIX='evm_store_',
MD5_SALT="EhuqUkwV", MD5_SALT="EhuqUkwV",
UPLOAD_SERVER="{}://{}:{}/".format(conf.get('uploads', 'protocol'), conf.get('uploads', 'host'), conf.get('uploads', 'port')), UPLOAD_SERVER="{}://{}:{}/".format(conf.get('uploads', 'protocol'), conf.get('uploads', 'host'), conf.get('uploads', 'port')),
UPLOAD_PATH=conf.get('uploads', 'upload_path'), UPLOAD_PATH=conf.get('uploads', 'upload_path'),
......
...@@ -16,10 +16,6 @@ class Dict(db.Entity): ...@@ -16,10 +16,6 @@ class Dict(db.Entity):
label = Required(str) label = Required(str)
value = Required(str) value = Required(str)
category = Required(str) category = Required(str)
# project_type = Optional("Project", reverse="type") # Project的type字段引用Dict模型,一对一关系
# project_status = Optional("Project", reverse="status") # Project的status字段引用Dict模型,一对一关系
# flow_status = Optional("Flow", reverse="status") # 流程节点状态
# payback_status = Optional("Payback", reverse="status") # 回款节点状态
is_system = Required(bool, default=False) # 能否删除 is_system = Required(bool, default=False) # 能否删除
create_at = Required(datetime, default=datetime.now) create_at = Required(datetime, default=datetime.now)
create_by = Required("User", reverse='dict_creator') # Dict与User一对一关系 create_by = Required("User", reverse='dict_creator') # Dict与User一对一关系
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="success" type="primary"
@click="handleDownload(scope.$index, scope.row)" @click="handleDownload(scope.$index, scope.row)"
>下载</el-button >下载</el-button
> >
...@@ -230,7 +230,14 @@ export default { ...@@ -230,7 +230,14 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
handleDownload(index, row) { handleDownload(index, row) {
console.log(index, row); console.log(index);
const body = document.getElementsByTagName("body")[0];
const link = document.createElement("a");
body.appendChild(link);
link.href = row.app_path;
link.download = `${row.app_name}.epk`;
link.click();
document.body.removeChild(link);
}, },
handleSizeChange(e) { handleSizeChange(e) {
this.form.pagesize = e; this.form.pagesize = e;
......
...@@ -219,11 +219,12 @@ export default { ...@@ -219,11 +219,12 @@ export default {
this.fetchData(mapTrim(this.form)); this.fetchData(mapTrim(this.form));
}, },
handleBuild(index, row) { handleBuild(index, row) {
console.log(index, row) console.log(index)
buildApp(row.uuid).then(res => { buildApp(row.uuid).then(res => {
console.log(res) this.$message.success(res.message)
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
this.$message.error(err.message)
}) })
}, },
handleEdit(index, row) { handleEdit(index, row) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment