Commit 976daf5c authored by WuFeiyang's avatar WuFeiyang

界面美化

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