学生资助、学生奖惩等内容提交
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
<el-input v-model="auditForm.fdyCmt" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false" :file-list="upload.fileList" :on-success="handleAvatarSuccess">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" :limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false" :file-list="upload.fileList" :on-success="handleAvatarSuccess">
|
||||
<img v-if="auditForm.fdySign" :src="baseurl + auditForm.fdySign" width="200px" height="50px" class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
@@ -178,7 +178,7 @@
|
||||
<el-upload style="display: inline;" :before-upload="boolImg"
|
||||
accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader"
|
||||
:action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleAvatarSuccess"
|
||||
:file-list="upload.fileList" :on-success="handleEditSignSuccess"
|
||||
>
|
||||
<img v-if="editForm.applySign" :src="baseurl + editForm.applySign" width="200px" height="50px"
|
||||
class="avatar"
|
||||
@@ -225,7 +225,7 @@ import { getTokenKeySessionStorage as getToken } from '@/utils/auth'
|
||||
import GlApply from '@/views/comprehensive/knzzGlApply/cpnt/GlApply.vue'
|
||||
import GlLook from '@/views/comprehensive/knzzGlApply/cpnt/GlLook.vue'
|
||||
|
||||
import { listFdy as listView, doAudit, doMany, doEdit, getKnzzGlApply } from '@/api/comprehensive/knzzGlApply'
|
||||
import { listFdy as listView, doAudit, doMany, doEdit, getKnzzGlApply, updateKnzzGlApply } from '@/api/comprehensive/knzzGlApply'
|
||||
import { getOwnSign } from '@/api/workstudy/post'
|
||||
|
||||
export default {
|
||||
@@ -243,6 +243,8 @@ export default {
|
||||
lookV: false,
|
||||
editMode: false,
|
||||
|
||||
originalApplySign: null,
|
||||
|
||||
editForm: {
|
||||
id: null,
|
||||
xm: '',
|
||||
@@ -464,10 +466,12 @@ export default {
|
||||
sdata.hardType = sdata.hardType[0] || ''
|
||||
}
|
||||
const loading = fullLoading(this)
|
||||
const res =await doEdit(sdata)
|
||||
const api = sdata.applySign !== this.originalApplySign ? updateKnzzGlApply : doEdit
|
||||
const res = await api(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success('保存成功')
|
||||
this.originalApplySign = sdata.applySign || null
|
||||
this.editV = false
|
||||
this.getList()
|
||||
} else {
|
||||
@@ -535,6 +539,7 @@ export default {
|
||||
} else {
|
||||
this.editForm.hardType = ''
|
||||
}
|
||||
this.originalApplySign = this.editForm.applySign || null
|
||||
this.editV = true
|
||||
} else {
|
||||
this.$message.error(res.msg || '获取详情失败')
|
||||
@@ -561,6 +566,16 @@ export default {
|
||||
break
|
||||
}
|
||||
},
|
||||
handleEditSignSuccess(response, file, fileList) {
|
||||
// 确保属性响应式存在
|
||||
if (!Object.prototype.hasOwnProperty.call(this.editForm, 'applySign')) {
|
||||
this.$set(this.editForm, 'applySign', response.fileName)
|
||||
} else {
|
||||
this.editForm.applySign = response.fileName
|
||||
}
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user