Commit d2b422ea authored by 樊国敬's avatar 樊国敬

o

parent 2ee438a7
...@@ -1019,6 +1019,7 @@ export default { ...@@ -1019,6 +1019,7 @@ export default {
port: '端口', port: '端口',
userName: '用户名', userName: '用户名',
password: '密码', password: '密码',
description:'描述',
creationTime: '创建时间', creationTime: '创建时间',
creatorUserId: '创建人', creatorUserId: '创建人',
lastModificationTime: '更新时间', lastModificationTime: '更新时间',
......
...@@ -30,6 +30,11 @@ ...@@ -30,6 +30,11 @@
<Input v-model="entity.password"></Input> <Input v-model="entity.password"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description"></Input>
</FormItem>
</Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......
...@@ -2,10 +2,13 @@ ...@@ -2,10 +2,13 @@
<div class="detail"> <div class="detail">
<Row> <Row>
<Filed :span="24" :name="l('hostName')">{{entity.hostName}}</Filed> <Filed :span="24" :name="l('hostName')">{{entity.hostName}}</Filed>
<Filed :span="24" :name="l('hostsq')">{{entity.hostName}}</Filed> <Filed :span="24" :name="l('hostsq')">
<State code="datasource.type" :value="entity.databaseType"/>
</Filed>
<Filed :span="24" :name="l('port')">{{entity.port}}</Filed> <Filed :span="24" :name="l('port')">{{entity.port}}</Filed>
<Filed :span="24" :name="l('userName')">{{entity.userName}}</Filed> <Filed :span="24" :name="l('userName')">{{entity.userName}}</Filed>
<Filed :span="24" :name="l('password')">{{entity.password}}</Filed> <Filed :span="24" :name="l('password')">{{entity.password}}</Filed>
<Filed :span="24" :name="l('description')">{{entity.description}}</Filed>
</Row> </Row>
</div> </div>
</template> </template>
...@@ -15,7 +18,7 @@ export default { ...@@ -15,7 +18,7 @@ export default {
name: 'Add', name: 'Add',
data() { data() {
return { return {
entity: {hostName:'', port: 0, userName: '', password: '' }, entity: {hostName:'', port: 0, userName: '', password: '' ,description:''},
rules: { rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }], name: [{ required: true, message: '必填', trigger: 'blur' }],
code: [{ required: true, message: '必填', trigger: 'blur' }] code: [{ required: true, message: '必填', trigger: 'blur' }]
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('hostsq')" prop="hostId"> <FormItem :label="l('hostsq')" prop="hostId">
<Input v-model="entity.hostId"></Input> <Dictionary code="datasource.type" v-model="entity.databaseType" type="select"></Dictionary>
<!-- <Dictionary v-model="entity.hostId"></Dictionary> --> <!-- <Dictionary v-model="entity.hostId"></Dictionary> -->
</FormItem> </FormItem>
</Col> </Col>
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
<!-- <Input v-model="entity.password"></Input> --> <!-- <Input v-model="entity.password"></Input> -->
<span>{{entity.password}}</span> <span>{{entity.password}}</span>
</FormItem> </FormItem>
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description"></Input>
</FormItem>
</Col>
</Col> </Col>
</Row> </Row>
<FormItem> <FormItem>
...@@ -71,6 +76,9 @@ export default { ...@@ -71,6 +76,9 @@ export default {
methods: { methods: {
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
if(r.result.databaseType){
r.result.databaseType=parseInt(r.result.databaseType)
}
this.entity = r.result; this.entity = r.result;
this.$emit("on-load"); this.$emit("on-load");
}); });
......
...@@ -84,6 +84,7 @@ export default { ...@@ -84,6 +84,7 @@ export default {
high: true high: true
}, },
{ key: "password", title: this.l("password"), align: "left" }, { key: "password", title: this.l("password"), align: "left" },
{ key: "description", title: this.l("description"), align: "left" },
{ {
key: "creationTime", key: "creationTime",
title: this.l("creationTime"), title: this.l("creationTime"),
......
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