From ce64a1ea416e6d8f69e7c81b6177dd438ba9bd51 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Thu, 11 Jul 2024 17:21:46 +0800 Subject: [PATCH 1/2] bug --- .../src/assets/styles/element-ui.scss | 13 ++ fuintAdmin_zt/src/views/Site/add.vue | 137 +++++++++++++++++- .../java/com/fuint/common/dto/RoleDto.java | 11 ++ .../controller/BackendDutyController.java | 5 + .../role/service/impl/DutyServiceImpl.java | 1 + 5 files changed, 162 insertions(+), 5 deletions(-) diff --git a/fuintAdmin_zt/src/assets/styles/element-ui.scss b/fuintAdmin_zt/src/assets/styles/element-ui.scss index f69dc5743..44f149632 100644 --- a/fuintAdmin_zt/src/assets/styles/element-ui.scss +++ b/fuintAdmin_zt/src/assets/styles/element-ui.scss @@ -131,3 +131,16 @@ .el-pagination.is-background .el-pager li: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; +} diff --git a/fuintAdmin_zt/src/views/Site/add.vue b/fuintAdmin_zt/src/views/Site/add.vue index 7a3cbc9f8..cfd25a55b 100644 --- a/fuintAdmin_zt/src/views/Site/add.vue +++ b/fuintAdmin_zt/src/views/Site/add.vue @@ -7,6 +7,7 @@ export default { data() { return { merchantId: "2", + isOpen: true, ruleForm: { roleName: '', storeId: '', @@ -15,9 +16,11 @@ export default { description: '', dutyId: "", checkedKeys: [], - roleCode:"", + roleCode:"0", }, - checked:true, + checkedKeys:[], + isCashier:false, + checked:false, rules: { roleName: [ {required: true, message: '请输入角色名称', trigger: 'blur'}, @@ -94,11 +97,15 @@ export default { // merchantId 代表deptType this.tableData = [] menuTreeselect({merchantId: this.merchantId, roleId: this.ruleForm.dutyId}).then(response => { + let show = false + if (this.isCashier) { + show = true + } let data = { id: 0, label: '收银台', childrens: [], - list: [{id: 0,show: false, name: '选中菜单'},] + list: [{id: 0,show: show, name: '选中菜单'},] } this.tableData.push(data); this.tableData.push(...response.data); @@ -148,6 +155,11 @@ export default { this.ruleForm.checkedKeys = checkedKeys this.ruleForm.menuIds = checkedKeys 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.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) { if (row.id==0){ 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; } let ids = [] @@ -211,7 +328,12 @@ export default { this.ruleForm.checkedKeys = this.ruleForm.checkedKeys.filter(item => !uniqueArr.includes(item)); } 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 { - 全选 + 全选 + 展开 + + sources = null; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/system/role/service/impl/DutyServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/system/role/service/impl/DutyServiceImpl.java index cd742bb7f..24872bc6c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/system/role/service/impl/DutyServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/system/role/service/impl/DutyServiceImpl.java @@ -153,6 +153,7 @@ public class DutyServiceImpl extends ServiceImpl implements existsDuty.setDutyType(tduty.getDutyType()); existsDuty.setDutyName(tduty.getDutyName()); existsDuty.setStatus(tduty.getStatus()); + existsDuty.setRoleCode(tduty.getRoleCode()); if (sources != null && sources.size() > 0) { tDutySourceMapper.deleteSourcesByDutyId(tduty.getDutyId()); From a88217849a03cb7b16b578460740cb55a05a07c2 Mon Sep 17 00:00:00 2001 From: xvv Date: Thu, 11 Jul 2024 17:33:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/indexcomponents/centenrindex.vue | 11 +++- .../views/cashier/NewComponents/homeindex.vue | 60 +++++++++---------- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/fuintAdmin/src/views/indexcomponents/centenrindex.vue b/fuintAdmin/src/views/indexcomponents/centenrindex.vue index 4306d9301..544432b12 100644 --- a/fuintAdmin/src/views/indexcomponents/centenrindex.vue +++ b/fuintAdmin/src/views/indexcomponents/centenrindex.vue @@ -15,7 +15,7 @@ {{radio}}交易金额总计:{{sum}} 元 - + @@ -194,7 +194,14 @@ export default { }, - ] + ], + grid: { + left: '8%', + right: '8%', + bottom: '5%', + containLabel: true + }, + }; chart.setOption(option) diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue index 98cb7a5ef..f87ab4808 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/homeindex.vue @@ -243,16 +243,17 @@ - {{ getName(oilNameList,getOilNames(oilNumberList,item.numberId)) }} + {{ getName(oilNameList,getOilNames(oilNumberList,item.numberId)) }} {{item.gunName}} - + - {{ item.tankName }} + {{ item.tankName }} @@ -268,7 +269,7 @@ - 重置 + 重置 @@ -1497,11 +1498,10 @@ leftindex:0, oilList:[], colorList:[ - {color:'#e5f0ff'}, - {color:'#fff2e5'}, - {color:'#e5edf1'}, - {color:'#ecfae5'}, - {color:'#fafafa'} + {color:'#e5f0ff',border:"#409EFF"}, + {color:'#fff2e5',border:"#FF9655"}, + {color:'#ecfae5',border:"#0DC291"}, + {color:'#fff8e7',border:"#FFB519"} ], restaurants:'', num: 1, @@ -4829,19 +4829,19 @@ //cursor: pointer; //color: #20b400; } - .wrap-box :hover{ - /*background: #00afff !important;*/ - width: 100%; - height: 100%; - border-radius: 8px; - height: 80px; - display: flex; - align-items: center; - justify-content: center; - border: 1px solid #00afff; - cursor: pointer; - /*color: white;*/ - } + //.wrap-box :hover{ + // /*background: #00afff !important;*/ + // width: 100%; + // height: 100%; + // border-radius: 8px; + // height: 80px; + // display: flex; + // align-items: center; + // justify-content: center; + // border: 1px solid #00afff; + // cursor: pointer; + // /*color: white;*/ + //} .box-center{ width: 100%; @@ -4864,27 +4864,27 @@ .bottom-qk{ border: 1px solid #99a9bf; box-sizing: border-box; - padding: 14px 20px; - border-radius: 50px; + padding: 10px 20px; + border-radius: 10px; color: #99a9bf; margin: 15px 0px ; } .bottom-qd{ border: 1px solid #13ce66; - background: #13ce66; + background: linear-gradient( 312deg, #9CDCA0 0%, #5BC557 100%); box-sizing: border-box; padding: 14px 20px; - border-radius: 50px; + border-radius: 8px; color: #ffffff; margin: 15px 10px ; } .bottom-gd{ - border: 1px solid #FF9655; - background: #FF9655; + border: 1px solid #02AAFE; + background: linear-gradient( 312deg, #70CAFD 0%, #0BADFE 100%, #02AAFE 100%); box-sizing: border-box; padding: 14px 20px; - border-radius: 50px; + border-radius: 8px; color: #ffffff; margin: 15px 10px ;