|
|
@@ -35,7 +35,7 @@
|
|
|
<!--<span v-if="!isModifyMode">{{agency.address}}</span>-->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="测评机构能力" prop="name">
|
|
|
- <el-checkbox-group v-if="isModifyMode" v-model="agency.ability">
|
|
|
+ <el-checkbox-group v-if="isModifyMode" v-model="agency.evaluationAgencyAbilityList">
|
|
|
<span v-for="(item,index) in serviceTypes" :key="index">
|
|
|
<el-checkbox :label="item" name="type">{{item}} </el-checkbox>
|
|
|
</span>
|
|
|
@@ -43,7 +43,7 @@
|
|
|
<!--<span v-if="!isModifyMode">{{agency.ability}}</span>-->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="测评机构资源" prop="name">
|
|
|
- <span v-for="item in agency.resource" :key="item.id">
|
|
|
+ <span v-for="item in agency.evaluationAgencyResourceList" :key="item.id">
|
|
|
资源类型: <el-select v-model="item.type" placeholder="请选择" style="width: 150px;margin-bottom: 10px" :value="item.type">
|
|
|
<el-option
|
|
|
v-for="item in resourceTypes"
|
|
|
@@ -194,8 +194,8 @@ export default {
|
|
|
name: '',
|
|
|
bankAccount: '',
|
|
|
address: '',
|
|
|
- ability: [],
|
|
|
- resource: [
|
|
|
+ evaluationAgencyAbilityList: [],
|
|
|
+ evaluationAgencyResourceList: [
|
|
|
{
|
|
|
id: 0,
|
|
|
type: '',
|
|
|
@@ -280,21 +280,21 @@ export default {
|
|
|
evaluationAgencyName: this.agency.name,
|
|
|
bankAccount: this.agency.bankAccount,
|
|
|
address: this.agency.address,
|
|
|
- abilities: this.agency.ability,
|
|
|
- resources: this.agency.resource,
|
|
|
+ evaluationAgencyAbilityList: this.agency.evaluationAgencyAbilityList,
|
|
|
+ evaluationAgencyResourceList: this.agency.evaluationAgencyResourceList,
|
|
|
agencyPhoto: this.agency.photoUrl,
|
|
|
email: this.agency.email
|
|
|
}
|
|
|
Http.post(Apis.USER.ADD_AGENCY, newAgency).then((res) => {
|
|
|
- // console.log(res)
|
|
|
+ console.log(res)
|
|
|
// console.log(res.data)
|
|
|
res = res.data
|
|
|
this.agency.password = res.userVO.password
|
|
|
this.agency.username = res.userVO.userName
|
|
|
- this.agency.mobile = res.userVO.mobileNum
|
|
|
+ this.agency.mobile = res.userVO.mobile
|
|
|
this.showDialog()
|
|
|
}).catch(error => {
|
|
|
- notify('error', error.data.msg)
|
|
|
+ notify('error', error.data)
|
|
|
})
|
|
|
},
|
|
|
//取消修改表单,表单进入不可编辑状态,不再使用
|
|
|
@@ -315,7 +315,7 @@ export default {
|
|
|
},
|
|
|
//移除文件前的响应函数
|
|
|
beforeRemove (file, fileList) {
|
|
|
- return this.$confirm(`确定移除 ${file.name}?`)
|
|
|
+ //return this.$confirm(`确定移除 ${file.name}?`)
|
|
|
},
|
|
|
//文件上传前的响应函数
|
|
|
beforeFileUpload () {
|
|
|
@@ -328,14 +328,13 @@ export default {
|
|
|
headers: {'Content-Type': 'multipart/form-data'},
|
|
|
}
|
|
|
formData.append('file', param.file)
|
|
|
+ //console.log(JSON.parse(this.user).userVO)
|
|
|
Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
this.agency.photoUrl = res.data
|
|
|
console.log(res.data)
|
|
|
notify('success', '上传成功')
|
|
|
- sessionStorage.setItem('file', 'qweqewqweqweqweqew')
|
|
|
- sessionStorage.getItem('file')
|
|
|
}).catch(error => {
|
|
|
- notify('error', error.data.msg)
|
|
|
+ notify('error', error.data)
|
|
|
})
|
|
|
},
|
|
|
//关闭对话框时的响应函数
|
|
|
@@ -373,8 +372,8 @@ export default {
|
|
|
name: '',
|
|
|
bankAccount: '',
|
|
|
address: '',
|
|
|
- ability: '',
|
|
|
- resource: '',
|
|
|
+ evaluationAgencyAbilityList: '',
|
|
|
+ evaluationAgencyResourceList: '',
|
|
|
photo: [],
|
|
|
photoUrl: '',
|
|
|
password: '',
|
|
|
@@ -388,19 +387,19 @@ export default {
|
|
|
//添加一项测评机构资源
|
|
|
addAgencyResource () {
|
|
|
const tmpResource = {
|
|
|
- id: this.agency.resource.length,
|
|
|
+ id: this.agency.evaluationAgencyResourceList.length,
|
|
|
type: this.resourceTypes[0],
|
|
|
name: '',
|
|
|
totalNum: 0,
|
|
|
availableNum: 0,
|
|
|
}
|
|
|
- this.agency.resource.push(tmpResource)
|
|
|
+ this.agency.evaluationAgencyResourceList.push(tmpResource)
|
|
|
},
|
|
|
//删除一项测评机构资源
|
|
|
removeAgencyResource (id) {
|
|
|
- this.agency.resource.splice(id, 1)
|
|
|
- for (var i = 0; i < this.agency.resource.length; i++) {
|
|
|
- this.agency.resource[i].id = i
|
|
|
+ this.agency.evaluationAgencyResourceList.splice(id, 1)
|
|
|
+ for (var i = 0; i < this.agency.evaluationAgencyResourceList.length; i++) {
|
|
|
+ this.agency.evaluationAgencyResourceList[i].id = i
|
|
|
}
|
|
|
},
|
|
|
//设置测评机构资源类型
|
|
|
@@ -409,11 +408,11 @@ export default {
|
|
|
},
|
|
|
//检测测评机构资源填写是否有效
|
|
|
checkAgencyResourceVaild () {
|
|
|
- if (this.agency.resource.length === 0) {
|
|
|
+ if (this.agency.evaluationAgencyResourceList.length === 0) {
|
|
|
return true
|
|
|
}
|
|
|
- for (var i = 0; i < this.agency.resource.length; i++) {
|
|
|
- const item = this.agency.resource[i]
|
|
|
+ for (var i = 0; i < this.agency.evaluationAgencyResourceList.length; i++) {
|
|
|
+ const item = this.agency.evaluationAgencyResourceList[i]
|
|
|
if (item.type === '') {
|
|
|
notify('error', '资源类型不能为空')
|
|
|
return false
|