|
@@ -36,7 +36,7 @@
|
|
<el-upload
|
|
<el-upload
|
|
v-if="item.name == 'thumbnail'"
|
|
v-if="item.name == 'thumbnail'"
|
|
class="avatar-uploader avatar"
|
|
class="avatar-uploader avatar"
|
|
- action="/tyylfiles/upload"
|
|
|
|
|
|
+ action="/filesPath/medical/upload"
|
|
:show-file-list="false"
|
|
:show-file-list="false"
|
|
:on-success="handleAvatarSuccess"
|
|
:on-success="handleAvatarSuccess"
|
|
:before-upload="beforeAvatarUpload"
|
|
:before-upload="beforeAvatarUpload"
|
|
@@ -59,9 +59,9 @@
|
|
import nafGrid from '@naf/data/tables/naf-grid'
|
|
import nafGrid from '@naf/data/tables/naf-grid'
|
|
import nafForm from '@naf/data/form'
|
|
import nafForm from '@naf/data/form'
|
|
import editorBar from '@naf/data/editoritem'
|
|
import editorBar from '@naf/data/editoritem'
|
|
-import { createNamespacedHelpers } from 'vuex'
|
|
|
|
|
|
+import { createNamespacedHelpers, mapActions } from 'vuex'
|
|
const token = sessionStorage.getItem('token')
|
|
const token = sessionStorage.getItem('token')
|
|
-const { mapState, mapActions } = createNamespacedHelpers('hospital')
|
|
|
|
|
|
+const { mapState, mapActions: hospitalmapActions } = createNamespacedHelpers('hospital')
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
nafGrid,
|
|
nafGrid,
|
|
@@ -123,7 +123,8 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapActions(['hospitalquery', 'hospitalcreate', 'hospitalupdate', 'hospitaldelete', 'hospitaldetails']),
|
|
|
|
|
|
+ ...hospitalmapActions(['hospitalquery', 'hospitalcreate', 'hospitalupdate', 'hospitaldelete', 'hospitaldetails']),
|
|
|
|
+ ...mapActions(['init']),
|
|
// 点击树
|
|
// 点击树
|
|
treeClick (data) {
|
|
treeClick (data) {
|
|
this.is_title = data.name
|
|
this.is_title = data.name
|
|
@@ -224,14 +225,17 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async mounted () {
|
|
async mounted () {
|
|
- // 获取字典
|
|
|
|
- this.region = this.$dict('region')
|
|
|
|
- // eslint-disable-next-line eqeqeq
|
|
|
|
- if (this.region.length > 0) {
|
|
|
|
- this.is_title = this.region[0].name
|
|
|
|
- this.$refs.deeptree.setCurrentKey(this.region[0].code)
|
|
|
|
- this.data = this.region[0]
|
|
|
|
- this.query()
|
|
|
|
|
|
+ const res = await this.init('region')
|
|
|
|
+ if (res.errcode === 0) {
|
|
|
|
+ // 获取字典
|
|
|
|
+ this.region = await this.$dict('region')
|
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
|
+ if (this.region && this.region.length > 0) {
|
|
|
|
+ this.is_title = this.region[0].name
|
|
|
|
+ this.$refs.deeptree.setCurrentKey(this.region[0].code)
|
|
|
|
+ this.data = this.region[0]
|
|
|
|
+ this.query()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|