Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
bd414e41ad
|
@ -2914,6 +2914,16 @@ const routes = [
|
|||
},
|
||||
component: "fac_cal/caltask",
|
||||
},
|
||||
{
|
||||
name: "big_data",
|
||||
path: "/enm_base/big_data",
|
||||
meta: {
|
||||
title: "大屏数据",
|
||||
type: "menu",
|
||||
perms: ["big_data"],
|
||||
},
|
||||
component: "enm_base/big_data",
|
||||
},
|
||||
]
|
||||
},
|
||||
//基础配置
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<div v-for = "item in dataList" :key="item.id" style="margin-top: 20px; margin-left: 10px">
|
||||
<el-form :inline="true" label-width="140px">
|
||||
<el-form-item :label="item.name">
|
||||
<el-input-number v-model="item.value"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm(item)" :loading="saveLoading">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
saveLoading: false,
|
||||
dataList:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getdatas();
|
||||
},
|
||||
methods: {
|
||||
getdatas() {
|
||||
let that = this;
|
||||
this.$API.system.dict.list.req({ type__code: "big_data",page:0 }).then((res) => {
|
||||
that.dataList = res;
|
||||
});
|
||||
},
|
||||
submitForm(item) {
|
||||
let that = this;
|
||||
that.saveLoading = true;
|
||||
that.$API.system.dict.update.req(item.id, item).then(res=>{
|
||||
that.$message.success("保存成功");
|
||||
that.saveLoading = false;
|
||||
that.getdatas();
|
||||
}).catch(err=>{
|
||||
that.saveLoading = false;
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue