| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getProductList() |
| | | this.getProductList(Cookies.get('productId')) |
| | | }, |
| | | components: { |
| | | ProductModelTree, |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | async getProductList() { |
| | | getPath(){ |
| | | if (Cookies.get('productId') != null){ |
| | | this.dataForm.id = Cookies.get('fzId') |
| | | this.dataForm.productId = Cookies.get('productId') |
| | | this.dataForm.taskModelId = Cookies.get('taskModelId') |
| | | console.log(this.dataForm.id) |
| | | this.getTaskList() |
| | | this.$nextTick(() => { |
| | | this.onProductSelected({id:this.dataForm.productId}) |
| | | this.onTaskSelected({id:Cookies.get('taskModelId')}) |
| | | this.onSimulatSelected({id:Cookies.get('fzId')}) |
| | | }) |
| | | } |
| | | }, |
| | | async getProductList(productId) { |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getTaskProductList') |
| | | this.productList = res.data |
| | | if(productId!=null){ |
| | | this.getPath() |
| | | }else{ |
| | | this.onProductSelected(this.productList[0]) |
| | | } |
| | | }, |
| | | async getTaskList() { |
| | | let params = { |
| | |
| | | this.dataForm.taskModelId = data.id |
| | | this.getSimulatList() |
| | | this.dataForm.id = '' |
| | | console.log(this.dataForm.taskModelId) |
| | | }, |
| | | async onSimulatSelected(data) { |
| | | this.dataForm.id = data.id |
| | | this.dataForm.samplPeriod = data.samplPeriod |
| | | console.log(data) |
| | | let params = { |
| | | id: this.dataForm.id, |
| | | taskModelId: this.dataForm.taskModelId |
| | | } |
| | | let res = await this.$http.get('/taskReliability/SimulatAssess/getSimulatParams', {params: params}) |
| | | console.log(res.data.samplPeriod) |
| | | this.dataForm.samplPeriod = res.data.samplPeriod |
| | | this.dataForm.simulatFrequency = res.data.simulatFrequency |
| | | this.$nextTick(() => { |