Browse Source

格式化代码;消除全局变量报错

feature/yujt_analysis_pc
yujt 5 years ago
parent
commit
fdb03638d4
  1. 100
      src/views/modules/activity/group-add-or-update.vue
  2. 1
      src/views/modules/activity/map-select.vue
  3. 20
      src/views/modules/section/sectioncategory.vue

100
src/views/modules/activity/group-add-or-update.vue

@ -55,7 +55,7 @@
<script>
import debounce from 'lodash/debounce'
import Cookies from "js-cookie";
import Cookies from 'js-cookie'
export default {
data () {
return {
@ -86,10 +86,10 @@ export default {
categoryCode: '',
typeKey: ''
},
categoryOptions: [],
options: [],
loading: false,
uploadUrl: ''
categoryOptions: [],
options: [],
loading: false,
uploadUrl: ''
}
},
computed: {
@ -167,16 +167,16 @@ export default {
}
}
},
created () {
this.$nextTick(() => {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
})
},
created () {
this.$nextTick(() => {
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
})
},
methods: {
init () {
//
this.getByLoginUser()
this.getOptions()
//
this.getByLoginUser()
this.getOptions()
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
@ -197,45 +197,45 @@ export default {
}
}).catch(() => {})
},
//
getByLoginUser () {
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.loading = false
this.options = res.data.options
})
.catch(() => {
this.loading = false
})
},
getOptions () {
this.$http
.get(`/property/sectioncategory/list`, { params: { sectionCode: 'interest_group' } }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.categoryOptions = res.data
console.log(this.categoryOptions)
})
.catch(() => { })
},
deptHandleChange (value) {
this.dataForm.deptId = value.slice(-1).shift()
},
handleAvatarActSuccess (res, file) {
//
getByLoginUser () {
this.$http
.get(`/sys/user/deptOptions/getByLoginUser`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.loading = false
this.dataForm.groupAvatar = res.data.url
},
beforeAvatarUpload (file) {
this.loading = true
},
handelError () {
this.options = res.data.options
})
.catch(() => {
this.loading = false
},
})
},
getOptions () {
this.$http
.get(`/property/sectioncategory/list`, { params: { sectionCode: 'interest_group' } }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.categoryOptions = res.data
console.log(this.categoryOptions)
})
.catch(() => { })
},
deptHandleChange (value) {
this.dataForm.deptId = value.slice(-1).shift()
},
handleAvatarActSuccess (res, file) {
this.loading = false
this.dataForm.groupAvatar = res.data.url
},
beforeAvatarUpload (file) {
this.loading = true
},
handelError () {
this.loading = false
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {

1
src/views/modules/activity/map-select.vue

@ -69,6 +69,7 @@ export default {
})
},
getMyLocation () {
/* global qq */
var geolocation = new qq.maps.Geolocation(
'MQFBZ-LTWW6-R7XSK-MFXUQ-DVSIE-BGB4M',
'e家党群-管理端'

20
src/views/modules/section/sectioncategory.vue

@ -77,20 +77,20 @@ export default {
AddOrUpdate
},
mounted () {
this.getOptions();
this.getsectionCodeList();
this.getOptions()
this.getsectionCodeList()
},
methods: {
getsectionCodeList () {
this.$http.get(`/sys/dict/listSimple/function_section`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.sectionCodeList = res.data
console.log(this.sectionCodeList)
})
.catch(() => {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.sectionCodeList = res.data
console.log(this.sectionCodeList)
})
.catch(() => {})
},
getOptions () {
this.$http.get('/sys/dict/listSimple/function_setcion').then(({ data: res }) => {

Loading…
Cancel
Save