Commit 90e1db50 by 严立

修复问题

parent f5081806
...@@ -2346,6 +2346,25 @@ ...@@ -2346,6 +2346,25 @@
"esutils": "^2.0.2" "esutils": "^2.0.2"
} }
}, },
"babel-polyfill": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
"integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=",
"dev": true,
"requires": {
"babel-runtime": "^6.26.0",
"core-js": "^2.5.0",
"regenerator-runtime": "^0.10.5"
},
"dependencies": {
"regenerator-runtime": {
"version": "0.10.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
"dev": true
}
}
},
"babel-preset-env": { "babel-preset-env": {
"version": "1.7.0", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz",
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
"babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0", "babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0", "babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.3.2", "babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0", "babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1", "chalk": "^2.0.1",
......
let output = { let output = {
// 开发路径 // 开发路径
// base: 'http://bid-server.meiqicloud.com/', base: 'http://bid-server.meiqicloud.com/',
// resources: 'http://bid-web.meiqicloud.com/', resources: 'http://bid-web.meiqicloud.com/',
// agentSignIn: 'http://bid-vue.meiqicloud.com/' agentSignIn: 'http://bid-vue.meiqicloud.com/'
// 正式路径 // 正式路径
base: '/Api/', // base: '/Api/',
resources: 'http://bid-web.meiqicloud.com', // resources: 'http://bid-web.meiqicloud.com',
agentSignIn: 'http://bid-vue.meiqicloud.com/' // agentSignIn: 'http://bid-vue.meiqicloud.com/'
} }
output.uploadFile = output.base + 'bid/common/webupload/upload' output.uploadFile = output.base + 'bid/common/webupload/upload'
......
...@@ -52,7 +52,6 @@ let output = { ...@@ -52,7 +52,6 @@ let output = {
let funStatus = funcXMLHttpRequest.status let funStatus = funcXMLHttpRequest.status
if ((funStatus >= 200 && funStatus < 300) || funStatus === 304) { if ((funStatus >= 200 && funStatus < 300) || funStatus === 304) {
try { try {
let funcInterceptorsResponse = iInterceptors.response(funcConfigure, funcXMLHttpRequest.responseText) let funcInterceptorsResponse = iInterceptors.response(funcConfigure, funcXMLHttpRequest.responseText)
if (funcInterceptorsResponse.state) { if (funcInterceptorsResponse.state) {
funcResolve(funcInterceptorsResponse.response) funcResolve(funcInterceptorsResponse.response)
...@@ -67,6 +66,8 @@ let output = { ...@@ -67,6 +66,8 @@ let output = {
funcReject(funcResponse.response) funcReject(funcResponse.response)
} }
} }
}).catch((funcError) => {
console.log('catch', funcError)
}) })
return funcPromise return funcPromise
} }
...@@ -108,18 +109,12 @@ let output = { ...@@ -108,18 +109,12 @@ let output = {
funcReject(funcResponse.response) funcReject(funcResponse.response)
} }
} }
}).catch((funcError) => {
console.log('catch', funcError)
}) })
return funcPromise return funcPromise
} }
}, },
get: function () {
},
post: function () {
},
} }
export default output export default output
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- 通用组件 - 底部 --> <!-- 通用组件 - 底部 -->
<div class="components-skill row"> <div class="components-skill row">
<div v-for="(list, index) in skillList" :key="index" class="row"> <div v-for="(list, index) in skillList" :key="index" class="row">
<el-select v-model="selectItem[index]" :value="selectItem[index]" value-key="value" placeholder="请选择" @change="(item) => { onSelect(item, index) }"> <el-select v-model="selectionItem[index]" :value="selectionItem[index]" value-key="value" placeholder="请选择" @change="(item) => { onSelection(item, index) }">
<el-option v-for="item in list" :key="item.value" :label="item.label" :value="item"></el-option> <el-option v-for="item in list" :key="item.value" :label="item.label" :value="item"></el-option>
</el-select> </el-select>
</div> </div>
...@@ -19,11 +19,10 @@ ...@@ -19,11 +19,10 @@
data () { data () {
return { return {
skillRawData: {}, skillAll: [], // 原始数据
skillList: [], // 列表数据 skillList: [], // 列表数据
selectItem: [], // 选择对象 selectionItem: [], // 选择对象
selectIndex: [], // 选择索引缓存 selectionIndex: [0, 0, 0, 0, 0], // 选择索引缓存
selectIndexBuffer: [], // 选择索引缓存
} }
}, },
...@@ -43,9 +42,7 @@ ...@@ -43,9 +42,7 @@
}, },
componentSkill: { componentSkill: {
handler: function (funcNewValue, funcOldValue) { handler: function (funcNewValue, funcOldValue) {
if (funcNewValue.length > 1 && funcNewValue[this.identity]) {
this.selectIndexBuffer = funcNewValue
}
}, },
deep: true, deep: true,
immediate: true, immediate: true,
...@@ -54,161 +51,106 @@ ...@@ -54,161 +51,106 @@
}, },
created: function () { created: function () {
this.setSkillRawData() this.querySkill()
}, },
methods: { methods: {
setSkillRawData: function () { querySkill: function () {
let funcSelectIndexBuffer
if (this.$store.getters.componentSkillData.length) { if (this.$store.getters.componentSkillData.length) {
funcSelectIndexBuffer = this.$store.getters.componentSkill[this.identity] this.skillAll = this.$store.getters.componentSkillData
this.skillRawData = this.$store.getters.componentSkillData // 读取选择缓存
this.selectIndexBuffer = funcSelectIndexBuffer ? funcSelectIndexBuffer : [] this.selectionIndex = this.$store.getters.componentSkill[this.identity]
this.setSkillList(0, this.skillRawData) if (!this.selectionIndex) this.selectionIndex = [0, 0, 0, 0, 0]
this.ergodicSkill(this.skillAll)
} else { } else {
iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get') iRequest.request(iHost.base + 'bid/common/getApiProjectTypeOptions', {}, 'json', 'get')
.then((funcResponse) => { .then((funcResponse) => {
funcSelectIndexBuffer = this.$store.getters.componentSkill[this.identity] this.skillAll = funcResponse
this.$store.commit('componentSkillData', this.skillAll)
this.skillRawData = funcResponse this.selectionIndex = this.$store.getters.componentSkill[this.identity]
this.selectIndexBuffer = funcSelectIndexBuffer ? funcSelectIndexBuffer : [] if (!this.selectionIndex) this.selectionIndex = [0, 0, 0, 0, 0]
// 记录原始数据避免重复请求 this.ergodicSkill(this.skillAll)
this.setSkillList(0, this.skillRawData)
this.$store.commit('componentSkillData', this.skillRawData)
})
.catch((funcError) => {
console.log('iRequest', funcError)
}) })
} }
}, },
setSkillList: function (funcRankIndex, funcSkillData) { ergodicSkill: function (funcSkillAll) {
console.log(funcRankIndex) function setSkillOption (funcSelectionIndex, funcSkillList) {
console.log(funcSkillData)
function createSkillList () {
if (!funcSkillData) return
let funcList = [] let funcList = []
for (let i = 0, len = funcSkillData.length; i < len; i++) { for (let i = 0, l = funcSkillList.length; i < l; i++) {
let funcItem = { let funcItem = {
'index': i, 'index': i,
'value': funcSkillData[i].value, 'value': funcSkillList[i].value,
'label': funcSkillData[i].label, 'label': funcSkillList[i].label,
'isChildren': funcSkillData[i].children ? true : false 'isChildren': funcSkillList[i].children ? true : false
} }
funcList.push(funcItem) funcList.push(funcItem)
} }
funcSkillOption.push(funcList)
This.$set(This.skillList, funcRankIndex, funcList) funcSkillItem.push(funcList[funcSelectionIndex])
This.$set(This.selectIndex, funcRankIndex, This.selectIndexBuffer[funcRankIndex] ? This.selectIndexBuffer[funcRankIndex] : 0)
This.$set(This.selectItem, funcRankIndex, This.skillList[funcRankIndex][This.selectIndex[funcRankIndex]]) // 判断是否需要继续遍历
This.saveSelect(This.selectIndex) if (funcSkillItem[funcSkillItem.length - 1].isChildren) {
let funcSelectionIndex = funcLevel
// 当子分类只有一个的时候无法触发组件 change 事件 funcLevel = funcLevel + 1
// 因此主动触发一次选择当前分类事件 setSkillOption(funcSelection[funcLevel], funcSkillList[funcSelection[funcSelectionIndex]].children)
if (funcList.length === 1) {
let funcSkillDataBuffer = This.skillRawData
for (let i = 0, len = This.selectIndex.length; i < len; i++) {
if (funcSkillDataBuffer[This.selectIndex[i]].children) {
funcSkillDataBuffer = funcSkillDataBuffer[This.selectIndex[i]].children
}
}
funcRankIndex = funcRankIndex + 1
funcSkillData = funcSkillDataBuffer
createSkillList()
return
}
// 如果当前索引之下的元素还有子元素,则追加默认选择为第一个继续遍历
if (funcRankIndex === This.selectIndexBuffer.length && This.selectItem[funcRankIndex].isChildren) {
This.selectIndexBuffer.push(0)
}
if (funcRankIndex < This.selectIndexBuffer.length) {
let funcSelectItem = funcSkillData[This.selectIndexBuffer[funcRankIndex]]
if (funcSkillData[This.selectIndexBuffer[funcRankIndex]].children) {
funcSkillData = funcSkillData[This.selectIndexBuffer[funcRankIndex]].children
funcRankIndex = funcRankIndex + 1
createSkillList()
}
} }
} }
// 重置变量
let This = this let This = this
createSkillList() this.skillList = []
this.selectionItem = []
// 初始组件完毕需要传递当前选择的 id
let funcInitSelectId = [] let funcLevel = 0
for (let i = 0, l = this.selectItem.length; i < l; i++) { let funcSkillOption = []
funcInitSelectId.push(this.selectItem[i].value) let funcSkillItem = []
} let funcSelection = this.selectionIndex
this.$emit('change', funcInitSelectId) setSkillOption(funcSelection[funcLevel], funcSkillAll)
this.skillList = funcSkillOption
this.selectionItem = funcSkillItem
this.saveSelection()
this.returnSelectionId()
}, },
saveSelect: function (funcSelectIndexBuffer) { saveSelection: function () {
let funcComponentSkill = this.$store.getters.componentSkill let funcSaveSelection = this.$store.getters.componentSkill
funcComponentSkill[this.identity] = funcSelectIndexBuffer funcSaveSelection[this.identity] = this.selectionIndex
this.$store.commit('componentSkill', funcComponentSkill) this.$store.commit('componentSkill', funcSaveSelection)
}, },
returnSelectId: function () { returnSelectionId: function () {
let funcSelectId = [] let funcSeletion = []
for (let i = 0, l = this.selectionItem.length; i < l; i++) {
let funcSkillData = this.skillRawData funcSeletion.push(this.selectionItem[i].value)
for (let i = 0, len = this.selectIndex.length; i < len; i++) {
funcSelectId.push(funcSkillData[this.selectIndex[i]].value)
if (funcSkillData[this.selectIndex[i]].children) {
funcSkillData = funcSkillData[this.selectIndex[i]].children
}
} }
this.$emit('change', funcSelectId) // 设置完成数据触发一次选择事件使父组件获取选择数据 this.$emit('change', funcSeletion)
}, },
onSelect: function (funcItem, funcRankIndex) { onSelection: function (funcSkillItem, funcLevel) {
// 清除选择分类之后所有数据 // 定位选择层级改变选择索引
this.selectIndex[funcRankIndex] = funcItem.index let funcSkillList = this.skillList[funcLevel]
this.selectIndexBuffer[funcRankIndex] = funcItem.index for (let i = 0, l = funcSkillList.length; i < l; i++) {
if (funcSkillItem.value === funcSkillList[i].value) {
let funcSkillList = [] this.selectionIndex[funcLevel] = i
let funcSelectIndex = [] break
for (let i = 0; i <= funcRankIndex; i++) {
funcSkillList.push(this.skillList[i])
funcSelectIndex.push(this.selectIndex[i])
}
this.skillList = funcSkillList
this.selectIndex = funcSelectIndex
this.selectIndexBuffer = funcSelectIndex
// 保存当前选择数据
this.saveSelect(this.selectIndex)
// 定位选择分类查找下级分类
let funcIsChildren = false
let funcSkillData = this.skillRawData
for (let i = 0, len = this.selectIndex.length; i < len; i++) {
if (funcSkillData[this.selectIndex[i]].children) {
funcSkillData = funcSkillData[this.selectIndex[i]].children
funcIsChildren = true
} else {
funcIsChildren = false
} }
} }
if (funcIsChildren) { // 重置层级之后的选择索引
this.setSkillList(funcRankIndex + 1, funcSkillData) for (let i = 0, l = this.selectionIndex.length; i < l; i++) {
} else { if (i > funcLevel) {
this.setSkillList(funcRankIndex, funcSkillData) this.selectionIndex[i] = 0
}
} }
this.returnSelectId() // 重新渲染列表
this.ergodicSkill(this.skillAll)
}, },
} }
} }
......
import 'babel-polyfill'
import Vue from 'vue' import Vue from 'vue'
import App from './App' import App from './App'
import store from './store/store.js' import store from './store/store.js'
...@@ -24,6 +25,5 @@ let output = new Vue({ ...@@ -24,6 +25,5 @@ let output = new Vue({
'components': { App }, 'components': { App },
'template': '<App/>' 'template': '<App/>'
}) })
window.Promise = Promise
export default output export default output
\ No newline at end of file
import 'babel-polyfill'
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
Vue.use(Vuex) Vue.use(Vuex)
......
...@@ -322,6 +322,7 @@ ...@@ -322,6 +322,7 @@
} }
this.listBanner = funcList this.listBanner = funcList
}) })
.catch((funcError) => {})
}, },
queryData: function () { queryData: function () {
let funcParam = { let funcParam = {
......
...@@ -437,7 +437,14 @@ ...@@ -437,7 +437,14 @@
onUploadChange: function (funcType, funcFile, funcFileList) { onUploadChange: function (funcType, funcFile, funcFileList) {
if (funcFile.status === 'ready') { if (funcFile.status === 'ready') {
if (this.checkFileFormat(funcType, funcFile)) { if (this.checkFileFormat(funcType, funcFile)) {
funcFile.name = Math.round(new Date()) // 重新定义上传文件名称
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
let funcFileName = funcType + (new Date() - 0) + funcFileFormat
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid
funcFile.raw = funcCopyFile
funcFile.name = funcFileName
this.formRegister[funcType + 'Image'] = 'image' this.formRegister[funcType + 'Image'] = 'image'
this.uploadOption[funcType].image.push(funcFile) this.uploadOption[funcType].image.push(funcFile)
} else { } else {
......
...@@ -292,7 +292,6 @@ ...@@ -292,7 +292,6 @@
official: { official: {
url: iHost.uploadFile, url: iHost.uploadFile,
params: { params: {
'file': '',
'uploadPath': 'register/specialist/Statement/' 'uploadPath': 'register/specialist/Statement/'
}, },
image: [] image: []
...@@ -300,7 +299,6 @@ ...@@ -300,7 +299,6 @@
statement: { statement: {
url: iHost.uploadFile, url: iHost.uploadFile,
params: { params: {
'file': '',
'uploadPath': 'register/specialist/Statement/' 'uploadPath': 'register/specialist/Statement/'
}, },
image: [] image: []
...@@ -308,7 +306,6 @@ ...@@ -308,7 +306,6 @@
skill: { skill: {
url: iHost.uploadFile, url: iHost.uploadFile,
params: { params: {
'file': '',
'uploadPath': 'register/specialist/skill/' 'uploadPath': 'register/specialist/skill/'
}, },
image: [] image: []
...@@ -316,7 +313,6 @@ ...@@ -316,7 +313,6 @@
education: { education: {
url: iHost.uploadFile, url: iHost.uploadFile,
params: { params: {
'file': '',
'uploadPath': 'register/specialist/education/' 'uploadPath': 'register/specialist/education/'
}, },
image: [] image: []
...@@ -421,7 +417,7 @@ ...@@ -421,7 +417,7 @@
* @returns * @returns
*/ */
reset: function () { reset: function () {
this.state = 1 this.state = 3
this.formRegister = { this.formRegister = {
// 基础信息 // 基础信息
name: '', name: '',
...@@ -454,7 +450,7 @@ ...@@ -454,7 +450,7 @@
// 重置区域选择数据 // 重置区域选择数据
this.$store.commit('areaSelection', []) this.$store.commit('areaSelection', [])
this.$store.commit('componentSkill', []) this.$store.commit('componentSkill', [])
this.$store.commit('componentSkillData', {}) this.$store.commit('componentSkillData', [])
}, },
...@@ -698,7 +694,6 @@ ...@@ -698,7 +694,6 @@
// 职称上传 // 职称上传
case 3: case 3:
console.log(this.formRegister)
this.$refs.formSkill.validate(funcValid => { this.$refs.formSkill.validate(funcValid => {
if (funcValid) { if (funcValid) {
if (this.uploadOption.skill.image.length > 0) { if (this.uploadOption.skill.image.length > 0) {
...@@ -779,7 +774,7 @@ ...@@ -779,7 +774,7 @@
onSkillInsert: function () { onSkillInsert: function () {
if (this.skillQuantity < 5) this.skillQuantity = this.skillQuantity + 1 if (this.skillQuantity < 5) this.skillQuantity = this.skillQuantity + 1
let funcComponentSkill = this.$store.getters.componentSkill let funcComponentSkill = this.$store.getters.componentSkill
funcComponentSkill.push([]) funcComponentSkill.push([0, 0, 0, 0, 0])
this.$store.commit('componentSkill', funcComponentSkill) this.$store.commit('componentSkill', funcComponentSkill)
}, },
...@@ -858,7 +853,14 @@ ...@@ -858,7 +853,14 @@
onUploadChange: function (funcType, funcFile, funcFileList) { onUploadChange: function (funcType, funcFile, funcFileList) {
if (funcFile.status === 'ready') { if (funcFile.status === 'ready') {
if (this.checkFileFormat(funcType, funcFile)) { if (this.checkFileFormat(funcType, funcFile)) {
funcFile.name = Math.round(new Date()) // 重新定义上传文件名称
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
let funcFileName = funcType + (new Date() - 0) + funcFileFormat
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid
funcFile.raw = funcCopyFile
funcFile.name = funcFileName
this.formRegister[funcType + 'Image'] = 'image' this.formRegister[funcType + 'Image'] = 'image'
this.uploadOption[funcType].image.push(funcFile) this.uploadOption[funcType].image.push(funcFile)
} else { } else {
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
:action="uploadOption.license.url" :action="uploadOption.license.url"
:data="uploadOption.license.params" :data="uploadOption.license.params"
:on-preview="onUploadPreviewFile" :on-preview="onUploadPreviewFile"
:before-upload="(file) => { ononUploadBefore('license', file) }"
:on-remove="(file, fileList) => { onUploadRemove('license', file, fileList) }" :on-remove="(file, fileList) => { onUploadRemove('license', file, fileList) }"
:on-change="(file, fileList) => { onUploadChange('license', file, fileList) }" :on-change="(file, fileList) => { onUploadChange('license', file, fileList) }"
:on-success="(respons, file, fileList) => { onUploadSuccess('license', respons, file, fileList) }" :on-success="(respons, file, fileList) => { onUploadSuccess('license', respons, file, fileList) }"
...@@ -840,9 +841,17 @@ ...@@ -840,9 +841,17 @@
* @returns * @returns
*/ */
onUploadChange: function (funcType, funcFile, funcFileList) { onUploadChange: function (funcType, funcFile, funcFileList) {
console.log(funcFile)
if (funcFile.status === 'ready') { if (funcFile.status === 'ready') {
if (this.checkFileFormat(funcType, funcFile)) { if (this.checkFileFormat(funcType, funcFile)) {
funcFile.name = Math.round(new Date()) // 重新定义上传文件名称
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
let funcFileName = funcType + (new Date() - 0) + funcFileFormat
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid
funcFile.raw = funcCopyFile
funcFile.name = funcFileName
this.formRegister[funcType + 'Image'] = 'image' this.formRegister[funcType + 'Image'] = 'image'
this.uploadOption[funcType].image.push(funcFile) this.uploadOption[funcType].image.push(funcFile)
} else { } else {
......
...@@ -66,6 +66,29 @@ ...@@ -66,6 +66,29 @@
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="专家入库申明:" prop="statementImage">
<!-- 此处 input 是为了模拟校验而设置的隐藏组件 -->
<el-input class="global-none" v-model="formRegister.statementImage"></el-input>
<el-upload :class="uploadOption.statement.image.length > 0 ? 'upload-none' : ''"
ref="uploadStatement"
list-type="picture-card"
:auto-upload="false"
:limit="1"
:file-list="uploadOption.statement.image"
:action="uploadOption.statement.url"
:data="uploadOption.statement.params"
:on-preview="onUploadPreviewFile"
:on-remove="(file, fileList) => { onUploadRemove('statement', file, fileList) }"
:on-change="(file, fileList) => { onUploadChange('statement', file, fileList) }"
:on-success="(respons, file, fileLis) => { onUploadSuccess('statement', respons, file, fileLis) }"
:on-error="(error) => { onUploadFail('statement', error) }"
>
<div class="col">
<i class="el-icon-plus"></i>
<span>点击上传</span>
</div>
</el-upload>
</el-form-item>
<el-form-item label="最高学历:" prop="education"> <el-form-item label="最高学历:" prop="education">
<el-radio-group v-model="formRegister.education"> <el-radio-group v-model="formRegister.education">
<el-radio label="1">专科</el-radio> <el-radio label="1">专科</el-radio>
...@@ -201,15 +224,20 @@ ...@@ -201,15 +224,20 @@
official: { official: {
url: iHost.uploadFile, url: iHost.uploadFile,
params: { params: {
'file': '',
'uploadPath': 'register/specialist/Statement/' 'uploadPath': 'register/specialist/Statement/'
}, },
image: [] image: []
}, },
statement: {
url: iHost.uploadFile,
params: {
'uploadPath': 'register/specialist/Statement/'
},
image: []
},
skill: { skill: {
url: iHost.uploadFile, url: iHost.uploadFile,
params: { params: {
'file': '',
'uploadPath': 'register/specialist/skill/' 'uploadPath': 'register/specialist/skill/'
}, },
image: [] image: []
...@@ -217,7 +245,6 @@ ...@@ -217,7 +245,6 @@
education: { education: {
url: iHost.uploadFile, url: iHost.uploadFile,
params: { params: {
'file': '',
'uploadPath': 'register/specialist/education/' 'uploadPath': 'register/specialist/education/'
}, },
image: [] image: []
...@@ -252,16 +279,17 @@ ...@@ -252,16 +279,17 @@
{ required: true, message: '请选择', trigger: 'blur' } { required: true, message: '请选择', trigger: 'blur' }
], ],
officialImage: [ officialImage: [
{ required: true, message: '请上传上传政府专家证明资料', trigger: 'blur' } { required: true, message: '请上传政府专家证明资料', trigger: 'blur' }
],
statement: [
{ required: true, message: '请上传入库声明', trigger: 'blur' }
], ],
skillSelect: [ skillSelect: [
{ required: true, message: '请选择评审专业', trigger: 'blur' } { required: true, message: '请选择评审专业', trigger: 'blur' }
], ],
skillImage: [ skillImage: [
{ required: true, message: '请上传上传职称证书', trigger: 'blur' } { required: true, message: '请上传职称证书', trigger: 'blur' }
], ],
education: [ education: [
{ required: true, message: '请选择最高学历', trigger: 'blur' } { required: true, message: '请选择最高学历', trigger: 'blur' }
], ],
...@@ -416,6 +444,7 @@ ...@@ -416,6 +444,7 @@
company: '', company: '',
isOfficial: '0', isOfficial: '0',
officialImage: '', officialImage: '',
statementImage: '',
// 职称信息 // 职称信息
skillSelect: '', skillSelect: '',
...@@ -649,7 +678,14 @@ ...@@ -649,7 +678,14 @@
onUploadChange: function (funcType, funcFile, funcFileList) { onUploadChange: function (funcType, funcFile, funcFileList) {
if (funcFile.status === 'ready') { if (funcFile.status === 'ready') {
if (this.checkFileFormat(funcType, funcFile)) { if (this.checkFileFormat(funcType, funcFile)) {
funcFile.name = Math.round(new Date()) // 重新定义上传文件名称
let funcFileFormat = funcFile.name.substring(funcFile.name.lastIndexOf('.'), funcFile.name.length)
let funcFileName = funcType + (new Date() - 0) + funcFileFormat
let funcCopyFile = new File([funcFile.raw], funcFileName, { type: funcFile.raw.type})
funcCopyFile.uid = funcFile.raw.uid
funcFile.raw = funcCopyFile
funcFile.name = funcFileName
this.formRegister[funcType + 'Image'] = 'image' this.formRegister[funcType + 'Image'] = 'image'
this.uploadOption[funcType].image.push(funcFile) this.uploadOption[funcType].image.push(funcFile)
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment