9642781a by xiaomiao

上报弹框样式调整整理

1 parent 4e621960
.itemForm {
position: relative;
padding: 10px;
/deep/.el-select {
width: 100%;
}
/deep/.el-form-item__error {
right: 25px;
top: 15px;
text-align: right;
pointer-events: none;
}
/deep/.el-date-editor {
width: 100%;
}
/deep/.el-date-editor--date {
width: 100%;
}
/deep/.el-cascader {
width: 100%;
}
// table 样式
/deep/.el-form-item__label {
border-right: none;
text-align: center;
padding: 0;
color: #05bbdb;
line-height: 16px;
font-size: 12px;
margin-top: 8px !important;
}
/deep/.el-form-item__content {
display: flex;
margin-right: -1px;
}
.obligee-item-name,
.receivingInfo-item-name,
.auditInfo-item-name {
background: url("~@/image/itembg.png") no-repeat;
background-size: 100% 100%;
color: #FFFFFF;
}
/deep/.el-textarea__inner {
margin: 5px;
width: 96%;
background: none;
color: #FFFFFF;
border-radius: 2px;
border: 1px solid #6BC1FC;
}
/deep/.el-input-number {
width: 100%;
}
/deep/.el-input-number__increase {
background: #05275B;
color: #FFFFFF;
border: none;
right: 7px;
top: 2px;
}
/deep/.el-input-number__decrease {
background: #05275B;
color: #FFFFFF;
border: none;
right: 7px;
bottom: 10px;
}
/deep/.el-input__inner {
margin: 5px;
width: 96%;
background: #05275B;
border-radius: 2px;
border: 1px solid #6BC1FC;
text-align: left;
}
/deep/.el-form-item {
margin-bottom: 0;
margin-top: -1px;
}
.item-label {
display: flex;
align-items: flex-end;
flex-direction: column;
font-size: 12px;
flex: 0 0 90px;
margin-right: 3px;
p {
line-height: 16px;
white-space: nowrap;
text-align: right;
}
p:nth-child(1) {
position: relative;
right: 5px;
}
}
}
\ No newline at end of file
<!--
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-17 10:25:19
-->
......@@ -18,65 +18,29 @@
</div>
</template>
<script>
import { getReceiveDataReportResult } from "@/api/dataReport.js";
export default {
components: {},
props: {
formData: {
type: Object,
default: {}
import { getReceiveDataReportResult } from "@/api/dataReport.js";
export default {
components: {},
props: {
formData: {
type: Object,
default: {}
}
},
data () {
return {
REPMSGXML: '',
ERRORINFO: '',
}
},
created () {
getReceiveDataReportResult(this.formData.bsmReport).then(res => {
let data = res.result
this.REPMSGXML = data.REPMSGXML
this.ERRORINFO = data.ERRORINFO
})
}
},
data () {
return {
REPMSGXML: '',
ERRORINFO: '',
}
},
created () {
getReceiveDataReportResult(this.formData.bsmReport).then(res => {
let data = res.result
this.REPMSGXML = data.REPMSGXML
this.ERRORINFO = data.ERRORINFO
})
}
}
</script>
<style scoped lang='scss'>
.result {
padding: 15px;
height: 100%;
/deep/.el-textarea__inner {
height: 50%;
color: #ffffff;
border: none !important;
color: #ffffff;
}
&-con {
background: #04275B;
border-radius: 2px;
padding: 10px;
box-sizing: border-box;
height: 49%;
p {
color: #2997E8;
font-size: 14px;
position: relative;
padding-left: 10px;
}
p::before {
position: absolute;
content: '';
width: 3px;
height: 10px;
background-color: #2997E8;
left: 0;
top: 3px;
}
}
}
</style>
......
......@@ -16,11 +16,5 @@ export default {
</script>
<style scoped lang="scss">
/deep/.el-textarea__inner {
height: 67vh !important;
border: none !important;
background-color: #08346F !important;
color: #ffffff;
border: none !important;
}
</style>
\ No newline at end of file
</style>
......
// .dialogCon {
// background: #031A46;
// -webkit-box-shadow: inset 0px 0px 12px 0px #02d9fd;
// box-shadow: inset 0px 0px 12px 0px #02d9fd;
// border-radius: 0px 2px 2px 2px;
// border: 1px solid #6BC1FC;
// padding: 15px;
// }
......@@ -505,6 +505,14 @@
border-radius: 2px;
border: 1px solid #6BC1FC;
margin: 0 18px 10px 18px;
// .el-form-item__label {
// color: #fff;
// }
// .el-form-item__content {
// color: #fff;
// }
}
.item-content-input {
......@@ -645,6 +653,14 @@
// 登簿日志弹出框
.entryJournal {
.el-textarea__inner {
height: 67vh !important;
border: none !important;
background-color: #08346F !important;
color: #ffffff;
border: none !important;
}
.el-tabs__header {
margin: 0;
}
......@@ -1065,12 +1081,15 @@
.informationbase {
margin: 0.1875rem 1.0417rem;
overflow-y: auto;
.form-wrapper {
padding: 0px 120px 0px;
.el-form-item {
/deep/.el-form-item__label {
color: #ffffff;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
height: 40px;
......@@ -1078,13 +1097,131 @@
border: 1px solid #6bc1fc;
}
}
.el-form-item--small.el-form-item {
margin-bottom: 16px;
}
}
.bottom-wrapper {
padding: 0px 120px 0px;
text-align: center;
}
}
// 权利人信息样式
.itemForm {
position: relative;
padding: 10px;
/deep/.el-select {
width: 100%;
}
/deep/.el-form-item__error {
right: 25px;
top: 15px;
text-align: right;
pointer-events: none;
}
/deep/.el-date-editor {
width: 100%;
}
/deep/.el-date-editor--date {
width: 100%;
}
/deep/.el-cascader {
width: 100%;
}
// table 样式
/deep/.el-form-item__label {
border-right: none;
text-align: center;
padding: 0;
color: #05bbdb;
line-height: 16px;
font-size: 12px;
margin-top: 8px !important;
}
/deep/.el-form-item__content {
display: flex;
margin-right: -1px;
}
.obligee-item-name,
.receivingInfo-item-name,
.auditInfo-item-name {
background: url("~@/image/itembg.png") no-repeat;
background-size: 100% 100%;
color: #FFFFFF;
}
/deep/.el-textarea__inner {
margin: 5px;
width: 96%;
background: none;
color: #FFFFFF;
border-radius: 2px;
border: 1px solid #6BC1FC;
}
/deep/.el-input-number {
width: 100%;
}
/deep/.el-input-number__increase {
background: #05275B;
color: #FFFFFF;
border: none;
right: 7px;
top: 2px;
}
/deep/.el-input-number__decrease {
background: #05275B;
color: #FFFFFF;
border: none;
right: 7px;
bottom: 10px;
}
/deep/.el-input__inner {
margin: 5px;
width: 96%;
background: #05275B;
border-radius: 2px;
border: 1px solid #6BC1FC;
text-align: left;
}
/deep/.el-form-item {
margin-bottom: 0;
margin-top: -1px;
}
.item-label {
display: flex;
align-items: flex-end;
flex-direction: column;
font-size: 12px;
flex: 0 0 90px;
margin-right: 3px;
p {
line-height: 16px;
white-space: nowrap;
text-align: right;
}
p:nth-child(1) {
position: relative;
right: 5px;
}
}
}
......
......@@ -85,7 +85,6 @@ input[type="number"] {
// to fixed https://github.com/ElemeFE/element/issues/2461
// refine element ui upload
.el-input.is-disabled .el-input__inner {
color: #FFFFFF !important;
background-color: transparent !important;
border: 1px solid #224C7C !important;
}
......@@ -218,4 +217,4 @@ input[type="number"] {
.el-form-item__content {
flex: 1;
}
\ No newline at end of file
}
......
......@@ -34,9 +34,9 @@
padding: 15px;
}
.el-dialog__close {
font-size: 0;
}
// .el-dialog__close {
// font-size: 0;
// }
.el-form-item {
display: flex;
......@@ -200,233 +200,6 @@
font-weight: normal;
}
// .button {
// width: 76px;
// height: 32px;
// color: #ffffff;
// cursor: pointer;
// border: 0;
// font-size: 12px;
// }
// // 按钮样式
// .cx {
// background: url("../image/btn.png") no-repeat 0 -34px;
// background-size: cover;
// }
// .cx:hover {
// background: url("../image/btn.png") no-repeat 0 -34px;
// background-size: cover;
// color: white;
// }
// .cz {
// background: url("../image/btn.png") no-repeat 0 0;
// background-size: cover;
// }
// .cz:hover {
// background: url("../image/btn.png") no-repeat 0 0;
// background-size: cover;
// color: white;
// }
// .el-button:focus {
// background: none;
// }
// .cx:focus {
// background: url("../image/btn.png") no-repeat 0 -34px;
// background-size: cover;
// color: white;
// }
// .cz:focus {
// background: url("../image/btn.png") no-repeat 0 0;
// background-size: cover;
// color: white;
// }
// 监管弹框样式
.dialogBox {
overflow: hidden;
// min-height: 90vh;
.dialog_title {
// display: flex;
// position: relative;
// font-size: 22px;
// top: -10px;
// width: 38%;
// height: 40px;
// margin-left: 28px;
// justify-content: center;
// white-space: nowrap;
b {
// font-weight: 200;
// display: inline-block;
// position: relative;
font-size: 24px;
// top: -11px;
// width: 38%;
// height: 40px;
// margin-left: 28px;
// // @include flex-center;
display: flex;
justify-content: center;
}
}
.dialog_full {
position: absolute;
top: 0;
right: 30px;
}
.el-dialog__body {
max-height: 88vh;
overflow-x: hidden;
overflow-y: hidden;
}
.dialog_footer {
margin-bottom: 8px;
display: flex;
justify-content: center;
align-items: center;
}
.dialogBox-content {
height: auto
}
.editDialogBox-box {
border-radius: 3px;
border: 1px solid #6BC1FC;
.el-form-item__label {
color: #000000;
}
.el-form-item__content {
color: #000000;
}
}
.item-content-input {
.el-input__inner {
border: none !important;
text-align: right;
}
}
.regularHeight {
display: flex;
flex-direction: column;
height: 87vh;
.editDialogBox-con,
.JsonEditor {
flex: 1;
height: 100%;
}
}
.dialog-from {
padding: 13px;
border-radius: 2px;
box-sizing: border-box;
.el-row {
display: flex;
flex-wrap: nowrap;
}
.el-col {
line-height: 18px;
display: flex;
align-items: center;
margin-bottom: 3px;
color: #000000;
border-radius: 2px;
border: 1px solid #224C7C;
span {
display: inline-block;
padding: 3px;
border-radius: 3px;
overflow: hidden;
white-space: nowrap;
text-align: left;
color: #02D9FD;
}
p {
flex: 1;
width: 100%;
padding-left: 5px;
line-height: 20px;
color: #000307;
cursor: not-allowed;
white-space: nowrap;
margin-right: 5px;
text-align: right;
}
}
}
.el-textarea__inner {
// border: 1px solid #224C7C;
// margin: 0 0 10px 0 !important;
// width: 100% !important;
// color: #dadde3 !important;
// background: transparent !important;
}
.el-input__inner {
// border: 1px solid #224C7C !important;
// margin: 0 !important;
// width: 100% !important;
// color: #111111 !important;
// background: transparent !important;
}
.el-dialog__header {
color: #070000;
// height: 46px !important;
// width: 97%;
// margin: 0 auto;
// margin-top: 2px;
}
.el-dialog__body {
padding-top: 0;
padding-bottom: 0;
// height: 95vh;
}
// .el-dialog__headerbtn {
// right: 40px;
// top: 33px;
// &:hover {
// // background: rgb(4, 172, 250);
// right: 40px;
// top: 33px;
// }
// }
.el-form-item {
display: flex;
width: 100%;
}
}
.contentCenter {
position: absolute;
top: 50%;
......@@ -448,8 +221,32 @@
// 登簿日志弹出框
.entryJournal {
.el-textarea__inner {
height: 67vh !important;
border: none !important;
background-color: #ffffff !important;
color: #000000 !important;
}
/deep/.dialog-from_header {
margin: 0 !important;
}
.el-dialog__headerbtn .el-dialog__close {
font-size: 20px;
color: white;
}
.el-dialog__header {
text-align: center;
font-size: 24px;
background-color: #3D59C4;
}
.el-tabs__header {
margin: 0;
margin: 0 !important;
}
.el-dialog {
......@@ -460,6 +257,7 @@
.el-dialog__body {
display: flex;
flex-direction: column;
padding-top: 0px;
padding-bottom: 30px;
height: 100%;
flex: 1;
......@@ -481,18 +279,20 @@
.d-center {}
.dialog_title {
top: -6px
color: white;
margin-bottom: 10px;
}
.el-tabs__item {
color: #CEF8FF !important;
background-color: #3D59C4;
display: flex;
flex-direction: row;
justify-content: center;
background: url("~@/image/tabitem.png") no-repeat;
background-size: 100% 100%;
border: none !important;
// background: url("~@/image/tabitem.png") no-repeat;
// background-size: 100% 100%;
border-radius: 3px;
border: 1px solid blue !important;
}
.el-tabs__nav {
......@@ -509,8 +309,8 @@
}
.el-tabs__item.is-active {
background: url("~@/image/tabitemse.png") no-repeat;
background-size: 100% 100%;
// background: url("~@/image/tabitemse.png") no-repeat;
// background-size: 100% 100%;
}
.from-clues-content {
......@@ -522,13 +322,16 @@
.editDialogBox-box {
position: relative;
top: 10px;
height: 100%;
// height: 100%;
}
.dialog-from {
padding-top: 0;
.el-col {
height: 40px;
line-height: 40px;
display: flex;
justify-content: space-between;
}
......@@ -549,12 +352,13 @@
}
&_header {
margin: 0 -5px !important;
// margin: 0 -5px !important;
}
&_title {
font-size: 14px;
color: #d7eaee;
font-weight: 600;
color: #000000;
margin: 3px 0;
}
}
......@@ -562,10 +366,29 @@
// 数据上报弹出框
.dataReporting {
.el-dialog__header {
width: 100%;
display: flex;
justify-content: center;
font-size: 24px;
background-color: #3D59C4;
.dialog_title {
color: white;
margin-bottom: 10px;
}
}
.el-dialog__headerbtn .el-dialog__close {
font-size: 20px;
color: white;
}
.el-dialog__body {
padding-top: 0px;
display: flex;
flex-direction: column;
padding-bottom: 30px;
}
.el-tabs {
......@@ -604,22 +427,63 @@
display: flex;
flex-direction: row;
justify-content: center;
background: url("~@/image/tabitem.png") no-repeat;
background-size: 100% 100%;
border: none !important;
// background: url("~@/image/tabitem.png") no-repeat;
// background-size: 100% 100%;
background-color: #3D59C4;
border-radius: 3px;
border: 1px solid blue !important;
}
.obligee-item-name {
background: #05275b;
color: #ffffff;
background: url("~@/image/itembg.png") no-repeat;
background-size: 100% 100%;
// background: url("~@/image/itembg.png") no-repeat;
// background-size: 100% 100%;
background-color: #3D59C4;
border-radius: 3px;
border: 1px solid blue !important;
}
.el-tabs__nav-scroll {
background: none;
}
.result {
padding: 15px;
height: 100%;
/deep/.el-textarea__inner {
height: 50%;
color: #ffffff;
border: none !important;
color: #ffffff;
}
&-con {
background: #ffffff;
border: 1px solid blue;
border-radius: 2px;
padding: 10px;
box-sizing: border-box;
height: 49%;
p {
color: #2997E8;
font-size: 14px;
position: relative;
padding-left: 10px;
}
p::before {
position: absolute;
content: '';
width: 3px;
height: 10px;
background-color: #2997E8;
left: 0;
top: 3px;
}
}
}
.el-tabs__nav {
display: flex;
border: none !important;
......@@ -645,8 +509,8 @@
}
.el-tabs__item.is-active {
background: url("~@/image/tabitemse.png") no-repeat;
background-size: 100% 100%;
// background: url("~@/image/tabitemse.png") no-repeat;
// background-size: 100% 100%;
}
.success-images {
......@@ -705,6 +569,9 @@
padding-top: 0;
.el-col {
height: 40px;
line-height: 40px;
display: flex;
justify-content: space-between;
}
......@@ -750,13 +617,13 @@
}
}
// 人员管理上下移动按钮样式
.el-button.is-disabled.el-button--text {
width: 64px;
height: 28px;
background: rgba(255, 255, 255, 0.1);
border-radius: 16px;
}
// // 人员管理上下移动按钮样式
// .el-button.is-disabled.el-button--text {
// width: 64px;
// height: 28px;
// background: rgba(255, 255, 255, 0.1);
// border-radius: 16px;
// }
// 人员管理角色管理菜单管理修改新增弹框样式
.PersonnelDialog {
......@@ -795,18 +662,7 @@
.el-dialog__header {
.dialog_title {
// display: -webkit-box;
// display: -ms-flexbox;
// display: flex;
// position: relative;
// top: -7px;
// width: 29%;
// height: 40px;
// margin-left: 28px;
// -webkit-box-pack: center;
// -ms-flex-pack: center;
// justify-content: center;
// white-space: nowrap;
b {
font-size: 16px;
......@@ -892,3 +748,121 @@
text-align: center;
}
}
// 权利人信息样式
.itemForm {
position: relative;
padding: 10px;
.el-select {
width: 100%;
}
.el-form-item__error {
right: 25px;
top: 15px;
text-align: right;
pointer-events: none;
}
.el-date-editor {
width: 100%;
}
.el-date-editor--date {
width: 100%;
}
.el-cascader {
width: 100%;
}
// table 样式
.el-form-item__label {
border-right: none;
text-align: center;
padding: 0;
color: #05bbdb;
line-height: 16px;
font-size: 12px;
margin-top: 8px !important;
}
.el-form-item__content {
display: flex;
margin-right: -1px;
}
.obligee-item-name,
.receivingInfo-item-name,
.auditInfo-item-name {
background-color: #3D59C4;
border-radius: 3px;
border: 1px solid blue !important;
color: #FFFFFF;
}
.el-textarea__inner {
margin: 5px;
width: 96%;
background: none;
color: #FFFFFF;
border-radius: 2px;
border: 1px solid #6BC1FC;
}
.el-input-number {
width: 100%;
}
.el-input-number__increase {
// background: #05275B;
color: #FFFFFF;
border: none;
right: 7px;
top: 2px;
}
.el-input-number__decrease {
// background: #05275B;
color: #FFFFFF;
border: none;
right: 7px;
bottom: 10px;
}
.el-input__inner {
margin: 5px;
width: 96%;
// background: #05275B;
border-radius: 2px;
border: 1px solid #6BC1FC;
text-align: left;
}
.el-form-item {
margin-bottom: 0;
margin-top: -1px;
}
.item-label {
display: flex;
align-items: flex-end;
flex-direction: column;
font-size: 12px;
flex: 0 0 90px;
margin-right: 3px;
p {
line-height: 16px;
white-space: nowrap;
text-align: right;
}
p:nth-child(1) {
position: relative;
right: 5px;
}
}
}
......
<!--
* @Description:
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-20 14:45:57
* @LastEditTime: 2023-03-28 14:11:01
-->
<!--
功能:结果
......@@ -18,45 +18,45 @@
</div>
</template>
<script>
import { getReceiveDataReportResult } from "@/api/dataReport.js";
export default {
components: {},
props: {
formData: {
type: Object,
default: {}
import { getReceiveDataReportResult } from "@/api/dataReport.js";
export default {
components: {},
props: {
formData: {
type: Object,
default: {}
}
},
data () {
return {
REPMSGXML: '',
ERRORINFO: '',
}
},
created () {
getReceiveDataReportResult(this.formData.bsmReport).then(res => {
let data = res.result
this.REPMSGXML = data.REPMSGXML
this.ERRORINFO = data.ERRORINFO
})
}
},
data () {
return {
REPMSGXML: '',
ERRORINFO: '',
}
},
created () {
getReceiveDataReportResult(this.formData.bsmReport).then(res => {
let data = res.result
this.REPMSGXML = data.REPMSGXML
this.ERRORINFO = data.ERRORINFO
})
}
}
</script>
<style scoped lang='scss'>
.result {
padding: 15px;
.result {
padding: 15px;
p {
color: #ffffff;
line-height: 26px;
font-size: 18px;
p {
color: #ffffff;
line-height: 26px;
font-size: 18px;
}
}
}
/deep/.el-textarea__inner {
min-height: 33vh !important;
background-color: #08346F !important;
color: #ffffff;
border: none !important;
}
</style>
\ No newline at end of file
/deep/.el-textarea__inner {
min-height: 33vh !important;
background-color: #08346f !important;
color: #ffffff;
border: none !important;
}
</style>
......
import filter from '@/utils/filter.js'
class data extends filter {
constructor() {
super()
}
columns () {
return [
{
prop: "name",
label: "区县代码",
width: 130
},
{
prop: "description",
label: "业务号"
},
{
prop: "description",
label: "受理业务名称"
},
{
prop: "description",
label: "受理业务编码"
},
{
prop: "description",
label: "受理时间"
},
{
prop: "description",
label: "登记时间"
},
{
prop: "description",
label: "接收时间"
},
{
prop: "description",
label: "读取时间"
}
]
}
}
export default new data()
<!-- 新增 & 修改角色 -->
<template>
<dialogBox
class="PersonnelDialog"
:title="title"
:width="'567px'"
:isMain="true"
@closeDialog="close"
@submitForm="submitForm"
v-model="myValue">
<div class="dialogCon">
<el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px">
<el-row :gutter="24">
<el-col :span="23">
<el-form-item label="角色名称:" prop="roleName">
<el-input
v-model="dialogForm.roleName"
clearable
placeholder="角色名称" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注:" class="form-item-mb0">
<el-input
v-model="dialogForm.roleTextArea"
clearable
:rows="10"
type="textarea"
placeholder="备注" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- <template slot="footer">
<el-button
class="cancel-button"
@click="handleCloseDialog">取消</el-button>
<el-button
type="primary"
@click="handleSaveRole()">保存</el-button>
</template> -->
</dialogBox>
</template>
<script>
import Dialog from "@/components/Dialog/";
import { api, httpAction } from '@/api/manageApi'
export default {
components: {
Dialog
},
props: {
value: { type: Boolean, default: false },
},
data () {
return {
myValue: this.value,
title: '',
showAddEditDialog: false,
menuType: '',
roleId: '',
sort: 0,
dialogForm: {
roleName: '',
roleType: '',
roleTextArea: ''
},
rules: {
roleName: [
{ required: true, message: '请输入角色名称', trigger: 'blur' }
],
},
roleTypeOptions: [
{ name: '定制', value: '定制' },
{ name: '其他', value: '其他' }
]
}
},
watch: {
value (val) {
this.myValue = val
}
},
methods: {
// 保存新增或关闭事件
submitForm () {
this.$refs.form.validate((valid) => {
if (valid) {
try {
const params = {
category: 2,
description: this.dialogForm.roleTextArea,
name: this.dialogForm.roleName,
sort: this.sort,
type: this.dialogForm.roleType
}
if (this.roleId) {
params.id = this.roleId
httpAction(`${api.roles}/${params.id}`, params, 'post').then(
(res) => {
if (res.status === 1) {
this.$message.success({
message: '修改成功',
showClose: true
})
this.dialogForm = {
roleName: '',
}
// this.showAddEditDialog = val
this.$emit('ok')
} else {
this.$message.error({
message: res.message,
showClose: true
})
}
}
)
} else {
httpAction(api.roles, params, 'post').then((res) => {
if (res.status === 1) {
this.$message.success({
message: '新增成功',
showClose: true
})
this.close()
this.$emit('ok')
// this.showAddEditDialog = val
this.$emit('ok', this.menuType)
} else {
this.$message.error({
message: res.message,
showClose: true
})
}
})
}
} catch (e) {
console.error(e)
}
}
})
},
resetForm () {
this.dialogForm = {
roleName: '',
}
this.$refs.form.resetFields()
},
close () {
this.resetForm()
this.$emit('input', false)
}
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="timedTask from-clues">
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<el-form-item v-if="BASE_API.THEME=='jg'">
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
<el-col :span="4">
<el-form-item label="业务号:" prop="ywh">
<el-input v-model="form.ywh" class="width100" clearable placeholder="业务号"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="业务名称" prop="ywmc">
<el-input v-model.trim="form.rolesName" class="width100" clearable placeholder="业务名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="开始日期" prop="startTime">
<el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
clearable v-model="form.startTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="结束日期" prop="endTime">
<el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd" clearable
v-model="form.endTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<!-- 操作按钮 -->
<el-col :span="4" class="btnColRight">
<btn nativeType="cz" @click="resetForm">重置</btn>
<btn nativeType="cx" @click="handleSearch">查询</btn>
</el-col>
</el-row>
</el-form>
</div>
<div class="from-clues-content">
<lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="200"
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="listdata" :expand-row-keys="keyList"
row-key="dictid">
</lb-table>
</div>
</div>
</template>
<script>
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
import { getRolesById, getAuthorityListAction } from "@/api/authorityManage";
import { getUserRoles } from "@/api/personnelManage";
import data from "./data";
import { getMenuInfo } from "@/api/user";
import { api, getAction, deleteAction } from "@/api/manageApi";
import tableMixin from "@/mixins/tableMixin.js";
import EditDialog from "./edit-dialog.vue";
import Roleslistdiglog from "./roleslistdiglog.vue";
import { mapGetters } from "vuex";
import { updateOrder } from "@/api/orders"
export default {
name: "menus",
mixins: [tableMixin],
components: {
EditDialog,
Roleslistdiglog,
},
data () {
return {
// 开始结束日期限制
pickerOptionsStart: {
disabledDate: (time) => {
if (this.form.endTime) {
return time.getTime() >= new Date(this.form.endTime).getTime()
}
}
},
// 结束日期限制
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.form.startTime) {
return time.getTime() < new Date(this.form.startTime).getTime()
}
}
},
listdata: [],
setlistdata: [],
// 表单
form: {
ywh: '',
ywmc: '',
startTime: '',
endTime: '',
currentPage: 1
},
tableData: {
columns: [
{
label: "序号",
type: "index",
width: "50",
index: this.indexMethod,
},
]
.concat(data.columns())
.concat({
prop: "state",
label: "状态",
width: '120',
render: (h, scope) => {
return (
<div>
<span class='adopt' v-show={scope.row.state == 3}>上报失败</span>
<span class='adopt' v-show={scope.row.state == 2}>上报成功</span>
<span class='warehousing' v-show={scope.row.state == 1}>接入上报异常</span>
</div>
)
}
})
.concat([]),
},
data: [],
}
},
created () {
this.getTableData();
},
mounted () { },
methods: {
//查询
searchQuery () {
if (this.form.rolesName) {
this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName);
} else {
this.getTableData()
}
},
childrenFn (arr, key) {
let searchTree = [];
arr.forEach((item, index) => {
if (item.name.indexOf(key) != -1) {
searchTree.push(item);
}
});
if (searchTree != undefined && searchTree.length != 0) {
return judgeSort(searchTree);
}
},
// 获取角色列表
getTableData () {
getRolesById([1, 2])
.then((res) => {
this.listdata = res.content;
this.listdata = judgeSort(this.listdata);
this.setlistdata = res.content;
})
.catch((e) => console.error(e));
},
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
/deep/.el-button.is-disabled.el-button--text {
width: 64px;
height: 28px;
background: rgba(255, 255, 255, 0.1);
border-radius: 16px;
}
</style>
<template>
<el-dialog
:close-on-click-modal="false"
top="0"
@click="close()"
class="roleconfiguration"
custom-class="dialogBox editDialogBox mainCenter"
:visible.sync="visible"
width="85%">
<div slot="title" class="dialog_title" ref="dialogTitle">
{{ title || "标题" }}
</div>
<div class="editDialogBox-box">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="人员配置" name="first"></el-tab-pane>
<el-tab-pane label="菜单配置" name="second"></el-tab-pane>
</el-tabs>
<lb-table
v-if="activeName == 'first'"
ref="multipleTable"
:pagination="false"
:column="usertableData.column"
:data="lastuserList"
@selection-change="handleSelectionChange"
@row-click="handleClickTableRow">
>
</lb-table>
<lb-table
:key="menukey"
v-if="activeName == 'second'"
:pagination="false"
:column="menutableData.column"
:data="lastMenuList"
row-key="id"
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
</lb-table>
</div>
<template slot="footer">
<btn nativeType="cx" type="primary" @click="handleSaveMember()">保存</btn>
<btn nativeType="cz" @click="close()">取消</btn>
</template>
</el-dialog>
</template>
<script>
import { api } from "@/api/manageApi";
import { getRoleAuthorityList, roleAuthority } from "@/api/authorityManage";
import { updateUser } from "@/api/personnelManage";
export default {
name: "",
data () {
return {
title: "人员配置",
visible: false,
menutableData: {
column: [
{
prop: "name",
width: 830,
label: "菜单名称",
}
].concat([
{
label: "权限",
render: (h, scope) => {
return (
<div>
<el-checkbox v-model={scope.row.checkArr[0].value}
disabled={scope.row.checkArr[0].disabled}
label={scope.row.checkArr[0].name} onChange={(checked) => {
this.changeCheck(checked, scope.row.checkArr[0].id, scope);
}} />
<el-checkbox v-model={scope.row.checkArr[1].value}
disabled={scope.row.checkArr[0].disabled}
label={scope.row.checkArr[1].name}
onChange={(checked) => {
this.changeCheck(checked, scope.row.checkArr[1].id, scope);
}} />
</div>
);
},
},
]),
},
usertableData: {
column: [
{
type: "selection",
width: 330,
},
{
prop: "name",
width: 330,
label: "姓名",
},
{
prop: "loginName",
label: "用户名",
},
],
},
// 角色id
roleId: "",
menuList: [], // 菜单列表
menukey: 0,
activeName: "first",
lastuserList: [], // 人员表格数据
lastMenuList: [], // 重构完成的菜单表格数据
usermultipleSelection: [],
// 选中菜单列表
checkArr: [], // 重构操作符列表
authorityList: [], // 授权回显数组
checklistbor: [],
// 授权对象数据
menuprams: {},
// 系统code
selectedSubsystemCode: ""
};
},
computed: {},
created () {
},
mounted () {
},
methods: {
// 人员配置点击行勾选数据
handleClickTableRow (row, event) {
this.checkNum = 0;
this.isCheck = false;
if (event.label == "操作") {
return;
} else {
if (row.status == "0") {
return;
} else {
if (this.usermultipleSelection.length > 0) {
if (
JSON.stringify(this.usermultipleSelection).indexOf(
JSON.stringify(row)
) == -1
) {
this.usermultipleSelection.push(row);
this.$refs.multipleTable.toggleRowSelection(row, true);
} else {
this.usermultipleSelection.map((item, index) => {
if (item.id == row.id) {
this.usermultipleSelection.splice(index, 1);
this.$refs.multipleTable.toggleRowSelection(row, false);
}
});
}
} else {
this.usermultipleSelection.push(row);
this.$refs.multipleTable.toggleRowSelection(row, true);
}
}
}
if (this.usermultipleSelection.length > 0) {
this.checkNum = this.usermultipleSelection.length;
this.isCheck = true;
} else {
this.isCheck = false;
}
},
// 获取授权主体的菜单权限
// getMenuAuthorityList
menulist (operationList, id, Code, menutablelistData, operationCodes) {
this.selectedSubsystemCode = Code
this.menuList = menutablelistData;
getRoleAuthorityList(
id,
operationList.toString(),
Code + '_MENU'
).then(res => {
if (res.status === 1) {
this.authorityList = res.content
this.getRecursionTreeData(this.menuList, this.authorityList, operationCodes)
this.getAuthorizedInfo()
// this.setCheckAllArr()
// this.getAuthorizedInfo()
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
},
/**
* 递归渲染列表数据
* list:原始数组
* authorityList:已授权数组
*/
getRecursionTreeData (list, authorityList, operationCodes) {
++this.menukey
this.checkArr = []
for (const k in operationCodes) {
const obj = {}
obj.name = operationCodes[k]
obj.id = k
obj.value = false
obj.disabled = false
// obj.isAll = false;
this.checkArr.push(obj)
}
for (const [index, item] of Object.entries(list)) {
this.setAuthorizedConditions(
authorityList,
this.$deepCopy(this.checkArr),
item
)
if (
item.children &&
item.children !== null &&
item.children.length !== 0
) {
item.children.forEach((child, j) => {
this.setAuthorizedConditions(
authorityList,
this.$deepCopy(this.checkArr),
child
)
})
this.getRecursionTreeData(item.children, authorityList, operationCodes)
}
}
this.lastMenuList = list
// this.setCheckAllArr(list)
},
// 授权条件
setAuthorizedConditions (authorityList, checkArr, item) {
if (this.roleId === '') {
checkArr.forEach(ele => {
ele.disabled = true
ele.value = false
})
} else {
if (authorityList.length !== 0) {
if (authorityList[0].superPermission === true) {
checkArr.forEach(ele => {
ele.value = true
ele.disabled = true
})
} else {
const repeatArr = authorityList.filter(authorityItem => {
return authorityItem.resourceUri === item.id
})
repeatArr.forEach(element => {
checkArr.forEach(ele => {
if (element.operationCode === ele.id) {
ele.value = true
if (this.roleId !== element.subjectId) {
ele.disabled = true
}
}
})
})
}
}
}
this.$set(item, 'checkArr', this.$deepCopy(checkArr))
},
// 获取拼接授权信息
getAuthorizedInfo () {
const lastArr = []
const authorizedList = []
const wholeArr = this.$deepCopy(this.lastMenuList)
const arr = this.$treeConvertToArr(wholeArr)
arr.forEach(ele => {
ele.checkArr.forEach(val => {
if (val.value === true && val.disabled === false) {
const obj = {
operationCode: val.id,
name: ele.name,
id: ele.id
}
lastArr.push(obj)
}
})
})
lastArr.forEach(element => {
authorizedList.push({
operationCode: element.operationCode, // 标识符
productCode: this.selectedSubsystemCode, // 子系统code
resourceCategoryCode: this.selectedSubsystemCode + '_MENU', // 资源类别code默认为MENU
resourceName: element.name,
resourceUri: element.id, // 授权菜单id
subjectId: this.roleId, // 授权对象id
subjectType: 'ROLE' // 授权对象类别
})
})
this.menuprams = {
subjectId: this.roleId,
authorizedList: authorizedList
}
},
// 获取人员列表做筛选
personlist (a, rid) {
this.roleId = rid;
this.visible = true;
this.lastuserList = a;
this.lastuserList.forEach((item, index) => {
if (item.selectStatus === 0) {
this.$nextTick(async () => {
await this.$refs.multipleTable
if (this.$refs.multipleTable) {
this.$refs.multipleTable.toggleRowSelection(
this.lastuserList[index],
true
);
}
});
}
});
},
// 关闭事件
close () {
this.visible = false;
},
// 保存事件
handleSaveMember () {
// 人员授权
const idList = this.usermultipleSelection.map((item) => {
return item.id;
})
updateUser(this.roleId, idList).then((res) => {
if (res.status === 1) {
this.$message.success({ message: "保存成功", showClose: true });
this.visible = false;
} else this.$message.error({ message: res.message, showClose: true });
});
// 菜单授权
roleAuthority(
this.menuprams.subjectId,
this.menuprams.authorizedList
).then((res) => {
if (res.status === 1) {
this.$message.success({
message: res.message,
})
// this.authorizedContChange()
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
},
// 勾选人员事件
handleSelectionChange (val) {
this.lastuserList.forEach((element, index) => {
delete this.lastuserList[index].selectStatus
});
this.usermultipleSelection = val;
this.lastuserList.forEach((element, index) => {
this.usermultipleSelection.forEach(element1 => {
if (element.id == element1.id) {
this.lastuserList[index].selectStatus = 0
}
});
});
},
// 数据筛选
setarrdata (scope, arr) {
arr.forEach((item, index, arr) => {
if (item.id == scope.row.id) {
this.checklistbor = [...arr]
} else if (item.id !== scope.row.id && item.children) {
this.setarrdata(scope, item.children)
}
})
},
// 勾选菜单事件
changeCheck (flag, checkId, scope) {
this.checklistbor = []
this.setarrdata(scope, this.lastMenuList)
const parents = this.$findParent(this.lastMenuList, scope.row.parentId)
const childs = this.$findChildren(this.lastMenuList, scope.row.id)
this.$setChildArr(
this.lastMenuList,
scope.row.id,
checkId,
flag,
this.checklistbor,
parents,
childs
)
this.getAuthorizedInfo()
},
handleClick (tab, event) {
this.lastuserList.forEach((item, index) => {
if (item.selectStatus === 0) {
this.$nextTick(async () => {
await this.$refs.multipleTable
if (this.$refs.multipleTable) {
this.$refs.multipleTable.toggleRowSelection(
this.lastuserList[index],
true
);
}
});
}
});
}
},
};
</script>
<style scoped lang="scss">
/deep/.dialogBox .el-dialog__header {
height: 59px !important;
}
</style>
......@@ -159,13 +159,14 @@
},
},
{
width: "130",
width: "200",
label: "移动",
render: (h, scope) => {
return (
<div>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isTop}
onClick={() => {
this.moveUpward(scope.$index, scope.row);
......@@ -175,6 +176,7 @@
</el-button>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isBottom}
onClick={() => {
this.moveDown(scope.$index, scope.row);
......@@ -187,13 +189,14 @@
},
},
{
width: "100",
width: "200",
label: "操作",
render: (h, scope) => {
return (
<div>
<el-button
type="text"
class='resetbtnColor'
style="margin-right:10px"
onClick={() => {
this.handleAddSubordinate(scope.row);
......@@ -203,6 +206,7 @@
</el-button>
<el-button
type="text"
class='delColor'
style="margin-left:0"
onClick={() => {
this.handleMinus(scope.$index, scope.row);
......
......@@ -208,9 +208,9 @@
message: res.message,
showClose: true
})
this.resetForm()
close()
this.$emit('ok')
} else {
this.$message.error({ message: res.message, showClose: true })
}
......
......@@ -29,181 +29,182 @@
</div>
</template>
<script>
// 定时任务
import data from "./data";
import { deleteAction, getAction, api } from "@/api/manageApi";
import EditDialog from "./edit-dialog.vue";
import { mapGetters } from "vuex";
import { getMenuInfo } from "@/api/user";
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
export default {
name: "menus",
components: {
EditDialog,
},
data () {
return {
isDialog: false,
tablelistData: [],
listData: [],
resourceCategoryId: "",
taskData: null,
form: {
menuName: "",
},
title: "",
queryParam: {},
selectType: "0",
queryName: "",
organizationId: "", // 组织机构ID
departmentId: "", // 部门ID
departmentList: [], // 部门列表
levelList: [], // 职务级别
sexList: [],
// 定时任务
import data from "./data";
import { deleteAction, getAction, api } from "@/api/manageApi";
import EditDialog from "./edit-dialog.vue";
import { mapGetters } from "vuex";
import { getMenuInfo } from "@/api/user";
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
export default {
name: "menus",
components: {
EditDialog,
},
data () {
return {
isDialog: false,
tablelistData: [],
listData: [],
resourceCategoryId: "",
taskData: null,
form: {
menuName: "",
},
title: "",
queryParam: {},
selectType: "0",
queryName: "",
organizationId: "", // 组织机构ID
departmentId: "", // 部门ID
departmentList: [], // 部门列表
levelList: [], // 职务级别
sexList: [],
selectionList: [],
tableData: {
columns: [].concat(data.columns()).concat([
{
label: "操作",
width: 380,
render: (h, scope) => {
return (
<div>
<el-button
type="text"
class='successColor'
onClick={() => {
this.handleEdit(scope.row);
}}
>
修改
</el-button>
selectionList: [],
tableData: {
columns: [].concat(data.columns()).concat([
{
label: "操作",
width: 380,
render: (h, scope) => {
return (
<div>
<el-button
type="text"
class='successColor'
onClick={() => {
this.handleEdit(scope.row);
}}
>
修改
</el-button>
<el-button
type="text"
class='delColor'
onClick={() => {
this.handleDelete(scope.row.id, scope.row.name);
}}
>
删除
</el-button>
</div>
);
<el-button
type="text"
class='delColor'
onClick={() => {
this.handleDelete(scope.row.id, scope.row.name);
}}
>
删除
</el-button>
</div>
);
},
},
},
]),
data: [],
},
tableUrl: api.menus, // 菜单接口地址
meumurlid: api.subsystem,// 项目id接口地址
productId: ""//项目id
};
},
created () {
this.getTableList();
},
computed: {
...mapGetters(["products"])
},
methods: {
//查询
searchQuery () {
if (this.form.menuName) {
this.tablelistData = this.childrenFn(this.listData, this.form.menuName);
} else {
this.getTableList()
}
]),
data: [],
},
tableUrl: api.menus, // 菜单接口地址
meumurlid: api.subsystem,// 项目id接口地址
productId: ""//项目id
};
},
created () {
this.getTableList();
},
childrenFn (arr, key) {
const that = this;
let searchTree = [];
arr.forEach((item, index) => {
if (item.children != undefined && item.children.length != 0) {
let leaf = that.childrenFn(item.children, key);
if (leaf != undefined) {
let { name, code, resourceCategoryId, id, iproductId, operations, metadata } = item;
let parentObj = {
code, name, resourceCategoryId, id, iproductId, operations, metadata, children: leaf
};
searchTree.push(parentObj);
computed: {
...mapGetters(["products"])
},
methods: {
//查询
searchQuery () {
if (this.form.menuName) {
this.tablelistData = this.childrenFn(this.listData, this.form.menuName);
} else {
this.getTableList()
}
},
childrenFn (arr, key) {
const that = this;
let searchTree = [];
arr.forEach((item, index) => {
if (item.children != undefined && item.children.length != 0) {
let leaf = that.childrenFn(item.children, key);
if (leaf != undefined) {
let { name, code, resourceCategoryId, id, iproductId, operations, metadata } = item;
let parentObj = {
code, name, resourceCategoryId, id, iproductId, operations, metadata, children: leaf
};
searchTree.push(parentObj);
} else {
if (item.name.indexOf(key) != -1) {
searchTree.push(item);
}
}
} else {
if (item.name.indexOf(key) != -1) {
searchTree.push(item);
}
}
} else {
if (item.name.indexOf(key) != -1) {
searchTree.push(item);
}
});
if (searchTree != undefined && searchTree.length != 0) {
return searchTree;
}
});
if (searchTree != undefined && searchTree.length != 0) {
return searchTree;
}
},
// 加载表格数据
getTableList () {
getMenuInfo(this.BASE_API.CODE).then((res) => {
if (res.code === 200) {
this.tablelistData = judgeSort(res.result)
this.listData = this.tablelistData
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
const queryOptionsid = {
conditionGroup: {
queryRelation: "AND",
conditions: [
{
property: "code",
value: sessionStorage.getItem("products"),
operator: "EQ",
},
],
},
};
const params = {
queryOptions: queryOptionsid,
};
// 获取系统id
getAction(this.meumurlid, params)
.then((res) => {
this.productId = res.content[0].id;
this.getAuthorityList(res.content[0].id, res.content[0].code)
this.selectedSubsystemCode = res.content[0].code
})
.catch((error) => {
console.log("er", error);
},
// 加载表格数据
getTableList () {
getMenuInfo(this.BASE_API.CODE).then((res) => {
console.log("/sthj", res);
if (res.code === 200) {
this.tablelistData = judgeSort(res.result)
this.listData = this.tablelistData
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
},
// 新增菜单
handleAdd () {
this.isDialog = true
this.$refs.dialogForm.add();
this.$refs.dialogForm.title = "新增";
},
const queryOptionsid = {
conditionGroup: {
queryRelation: "AND",
conditions: [
{
property: "code",
value: this.BASE_API.CODE,
operator: "EQ",
},
],
},
};
const params = {
queryOptions: queryOptionsid,
};
// 获取系统id
getAction(this.meumurlid, params)
.then((res) => {
this.productId = res.content[0].id;
this.getAuthorityList(res.content[0].id, res.content[0].code)
this.selectedSubsystemCode = res.content[0].code
// 修改
handleEdit (record) {
this.isDialog = true
this.$refs.dialogForm.edit(record);
this.$refs.dialogForm.title = "修改";
},
// 删除
handleDelete (id, content) {
this.$confirm(
`<div class="customer-message-wrapper">
})
.catch((error) => {
console.log("er", error);
})
},
// 新增菜单
handleAdd () {
this.isDialog = true
this.$refs.dialogForm.add();
this.$refs.dialogForm.title = "新增";
},
// 修改
handleEdit (record) {
this.isDialog = true
this.$refs.dialogForm.edit(record);
this.$refs.dialogForm.title = "修改";
},
// 删除
handleDelete (id, content) {
this.$confirm(
`<div class="customer-message-wrapper">
<h5 class="title">您确认要执行该操作用于以下信息:</h5>
<p class="content" aria-controls="${content}">${content}
</p>
......@@ -211,48 +212,48 @@ export default {
<span >无法恢复</span>
</p>
</div>`,
'执行确认',
{
dangerouslyUseHTMLString: true,
customClass: 'customer-delete',
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
.then(() => {
if (!this.tableUrl) {
this.$message.error({
message: '请设置tableUrl属性为接口地址!',
showClose: true
})
return
'执行确认',
{
dangerouslyUseHTMLString: true,
customClass: 'customer-delete',
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
const url = this.tableUrl + '/' + id
deleteAction(url).then(res => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.reloadTableData()
} else {
this.$message.error({ message: res.message, showClose: true })
)
.then(() => {
if (!this.tableUrl) {
this.$message.error({
message: '请设置tableUrl属性为接口地址!',
showClose: true
})
return
}
const url = this.tableUrl + '/' + id
deleteAction(url).then(res => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.reloadTableData()
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
})
})
.catch(() => { })
},
// 新增、编辑回显
reloadTableData () {
this.getTableList()
.catch(() => { })
},
// 新增、编辑回显
reloadTableData () {
this.getTableList()
},
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
// @import "~@/styles/public.scss";
/deep/.el-table__expand-icon {
color: #fff;
}
/deep/.el-table__expand-icon {
color: #fff;
}
</style>
......
......@@ -29,439 +29,439 @@
</div>
</template>
<script>
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
import { getRolesById, getAuthorityListAction } from "@/api/authorityManage";
import { getUserRoles } from "@/api/personnelManage";
import data from "./data";
import { getMenuInfo } from "@/api/user";
import { api, getAction, deleteAction } from "@/api/manageApi";
import tableMixin from "@/mixins/tableMixin.js";
import EditDialog from "./edit-dialog.vue";
import Roleslistdiglog from "./roleslistdiglog.vue";
import { mapGetters } from "vuex";
import { updateOrder } from "@/api/orders"
export default {
name: "menus",
mixins: [tableMixin],
components: {
EditDialog,
Roleslistdiglog,
},
data () {
return {
isDialog: false,
personlist: null,
waitMemberList: [],
keyList: [],
listdata: [],
setlistdata: [],
tableUrlroles: api.roles,
form: {
rolesName: "",
},
// 当前所选角色id
roleId: "",
title: "",
queryParam: {},
multipleSelection: [],
// 菜单列表
menutablelistData: [],
tableUrl: api.menus, // 菜单接口地址
meumurlid: api.subsystem, // 项目id接口地址
selectType: "0",
queryName: "",
organizationId: "", // 组织机构ID
departmentId: "", // 部门ID
departmentList: [], // 部门列表
levelList: [], // 职务级别
sexList: [],
operationCodes: null, // 操作符对象
operationList: [], // 获取授权列表需要提交的操作符数组
typeOptions: [
{
value: "0",
label: "姓名",
},
{
value: "1",
label: "工号",
},
{
value: "2",
label: "部门",
},
{
value: "3",
label: "机构",
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
import { getRolesById, getAuthorityListAction } from "@/api/authorityManage";
import { getUserRoles } from "@/api/personnelManage";
import data from "./data";
import { getMenuInfo } from "@/api/user";
import { api, getAction, deleteAction } from "@/api/manageApi";
import tableMixin from "@/mixins/tableMixin.js";
import EditDialog from "./edit-dialog.vue";
import Roleslistdiglog from "./roleslistdiglog.vue";
import { mapGetters } from "vuex";
import { updateOrder } from "@/api/orders"
export default {
name: "menus",
mixins: [tableMixin],
components: {
EditDialog,
Roleslistdiglog,
},
data () {
return {
isDialog: false,
personlist: null,
waitMemberList: [],
keyList: [],
listdata: [],
setlistdata: [],
tableUrlroles: api.roles,
form: {
rolesName: "",
},
],
selectionList: [],
tableData: {
columns: [
// 当前所选角色id
roleId: "",
title: "",
queryParam: {},
multipleSelection: [],
// 菜单列表
menutablelistData: [],
tableUrl: api.menus, // 菜单接口地址
meumurlid: api.subsystem, // 项目id接口地址
selectType: "0",
queryName: "",
organizationId: "", // 组织机构ID
departmentId: "", // 部门ID
departmentList: [], // 部门列表
levelList: [], // 职务级别
sexList: [],
operationCodes: null, // 操作符对象
operationList: [], // 获取授权列表需要提交的操作符数组
typeOptions: [
{
label: "序号",
type: "index",
width: "50",
index: this.indexMethod,
value: "0",
label: "姓名",
},
]
.concat(data.columns())
.concat([
{
value: "1",
label: "工号",
},
{
value: "2",
label: "部门",
},
{
value: "3",
label: "机构",
},
],
selectionList: [],
tableData: {
columns: [
{
label: "排序",
width: 300,
render: (h, scope) => {
return (
<div>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isTop}
onClick={() => {
this.updateOrder(scope.row, 'TOP');
}}
>
置顶
</el-button>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isTop}
onClick={() => {
this.updateOrder(scope.row, 'UP');
}}
>
上移
</el-button>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isBottom}
onClick={() => {
this.updateOrder(scope.row, 'DOWN');
}}
>
下移
</el-button>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isBottom}
onClick={() => {
this.updateOrder(scope.row, 'BOTTOM');
}}
>
置底
</el-button>
</div>
);
},
label: "序号",
type: "index",
width: "50",
index: this.indexMethod,
},
])
.concat([
{
label: "操作",
width: 280,
render: (h, scope) => {
return (
<div>
<el-tooltip
class="item"
effect="dark"
disabled={scope.row.type !== "Everyone"}
content="没有点击的权限"
placement="top"
>
<span>
<el-button
disabled={scope.row.type === "Everyone"}
type="text"
size="mini"
class="configurationbtnColor"
onClick={() => {
this.getList(scope.row);
}}
>
配置
</el-button>
</span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
disabled={scope.row.category !== 1}
content="系统内置角色 不允许修改"
placement="top"
>
<span>
<el-button
disabled={scope.row.category === 1}
type="text"
size="mini"
class='successColor'
onClick={() => {
this.handleAddEdit(scope.row);
}}
>
修改
</el-button>
</span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
disabled={scope.row.category !== 1}
content="系统内置角色 不允许删除"
placement="top"
>
<span>
<el-button
type="text"
disabled={scope.row.category === 1}
size="mini"
class='delColor'
// style="color:#F56C6C"
onClick={() => {
this.handleDelete(scope.row.id, scope.row.name);
}}
>
删除
</el-button>
</span>
</el-tooltip>
</div>
);
]
.concat(data.columns())
.concat([
{
label: "排序",
width: 300,
render: (h, scope) => {
return (
<div>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isTop}
onClick={() => {
this.updateOrder(scope.row, 'TOP');
}}
>
置顶
</el-button>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isTop}
onClick={() => {
this.updateOrder(scope.row, 'UP');
}}
>
上移
</el-button>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isBottom}
onClick={() => {
this.updateOrder(scope.row, 'DOWN');
}}
>
下移
</el-button>
<el-button
type="text"
class='movebtnColor'
disabled={scope.row.isBottom}
onClick={() => {
this.updateOrder(scope.row, 'BOTTOM');
}}
>
置底
</el-button>
</div>
);
},
},
])
.concat([
{
label: "操作",
width: 280,
render: (h, scope) => {
return (
<div>
<el-tooltip
class="item"
effect="dark"
disabled={scope.row.type !== "Everyone"}
content="没有点击的权限"
placement="top"
>
<span>
<el-button
disabled={scope.row.type === "Everyone"}
type="text"
size="mini"
class="configurationbtnColor"
onClick={() => {
this.getList(scope.row);
}}
>
配置
</el-button>
</span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
disabled={scope.row.category !== 1}
content="系统内置角色 不允许修改"
placement="top"
>
<span>
<el-button
disabled={scope.row.category === 1}
type="text"
size="mini"
class='successColor'
onClick={() => {
this.handleAddEdit(scope.row);
}}
>
修改
</el-button>
</span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
disabled={scope.row.category !== 1}
content="系统内置角色 不允许删除"
placement="top"
>
<span>
<el-button
type="text"
disabled={scope.row.category === 1}
size="mini"
class='delColor'
// style="color:#F56C6C"
onClick={() => {
this.handleDelete(scope.row.id, scope.row.name);
}}
>
删除
</el-button>
</span>
</el-tooltip>
</div>
);
},
}]),
},
data: [],
}
},
created () {
this.getTableData();
this.getTableList()
},
computed: {
...mapGetters(["products"])
},
mounted () { },
methods: {
//查询
searchQuery () {
if (this.form.rolesName) {
this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName);
} else {
this.getTableData()
}]),
},
data: [],
}
},
childrenFn (arr, key) {
let searchTree = [];
arr.forEach((item, index) => {
if (item.name.indexOf(key) != -1) {
searchTree.push(item);
}
});
if (searchTree != undefined && searchTree.length != 0) {
return judgeSort(searchTree);
}
created () {
this.getTableData();
this.getTableList()
},
// 获取角色列表
getTableData () {
getRolesById([1, 2])
.then((res) => {
this.listdata = res.content;
this.listdata = judgeSort(this.listdata);
this.setlistdata = res.content;
})
.catch((e) => console.error(e));
computed: {
...mapGetters(["products"])
},
// 获取菜单列表
getTableList () {
getMenuInfo(this.BASE_API.CODE).then((res) => {
if (res.code === 200) {
this.menutablelistData = judgeSort(res.result)
mounted () { },
methods: {
//查询
searchQuery () {
if (this.form.rolesName) {
this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName);
} else {
this.$message.error({ message: res.message, showClose: true })
this.getTableData()
}
})
const queryOptionsid = {
conditionGroup: {
queryRelation: "AND",
conditions: [
{
property: "code",
value: this.products,
operator: "EQ",
},
],
},
};
const params = {
queryOptions: queryOptionsid,
};
// 获取系统id
getAction(this.meumurlid, params)
.then((res) => {
this.productId = res.content[0].id;
this.getAuthorityList(res.content[0].id, res.content[0].code)
this.selectedSubsystemCode = res.content[0].code
// let queryOptions = {
// conditionGroup: {
// conditions: [
// {
// property: "productId",
// value: this.productId,
// operator: "EQ",
// },
// ],
// queryRelation: "AND",
// },
// orderBys: [{ property: "sort", direction: "desc" }],
// };
// if (!this.tableUrl) {
// console.log("请设置tableUrl属性为接口地址!");
// return;
// }
// if (this.queryOptions !== "") {
// this.queryParam.queryOptions = JSON.stringify(queryOptions);
// }
// 查询系统菜单
// getAction(this.tableUrl, this.queryParam)
// .then((res) => {
// if (res.status === 1) {
// this.loading = false;
// // this.menutablelistData = res.content;
// console.log("res.content菜单", res.content);
// } else {
// this.$message.error({ message: res.message, showClose: true });
// this.loading = false;
// }
// })
// .catch((error) => {
// console.log("er", error);
// this.loading = false;
// });
})
.catch((error) => {
console.log("er", error);
},
childrenFn (arr, key) {
let searchTree = [];
arr.forEach((item, index) => {
if (item.name.indexOf(key) != -1) {
searchTree.push(item);
}
});
},
// 获取权限列表
getAuthorityList (productId, code) {
getAuthorityListAction(productId, code).then(
res => {
if (res.status === 1) {
if (res.content.length !== 0) {
this.operationCodes = res.content[0].operations
this.operationList = []
for (var k in this.operationCodes) {
this.operationList.push(k)
}
}
if (searchTree != undefined && searchTree.length != 0) {
return judgeSort(searchTree);
}
},
// 获取角色列表
getTableData () {
getRolesById([1, 2])
.then((res) => {
this.listdata = res.content;
this.listdata = judgeSort(this.listdata);
this.setlistdata = res.content;
})
.catch((e) => console.error(e));
},
// 获取菜单列表
getTableList () {
getMenuInfo(this.BASE_API.CODE).then((res) => {
if (res.code === 200) {
this.menutablelistData = judgeSort(res.result)
} else {
this.$message.error({ message: res.message, showClose: true })
}
}
)
},
// 配置
getList (row) {
this.getTableList()
const params = {};
const queryOptions = {
conditionGroup: {
conditions: [
{
property: "organizationId",
value: row.organizationId,
operator: "EQ",
},
{
property: "departmentId",
value: row.departmentId,
operator: "EQ",
},
],
queryRelation: "AND",
},
orderBys: [{ property: "sort", direction: "desc" }],
};
params.queryOptions = JSON.stringify(queryOptions);
getUserRoles(row.id).then((res) => {
if (res.status === 1) {
this.personlist = res.content;
getAction(api.users, params).then((res) => {
})
const queryOptionsid = {
conditionGroup: {
queryRelation: "AND",
conditions: [
{
property: "code",
value: this.products,
operator: "EQ",
},
],
},
};
const params = {
queryOptions: queryOptionsid,
};
// 获取系统id
getAction(this.meumurlid, params)
.then((res) => {
this.productId = res.content[0].id;
this.getAuthorityList(res.content[0].id, res.content[0].code)
this.selectedSubsystemCode = res.content[0].code
// let queryOptions = {
// conditionGroup: {
// conditions: [
// {
// property: "productId",
// value: this.productId,
// operator: "EQ",
// },
// ],
// queryRelation: "AND",
// },
// orderBys: [{ property: "sort", direction: "desc" }],
// };
// if (!this.tableUrl) {
// console.log("请设置tableUrl属性为接口地址!");
// return;
// }
// if (this.queryOptions !== "") {
// this.queryParam.queryOptions = JSON.stringify(queryOptions);
// }
// 查询系统菜单
// getAction(this.tableUrl, this.queryParam)
// .then((res) => {
// if (res.status === 1) {
// this.loading = false;
// // this.menutablelistData = res.content;
// console.log("res.content菜单", res.content);
// } else {
// this.$message.error({ message: res.message, showClose: true });
// this.loading = false;
// }
// })
// .catch((error) => {
// console.log("er", error);
// this.loading = false;
// });
})
.catch((error) => {
console.log("er", error);
});
},
// 获取权限列表
getAuthorityList (productId, code) {
getAuthorityListAction(productId, code).then(
res => {
if (res.status === 1) {
this.waitMemberList = res.content;
if (this.personlist) {
this.waitMemberList.forEach((item, i) => {
this.personlist.forEach((val) => {
if (item.id === val.id) {
this.waitMemberList[i].selectStatus = 0;
}
});
});
if (res.content.length !== 0) {
this.operationCodes = res.content[0].operations
this.operationList = []
for (var k in this.operationCodes) {
this.operationList.push(k)
}
}
this.$refs.rolesForm.personlist(this.waitMemberList, row.id);
this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes);
} else {
this.$message.error({ message: res.message, showClose: true });
this.$message.error({ message: res.message, showClose: true })
}
});
this.$refs.rolesForm.title = "人员配置";
} else this.$message.error({ message: res.message, showClose: true });
});
},
// 新增、修改角色
handleAddEdit (value) {
this.isDialog = true
this.$refs.addEditDialog.menuType = this.menuType;
this.$refs.addEditDialog.roleId = value.id;
this.roleSort = value.sort ? value.sort : 0;
this.$refs.addEditDialog.dialogForm.roleType = sessionStorage.getItem("products");
if (value.id) {
this.$refs.addEditDialog.dialogForm.roleName = value.name;
}
)
},
this.$refs.addEditDialog.dialogForm.roleTextArea = value.description;
}
this.$refs.addEditDialog.showAddEditDialog = true;
this.$refs.addEditDialog.title = value.id ? "修改" : "新增";
},
//排序
updateOrder (record, operate) {
const findIndex = this.listdata.findIndex(item => item.id === record.id)
let swapId = ''
if (operate === 'UP') {
swapId = this.listdata[findIndex - 1].id
} else if (operate === 'DOWN') {
swapId = this.listdata[findIndex + 1].id
}
updateOrder('/rest/roles', record, operate, swapId).then(res => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.getTableData();
} else {
this.$message.error({ message: res.message, showClose: true })
// 配置
getList (row) {
this.getTableList()
const params = {};
const queryOptions = {
conditionGroup: {
conditions: [
{
property: "organizationId",
value: row.organizationId,
operator: "EQ",
},
{
property: "departmentId",
value: row.departmentId,
operator: "EQ",
},
],
queryRelation: "AND",
},
orderBys: [{ property: "sort", direction: "desc" }],
};
params.queryOptions = JSON.stringify(queryOptions);
getUserRoles(row.id).then((res) => {
if (res.status === 1) {
this.personlist = res.content;
getAction(api.users, params).then((res) => {
if (res.status === 1) {
this.waitMemberList = res.content;
if (this.personlist) {
this.waitMemberList.forEach((item, i) => {
this.personlist.forEach((val) => {
if (item.id === val.id) {
this.waitMemberList[i].selectStatus = 0;
}
});
});
}
this.$refs.rolesForm.personlist(this.waitMemberList, row.id);
this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes);
} else {
this.$message.error({ message: res.message, showClose: true });
}
});
this.$refs.rolesForm.title = "人员配置";
} else this.$message.error({ message: res.message, showClose: true });
});
},
// 新增、修改角色
handleAddEdit (value) {
this.isDialog = true
this.$refs.addEditDialog.menuType = this.menuType;
this.$refs.addEditDialog.roleId = value.id;
this.roleSort = value.sort ? value.sort : 0;
this.$refs.addEditDialog.dialogForm.roleType = this.BASE_API.CODE;
if (value.id) {
this.$refs.addEditDialog.dialogForm.roleName = value.name;
this.$refs.addEditDialog.dialogForm.roleTextArea = value.description;
}
})
},
// 删除
handleDelete: function (id, content = "") {
this.$confirm(
`<div class="customer-message-wrapper">
this.$refs.addEditDialog.showAddEditDialog = true;
this.$refs.addEditDialog.title = value.id ? "修改" : "新增";
},
//排序
updateOrder (record, operate) {
const findIndex = this.listdata.findIndex(item => item.id === record.id)
let swapId = ''
if (operate === 'UP') {
swapId = this.listdata[findIndex - 1].id
} else if (operate === 'DOWN') {
swapId = this.listdata[findIndex + 1].id
}
updateOrder('/rest/roles', record, operate, swapId).then(res => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.getTableData();
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
},
// 删除
handleDelete: function (id, content = "") {
this.$confirm(
`<div class="customer-message-wrapper">
<h5 class="title">您确认要执行该操作用于以下信息:</h5>
<p class="content" aria-controls="${content}">${content}
</p>
......@@ -469,50 +469,50 @@ export default {
<span >无法恢复</span>
</p>
</div>`,
"执行确认",
{
dangerouslyUseHTMLString: true,
customClass: "customer-delete",
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
if (!this.tableUrlroles) {
this.$message.error({
message: "请设置tableUrl属性为接口地址!",
showClose: true,
});
return;
"执行确认",
{
dangerouslyUseHTMLString: true,
customClass: "customer-delete",
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
const url = this.tableUrlroles + "/" + id;
deleteAction(url).then((res) => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true });
this.getTableData();
} else {
this.$message.error({ message: res.message, showClose: true });
)
.then(() => {
if (!this.tableUrlroles) {
this.$message.error({
message: "请设置tableUrl属性为接口地址!",
showClose: true,
});
return;
}
});
})
.catch(() => { });
},
// 新增回显
reloadTableData () {
this.getTableData();
const url = this.tableUrlroles + "/" + id;
deleteAction(url).then((res) => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true });
this.getTableData();
} else {
this.$message.error({ message: res.message, showClose: true });
}
});
})
.catch(() => { });
},
// 新增回显
reloadTableData () {
this.getTableData();
},
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
/deep/.el-button.is-disabled.el-button--text {
width: 64px;
height: 28px;
background: rgba(255, 255, 255, 0.1);
border-radius: 16px;
}
/deep/.el-button.is-disabled.el-button--text {
width: 64px;
height: 28px;
background: rgba(255, 255, 255, 0.1);
border-radius: 16px;
}
</style>
......
......@@ -63,24 +63,24 @@
return (
<div>
<el-button type="text"
size="mini"
v-show={scope.row.jobStatus === 0}
class='btnColor'
icon="el-icon-video-pause"
onClick={() => { this.handleActive(scope.row) }}>激活
</el-button>
<el-button type="text"
size="mini"
v-show={scope.row.jobStatus === -1}
class='btnColor'
icon="el-icon-video-pause"
onClick={() => { this.recover(scope.row) }}>恢复
</el-button>
<el-button type="text"
icon="el-icon-edit"
class='btnColor'
size="mini"
class='successColor'
onClick={() => { this.handleEdit(scope.row) }}>编辑
</el-button>
<el-button type="text"
icon="el-icon-delete"
size="mini"
class='successColor'
v-show={scope.row.jobStatus !== -1}
onClick={() => { this.handleDel(scope.row) }}>删除
......