Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-03-29 13:43:16 +08:00
commit 3e05c8ce4d
3 changed files with 124 additions and 45 deletions

View File

@ -187,24 +187,67 @@
>{{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
v-for="dict in judgementNodeType(dict.type.node_type)"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
<span v-if="isAdd">
<span v-if="!parentDeptType">
<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"
>{{dict.label}}</el-radio>
</el-radio-group>
</span>
<span v-else-if="parentDeptType==='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-if="parentDeptType==='4'">
<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"
>{{dict.label}}</el-radio>
</el-radio-group>
</span>
<span v-else-if="parentDeptType==='2'">
<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=='3'"
>{{dict.label}}</el-radio>
</el-radio-group>
</span>
<span v-else-if="parentDeptType==='3'">
<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==ruleForm.deptType"
>{{dict.label}}</el-radio>
</el-radio-group>
</span>
</span>
<span v-else>
<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==ruleForm.deptType"
>{{dict.label}}</el-radio>
</el-radio-group>
</span>
</span>
</el-form-item>
@ -213,7 +256,7 @@
<template v-if="ruleForm.deptType !== '3'">
<el-row >
<el-col :span="20">
<el-form-item label="计费方式" prop="">
<el-form-item label="计费方式" prop="turnoverType">
<span v-if="isTopDept">
<el-radio-group :disabled="isTopDept" v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
<el-radio v-if="ruleForm.turnoverType=='1'" label=1>无限制</el-radio>
@ -294,7 +337,7 @@
<el-col :span="8">
<el-form-item label="可跑流量">
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
<template slot="append"></template>
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
@ -315,7 +358,7 @@
<el-col :span="8">
<el-form-item label="实际交易量">
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
<template slot="append"></template>
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
@ -323,7 +366,7 @@
<el-col :span="8">
<el-form-item label="系统服务费">
<el-input v-model="ruleForm.prepaidAmount" :disabled="true">
<template slot="append"></template>
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
@ -369,7 +412,7 @@
<el-col :span="8">
<el-form-item label="价格">
<el-input :disabled="isTopDept" v-model="ruleForm.prepaidAmount">
<template slot="append"></template>
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
@ -503,14 +546,14 @@
:data="dutyList">
<el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
<el-table-column label="角色名称" align="center" prop="dutyName" />
<el-table-column label="角色类型" align="center" prop="dutyType" >
<template slot-scope="scope">
<span v-if="scope.row.dutyType=='1'">超级管理员</span>
<span v-if="scope.row.dutyType=='2'">普通管理员</span>
<span v-if="scope.row.dutyType=='3'">油站角色</span>
<span v-if="scope.row.dutyType=='4'">公司角色</span>
</template>
</el-table-column>
<!-- <el-table-column label="角色类型" align="center" prop="dutyType" >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.dutyType=='1'">超级管理员</span>-->
<!-- <span v-if="scope.row.dutyType=='2'">普通管理员</span>-->
<!-- <span v-if="scope.row.dutyType=='3'">油站角色</span>-->
<!-- <span v-if="scope.row.dutyType=='4'">公司角色</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="所属机构" align="center" prop="deptName" />
<el-table-column label="角色状态" align="center" prop="status" >
<template slot-scope="scope">
@ -677,6 +720,7 @@
ref="menu"
node-key="id"
:check-strictly="!form1.menuCheckStrictly"
:default-checked-keys="form1.checkedKeys"
empty-text="加载中,请稍候"
:props="defaultProps1"
></el-tree>
@ -764,10 +808,20 @@ export default {
},
dicts: ['node_type'],
data() {
const equalToPassword = (rule, value, callback) => {
console.log("151515151:",this.form.password1,value)
if (this.form.password !== value) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
}
};
return {
storeNum: false,
isEditDept:true,
isTopDept:true,
parentDeptType:"",
isAdd:false,
timeFrame:[],
@ -933,6 +987,12 @@ export default {
mobile: [
{ required: true, message: '手机号不能为空', trigger: 'blur' },
],
deptType: [
{ required: true, message: '机构类型不能为空', trigger: 'blur' },
],
turnoverType: [
{ required: true, message: '计费方式不能为空', trigger: 'blur' },
],
deptName: [
{ required: true, message: '请输入机构名称', trigger: 'blur' },
@ -971,6 +1031,11 @@ export default {
{required: true, message: "用户密码不能为空", trigger: "blur"},
{min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur'}
],
password1: [
{required: true, message: "用户密码不能为空", trigger: "blur"},
{ required: true, validator: equalToPassword, trigger: "blur" },
{min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur'}
],
email: [
{
type: "email",
@ -1056,6 +1121,8 @@ export default {
submitForm1: function() {
this.$refs["form1"].validate(valid => {
if (valid) {
console.log(this.deptType)
this.form1.deptType = this.deptType
if (this.form1.dutyId) {
this.form1.menuIds = this.getMenuAllCheckedKeys();
updateRole(this.form1).then(response => {
@ -1137,6 +1204,7 @@ export default {
// if (data.dutyType == '4') val = 2;
// const roleMenu = this.getMenuTreeselect(val);
const roleId = data.dutyId
this.form1.menuCheckStrictly = false
getRole(roleId).then(response => {
this.form1.roleName = response.data.roleInfo.name;
this.form1.roleType = response.data.roleInfo.type;
@ -1146,7 +1214,8 @@ export default {
this.openDuty = true;
this.title = "修改角色";
let checkedKeys = response.data.checkedKeys
this.form1.checkedKeys = checkedKeys
this.getMenuTreeselect(response.data.roleInfo.type)
// this.$nextTick(() => {
// roleMenu.then(res => {
// checkedKeys.forEach((v) => {
@ -1221,14 +1290,14 @@ export default {
//
const feeRate = new BigNumber(this.ruleForm.rates?this.ruleForm.rates:0);
if (feeRate == 0) return
const fee = turnoverLimit.dividedBy(feeRate.dividedBy(100));
const fee = turnoverLimit.dividedBy(feeRate.dividedBy(0.01));
this.ruleForm.turnoverLimit = fee.toFixed(2)
}else if (this.ruleForm.turnoverType === '4'){
//
const turnoverLimit = new BigNumber(this.ruleForm.turnoverLimit?this.ruleForm.turnoverLimit:0);
const feeRate = new BigNumber(this.ruleForm.rates?this.ruleForm.rates:0);
if (feeRate == 0) return
const fee = turnoverLimit.times(feeRate.dividedBy(100));
const fee = turnoverLimit.times(feeRate.dividedBy(0.01));
this.ruleForm.prepaidAmount = fee.toFixed(2)
}
},
@ -1267,6 +1336,7 @@ export default {
console.log('点树',data)
this.isAdd = false
this.cleanUp()
let flag = true
@ -1283,6 +1353,7 @@ export default {
this.queryParams.deptId = data.id
this.queryParams1.storeId = data.id
this.deptType = data.deptType
this.parentDeptType = data.deptType
//
this.appedit(data.id,data.label)
//
@ -1391,13 +1462,10 @@ export default {
// },
handleClick(tab, event) {
console.log(this.activeName)
if (this.activeName=="list"){
if (this.activeName==="list"){
this.onlyGetUser()
}
if (this.activeName=="duty"){
this.getDutyList()
}
if (this.activeName=="info"){
if (this.activeName==="duty"){
this.getDutyList()
}
},
@ -1412,11 +1480,11 @@ export default {
this.timeFrame = []
this.beginTime = ""
this.endTime = ""
this.addNode(data.id,data.label)
this.parentDeptType = data.deptType
this.addNode(data.id,data.label,data.deptType)
// console.log(this.pdinfo)
event.stopPropagation();
this.isAdd = true
//
},
cleanRuleForm() {
@ -1434,13 +1502,13 @@ export default {
}
},
//
addNode(id,label) {
addNode(id,label,deptType) {
let _this = this
//
this.isClick = false
this.ruleForm.deptType = "3"
this.ruleForm.deptType = deptType
this.$nextTick(() => {
console.log("新增树的返回222", this.ruleForm);
console.log("新增树的返回222", this.ruleForm,id,label);
});
// _this.ruleForm.deptType = '1'
@ -1815,6 +1883,7 @@ export default {
app.form.roleIds = Number(app.form.roleIds);
app.form.password1 = row.password
//
let permissionType

View File

@ -75,6 +75,7 @@
<el-table-column label="厂家名字" align="center" prop="companyName" />
<el-table-column label="二维码SN号" align="center" prop="tagCodeSn" />
<el-table-column label="码牌SN号" align="center" prop="snCode" />
<el-table-column label="码牌终端号" align="center" prop="terminalNumber" />
<el-table-column label="是否已绑定油站" align="center" prop="status" >
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status == 1">已绑</el-tag>
@ -227,6 +228,15 @@ export default {
form: {},
//
rules: {
companyName: [
{ required: true, message: "公司名称不能为空", trigger: "blur" },
],
tagCodeSn: [
{ required: true, message: "二维码SN不能为空", trigger: "blur" },
],
snCode: [
{ required: true, message: "码牌SN不能为空", trigger: "blur" },
]
}
};
},

View File

@ -140,7 +140,7 @@ public class BackendDutyController extends BaseController {
String token = request.getHeader("Access-Token");
List<Integer> menuIds = (List) param.get("menuIds");
String name = param.get("roleName").toString();
String type = param.get("roleType").toString();
String type = param.get("deptType").toString();
String status = param.get("status").toString();
String description = param.get("description").toString();
if (ObjectUtil.isEmpty(param.get("storeId"))){