Commit 73be3a92 authored by WuFeiyang's avatar WuFeiyang

版本1.3 修复了waveparams显示bug

parent 904e5ad2
......@@ -4,7 +4,7 @@
<div ref="wave">
</div>
<setBasicParams ref="setBasicParams" @getPathId="getPathId" @updateConfig="updateConfig" :wave="wave" :setConfig='config' @pathPoke="pathPoke"></setBasicParams>
<setBasicParams ref="setBasicParams" @getPathId="getPathId" @updateConfig="updateConfig" :wave="wave" :setConfig='config' @pathPoke="pathPoke" @pathPokeTime="pathPokeTime"></setBasicParams>
<Navigation ref="FamilyLink" :url="config.data.url.path" style="margin-top:30px"></Navigation>
</div>
</template>
......@@ -98,7 +98,6 @@ export default class waveView extends Widget {
samplePoke(sample:any)
{
var samplePath = sample.CFET2CORE_SAMPLE_PATH;
console.log(samplePath);
var pokedPath:string;
pokedPath = samplePath;
var count:number = 0;
......@@ -125,7 +124,35 @@ export default class waveView extends Widget {
}
this.config.data.url.path = pokedPath;
}
samplePokeTime(sample:any)
{
var samplePath = sample.CFET2CORE_SAMPLE_PATH;
var pokedPath:string;
pokedPath = samplePath;
var count:number = 0;
var temp = sample.Actions.get.Parameters;
temp = JSON.parse(JSON.stringify(temp));
console.log(temp);
temp = this.strMapObjChange.objToStrMap(temp);
console.log(temp);
var Parameters:Map<string, string>;
Parameters = temp;
Parameters.forEach((value , key) =>{
count++;
if(count == 1)
{
pokedPath = pokedPath + "?";
}
pokedPath = pokedPath + key + "=$" + key + "$&";
});
if(count != 0 )
{
pokedPath = pokedPath.substring(0,pokedPath.length-1);
}
this.config.data.url.timePath = pokedPath;
}
async pathPoke()
{
(this.$refs.setBasicParams as setBasicParams).updateConfig();
......@@ -136,9 +163,24 @@ export default class waveView extends Widget {
await axios.get(this.config.data.url.path).then(response => {
this.samplePoke(response.data);
});
(this.$refs.setBasicParams as setBasicParams).getPathIdParams();
if(this.config.data.url.path != '' && this.config.data.url.timePath != ''){
(this.$refs.setBasicParams as setBasicParams).getPathIdParams();
}
}
async pathPokeTime()
{
(this.$refs.setBasicParams as setBasicParams).updateConfig();
var f = this.config.data.url.timePath;
var pokepath = "a";
pokepath = f;
console.log(this.config.data.url.timePath);
await axios.get(this.config.data.url.timePath).then(response => {
this.samplePokeTime(response.data);
});
if(this.config.data.url.path != '' && this.config.data.url.timePath != ''){
(this.$refs.setBasicParams as setBasicParams).getPathIdParams();
}
}
}
</script>
......
......@@ -3,12 +3,13 @@
<div v-show="isShowCog" style="width:100%">
<b-input-group size="lg" prepend="Channel Path">
<b-input v-model="config.data.url.path" ></b-input>
<b-button variant="info" @click="pathPoke">poke</b-button>
</b-input-group><br>
<b-input-group size="lg" prepend="Channel TimePath">
<b-input v-model="config.data.url.timePath" ></b-input>
<b-input-group-addon>
<b-button variant="primary" @click="getPathIdParams">OK<span class="glyphicon glyphicon-save"></span></b-button>
<b-button variant="info" @click="pathPoke">poke</b-button>
<b-button variant="info" @click="pathPokeTime">poke</b-button>
</b-input-group-addon>
</b-input-group>
</div>
......@@ -65,8 +66,6 @@ export default class setBasicParams extends Vue {
created() {
this.config.data.userInputData = this.userInputData;
// this.getConfig = this.config;
// this.updateConfig();
}
refresh(){
var Args: UpdatePayload = {
......@@ -79,6 +78,9 @@ export default class setBasicParams extends Vue {
pathPoke(){
this.$emit("pathPoke");
}
pathPokeTime(){
this.$emit("pathPokeTime");
}
setConfig(config: WidgetConfig) {
(this.$refs.WidgetParams as WidgetParams).setVariableList(
this.pathProcessor.extractVarFromPath(config.data.url.path)
......@@ -109,6 +111,19 @@ export default class setBasicParams extends Vue {
this.isShowLoad = true;
this.isShowCog = false;
}
getPathIdParamsTime() {
if (this.tempUrl != this.config.data.url.timePath) {
this.config.data.userInputData.clear();
this.tempUrl = this.config.data.url.timePath;
}
this.updateConfig();
var url = this.config.data.url.timePath;
(this.$refs.WidgetParams as WidgetParams).setVariableList(
this.pathProcessor.extractVarFromPath(url)
);
this.isShowLoad = true;
this.isShowCog = false;
}
showPathIdConfig() {
if(this.isShowCog || this.isShowLoad){
this.isShowCog = !this.isShowCog;
......
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