Commit 90e1db50 by 严立

修复问题

parent f5081806
......@@ -2346,6 +2346,25 @@
"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": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz",
......
......@@ -22,6 +22,7 @@
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
......
let output = {
// 开发路径
// base: 'http://bid-server.meiqicloud.com/',
// resources: 'http://bid-web.meiqicloud.com/',
// agentSignIn: 'http://bid-vue.meiqicloud.com/'
base: 'http://bid-server.meiqicloud.com/',
resources: 'http://bid-web.meiqicloud.com/',
agentSignIn: 'http://bid-vue.meiqicloud.com/'
// 正式路径
base: '/Api/',
resources: 'http://bid-web.meiqicloud.com',
agentSignIn: 'http://bid-vue.meiqicloud.com/'
// base: '/Api/',
// resources: 'http://bid-web.meiqicloud.com',
// agentSignIn: 'http://bid-vue.meiqicloud.com/'
}
output.uploadFile = output.base + 'bid/common/webupload/upload'
......
......@@ -52,7 +52,6 @@ let output = {
let funStatus = funcXMLHttpRequest.status
if ((funStatus >= 200 && funStatus < 300) || funStatus === 304) {
try {
let funcInterceptorsResponse = iInterceptors.response(funcConfigure, funcXMLHttpRequest.responseText)
if (funcInterceptorsResponse.state) {
funcResolve(funcInterceptorsResponse.response)
......@@ -67,6 +66,8 @@ let output = {
funcReject(funcResponse.response)
}
}
}).catch((funcError) => {
console.log('catch', funcError)
})
return funcPromise
}
......@@ -108,18 +109,12 @@ let output = {
funcReject(funcResponse.response)
}
}
}).catch((funcError) => {
console.log('catch', funcError)
})
return funcPromise
}
},
get: function () {
},
post: function () {
},
}
export default output
\ No newline at end of file
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import store from './store/store.js'
......@@ -24,6 +25,5 @@ let output = new Vue({
'components': { App },
'template': '<App/>'
})
window.Promise = Promise
export default output
\ No newline at end of file
import 'babel-polyfill'
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
......
......@@ -322,6 +322,7 @@
}
this.listBanner = funcList
})
.catch((funcError) => {})
},
queryData: function () {
let funcParam = {
......
......@@ -437,7 +437,14 @@
onUploadChange: function (funcType, funcFile, funcFileList) {
if (funcFile.status === 'ready') {
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.uploadOption[funcType].image.push(funcFile)
} else {
......
......@@ -292,7 +292,6 @@
official: {
url: iHost.uploadFile,
params: {
'file': '',
'uploadPath': 'register/specialist/Statement/'
},
image: []
......@@ -300,7 +299,6 @@
statement: {
url: iHost.uploadFile,
params: {
'file': '',
'uploadPath': 'register/specialist/Statement/'
},
image: []
......@@ -308,7 +306,6 @@
skill: {
url: iHost.uploadFile,
params: {
'file': '',
'uploadPath': 'register/specialist/skill/'
},
image: []
......@@ -316,7 +313,6 @@
education: {
url: iHost.uploadFile,
params: {
'file': '',
'uploadPath': 'register/specialist/education/'
},
image: []
......@@ -421,7 +417,7 @@
* @returns
*/
reset: function () {
this.state = 1
this.state = 3
this.formRegister = {
// 基础信息
name: '',
......@@ -454,7 +450,7 @@
// 重置区域选择数据
this.$store.commit('areaSelection', [])
this.$store.commit('componentSkill', [])
this.$store.commit('componentSkillData', {})
this.$store.commit('componentSkillData', [])
},
......@@ -698,7 +694,6 @@
// 职称上传
case 3:
console.log(this.formRegister)
this.$refs.formSkill.validate(funcValid => {
if (funcValid) {
if (this.uploadOption.skill.image.length > 0) {
......@@ -779,7 +774,7 @@
onSkillInsert: function () {
if (this.skillQuantity < 5) this.skillQuantity = this.skillQuantity + 1
let funcComponentSkill = this.$store.getters.componentSkill
funcComponentSkill.push([])
funcComponentSkill.push([0, 0, 0, 0, 0])
this.$store.commit('componentSkill', funcComponentSkill)
},
......@@ -858,7 +853,14 @@
onUploadChange: function (funcType, funcFile, funcFileList) {
if (funcFile.status === 'ready') {
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.uploadOption[funcType].image.push(funcFile)
} else {
......
......@@ -64,6 +64,7 @@
:action="uploadOption.license.url"
:data="uploadOption.license.params"
:on-preview="onUploadPreviewFile"
:before-upload="(file) => { ononUploadBefore('license', file) }"
:on-remove="(file, fileList) => { onUploadRemove('license', file, fileList) }"
:on-change="(file, fileList) => { onUploadChange('license', file, fileList) }"
:on-success="(respons, file, fileList) => { onUploadSuccess('license', respons, file, fileList) }"
......@@ -840,9 +841,17 @@
* @returns
*/
onUploadChange: function (funcType, funcFile, funcFileList) {
console.log(funcFile)
if (funcFile.status === 'ready') {
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.uploadOption[funcType].image.push(funcFile)
} else {
......
......@@ -66,6 +66,29 @@
</div>
</el-upload>
</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-radio-group v-model="formRegister.education">
<el-radio label="1">专科</el-radio>
......@@ -201,15 +224,20 @@
official: {
url: iHost.uploadFile,
params: {
'file': '',
'uploadPath': 'register/specialist/Statement/'
},
image: []
},
statement: {
url: iHost.uploadFile,
params: {
'uploadPath': 'register/specialist/Statement/'
},
image: []
},
skill: {
url: iHost.uploadFile,
params: {
'file': '',
'uploadPath': 'register/specialist/skill/'
},
image: []
......@@ -217,7 +245,6 @@
education: {
url: iHost.uploadFile,
params: {
'file': '',
'uploadPath': 'register/specialist/education/'
},
image: []
......@@ -252,16 +279,17 @@
{ required: true, message: '请选择', trigger: 'blur' }
],
officialImage: [
{ required: true, message: '请上传上传政府专家证明资料', trigger: 'blur' }
{ required: true, message: '请上传政府专家证明资料', trigger: 'blur' }
],
statement: [
{ required: true, message: '请上传入库声明', trigger: 'blur' }
],
skillSelect: [
{ required: true, message: '请选择评审专业', trigger: 'blur' }
],
skillImage: [
{ required: true, message: '请上传上传职称证书', trigger: 'blur' }
{ required: true, message: '请上传职称证书', trigger: 'blur' }
],
education: [
{ required: true, message: '请选择最高学历', trigger: 'blur' }
],
......@@ -416,6 +444,7 @@
company: '',
isOfficial: '0',
officialImage: '',
statementImage: '',
// 职称信息
skillSelect: '',
......@@ -649,7 +678,14 @@
onUploadChange: function (funcType, funcFile, funcFileList) {
if (funcFile.status === 'ready') {
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.uploadOption[funcType].image.push(funcFile)
} 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