diff --git a/fuintAdmin/src/layout/components/Navbar.vue b/fuintAdmin/src/layout/components/Navbar.vue
index 1cd4ab25e..4cc9193f7 100644
--- a/fuintAdmin/src/layout/components/Navbar.vue
+++ b/fuintAdmin/src/layout/components/Navbar.vue
@@ -40,7 +40,7 @@
- 蓝鲸智慧油站欢迎您
+ {{storeName || "蓝鲸智慧油站"}}欢迎您
@@ -58,12 +58,14 @@ import Search from '@/components/HeaderSearch'
import FuintDoc from '@/components/Fuint/Doc'
import ScreenData from '@/components/ScreenData'
import {getCountdownApi} from "@/api/store";
+import {ljStoreInfo} from "@/api/staff/store";
export default {
data() {
return {
// 遮罩层
day: -1,
+ storeName:"",
}
},
components: {
@@ -102,6 +104,7 @@ export default {
},
created() {
this.getCountdown()
+ this.getStore()
},
methods: {
toggleSideBar() {
@@ -121,6 +124,11 @@ export default {
goToCashier() {
window.open(this.pcUrl+'#/homeindex?id=0')
},
+ getStore(){
+ ljStoreInfo().then(res => {
+ this.storeName = res.data.name
+ })
+ },
// 查询到期时间
getCountdown() {
getCountdownApi().then(res=> {
diff --git a/fuintAdmin_zt/src/views/Site/index.vue b/fuintAdmin_zt/src/views/Site/index.vue
index dc277ef13..e85d268be 100644
--- a/fuintAdmin_zt/src/views/Site/index.vue
+++ b/fuintAdmin_zt/src/views/Site/index.vue
@@ -187,6 +187,16 @@
>{{dict.label}}
+
+
+ {{dict.label}}
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
启用
@@ -1098,7 +1108,6 @@ export default {
},
handleAdd1(){
this.reset1();
- this.getMenuTreeselect(2);
this.form1.storeId = this.Thetree[0].id
this.openDuty = true;
this.title = "添加角色";
@@ -1106,6 +1115,7 @@ export default {
},
// 查询菜单树结构
getMenuTreeselect(merchantId) {
+ // merchantId 代表deptType
return menuTreeselect({merchantId:merchantId}).then(response => {
this.menuOptions = response.data;
return response
@@ -1122,10 +1132,10 @@ export default {
},
handleUpdate1(data){
this.reset1();
- let val = null;
- if (data.dutyType == '3') val = 1;
- if (data.dutyType == '4') val = 2;
- const roleMenu = this.getMenuTreeselect(val);
+ // let val = null;
+ // if (data.dutyType == '3') val = 1;
+ // if (data.dutyType == '4') val = 2;
+ // const roleMenu = this.getMenuTreeselect(val);
const roleId = data.dutyId
getRole(roleId).then(response => {
this.form1.roleName = response.data.roleInfo.name;
@@ -1137,15 +1147,15 @@ export default {
this.title = "修改角色";
let checkedKeys = response.data.checkedKeys
- this.$nextTick(() => {
- roleMenu.then(res => {
- checkedKeys.forEach((v) => {
- this.$nextTick(()=>{
- this.$refs.menu.setChecked(v, true ,false);
- })
- })
- });
- });
+ // this.$nextTick(() => {
+ // roleMenu.then(res => {
+ // checkedKeys.forEach((v) => {
+ // this.$nextTick(()=>{
+ // this.$refs.menu.setChecked(v, true ,false);
+ // })
+ // })
+ // });
+ // });
});
},
handleStatusChangeDuty(data){
@@ -1226,7 +1236,7 @@ export default {
initPage() {
this.activeName= 'list',
this.userList= 'list',
- this.cleanUp()
+ // this.cleanUp()
this.getList()
},
@@ -1269,7 +1279,6 @@ export default {
this.isTopDept = flag
-
// 点击树之后
this.queryParams.deptId = data.id
this.queryParams1.storeId = data.id
@@ -1280,6 +1289,7 @@ export default {
// this.getList();
this.onlyGetUser()
this.getDutyList()
+ this.getMenuTreeselect(data.deptType);
},
// 清除信息
@@ -1387,6 +1397,9 @@ export default {
if (this.activeName=="duty"){
this.getDutyList()
}
+ if (this.activeName=="info"){
+ this.getDutyList()
+ }
},
//树形页操作
//新增树
@@ -1495,7 +1508,7 @@ export default {
if (this.ruleForm.storeNum) {
this.storeNum = true
}
- if(res.data.status == 'qy'){
+ if(res.data.status === 'qy'){
this.value10 = true
}else {
this.value10 = false
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java
index 7007f349a..0fd3511b3 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java
@@ -255,10 +255,10 @@ public class BackendSourceController extends BaseController {
@ApiOperation(value = "获取菜单下拉树列表")
@RequestMapping(value = "/treeselect", method = RequestMethod.GET)
public ResponseObject treeselect(HttpServletRequest request, TAccount account) {
- if (ObjectUtils.isNotEmpty(account.getDeptType()) && account.getDeptType().equals("3")){
- account.setMerchantId(2);
- }else {
+ if (ObjectUtils.isNotEmpty(account.getMerchantId()) && account.getMerchantId()==3){
account.setMerchantId(1);
+ }else {
+ account.setMerchantId(2);
}
String token = request.getHeader("Access-Token");
AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
diff --git a/gasStation-uni/App.vue b/gasStation-uni/App.vue
index a1961d966..6b49c4914 100644
--- a/gasStation-uni/App.vue
+++ b/gasStation-uni/App.vue
@@ -72,6 +72,8 @@
} else {
if (str.includes("storeId")) {
storeId = str.split("=")[1]
+ }else if(str.includes("sn")){
+ sn = str.split("=")[1]
}
}
uni.setStorageSync("storeId", storeId)
diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue
index e387de787..da3110008 100644
--- a/gasStation-uni/pages/refuel/refuel.vue
+++ b/gasStation-uni/pages/refuel/refuel.vue
@@ -232,7 +232,6 @@
let staffId = "";
let sn = "";
- console.log("115151515:" + str);
if (str.includes("&")) {
let arr = str.split("&");
arr.forEach(item => {
@@ -245,20 +244,30 @@
}
})
} else {
- storeId = str.split("=")[1]
+ if (str.includes("storeId")){
+ storeId = str.split("=")[1]
+ }else{
+ sn = str.split("=")[1]
+ this.getStoreIdBySn(sn);
+ }
}
uni.setStorageSync("storeId", storeId)
uni.setStorageSync("sn", sn)
uni.setStorageSync("inviteStaffId", staffId)
this.storeId = uni.getStorageSync("storeId")
this.staffId = uni.getStorageSync("inviteStaffId")
- this.getStore(uni.getStorageSync("storeId"));
- this.getStaffList(uni.getStorageSync("storeId"));
+ if (uni.getStorageSync("storeId")){
+ this.getStore(uni.getStorageSync("storeId"));
+ this.getStaffList(uni.getStorageSync("storeId"));
+ }
+
}
} else {
if (uni.getStorageSync("storeId")) {
this.getStore(uni.getStorageSync("storeId"));
this.getStaffList(uni.getStorageSync("storeId"));
+ }else{
+ this.getStoreIdBySn(uni.getStorageSync("sn"));
}
}
@@ -269,11 +278,112 @@
// this.isExistStoreId();
this.getStore(uni.getStorageSync("storeId"));
this.getStaffList(uni.getStorageSync("storeId"));
+ // this.getStoreIdBySn("byx19509291");
// this.getStore(0);
this.getTheJudgmentIsTheSame()
},
methods: {
+ // 获取当前位置
+ getAddress(storeId) {
+ let _this = this;
+ uni.getLocation({
+ // 谷歌使用wgs84 其他使用gcj02
+ type: 'gcj02', // 使用国测局坐标系
+ success: function(res) {
+ if (_this.longitude == "" && _this.latitude == "") {
+
+ _this.longitude = res.longitude;
+ _this.latitude = res.latitude
+ }
+ console.log('经度: ' + _this.longitude);
+ console.log('纬度: ' + _this.latitude);
+ request({
+ url: 'business/storeInformation/store/recentlyStore',
+ method: 'post',
+ data: {
+ "lon": _this.longitude,
+ "lat": _this.latitude,
+ "storeId": storeId,
+ "isLogin": _this.AppToken ? "0" : "1", // 0为登录
+
+ },
+ }).then((response) => {
+ console.log(response, "2154");
+ // uni.showToast({
+ // title:"121984:"+storeId
+ // })
+ if (response.data.store) {
+ _this.store = response.data.store
+ uni.setStorageSync("storeId", response.data.store.id)
+ uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
+ _this.getOilNumber(response.data.store.id);
+ } else {
+ uni.showToast({
+ title: "当前店铺已关闭!!!",
+ icon: "none"
+ })
+ }
+
+ }).catch(err => {})
+
+ // uni.showToast({
+ // title: "获取位置信息成功",
+ // icon: "none"
+ // })
+ },
+ fail: function(err) {
+ _this.getStore(2);
+ // uni.showToast({
+ // title: "获取位置信息失败"
+ // })
+ console.log('获取位置信息失败: ' + err.errMsg);
+ }
+ });
+ },
+ // 获取定位信息
+ getUserAuthority() {
+ let _this = this;
+ // this.getAddress();
+ uni.getSetting({
+ async success(res) {
+ if (!res.authSetting['scope.userLocation']) {
+ // uni.authorize({
+ // scope: 'scope.userLocation',
+ // success() {
+ // // 用户同意获取位置信息
+ // // _this.isExistStoreId()
+ // },
+ // fail() {
+ // // 用户拒绝
+ // }
+ // })
+ await _this.getAddress(uni.getStorageSync("storeId"));
+ } else {
+ // 用户同意获取位置信息
+ // _this.isExistStoreId()
+ await _this.getAddress(uni.getStorageSync("storeId"));
+ }
+ },
+ fail(err) {
+
+ }
+ })
+ },
+ // 通过sn获取storeId
+ getStoreIdBySn(sn){
+ request({
+ url: "business/tag/oilTag/getSn/" + sn,
+ method: 'get'
+ }).then((res) => {
+ uni.setStorageSync("storeId", res.data.storeId)
+ if (res.data.storeId){
+ this.getStore(uni.getStorageSync("storeId"));
+ }else{
+ this.getAddress(uni.getStorageSync("storeId"));
+ }
+ })
+ },
// 打开数字键盘
openKey() {
this.show = true
@@ -292,6 +402,9 @@
// uni.showToast({
// title:333
// })
+ if (!id) {
+ return;
+ }
let _this = this;
request({
url: "business/storeInformation/store/queryStoreById",
@@ -321,7 +434,7 @@
})
},
// 获取当前位置
- getAddress() {
+ getAddress1() {
let _this = this;
uni.getLocation({
// 谷歌使用wgs84 其他使用gcj02
@@ -391,6 +504,9 @@
},
// 获取当前店铺员工信息列表
getStaffList(storeId) {
+ if (!storeId) {
+ return;
+ }
let _this = this;
request({
url: "business/member/staff/queryList1/" + storeId,