Commit c47ee566 authored by WuFeiyang's avatar WuFeiyang

修改wave 未成功

parent 7d2fa006
......@@ -159,6 +159,7 @@ export default class App extends Vue {
fragment = fragment.substring(1, fragment.length);
var customViewURL = "/customView/template" + fragment;
var isCustomview: boolean = false;
//axios之前出现过cache过多刷不出来的问题,所以本项目的axios都加上了禁止cache的头文件
axios
.get(customViewURL, {
headers: {
......
......@@ -101,7 +101,6 @@ export default class Status extends Widget {
};
created() {
// this.config.data.userInputData = this.userInputData;
this.config.data.userInputData = this.strMapObjChange.strMapToObj(
this.userInputData
);
......
......@@ -37,6 +37,7 @@ export default class waveView extends Widget {
pathId: string = '';
strMapObjChange = new StrMapObjChange();
userInputData = new Map<string, string>();
sampleVal!:any;
config: WidgetConfig = {
WidgetComponentName: 'WaveView',
data: {
......@@ -84,7 +85,10 @@ export default class waveView extends Widget {
(this.$refs.setBasicParams as setBasicParams).refresh();
}
updateUI() {
(this.$refs.setBasicParams as setBasicParams).getPathIdParams();
(this.$refs.setBasicParams as setBasicParams).getSampleParams(this.config.data.url.path);
if(Array.isArray(this.sampleVal)) {
(this.$refs.setBasicParams as setBasicParams).sampleLoad(this.sampleVal);
}
}
getPathId(pathId: string) {
this.pathId = pathId;
......@@ -98,6 +102,7 @@ export default class waveView extends Widget {
samplePoke(sample:any)
{
var samplePath = sample.CFET2CORE_SAMPLE_PATH;
this.sampleVal = sample.CFET2CORE_SAMPLE_VAL;
var pokedPath:string;
pokedPath = samplePath;
var count:number = 0;
......@@ -123,7 +128,6 @@ export default class waveView extends Widget {
pokedPath = pokedPath.substring(0,pokedPath.length-1);
}
this.config.data.url.path = pokedPath;
(this.$refs.setBasicParams as setBasicParams).getPathIdParams();
}
samplePokeWith(sample:any)
{
......
......@@ -66,6 +66,7 @@ export default class setBasicParams extends Vue {
created() {
this.config.data.userInputData = this.userInputData;
this.getConfig = this.config;
}
refresh(){
var Args: UpdatePayload = {
......@@ -98,6 +99,14 @@ export default class setBasicParams extends Vue {
this.getConfig = this.config;
this.$emit("updateConfig", this.getConfig);
}
getSampleParams(url:any){
(this.$refs.WidgetParams as WidgetParams).setVariableList(
this.pathProcessor.extractVarFromPath(url)
);
this.config.data.url.path = url;
this.isShowLoad = true;
this.isShowCog = false;
}
getPathIdParams() {
if (this.tempUrl != this.config.data.url.path) {
this.config.data.userInputData.clear();
......@@ -132,6 +141,16 @@ export default class setBasicParams extends Vue {
this.isShowCog = !this.isShowCog;
}
}
sampleLoad(sampleVal: any){
var myPlot = this.wave;
var data_initial = [
{
x: this.temp.dataTimeAxis,
y: sampleVal
}
];
this.createChannelChart(myPlot, data_initial);
}
async viewLoad(Args: UpdatePayload) {
this.getConfig.data.position.x1 = "";
this.getConfig.data.position.x2 = "";
......@@ -152,7 +171,7 @@ export default class setBasicParams extends Vue {
var third = url.indexOf("/", second+1)
var fouth = url.indexOf("/", third+1)
this.pathId = url.slice(third+1, fouth);
var thingPath = url.slice(0, url.indexOf('/', 2))
var thingPath = url.slice(0, url.indexOf('/', 2));
var path = this.pathId;
var dealPath = {
thingPath:thingPath,
......
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