| | |
| | | name: '', |
| | | productType: '', |
| | | operatImg: '', |
| | | operatImgName:'', |
| | | operatImgName: '', |
| | | sort: '', |
| | | status: '' |
| | | } |
| | |
| | | PictureSelect |
| | | }, |
| | | methods: { |
| | | init(id,params) { |
| | | init(id, params) { |
| | | if (params.type === 'tree') { |
| | | this.isTree = true |
| | | this.isShow = false |
| | |
| | | this.dataForm.pid = params.pid |
| | | this.dataForm.productType = params.type |
| | | } |
| | | if (this.dataForm.productType==='10'){ |
| | | |
| | | } |
| | | }, |
| | | |
| | | // 获取系统列表 |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getProductList') |
| | |
| | | let params = { |
| | | productType: selected |
| | | } |
| | | let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params:params}) |
| | | let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params}) |
| | | this.dataForm.operatImgName = res.data.name |
| | | this.dataForm.operatImg = res.data.id |
| | | }, |
| | |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | let flag = true |
| | | if (this.isTree){ |
| | | if (this.dataForm.productType !== '5' || this.dataForm.productType !== '4') { |
| | | this.$alert("不支持新增此节点") |
| | | flag =false |
| | | } |
| | | }else{ |
| | | if (this.dataForm.productType === '5' || this.dataForm.productType === '4') { |
| | | this.$alert("不支持新增此节点") |
| | | flag =false |
| | | } |
| | | } |
| | | |
| | | if (!flag){ |
| | | return |
| | | } |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |