| | |
| | | <zt-form-item label="名称" prop="name" rules="required"> |
| | | <el-input v-model="dataForm.name"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item v-if="dataForm.productType==='5'" prop="equipType" label="设备类型" rules="required"> |
| | | <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" |
| | | :disabled="disabled"></zt-dict> |
| | | </zt-form-item> |
| | | <zt-form-item label="运行状态图" prop="operatImg" v-if="isShow"> |
| | | <zt-form-item label="运行状态图" prop="operatImg"> |
| | | <el-input v-model="dataForm.operatImgName" @focus="selectPicture()"></el-input> |
| | | <el-image v-if="dataForm.operatImg" :src="url+dataForm.operatImg" style="height: 50px;width: 50px"></el-image> |
| | | </zt-form-item> |
| | |
| | | id: '', |
| | | pid: '', |
| | | name: '', |
| | | shipId: '', |
| | | productType: '', |
| | | operatImg: '', |
| | | operatImgName: '', |
| | | sort: '', |
| | | equipType: '', |
| | | status: '' |
| | | } |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | init(id, params) { |
| | | if (params.shipId) { |
| | | this.dataForm.shipId = params.shipId |
| | | } |
| | | if (params.type === 'xh') { |
| | | this.isShow = false |
| | | this.dataForm.pid = null |
| | | this.dataForm.productType = 1 |
| | | this.getDefaultImg(this.dataForm.productType) |
| | | } else if (params.type === 'zt') { |
| | | this.dataForm.pid = params.pid |
| | | this.dataForm.productType = 2 |
| | | this.getProductList() |
| | | this.getDefaultImg(this.dataForm.productType) |
| | | } else { |
| | | this.dataForm.pid = params.pid |
| | | this.dataForm.productType = params.type |
| | | } |
| | | if (this.dataForm.productType === 10 && id == null) { |
| | | this.isShow = false |
| | | this.getDefaultImg(this.dataForm.productType) |
| | | } |
| | | }, |
| | |
| | | productType: selected |
| | | } |
| | | let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params}) |
| | | this.dataForm.operatImgName = res.data.name |
| | | this.dataForm.operatImg = res.data.id |
| | | if (res.data) { |
| | | this.dataForm.operatImgName = res.data.name |
| | | this.dataForm.operatImg = res.data.id |
| | | } |
| | | }, |
| | | selectPicture() { |
| | | this.$refs.pictureSelect.$refs.dialog.init(this.dataForm.productType) |