Commit c47ee566 authored by WuFeiyang's avatar WuFeiyang

修改wave 未成功

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