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
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,7 +224,13 @@ ...@@ -201,7 +224,13 @@
official: { official: {
url: iHost.uploadFile, url: iHost.uploadFile,
params: { params: {
'file': '', 'uploadPath': 'register/specialist/Statement/'
},
image: []
},
statement: {
url: iHost.uploadFile,
params: {
'uploadPath': 'register/specialist/Statement/' 'uploadPath': 'register/specialist/Statement/'
}, },
image: [] image: []
...@@ -209,7 +238,6 @@ ...@@ -209,7 +238,6 @@
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