标准/译文获取申请 编辑

This commit is contained in:
baoyu
2024-03-29 10:35:03 +08:00
parent bd3efe07d5
commit 20cfd0b7a4
@@ -171,6 +171,7 @@ export default {
this.visible = false this.visible = false
}, },
addModel () { addModel () {
this.id = ''
this.visible = true this.visible = true
this.StandardApplyForEO = {} this.StandardApplyForEO = {}
this.StandardApplyForEO.applyForUserId = this.$store.getters.userInfo.userId this.StandardApplyForEO.applyForUserId = this.$store.getters.userInfo.userId
@@ -184,10 +185,14 @@ export default {
}) })
}, },
showModal (item) { showModal (item) {
this.id = item.id
this.visible = true this.visible = true
this.showLoading = true
this.StandardApplyForEO = JSON.parse(JSON.stringify(item)) this.StandardApplyForEO = JSON.parse(JSON.stringify(item))
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addFormRef.clearValidate() this.$refs.addFormRef.clearValidate()
this.getDicTypeListCode()
this.selectStandType(this.StandardApplyForEO.standType)
}) })
}, },
selectStandType (value) { selectStandType (value) {
@@ -201,6 +206,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.standLbList = res.data this.standLbList = res.data
this.$set(this.StandardApplyForEO, 'standLb', null) this.$set(this.StandardApplyForEO, 'standLb', null)
this.showLoading = false
}) })
return return
} }
@@ -213,11 +219,15 @@ export default {
if (valid) { if (valid) {
this.isSubmit = true this.isSubmit = true
const url = this.id ? this.url.editUrl : this.url.addUrl const url = this.id ? this.url.editUrl : this.url.addUrl
if (this.id) {
delete this.StandardApplyForEO.updateTime
delete this.StandardApplyForEO.updateBy
}
this.$http.postData(url, this.StandardApplyForEO, { _this: this }, this.$http.postData(url, this.StandardApplyForEO, { _this: this },
res => { res => {
if (res.ok) { if (res.ok) {
this.$emit('updateList') this.$emit('updateList')
this.$message.success(res.message) this.$message.success(res.data)
this.visible = false this.visible = false
}else{ }else{
this.$message.warning(res.message) this.$message.warning(res.message)