自定义白名单修改

main
bmpandlcm 11 months ago
parent 258f6838d1
commit fcdd120cea

@ -33,3 +33,11 @@ export const addAccountData = data => post("/WhiteListManageSys/whiteAccount/add
export const updateAccountById = data => post("/WhiteListManageSys/whiteAccount/updateById", data,"")
//批量删除删除
export const batchDelAccountDatas = data => post("/WhiteListManageSys/whiteAccount/batchDelDatas", data,"")
//白名单自定义管理查询
export const getCarnoDicByPage = data => post("/WhiteListManageSys/whiteCarnoDic/getCarnoDicByPage", data,"")
//白名单自定义管理新增
export const addCarnoDicData = data => post("/WhiteListManageSys/whiteCarnoDic/addCarnoDicData", data,"")
//白名单自定义管理删除
export const batchDelCarnoDicDatas = data => post("/WhiteListManageSys/whiteCarnoDic/batchDelCarnoDicDatas", data,"")

@ -2,6 +2,7 @@ import * as vueRouter from "vue-router";
import NotFound from '../../views/ErrorPage/404.vue';
import whiteListManage from '../../views/dev/detail/whiteListManage.vue';
import whiteCarnoLogManage from '../../views/dev/detail/whiteCarnoLogManage.vue';
import whiteCarNoDic from '../../views/dev/detail/whiteCarNoDic.vue';
@ -13,6 +14,9 @@ const routes = [
}, {
path: '/log',
component: whiteCarnoLogManage,// 这个是动态的
}, {
path: '/dic',
component: whiteCarNoDic,// 这个是动态的
},{
path: '/WhiteListManageSys/index',
component: whiteListManage,// 这个是动态的
@ -25,6 +29,9 @@ const routes = [
},{
path: '/WhiteListManageSys/whiteCarnoLogManage',
component: whiteCarnoLogManage
},{
path: '/WhiteListManageSys/whiteCarNoDic',
component: whiteCarNoDic
},{
path: '/WhiteListManageSys:pathMatch(.*)',
redirect: '/WhiteListManageSys/404'

@ -1,4 +1,4 @@
<!-- 数据核验子菜单页面未知状态-->
<!-- 单位信息管理-->
<template>
<div class="detail" style="width:100%;height: 100%;position: inherit">
<div style="height:6%;width:100%;position: inherit;">

@ -0,0 +1,284 @@
<!-- 自定义白名单-->
<template>
<div class="detail_dic" style="width:100%;height: 100%;position: inherit;">
<div style="padding-bottom:10px;">
<el-button type="primary" @click="addData" size="default" :icon="addButton">新增</el-button>
<el-button type="primary" @click="batchDelData" size="default" :icon="deleteButton">删除</el-button>
</div>
<div style="height:88%;width:100%;position:relative">
<div style="height: 100%;width: 100%">
<el-table :data="tableData" width="100%" height="100%" id="table_el" :header-cell-style="{background:'rgb(213,216,217)',align:'center'}" border
@selection-change="selectDatas"
@select-all="selectAllData"
v-loading="tableLoading"
:row-style="rowStyle"
:cell-style="cellStyle" >
<el-table-column type="selection" width="55" align="center"/>
<el-table-column prop="memo" label="memo" v-if="false" align="center"/>
<el-table-column type="index" label="序号" align="center"/>
<el-table-column prop="dicname" label="字典名称" :show-overflow-tooltip="true" width="170px" :formatter="dateFormatterSSS" resizable align="center" />
<el-table-column prop="discrp" label="组合描述" :show-overflow-tooltip="true" width="1600px" resizable align="center" />
<el-table-column label="操作" fixed="right" align="center">
<template #default="scope">
<el-button type="primary" :icon="editButton" size="small" @click="editData(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
</div>
<div style="height: 5%;width: 100%;position:fixed">
<!-- 分页 -->
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[15, 30,50,100]"
:page-size="pageSize"
:total="totalCount"
layout="total, sizes, prev, pager, next, jumper"
style="width: 90%;height:5%;padding: 0;position:inherit;margin-top:10px;bottom: 0;font-size: x-small">
</el-pagination>
</div>
</div>
</div>
<!-- 新增页面-->
<el-dialog v-model="showDic" title="自定义白名单"
width="60%" align-center :close-on-click-modal="closeModal" :show-close="closeModal">
<whiteDicAdd ref="whiteDicAdd" style="width:100%;height: 100%" :key="now()" ></whiteDicAdd>
<template #footer>
<div class="dialog-footer" style="text-align: right">
<el-button @click="cancelUpdateFormData"></el-button>
<el-button type="primary" :icon="saveButton" @click="saveUpdateFormData"></el-button>
</div>
</template>
</el-dialog>
<!-- 详情页面-->
<el-dialog v-model="showDetailDic" title="自定义白名单"
width="40%" align-center :close-on-click-modal="closeModal">
<el-form >
<el-form-item label="字典名称:">{{detailDicName}}</el-form-item>
<el-form-item label="组合描述:">{{detailDicDescrb}}</el-form-item>
</el-form>
</el-dialog>
</template>
<style>
body{
width: 100% !important;
height: 100% !important;
}
html{
width: 100% !important;
height: 100% !important;
}
#table_el{
height: 100% !important;
}
.el-table .cell{
padding: 0 !important;
}
</style>
<script >
import { ref} from "vue";
import { ElMessage, ElMessageBox } from 'element-plus'
import {getCarnoDicByPage, batchDelCarnoDicDatas} from "../../../util/api/api.js";
import {Search,Delete,Refresh,Edit,Plus,Position,Expand,Collection} from '@element-plus/icons-vue'
import whiteDicAdd from "@/views/dev/detail/whiteDicAdd.vue"
import whiteListBatchUpdate from "@/views/dev/detail/whiteListBatchUpdate.vue"
import {now} from "moment";
var _this;
export default{
data(){
return {
currentPage: 1,
pageSize: 20,
totalCount:0,
selectData:[],
tableData :ref([]),
deleteButton:Delete,
saveButton:Collection,
addButton:Plus,
dioTitle:"新增",
tableLoading:true,
isDisabled:false,
refreshButton:Refresh,
showDic:false,
batchParamsIds:"",
updateDatas:{},
doubleclikIndex:-1,//
detailDicName:"",
detailDicDescrb:"",
showDetailDic:false,
closeModal:false,
}},
methods:{
now,
handleSizeChange(val) {
this.pageSize = val;
this.isLoding=true;
getTableDatas();
},handleCurrentChange(val) {
this.currentPage = val;
this.isLoding=true;
getTableDatas();
},addData(){//
this.showDic=true;
},editData(row){
this.showDetailDic=true;
this.detailDicName= row.dicname;
this.detailDicDescrb= row.discrp;
},cancelUpdateFormData(){
this.showDic=false;
}, saveUpdateFormData(){
this.$refs["whiteDicAdd"].validate((valid) => {
if(valid){
this.$refs["whiteDicAdd"].saveBatchData((code,msg)=>{
if(code===1){
alert(msg);
getTableDatas();
this.showDic=false;
}else{
alert(msg);
}
});
}
})
},batchDelData(){//
if(this.selectData.length<1){
alert("请选择数据!");
}else{
ElMessageBox.confirm(
'此操作将永久删除数据, 是否继续?',
'提示',
{
confirmButtonText: '删除',
cancelButtonText: '取消',
type: 'warning',
showClose:false,
closeOnClickModal:false
}
)
.then(() => {
batchDelData(this.selectData);
})
.catch(() => {
ElMessage({
type: 'info',
message: '取消删除',
})
})
}
},selectDatas(selection){
if(selection.length>0){
for(var k=0;k<selection.length;k++){
var _selection=selection[k];
_selection.opermano=(localStorage.getItem("manno")===null || localStorage.getItem("manno")==='null' || localStorage.getItem("manno")===undefined ?"test":localStorage.getItem("manno"));
_selection.opermaname=(localStorage.getItem("man")===null || localStorage.getItem("man")==='null' || localStorage.getItem("man")===undefined ?"test":localStorage.getItem("man"));
this.selectData.push(_selection);
}
}else{
this.selectData=ref([]);
}
},selectAllData(selection){
if(selection.length>0){
for(var k=0;k<selection.length;k++){
var _selection=selection[k];
_selection.opermano=(localStorage.getItem("manno")===null || localStorage.getItem("manno")==='null' || localStorage.getItem("manno")===undefined ?"test":localStorage.getItem("manno"));
_selection.opermaname=(localStorage.getItem("man")===null || localStorage.getItem("man")==='null' || localStorage.getItem("man")===undefined ?"test":localStorage.getItem("man"));
this.selectData.push(_selection);
}
}else{
this.selectData=ref([]);
}
},rowStyle(row,rowIndex){
if(this.doubleclikIndex===row.row.RN){
return {
"background-color":"lightcyan",
"cursor":"pointer"
}
}
return {
"cursor":"pointer"
}
},cellStyle({row,column,rowIndex,columnIndex}){
if(columnIndex ==12 || columnIndex ==2 ){
if(row.promperty==="已过期"){
return {
"color":"red"
}
}else if(row.promperty==="将到期"){
return {
"color":"orange"
}
}
}
return {
"cursor":""
}
},cancelFormData(){
this.showAddCondiftion=false;
},resetFormData(){
this.$refs["whiteListAdd"].resetForm();
}, saveFormData(){
this.$refs["whiteListAdd"].validate((valid) => {
if(valid){
this.$refs["whiteListAdd"].saveData((code,msg)=>{
if(code===1){
alert(msg);
getTableDatas();
this.showAddCondiftion=false;
}else{
alert(msg);
}
});
}
})
}
},components:{
Delete,
Search,
Refresh,
Edit,
Plus,
whiteDicAdd,
whiteListBatchUpdate,
Position,
Expand,
Collection
},
mounted(){
_this=this;
getTableDatas();
}
}
function getTableDatas(){
var paramsData={
"pageSize":_this.pageSize,
"pageNum":_this.currentPage
}
getCarnoDicByPage(paramsData).then(res=>{
_this.tableLoading=false;
if(res.code<=0){
return false;
}else{
_this.totalCount=res.total;
_this.tableData=res.records;
_this.isLoding=false;
}
})
}
function batchDelData(delDatas){
batchDelCarnoDicDatas(delDatas).then(res=>{
_this.tableLoading=false;
if(res.code<=0){
alert(res.data);
return false;
}else{
alert(res.data);
getTableDatas();
_this.selectData=[];
}
})
}
</script>

@ -1,4 +1,4 @@
<!-- 数据核验子菜单页面未知状态-->
<!-- 白名单操作日志-->
<template>
<div class="detail" style="width:100%;height: 100%;position: inherit">
<div style="height:6%;width:100%;position: inherit;">

@ -0,0 +1,215 @@
<!-- 白名单数据新增以及修改-->
<template>
<div style="width:100%;max-height: 90%;">
<div class="first" style="width:100%;height: 10%;border-bottom: 1px solid #ccc">
<p class="dic_p">字典名称</p>
<el-input v-model="dicName" style="margin-bottom: 10px"></el-input>
</div>
<div class="second" style="width:100%;height: 70%;display: flex">
<div style="width:20%;height: 100%;border: 1px solid #a3aaaf;position: relative">
<p class="dic_p">免费路段</p>
<div style="width:200px;height: 300px;overflow-y: auto;position: inherit">
<el-checkbox-group v-model="selectRoadNo" @change="showValue">
<el-checkbox v-for="(item, index) in list"
:label="item.LABEL" :key="item.VALUE" >{{item.LABEL}}}</el-checkbox>
</el-checkbox-group>
</div>
</div>
<div style="width:80%;height: 70%;">
<p class="dic_p">免费站站组合</p>
<el-row>
<el-col :span="6">
<el-select v-model="roadNo"
placeholder="请选择路段"
clearable="true"
filterable="true"
class="setwidth">
<el-option
v-for="item in roadList"
:key="item.VALUE"
:label="item.LABEL"
:value="item.VALUE"
/>
</el-select>
</el-col>
<el-col :span="6">
<el-select v-model="sRoadNo"
placeholder="起始站"
clearable="true"
filterable="true"
class="setwidth">
<el-option
v-for="item in staList"
:key="item.VALUE"
:label="item.LABEL"
:value="item.VALUE"
/>
</el-select></el-col>
<el-col :span="6">
<el-select v-model="eRoadNo"
placeholder="结束站"
clearable="true"
filterable="true"
class="setwidth">
<el-option
v-for="item in staList"
:key="item.VALUE"
:label="item.LABEL"
:value="item.VALUE"
/>
</el-select>
</el-col>
<el-col :span="6">
<el-button type="primary" class="dic_button" :icon="addButton" size="small" @click="delData(scope.row)"></el-button>
</el-col>
</el-row>
<el-table :data="tableData" width="100%" height="100%" id="table_el" :header-cell-style="{background:'rgb(213,216,217)',align:'center'}" border
>
<el-table-column prop="memo" label="memo" v-if="false" align="center" />
<el-table-column prop="roadName" label="路段" :show-overflow-tooltip="true" width="100px" resizable align="center" />
<el-table-column prop="roadno" label="路段code" v-if="false" :show-overflow-tooltip="true" resizable align="center" />
<el-table-column prop="sStanName" label="起始站" :show-overflow-tooltip="true" width="100px" resizable align="center" />
<el-table-column prop="sStanNo" label="起始站code" v-if="false" :show-overflow-tooltip="true" resizable align="center" />
<el-table-column prop="eStanName" label="结束站" :show-overflow-tooltip="true" width="100px" resizable align="center" />
<el-table-column prop="eStanNo" label="结束站code" v-if="false" :show-overflow-tooltip="true" resizable align="center" />
<el-table-column label="操作" fixed="right" align="center">
<template #default="scope">
<el-button type="primary" :icon="deleteButton" size="small" @click="delData(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="third" style="width:100%;height: 20%;border-top: 1px solid #a3aaaf;">
<p class="dic_p">描述</p>
<el-input type="textarea" disabled v-model="discrb"></el-input>
</div>
</div>
</template>
<style>
body{
width: 100% !important;
height: 100% !important;
}
.dic_p{
color: #abd769;
font-family: 微软雅黑;
font-weight: bold;
font-size: larger;
}
.dic_button{
margin-top: 5px !important;
}
</style>
<script >
import {getSelectList, addCarnoDicData} from "../../../util/api/api.js";
import {Refresh, Plus, Delete} from '@element-plus/icons-vue'
var _this;
export default{
data(){
return {
dicName:"",
tableData:[],
list:[{"VALUE":"1","LABEL":"测试1"},{"VALUE":"2","LABEL":"测试2"}],
stanList:[],
roadList:[],
selectRoadNo:[],
roadNo:"",
sRoadNo:"",
eRoadNo:"",
discrb:"",
refreshButton:Refresh,
deleteButton:Delete,
addButton:Plus,
checkboxGroup1:[]
}},
methods:{
showValue(value){
console.log("==================>"+value);
console.log("==========checked1========>"+this.selectRoadNo);
},
validate(callback){
if(this.dicName ==='' || this.dicName===undefined || this.dicName===null){
callback(false,"字典名称不能为空!!!");
}
if(this.roadNo ==='' || this.roadNo===undefined || this.roadNo===null){
callback(false,"路段不能为空!!!");
}
},delData(row){
var _temptableData=this.tableData;
var _tableData=[];
for(var i=0;i<_temptableData.length;i++){
let _memo= _temptableData[i].memo;
if(_memo !==row.memo){
_tableData.push(_temptableData[i]);
}
}
this.tableData=_tableData;
},addMemoData(){
var _temptableData=this.tableData;
var isHave=false;
var _msg="";
if(this.selectRoadNo !==null && this.selectRoadNo!==undefined && this.selectRoadNo !==""){
var roads=this.selectRoadNo.split(",");
if(roads.length()>9){
isHave=true;
_msg="只能添加9个免费信息"
}
}
if(!isHave){
if(!this.sRoadNo && !this.eRoadNo){
for(var i=0;i<_temptableData.length;i++){
let _memo= _temptableData[i].memo;
let _memoN=this.roadNo+this.sRoadNo+this.eRoadNo;
if(_memo ===_memoN){
isHave=true;
_msg="已存在该免费组合信息!!!";
break;
}
}
}else{
isHave=true;
_msg="请选择起始站,结束站!!!";
}
}
if(isHave){
alert(_msg);
return ;
}else{
this.tableData.push({"memo":this.roadNo+this.sRoadNo+this.eRoadNo,"roadName":this.roadName,"roadNo":this.roadNo,"sRoadNo":this.eRoadNo ,"sStanName":"测试1","eRoadNo":this.eRoadNo ,"eStanName":"测试2"})
}
},saveData(callback){//
var paramData={};
addCarnoDicData(paramData).then(res=>{
if(res.code>0){
callback(1,"保存成功");
}else{
callback(-1,res.message);
}
})
}
},components:{
Plus,
Delete
},
mounted(){
_this=this;
let selectType={
"selectType":"ROAD"
}
getSelectList(selectType).then(res=>{
if(res.code>0){
this.list=res.data;
}
});
}
}
</script>

@ -1,4 +1,4 @@
<!-- 数据核验子菜单页面未知状态-->
<!-- 白名单数据新增以及修改-->
<template>
<div class="detail" style="width:100%;height: 100%;">
<el-form :model="updateform" label-position="left" label-width="100px" style="width: 100%"

@ -1,4 +1,4 @@
<!-- 数据核验子菜单页面未知状态-->
<!-- 白名单批量修改-->
<template>
<div class="detail" style="width:100%;height: 100%;">
<el-form :model="updateform" label-position="right" style="width: 100%"

@ -1,4 +1,4 @@
<!-- 数据核验子菜单页面未知状态-->
<!-- 白名单管理-->
<template>
<div class="detail" style="width:100%;height: 100%;position: inherit">
<div style="padding-bottom:10px;">
@ -183,7 +183,7 @@
</el-dialog>
<!-- 批量编辑页面-->
<el-dialog v-model="showbatchUpdate" title="批量编辑"
width="40%" align-center>
width="40%" align-center >
<whiteListBatchUpdate ref="whiteListBatchUpdate" style="width:100%;height: 100%" :key="now()" :BatchParamsIds="batchParamsIds"></whiteListBatchUpdate>
<template #footer>
<div class="dialog-footer" style="text-align: right">

Loading…
Cancel
Save