7d70249c by 任超

Merge branch 'master' into dev

2 parents 1b95b632 7db3545c
......@@ -38,7 +38,7 @@
"babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "2.4.2",
"connect": "3.6.6",
"element-ui": "^2.15.8",
"element-ui": "^2.15.13",
"html-webpack-plugin": "3.2.0",
"runjs": "4.3.2",
"sass-loader": "8.0.2",
......
/*
* @Author: yangwei
* @Date: 2023-02-24 15:12:45
* @LastEditors: yangwei
* @LastEditTime: 2023-03-14 10:45:11
* @FilePath: \bdcjg-web\src\api\authorityManage.js
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
*/
import { getParams } from './util'
import {
......@@ -8,16 +18,16 @@ import {
} from './manageApi'
/** 角色管理开始 */
// 获取角色列表 by categoryId
export const getRolesById = categoryId => {
export const getRolesById = categoryIdList => {
const conditionGroup = {
conditions: [
{
property: 'category',
value: categoryId,
operator: 'EQ'
value: categoryIdList,
operator: 'IN'
}
],
queryRelation: 'AND'
queryRelation: 'AND',
}
const params = getParams(conditionGroup)
return getAction(api.roles, params)
......
import request from '@/utils/request'
import SERVER from './config'
/*
更新排序
record-排序整条数据
operate-BOTTOM(置底), DOWN(向下), TOP(置顶), UP(向上)
*/
export function updateOrder(url, record, operate, swapId) {
return request({
url: SERVER.MANAGEMENTAPI + url + "/" + record.id + "/orders",
method: "put",
params: {
operate: operate,
swapId: swapId,
},
});
}
......@@ -26,7 +26,8 @@ export default {
color: #ffffff;
margin: 0 5px;
cursor: pointer;
border: 0
border: 0;
font-size: 14px;
}
.cx {
......
......@@ -17,7 +17,7 @@
data () {
return {
options: {},
max: "100", //最大value值
max: "5000", //最大value值
min: "1", // 最小value值
key: 0,
mapjson: "",
......@@ -87,10 +87,10 @@
itemGap: 2, // 每两个图元之间的间隔距离,单位为px
pieces: [
// 自定义每一段的范围,以及每一段的文字
{ gte: 100, label: "100以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。
{ gte: 50, lte: 6000, label: "20-100", color: "#3375e4" },
{ gte: 20, lte: 2000, label: "1-200", color: "#6797ef" },
{ gte: 1, lte: 1000, label: "1-20", color: "#96b5ef" },
{ gte: 100, label: "5000以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。
{ gte: 50, lte: 6000, label: "1000-5000", color: "#3375e4" },
{ gte: 20, lte: 2000, label: "500-1000", color: "#6797ef" },
{ gte: 1, lte: 1000, label: "0-500", color: "#96b5ef" },
],
textStyle: {
color: "#737373",
......
......@@ -26,7 +26,7 @@
watch: {
cdata: {
handler (newData) {
console.log("newData", newData);
this.options = {
color: [
"#37a2da",
......@@ -34,31 +34,29 @@
"#9fe6b8",
"#ffdb5c",
"#ff9f7f",
"#8378ea",
"#fb7293",
"#e7bcf3",
"#8378ea"
],
tooltip: {
trigger: "item",
formatter: "<br/>{b} : {c} ({d}%)",
},
series: [
{
name: "Access From",
type: "pie",
radius: ["54%", "70%"],
avoidLabelOverlap: true,
label: {
formatter: (params) => {
// console.log(params)
return `${params.name}\n(${params.value})`;
return `${params.name}`;
},
position: "outer",
alignTo: "edge",
margin: 5
},
labelLine: {
lineStyle: {
width: 3,
},
},
data: newData.seriesData,
}
],
......
......@@ -5,57 +5,71 @@
</template>
<script>
import Chart from "./Chart";
import work from "@/api/work";
export default {
data() {
import Chart from "./Chart";
import work from "@/api/work";
export default {
data () {
return {
cdata: {
seriesData: [],
},
getdata: [],
};
},
components: {
Chart,
},
mounted() {
this.getdjywltotal();
mounted () {
this.addhousetotal();
window.addEventListener("resize", () => {
this.cdata.seriesData = [];
this.getdjywltotal();
this.getdata = [];
this.addhousetotal();
});
},
methods: {
// 获取登记业务量玫瑰图数据
async getdjywltotal() {
if (this.cdata.seriesData.length == 0) {
async addhousetotal () {
if (this.getdata.length == 0) {
this.getdata = [];
try {
let p = {
DJLX: "",
QLLX: "",
XZQDM: "",
};
this.cdata.seriesData = [];
let res = await work.getdjywltotal(p);
if(this.cdata.seriesData.length == 0){
res.result.map((item) => {
let { result: res } = await work.addhousetotal();
res.map((item) => {
return this.cdata.seriesData.push({
name: item.AREACODE,
value: item.ywtotal,
name: `${item.fwyt + '(' + item.fwxz})`,
value: item.mj,
});
});
}
// 遍历修改数组键,作为echars图表的参数
} catch (error) {
console.log(error);
console.log("error", error);
}
}
let delarr = this.cdata.seriesData.sort(this.up)
this.setadat(delarr)
},
// 处理数据方法
setadat (delarr) {
this.cdata.seriesData = delarr.splice(0, 6);
let sum = 0
for (var i = 0; i < delarr.length; i++) {
sum = sum + delarr[i].value
}
sum = sum.toFixed(2)
this.cdata.seriesData.push({
name: "其他(其他种类)",
values: "其他种类",
value: sum,
})
},
};
// 排序方法
up (x, y) { return y.value - x.value }
}
};
</script>
<style lang="scss" scoped></style>
......
......@@ -278,7 +278,7 @@ export default {
let _this = this
// 上报请求头修改
try {
var headRes = await axios.post(urlHeader + 'edit', this.dataReport,
var headRes = await axios.post('/api' + urlHeader + 'edit', this.dataReport,
{
headers: {
'Authorization': sessionStorage.getItem("token") || ""
......
......@@ -2,7 +2,8 @@
<div class="navbar-con">
<div class="navbar">
<div class="logo">
<img :src="require('@/image/logo.png')" alt="" />
<img :src="require('@/image/bdclogo.png')" alt="" />
<h4>不动产登记上报系统</h4>
</div>
<div class="right-menu">
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand">
......@@ -20,10 +21,10 @@
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import Breadcrumb from './Breadcrumb'
import defaultSettings from '@/settings'
export default {
import { mapGetters } from 'vuex'
import Breadcrumb from './Breadcrumb'
import defaultSettings from '@/settings'
export default {
components: {
Breadcrumb
},
......@@ -50,25 +51,35 @@ export default {
}
}
}
}
}
</script>
<style lang="scss" scoped>
.navbar-con {
.navbar-con {
position: relative;
.logo {
color: #fff;
font-size: 26px;
font-weight: 700;
display: flex;
img {
width: 47px;
height: 47px;
}
h4 {
margin-left: 20px;
height: 50px;
line-height: 50px;
}
}
}
}
.NoticeBar {
.NoticeBar {
position: absolute;
bottom: 0;
}
}
.el-dropdown-menu {
.el-dropdown-menu {
padding: 0 !important;
border: 1px solid #ebeef5;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12);
......@@ -101,13 +112,13 @@ export default {
background: #f6f7f9;
color: #4a4a4a;
}
}
}
.navbar {
.navbar {
height: $headerHeight;
overflow: hidden;
position: relative;
background: #3D59C4;
background: linear-gradient(270deg, #ebf1ff 0%, #3d59c4 100%);
display: flex;
align-items: center;
padding-right: 20px;
......@@ -229,5 +240,5 @@ export default {
}
}
}
}
}
</style>
......
......@@ -9,7 +9,7 @@
<el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText"
:unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical">
<!-- 权限菜单 -->
<sidebar-item v-for="route in permission_routes.slice(3)" :key="route.path" :item="route"
<sidebar-item v-for="route in permission_routes.slice(4)" :key="route.path" :item="route"
:base-path="route.path" />
<!-- 菜单全部展示 -->
<!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> -->
......@@ -19,13 +19,13 @@
</template>
<script>
import { mapGetters } from 'vuex'
import Logo from './Logo'
import defaultSettings from '@/settings'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
import { asyncRoutes } from '@/router'
export default {
import { mapGetters } from 'vuex'
import Logo from './Logo'
import defaultSettings from '@/settings'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
import { asyncRoutes } from '@/router'
export default {
components: { SidebarItem, Logo },
data () {
return {
......@@ -51,6 +51,10 @@ export default {
asyncRoutes () {
return asyncRoutes
}
},
mounted () {
console.log("this. permission_routes", this.permission_routes);
}
}
}
</script>
......
......@@ -2,7 +2,7 @@
overflow: hidden;
background: url("~@/image/dialogBg.png") no-repeat !important;
background-size: 100% 100% !important;
min-height: 90vh;
// min-height: 90vh;
.dialog_title {
display: flex;
......@@ -98,6 +98,7 @@
color: #B5D6DC;
border-radius: 2px;
border: 1px solid #224C7C;
span {
display: inline-block;
padding: 3px;
......@@ -155,7 +156,7 @@
.el-dialog__body {
padding-top: 0;
padding-bottom: 0;
height: 95vh;
// height: 95vh;
}
.el-dialog__headerbtn {
......
......@@ -149,7 +149,7 @@ export function getCurrentDate (date = 'firstDay') {
export function setExport2Excel (exportName) {
/* generate workbook object from table */
var wb = XLSX2.utils.table_to_sheet(document.querySelector("#mytable"));//mytable为表格的id名
var wb = XLSX2.utils.table_to_sheet(document.querySelector("#mytable"), { raw: true });//mytable为表格的id名
if (!wb['!merges']) {
this.$message.warning('无法导出:报表无数据');
return
......
......@@ -43,19 +43,23 @@ class data extends filter {
// },
{
label: "查封机关",
prop: "cfjg"
prop: "cfjg",
minWidth: 150,
},
{
label: "查封文号",
prop: "cfwh"
prop: "cfwh",
minWidth: 130,
},
{
label: "解封机关",
prop: "jfjg"
prop: "jfjg",
width: 150,
},
{
label: "解封文号",
prop: "jfwh"
prop: "jfwh",
minWidth: 130,
},
{
......
<template>
<div class="rightcard">
<div class="card2 cardCon mt-10">
<div class="cardhead">登记业务量</div>
<Rose />
</div>
<div class="card1 cardCon d-center">
<div class="cardhead">新建国有房屋信息</div>
<div class="cardhead">登记业务量</div>
<div class="cardcontent" style="margin-top: .3646rem">
<dv-scroll-board v-if="config.data.length > 0" :config="config" class="board" />
<div v-else class="nodata">暂无数据</div>
</div>
</div>
<div class="card2 cardCon mt-10">
<div class="cardhead">新建国有房屋信息</div>
<Rose />
</div>
<div class="card3 cardCon mt-10">
<div class="cardhead">登记类型总量</div>
<columnarsmat />
......@@ -30,7 +29,8 @@
headerBGC: '#016AC5',
oddRowBGC: '#154295',
evenRowBGC: '#154295',
header: ['序号', '用途', '性质', '面积'],
header: ['序号', '业务名称', '登记业务量'],
columnWidth: [120, 270, 140],
data: [],
key: 0
}
......@@ -38,23 +38,38 @@
},
components: { columnarsmat, Rose },
mounted () {
this.addhousetotal();
this.getdjywltotal();
window.addEventListener("resize", () => {
this.cdata.seriesData = [];
this.getdjywltotal();
});
// scroll(tableref.value.$refs.bodyWrapper);//设置滚动
},
methods: {
async addhousetotal () {
// 获取登记业务量玫瑰图数据
async getdjywltotal () {
try {
let { result: res } = await work.addhousetotal();
res.map((item, index) => {
return (
this.config.data.push([index, item.fwyt, item.fwxz, item.mj])
)
let p = {
DJLX: "",
QLLX: "",
XZQDM: "",
};
let res = await work.getdjywltotal(p);
res.result.map((item, index) => {
this.config.data.push([index, item.AREACODE, item.ywtotal])
});
// 遍历修改数组键,作为echars图表的参数
} catch (error) {
console.log("error", error);
}
}
console.log(error);
}
},
},
}
</script>
<style lang="scss" scoped>
......@@ -134,6 +149,7 @@
background: url("~@/image/djywl.png") no-repeat;
background-size: 100% 100%;
padding: 0.3825rem 0 0 0;
overflow: hidden;
}
.card3 {
......
......@@ -78,6 +78,7 @@ export default {
endTime: timeFormat(new Date(), true),
qxdm: "",
},
interval: 50
};
},
mounted () {
......@@ -100,6 +101,10 @@ export default {
this.form.qxdm
);
this.chartData = res;
console.log(this.chartData);
let maxData = Math.max.apply(Math, this.chartData.map(item => { return item.failure }))
this.interval = Math.ceil(maxData / 10)
//行政区代码过滤
res.length > 0 &&
res.forEach((item) => {
......@@ -191,7 +196,7 @@ export default {
color: "#fff",
fontSize: "16",
},
interval: 50,
// interval: this.interval,
axisLabel: {
formatter: "{value}",
textStyle: {
......
......@@ -105,6 +105,7 @@ export default {
// 初始化图表
this.chartData.length && this.echartInit(this.chartData)
});
},
// 重置
resetForm () {
......@@ -131,6 +132,7 @@ export default {
},
grid: {
top: 120,
bottom: 100,
},
xAxis: [
{
......@@ -138,6 +140,7 @@ export default {
data: chartArr.map(item => item.recTypeName),
axisLabel: {
interval: 0,
rotate: 40,
formatter: function (val) {
let c = document.createElement("canvas");
const ctx = c.getContext("2d");
......@@ -185,6 +188,7 @@ export default {
},
},
],
series: [
{
type: "bar",
......
......@@ -60,7 +60,7 @@
getAction(api.subsystem, params).then((res) => {
if (res.status === 1) {
console.log(" res.contentJJJGGG", res.content);
// this.productName = res.content[0].name;
this.productName = res.content[0].name;
this.$store.dispatch("products/setData", res.content[0].code);
sessionStorage.setItem("products", res.content[0].code)
console.log("jjjggg的product");
......
......@@ -67,7 +67,6 @@
getAction(api.subsystem, params).then((res) => {
if (res.status === 1) {
this.productName = res.content[0].name;
// console.log(" res.contentSSSSSBBBBB", res.content);
this.$store.dispatch("products/setData", res.content[0].code);
sessionStorage.setItem("products", res.content[0].code)
......
......@@ -18,3 +18,8 @@
.export-excel-wrapper {
display: inline-block;
}
/deep/.el-table--group,
.el-table--border {
border: 1px solid #458ACF !important;
}
\ No newline at end of file
......
......@@ -87,7 +87,10 @@ class data extends filter {
prop: 'failReportRatio24To48h',
render: (h, scope) => {
return (
<span>{(scope.row.failReportRatio24To48h * 100).toFixed(2)}%</span>
<div>
<span>{(scope.row.failReportRatio24To48h * 100).toFixed(2)}</span>
%
</div>
);
},
}
......
......@@ -173,5 +173,9 @@ export default {
// 引入表单整体样式
// @import "~@/styles/public.scss";
@import "../css/index.scss";
/deep/th.el-table__cell {
height: 0 !important;
}
</style>
......
......@@ -14,13 +14,11 @@ class data extends filter {
label: '分项',
children: [
{
width:1
},
{
label: '国有建设用地使用权登记得分及空项率',
children: [
{
prop: 'gyjsydsyqRate',
width: 150,
render: (h, scope) => {
return (
<span>{scope.row.gyjsydsyqRate.toFixed(2)}</span>
......@@ -29,6 +27,7 @@ class data extends filter {
},
{
prop: 'gyjsydsyqRadio',
width: 150,
render: (h, scope) => {
return (
<span>{(scope.row.gyjsydsyqRadio * 100).toFixed(2)}%</span>
......
<!--
* @Author: yangwei
* @Date: 2023-02-17 16:32:50
* @LastEditors: yangwei
* @LastEditTime: 2023-03-09 11:19:43
* @LastEditors: Please set LastEditors
* @LastEditTime: 2023-03-14 13:19:18
* @FilePath: \bdcjg-web\src\views\statistics\registerBookQuality\index.vue
* @Description:
*
......@@ -43,10 +43,11 @@
</div>
<!-- 列表区域 -->
<div class="from-clues-content">
<lb-table ref="table" :pagination="false" :header-cell-style="headerStyle" :column="tableData.columns" :data="tableData.data">
<lb-table ref="table" :pagination="false" :border="true" :header-cell-style="headerStyle"
:column="tableData.columns" :data="tableData.data">
</lb-table>
<down-lb-table ref="table" v-show="false" :id="'mytable'" :downExcel="true" :pagination="false"
:column="tableData.columns" :data="tableData.data" :downTitle="downTitle">
<down-lb-table ref="table" v-show="false" :id="'mytable'" :header-cell-style="headerStyle1" :downExcel="true"
:pagination="false" :column="tableData.columns" :data="tableData.data" :downTitle="downTitle">
</down-lb-table>
</div>
</div>
......@@ -138,6 +139,17 @@ export default {
this.handleResetForm()
this.generateFileName()
},
mounted () {
this.$nextTick(function () {
let c = document.getElementsByClassName("el-table__header")
let k = c[0].getElementsByClassName("is-group has-gutter");
let f = k[0].children
let d = f[1].getElementsByClassName("el-table__cell")
let p = d[0]
p.setAttribute("rowspan", 2)
})
},
methods: {
handleSearch () { },
// 生成文件名
......@@ -150,15 +162,16 @@ export default {
},
headerStyle ({ row, rowIndex }) {
if (rowIndex == 1) {
row[0].colSpan = 2
row.forEach(item=>{
row.forEach(item => {
item.rowSpan = 2
})
}
},
headerStyle1 ({ row, rowIndex }) {
if (rowIndex == 2) {
row.forEach(item => {
item.rowSpan = 2
})
// row[0].rowSpan = 2;
// row[1].rowSpan = 2;
// row[2].rowSpan = 2;
// row[3].rowSpan = 2;
// row[4].rowSpan = 2;
}
},
// 初始化数据
......@@ -181,5 +194,9 @@ export default {
// 引入表单整体样式
// @import "~@/styles/public.scss";
@import "../css/index.scss";
/deep/.el-table thead.is-group th.el-table__cell {
height: 14px !important;
}
</style>
......
......@@ -84,7 +84,7 @@
},
mounted () {
if (this.userInfo) {
this.getUserdata(this.userInfo)
this.getUserdata(this.userInfo.id)
}
this.sexList = [
{
......@@ -105,8 +105,8 @@
]
},
methods: {
getUserdata (p) {
getAction(`${api.users}/${p.id}`).then((res) => {
getUserdata (id) {
getAction(`${api.users}/${id}`).then((res) => {
if (res.status === 1) {
this.form = res.content
} else {
......@@ -135,7 +135,6 @@
<style scoped lang="scss">
.user-info {
margin: 0.1875rem 1.0417rem;
background: #ffffff;
overflow-y: auto;
.form-wrapper {
padding: 0px 120px 0px;
......@@ -156,7 +155,7 @@
}
.bottom-wrapper {
padding: 0px 120px 0px;
text-align: right;
text-align: center;
}
}
</style>
......
<!--
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-03-08 15:30:43
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-08 16:33:50
* @FilePath: \监管系统\js-web-jianguan\src\views\system\information copy\index.vue
* @LastEditors: yangwei
* @LastEditTime: 2023-03-13 17:19:46
* @FilePath: \bdcjg-web\src\views\system\information\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
......@@ -15,8 +15,18 @@
</el-form-item>
<el-row class="mb-5">
<el-col :span="3" class="btnColRight">
<btn nativeType="cx" @click="information">基本信息</btn>
<btn nativeType="cx" @click="password">修改密码</btn>
<!-- <btn nativeType="cx" @click="information"
>基本信息</btn
>
<btn nativeType="cx" :class="isshow ? '' : ''" @click="password"
>修改密码</btn
> -->
<button @click="information" :class="isshow ? 'button choosed' : 'button'">
基本信息
</button>
<button @click="password" :class="isshow ? 'button' : 'button choosed'">
修改密码
</button>
</el-col>
</el-row>
</el-form>
......@@ -30,45 +40,59 @@
</div>
</template>
<script>
import "@/utils/flexible.js";
import BaseSet from "./base-set.vue";
import PasswordEdit from "./password-edit.vue";
export default {
import "@/utils/flexible.js";
import BaseSet from "./base-set.vue";
import PasswordEdit from "./password-edit.vue";
export default {
components: {
BaseSet,
PasswordEdit,
},
data () {
data() {
return {
isshow: true,
};
},
computed: {
userData () {
userData() {
return this.$store.state.user.userInfo;
},
},
watch: {},
created () { },
mounted () {
},
created() {},
mounted() {},
methods: {
information () {
information() {
this.isshow = true;
},
password () {
password() {
this.isshow = false;
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
.information {
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
.information {
display: flex;
flex-direction: column;
.btnColRight {
.button {
width: 76px;
height: 32px;
color: #ffffff;
margin: 0 5px;
cursor: pointer;
border: 0;
background: url('../../../image/btn.png') no-repeat 0 0;
background-size: cover;
}
.choosed{
background: url('../../../image/btn.png') no-repeat 0 -34px;
}
}
/deep/.content {
.el-input__inner {
background: none;
......@@ -76,10 +100,9 @@
.user-info {
background: none;
}
.boxin {
height: 79%;
}
}
.boxin {
flex: 1;
}
}
</style>
......
......@@ -6,27 +6,31 @@
label-width="100px"
:model="form"
class="form-wrapper"
:rules="rules">
:rules="rules"
>
<el-form-item label="旧密码:" prop="oldPassword">
<el-input
v-model="form.oldPassword"
clearable
type="password"
show-password />
show-password
/>
</el-form-item>
<el-form-item label="新密码:" prop="newPassword">
<el-input
v-model="form.newPassword"
clearable
type="password"
show-password />
show-password
/>
</el-form-item>
<el-form-item label="确认密码:" prop="confirmPassword">
<el-input
v-model="form.confirmPassword"
clearable
type="password"
show-password />
show-password
/>
</el-form-item>
</el-form>
<div class="bottom-wrapper">
......@@ -37,83 +41,81 @@
</template>
<script>
import { updateUserPassword } from "@/api/personnelManage";
export default {
import { updateUserPassword } from "@/api/personnelManage";
export default {
props: {
userInfo: {
type: Object,
default: null
}
default: null,
},
},
data () {
data() {
return {
form: {},
sexList: [],
userId: '',
userId: "",
rules: {
oldPassword: [
{ required: true, message: '旧密码不能为空', trigger: 'blur' }
{ required: true, message: "旧密码不能为空", trigger: "blur" },
],
newPassword: [
{ required: true, message: '新密码不能为空', trigger: 'blur' }
{ required: true, message: "新密码不能为空", trigger: "blur" },
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: 'blur' },
{ validator: this.validatorConfirmPassword, trigger: 'blur' }
]
}
}
{ required: true, message: "确认密码不能为空", trigger: "blur" },
{ validator: this.validatorConfirmPassword, trigger: "blur" },
],
},
};
},
computed: {},
watch: {
userInfo: {
handler: function (val) {
if (val) {
this.getid(val)
}
this.getid(val);
}
}
},
mounted () {
},
},
mounted() {
if (this.userInfo) {
this.getid(this.userInfo)
this.getid(this.userInfo);
}
},
methods: {
getid (val) {
this.userId = val.id
getid(val) {
this.userId = val.id;
},
validatorConfirmPassword (rule, value, callback) {
const { newPassword } = this.form
validatorConfirmPassword(rule, value, callback) {
const { newPassword } = this.form;
if (value !== newPassword) {
callback('两次输入密码不一致')
callback("两次输入密码不一致");
} else {
callback()
callback();
}
},
updatePassword () {
updatePassword() {
this.$refs.form.validate((valid) => {
if (valid) {
const params = Object.assign({}, this.form, { id: this.userId })
const params = Object.assign({}, this.form, { id: this.userId });
updateUserPassword(params).then((res) => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.$message.success({ message: res.message, showClose: true });
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
}
})
}
this.$message.error({ message: res.message, showClose: true });
}
});
}
});
},
},
};
</script>
<style scoped lang="scss">
.user-info {
.user-info {
margin: 36px 200px;
background: #ffffff;
overflow-y: auto;
.form-wrapper {
padding: 24px 120px 0px;
......@@ -132,7 +134,7 @@
}
.bottom-wrapper {
padding: 32px 120px 24px;
text-align: right;
}
text-align: center;
}
}
</style>
......
<template>
<div>
<Dialog class="modifydialog" :title="title" :show.sync="visible" :width="'767px'" @close="close()">
<template slot="content">
<dialogBox class="modifydialog" :isMain="true" :title="2222" @closeDialog="close" @submitForm="submitForm" v-model="myValue">
<div class="modifydialog-con">
<el-form ref="form" :model="form" :rules="rules">
<el-row :gutter="24">
<el-col :span="12">
......@@ -51,33 +50,22 @@
</el-col>
</el-row>
</el-form>
</template>
<template slot="footer">
<el-button class="cancel-button" @click="close()">取消</el-button>
<el-button type="primary" @click="submitForm()">保存</el-button>
</template>
</Dialog>
<!-- 图标列表 -->
<IconList ref="iconList" @iconName="getIconName" />
</div>
</dialogBox>
</template>
<script>
import Dialog from "@/components/Dialog/";
import { getParentMenuListAction } from '@/api/authorityManage'
import JsonEditor from '@/components/JsonEditors'
import IconList from '@/components/IconList'
import { validateCode } from '@/utils/validate';
import { api, httpAction } from '@/api/manageApi'
export default {
import { getParentMenuListAction } from '@/api/authorityManage'
import JsonEditor from '@/components/JsonEditors'
import { validateCode } from '@/utils/validate';
import { api, httpAction } from '@/api/manageApi'
export default {
name: 'MenuModal',
components: {
IconList,
JsonEditor,
Dialog
},
props: {
value: { type: Boolean, default: false },
productId: {
type: String,
default: ''
......@@ -85,6 +73,7 @@
},
data () {
return {
myValue: this.value,
form: {
icon: '',
code: ''
......@@ -126,8 +115,11 @@
}
}
},
created () { },
mounted () { },
watch: {
value (val) {
this.myValue = val
}
},
methods: {
// 获取父级菜单
getParentMenuList (id) {
......@@ -162,7 +154,6 @@
// 新增菜单
add () {
this.getParentMenuList(this.productId)
this.visible = true
this.type = 0
this.form.jumpMode = 1
},
......@@ -176,7 +167,6 @@
this.getParentMenuList(this.productId)
})
}
this.visible = true
},
// 选择上级菜单
handleChange (value) {
......@@ -230,8 +220,12 @@
this.visible = false
}
}
}
}
</script>
<style scoped lang="scss">
// @import "~@/styles/public.scss";
.modifydialog {
&-con {
background: #031A46;
}
}
</style>
\ No newline at end of file
......
......@@ -17,27 +17,27 @@
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
</lb-table>
</div>
<edit-dialog ref="dialogForm" :product-id="productId" :resource-category-id="resourceCategoryId"
<edit-dialog ref="dialogForm" v-model="isDialog" :product-id="productId" :resource-category-id="resourceCategoryId"
@ok="reloadTableData" />
<!-- <authorizationdiglog ref="rolesForm" /> -->
</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 {
// 定时任务
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";
// import authorizationdiglog from "./authorizationdiglog.vue";
export default {
} from "@/utils/operation";
// import authorizationdiglog from "./authorizationdiglog.vue";
export default {
name: "menus",
components: {
EditDialog,
......@@ -45,6 +45,7 @@
},
data () {
return {
isDialog: false,
tablelistData: [],
resourceCategoryId: "",
taskData: null,
......@@ -147,113 +148,22 @@
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);
});
// 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;
// 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.tablelistData = 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);
// });
})
},
// 新增菜单
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 = "修改";
},
......@@ -302,17 +212,17 @@
this.getTableList()
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
.btnColRight {
// @import "~@/styles/public.scss";
.btnColRight {
margin-top: 20px;
}
}
/deep/.el-table__expand-icon {
/deep/.el-table__expand-icon {
color: #fff;
}
}
</style>
......
......@@ -38,6 +38,7 @@
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],
......@@ -107,7 +108,7 @@
.concat([
{
label: "排序",
width: 100,
width: 200,
render: (h, scope) => {
return (
<div>
......@@ -115,7 +116,16 @@
type="text"
disabled={scope.row.isTop}
onClick={() => {
this.moveUpward(scope.$index, scope.row);
this.updateOrder(scope.row,'TOP');
}}
>
置顶
</el-button>
<el-button
type="text"
disabled={scope.row.isTop}
onClick={() => {
this.updateOrder(scope.row,'UP');
}}
>
上移
......@@ -124,11 +134,20 @@
type="text"
disabled={scope.row.isBottom}
onClick={() => {
this.moveDown(scope.$index, scope.row);
this.updateOrder(scope.row,'DOWN');
}}
>
下移
</el-button>
<el-button
type="text"
disabled={scope.row.isBottom}
onClick={() => {
this.updateOrder(scope.row,'BOTTOM');
}}
>
置底
</el-button>
</div>
);
},
......@@ -225,22 +244,12 @@
methods: {
// 获取角色列表
getTableData () {
let Builtinrole = [];
let Publicrole = [];
getRolesById(1)
.then((res) => {
Builtinrole = res.content;
getRolesById(2)
getRolesById([1,2])
.then((res) => {
Publicrole = res.content;
this.listdata = Builtinrole.concat(Publicrole);
this.listdata = res.content;
this.listdata = judgeSort(this.listdata);
})
.catch((e) => console.error(e));
})
.catch((e) => console.error(e));
},
// 获取菜单列表
......@@ -397,20 +406,24 @@
this.$refs.addEditDialog.showAddEditDialog = true;
this.$refs.addEditDialog.dialogTitle = value.id ? "修改" : "新增";
},
// 上移下移
moveUpward (index, row) {
realMove(row.dictid, "UP", this.listdata);
this.key++;
let id = findParents(this.listdata, row.dictid);
this.keyList = id;
},
moveDown (index, row) {
realMove(row.dictid, "DOWN", this.listdata);
this.key++;
let id = findParents(this.listdata, row.dictid);
this.keyList = 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(
......
......@@ -46,6 +46,7 @@
import { deleteDomStr } from '@/utils/proDomStr'
import tableMixin from "@/mixins/tableMixin.js";
import EditDialog from "./edit-dialog.vue";
import {updateOrder} from "@/api/orders"
export default {
name: "menus",
mixins: [tableMixin],
......@@ -109,7 +110,7 @@
},
{
label: "排序",
width: 100,
width: 200,
render: (h, scope) => {
return (
<div>
......@@ -117,7 +118,16 @@
type="text"
disabled={scope.row.isTop}
onClick={() => {
this.moveUpward(scope.$index, scope.row);
this.updateOrder(scope.row,'TOP');
}}
>
置顶
</el-button>
<el-button
type="text"
disabled={scope.row.isTop}
onClick={() => {
this.updateOrder(scope.row,'UP');
}}
>
上移
......@@ -126,11 +136,20 @@
type="text"
disabled={scope.row.isBottom}
onClick={() => {
this.moveDown(scope.$index, scope.row);
this.updateOrder(scope.row,'DOWN');
}}
>
下移
</el-button>
<el-button
type="text"
disabled={scope.row.isBottom}
onClick={() => {
this.updateOrder(scope.row,'BOTTOM');
}}
>
置底
</el-button>
</div>
);
},
......@@ -257,18 +276,23 @@
})
.catch(() => { })
},
// 上移下移
moveUpward (index, row) {
realMove(row.dictid, "UP", this.tableData.data);
this.key++;
let id = findParents(this.tableData.data, row.dictid);
this.keyList = id;
},
moveDown (index, row) {
realMove(row.dictid, "DOWN", this.tableData.data);
this.key++;
let id = findParents(this.tableData.data, row.dictid);
this.keyList = id;
//排序
updateOrder(record, operate){
const findIndex = this.tableData.data.findIndex(item => item.id === record.id)
let swapId = ''
if (operate === 'UP') {
swapId = this.tableData.data[findIndex - 1].id
} else if (operate === 'DOWN') {
swapId = this.tableData.data[findIndex + 1].id
}
updateOrder('/rest/users', record, operate, swapId).then(res => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.getTableList();
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
},
// 修改人员信息
handleEdit (row) {
......