| | |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import RichEditor from '@/components/common/RichEditor' |
| | | import { saveLpInfo, getById } from '@/api/business/insurance' |
| | | export default { |
| | | name: 'setCompany', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, RichEditor }, |
| | | data () { |
| | | return { |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=INSURANCE', |
| | | activeNames: ['1', '2', '3', '4', '5', '6'], |
| | | specialAgreement: '', |
| | | form: { |
| | | id: null, |
| | | lpStampTempFile: null, |
| | | lpStampTempFileCopy: [], |
| | | lpFile: null, |
| | | lpFileCopy: [], |
| | | lpYggxFileInfo: '', |
| | | lpMzFileInfo: '', |
| | | lpZyFileInfo: '', |
| | | lpScFileInfo: '', |
| | | lpOtherFileInfo: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/knowledge', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | confirm () { |
| | | this.isWorking = true |
| | | saveLpInfo(this.form) |
| | | .then(res => { |
| | | this.isWorking = false |
| | | this.$emit('success') |
| | | this.$message.success('保存成功') |
| | | this.visible = false |
| | | }) |
| | | }, |
| | | open (title, id) { |
| | | this.title = title |
| | | |
| | | getById(id) |
| | | .then(res => { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | setTimeout(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = res[key] |
| | | } |
| | | if (this.form.lpStampTempFile) { |
| | | this.form.lpStampTempFileCopy = [this.form.lpStampTempFile] |
| | | } |
| | | if (this.form.lpFile) { |
| | | this.form.lpFileCopy = [this.form.lpFile] |
| | | } |
| | | }, 1000) |
| | | }) |
| | | }) |
| | | }, |
| | | getWangedditor1(val) { |
| | | this.form.lpYggxFileInfo = val |
| | | }, |
| | | getWangedditor2(val) { |
| | | this.form.lpMzFileInfo = val |
| | | }, |
| | | getWangedditor3(val) { |
| | | this.form.lpZyFileInfo = val |
| | | }, |
| | | getWangedditor4(val) { |
| | | this.form.lpScFileInfo = val |
| | | }, |
| | | getWangedditor5(val) { |
| | | this.form.lpOtherFileInfo = val |
| | | }, |
| | | handleFileSuccess(e) { |
| | | e.data.name = e.data.originname |
| | | e.data.fileurl = e.data.imgaddr |
| | | this.form.lpFile = e.data |
| | | this.form.lpFileCopy = [e.data] |
| | | }, |
| | | uploadError(e) { |
| | | this.$message.error('上传失败') |
| | | }, |
| | | handleRemove() { |
| | | this.form.lpFile = null |
| | | this.form.lpFileCopy = [] |
| | | }, |
| | | handleFileSuccess1(e) { |
| | | e.data.name = e.data.originname |
| | | e.data.fileurl = e.data.imgaddr |
| | | this.form.lpStampTempFile = e.data |
| | | this.form.lpStampTempFileCopy = [e.data] |
| | | }, |
| | | uploadError1(e) { |
| | | this.$message.error('上传失败') |
| | | }, |
| | | handleRemove1() { |
| | | this.form.lpStampTempFile = null |
| | | this.form.lpStampTempFileCopy = [] |
| | | }, |
| | | handleExceed() { |
| | | this.$message.warning('只能上传一个文件!') |
| | | } |
| | | } |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import RichEditor from '@/components/common/RichEditor' |
| | | import { saveLpInfo, getById } from '@/api/business/insurance' |
| | | export default { |
| | | name: 'setCompany', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, RichEditor }, |
| | | data () { |
| | | return { |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder=insurance', |
| | | activeNames: ['1', '2', '3', '4', '5', '6'], |
| | | specialAgreement: '', |
| | | form: { |
| | | id: null, |
| | | lpStampTempFile: null, |
| | | lpStampTempFileCopy: [], |
| | | lpFile: null, |
| | | lpFileCopy: [], |
| | | lpYggxFileInfo: '', |
| | | lpMzFileInfo: '', |
| | | lpZyFileInfo: '', |
| | | lpScFileInfo: '', |
| | | lpOtherFileInfo: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/knowledge', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | confirm () { |
| | | this.isWorking = true |
| | | saveLpInfo(this.form) |
| | | .then(res => { |
| | | this.isWorking = false |
| | | this.$emit('success') |
| | | this.$message.success('保存成功') |
| | | this.visible = false |
| | | }) |
| | | }, |
| | | open (title, id) { |
| | | this.title = title |
| | | getById(id) |
| | | .then(res => { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | setTimeout(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = res[key] |
| | | } |
| | | if (this.form.lpStampTempFile) { |
| | | this.form.lpStampTempFileCopy = [this.form.lpStampTempFile] |
| | | } |
| | | if (this.form.lpFile) { |
| | | this.form.lpFileCopy = [this.form.lpFile] |
| | | } |
| | | }, 1000) |
| | | }) |
| | | }) |
| | | }, |
| | | getWangedditor1 (val) { |
| | | this.form.lpYggxFileInfo = val |
| | | }, |
| | | getWangedditor2 (val) { |
| | | this.form.lpMzFileInfo = val |
| | | }, |
| | | getWangedditor3 (val) { |
| | | this.form.lpZyFileInfo = val |
| | | }, |
| | | getWangedditor4 (val) { |
| | | this.form.lpScFileInfo = val |
| | | }, |
| | | getWangedditor5 (val) { |
| | | this.form.lpOtherFileInfo = val |
| | | }, |
| | | handleFileSuccess (e) { |
| | | e.data.name = e.data.originname |
| | | e.data.fileurl = e.data.imgaddr |
| | | this.form.lpFile = e.data |
| | | this.form.lpFileCopy = [e.data] |
| | | }, |
| | | uploadError (e) { |
| | | this.$message.error('上传失败') |
| | | }, |
| | | handleRemove () { |
| | | this.form.lpFile = null |
| | | this.form.lpFileCopy = [] |
| | | }, |
| | | handleFileSuccess1 (e) { |
| | | e.data.name = e.data.originname |
| | | e.data.fileurl = e.data.imgaddr |
| | | this.form.lpStampTempFile = e.data |
| | | this.form.lpStampTempFileCopy = [e.data] |
| | | }, |
| | | uploadError1 (e) { |
| | | this.$message.error('上传失败') |
| | | }, |
| | | handleRemove1 () { |
| | | this.form.lpStampTempFile = null |
| | | this.form.lpStampTempFileCopy = [] |
| | | }, |
| | | handleExceed () { |
| | | this.$message.warning('只能上传一个文件!') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |