|
@@ -20,12 +20,7 @@
|
|
|
placeholder="所在机构"
|
|
|
@change="onDoctorClubChange"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in clubList"
|
|
|
- :key="item.authId"
|
|
|
- :label="item.authParty"
|
|
|
- :value="item.authId"
|
|
|
- />
|
|
|
+ <el-option v-for="item in clubList" :key="item.authId" :label="item.authParty" :value="item.authId" />
|
|
|
</el-select>
|
|
|
<el-input v-show="false" v-model="formData.clubName" />
|
|
|
</el-form-item>
|
|
@@ -58,7 +53,9 @@
|
|
|
<el-button type="primary" @click="addTag">添加</el-button>
|
|
|
</div>
|
|
|
<div class="tag-list">
|
|
|
- <el-tag v-for="(item,index) in addTagList" :key="index" closable @close="onTagClose(index)">{{ item }}</el-tag>
|
|
|
+ <el-tag v-for="(item, index) in addTagList" :key="index" closable @close="onTagClose(index)">{{
|
|
|
+ item
|
|
|
+ }}</el-tag>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -70,7 +67,6 @@
|
|
|
<el-input v-show="false" v-model="formData.equipment" />
|
|
|
<device-section v-if="!isRequest" ref="subForm" :list="deviceList" @change="deviceListDataChange" />
|
|
|
</el-form-item>
|
|
|
-
|
|
|
</el-form>
|
|
|
<div class="submit-btn">
|
|
|
<el-button type="primary" @click="submit">保存</el-button>
|
|
@@ -109,7 +105,7 @@ export default {
|
|
|
point: {},
|
|
|
disabled: false,
|
|
|
formData: {
|
|
|
- authId: '',
|
|
|
+ authId: -1,
|
|
|
doctorType: 1,
|
|
|
doctorName: '',
|
|
|
certificateNo: '',
|
|
@@ -175,7 +171,6 @@ export default {
|
|
|
this.initFormData()
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
// 添加标签
|
|
|
addTag() {
|
|
|
this.addTagList.push(this.tagName.trim())
|
|
@@ -216,7 +211,7 @@ export default {
|
|
|
this.isRequest = false
|
|
|
return
|
|
|
}
|
|
|
- doctorFormData({ doctorId: this.doctorId }).then(res => {
|
|
|
+ doctorFormData({ doctorId: this.doctorId }).then((res) => {
|
|
|
this.setFormData(res.data)
|
|
|
})
|
|
|
},
|
|
@@ -227,12 +222,12 @@ export default {
|
|
|
this.formData.certificateNo = data.certificateNo
|
|
|
this.formData.clubName = data.clubName
|
|
|
this.formData.doctorImage = data.doctorImage
|
|
|
- this.formData.authId = data.authId
|
|
|
+ this.formData.authId = data.authId || -1
|
|
|
|
|
|
this.formData.banner = data.bannerList.length
|
|
|
this.formData.equipmentList = data.equipmentList.length
|
|
|
this.doctorImageList.push({ url: data.doctorImage, name: 'doctor' })
|
|
|
- this.bannerList = data.bannerList.map(item => ({ url: item, name: '' }))
|
|
|
+ this.bannerList = data.bannerList.map((item) => ({ url: item, name: '' }))
|
|
|
this.deviceList = data.equipmentList
|
|
|
this.paramList = data.paramList
|
|
|
this.addTagList = data.tagList
|
|
@@ -252,7 +247,7 @@ export default {
|
|
|
this.$refs.subForm.valideAllForm(),
|
|
|
this.$refs.submitForm.validate(),
|
|
|
this.$refs.customItems.valideAllForm()
|
|
|
- ]).then(res => {
|
|
|
+ ]).then((res) => {
|
|
|
this.save()
|
|
|
})
|
|
|
},
|
|
@@ -276,9 +271,13 @@ export default {
|
|
|
|
|
|
console.log(this.formData)
|
|
|
|
|
|
- data.bannerList = this.bannerList.map(item => item.response ? item.response.data : item.url)
|
|
|
- data.equipmentList = this.deviceList.map(item => ({ equipmentName: item.equipmentName, brand: item.brand, image: item.image }))
|
|
|
- doctorSave(data).then(res => {
|
|
|
+ data.bannerList = this.bannerList.map((item) => (item.response ? item.response.data : item.url))
|
|
|
+ data.equipmentList = this.deviceList.map((item) => ({
|
|
|
+ equipmentName: item.equipmentName,
|
|
|
+ brand: item.brand,
|
|
|
+ image: item.image
|
|
|
+ }))
|
|
|
+ doctorSave(data).then((res) => {
|
|
|
this.$message.success('保存成功')
|
|
|
this.$store.dispatch('tagsView/delView', this.$route)
|
|
|
this.$router.push('/personnel/operate/list')
|
|
@@ -333,7 +332,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.doctor-edit{
|
|
|
+.doctor-edit {
|
|
|
margin-bottom: 80px;
|
|
|
}
|
|
|
|
|
@@ -349,18 +348,21 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.tag-control{
|
|
|
+.tag-control {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- .el-input{
|
|
|
+ .el-input {
|
|
|
flex: 1;
|
|
|
margin-right: 16px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.tag-list{
|
|
|
- padding-top: 8px;
|
|
|
-}
|
|
|
+.tag-list {
|
|
|
+ padding-top: 8px;
|
|
|
|
|
|
+ .el-tag{
|
|
|
+ margin-right: 6px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|