f79f1525 by 任超
2 parents 0a11bd7f 90e3f601
......@@ -3,47 +3,47 @@
</template>
<script>
import Chart from "./Chart";
import work from "@/api/work";
export default {
data() {
return {
cdata: {
category: [],
lineData: [],
barData: [],
},
};
},
components: {
Chart,
},
mounted() {
window.addEventListener("resize", () => {
import Chart from "./Chart";
import work from "@/api/work";
export default {
data () {
return {
cdata: {
category: [],
lineData: [],
barData: [],
},
};
},
components: {
Chart,
},
mounted () {
window.addEventListener("resize", () => {
this.submitViews();
});
this.submitViews();
});
this.submitViews();
},
methods: {
async submitViews() {
try {
let { result: res } = await work.submitViews("A20");
this.cdata.category = [];
this.cdata.barData = [];
this.cdata.lineData = [];
res.map((item) => {
return (
this.cdata.category.push(item.areaName),
this.cdata.barData.push(item.successCount),
this.cdata.lineData.push(item.failureCount)
);
});
} catch (error) {
// this.$refs.msg.messageShow();
}
},
},
};
methods: {
async submitViews () {
try {
let { result: res } = await work.submitViews("A20");
this.cdata.category = [];
this.cdata.barData = [];
this.cdata.lineData = [];
res.map((item) => {
return (
this.cdata.category.push(item.areaName),
this.cdata.barData.push(item.successCount),
this.cdata.lineData.push(item.failureCount)
);
});
} catch (error) {
// this.$refs.msg.messageShow();
}
},
},
};
</script>
<style lang="scss" scoped></style>
......
......@@ -2,6 +2,7 @@
<div>
<i class="el-icon-s-management icon" :title="title" @click="openDialog" />
<el-dialog
class="configuration"
:key="key"
:title="title"
:inner-dialog="true"
......@@ -9,8 +10,7 @@
width="600px"
:close-on-click-modal="false"
append-to-body
@cancel="cancel"
>
@cancel="cancel">
<vue-json-editor
id="minejson"
v-model="resultInfo"
......@@ -18,15 +18,13 @@
lang="zh"
@json-change="onJsonChange"
@json-save="onJsonSave"
@has-error="onError"
/>
@has-error="onError" />
<el-tooltip
content="全屏缩放"
effect="dark"
placement="bottom"
fullscreen
class="fullScreen"
>
class="fullScreen">
<i class="el-icon-full-screen" @click="enLarge" />
</el-tooltip>
<template slot="footer">
......@@ -34,142 +32,156 @@
<el-button
type="primary"
class="confirmBtn"
@click="onJsonSave"
>保存</el-button>
@click="onJsonSave">保存</el-button>
<el-button
type="primary"
class="cancelBtn"
@click="cancel"
>关闭</el-button>
@click="cancel">关闭</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import vueJsonEditor from 'vue-json-editor'
export default {
components: {
vueJsonEditor
},
props: {
title: {
type: String,
default: '配置参数'
import vueJsonEditor from 'vue-json-editor'
export default {
components: {
vueJsonEditor
},
resultInfos: {
type: String,
default: ''
}
},
data() {
return {
activeNames: [],
resultInfo: {},
tmpResultInfo: {},
dialogVisible: false,
hasJsonFlag: true,
key: 0,
isEnlarge: false
}
},
watch: {
resultInfos: {
handler: function(val) {
++this.key
this.resultInfo =
this.resultInfos === '' ? {} : JSON.parse(this.resultInfos)
this.tmpResultInfo = this.resultInfo
props: {
title: {
type: String,
default: '配置参数'
},
deep: true,
immediate: true
}
},
mounted() {
this.resultInfo =
this.resultInfos === '' ? {} : JSON.parse(this.resultInfos)
},
methods: {
onJsonChange(value) {
// 只有在格式正确的时候进入此事件
this.hasJsonFlag = true
},
onJsonSave() {
const value = this.resultInfo
console.log(this.resultInfo, 'resultInfo')
if (this.hasJsonFlag === false) {
this.$message.error({ message: 'json格式验证失败', showClose: true })
// alert("json验证失败")
return false
} else {
this.dialogVisible = false
this.$emit('getJsonString', JSON.stringify(value))
return true
resultInfos: {
type: String,
default: ''
}
},
onError(value) {
this.hasJsonFlag = false
data () {
return {
activeNames: [],
resultInfo: {},
tmpResultInfo: {},
dialogVisible: false,
hasJsonFlag: true,
key: 0,
isEnlarge: false
}
},
openDialog() {
this.dialogVisible = true
watch: {
resultInfos: {
handler: function (val) {
++this.key
this.resultInfo =
this.resultInfos === '' ? {} : JSON.parse(this.resultInfos)
this.tmpResultInfo = this.resultInfo
},
deep: true,
immediate: true
}
},
cancel() {
console.log(this.tmpResultInfo, 'tmpResultInfo')
this.resultInfo = this.tmpResultInfo
this.dialogVisible = false
mounted () {
this.resultInfo =
this.resultInfos === '' ? {} : JSON.parse(this.resultInfos)
},
// 放大
enLarge() {
const fullarea = document.getElementById('minejson')
if (fullarea.requestFullscreen) {
fullarea.requestFullscreen()
} else if (fullarea.webkitRequestFullScreen) {
fullarea.webkitRequestFullScreen() // webkit内核(chrome、safari、Opera等)
} else if (fullarea.mozRequestFullScreen) {
fullarea.mozRequestFullScreen() // moz内核(firefox)
} else if (fullarea.msRequestFullscreen) {
fullarea.msRequestFullscreen() // IE11、edge
methods: {
onJsonChange (value) {
// 只有在格式正确的时候进入此事件
this.hasJsonFlag = true
},
onJsonSave () {
const value = this.resultInfo
console.log(this.resultInfo, 'resultInfo')
if (this.hasJsonFlag === false) {
this.$message.error({ message: 'json格式验证失败', showClose: true })
// alert("json验证失败")
return false
} else {
this.dialogVisible = false
this.$emit('getJsonString', JSON.stringify(value))
return true
}
},
onError (value) {
this.hasJsonFlag = false
},
openDialog () {
this.dialogVisible = true
},
cancel () {
console.log(this.tmpResultInfo, 'tmpResultInfo')
this.resultInfo = this.tmpResultInfo
this.dialogVisible = false
},
// 放大
enLarge () {
const fullarea = document.getElementById('minejson')
if (fullarea.requestFullscreen) {
fullarea.requestFullscreen()
} else if (fullarea.webkitRequestFullScreen) {
fullarea.webkitRequestFullScreen() // webkit内核(chrome、safari、Opera等)
} else if (fullarea.mozRequestFullScreen) {
fullarea.mozRequestFullScreen() // moz内核(firefox)
} else if (fullarea.msRequestFullscreen) {
fullarea.msRequestFullscreen() // IE11、edge
}
this.isEnlarge = true
}
this.isEnlarge = true
}
}
}
</script>
<style scoped lang="scss">
/* jsoneditor右上角默认有一个链接,加css去掉了 */
.icon {
color: #349af3;
}
/deep/ .jsoneditor-vue {
height: 100%;
}
.fullScreen {
position: absolute;
right: 5%;
top: 22%;
cursor: pointer;
color: #fff;
}
/deep/ .jsoneditor-modes {
display: none !important;
}
.jsoneditor-poweredBy {
display: none !important;
}
.jsoneditor-menu {
background-color: #9c9e9f !important;
border-bottom: 1px solid #9c9e9f !important;
}
.jsoneditor {
border: 1px solid #9c9e9f !important;
}
.el-collapse {
border: 0;
}
.el-collapse-item__header {
height: 44px;
}
/* jsoneditor右上角默认有一个链接,加css去掉了 */
.icon {
color: #349af3;
}
/deep/ .jsoneditor-vue {
height: 100%;
}
.fullScreen {
position: absolute;
right: 5%;
top: 20%;
cursor: pointer;
color: #fff;
}
/deep/ .jsoneditor-modes {
display: none !important;
}
/deep/.jsoneditor-poweredBy {
display: none !important;
}
.jsoneditor-menu {
background-color: #9c9e9f !important;
border-bottom: 1px solid #9c9e9f !important;
}
.jsoneditor {
border: 1px solid #9c9e9f !important;
}
.el-collapse {
border: 0;
}
.el-collapse-item__header {
height: 44px;
}
.configuration {
color: white;
margin-top: 6vh;
/deep/.el-dialog {
background-color: #031a46 !important;
border: 1px solid #5f82c7;
.el-dialog__header {
.el-dialog__title {
color: white !important;
}
.el-dialog__headerbtn {
top: 20px;
}
}
}
}
</style>
......
......@@ -524,4 +524,45 @@ tr:hover {
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
background-color: transparent !important;
}
\ No newline at end of file
}
// 提示框
.el-message-box {
background-color: #031a46;
border: 1px solid #5f82c7;
.el-message-box__title{
color: white;
}
.el-message-box__content{
color: white;
}
}
// 上级菜单
.el-cascader__dropdown {
background-color: #031a46;
border: 1px solid #5f82c7;
}
.el-cascader-menu{
color: white;
}
.el-radio
{
.el-cascader-menu:hover{
color: white;
}
}
.el-cascader-node:not(.is-disabled):hover, .el-cascader-node:not(.is-disabled):focus {
background: #F5F7FA;
background-image: initial;
background-position-x: initial;
background-position-y: initial;
background-size: initial;
background-repeat-x: initial;
background-repeat-y: initial;
background-attachment: initial;
background-origin: initial;
background-clip: initial;
background-color: rgb(80, 142, 235);
}
......
......@@ -198,4 +198,5 @@
.btnColRight {
box-sizing: border-box;
text-align: right;
}
\ No newline at end of file
}
......
......@@ -21,4 +21,4 @@ export default function filterAsyncRouter (routers) {
}
function loadView (view) {
return r => require.ensure([], () => r(require(`@/views${view}.vue`)))
}
\ No newline at end of file
}
......
......@@ -11,74 +11,74 @@
</template>
<script>
import maps from "@/components/Echart/Map";
import brokenline from "@/components/Echart/Brokenline";
export default {
data () {
return {};
},
components: { maps, brokenline },
mounted () { },
beforeDestroy () { },
methods: {},
};
import maps from "@/components/Echart/Map";
import brokenline from "@/components/Echart/Brokenline";
export default {
data () {
return {};
},
components: { maps, brokenline },
mounted () { },
beforeDestroy () { },
methods: {},
};
</script>
<style lang="scss" scoped>
.centercard {
width: 44%;
height: calc(100vh - 114px);
box-sizing: border-box;
padding: 0 .0521rem;
display: flex;
flex-direction: column;
.centercard {
width: 44%;
height: calc(100vh - 114px);
box-sizing: border-box;
padding: 0 0.0521rem;
display: flex;
flex-direction: column;
.card1 {
width: 100%;
background: url("~@/image/mapcenter.png") no-repeat;
background-size: 100% 100%;
position: relative;
height: 64%;
.card1 {
width: 100%;
background: url("~@/image/mapcenter.png") no-repeat;
background-size: 100% 100%;
position: relative;
height: 64%;
.title {
position: absolute;
font-weight: bold;
color: #02D9FD;
line-height: .1354rem;
font-size: .1146rem;
position: absolute;
left: 0;
right: 0;
top: .0365rem;
text-align: right;
padding-right: 15%;
.title {
position: absolute;
font-weight: bold;
color: #02d9fd;
line-height: 0.1354rem;
font-size: 0.1146rem;
position: absolute;
left: 0;
right: 0;
top: 0.0365rem;
text-align: right;
padding-right: 15%;
}
}
}
.card2 {
width: 100%;
background: url("~@/image/sjqs.png") no-repeat;
background-size: 100% 100%;
position: relative;
flex: 1;
.title {
position: absolute;
font-weight: bold;
color: #02D9FD;
line-height: .1354rem;
font-size: .1146rem;
position: absolute;
left: 0;
right: 0;
top: .0365rem;
text-align: center;
margin-bottom: .0521rem;
}
.brokenline {
margin: auto;
.card2 {
width: 100%;
background: url("~@/image/sjqs.png") no-repeat;
background-size: 100% 100%;
position: relative;
flex: 1;
.title {
position: absolute;
font-weight: bold;
color: #02d9fd;
line-height: 0.1354rem;
font-size: 0.1146rem;
position: absolute;
left: 0;
right: 0;
top: 0.0365rem;
text-align: center;
margin-bottom: 0.0521rem;
}
.brokenline {
margin: auto;
width: 100%;
}
}
}
}
</style>
......
......@@ -13,59 +13,57 @@
<dv-decoration-5
:dur="1"
class="dv-dec-5"
:color="decorationColor"
/>
:color="decorationColor" />
</div>
<dv-decoration-8
class="dv-dec-8"
:reverse="true"
:color="decorationColor"
/>
:color="decorationColor" />
</div>
<dv-decoration-10 class="dv-dec-10-s" />
</div>
</div>
<screencontent v-show="isshow"/>
<screencontent v-show="isshow" />
</div>
</div>
</div>
</template>
<script>
import drawMixin from "@/utils/drawMixin";
import screencontent from "./screencontent";
export default {
mixins: [drawMixin],
data() {
return {
isshow:true,
loading: true,
decorationColor: ["#568aea", "#568aea"],
};
},
components: {
screencontent,
},
mounted() {
import drawMixin from "@/utils/drawMixin";
import screencontent from "./screencontent";
export default {
mixins: [drawMixin],
data () {
return {
isshow: true,
loading: true,
decorationColor: ["#568aea", "#568aea"],
};
},
components: {
screencontent,
},
mounted () {
// this.timeFn();
this.cancelLoading();
},
beforeDestroy() {
clearInterval(this.timing);
},
methods: {
cancelLoading() {
setTimeout(() => {
this.loading = false;
}, 500);
// this.timeFn();
this.cancelLoading();
},
beforeDestroy () {
clearInterval(this.timing);
},
methods: {
cancelLoading () {
setTimeout(() => {
this.loading = false;
}, 500);
},
},
computed: {
...mapGetters(["products"]),
},
},
computed: {
...mapGetters(["products"]),
},
};
};
</script>
<style scoped lang="scss">
@import "./index.scss";
@import "./index.scss";
</style>
......
......@@ -55,206 +55,197 @@
<script>
import columnar from "@/components/Echart/Columnar";
import work from "@/api/work";
export default {
data () {
return {
// 日均接入量
qxerrer: "",
qxsuccess: "",
sterrer: "",
stsuccess: "",
qxjrl: "",
stjrl: "",
qxcgl: "",
stcgl: ""
};
},
mounted () {
this.getsthjqxjrtotal();
},
components: { columnar },
computed: {
qxjrlList: function () {
return this.qxjrl && this.qxjrl.toString().split("");
import columnar from "@/components/Echart/Columnar";
import work from "@/api/work";
export default {
data () {
return {
// 日均接入量
qxerrer: "",
qxsuccess: "",
sterrer: "",
stsuccess: "",
qxjrl: "",
stjrl: "",
qxcgl: "",
stcgl: ""
};
},
stjrlList: function () {
return this.stjrl && this.stjrl.toString().split("");
mounted () {
this.getsthjqxjrtotal();
},
},
methods: {
getsthjqxjrtotal () {
return new Promise(async (resolve) => {
try {
let p = {
DJLX: "",
QLLX: "",
XZQDM: "",
};
let res = await work.getsthjqxjrtotal(p);
this.stjrl=res.result.stsum
this.qxjrl=res.result.qxsum
this.qxerrer=Number(res.result.qxjrerrer)
this.sterrer=Number(res.result.sthjerrer)
if(res.result.sum=="0"){
this.qxcgl="100%"
this.stcgl="100%"
}else{
let qxcglnum=Number(res.result.qxjrsuccess)/this.qxjrl*100
let stcgl=Number(res.result.sthjsuccess)/this.qxjrl*100
this.qxcgl=qxcglnum.toFixed(2)+"%";
this.stcgl=stcgl.toFixed(2)+"%";
components: { columnar },
computed: {
qxjrlList: function () {
return this.qxjrl && this.qxjrl.toString().split("");
},
stjrlList: function () {
return this.stjrl && this.stjrl.toString().split("");
},
},
methods: {
getsthjqxjrtotal () {
return new Promise(async (resolve) => {
try {
let p = {
DJLX: "",
QLLX: "",
XZQDM: "",
};
let res = await work.getsthjqxjrtotal(p);
this.stjrl = res.result.stsum
this.qxjrl = res.result.qxsum
this.qxerrer = Number(res.result.qxjrerrer)
this.sterrer = Number(res.result.sthjerrer)
if (res.result.sum == "0") {
this.qxcgl = "100%"
this.stcgl = "100%"
} else {
let qxcglnum = Number(res.result.qxjrsuccess) / this.qxjrl * 100
let stcgl = Number(res.result.sthjsuccess) / this.qxjrl * 100
this.qxcgl = qxcglnum.toFixed(2) + "%";
this.stcgl = stcgl.toFixed(2) + "%";
}
} catch (error) {
this.$refs.msg.messageShow();
}
} catch (error) {
this.$refs.msg.messageShow();
}
});
});
},
},
},
};
};
</script>
<style lang="scss" scoped>
.leftcard {
width: 32%;
height: calc(100vh -114px);
display: flex;
flex-direction: column;
.card {
background: url("~@/image/qxjr.png") no-repeat;
background-size: 100% 100%;
position: relative;
text-align: center;
width: 100%;
height: 22%;
}
.carda {
background: url("~@/image/sthj.png") no-repeat;
background-size: 100% 100%;
position: relative;
text-align: center;
width: 100%;
height: 22%;
}
// .card1 {
// background: url("~@/image/sbtj.png") no-repeat;
// background-size: 100% 100%;
// position: relative;
// text-align: center;
// width: 100%;
// padding: .0417rem 0;
// height: 49%;
// }
.card1 {
background: url("~@/image/sbtj.png") no-repeat;
background-size: 100% 100%;
position: relative;
box-sizing: border-box;
flex: 1;
height: 56%;
}
.cardhead {
color: #02d9fd;
line-height: .125rem;
letter-spacing: .0104rem;
position: absolute;
font-size: .1042rem;
left: 0;
right: 0;
margin: auto;
text-align: center;
top: 8px;
font-weight: 700;
}
.rjjrlList {
.leftcard {
width: 32%;
display: flex;
margin-top: .01781rem;
height: calc(100vh - 114px);
flex-direction: column;
.qxjr {
background: url("~@/image/jrl3.png");
.card {
height: 22%;
background: url("~@/image/qxjr.png") no-repeat;
background-size: 100% 100%;
position: relative;
text-align: center;
width: 100%;
}
.sthj {
background: url("~@/image/jh.png");
background-size: 100% 100%;
}
p {
margin: 0 .0156rem .0521rem .0156rem;
font-weight: 700;
width: .195rem;
height: .2475rem;
font-size: .2863rem;
font-size: .2867rem;
.carda {
height: 22%;
background: url("~@/image/sthj.png") no-repeat;
background-size: 100% 100%;
position: relative;
text-align: center;
width: 100%;
}
}
.cardcontent {
width: 100%;
height: 100%;
display: flex;
// padding: 35px 20px 20px 20px;
box-sizing: border-box;
color: #e3f1ff;
margin-top: .1263rem;
.cardcontent-left {
width: 60%;
flex-direction: column;
.card1 {
background: url("~@/image/sbtj.png") no-repeat;
background-size: 100% 100%;
position: relative;
li{
font-size: .1042rem;
}
box-sizing: border-box;
flex: 1;
}
.cardcontent-left::before {
.cardhead {
color: #02d9fd;
line-height: 0.125rem;
letter-spacing: 0.0104rem;
position: absolute;
font-size: 0.1042rem;
left: 0;
right: 0;
top: .3042rem;
content: "";
width: .0052rem;
height: .4688rem;
background: linear-gradient(180deg,
#091b4c 0%,
#47b5e0 56%,
#091b4c 100%);
margin: auto;
text-align: center;
top: 8px;
font-weight: 700;
}
.cardcontent-right {
flex: 1;
width: 100%;
flex-direction: column;
font-size: .0833rem;
.rjjrlList {
display: flex;
margin-top: 0.01781rem;
.bad {
color: #c97168;
.qxjr {
background: url("~@/image/jrl3.png");
background-size: 100% 100%;
}
.cg {
color: #5fba7d;
.sthj {
background: url("~@/image/jh.png");
background-size: 100% 100%;
}
p {
margin-bottom: .0417rem;
margin: 0 0.0156rem 0.0521rem 0.0156rem;
font-weight: 700;
width: 0.195rem;
height: 0.2475rem;
font-size: 0.2863rem;
font-size: 0.2867rem;
}
}
.cardcontent {
width: 100%;
height: 100%;
display: flex;
// padding: 35px 20px 20px 20px;
box-sizing: border-box;
color: #e3f1ff;
margin-top: 0.1263rem;
.cardcontent-left {
width: 60%;
flex-direction: column;
position: relative;
li {
font-size: 0.1042rem;
}
}
.cardcontent-left::before {
position: absolute;
right: 0;
top: 0.3042rem;
content: "";
width: 0.0052rem;
height: 0.4688rem;
background: linear-gradient(
180deg,
#091b4c 0%,
#47b5e0 56%,
#091b4c 100%
);
}
.cardcontent-right {
flex: 1;
width: 100%;
flex-direction: column;
font-size: 0.0833rem;
span:nth-child(1) {
margin-right: .0781rem;
.bad {
color: #c97168;
}
span:nth-child(2) {
font-size: .1042rem;
font-weight: 900;
.cg {
color: #5fba7d;
}
p {
margin-bottom: 0.0417rem;
span:nth-child(1) {
margin-right: 0.0781rem;
}
span:nth-child(2) {
font-size: 0.1042rem;
font-weight: 900;
}
}
}
}
}
}
</style>
......
......@@ -19,131 +19,136 @@
</template>
<script>
import columnarsmat from "@/components/Echart/Columnarsmat";
import Rose from "@/components/Echart/Rose";
import work from "@/api/work";
export default {
data () {
return {
config: {
headerBGC: '#016AC5',
oddRowBGC: '#154295',
evenRowBGC: '#154295',
header: ['序号', '用途', '性质', '面积'],
data: [],
key: 0
import columnarsmat from "@/components/Echart/Columnarsmat";
import Rose from "@/components/Echart/Rose";
import work from "@/api/work";
export default {
data () {
return {
config: {
headerBGC: '#016AC5',
oddRowBGC: '#154295',
evenRowBGC: '#154295',
header: ['序号', '用途', '性质', '面积'],
data: [],
key: 0
}
}
}
},
components: { columnarsmat, Rose },
mounted () {
this.addhousetotal();
// scroll(tableref.value.$refs.bodyWrapper);//设置滚动
},
methods: {
async addhousetotal () {
try {
let { result: res } = await work.addhousetotal();
res.map((item, index) => {
return (
this.config.data.push([index, item.fwyt, item.fwxz, item.mj])
)
});
} catch (error) {
console.log("error", error);
},
components: { columnarsmat, Rose },
mounted () {
this.addhousetotal();
// scroll(tableref.value.$refs.bodyWrapper);//设置滚动
},
methods: {
async addhousetotal () {
try {
let { result: res } = await work.addhousetotal();
res.map((item, index) => {
return (
this.config.data.push([index, item.fwyt, item.fwxz, item.mj])
)
});
} catch (error) {
console.log("error", error);
}
}
}
}
}
</script>
<style lang="scss" scoped>
/deep/.row-item:not(:last-child) {
margin-bottom: .026rem;
}
.rightcard {
width: 32%;
display: flex;
height: calc(100vh - 114px);
flex-direction: column;
.cardhead {
font-size: .1042rem;
font-weight: bold;
color: #02D9FD;
text-align: center;
position: absolute;
left: 0;
right: 0;
top: .0625rem;
text-align: center;
/deep/.row-item:not(:last-child) {
margin-bottom: 0.026rem;
}
.cardcontent {
width: 100%;
height: 100%;
display: -webkit-box;
overflow: hidden;
.rightcard {
width: 32%;
display: flex;
height: calc(100vh - 114px);
flex-direction: column;
.nodata {
font-size: .1042rem;
color: #02D9FD;
.cardhead {
font-size: 0.1042rem;
font-weight: bold;
margin: auto;
margin-top: 120px;
color: #02d9fd;
text-align: center;
position: absolute;
left: 0;
right: 0;
top: 0.0625rem;
text-align: center;
}
}
.cardCon {
padding: .0521rem .026rem;
position: relative;
text-align: center;
width: 100%;
}
.cardcontent {
width: 100%;
height: 100%;
display: -webkit-box;
overflow: hidden;
.nodata {
font-size: 0.1042rem;
color: #02d9fd;
font-weight: bold;
margin: auto;
margin-top: 120px;
}
}
.card1 {
height: 33%;
background: url("~@/image/xjgyfwxx.png") no-repeat;
background-size: 100% 100%;
.cardCon {
padding: 0.0521rem 0.026rem;
position: relative;
text-align: center;
width: 100%;
}
.board {
width: 90%;
margin: 0 auto;
height: 1.1031rem;
margin-top: .0521rem;
/deep/.header{
font-size: .0738rem;
.card1 {
height: 33%;
background: url("~@/image/xjgyfwxx.png") no-repeat;
background-size: 100% 100%;
/deep/.dv-scroll-board {
.header {
height: 0.1875rem;
align-items: center;
}
}
/deep/.rows{
.ceil{
font-size: .0738rem;
color: #6BC1FC
}
.board {
width: 90%;
margin: 0 auto;
height: 1.1031rem;
margin-top: 0.0521rem;
/deep/.header {
font-size: 0.0738rem;
}
/deep/.rows {
.ceil {
font-size: 0.0738rem;
color: #6bc1fc;
}
}
}
}
}
.card2 {
height: 33%;
background: url("~@/image/djywl.png") no-repeat;
background-size: 100% 100%;
padding: .3825rem 0 0 0;
}
.card2 {
height: 33%;
background: url("~@/image/djywl.png") no-repeat;
background-size: 100% 100%;
padding: 0.3825rem 0 0 0;
}
.card3 {
height: 33%;
flex: 1;
background: url("~@/image/djlxzl.png") no-repeat;
background-size: 100% 100%;
padding-bottom: 0;
.card3 {
height: 33%;
flex: 1;
background: url("~@/image/djlxzl.png") no-repeat;
background-size: 100% 100%;
padding-bottom: 0;
.cardhead {
top: .0417rem;
.cardhead {
top: 0.0417rem;
}
}
}
.cardhead {
position: absolute;
.cardhead {
position: absolute;
}
}
}
</style>
......
......@@ -142,8 +142,8 @@
padding: 24px 120px 0px;
.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
color: #747e8c;
/deep/.el-form-item__label {
color: #ffffff;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
......
......@@ -15,8 +15,8 @@
</div>
<div class="from-clues-content">
<div class="contentbox">
<base-set v-show="isshow" :userInfo="userData" />
<password-edit v-show="!isshow" :userInfo="userData" />
<base-set v-if="isshow" :userInfo="userData" />
<password-edit v-if="!isshow" :userInfo="userData" />
</div>
</div>
</div>
......
......@@ -110,10 +110,10 @@
overflow-y: auto;
.form-wrapper {
padding: 24px 120px 0px;
.el-form-item {
/deep/.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
color: #747e8c;
color: #ffffff;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
......
......@@ -30,8 +30,8 @@
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="代码:" prop="code" label-width="54px">
<el-col :span="24">
<el-form-item label="代码:" prop="code" label-width="124px">
<el-input
v-model="codeComputed"
placeholder="请输入菜单代码"
......@@ -272,4 +272,5 @@
/deep/.el-input__inner {
background-color: #07388b;
}
</style>
......
import filter from '@/utils/filter.js'
class data extends filter {
constructor() {
super()
}
columns () {
return [
{
prop: "name",
label: "角色名称",
width: 330
},
{
prop: "type",
label: "类别",
width: 400
},
{
prop: "address",
label: "备注"
}
]
}
}
export default new data()
......@@ -4,39 +4,36 @@
:title="dialogTitle"
:show.sync="showAddEditDialog"
:width="'767px'"
@close="handleCloseDialog()"
>
@close="handleCloseDialog()">
<template slot="content">
<el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px">
<el-row :gutter="24">
<el-col :span="12">
<el-col :span="15">
<el-form-item label="角色名称:" prop="roleName">
<el-input
v-model="dialogForm.roleName"
clearable
placeholder="角色名称"
/>
placeholder="角色名称" />
</el-form-item>
</el-col>
<el-col :span="12">
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="角色类型:" prop="roleType">
<el-input
v-model="dialogForm.roleType"
clearable
placeholder="角色类型"
/>
placeholder="角色类型" />
</el-form-item>
</el-col>
</el-row>
<br>
<el-row>
<el-col :span="24">
<el-form-item label="备注:" class="form-item-mb0">
<el-input
v-model="dialogForm.roleTextArea"
type="textarea"
placeholder="备注"
/>
placeholder="备注" />
</el-form-item>
</el-col>
</el-row>
......@@ -45,72 +42,89 @@
<template slot="footer">
<el-button
class="cancel-button"
@click="handleCloseDialog"
>取消</el-button>
@click="handleCloseDialog">取消</el-button>
<el-button
type="primary"
@click="handleSaveRole()"
>保存</el-button>
<el-button
type="primary"
@click="handleSaveRole()">保存</el-button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@/components/Dialog/";
import { api, httpAction } from '@/api/manageApi'
export default {
components: {
Dialog
},
data() {
return {
dialogTitle: '',
showAddEditDialog: false,
menuType: '',
roleId: '',
sort: 0,
dialogForm: {
roleName: '',
roleType: '',
roleTextArea: ''
},
rules: {
roleName: [
{ required: true, message: '请输入角色名称', trigger: 'blur' }
],
roleType: [
{ required: true, message: '请输入角色类型', trigger: 'blur' }
import Dialog from "@/components/Dialog/";
import { api, httpAction } from '@/api/manageApi'
export default {
components: {
Dialog
},
data () {
return {
dialogTitle: '',
showAddEditDialog: false,
menuType: '',
roleId: '',
sort: 0,
dialogForm: {
roleName: '',
roleType: '',
roleTextArea: ''
},
rules: {
roleName: [
{ required: true, message: '请输入角色名称', trigger: 'blur' }
],
roleType: [
{ required: true, message: '请输入角色类型', trigger: 'blur' }
]
},
roleTypeOptions: [
{ name: '定制', value: '定制' },
{ name: '其他', value: '其他' }
]
},
roleTypeOptions: [
{ name: '定制', value: '定制' },
{ name: '其他', value: '其他' }
]
}
},
methods: {
// 保存新增或关闭事件
handleSaveRole(val) {
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
}
console.log("this.roleId",this.roleId);
if (this.roleId) {
params.id = this.roleId
console.log("修改",params.id,params);
httpAction(`${api.roles}/${params.id}`, params, 'post').then(
(res) => {
}
},
methods: {
// 保存新增或关闭事件
handleSaveRole (val) {
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: '',
roleType: ''
}
this.showAddEditDialog = val
this.$emit('ok', this.menuType)
} 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: '修改成功',
message: '新增成功',
showClose: true
})
this.dialogForm = {
......@@ -125,58 +139,49 @@ export default {
showClose: true
})
}
}
)
} else {
httpAction(api.roles, params, 'post').then((res) => {
if (res.status === 1) {
this.$message.success({
message: '新增成功',
showClose: true
})
this.dialogForm = {
roleName: '',
roleType: ''
}
this.showAddEditDialog = val
this.$emit('ok', this.menuType)
} else {
this.$message.error({
message: res.message,
showClose: true
})
}
})
})
}
} catch (e) {
console.error(e)
}
} catch (e) {
console.error(e)
}
})
},
// 取消事件
handleCloseDialog () {
this.$refs.form.resetFields()
this.dialogForm = {
roleName: '',
roleType: ''
}
})
},
// 取消事件
handleCloseDialog() {
this.$refs.form.resetFields()
this.dialogForm = {
roleName: '',
roleType: ''
this.showAddEditDialog = false
}
this.showAddEditDialog = false
}
}
}
</script>
<style scoped lang="scss">
/deep/.el-input__inner {
background: #07388B;
border-radius: 2px;
border: 1px solid #6BC1FC;
}
/deep/.el-textarea__inner{
background: #07388B;
color: #fff;
}
/deep/.el-form-item__label{
color:#fff;
}
/deep/.el-input__inner {
background: #07388b;
border-radius: 2px;
border: 1px solid #6bc1fc;
}
/deep/.el-textarea__inner {
background: #07388b;
color: #fff;
}
/deep/.el-form-item__label {
color: #fff;
}
/deep/.el-dialog__headerbtn {
position: absolute;
top: 15px;
right: 30px;
}
/deep/.el-dialog__header {
text-align: center;
margin-bottom: 10px;
.el-dialog__title {
color: white;
}
}
</style>
......
......@@ -14,15 +14,13 @@
</div>
<div class="from-clues-content">
<lb-table
:page-size="pageData.size"
:current-page.sync="pageData.current"
:total="pageData.total"
:pagination="false"
@size-change="handleSizeChange"
@p-current-change="handleCurrentChange"
:column="tableData.columns"
:data="listdata"
:expand-row-keys="keyList"
row-key="id">
row-key="dictid">
</lb-table>
</div>
<EditDialog ref="addEditDialog" @ok="reloadTableData" />
......@@ -219,11 +217,6 @@
]),
data: [],
},
pageData: {
total: 5,
pageSize: 15,
current: 1,
},
};
},
created () {
......@@ -242,6 +235,7 @@
Builtinrole = res.content;
getRolesById(2)
.then((res) => {
console.log("角色列表", res);
Publicrole = res.content;
this.listdata = Builtinrole.concat(Publicrole);
......@@ -376,8 +370,6 @@
}
this.$refs.rolesForm.personlist(this.waitMemberList, row.id);
// this.$refs.rolesForm.getMenuData();
this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes);
} else {
this.$message.error({ message: res.message, showClose: true });
......@@ -402,15 +394,15 @@
},
// 上移下移
moveUpward (index, row) {
realMove(row.id, "UP", this.listdata);
realMove(row.dictid, "UP", this.listdata);
this.key++;
let id = findParents(this.listdata, row.id);
let id = findParents(this.listdata, row.dictid);
this.keyList = id;
},
moveDown (index, row) {
realMove(row.id, "DOWN", this.listdata);
realMove(row.dictid, "DOWN", this.listdata);
this.key++;
let id = findParents(this.listdata, row.id);
let id = findParents(this.listdata, row.dictid);
this.keyList = id;
},
......
......@@ -10,7 +10,7 @@
{{ title || "标题" }}
</div>
<div class="editDialogBox-box">
<el-tabs v-model="activeName" type="card">
<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>
......@@ -19,7 +19,7 @@
ref="multipleTable"
:pagination="false"
:column="usertableData.column"
:data="usertableData.data"
:data="lastuserList"
@selection-change="handleSelectionChange"
@row-click="handleClickTableRow">
>
......@@ -27,7 +27,6 @@
<lb-table
:key="menukey"
v-if="activeName == 'second'"
ref="multipleTable1"
:pagination="false"
:column="menutableData.column"
:data="lastMenuList"
......@@ -99,7 +98,6 @@
label: "用户名",
},
],
data: []
},
// 角色id
roleId: "",
......@@ -107,6 +105,7 @@
queryParam: {},
menukey: 0,
activeName: "first",
lastuserList: [], // 人员表格数据
lastMenuList: [], // 重构完成的菜单表格数据
usermultipleSelection: [],
// 选中菜单列表
......@@ -132,8 +131,8 @@
// 人员配置点击行勾选数据
handleClickTableRow (row, event) {
this.checkNum1 = 0;
this.isCheck1 = false;
this.checkNum = 0;
this.isCheck = false;
if (event.label == "操作") {
return;
} else {
......@@ -163,10 +162,10 @@
}
}
if (this.usermultipleSelection.length > 0) {
this.checkNum1 = this.usermultipleSelection.length;
this.isCheck1 = true;
this.checkNum = this.usermultipleSelection.length;
this.isCheck = true;
} else {
this.isCheck1 = false;
this.isCheck = false;
}
},
// 获取授权主体的菜单权限
......@@ -304,19 +303,21 @@
personlist (a, rid) {
this.roleId = rid;
this.visible = true;
this.usertableData.data = a;
this.usertableData.data.forEach((item, index) => {
this.lastuserList = a;
this.lastuserList.forEach((item, index) => {
if (item.selectStatus === 0) {
this.$nextTick(() => {
this.$refs.multipleTable.toggleRowSelection(
this.usertableData.data[index],
true
);
this.$nextTick(async () => {
await this.$refs.multipleTable
if (this.$refs.multipleTable) {
this.$refs.multipleTable.toggleRowSelection(
this.lastuserList[index],
true
);
}
});
}
});
},
// 关闭事件
close () {
......@@ -351,7 +352,17 @@
},
// 勾选人员事件
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) {
......@@ -383,6 +394,23 @@
)
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>
......@@ -566,13 +594,8 @@
display: flex;
margin-bottom: 15px;
}
.dialog_footer {
flex-direction: column;
.dialog_button {
margin-top: 8px;
}
.el-dialog__footer {
padding-right: 40px;
}
.divider {
......
......@@ -114,7 +114,7 @@
{ required: true, message: "请输入用户名", trigger: "blur" },
],
},
title: "",
title: "修改",
visible: false,
showLoginName: false,
sexList: [{ lable: "0", value: "0", name: "男" }, { lable: "1", value: "1", name: "女" }],
......@@ -230,4 +230,14 @@
/deep/.el-form-item__label {
color: #fff;
}
/deep/.el-dialog__body {
padding-top: 20px;
}
/deep/.el-dialog__header {
text-align: center;
margin-bottom: 10px;
.el-dialog__title {
color: white;
}
}
</style>
......
......@@ -17,9 +17,7 @@
</div>
<div class="from-clues-content">
<lb-table
:page-size="pageData.size"
:current-page.sync="pageData.current"
:total="pageData.total"
:pagination="false"
@size-change="handleSizeChange"
@p-current-change="handleCurrentChange"
:column="tableData.columns"
......@@ -182,11 +180,6 @@
]),
data: [],
},
pageData: {
total: 5,
pageSize: 15,
current: 1,
},
};
},
created () {
......@@ -209,6 +202,7 @@
departmentId: this.departmentid.departmentId,
};
getUserList(this.queryParam).then((res) => {
console.log("人员列表", res);
if (res.status === 1) {
this.loading = false;
this.tableData.data = res.content;
......