Merge remote-tracking branch 'origin/2024年2月22日v1.0.55' into dev

pet_li_6.6
liujun 2024-02-26 16:02:27 +08:00
commit 67d92a503d
2 changed files with 25 additions and 3 deletions

View File

@ -44,6 +44,17 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item prop="APPOINT_ANNEX" label="承诺书:">
<upload-file
:file-list.sync="form.APPOINT_ANNEX"
:multiple="false"
:accept="'.pdf,.jpg,.png,doc,docx'"
:limit="1"
:size="1024"
:upload-type="1"/>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -59,9 +70,11 @@
import vueQr from 'vue-qr' import vueQr from 'vue-qr'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import uploadFile from '../../../util/uploadFile/index.vue'
import { upload } from '@/utils/upload'
export default { export default {
components: { Treeselect, vueQr }, components: { Treeselect, vueQr, uploadFile },
props: { props: {
appendToBody: { appendToBody: {
type: Boolean, type: Boolean,
@ -95,6 +108,7 @@ export default {
APPOINT_DEPARTMENT_NAME: '', APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '', APPOINT_USER_ID: '',
APPOINT_USER_NAME: '', APPOINT_USER_NAME: '',
APPOINT_ANNEX: [],
user: '', user: '',
tm: new Date().getTime(), tm: new Date().getTime(),
list: [] list: []
@ -108,6 +122,9 @@ export default {
], ],
APPOINT_CORP_ID: [ APPOINT_CORP_ID: [
{ required: true, message: '请选择企业', trigger: 'change' } { required: true, message: '请选择企业', trigger: 'change' }
],
APPOINT_ANNEX: [
{ required: true, message: '请上传文件', trigger: 'change' }
] ]
} }
} }
@ -172,7 +189,12 @@ export default {
this.$message.error('请填写完整信息') this.$message.error('请填写完整信息')
} else { } else {
this.form.list = this.heirloom this.form.list = this.heirloom
requestFN('/trainingbatch/sendMessage', this.form const formData = new FormData()
Object.keys(this.form).map(key => {
formData.append(key, this.form[key])
})
formData.append('chenNuoShu', this.form.APPOINT_ANNEX[0].raw)
upload('/trainingbatch/sendMessage', formData
).then((data) => { ).then((data) => {
if (data.code !== '0') { if (data.code !== '0') {
this.$message.error(data.msg) this.$message.error(data.msg)

View File

@ -39,7 +39,7 @@ export default {
}, },
info: { info: {
type: String, type: String,
default: '文件大小不超过500kb' default: '文件大小不超过500MB'
} }
}, },
data() { data() {