This commit is contained in:
cun-nan 2024-03-28 14:39:24 +08:00
parent c6a2f7ff72
commit 393629664a
5 changed files with 178 additions and 39 deletions

View File

@ -40,7 +40,7 @@
<img src="../../assets/logo/logo.png" alt="" style="width: 60px;height: 50px; margin-right: 10px">
</div>
<div>
蓝鲸智慧油站欢迎您
{{storeName || "蓝鲸智慧油站"}}欢迎您
</div>
</div>
@ -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=> {

View File

@ -187,6 +187,16 @@
>{{dict.label}}</el-radio>
</el-radio-group>
</span>
<span v-else-if="ruleForm.deptType==='1'">
<el-radio-group :disabled="isTopDept" v-model="ruleForm.deptType">
<el-radio
v-for="dict in judgementNodeType(dict.type.node_type)"
:key="dict.value"
:label="dict.value"
v-if="dict.value!='4'"
>{{dict.label}}</el-radio>
</el-radio-group>
</span>
<span v-else>
<el-radio-group :disabled="isTopDept" v-model="ruleForm.deptType">
<el-radio
@ -637,19 +647,19 @@
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="form1.roleName" @input="$forceUpdate()" style="width: 300px" placeholder="请输入角色名称" />
</el-form-item>
<el-form-item label="角色类型" prop="roleType">
<el-select
v-model="form1.roleType"
placeholder="角色类型"
@change="changeMenu"
style="width: 300px"
>
<!-- <el-option key="1" label="超级管理员" value="1"/>-->
<!-- <el-option key="2" label="普通管理员" value="2"/>-->
<el-option key="3" label="油站角色" value="3"/>
<el-option key="4" label="公司角色" value="4"/>
</el-select>
</el-form-item>
<!-- <el-form-item label="角色类型" prop="roleType">-->
<!-- <el-select-->
<!-- v-model="form1.roleType"-->
<!-- placeholder="角色类型"-->
<!-- @change="changeMenu"-->
<!-- style="width: 300px"-->
<!-- >-->
<!--&lt;!&ndash; <el-option key="1" label="超级管理员" value="1"/>&ndash;&gt;-->
<!--&lt;!&ndash; <el-option key="2" label="普通管理员" value="2"/>&ndash;&gt;-->
<!-- <el-option key="3" label="油站角色" value="3"/>-->
<!-- <el-option key="4" label="公司角色" value="4"/>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="状态">
<el-radio-group v-model="form1.status">
<el-radio key="A" label="A" value="A">启用</el-radio>
@ -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

View File

@ -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);

View File

@ -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)

View File

@ -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) {
}
})
},
// snstoreId
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,