修改未符合项的传参
This commit is contained in:
@@ -13,54 +13,31 @@
|
||||
<a-col :span="24" v-if="title == $t('CertificationProgress')">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('CertificationProgress')">{{$t('CertificationProgress')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="certificationProgress">
|
||||
<a-select v-model="formInline.certificationProgress"
|
||||
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')">
|
||||
<a-select-option :key="1" :value="1">
|
||||
<span style="display: inline-block;width: 100%">
|
||||
{{ $t('experimentPassed') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
<a-select-option :key="2" :value="2">
|
||||
<span style="display: inline-block;width: 100%">
|
||||
{{ $t('experimentFailed') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
<a-select-option :key="3" :value="3">
|
||||
<span style="display: inline-block;width: 100%">
|
||||
{{ $t('toBeStarted') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
<a-select-option :key="4" :value="4">
|
||||
<span style="display: inline-block;width: 100%">
|
||||
{{ $t('inProgress') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
<a-select-option :key="5" :value="5">
|
||||
<span style="display: inline-block;width: 100%">
|
||||
{{ $t('notInvolved') }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgress':''">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.certificationProgress"
|
||||
:disabled="disabled"
|
||||
@input="handleInput('certificationProgress')"
|
||||
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'certification_progress'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-if="title == $t('CertificationProgress')">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('remarks')">{{$t('remarks')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="certificationProgressRemark">
|
||||
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgressRemark':''">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+$t('remarks')"
|
||||
:disabled="false"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.certificationProgressRemark" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -121,6 +98,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, putAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'TaskListModel',
|
||||
data() {
|
||||
@@ -129,7 +108,11 @@
|
||||
rules: {},
|
||||
title: this.$t('CertificationProgress'),
|
||||
visible: false,
|
||||
confirmLoading: false
|
||||
confirmLoading: false,
|
||||
disabled: false,
|
||||
url: {
|
||||
edit: '/project/projectTaskInventoryEO/edit'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -137,15 +120,50 @@
|
||||
},
|
||||
methods: {
|
||||
getData(val, title) {
|
||||
this.formInline = {}
|
||||
this.visible = true
|
||||
this.title = title
|
||||
this.formInline = val
|
||||
if (val.roleCode == '2' || val.roleCode == '4') {
|
||||
this.disabled = false
|
||||
} else {
|
||||
this.disabled = true
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
|
||||
if (this.disabled) {
|
||||
this.visible = false
|
||||
return
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let query = {
|
||||
id: this.formInline.id,
|
||||
certificationProgress: this.formInline.certificationProgress,
|
||||
certificationProgressRemark: this.formInline.certificationProgressRemark
|
||||
}
|
||||
this.confirmLoading = true
|
||||
putAction(this.url.edit, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$emit('TaskListModelList')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user