| | |
| | | <template> |
| | | <zt-dialog ref="dialog" @confirm="formSubmit" :hasConfirm="true"> |
| | | <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="shipName"> |
| | | <el-input v-model="dataForm.shipName"></el-input> |
| | | <zt-form-item label="总体节点" prop="shipName"> |
| | | <el-input v-model="dataForm.shipName" :readonly="true"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="评定数据名称" prop="name" rules="required"> |
| | | <el-input v-model="dataForm.name"></el-input> |
| | |
| | | import Cookies from "js-cookie"; |
| | | |
| | | export default { |
| | | name:'assess-AddOrUpdate', |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | id:'', |
| | | name:'', |
| | | productId:'' |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | async init(id, param) { |
| | | let result = await this.$http.get(`/basicInfo/TyProductModel/getUuid`) |
| | | this.dataForm.itemId = result.data |
| | | if(id){ |
| | | this.dataForm.itemId=id |
| | | this.dataForm.id=id |
| | | this.dataForm.name=param.name |
| | | }else{ |
| | | let result = await this.$http.get(`/basicInfo/TyProductModel/getUuid`) |
| | | this.dataForm.itemId = result.data |
| | | } |
| | | this.dataForm.productId = param.productId |
| | | this.dataForm.shipName = param.shipName |
| | | this.fileList = [] |
| | | this.resultData = [] |
| | | this.progress.id = guid() |
| | | let params = qs.stringify({ |
| | |
| | | name:this.dataForm.name, |
| | | productId:this.dataForm.productId |
| | | } |
| | | let res = await this.$http.post('/taskReliability/ReliabilityAssess/add', param) |
| | | let res |
| | | if (this.dataForm.id){ |
| | | res = await this.$http.post('/taskReliability/ReliabilityAssess/update', param) |
| | | }else{ |
| | | res = await this.$http.post('/taskReliability/ReliabilityAssess/add', param) |
| | | } |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('refreshDataList') |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | } |