|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div id="spdAdd">
|
|
<div id="spdAdd">
|
|
<div style="padding:0 0 30px 10px;" v-if="!control">
|
|
<div style="padding:0 0 30px 10px;" v-if="!control">
|
|
- <span>新增问题</span>
|
|
|
|
|
|
+ <!-- <span>新增问题</span> -->
|
|
<el-form :model="basicForm" :rules="basicRules" ref="basic" label-position="left" label-width="auto">
|
|
<el-form :model="basicForm" :rules="basicRules" ref="basic" label-position="left" label-width="auto">
|
|
<el-row :gutter="10">
|
|
<el-row :gutter="10">
|
|
<el-col :span="23">
|
|
<el-col :span="23">
|
|
@@ -137,17 +137,25 @@ export default {
|
|
},
|
|
},
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ let phonenumber = this.GetQueryString('phonenumber')
|
|
|
|
+ let hosName = this.GetQueryString('hosName')
|
|
|
|
+ let officeName = this.GetQueryString('officeName')
|
|
|
|
+ if(phonenumber && phonenumber != 'undefined') { this.basicForm.contactInfo = phonenumber }
|
|
|
|
+ if(hosName && hosName != 'undefined') { this.basicForm.hospital = hosName }
|
|
|
|
+ if(officeName && officeName != 'undefined') { this.basicForm.department = officeName }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
successUpload(resp, file, fileList) {
|
|
successUpload(resp, file, fileList) {
|
|
console.log(fileList)
|
|
console.log(fileList)
|
|
this.basicForm.problemPicture = fileList.map((item) => {
|
|
this.basicForm.problemPicture = fileList.map((item) => {
|
|
- return item.url
|
|
|
|
|
|
+ return item.response.id
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleRemove(file, fileList) {
|
|
handleRemove(file, fileList) {
|
|
console.log(fileList)
|
|
console.log(fileList)
|
|
this.basicForm.problemPicture = fileList.map((item) => {
|
|
this.basicForm.problemPicture = fileList.map((item) => {
|
|
- return item.url
|
|
|
|
|
|
+ return item.response.id
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handlePictureCardPreview(file) {
|
|
handlePictureCardPreview(file) {
|
|
@@ -205,6 +213,12 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //获取url参数
|
|
|
|
+ GetQueryString(name) {
|
|
|
|
+ var reg = new RegExp( "(^|&)" + name + "=([^&]*)(&|$)()" );
|
|
|
|
+ var r = window.location.search.substr(1).match(reg);
|
|
|
|
+ if (r!= null ) return decodeURI(r[2]); return null ;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|