main
bibi 3 years ago
parent 28c9dab751
commit 54c34fba28

@ -1,3 +1,3 @@
NODE_ENV = 'development'
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'
VUE_APP_URL = 'http://121.41.26.225:8004/'
VUE_APP_STATIC = 'http://121.41.26.225:8004/'
VUE_APP_URL = 'https://saas.kaidalai.cn/api/'
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.config.productionTip = false
import commonTable from './components/table'
// 注册组件
Vue.component('commonTable', commonTable)
new Vue({
render: h => h(App),
router,

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

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

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

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

@ -1,6 +1,8 @@
import store from '@/store'
export default {
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) => {
return process.env.VUE_APP_STATIC + src
}

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

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

Loading…
Cancel
Save