communityCode

dev
bibi 3 years ago
parent 18083f5080
commit 28c9dab751

@ -12,6 +12,7 @@
"core-js": "^3.6.5",
"less": "^4.1.2",
"less-loader": "5.0.0",
"momen": "^0.0.1-security",
"nprogress": "^0.2.0",
"vue": "^2.6.11",
"vue-router": "^3.5.3",

@ -28,7 +28,7 @@
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1300 }"
:scroll="{ x: 1400 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,

@ -1,16 +1,9 @@
/*
* @Author: your name
* @Date: 2021-11-18 17:15:53
* @LastEditTime: 2021-11-22 15:40:15
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /ansu-business/src/main.js
*/
import Vue from 'vue'
import App from './App.vue'
import './styles/index.less';
import mixins from "@/mixins"
import Antd from 'ant-design-vue';
// import moment from 'moment';
import util from '@/utils/util.js'
import 'ant-design-vue/dist/antd.css';
@ -19,7 +12,10 @@ Vue.use(Antd);
Vue.use(mixins);
import store from "@/store";
import router from "@/permission";
Vue.prototype.$baseUrl = process.env.VUE_APP_URL + '123456/manage'
// Vue.prototype.$moment = moment
const communityCode = store.getters.getCommunityCode;
Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage'
Vue.config.productionTip = false
import commonTable from './components/table'

@ -24,8 +24,9 @@ function filterRequestData(obj) {
return o;
}
//创建axios的实例
const communityCode = store.getters.getCommunityCode;
const httpService = axios.create({
baseURL: process.env.VUE_APP_URL+'123456/manage',// TODO:具体的配置可以根据项目情况而来
baseURL: process.env.VUE_APP_URL+ communityCode +'/manage',// TODO:具体的配置可以根据项目情况而来
timeout: 5000
})

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

@ -16,6 +16,9 @@ const getters = {
getToken(state) {
return state.token
},
getCommunityCode(state) {
return state.communityCode
},
}
export default getters

@ -21,6 +21,10 @@ const mutations = {
state.token = log;
sessionStorage.setItem('token', log);
},
setCommunityCode: (state, log) => {
state.token = log;
sessionStorage.setItem('communityCode', log);
},
}
export default mutations

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

