| | |
| | | <el-input v-model="dataForm.equipType"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="节点类型" prop="productType" rules="required"> |
| | | <zt-dict v-model="dataForm.productType" dict="product" @input="getDefaultImg" |
| | | <zt-dict v-model="dataForm.productType" dict="product" @input="changeType" |
| | | :disabled="disabled"></zt-dict> |
| | | </zt-form-item> |
| | | <zt-form-item v-if="dataForm.productType!=='1'" label="运行状态图" prop="operatImg"> |
| | |
| | | }, |
| | | methods: { |
| | | init(id, params) { |
| | | this.getProductList() |
| | | console.log(params) |
| | | if (params.shipId) { |
| | | this.dataForm.shipId = params.shipId |
| | | } |
| | |
| | | this.getDefaultImg(this.dataForm.productType) |
| | | } else { |
| | | this.dataForm.pid = params.pid |
| | | this.dataForm.productType = params.type |
| | | console.log(params.productType,'type') |
| | | console.log(parseInt(params.productType),'parseInttype') |
| | | this.dataForm.productType = parseInt(params.productType) |
| | | this.getDefaultImg(this.dataForm.productType) |
| | | } |
| | | if (this.dataForm.productType === '10' && id == null) { |
| | | this.isShow = false |
| | | this.getDefaultImg(this.dataForm.productType) |
| | | } |
| | | this.getProductList() |
| | | }, |
| | | // 获取系统列表 |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getProductList') |
| | | let params = { |
| | | productType: this.dataForm.productType, |
| | | shipId: this.dataForm.shipId |
| | | } |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getProductList', {params: params}) |
| | | this.productList = res.data |
| | | console.log(this.productList, 'getProductList') |
| | | }, |
| | | changeType(selected) { |
| | | this.dataForm.productType = selected |
| | | this.getDefaultImg(selected) |
| | | this.getProductList() |
| | | }, |
| | | async getDefaultImg(selected) { |
| | | console.log(selected, 'async getDefaultImg') |
| | | let params = { |