diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 4ed5e05..d5f8164 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -428,4 +428,10 @@ li { } .el-switch__label span { font-size: 12px; +} +@media (max-width: 720px) { + .el-message { + min-width: auto !important; + width: 85%; + } } \ No newline at end of file diff --git a/src/assets/img/house.png b/src/assets/img/house.png new file mode 100644 index 0000000..ac85480 Binary files /dev/null and b/src/assets/img/house.png differ diff --git a/src/components/Header.vue b/src/components/Header.vue index 9b853c6..0a82600 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -27,10 +27,13 @@ export default { }, methods: { getUserInfo(){ - this.$get(this.api.queryUserInfoDetails).then(res => { - let userInfo = res.result.hrUserInfo + this.$get(this.api.queryUserInfoDetails).then(({ result }) => { + let userInfo = result.hrUserInfo if(userInfo.userAvatars) this.$store.commit('userAvatar',{avatar: userInfo.userAvatars}) this.userName = userInfo.userName + const { id } = result.userAccount + id && this.$store.commit('SET_ACCOUNTID', id) + this.$store.commit('SET_USERNAME', this.userName) }).catch(err => {}) }, toPerson(){ diff --git a/src/libs/util.js b/src/libs/util.js index 75b5864..c20b25a 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -131,6 +131,15 @@ const util = { errorMsg(message,duration = 1500) { return Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration}) }, + // 判断是否是移动端 + isMobile() { + if(window.navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) return true + return false + }, + // 前置加0 + preZero(num) { + return num > 9 ? num : `0${num}` + }, } export default util \ No newline at end of file diff --git a/src/setting.js b/src/setting.js index 4a9750d..70e8e90 100644 --- a/src/setting.js +++ b/src/setting.js @@ -9,8 +9,8 @@ let jumpPath = `${location.origin}/judgmentPoint` let host = `${location.origin}:9000/` if (isDev) { jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统 - host = 'http://39.108.250.202:9000/' - // host = 'http://192.168.31.151:9000/'// 榕 + // host = 'http://39.108.250.202:9000/' + host = 'http://192.168.31.151:9000/'// 榕 // host = 'http://192.168.31.137:9000/'// 赓 } else if (isPro) { jumpPath = "http://www.huorantech.cn/judgmentPoint/"; @@ -21,7 +21,7 @@ const Setting = { /** * 基础配置 * */ - platformId: 3, // 平台标识,1职站,2数据平台,3中台 + platformId: 3, // 平台标识,1职站,2数据平台,3中台,4合伙人 jumpPath, // 判分点系统跳转路径前缀 apiBaseURL: host, // 请求路径前缀 uploadURL: 'http://39.108.250.202:9000/', // 阿里云oss域名 diff --git a/src/store/index.js b/src/store/index.js index 7186e2b..6b8530e 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -7,6 +7,7 @@ const store = new Vuex.Store({ courseId:'', userId: '', roleId: '', + accountId: '', manager:{}, provinceList: [], configId: '', @@ -39,8 +40,11 @@ const store = new Vuex.Store({ userAvatar(state,payload){ state.avatar = payload.avatar }, - userData (state, payload) { - state.userId = payload.user_id + SET_ACCOUNTID (state, id) { + state.accountId = id + }, + SET_USERNAME (state, userName) { + state.userName = userName }, courseData (state, payload) { state.courseId = payload.course_id diff --git a/src/utils/api.js b/src/utils/api.js index 0da3504..a470b61 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -9,7 +9,7 @@ export default { logins: `users/users/user/login`, //登录 verification: `${host}users/users/user/captcha`,// 验证码图片 保留host bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机 - sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码 + sendPhoneOrEmailCode: `${host1}users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码 getUserRolesPermissionMenu: `users/user-role/getUserRolesPermissionMenu`, staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板 @@ -35,7 +35,7 @@ export default { addCustomer: `nakadai/nakadai/customer/addCustomer`, queryCustomer: `nakadai/nakadai/customer/queryCustomer`, queryCustomerDetails: `nakadai/nakadai/customer/queryCustomerDetails`, - saveOrUpdate: `data/data/role/saveOrUpdate`, + saveOrUpdate: `${host1}data/data/role/saveOrUpdate`, doAssign: `data/data/permission/doAssign`, updateCustomerByRoleId: `nakadai/nakadai/customer/updateCustomerByRoleId`, checkEmailOrPhone: `nakadai/nakadai/customer/checkEmailOrPhone`, // 新增客户前:校验手机号或者邮箱 @@ -51,6 +51,7 @@ export default { querySchoolData: `nakadai/nakadai/school/querySchool`, queryPhone: `liuwanr/user/queryPhone`, queryPlatform: `liuwanr/userInfo/queryPlatform`, + getAListOfClientBusinessManagers: `nakadai/nakadai/customer/getAListOfClientBusinessManagers`, // 用户管理 delUserAccounts: `users/users/userAccount/delUserAccounts`, @@ -238,13 +239,13 @@ export default { exportFailure: `${host}nakadai/backstageStaff/exportFailure`, // 角色管理 - batchRemove: `users/role/batchRemove`, //批量删除角色 - checkRoleIsExist: `users/role/checkRoleIsExist`, //判断该角色是否存在 - delRoleByAccountId: `users/role/delRoleByAccountId`, //删除某用户下的某个角色 - roleList: `users/role/list`, //角色分页列表查询 - obtainDetails: `users/role/obtainDetails`, //获取角色详情 - saveOrUpdate: `users/role/saveOrUpdate`, //新增或更新角色 - queryAllMenus: `users/users/permission/queryAllMenus`, //查询所有菜单 + batchRemove: `${host1}users/role/batchRemove`, //批量删除角色 + checkRoleIsExist: `${host1}users/role/checkRoleIsExist`, //判断该角色是否存在 + delRoleByAccountId: `${host1}users/role/delRoleByAccountId`, //删除某用户下的某个角色 + roleList: `${host1}users/role/list`, //角色分页列表查询 + obtainDetails: `${host1}users/role/obtainDetails`, //获取角色详情 + saveOrUpdate: `${host1}users/role/saveOrUpdate`, //新增或更新角色 + queryAllMenus: `${host1}users/users/permission/queryAllMenus`, //查询所有菜单 // 日志管理 logAdd: `nakadai/log/add`, @@ -267,4 +268,5 @@ export default { partnerAccountList: `${host1}nakadai/partnerAccount/partnerAccountList`, savePartnerAccount: `${host1}nakadai/partnerAccount/savePartnerAccount`, generateInvitationCode: `${host1}nakadai/partnerAccount/generateInvitationCode`, + generationQrCode: `${host1}nakadai/partnerAccount/generationQrCode `, }; \ No newline at end of file diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index d741086..21fcf0c 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -225,24 +225,27 @@
- +
- + - - - - - - + + + + + + +
@@ -442,6 +445,12 @@ export default { orders: [], orderAll: [], + bmsKeyword: '', + bms: [], + pageBm: 1, + pageSizeBm: 10, + totalBm: 0, + countryList: [{ name:'中国' }], @@ -473,11 +482,18 @@ export default { this.filterOrder() },500) }, + bmsKeyword: function(val) { + clearTimeout(this.searchTimer) + this.searchTimer = setTimeout(() => { + this.getBm() + },500) + }, }, mounted() { this.getIndustryClass() - this.getProduct() + this.getBm() if(this.customerId){ + this.getProduct() this.$get(this.api.queryCustomerDetails,{ customerId: this.customerId }).then((res) => { @@ -675,6 +691,27 @@ export default { // 订单详情 toOrderDetail(row) { this.$router.push(`/AddOrder?val=watch&orderId=${row.orderId}&orderStatus=${row.orderStatus === '已完成' ? 1 : 0}`) + }, + + // 商务经理 + getBm() { + this.$post(this.api.getAListOfClientBusinessManagers, { + keywords: this.bmsKeyword, + customerId: this.customerId, + pageNum: this.pageBm, + pageSize: this.pageSizeBm + }).then(({ data }) => { + this.bms = data.records + this.totalBm = data.total + }).catch(res => {}) + }, + handleCurrentChangeBm(val) { + this.pageBm = val + this.getBm() + }, + // 商务经理查看 + toOrder(row) { + }, tabChange(index) { diff --git a/src/views/join/index.vue b/src/views/join/index.vue index 1c74824..8c20a0d 100644 --- a/src/views/join/index.vue +++ b/src/views/join/index.vue @@ -1,23 +1,39 @@ + + diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index 40135a5..63ea266 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -54,7 +54,9 @@ - + + + @@ -660,7 +662,7 @@ export default { orderAmount: 0, // orderId: this.$store.state.orderId, customerName: "",// 客户名称 - businessManager: '' + businessManagerId: '' }, coursePermissions: [],// 课程权限 dataPlatformPermissions: [],// 数据平台权限 @@ -725,6 +727,7 @@ export default { provinceList: this.$store.state.provinceList, cityList: [], schoolList: [], + bmList: [], yearList: [ { name: "1个月", value: 30 }, { name: "2个月", value: 60 }, @@ -797,6 +800,7 @@ export default { } }, async created() { + this.getBm() this.token = sessionStorage.getItem("token"); // 处理添加状态 if (this.$route.query.val == 'isAdd') { @@ -1506,6 +1510,17 @@ export default { }).catch(res => { }); }, + // 城市合伙人人员 + getBm() { + this.$post(this.api.partnerAccountList, { + partnerClassificationId: '', + keyWord: '', + pageNum: 1, + pageSize: 100000 + }).then(({ pageList }) => { + this.bmList = pageList.records + }).catch(err => {}) + }, clearcustomer() { this.form.orderContact = ""; this.form.phone = ""; diff --git a/src/views/parner/index.vue b/src/views/parner/index.vue index 349f52e..980741a 100644 --- a/src/views/parner/index.vue +++ b/src/views/parner/index.vue @@ -5,30 +5,30 @@ - + + + \ No newline at end of file diff --git a/src/views/parner/role.vue b/src/views/parner/pcRole.vue similarity index 97% rename from src/views/parner/role.vue rename to src/views/parner/pcRole.vue index 76f6fef..13e4e7d 100644 --- a/src/views/parner/role.vue +++ b/src/views/parner/pcRole.vue @@ -70,6 +70,7 @@ import Setting from "@/setting"; export default { data() { return { + platformId: 4, keyword: "", searchTimer: null, isDetail: false, @@ -107,7 +108,8 @@ export default { }, methods: { getData() { - this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${Setting.platformId}`).then(res => { + // platformId 合伙人为4,具体看setting.js; + this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${this.platformId}`).then(res => { this.listData = res.rolePage.records; this.total = res.rolePage.total; }).catch(res => {}); @@ -175,7 +177,7 @@ export default { // 获取权限菜单 getPer(row) { if (!this.permissions.length) { - this.$get(`${this.api.queryAllMenus}?platformId=${Setting.platformId}`).then(res => { + this.$get(`${this.api.queryAllMenus}?platformId=${this.platformId}`).then(res => { let data = res.children; // 因为有些菜单是后来去掉的,但是数据库里要去掉的话就得全部重新加了,所以就在前端来手动把不需要了的菜单给去掉,下面同理 let yw = data.findIndex(n => n.name == "业务后台"); @@ -246,7 +248,7 @@ export default { let data = { ...this.form, permissionId, - platformId: Setting.platformId, + platformId: this.platformId, }; if (this.form.id) { this.$post(this.api.saveOrUpdate, data).then(res => { diff --git a/src/views/parner/staff.vue b/src/views/parner/staff.vue index aef3544..ea90f8f 100644 --- a/src/views/parner/staff.vue +++ b/src/views/parner/staff.vue @@ -95,8 +95,9 @@ + - +

城市合伙人 邀请二维码

加盟商、合作伙伴可以通过这个二维码加入 城市合伙人计划

- + @@ -124,6 +125,7 @@ import util from "@/libs/util"; import Setting from "@/setting"; import OrgTree from "@/components/org-tree/src/tree"; import clipboard from '@/libs/clipboard' +import axios from 'axios' export default { components: { OrgTree }, data() { @@ -167,7 +169,8 @@ export default { } } return { - token: sessionStorage.getItem('token'), + accountId: this.$store.state.accountId, + userName: this.$store.state.userName, orgList: [], orgListDia: [], orgVisible: false, // 员工组织架对话框 @@ -226,6 +229,7 @@ export default { isLeaf: 'leaf' }, link: '', + qrcode: '', expireTime: '', curTeamId: '', submiting: false // 新增编辑防抖标识 @@ -257,6 +261,7 @@ export default { } handleLeaf(list) this.orgList = list + this.getList() }, // 添加部门 addOrg(node, data) { @@ -347,7 +352,7 @@ export default { }, // 点击树节点查询列表数据 handleNodeClick(data) { - this.curTeamId = '' + this.curTeamId = data.id if (data.isTeam) { this.curTeamId = data.id } else { @@ -372,9 +377,9 @@ export default { keyWord: this.keyWord, pageNum: this.page, pageSize: this.pageSize - }).then(res => { - this.listData = res.page.records - this.total = res.page.total + }).then(({ pageList }) => { + this.listData = pageList.records + this.total = pageList.total }).catch(err => {}) }, // 切换页码 @@ -394,15 +399,27 @@ export default { add() { const { orgList } = this if (orgList.length) { - const token = this.token - // 获取邀请码 - this.$post(`${this.api.generateInvitationCode}?token=${token}`).then(({ expireTime, invitationCode }) => { - const date = new Date(Date.now() + expireTime) - this.expireTime = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getMinutes()}` - this.parnerVisible = true - const cur = this.$refs.orgTree.getCurrentKey() - this.link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : 'nakadai'}/#/join?token=${encodeURI(window.btoa(token))}&id=${cur ? cur: this.orgList[0].id}&invitationCode=${invitationCode}` - }).catch(res => {}) + const curNode = this.$refs.orgTree.getCurrentNode() + if (curNode && curNode.isTeam) { + util.warningMsg('请选择分类添加城市合伙人!') + } else { + const { accountId } = this + // 获取邀请码 + this.$post(`${this.api.generateInvitationCode}?accountId=${accountId}`).then(({ expireTime, invitationCode }) => { + const date = new Date(Date.now() + expireTime) + this.expireTime = `${date.getFullYear()}-${util.preZero(date.getMonth() + 1)}-${util.preZero(date.getDate())} ${util.preZero(date.getHours())}:${util.preZero(date.getMinutes())}:${util.preZero(date.getMinutes())}` + this.parnerVisible = true + const cur = this.$refs.orgTree.getCurrentKey() + this.link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : 'nakadai'}/#/join?accountId=${accountId}&id=${cur ? cur: this.orgList[0].id}&userName=${this.userName}` + + // 生成二维码 + axios.get(`${this.api.generationQrCode}?url=${this.link}`, { + responseType: 'blob' + }).then(({ data }) => { + this.qrcode = window.URL.createObjectURL(data) + }).catch(res => {}) + }).catch(res => {}) + } } else { util.errorMsg('请添加分类!') }