@ -1,6 +1,6 @@
export default {
install: function (Vue) {
Vue.prototype.$upload = process.env.VUE_APP_URL + 'user/upload/uploadTestMinioImg'
Vue.prototype.$upload = process.env.VUE_APP_URL + '123456/manage/user/upload/uploadTestMinioImg'
Vue.prototype.ImgUrl = (src) => {
return process.env.VUE_APP_STATIC + src
}

@ -45,7 +45,7 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="出生日期" prop="birthday">
<a-date-picker v-model="form.birthday" />
<a-date-picker v-model="form.birthday" value-format="YYYY-MM-DD HH:mm:ss"/>
</a-form-model-item>
</a-col>
<a-col :span="12">

@ -45,7 +45,7 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="出生日期" prop="birthday">
<a-date-picker v-model="form.birthday" />
<a-date-picker v-model="form.birthday" value-format="YYYY-MM-DD HH:mm:ss"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -72,15 +72,19 @@
:action="`${$upload}`"
:headers="uploadHeaders"
list-type="picture-card"
:file-list="fileList"
:file-list="idcardfileList"
@preview="handlePreview"
@change="handleChange"
@change="idcardhandleChange"
>
<div v-if="fileList.length < 2">
<a-icon type="plus" />
<div v-if="idcardfileList.length < 2">
<!-- <a-icon type="plus" /> -->
<a-icon :type="imgLoading ? 'loading' : 'plus'" />
<div class="ant-upload-text">点击上传</div>
</div>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
<span style="color: #00000073"
>单张最多不超过4M最多上传2张支持JPG,PNG格式</span
>
@ -162,7 +166,7 @@
</a-form-model-item>
</a-col>
</a-row>
<div @click="u1pload"></div>
<div>其他信</div>
<a-divider></a-divider>
<a-row>
<a-col :span="12">
@ -205,7 +209,7 @@
</template>
<script>
import { insertManageUser,departmentList,uploadManageUserIdCard,manageUserInfo,EditManageUser } from "@/api/basic/department";
import { insertManageUser,departmentList,manageUserInfo,EditManageUser } from "@/api/basic/department";
import store from "@/store";
function getBase64(file) {
return new Promise((resolve, reject) => {
@ -238,12 +242,12 @@ export default {
this.form.idCard = data.idCard
this.form.tel = data.tel
this.telephoneNum = data.tel
// this.form.birthday = this.formatDate(data.birthday/1000,'yyyy-MM-dd hh:mm:ss')
this.form.birthday = data.birthday
this.form.password = data.password
this.form.email = data.email
this.form.address = data.address
this.form.idCardImgUrls = data.idCardImgUrls
// this.form.entryDate = this.formatDate(data.entryDate/1000,'yyyy-MM-dd hh:mm:ss')
this.form.entryDate = data.entryDate
this.form.salary = data.salary
this.form.emergencyContact = data.emergencyContact
this.form.emergencyContactNumber = data.emergencyContactNumber
@ -272,12 +276,12 @@ export default {
return {
previewVisible: false,
previewImage: "",
imgLoading: false,
treeData:[],
cascVal:[],
telephoneNum:"",
uploadHeaders: {
"manage-login-token": store.getters.getToken,
'Content-Type': 'multipart/form-data'
},
sexOption: [
{
@ -303,7 +307,7 @@ export default {
password: "",
email: "",
address: "",
idCardImgUrls: "",
idCardImgUrls: [],
departmentId: "",
departmentIdPath: "",
positionId: "",
@ -335,7 +339,8 @@ export default {
{ required: true, message: "请选择入职时间", trigger: "change" },
],
},
fileList: [],
idcardfileList: [],
fileList:[]
};
},
created() {
@ -378,7 +383,7 @@ export default {
//
close() {
this.$refs.ruleForm.resetFields();
this.cascVal=[]
this.cascVal = []
},
success(){
this.$emit('success')
@ -407,13 +412,13 @@ export default {
handleCancel() {
this.previewVisible = false;
},
handleChange({ fileList }) {
this.fileList = fileList;
},
u1pload(){
uploadManageUserIdCard().then((res) => {console.log(res);})
idcardhandleChange(info) {
this.idcardfileList = info.fileList
if(info.file.status === 'done'){
this.form.idCardImgUrls.push(info.file.response.data)
}
},
},
};
</script>

@ -54,7 +54,7 @@
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1300 }"
:scroll="{ x: 1400 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,

@ -48,7 +48,7 @@
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1300 }"
:scroll="{ x: 1400 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,

@ -45,7 +45,7 @@
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1300 }"
:scroll="{ x: 1400 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,

@ -73,7 +73,7 @@
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1300 }"
:scroll="{ x: 1400 }"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,

@ -18,7 +18,7 @@
<div v-for="(item,index) in menuTags" :key="index" :class="tagActive === index ? 'h-d1-item h-d1-item-active' : 'h-d1-item'" @click="handlerTags(index)"><span class="s1">{{item.label}}</span></div>
</div>
<div class="h-d2">
<a-icon class="h-d2-c" style="color: #e27473" type="logout" />
<a-icon class="h-d2-c" style="color: #e27473" type="logout" @click="logout"/>
<a-icon class="h-d2-c" style="color: #b7b7b7" type="question-circle" />
<a-icon class="h-d2-c" type="alert" />
<a-icon class="h-d2-c" style="color: #979a96;margin-right: 7px;" type="user" />
@ -99,6 +99,10 @@ export default {
handlerTags(n) {
this.tagActive = n;
sessionStorage.setItem('index',n)
},
logout(){
this.$router.push({name:'Login'})
this.setToken(null);
}
},
};

@ -245,7 +245,11 @@ export default {
loginTel(this.form).then(res=>{
if (res.code === 200) {
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);

15924
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save