Commit 976daf5c authored by WuFeiyang's avatar WuFeiyang

界面美化

parent 703295f2
...@@ -112,10 +112,10 @@ export default class App extends Vue { ...@@ -112,10 +112,10 @@ export default class App extends Vue {
mounted() { mounted() {
// var f1 = window.location.hash; // var f1 = window.location.hash;
// console.log(typeof(f1)); // console.log(typeof(f1));
var fragment = window.location.hash; var f = window.location.hash;
fragment += "a"; var fragment = "a";
fragment = fragment.substring(0,fragment.length-1); fragment = f;
console.log(typeof(fragment)); console.log(fragment);
if (fragment != "#") { if (fragment != "#") {
fragment = fragment.substring(1, fragment.length); fragment = fragment.substring(1, fragment.length);
var customViewURL = "/customView/template" + fragment; var customViewURL = "/customView/template" + fragment;
......
.smallFont{ .smallFont{
font-size: 18px; font-size: 15px;
} }
.largeFont{ .largeFont{
font-size: 22px; font-size: 20px;
} }
.largeFont span{ .largeFont span{
float: left; float: left;
......
<template id="setBasicParams"> <template id="setBasicParams">
<div> <div>
<span>parent and children link</span> <b-dropdown id="dropdown-1" text="Navigation" variant="primary">
<b-button variant="primary" @click="getPath">show</b-button> <b-dropdown-item v-show="isShowParentPath">
<div style="margin-top:10px;height:80px;overflow:scroll" v-show="isShow"> <a class="smallFont" :href="parentPath" style="float:left">parentPath:{{ parentPath }}</a>
<a :href="parentPath" style="float:left">parentPath:{{ parentPath }}</a> </b-dropdown-item>
<div v-for="(path,index) in childrenPath" :key="index"> <b-dropdown-item v-for="path in childrenPath" :key="path">
<a :href= "path" style="float:left">childrenPath:{{path}}</a><br> <a class="smallFont" :href= "path" style="float:left">childrenPath:{{path}}</a><br>
</div> </b-dropdown-item>
</div> </b-dropdown>
</div> </div>
</template> </template>
...@@ -33,16 +33,23 @@ export default class Navigation extends Vue { ...@@ -33,16 +33,23 @@ export default class Navigation extends Vue {
@Prop() url!:string; @Prop() url!:string;
parentPath!:string; parentPath!:string;
childrenPath!:string[]; childrenPath!:string[];
isShow:boolean = false; isShowParentPath:boolean = false;
@Watch("url")
onUrlChanged(){
this.getPath();
}
async getPath(){ async getPath(){
this.isShowParentPath = false;
var apiLoad = this.url; var apiLoad = this.url;
await axios.get(apiLoad) await axios.get(apiLoad)
.then(response => { .then(response => {
this.parentPath = response.data.ParentPath as string; this.parentPath = response.data.ParentPath as string;
this.childrenPath = response.data.ChildrenPath as string[]; this.childrenPath = response.data.ChildrenPath as string[];
}) })
this.isShow = true; if(this.parentPath != ''){
this.isShowParentPath = true;
}
this.$forceUpdate(); this.$forceUpdate();
} }
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<b-form-input class="smallFont" v-model="tempUserInputData[label]" ></b-form-input> <b-form-input class="smallFont" v-model="tempUserInputData[label]" ></b-form-input>
</b-input-group> </b-input-group>
</div> </div>
<div style="width:auto;margin:5px"> <div style="width:100%;margin:5px">
<b-button variant="primary" @click="update"> <b-button variant="primary" @click="update" style="float:right">
<b>{{ action }}</b> <b>{{ action }}</b>
<span class="glyphicon glyphicon-save"></span> <span class="glyphicon glyphicon-save"></span>
</b-button> </b-button>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<b-container class="bv-example-row"> <b-container class="bv-example-row">
<b-row style="margin-top:10px"> <b-row style="margin-top:10px">
<b-col> <b-col>
<span style="float:left;font-size:20px">path: {{ config.data.url }}</span> <span style="float:left;" class="largeFont">path: {{ pathwithVar }}</span>
</b-col> </b-col>
<b-col> <b-col>
<b-button @click="showPathConfig" variant="primary" style="float:right"><span class="glyphicon glyphicon-cog"></span></b-button> <b-button @click="showPathConfig" variant="primary" style="float:right"><span class="glyphicon glyphicon-cog"></span></b-button>
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<div v-show="isShowPath"><hr /></div> <div v-show="isShowPath"><hr /></div>
</b-row> </b-row>
<div style="width:100%"> <div style="width:100%">
<span style="float:left;font-size:20px">{{ StatusValue }}</span> <span style="float:left;" class="largeFont">{{ StatusValue }}</span>
<div v-show="isShowPath"><hr /></div> <div v-show="isShowPath"><hr /></div>
</div> </div>
<b-input-group prepend="path" v-show="isShowPath"> <b-input-group class="smallFont" prepend="path" v-show="isShowPath">
<b-form-input v-model="config.data.url"></b-form-input> <b-form-input v-model="config.data.url"></b-form-input>
<b-input-group-append> <b-input-group-append>
<b-button @click="updateUI" size="sm" text="Button" variant="primary">OK</b-button> <b-button @click="updateUI" size="sm" text="Button" variant="primary">OK</b-button>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</b-input-group-append> </b-input-group-append>
</b-input-group> </b-input-group>
<hr/> <hr/>
<WidgetParams ref="WidgetParams" v-show="isShowParams&&isShowPath" action="get" @updataVariables="viewLoad" ></WidgetParams> <WidgetParams ref="WidgetParams" v-show="isShowParams&&isShowPath" action="get" @updataVariables="viewLoad" ></WidgetParams><br>
<Navigation ref="FamilyLink" :url="config.data.url"></Navigation> <Navigation ref="FamilyLink" :url="config.data.url"></Navigation>
</b-container> </b-container>
</template> </template>
...@@ -151,8 +151,11 @@ export default class Status extends Widget { ...@@ -151,8 +151,11 @@ export default class Status extends Widget {
pathPoke() pathPoke()
{ {
axios.get(this.config.data.url).then(response => { var f = this.config.data.url;
console.log(this.config.data.url); var pokepath = "a";
pokepath = f;
axios.get(pokepath).then(response => {
console.log(pokepath);
console.log(response); console.log(response);
console.log(response.data); console.log(response.data);
var resourcetype = response.data.ResourceType; var resourcetype = response.data.ResourceType;
...@@ -161,6 +164,7 @@ export default class Status extends Widget { ...@@ -161,6 +164,7 @@ export default class Status extends Widget {
var sample: ResourceInfo[] = []; var sample: ResourceInfo[] = [];
sample[0] = response.data.Actions.get as ResourceInfo; sample[0] = response.data.Actions.get as ResourceInfo;
this.samplePoke(sample,samplePath); this.samplePoke(sample,samplePath);
this.updateUI();
}) })
} }
......
...@@ -41,7 +41,8 @@ export default class showViewInfo extends Vue { ...@@ -41,7 +41,8 @@ export default class showViewInfo extends Vue {
}) })
} }
async getLength(pathId:string) { async getLength(pathId:string) {
var apiLoad = "dataserver" + '/length/' + pathId; var apiLoad = "/dataserver" + '/length/' + pathId;
console.log(apiLoad);
await axios.get(apiLoad) await axios.get(apiLoad)
.then((response) => { .then((response) => {
this.lengthId = response.data.ObjectVal; this.lengthId = response.data.ObjectVal;
......
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