|
@@ -8,6 +8,7 @@
|
|
<a-form-item label="考评项目名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
|
|
<a-form-item label="考评项目名称:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
|
|
<a-input
|
|
<a-input
|
|
allowClear
|
|
allowClear
|
|
|
|
+ id="addEvaItemModal-name"
|
|
:maxLength="128"
|
|
:maxLength="128"
|
|
v-decorator="[
|
|
v-decorator="[
|
|
'formData.name',
|
|
'formData.name',
|
|
@@ -24,6 +25,7 @@
|
|
<a-form-item label="考评项目说明:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
|
|
<a-form-item label="考评项目说明:" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
|
|
<a-textarea
|
|
<a-textarea
|
|
allowClear
|
|
allowClear
|
|
|
|
+ id="addEvaItemModal-desc"
|
|
:maxLength="500"
|
|
:maxLength="500"
|
|
Input.TextArea
|
|
Input.TextArea
|
|
:autoSize="{minRows:5}"
|
|
:autoSize="{minRows:5}"
|
|
@@ -36,10 +38,10 @@
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
<a-form-item :wrapper-col="{ span: 24, offset: 10 }">
|
|
<a-form-item :wrapper-col="{ span: 24, offset: 10 }">
|
|
- <a-button type="primary" @click="handleSubmit()">
|
|
|
|
|
|
+ <a-button :loading="loading" id="addEvaItemModal-submit" type="primary" @click="handleSubmit()">
|
|
确定
|
|
确定
|
|
</a-button>
|
|
</a-button>
|
|
- <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
|
|
|
|
|
|
+ <a-button id="addEvaItemModal-cancel" :style="{ marginLeft: '8px' }" @click="handleCancel()">
|
|
取消
|
|
取消
|
|
</a-button>
|
|
</a-button>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -100,8 +102,8 @@ export default {
|
|
formData: {
|
|
formData: {
|
|
name: '', // 方案名称
|
|
name: '', // 方案名称
|
|
desc: '' // 方案说明
|
|
desc: '' // 方案说明
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ loading: false // 确定按钮loading
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -123,7 +125,7 @@ export default {
|
|
id: id
|
|
id: id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- console.log(res, 'rrrrrrrrrr')
|
|
|
|
|
|
+ // console.log(res, 'rrrrrrrrrr')
|
|
this.formData = Object.assign(this.formData, res.data)
|
|
this.formData = Object.assign(this.formData, res.data)
|
|
console.log(this.formData, 'this.formData')
|
|
console.log(this.formData, 'this.formData')
|
|
}
|
|
}
|
|
@@ -133,10 +135,11 @@ export default {
|
|
handleSubmit () {
|
|
handleSubmit () {
|
|
this.form.validateFields((err, values) => {
|
|
this.form.validateFields((err, values) => {
|
|
if (!err) {
|
|
if (!err) {
|
|
|
|
+ this.loading = true
|
|
const params = this.itemId ? Object.assign({
|
|
const params = this.itemId ? Object.assign({
|
|
id: this.itemId
|
|
id: this.itemId
|
|
}, values.formData) : values.formData
|
|
}, values.formData) : values.formData
|
|
- console.log(params, 'ppppppppppppp')
|
|
|
|
|
|
+ // console.log(params, 'ppppppppppppp')
|
|
itemSave(params).then(res => {
|
|
itemSave(params).then(res => {
|
|
console.log(res, 'res--save')
|
|
console.log(res, 'res--save')
|
|
if (res.status + '' === '200') {
|
|
if (res.status + '' === '200') {
|
|
@@ -148,6 +151,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
// this.$message.warning(res.message)
|
|
// this.$message.warning(res.message)
|
|
}
|
|
}
|
|
|
|
+ this.loading = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|