|
@@ -300,7 +300,6 @@ export default {
|
300
|
300
|
searchsState:[],//状态列表
|
301
|
301
|
searchType: "todo",
|
302
|
302
|
searchState: 1544,
|
303
|
|
- type: "todo",
|
304
|
303
|
isToday: "",
|
305
|
304
|
sum: 10,
|
306
|
305
|
idx: 0,
|
|
@@ -826,20 +825,28 @@ export default {
|
826
|
825
|
};
|
827
|
826
|
},
|
828
|
827
|
getParamsState() {
|
829
|
|
- if (this.$route.params.type) {
|
830
|
|
- this.type = this.$route.params.type;
|
831
|
|
- this.isToday = this.$route.params.isToday;
|
832
|
|
- if (this.type === "todo") {
|
833
|
|
- this.searchType = "todo";
|
834
|
|
- } else if (this.type === "done") {
|
835
|
|
- this.searchType = "done";
|
836
|
|
- } else {
|
837
|
|
- this.searchType = "all";
|
|
828
|
+ console.log(this.$route.params);
|
|
829
|
+
|
|
830
|
+ if(this.evt){
|
|
831
|
+ this.evt.selected = this.$route.params.searchType;
|
|
832
|
+ this.evt.belongtoMe = this.$route.params.belongtoMe;
|
|
833
|
+ }else{
|
|
834
|
+ this.evt = {
|
|
835
|
+ selected: this.$route.params.searchType,
|
|
836
|
+ belongtoMe: this.$route.params.belongtoMe,
|
838
|
837
|
}
|
839
|
838
|
}
|
840
|
|
- if(this.$route.params.status){
|
841
|
|
- this.searchState = this.$route.params.status ? Number(this.$route.params.status) : undefined;
|
|
839
|
+ this.searchType = this.$route.params.searchType;
|
|
840
|
+
|
|
841
|
+ this.searchState = this.$route.params.searchState;
|
|
842
|
+ if(this.$route.params.searchState === undefined){
|
|
843
|
+ this.tabTypeIdActive = 1;
|
|
844
|
+ }else if(this.$route.params.searchState === 1543){
|
|
845
|
+ this.tabTypeIdActive = 2;
|
|
846
|
+ }else if(this.$route.params.searchState === 1544){
|
|
847
|
+ this.tabTypeIdActive = 3;
|
842
|
848
|
}
|
|
849
|
+
|
843
|
850
|
},
|
844
|
851
|
typeChange(tab) {
|
845
|
852
|
this.tabTypeIdActive = tab.id;
|
|
@@ -898,13 +905,16 @@ export default {
|
898
|
905
|
searchType: this.searchType,
|
899
|
906
|
idx: 0,
|
900
|
907
|
sum: 1,
|
901
|
|
- belongtoMe: this.evt ? this.evt.belongtoMe : false,
|
902
|
|
- incident: { temporary: true,statusId }
|
|
908
|
+ incident: {
|
|
909
|
+ belongtoMe: this.evt ? this.evt.belongtoMe : false,
|
|
910
|
+ temporary: true,
|
|
911
|
+ statusId
|
|
912
|
+ }
|
903
|
913
|
};
|
904
|
|
- if(this.evt && this.evt.category.id){
|
|
914
|
+ if(this.evt && this.evt.category && this.evt.category.id){
|
905
|
915
|
postData.incident.levelCategory = this.evt.category;
|
906
|
916
|
}
|
907
|
|
- if(this.evt && this.evt.area.id){
|
|
917
|
+ if(this.evt && this.evt.area && this.evt.area.id){
|
908
|
918
|
postData.incident.place = {
|
909
|
919
|
area: this.evt.area
|
910
|
920
|
}
|
|
@@ -957,16 +967,16 @@ export default {
|
957
|
967
|
searchType: this.searchType,
|
958
|
968
|
idx: this.idx,
|
959
|
969
|
sum: this.sum,
|
960
|
|
- belongtoMe: this.evt ? this.evt.belongtoMe : false,
|
961
|
970
|
incident: {
|
|
971
|
+ belongtoMe: this.evt ? this.evt.belongtoMe : false,
|
962
|
972
|
temporary: true,
|
963
|
973
|
statusId:this.searchState || undefined,
|
964
|
974
|
}
|
965
|
975
|
};
|
966
|
|
- if(this.evt && this.evt.category.id){
|
|
976
|
+ if(this.evt && this.evt.category && this.evt.category.id){
|
967
|
977
|
postData.incident.levelCategory = this.evt.category;
|
968
|
978
|
}
|
969
|
|
- if(this.evt && this.evt.area.id){
|
|
979
|
+ if(this.evt && this.evt.area && this.evt.area.id){
|
970
|
980
|
postData.incident.place = {
|
971
|
981
|
area: this.evt.area
|
972
|
982
|
}
|