| | |
| | | <template> |
| | | <zt-dialog ref="dialog" @confirm="formSubmit" append-to-body> |
| | | <zt-dialog ref="dialog" append-to-body @confirm="formSubmit" :hasConfirm="true"> |
| | | <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> |
| | | <zt-form-item label="上级系统" prop="pid"> |
| | | <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList"/> |
| | | <zt-form-item label="上级节点" prop="pid"> |
| | | <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList" @input="selectDefaultProduct"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="名称" prop="name" rules="required"> |
| | | <el-input v-model="dataForm.name"></el-input> |
| | |
| | | name: 'TyProductModel', |
| | | data() { |
| | | return { |
| | | url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`, |
| | | url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getSvgImage?token=${Cookies.get('token')}&id=`, |
| | | fileId: '', |
| | | productList: [], |
| | | dataForm: { |
| | |
| | | init() { |
| | | this.getProductList() |
| | | }, |
| | | selectDefaultProduct() { |
| | | this.dataForm.nodeType = 5 |
| | | this.getDefaultImg(this.dataForm.nodeType) |
| | | }, |
| | | // 获取系统列表 |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/TyProductModel/getProductList') |
| | |
| | | console.log(row, 'openAddWin(row)') |
| | | }, |
| | | async getDefaultImg(selected) { |
| | | console.log(selected, 'async getDefaultImg') |
| | | 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 |
| | | }, |
| | |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | console.log(this.map, 'getInfo') |
| | | if (this.dataForm.pid == null) { |
| | | this.dataForm.pid = '' |
| | | } |
| | | if (this.dataForm.baseCompute == null) { |
| | | this.dataForm.baseCompute = '' |
| | | } |
| | | if (this.dataForm.taskCompute == null) { |
| | | this.dataForm.taskCompute = '' |
| | | } |
| | | if (this.dataForm.reliabDistrib == null) { |
| | | this.dataForm.reliabDistrib = '' |
| | | } |
| | | if (this.dataForm.repairDistrib == null) { |
| | | this.dataForm.repairDistrib = '' |
| | | } |
| | | console.log(this.dataForm, 'this.dataForm') |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |