main
bibi 3 years ago
parent 28c9dab751
commit 54c34fba28

@ -1,3 +1,3 @@
NODE_ENV = 'development' NODE_ENV = 'development'
VUE_APP_URL = 'http://121.41.26.225:8004/' VUE_APP_URL = 'http://121.41.26.225:8004/'
VUE_APP_STATIC = 'http://121.41.26.225:8004/' VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/'

@ -1,3 +1,3 @@
NODE_ENV = 'production' NODE_ENV = 'production'
VUE_APP_URL = 'http://121.41.26.225:8004/' VUE_APP_URL = 'https://saas.kaidalai.cn/api/'
VUE_APP_STATIC = 'http://121.41.26.225:8004/' VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/'

@ -18,9 +18,9 @@ const communityCode = store.getters.getCommunityCode;
Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage' Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage'
Vue.config.productionTip = false Vue.config.productionTip = false
import commonTable from './components/table' import commonTable from './components/table'
// 注册组件 // 注册组件
Vue.component('commonTable', commonTable) Vue.component('commonTable', commonTable)
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
router, router,

@ -12,10 +12,10 @@ export default {
install(Vue) { install(Vue) {
Vue.mixin({ Vue.mixin({
computed: { computed: {
...mapGetters(['getToken','getSelectedKeys', 'getOpenKeys']) ...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys'])
}, },
methods: { methods: {
...mapActions(['setToken','setSelectedKeys', 'setOpenKeys']) ...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys'])
} }
}) })
} }

@ -11,7 +11,7 @@ const actions = {
commit('setToken', log) commit('setToken', log)
}, },
setCommunityCode: ({commit}, log) => { setCommunityCode: ({commit}, log) => {
commit('communityCode', log) commit('setCommunityCode', log)
}, },
setSelectedKeys: ({commit}, log) => { setSelectedKeys: ({commit}, log) => {
commit('setSelectedKeys', log) commit('setSelectedKeys', log)

@ -22,7 +22,7 @@ const mutations = {
sessionStorage.setItem('token', log); sessionStorage.setItem('token', log);
}, },
setCommunityCode: (state, log) => { setCommunityCode: (state, log) => {
state.token = log; state.communityCode = log;
sessionStorage.setItem('communityCode', log); sessionStorage.setItem('communityCode', log);
}, },
} }

@ -10,6 +10,6 @@ const state = {
selectedKeys: JSON.parse(sessionStorage.getItem('selectedKeys')) || ['/'], selectedKeys: JSON.parse(sessionStorage.getItem('selectedKeys')) || ['/'],
openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [], openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [],
token: sessionStorage.getItem('token') || "", token: sessionStorage.getItem('token') || "",
communityCode: sessionStorage.getItem('communityCode') || "123456", communityCode: sessionStorage.getItem('communityCode') || "",
} }
export default state export default state

@ -1,6 +1,8 @@
import store from '@/store'
export default { export default {
install: function (Vue) { install: function (Vue) {
Vue.prototype.$upload = process.env.VUE_APP_URL + '123456/manage/user/upload/uploadTestMinioImg' const communityCode = store.getters.getCommunityCode;
Vue.prototype.$upload = process.env.VUE_APP_URL + communityCode +'/manage/user/upload/uploadTestMinioImg'
Vue.prototype.ImgUrl = (src) => { Vue.prototype.ImgUrl = (src) => {
return process.env.VUE_APP_STATIC + src return process.env.VUE_APP_STATIC + src
} }

@ -246,7 +246,6 @@ export default {
this.form.password = data.password this.form.password = data.password
this.form.email = data.email this.form.email = data.email
this.form.address = data.address this.form.address = data.address
this.form.idCardImgUrls = data.idCardImgUrls
this.form.entryDate = data.entryDate this.form.entryDate = data.entryDate
this.form.salary = data.salary this.form.salary = data.salary
this.form.emergencyContact = data.emergencyContact this.form.emergencyContact = data.emergencyContact
@ -267,6 +266,7 @@ export default {
this.cascVal.push(Number(element)) this.cascVal.push(Number(element))
}); });
// //
this.form.idCardImgUrls = data.idCardImgUrls || []
}) })
}, },
immediate: true, immediate: true,
@ -370,6 +370,7 @@ export default {
if(this.form.tel === this.telephoneNum){ if(this.form.tel === this.telephoneNum){
this.form.tel = null this.form.tel = null
} }
console.log(this.form);
EditManageUser(this.form).then((res) => { EditManageUser(this.form).then((res) => {
if(res.code===200){ if(res.code===200){
this.$message.success(res.msg) this.$message.success(res.msg)

@ -228,8 +228,9 @@ export default {
}, },
}; };
}, },
created() { mounted() {
this.keyupEnter(); this.keyupEnter();
this.setCommunityCode(123456);
}, },
methods: { methods: {
// enter // enter
@ -247,9 +248,6 @@ export default {
this.$message.success(res.msg); this.$message.success(res.msg);
// token // token
this.setToken(res.data); this.setToken(res.data);
//
this.setCommunityCode(123456)
// this.setCommunityCode(res.communityCode)
this.$router.push("/"); this.$router.push("/");
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);

Loading…
Cancel
Save