Merge branch 'master' of http://192.168.31.244:3000/byx/oilSystem
This commit is contained in:
commit
adf5b1ea7a
@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div><span>{{radio}}交易金额总计:</span><span class="title-lan">{{sum}}</span> <span>元</span></div>
|
<div><span>{{radio}}交易金额总计:</span><span class="title-lan">{{sum}}</span> <span>元</span></div>
|
||||||
<div v-loading="oilLoading" id="ccccc" style="width: 100%; height: 400px; background: linear-gradient( 360deg, #F8F1E7 0%, #FFFFFF 100%); "></div>
|
<div v-loading="oilLoading" id="ccccc" style="width: 100%; height: 370px; background: linear-gradient( 360deg, #F8F1E7 0%, #FFFFFF 100%); "></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -194,7 +194,14 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
],
|
||||||
|
grid: {
|
||||||
|
left: '8%',
|
||||||
|
right: '8%',
|
||||||
|
bottom: '5%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
chart.setOption(option)
|
chart.setOption(option)
|
||||||
|
@ -131,3 +131,16 @@
|
|||||||
.el-pagination.is-background .el-pager li:hover{
|
.el-pagination.is-background .el-pager li:hover{
|
||||||
color: #FF9655 !important;/*hover时候的文字颜色*/
|
color: #FF9655 !important;/*hover时候的文字颜色*/
|
||||||
}
|
}
|
||||||
|
//修改选择框的颜色
|
||||||
|
.el-checkbox__input.is-checked .el-checkbox__inner,
|
||||||
|
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
||||||
|
border-color: #FF9655!important;
|
||||||
|
background-color: #FF9655!important;
|
||||||
|
}
|
||||||
|
.el-checkbox__input.is-focus .el-checkbox__inner{
|
||||||
|
border-color: #FF9655!important;
|
||||||
|
}
|
||||||
|
//修改选中后文本的颜色
|
||||||
|
.el-checkbox__input.is-checked+.el-checkbox__label{
|
||||||
|
color:#FF9655!important;
|
||||||
|
}
|
||||||
|
@ -7,6 +7,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
merchantId: "2",
|
merchantId: "2",
|
||||||
|
isOpen: true,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
roleName: '',
|
roleName: '',
|
||||||
storeId: '',
|
storeId: '',
|
||||||
@ -15,9 +16,11 @@ export default {
|
|||||||
description: '',
|
description: '',
|
||||||
dutyId: "",
|
dutyId: "",
|
||||||
checkedKeys: [],
|
checkedKeys: [],
|
||||||
roleCode:"",
|
roleCode:"0",
|
||||||
},
|
},
|
||||||
checked:true,
|
checkedKeys:[],
|
||||||
|
isCashier:false,
|
||||||
|
checked:false,
|
||||||
rules: {
|
rules: {
|
||||||
roleName: [
|
roleName: [
|
||||||
{required: true, message: '请输入角色名称', trigger: 'blur'},
|
{required: true, message: '请输入角色名称', trigger: 'blur'},
|
||||||
@ -94,11 +97,15 @@ export default {
|
|||||||
// merchantId 代表deptType
|
// merchantId 代表deptType
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
menuTreeselect({merchantId: this.merchantId, roleId: this.ruleForm.dutyId}).then(response => {
|
menuTreeselect({merchantId: this.merchantId, roleId: this.ruleForm.dutyId}).then(response => {
|
||||||
|
let show = false
|
||||||
|
if (this.isCashier) {
|
||||||
|
show = true
|
||||||
|
}
|
||||||
let data = {
|
let data = {
|
||||||
id: 0,
|
id: 0,
|
||||||
label: '收银台',
|
label: '收银台',
|
||||||
childrens: [],
|
childrens: [],
|
||||||
list: [{id: 0,show: false, name: '选中菜单'},]
|
list: [{id: 0,show: show, name: '选中菜单'},]
|
||||||
}
|
}
|
||||||
this.tableData.push(data);
|
this.tableData.push(data);
|
||||||
this.tableData.push(...response.data);
|
this.tableData.push(...response.data);
|
||||||
@ -148,6 +155,11 @@ export default {
|
|||||||
this.ruleForm.checkedKeys = checkedKeys
|
this.ruleForm.checkedKeys = checkedKeys
|
||||||
this.ruleForm.menuIds = checkedKeys
|
this.ruleForm.menuIds = checkedKeys
|
||||||
this.merchantId = response.data.roleInfo.type
|
this.merchantId = response.data.roleInfo.type
|
||||||
|
if (response.data.roleInfo.roleCode==2 || response.data.roleInfo.roleCode==3){
|
||||||
|
this.isCashier = true
|
||||||
|
}else {
|
||||||
|
this.isCashier = false
|
||||||
|
}
|
||||||
this.getMenuTreeselect()
|
this.getMenuTreeselect()
|
||||||
// this.tableData = response.data.treeselect;
|
// this.tableData = response.data.treeselect;
|
||||||
});
|
});
|
||||||
@ -162,9 +174,114 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
openTable(str) {
|
||||||
|
// if (str == 'open') {
|
||||||
|
// this.isOpen = true;
|
||||||
|
// } else {
|
||||||
|
// this.isOpen = false;
|
||||||
|
// }
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.handleArr(this.tableData, this.isOpen);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleArr(arr, flag) {
|
||||||
|
arr.forEach(i => {
|
||||||
|
this.$refs.table.toggleRowExpansion(i, flag);
|
||||||
|
if (i.children) {
|
||||||
|
this.handleArr(i.children);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 全选
|
||||||
|
chooseAllOrNo(val){
|
||||||
|
let show = val
|
||||||
|
if (val){
|
||||||
|
let ids = []
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.id == 0){
|
||||||
|
item.show = show
|
||||||
|
item.list.forEach(item1 => {
|
||||||
|
item1.show = show
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ids.push(item.id)
|
||||||
|
item.show = show
|
||||||
|
item.list.forEach(item1 => {
|
||||||
|
ids.push(item1.id)
|
||||||
|
item1.show = show
|
||||||
|
})
|
||||||
|
item.childrens.forEach(item1 => {
|
||||||
|
ids.push(item1.id)
|
||||||
|
item1.show = show
|
||||||
|
item1.list.forEach(item2 => {
|
||||||
|
ids.push(item2.id)
|
||||||
|
item2.show = show
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.ruleForm.roleCode = '3'
|
||||||
|
this.ruleForm.checkedKeys = ids.filter((item, index) => ids.indexOf(item) === index);
|
||||||
|
}else {
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
item.show = show
|
||||||
|
item.list.forEach(item1 => {
|
||||||
|
item1.show = show
|
||||||
|
})
|
||||||
|
item.childrens.forEach(item1 => {
|
||||||
|
item1.show = show
|
||||||
|
item1.list.forEach(item2 => {
|
||||||
|
item2.show = show
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.ruleForm.roleCode = '0'
|
||||||
|
this.ruleForm.checkedKeys = []
|
||||||
|
}
|
||||||
|
this.ruleForm.menuIds = this.ruleForm.checkedKeys;
|
||||||
|
},
|
||||||
|
getLengthCheck(){
|
||||||
|
let ids = []
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.id == 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ids.push(item.id)
|
||||||
|
item.list.forEach(item1 => {
|
||||||
|
ids.push(item1.id)
|
||||||
|
})
|
||||||
|
item.childrens.forEach(item1 => {
|
||||||
|
ids.push(item1.id)
|
||||||
|
item1.list.forEach(item2 => {
|
||||||
|
ids.push(item2.id)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.checkedKeys = ids.filter((item, index) => ids.indexOf(item) === index);
|
||||||
|
},
|
||||||
chooseImg(row, data) {
|
chooseImg(row, data) {
|
||||||
if (row.id==0){
|
if (row.id==0){
|
||||||
row.show = !row.show
|
row.show = !row.show
|
||||||
|
if (row.show) {
|
||||||
|
if (this.ruleForm.checkedKeys.length>0){
|
||||||
|
this.ruleForm.roleCode = '3'
|
||||||
|
}else {
|
||||||
|
this.ruleForm.roleCode = '2'
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (this.ruleForm.checkedKeys.length>0){
|
||||||
|
this.ruleForm.roleCode = '1'
|
||||||
|
}else {
|
||||||
|
this.ruleForm.roleCode = '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.isCashier = row.show
|
||||||
|
this.getLengthCheck();
|
||||||
|
if (this.checkedKeys.length==this.ruleForm.checkedKeys.length && this.isCashier){
|
||||||
|
this.checked = true
|
||||||
|
}else {
|
||||||
|
this.checked = false
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let ids = []
|
let ids = []
|
||||||
@ -211,7 +328,12 @@ export default {
|
|||||||
this.ruleForm.checkedKeys = this.ruleForm.checkedKeys.filter(item => !uniqueArr.includes(item));
|
this.ruleForm.checkedKeys = this.ruleForm.checkedKeys.filter(item => !uniqueArr.includes(item));
|
||||||
}
|
}
|
||||||
this.ruleForm.menuIds = this.ruleForm.checkedKeys;
|
this.ruleForm.menuIds = this.ruleForm.checkedKeys;
|
||||||
// this.ruleForm.checkedKeys = this.ruleForm.checkedKeys.filter(item => item !== row.id);
|
this.getLengthCheck();
|
||||||
|
if (this.checkedKeys.length==this.ruleForm.checkedKeys.length && this.isCashier){
|
||||||
|
this.checked = true
|
||||||
|
}else {
|
||||||
|
this.checked = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,16 +389,21 @@ export default {
|
|||||||
<!-- </el-radio-group>-->
|
<!-- </el-radio-group>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="菜单功能权限" prop="checkedKeys">
|
<el-form-item label="菜单功能权限" prop="checkedKeys">
|
||||||
<el-checkbox v-model="checked">全选</el-checkbox>
|
<el-checkbox v-model="checked" @change="chooseAllOrNo">全选</el-checkbox>
|
||||||
|
<el-checkbox v-model="isOpen" @change="openTable">展开</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<!-- <el-button size="mini" @click.native="openTable('open')">一键展开</el-button>-->
|
||||||
|
<!-- <el-button size="mini" @click.native="openTable('fold')">折叠</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
|
ref="table"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
style="width: 100%;margin-bottom: 20px;"
|
style="width: 100%;margin-bottom: 20px;"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
border
|
border
|
||||||
default-expand-all
|
default-expand-all
|
||||||
|
stripe
|
||||||
:tree-props="{children: 'childrens', hasChildren: 'hasChildren'}">
|
:tree-props="{children: 'childrens', hasChildren: 'hasChildren'}">
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -43,6 +43,17 @@ public class RoleDto {
|
|||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
// 是否拥有登录权限
|
||||||
|
private String roleCode;
|
||||||
|
|
||||||
|
public String getRoleCode() {
|
||||||
|
return roleCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleCode(String roleCode) {
|
||||||
|
this.roleCode = roleCode;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getStoreId() {
|
public Integer getStoreId() {
|
||||||
return storeId;
|
return storeId;
|
||||||
}
|
}
|
||||||
|
@ -143,6 +143,7 @@ public class BackendDutyController extends BaseController {
|
|||||||
String type = param.get("deptType").toString();
|
String type = param.get("deptType").toString();
|
||||||
String status = param.get("status").toString();
|
String status = param.get("status").toString();
|
||||||
String description = param.get("description").toString();
|
String description = param.get("description").toString();
|
||||||
|
String roleCode = param.get("roleCode").toString();
|
||||||
if (ObjectUtil.isEmpty(param.get("storeId"))){
|
if (ObjectUtil.isEmpty(param.get("storeId"))){
|
||||||
return getFailureResult(1001, "请先选择机构");
|
return getFailureResult(1001, "请先选择机构");
|
||||||
}
|
}
|
||||||
@ -174,6 +175,7 @@ public class BackendDutyController extends BaseController {
|
|||||||
tDuty.setStatus(status);
|
tDuty.setStatus(status);
|
||||||
tDuty.setDescription(description);
|
tDuty.setDescription(description);
|
||||||
tDuty.setStoreId(storeId);
|
tDuty.setStoreId(storeId);
|
||||||
|
tDuty.setRoleCode(roleCode);
|
||||||
|
|
||||||
// 添加角色信息
|
// 添加角色信息
|
||||||
try {
|
try {
|
||||||
@ -212,6 +214,7 @@ public class BackendDutyController extends BaseController {
|
|||||||
roleInfo.setStatus(htDuty.getStatus());
|
roleInfo.setStatus(htDuty.getStatus());
|
||||||
roleInfo.setStoreId(htDuty.getStoreId());
|
roleInfo.setStoreId(htDuty.getStoreId());
|
||||||
roleInfo.setDescription(htDuty.getDescription());
|
roleInfo.setDescription(htDuty.getDescription());
|
||||||
|
roleInfo.setRoleCode(htDuty.getRoleCode());
|
||||||
|
|
||||||
result.put("roleInfo", roleInfo);
|
result.put("roleInfo", roleInfo);
|
||||||
|
|
||||||
@ -245,6 +248,7 @@ public class BackendDutyController extends BaseController {
|
|||||||
String type = param.get("roleType").toString();
|
String type = param.get("roleType").toString();
|
||||||
String status = param.get("status").toString();
|
String status = param.get("status").toString();
|
||||||
String description = param.get("description").toString();
|
String description = param.get("description").toString();
|
||||||
|
String roleCode = param.get("roleCode").toString();
|
||||||
|
|
||||||
AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
|
AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
|
||||||
if (accountInfo == null) {
|
if (accountInfo == null) {
|
||||||
@ -265,6 +269,7 @@ public class BackendDutyController extends BaseController {
|
|||||||
duty.setDutyName(name);
|
duty.setDutyName(name);
|
||||||
duty.setStatus(status);
|
duty.setStatus(status);
|
||||||
duty.setDutyType(type);
|
duty.setDutyType(type);
|
||||||
|
duty.setRoleCode(roleCode);
|
||||||
|
|
||||||
// 获取角色所分配的菜单
|
// 获取角色所分配的菜单
|
||||||
List<TSource> sources = null;
|
List<TSource> sources = null;
|
||||||
|
@ -153,6 +153,7 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
|
|||||||
existsDuty.setDutyType(tduty.getDutyType());
|
existsDuty.setDutyType(tduty.getDutyType());
|
||||||
existsDuty.setDutyName(tduty.getDutyName());
|
existsDuty.setDutyName(tduty.getDutyName());
|
||||||
existsDuty.setStatus(tduty.getStatus());
|
existsDuty.setStatus(tduty.getStatus());
|
||||||
|
existsDuty.setRoleCode(tduty.getRoleCode());
|
||||||
|
|
||||||
if (sources != null && sources.size() > 0) {
|
if (sources != null && sources.size() > 0) {
|
||||||
tDutySourceMapper.deleteSourcesByDutyId(tduty.getDutyId());
|
tDutySourceMapper.deleteSourcesByDutyId(tduty.getDutyId());
|
||||||
|
@ -243,16 +243,17 @@
|
|||||||
<div class="center-top-of">
|
<div class="center-top-of">
|
||||||
<div class="wrap-wrap">
|
<div class="wrap-wrap">
|
||||||
<div class="of-box" v-for="(item,index) in gunList" :key="index"
|
<div class="of-box" v-for="(item,index) in gunList" :key="index"
|
||||||
:style="{'background-color': colorList[index%5].color}"
|
:style="{'background-color': colorList[index%4].color}"
|
||||||
|
|
||||||
@click="refuel(item)">
|
@click="refuel(item)">
|
||||||
<div>{{ getName(oilNameList,getOilNames(oilNumberList,item.numberId)) }}</div>
|
<div :style="{'color': colorList[index%4].border}" >{{ getName(oilNameList,getOilNames(oilNumberList,item.numberId)) }}</div>
|
||||||
<!-- <div>{{ getOilNames(oilNumberList,item.numberId) }}</div>-->
|
<!-- <div>{{ getOilNames(oilNumberList,item.numberId) }}</div>-->
|
||||||
<!-- <div>{{ item.oilNumber }</div>-->
|
<!-- <div>{{ item.oilNumber }</div>-->
|
||||||
|
|
||||||
<div class="of-title" >{{item.gunName}}</div>
|
<div class="of-title" >{{item.gunName}}</div>
|
||||||
<div style="display: flex;justify-content: space-between">
|
<div style="display: flex;justify-content: space-between ;font-size: 12px" >
|
||||||
<img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">
|
<img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">
|
||||||
<span style="font-size: 12px">{{ item.tankName }}</span>
|
<span :style="{'color': colorList[index%4].border}" >{{ item.tankName }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -268,7 +269,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="center-left-bottom">
|
<div class="center-left-bottom">
|
||||||
<div class="bottom-gd" @click="resetting">重置</div>
|
<div class="bottom-qk" @click="resetting">重置</div>
|
||||||
<!-- <div class="bottom-qk">解锁</div>-->
|
<!-- <div class="bottom-qk">解锁</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1497,11 +1498,10 @@
|
|||||||
leftindex:0,
|
leftindex:0,
|
||||||
oilList:[],
|
oilList:[],
|
||||||
colorList:[
|
colorList:[
|
||||||
{color:'#e5f0ff'},
|
{color:'#e5f0ff',border:"#409EFF"},
|
||||||
{color:'#fff2e5'},
|
{color:'#fff2e5',border:"#FF9655"},
|
||||||
{color:'#e5edf1'},
|
{color:'#ecfae5',border:"#0DC291"},
|
||||||
{color:'#ecfae5'},
|
{color:'#fff8e7',border:"#FFB519"}
|
||||||
{color:'#fafafa'}
|
|
||||||
],
|
],
|
||||||
restaurants:'',
|
restaurants:'',
|
||||||
num: 1,
|
num: 1,
|
||||||
@ -4829,19 +4829,19 @@
|
|||||||
//cursor: pointer;
|
//cursor: pointer;
|
||||||
//color: #20b400;
|
//color: #20b400;
|
||||||
}
|
}
|
||||||
.wrap-box :hover{
|
//.wrap-box :hover{
|
||||||
/*background: #00afff !important;*/
|
// /*background: #00afff !important;*/
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
height: 100%;
|
// height: 100%;
|
||||||
border-radius: 8px;
|
// border-radius: 8px;
|
||||||
height: 80px;
|
// height: 80px;
|
||||||
display: flex;
|
// display: flex;
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
justify-content: center;
|
// justify-content: center;
|
||||||
border: 1px solid #00afff;
|
// border: 1px solid #00afff;
|
||||||
cursor: pointer;
|
// cursor: pointer;
|
||||||
/*color: white;*/
|
// /*color: white;*/
|
||||||
}
|
//}
|
||||||
|
|
||||||
.box-center{
|
.box-center{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -4864,27 +4864,27 @@
|
|||||||
.bottom-qk{
|
.bottom-qk{
|
||||||
border: 1px solid #99a9bf;
|
border: 1px solid #99a9bf;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 14px 20px;
|
padding: 10px 20px;
|
||||||
border-radius: 50px;
|
border-radius: 10px;
|
||||||
color: #99a9bf;
|
color: #99a9bf;
|
||||||
margin: 15px 0px ;
|
margin: 15px 0px ;
|
||||||
}
|
}
|
||||||
.bottom-qd{
|
.bottom-qd{
|
||||||
border: 1px solid #13ce66;
|
border: 1px solid #13ce66;
|
||||||
background: #13ce66;
|
background: linear-gradient( 312deg, #9CDCA0 0%, #5BC557 100%);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 14px 20px;
|
padding: 14px 20px;
|
||||||
border-radius: 50px;
|
border-radius: 8px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|
||||||
margin: 15px 10px ;
|
margin: 15px 10px ;
|
||||||
}
|
}
|
||||||
.bottom-gd{
|
.bottom-gd{
|
||||||
border: 1px solid #FF9655;
|
border: 1px solid #02AAFE;
|
||||||
background: #FF9655;
|
background: linear-gradient( 312deg, #70CAFD 0%, #0BADFE 100%, #02AAFE 100%);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 14px 20px;
|
padding: 14px 20px;
|
||||||
border-radius: 50px;
|
border-radius: 8px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|
||||||
margin: 15px 10px ;
|
margin: 15px 10px ;
|
||||||
|
Loading…
Reference in New Issue
Block a user