| | |
| | | <el-input v-model="dataForm.name"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="节点类型" prop="nodeType" rules="required"> |
| | | <zt-dict v-model="dataForm.nodeType" dict="product"></zt-dict> |
| | | <zt-dict v-model="dataForm.nodeType" dict="product" @input="getDefaultImg"></zt-dict> |
| | | </zt-form-item> |
| | | <zt-form-item label="基本计算" prop="baseCompute"> |
| | | <zt-dict v-model="dataForm.baseCompute" dict="is_or_not" placeholder="基本计算"></zt-dict> |
| | |
| | | </zt-form-item> |
| | | <zt-form-item label="运行图片" prop="operatImg"> |
| | | <el-input v-model="dataForm.operatImgName" @focus="selectPicture()" :readonly="readonly"></el-input> |
| | | <el-image v-if="dataForm.operatImg" :src="url+dataForm.operatImg" style="height: 50px;width: 50px"></el-image> |
| | | </zt-form-item> |
| | | <zt-form-item label="排序" prop="sort"> |
| | | <el-input v-model="dataForm.sort" :readonly="readonly"></el-input> |
| | |
| | | |
| | | <script> |
| | | import PictureSelect from "@/views/modules/basicInfo/SelectPicture"; |
| | | import Cookies from "js-cookie"; |
| | | |
| | | export default { |
| | | name:'TyProductModel', |
| | | data() { |
| | | return { |
| | | url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`, |
| | | fileId: '', |
| | | productList: [], |
| | | dataForm: { |
| | |
| | | methods: { |
| | | init() { |
| | | this.getProductList() |
| | | |
| | | }, |
| | | // 获取系统列表 |
| | | async getProductList() { |
| | |
| | | console.log(this.productList, 'getProductList') |
| | | }, |
| | | selectPicture() { |
| | | this.$refs.pictureSelect.$refs.dialog.init() |
| | | this.$refs.pictureSelect.$refs.dialog.init(this.dataForm.nodeType) |
| | | }, |
| | | openAddWin(row) { |
| | | this.dataForm.operatImgName = row.name |
| | | this.dataForm.operatImg = row.id |
| | | 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}) |
| | | this.dataForm.operatImgName = res.data.name |
| | | this.dataForm.operatImg = res.data.id |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let res = await this.$http.get(`/basicInfo/TyProductModel/${this.dataForm.id}`) |