049a3183 by 任超

style:打包文件配置

2 parents 53e4f2f1 3d27d359
Showing 62 changed files with 1445 additions and 1043 deletions
......@@ -5,4 +5,4 @@ NODE_ENV=development
VUE_APP_BASE_API = '/api'
# 开发环境
VUE_APP_API_BASE_URL = 'http://192.168.2.38:8008'
VUE_APP_API_BASE_URL = 'http://192.168.2.38:8027'
......
import request from "@/utils/request";
import SERVER from "./config";
import { getParams } from './util'
import {
api,
getAction,
postAction,
deleteAction,
putAction
} from './manageApi'
/** 角色管理开始 */
// 获取角色列表 categoryId
export const getRolesById = categoryId => {
const conditionGroup = {
conditions: [
{
property: 'category',
value:categoryId,
operator: 'EQ'
}
],
queryRelation: 'AND'
}
const params = getParams(conditionGroup);
console.log(api.roles,params);
return getAction(api.roles, params)
}
// 人员列表
export const getUserRoles = (id) => {
return getAction(`${api.userRoles}/${id}/users`)
}
// 更新人员
export const updateUser = (id, data) => {
return putAction(`${api.userRoles}/${id}/users`, data)
}
import request from "@/utils/request";
import SERVER from "./config";
export function loginIn(username, password) {
return request({
url: `${SERVER.MANAGEMENTAPI}/login?username=${username}&password=${password}`,
method: "post",
});
}
export function logout() {
return request({
url: `${SERVER.MANAGEMENTAPI}/logout`,
method: "post",
});
}
\ No newline at end of file
import request from '@/utils/request'
import SERVER from "./config";
const workflow = '/workflow'
const log = '/log'
const crud = '/crud'
export const api = {
userInfo: SERVER.MANAGEMENTAPI + '/rest/user-info', // 登录用户信息
permissionsUser: SERVER.MANAGEMENTAPI + '/rest/user-permissions', // 用户权限
baseDataCategory: SERVER.MANAGEMENTAPI + '/rest/base-data-category', // 数据字典类别
baseData: SERVER.MANAGEMENTAPI + '/rest/base-data', // 数据字典
districts: SERVER.MANAGEMENTAPI + '/rest/districts', // 行政区划
districtsAll: SERVER.MANAGEMENTAPI + '/rest/districts/parent-tree', // 条件查询所有行政区划
organizations: SERVER.MANAGEMENTAPI + '/rest/organizations', // 组织机构
departments: SERVER.MANAGEMENTAPI + '/rest/departments', // 部门
users: SERVER.MANAGEMENTAPI + '/rest/users', // 人员用户
roles: SERVER.MANAGEMENTAPI + '/rest/roles', // 角色
userRoles: SERVER.MANAGEMENTAPI + '/rest/user-roles', // 角色对应人员关系
productCategory: SERVER.MANAGEMENTAPI + '/rest/product-category', // 业务分类
resourceCategory: SERVER.MANAGEMENTAPI + '/rest/resource-category', // 资源分类
resources: SERVER.MANAGEMENTAPI + '/rest/resources', // 资源详情列表
subsystem: SERVER.MANAGEMENTAPI + '/rest/products', // 子系统管理
operations: SERVER.MANAGEMENTAPI + '/rest/operations', // 操作
menus: SERVER.MANAGEMENTAPI + '/rest/menus', // 菜单
organizationPermissions: SERVER.MANAGEMENTAPI + '/rest/organization-permissions', // 机构授权
departmentPermissions: SERVER.MANAGEMENTAPI + '/rest/department-permissions', // 部门授权
rolePermissions: SERVER.MANAGEMENTAPI + '/rest/role-permissions', // 角色授权
peoPermissions: SERVER.MANAGEMENTAPI + '/rest/user-permissions', // 用户授权
resourcePermissions: SERVER.MANAGEMENTAPI + '/rest/resource-permissions', // 资源授权查询
menuPermissions: SERVER.MANAGEMENTAPI + '/rest/menu-permissions', // 菜单授权查询
serviceCategory: SERVER.MANAGEMENTAPI + '/rest/service-category', // 服务分类
service: SERVER.MANAGEMENTAPI + '/rest/service', // 服务详情列表
databaseServer: workflow + '/rest/database-server', // 数据库服务器
materialCategory: workflow + '/rest/material-category', // 材料分类
material: workflow + '/rest/material', // 材料
function: workflow + '/rest/function', // 功能属性
eventCategory: workflow + '/rest/event-category', // 服务事件分类
event: workflow + '/rest/event', // 服务事件
formCategorys: workflow + '/rest/forms-category', // 表单分类
forms: workflow + '/rest/forms', // 表单
metadata: workflow + '/rest/metadata', // 元数据
dataObjectCategory: workflow + '/rest/data-object-category', // 对象管理类别
dataObject: workflow + '/rest/data-object', // 对象管理
workflowBusiness: workflow + '/rest/businesses', // 业务流程
// workflowModel: workflow+'/rest/workflow/model',//流程模型
modelcategorys: workflow + '/rest/model-categories', // 模型分类
models: workflow + '/rest/models', // 工作流模型表
businessesModels: workflow + '/rest/businesses-models', // 业务流程关系
pluginCategory: workflow + '/rest/plugin-category', // 流程插件分类管理
plugin: workflow + '/rest/plugins', // 流程插件分类管理
groups: workflow + '/rest/groups', // 用户组分类
groupUsers: workflow + '/rest/group-users', // 用户组人员
saveWorkflowGroupUser: workflow + '/rest/groups/sug', // 工作流设计器增加用户组
validate: workflow + '/rest/models/validate', // 流程验证
tokens: SERVER.MANAGEMENTAPI + '/rest/tokens', // token
session: '/rest/session', // session
pwdSetting: SERVER.MANAGEMENTAPI + '/rest/password-setting', //
singleSign: '/cas/rest/services', // 单点登录管理
attachments: SERVER.MANAGEMENTAPI + '/rest/attachments', // 文件上传服务
instances: workflow + '/rest/workflow/instances', // 实例
workflowTask: workflow + '/rest/workflow-task', // 任务
definitions: workflow + '/rest/workflow/definitions', // 流程实例
systemAccessLogs: log + '/rest/system-access-logs', // 系统访问日志
errorLogs: log + '/rest/common-log-statistics', // 错误日志
appAccess: log + '/rest/system-access-logs/count-app-access', // 系统访问数
userAccess: log + '/rest/system-access-logs/count-user-access', // 用户访问数
statisticMenus: log + '/rest/system-access-logs/statistic-menus', // 统计菜单访问数
statisticUsers: log + '/rest/system-access-logs/statistic-users', // 统计用户访问数
abnormal: log + '/rest/abnormal', // 统计平台报警
monitorConfig: log + '/rest/monitor-alert-config', // 监控预警配置
statisticTimes: log + '/rest/system-access-logs/statistic-times', // 监控预警配置
server: log + '/rest/server', // 服务器监控
serverStatistics: log + '/rest/server-statistics', // 服务器监控信息统计
avgTimes: log + '/rest/services-statistics/avg-times', // 根据时间查响应时间和访问次数
statisticDepts: log + '/rest/system-access-logs/statistic-depts', // 访问部门统计
crudHead: crud + '/rest/head', // crudhead
crudGet: crud + '/rest/get', // crudget
crudPost: crud + '/rest/post', // crudPost
crudPut: crud + '/rest/put', // crudPut
crudDel: crud + '/rest/delete', // crudDel
crudMetadata: crud + '/rest/metadata', //crudMetadata
crudBusiness : crud + '/rest/business', // crudBusiness
crudDatasources : crud + '/rest/datasources', // crudDatasources
}
// get公共方法
export function getAction(url, params = {}) {
return request({
url,
method: 'get',
params
})
}
// post公共方法
export function postAction(url, data = null) {
return request({
url,
method: 'post',
data
})
}
// method= {post | put}
export function httpAction(url, data, method) {
return request({
url,
method,
data
})
}
// put公共方法
export function putAction(url, data = null) {
return request({
url,
method: 'put',
data
})
}
// delete
export function deleteAction(url, data = null) {
return request({
url,
method: 'delete',
data
})
}
// 批量删除
export function deleteBranch(url, data) {
return request({
url,
method: 'delete',
data
})
}
......@@ -6,15 +6,19 @@ class sjsbTask {
// 定时任务查询接口
async getTaskListByName (data) {
return request({
url: SERVER.SERVERAPI + '/sjsbTask/getTaskListByName',
method: 'post',
data
url: SERVER.SERVERAPI + '/rest/schedule/getScheduleList',
method: 'get',
params: {
jobName: data.jobName,
pageNo: data.currentPage,
pageSize: data.pageSize
}
})
}
// 定时任务新增接口
async sjsbTaskSave (data) {
return request({
url: SERVER.SERVERAPI + '/sjsbTask/save',
url: SERVER.SERVERAPI + '/rest/schedule/add',
method: 'post',
data
})
......@@ -22,7 +26,7 @@ class sjsbTask {
// 修改定时任务执行时间接口
async updateCron (data) {
return request({
url: SERVER.SERVERAPI + '/sjsbTask/updateCron',
url: SERVER.SERVERAPI + '/rest/schedule/update',
method: 'post',
data
})
......@@ -30,52 +34,32 @@ class sjsbTask {
// 定时任务删除接口
async sjsbTaskRemove (id) {
return request({
url: SERVER.SERVERAPI + '/sjsbTask/remove',
url: SERVER.SERVERAPI + '/rest/schedule/delete',
method: 'get',
params: {
id: id
}
})
}
// 暂停任务接口
async pauseJob (id) {
return request({
url: SERVER.SERVERAPI + '/sjsbTask/pauseJob',
method: 'get',
params: {
id: id
jobId: id
}
})
}
// 恢复任务接口
async resumeJob (id) {
async recover (id) {
return request({
url: SERVER.SERVERAPI + '/sjsbTask/resumeJob',
url: SERVER.SERVERAPI + '/rest/schedule/recover',
method: 'get',
params: {
id: id
jobId: id
}
})
}
// 激活任务接口
async activateJob (id) {
return request({
url: SERVER.SERVERAPI + '/sjsbTask/activateJob',
method: 'get',
params: {
id: id
}
})
}
// 手动测试
async sjsbTaskRun (id) {
async active (id) {
return request({
url: SERVER.SERVERAPI + '/sjsbTask/run',
url: SERVER.SERVERAPI + '/rest/schedule/active',
method: 'get',
params: {
id: id
jobId: id
}
})
}
}
export default new sjsbTask()
\ No newline at end of file
export default new sjsbTask()
......
// 默认生成参数
export const getParams = (
conditionGroup,
orderBys = [{ property: 'sort', direction: 'desc' }]
) => {
const params = {}
const queryOptions = {
conditionGroup,
orderBys
}
params.queryOptions = JSON.stringify(queryOptions)
return params
}
......@@ -36,6 +36,16 @@ class work {
}
})
}
// 数据趋势
async dataTrend (code) {
return request({
url: SERVER.SERVERAPI + '/rest/reg/work/dataTrend',
method: 'get',
params: {
code: code
}
})
}
// 新建国有房屋信息
async addhousetotal (code) {
return request({
......
......@@ -3,69 +3,69 @@
</template>
<script>
import tdTheme from './theme.json' // 引入默认主题
import '../map/hanzhong.js'
import tdTheme from "./theme.json"; // 引入默认主题
import "../map/hanzhong.js";
export default {
name: 'echart',
name: "echart",
props: {
className: {
type: String,
default: 'chart'
default: "chart",
},
id: {
type: String,
default: 'chart'
default: "chart",
},
width: {
type: String,
default: '100%'
default: "100%",
},
height: {
type: String,
default: '2.5rem'
default: "2.5rem",
},
options: {
type: Object,
default: () => ({})
}
default: () => ({}),
},
},
data () {
data() {
return {
chart: null
}
chart: null,
};
},
watch: {
options: {
handler (options) {
handler(options) {
// 设置true清空echart缓存
this.chart.setOption(options, true)
window.addEventListener('resize',()=>{
this.chart.resize()
})
this.chart.setOption(options, true);
window.addEventListener("resize", () => {
if (this.chart) {
this.chart.resize();
}
});
},
deep: true
}
deep: true,
},
},
mounted () {
this.$echarts.registerTheme('tdTheme', tdTheme); // 覆盖默认主题
mounted() {
this.$echarts.registerTheme("tdTheme", tdTheme); // 覆盖默认主题
this.initChart();
},
beforeDestroy () {
this.chart.dispose()
this.chart = null
beforeDestroy() {
this.chart.dispose();
this.chart = null;
},
methods: {
initChart () {
initChart() {
// 初始化echart
this.chart = this.$echarts.init(this.$el, 'tdTheme')
function nowSize(val,initWidth=1920){
return val * (nowClientWidth/initWidth);
}
this.chart.setOption(this.options, true)
}
}
}
this.chart = this.$echarts.init(this.$el, "tdTheme");
function nowSize(val, initWidth = 1920) {
return val * (nowClientWidth / initWidth);
}
this.chart.setOption(this.options, true);
},
},
};
</script>
......
......@@ -56,14 +56,15 @@ export default {
<style lang="scss" scoped>
.breadcrumb {
width: 80%;
text-indent: 10px;
background: url("~@/image/breadcrumb.png") no-repeat;
background-size: 100% 100%;
line-height: 32px;
height: 32px;
padding-left: 35px;
margin: 8px 0 8px 6px;
color: #02D9FD;
margin: 8px 0 10px 6px;
color: #CEF8FF;
}
/deep/.el-icon-arrow-right {
......@@ -75,7 +76,7 @@ export default {
}
/deep/.el-breadcrumb__inner {
color: #02D9FD !important;
color: #CEF8FF !important;
}
.breadcrumb1366 {
......
......@@ -49,10 +49,10 @@ export default {
watch: {
cdata: {
handler (newData) {
this.xAxisData = newData.echartData.map((v) => v.name);
this.yAxisData1 = newData.echartData.map((v) => v.value1);
this.yAxisData2 = newData.echartData.map((v) => v.value2);
this.yAxisData3 = newData.echartData.map((v) => v.value3);
this.xAxisData = newData.echartData.map((v) => v.yearMonth);
this.yAxisData1 = newData.echartData.map((v) => v.receive);
this.yAxisData2 = newData.echartData.map((v) => v.record);
this.yAxisData3 = newData.echartData.map((v) => v.report);
this.options = {
color: newData.color,
legend: {
......
......@@ -4,83 +4,18 @@
<script>
import Chart from './Chart'
import work from "@/api/work";
export default {
data () {
return {
cdata: {
legendItem: ['接入', '上报', '登簿'],
color: [
"#5324DA",
"#E873B2",
"#F4AF6F "
"#02D9FD",
"#FF7962",
"#F5C03D "
],
echartData: [{
name: "2017-11",
value1: 1351,
value2: 600,
value3: 568,
},
{
name: "2017-11",
value1: 980,
value2: 1245,
value3: 1100,
},
{
name: "2017-11",
value1: 1127,
value2: 398,
value3: 568,
},
{
name: "2017-11",
value1: 1046,
value2: 689,
value3: 479
},
{
name: "2018-02",
value1: 780,
value2: 396,
value3: 655
},
{
name: "2018-08",
value1: 359,
value2: 1220,
value3: 540,
},
{
name: "2018-07",
value1: 229,
value2: 836,
value3: 1234,
},
{
name: "2018-09",
value1: 1176,
value2: 478,
value3: 755,
},
{
name: "2018-11",
value1: 515,
value2: 911,
value3: 806,
},
{
name: "2019-01",
value1: 658,
value2: 979,
value3: 813,
},
{
name: "2019-03",
value1: 364,
value2: 839,
value3: 886,
},
]
echartData: []
}
}
},
......@@ -88,84 +23,23 @@ export default {
Chart
},
mounted() {
window.addEventListener("resize", () => {
this.cdata=[],
this.cdata= {
legendItem: ['接入', '上报', '登簿'],
color: [
"#5324DA",
"#E873B2",
"#F4AF6F "
],
echartData: [{
name: "2017-11",
value1: 1351,
value2: 600,
value3: 568,
},
{
name: "2017-11",
value1: 980,
value2: 1245,
value3: 1100,
},
{
name: "2017-11",
value1: 1127,
value2: 398,
value3: 568,
},
{
name: "2017-11",
value1: 1046,
value2: 689,
value3: 479
},
{
name: "2018-02",
value1: 780,
value2: 396,
value3: 655
},
{
name: "2018-08",
value1: 359,
value2: 1220,
value3: 540,
},
{
name: "2018-07",
value1: 229,
value2: 836,
value3: 1234,
},
{
name: "2018-09",
value1: 1176,
value2: 478,
value3: 755,
},
{
name: "2018-11",
value1: 515,
value2: 911,
value3: 806,
},
{
name: "2019-01",
value1: 658,
value2: 979,
value3: 813,
},
{
name: "2019-03",
value1: 364,
value2: 839,
value3: 886,
},
]
}
window.addEventListener("resize", () => {
this.dataTrend()
});
this.dataTrend()
},
methods: {
async dataTrend() {
try {
let { result: res } = await work.dataTrend();
this.cdata.echartData = [];
this.cdata.echartData=res,
this.cdata.echartData.reverse()
} catch (error) {
console.log(error);
}
},
},
}
</script>
......
<template>
<!-- 柱状图 -->
<Echart :options="options" id="bottomLeftChart" height="100%" width="100%"></Echart>
<!--上报统计柱状图 -->
<Echart
:options="options"
id="bottomLeftChart"
height="100%"
width="100%"
></Echart>
</template>
<script>
import Echart from "@/common/echart";
export default {
data () {
data() {
return {
options: {},
};
......@@ -22,16 +27,13 @@ export default {
},
watch: {
cdata: {
handler (newData) {
handler(newData) {
this.options = {
legend: {
data: ["成功", "失败"],
icon: "circle",
textStyle: {
color: "#B4B4B4",
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
top: "10%",
right: "5%",
},
grid: {
left: "5%",
......@@ -72,23 +74,45 @@ export default {
name: "成功",
type: "bar",
stack: "总量",
barWidth: 10,
barWidth: 18,
label: {
show: true,
formatter: function (params) {
if (params.value > 0) {
return params.value;
} else {
return '';
}
}
},
itemStyle: {
normal: {
// 这里设置圆角
color: "#16F4D2",
}
color: "#5fba7d",
},
},
data: newData.barData,
},
{
name: "失败",
type: "bar",
stack: "总量",
label: {
show: true,
formatter: function (params) {
if (params.value > 0) {
return params.value;
} else {
return '';
}
}
},
itemStyle: {
normal: {
// 这里设置圆角
color: "#C99E68"
color: "#c97168",
},
},
data: newData.lineData,
......
<template>
<!-- 柱状图 -->
<!--登记类型总量柱状图 -->
<Echart :options="options" id="bottomLeftChart" height="100%" width="100%" class="" ></Echart>
</template>
......@@ -27,7 +27,7 @@ export default {
grid: {
// 让图表占满容器
top: "20%",
left: "12%",
left: "10%",
right: "5%",
bottom: "16%",
},
......
<template>
<!-- 登记类型总量 -->
<Chart :cdata="cdata" />
</template>
......
......@@ -175,7 +175,7 @@ export default {
clearInterval(this.intervalId);
}
this.intervalId = setInterval(() => {
_self.reSelectMapRandomArea();
this.$refs.centreLeft2ChartRef && _self.reSelectMapRandomArea();
}, time);
},
// 重新随机选中地图区域
......
<template>
<Echart :options="options" id="centreLeft1Chart" :key="key" height="1.0417rem" width="80%"></Echart>
<Echart
:options="options"
id="centreLeft1Chart"
:key="key"
height="1.0417rem"
width="80%"
></Echart>
</template>
<script>
import Echart from '@/common/echart'
import Echart from "@/common/echart";
export default {
components: {
Echart,
},
data() {
data() {
return {
key:0
}
},
key: 0,
};
},
props: {
cdata: {
type: Object,
default: () => ({})
default: () => ({}),
},
},
watch: {
cdata: {
handler (newData) {
console.log("newData",newData);
handler(newData) {
this.options = {
grid: {
right:"1%",
bottom:"4%"
},
color: [
"#37a2da",
"#32c5e9",
"#9fe6b8",
"#ffdb5c",
"#ff9f7f",
"#8378ea",
"#fb7293",
"#e7bcf3",
"#8378ea"
],
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
toolbox: {
show: true
},
calculable: true,
series: [
{
name: "业务量",
name: "Access From",
type: "pie",
radius: [20,100],
roseType: "area",
data: newData.seriesData
radius: ["54%", "70%"],
avoidLabelOverlap: true,
label: {
formatter: (params) => {
// console.log(params)
return `${params.name}(${params.value}`;
},
},
labelLine: {
lineStyle: {
width: 3,
},
},
data: newData.seriesData,
}
],
}
this.key++
};
this.key++;
},
immediate: true,
deep: true
}
}
deep: true,
},
},
};
</script>
<style lang="scss" scoped>
#centreLeft1Chart {
margin-bottom: .0521rem;
margin-left:60px;
margin-bottom: 0.0521rem;
margin-left: .3125rem;
}
</style>
......
......@@ -8,7 +8,7 @@
import Chart from "./Chart";
import work from "@/api/work";
export default {
data () {
data() {
return {
cdata: {
seriesData: [],
......@@ -18,40 +18,44 @@ export default {
components: {
Chart,
},
mounted () {
mounted() {
this.getdjywltotal();
window.addEventListener("resize", () => {
window.addEventListener("resize", () => {
this.cdata.seriesData = [];
this.getdjywltotal();
});
},
methods: {
// 获取登记业务量玫瑰图数据
async getdjywltotal () {
this.cdata.seriesData=[]
async getdjywltotal() {
if (this.cdata.seriesData.length == 0) {
try {
let p = {
DJLX: "",
QLLX: "",
XZQDM: "",
};
this.cdata.seriesData = [];
let res = await work.getdjywltotal(p);
// 遍历修改数组键,作为echars图表的参数
res.result.map((item) => {
return (
this.cdata.seriesData.push({ "name": item.AREACODE, "value": item.ywtotal })
if(this.cdata.seriesData.length == 0){
res.result.map((item) => {
return this.cdata.seriesData.push({
name: item.AREACODE,
value: item.ywtotal,
});
)
});
} catch (error) {
console.log(error);
}
});
}
// 遍历修改数组键,作为echars图表的参数
} catch (error) {
console.log(error);
}
}
},
},
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>
......
......@@ -64,7 +64,6 @@ export default {
this.visible = show
},
handleClick(tab, event) {
console.log(tab, event)
},
changeData(iconName) {
this.visible = false
......
......@@ -18,10 +18,8 @@ export default {
},
methods: {
onJsonChange (value) {
console.log('value:', value);
},
onJsonSave (value) {
console.log('value:', value);
}
}
}
......
......@@ -69,7 +69,6 @@ export default {
},
onJsonSave () {
const value = this.resultInfo
console.log(this.resultInfo, 'resultInfo')
if (this.hasJsonFlag === false) {
this.$message.error({ message: 'json格式验证失败', showClose: true })
// alert("json验证失败")
......@@ -87,7 +86,6 @@ export default {
this.dialogVisible = true
},
cancel () {
console.log(this.tmpResultInfo, 'tmpResultInfo')
this.resultInfo = this.tmpResultInfo
this.dialogVisible = false
},
......
......@@ -129,7 +129,6 @@ export default {
if (!this.heightNumSetting) {
let _this = this
if (this.heightNum) {
console.log("this.heightNum``",this.heightNum);
_this.$nextTick(() => {
window.addEventListener('resize', () => {
......
......@@ -32,8 +32,6 @@ export default {
if (typeof val !== 'string') return
const themeCluster = this.getThemeCluster(val.replace('#', ''))
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))
console.log(themeCluster, originalCluster)
const $message = this.$message({
message: ' Compiling the theme',
customClass: 'theme-message',
......
<template>
<div class="navbar-con">
<div class="navbar">
<div class="title">{{ dicData['sysCode'] && dicData['sysCode'][0].DNAME }}</div>
<div class="user">欢迎进入系统 {{ name }} <svg-icon icon-class='close' class="closeStyle" @click="onCancel" />退出系统</div>
<div class="title">
{{ dicData["sysCode"] && dicData["sysCode"][0].DNAME }}
</div>
<div class="user">
欢迎进入系统 {{ userInfo.name }}
<span @click="onCancel">
<svg-icon icon-class="close" class="closeStyle" />退出系统</span
>
</div>
<div class="sidebarLeft">
<sidebarLeft />
</div>
......@@ -13,22 +20,37 @@
</div>
</template>
<script>
import sidebarLeft from './Sidebar/sidebarLeft'
import sidebarRight from './Sidebar/sidebarRight'
import { mapGetters } from 'vuex'
import sidebarLeft from "./Sidebar/sidebarLeft";
import sidebarRight from "./Sidebar/sidebarRight";
import { logout } from "@/api/login.js";
import { mapGetters } from "vuex";
export default {
components: {
sidebarLeft,
sidebarRight
sidebarRight,
},
computed: {
...mapGetters(['sidebar', 'dicData', 'name'])
...mapGetters(["sidebar", "dicData", "userInfo"]),
},
methods: {
onCancel () {
}
}
}
onCancel() {
logout()
.then((res) => {
sessionStorage.removeItem("token");
this.$store.dispatch("user/resetState");
this.$router.replace({
path: "/login",
query: {
redirect: this.$route.fullPath,
},
});
})
.catch((error) => {
// console.dir(error);
});
},
},
};
</script>
<style lang="scss" scoped>
/deep/.el-menu--horizontal {
......@@ -40,9 +62,9 @@ export default {
height: 34px;
width: 130px;
text-align: center;
color: #FFFFFF;
color: #ffffff;
margin-right: 20px;
background: url('~@/image/navbar.png') no-repeat;
background: url("~@/image/navbar.png") no-repeat;
background-size: 100% 100%;
}
......@@ -56,7 +78,7 @@ export default {
/deep/.el-submenu__title {
height: 34px;
color: #FFFFFF;
color: #ffffff;
}
/deep/.el-submenu__title span {
......@@ -88,9 +110,9 @@ export default {
// 导航选中背景色
.xuanzhong {
background: url('~@/image/selNavbar.png') no-repeat;
background: url("~@/image/selNavbar.png") no-repeat;
background-size: 100% 100%;
color: #FFFFFF !important;
color: #ffffff !important;
font-weight: 700;
}
......@@ -110,7 +132,6 @@ export default {
@extend .xuanzhong;
}
.navbar {
height: $headerHeight;
overflow: hidden;
......@@ -119,12 +140,12 @@ export default {
align-items: center;
padding: 0 20px;
justify-content: space-between;
background: url('~@/image/header.png') no-repeat;
background: url("~@/image/header.png") no-repeat;
background-size: 100% 100%;
.user {
font-size: 12px;
color: #FFFFFF;
color: #ffffff;
position: absolute;
right: 20px;
top: 0;
......@@ -143,10 +164,9 @@ export default {
right: 0;
margin: 0 auto;
font-size: 32px;
color: #FFFFFF;
color: #ffffff;
font-weight: 700;
text-align: center;
}
.right-menu {
......
<template>
<el-menu router :default-active="activeMenu" mode="horizontal">
<!-- 权限菜单 -->
<sidebar-item v-for="route in permission_routes.slice(1, 4)" :key="route.path" :item="route"
<sidebar-item v-for="route in permission_routes.slice(2, 5)" :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" /> -->
......
<template>
<el-menu router :default-active="activeMenu" mode="horizontal">
<!-- 权限菜单 -->
<sidebar-item v-for="route in permission_routes.slice(4, 7)" :key="route.path" :item="route"
<sidebar-item v-for="route in permission_routes.slice(5, 8)" :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" /> -->
......
......@@ -46,7 +46,6 @@ export default {
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
console.log(this.levelList)
},
isDashboard (route) {
const name = route && route.name
......
......@@ -17,7 +17,7 @@ let mixin = {
...mapGetters(['dicData'])
},
created () {
this.featchData()
// this.featchData()
},
methods: {
// 表格索引得问题
......
import router from './router'
import store from './store'
import { getMenuInfo } from '@/api/user'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import getPageTitle from '@/utils/get-page-title'
import Cookies from 'js-cookie'
NProgress.configure({ showSpinner: false }) // NProgress Configuration
import router from "./router";
import store from "./store";
import { getMenuInfo } from "@/api/user";
import NProgress from "nprogress"; // progress bar
import "nprogress/nprogress.css"; // progress bar style
import getPageTitle from "@/utils/get-page-title";
import Cookies from "js-cookie";
NProgress.configure({ showSpinner: false }); // NProgress Configuration
router.beforeEach(async (to, from, next) => {
NProgress.start()
document.title = getPageTitle(to.meta.title)
let hasAddDict = store.state.dict.addDict
let hasAddRoute = store.state.permission.addRoutes
if (!hasAddDict) {
store.dispatch('dict/generateDic')
}
if (hasAddRoute) {
next()
} else {
const { result: getMenuData } = await getMenuInfo()
const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData)
// 获取用户信息
await store.dispatch('user/getUserInfo')
router.addRoutes([...accessRoutes, { path: '*', redirect: '/404', hidden: true }])
const routeTo = Cookies.get('routerTo')
if (routeTo && routeTo !== '/') {
next({ ...to, replace: true })
NProgress.start();
document.title = getPageTitle(to.meta.title);
let hasAddDict = store.state.dict.addDict;
let hasUser = store.state.user.hasUser;
let hasAddRoute = store.state.permission.addRoutes;
if (to.path == "/login") {
sessionStorage.removeItem("token");
next();
} else {
//判断token是否存在
const hasToken = sessionStorage.getItem("token");
if (hasToken) {
//请求用户信息
if (!hasUser) {
store.dispatch("user/getUserInfo");
}
//加载字典
if (!hasAddDict) {
store.dispatch("dict/generateDic");
}
if (hasAddRoute) {
next();
} else {
//请求菜单
const { result: getMenuData } = (await getMenuInfo()) || [];
const accessRoutes = await store.dispatch(
"permission/generateRoutes",
getMenuData
);
router.addRoutes([
...accessRoutes,
{ path: "*", redirect: "/404", hidden: true },
]);
const routeTo = Cookies.get("routerTo");
if (routeTo && routeTo !== "/") {
next({ ...to, replace: true });
} else {
next('/home')
next("/home");
}
}
} else {
next("/login");
}
NProgress.done()
})
router.afterEach(to => {
// 解决刷新页面报404问题
Cookies.set("routerTo", to.fullPath)
NProgress.done()
})
}
NProgress.done();
});
router.afterEach((to) => {
// 解决刷新页面报404问题
Cookies.set("routerTo", to.fullPath);
NProgress.done();
});
......
......@@ -20,6 +20,12 @@ export const constantRoutes = [
}
]
},
//登录
{
path: "/login",
name: "login",
component: () => import("@/views/login/index.vue"),
},
// 监管首页
{
path: '/',
......@@ -240,7 +246,7 @@ export const asyncRoutes = [
meta: { title: '角色管理' }
}
]
}
},
]
const createRouter = () =>
......
......@@ -5,13 +5,13 @@ const getters = {
visitedViews: state => state.tagsView.visitedViews,
cachedViews: state => state.tagsView.cachedViews,
avatar: state => state.user.avatar,
name: state => state.user.name,
userInfo: state => state.user.userInfo,
permission_routes: state => state.permission.routes,
addRoutes: state => state.permission.addRoutes,
// business
rules: state => state.business.rules,
dicData: state => state.dict.dicData,
Edit: state => state.business.Edit,
businessInfo: state => state.dictionaries.businessInfo
businessInfo: state => state.dictionaries.businessInfo,
products: state => state.products.products
}
export default getters
......
const state = {
products: null,
};
const mutations = {
SET_PRODUCTS: (state,data) => {
state.products = data;
},
};
const actions = {
setData({ commit },data) {
commit("SET_PRODUCTS",data);
},
};
export default {
namespaced: true,
state,
mutations,
actions,
};
import { getUserInfo } from '@/api/user'
import { getUserInfo } from "@/api/user";
const state = {
name: '',
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
}
hasUser: false,
userInfo: null,
};
const mutations = {
SET_NAME: (state, data) => {
state.name = data.loginName
}
}
SET_USERINFO: (state, data) => {
state.hasUser = true;
state.userInfo = data;
},
RESET_USER: (state) => {
state.hasUser = false;
state.userInfo = null;
},
};
const actions = {
getUserInfo ({ commit }) {
return new Promise(async (resolve) => {
let { result: res } = await getUserInfo()
commit('SET_NAME', res)
resolve(true)
})
},
}
getUserInfo({ commit }) {
return new Promise(async (resolve) => {
let { result: res } = await getUserInfo();
commit("SET_USERINFO", res);
resolve(true);
});
},
resetState({ commit }) {
commit("RESET_USER");
},
};
export default {
namespaced: true,
state,
mutations,
actions
}
namespaced: true,
state,
mutations,
actions,
};
......
......@@ -50,7 +50,7 @@
&-header {
width: 100%;
padding: 5px 30px 20px 20px;
padding: 5px 30px 20px 24px;
box-sizing: border-box;
background: url("~@/image/formHeader.png") no-repeat;
background-size: 100% 100%;
......
......@@ -25,4 +25,10 @@ export default class filter {
return name
}
}
}
\ No newline at end of file
stateStatus(val) {
let index = val + 1;
// -1 : 不存在 ,0 : 待激活,1:正常,2:暂停,3 : 出错, 4:阻塞
let status = { 0: '不存在', 1: '待激活', 2: '正常', 3: '暂停', 4: '出错', 5: '阻塞' }
return status[index]
}
}
......
import { Message } from "element-ui";
export function removeTreeListItem (treeList, dictId, idName = 'bsmDict') {
if (!treeList || !treeList.length) {
return
}
......@@ -141,4 +141,4 @@ export function getFirstDayOfSeason (d) {
}
date.setDate(1);
return timeFormat(date);
}
\ No newline at end of file
}
......
/**
* 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
*/
import axios from 'axios'
import { Message } from 'element-ui'
import { endLoadingSubCount } from './requestLoading'
import axios from "axios";
import { Message } from "element-ui";
import { endLoadingSubCount } from "./requestLoading";
import router from "../router";
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API,
withCredentials: true, //是否允许跨域
headers: {
'Content-Type': 'application/json; charset=utf-8',
'Authorization': 'bearer AT-6-KSOqiWx3hbGL2fsRjyQQUDzPXR8rat-U'
},
timeout: 15000
})
baseURL: process.env.VUE_APP_BASE_API,
withCredentials: true, //是否允许跨域
headers: {
"Content-Type": "application/json; charset=utf-8",
},
timeout: 15000,
});
// request interceptor
service.interceptors.request.use(
config => {
config.headers.Authorization =
'bearer AT-6-KSOqiWx3hbGL2fsRjyQQUDzPXR8rat-U'
config.headers.Accept = 'application/json'
return config
},
error => {
Message.error('请求超时!');
return Promise.reject(error)
}
)
(config) => {
//调用登录接口时无token,也不需要传token,其他接口都传入token
config.headers.Authorization = sessionStorage.getItem("token") || "";
config.headers.Accept = "application/json";
return config;
},
(error) => {
Message.error("请求超时!");
return Promise.reject(error);
}
);
// response interceptor
service.interceptors.response.use(
response => {
/**
* 对响应数据判断:
* 如果成功返回数据,就通过return把数据返出去
* 如果请求不成功,就在拦截器这里统一处理(组件的代码就不用关注错误的情况了)
*/
if (response.status == 200) {
// if (response.data.code == 500) {
// Message({
// message: response.data.message,
// type: 'error',
// duration: 5 * 1000
// })
// }
return response.data;
} else {
handleErrorData(response.data);
}
return response;
},
error => {
endLoadingSubCount()
// 对响应错误做点什么
Message({
message: '服务器异常,请联系管理员',
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error);
}
)
//对错误信息的处理函数
function handleErrorData (errMes) {
if (errMes.message) {
Message.error(errMes.message);
(response) => {
/**
* 对响应数据判断:
* 如果成功返回数据,就通过return把数据返出去
* 如果请求不成功,就在拦截器这里统一处理(组件的代码就不用关注错误的情况了)
*/
if (response.status == 200) {
return response.data;
} else {
switch (errMes.code) {
case 401:
Message.error("未授权,请重新登录!");
break;
case 403:
Message.error("拒绝访问");
break;
case 404:
Message.error("很抱歉,资源未找到!");
break;
case 500:
Message.error("服务器错误!");
break;
default:
Message.error("服务正在联调中,请稍后!");
break;
}
// 对响应错误做点什么
Message({
message: "请求失败",
type: "error",
duration: 5 * 1000,
});
}
return response;
},
(error) => {
handleErrorData(error.response.status);
endLoadingSubCount();
return Promise.reject(error);
}
);
//对错误信息的处理函数
function handleErrorData(status) {
switch (status) {
case 401:
Message.error("由于长时间未操作,请重新登录!");
router.replace({
path: "/login",
query: {
redirect: router.history.current.fullPath,
},
});
break;
case 403:
Message.error("拒绝访问");
break;
case 404:
Message.error("很抱歉,资源未找到!");
break;
case 500:
Message.error("服务器错误!");
break;
default:
Message.error("服务正在联调中,请稍后!");
break;
}
}
export default service
export default service;
......
......@@ -32,7 +32,6 @@ export default {
const { width, height } = this;
const wh = window.innerHeight / height;
const ww = window.innerWidth / width;
console.log(ww < wh ? ww : wh);
return ww < wh ? ww : wh;
},
setScale() {
......
......@@ -9,7 +9,7 @@
<div class="d-flex">
<dv-decoration-8 class="dv-dec-8" :color="decorationColor" />
<div class="title">
<span class="title-text">汉中市不动产监管大屏</span>
<span class="title-text">{{ products.name }}}</span>
<dv-decoration-5
:dur="1"
class="dv-dec-5"
......@@ -60,6 +60,9 @@ export default {
}, 500);
},
},
computed: {
...mapGetters(["products"]),
},
};
</script>
......
......@@ -119,7 +119,7 @@ export default {
<style lang="scss" scoped>
.leftcard {
width: 32%;
height: calc(100% -110px);
height: calc(100vh -114px);
display: flex;
flex-direction: column;
......@@ -129,7 +129,7 @@ export default {
position: relative;
text-align: center;
width: 100%;
height: 25%;
height: 22%;
}
.carda {
background: url("~@/image/sthj.png") no-repeat;
......@@ -137,7 +137,7 @@ export default {
position: relative;
text-align: center;
width: 100%;
height: 25%;
height: 22%;
}
// .card1 {
......@@ -192,8 +192,8 @@ export default {
font-weight: 700;
width: .195rem;
height: .2475rem;
font-size: .1863rem;
font-size: .1867rem;
font-size: .2863rem;
font-size: .2867rem;
}
}
......
......@@ -45,12 +45,9 @@ export default {
try {
let { result: res } = await work.addhousetotal();
res.map((item, index) => {
console.log("item", item);
console.log("index", index);
return (
this.config.data.push([index, item.fwyt, item.fwxz, item.mj])
)
});
} catch (error) {
console.log("error", error);
......@@ -114,6 +111,15 @@ export default {
margin: 0 auto;
height: 1.1031rem;
margin-top: .0521rem;
/deep/.header{
font-size: .0738rem;
}
/deep/.rows{
.ceil{
font-size: .0738rem;
color: #6BC1FC
}
}
}
}
......
......@@ -7,7 +7,6 @@
</template>
<script>
import "@/utils/flexible.js";
import ScaleBox from "./box.vue";
import drawMixin from "@/utils/drawMixin";
import leftcard from "./leftcard";
import centercard from "./centercard";
......@@ -22,8 +21,7 @@ export default {
components: {
leftcard,
centercard,
rightcard,
ScaleBox,
rightcard
},
mounted () {
// this.timeFn();
......
<template>
<div class="bg">
<div class="login-inner-bg login">
<div class="user_style">
<h3>欢迎登录</h3>
<el-form
:model="user"
:rules="rules"
ref="user"
id="loginform"
class="demo-ruleForm"
>
<el-form-item prop="account">
<el-input v-model="user.account" placeholder="用户名"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
type="password"
v-model="user.password"
placeholder="登录密码"
></el-input>
</el-form-item>
<el-form-item>
<el-checkbox
label="记住用户名"
@change="checkUserName"
></el-checkbox>
</el-form-item>
<el-form-item id="login">
<el-button type="primary" style="width: 100%" @click="login('user')"
>登录</el-button
>
</el-form-item>
</el-form>
</div>
</div>
</div>
</template>
<script>
import { loginIn } from "@/api/login.js";
import { api, getAction } from "@/api/manageApi";
export default {
name: "Login",
data() {
return {
user: {
account: "",
password: "",
checkStatus: false,
},
rules: {
account: [{ required: true, message: "请填写帐号", trigger: "blur" }],
password: [{ required: true, message: "请填写密码", trigger: "blur" }],
},
};
},
created() {
const params = {};
const queryOptions = {
conditionGroup: {
conditions: [
{
property: "code",
value: "BDCJGPT",
operator: "EQ",
},
],
queryRelation: "AND",
},
};
params.queryOptions = JSON.stringify(queryOptions);
//根据子系统code获取子系统详细信息
getAction(api.subsystem, params).then((res) => {
if (res.status === 1) {
this.$store.dispatch("products/setData", res.content[0]);
} else {
this.$message.error({ message: res.message, showClose: true });
}
});
},
mounted() {
// this.checkUserName();
},
methods: {
//记住用户名
checkUserName: function (flag) {
this.user.checkStatus = flag;
if (this.user.checkStatus) {
localStorage.setItem("accountId", this.user.account);
let name = localStorage.getItem("accountId");
if (name === "") {
return;
} else {
this.user.account = name;
}
} else {
this.user.account = localStorage.getItem("accountId");
}
},
login(user) {
var self = this;
this.$refs[user].validate((valid) => {
if (valid) {
loginIn(self.user.account, self.user.password)
.then((res) => {
if (res.status === 1) {
//存储token
sessionStorage.setItem("token", `Bearer ${res.content}`);
//登录成功后需判断有无重定向,没有重定向则跳转首页
this.$router.replace(this.$route.query.redirect || "/");
} else {
//错误处理
}
})
.catch((error) => {
// console.dir(error);
});
}
});
},
},
computed: {
productName() {
return this.$store.state.products.products.name;
},
},
components: {},
};
</script>
<style scoped lang="scss">
.bg {
width: 100%;
height: 100%;
background: url(../../image/loginBg.jpg) no-repeat;
background-size: 100% 100%;
overflow: hidden;
}
.login-inner-bg {
background: url(../../image/loginBoxBg.png) no-repeat;
width: 400px;
height: 350px;
margin: 35vh auto;
overflow: hidden;
background-size: 100% 100%;
box-sizing: border-box;
padding: 20px;
}
.login .user_style {
margin: 40px 20px 0;
h3 {
color: #fff;
font-weight: normal;
text-align: center;
margin-bottom: 20px;
}
}
.login .btn {
width: 100%;
height: 6vh;
background-color: #00c2de;
border-radius: 5px;
font-size: 1.4vw;
color: #ffffff;
}
.login .btn:hover {
cursor: pointer;
background-color: #2d8cf0;
}
#loginform .el-button {
background: #409eff !important;
color: #ffffff !important;
}
#loginform .el-button:hover {
cursor: pointer !important;
background-color: #2d8cf0 !important;
}
.inputUser .ivu-input {
padding: 6px 24px !important;
border: 1px solid #9f9f9f !important;
}
#loginform .el-input__inner {
width: 100% !important;
caret-color: #000 !important;
color: #606266 !important;
border-radius: 4px !important;
border: 1px solid #67c23a !important;
background: #fff !important;
opacity: 1 !important;
}
#loginform .el-input__inner::-webkit-input-placeholder {
/* WebKit browsers */
color: #80807f !important;
}
.el-checkbox__label {
color: #fff;
}
</style>
<style></style>
......@@ -6,11 +6,30 @@ class data {
columns () {
return [
{
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>
)
}
},
{
prop: "UPLOADTIME",
label: "汇交日期",
width: '150',
},
{
prop: "AREANAME",
label: "区域名称",
},
{
prop: "UPLOADTIME",
prop: "ACCESSDATE",
label: "日期",
width: '150',
},
......@@ -42,9 +61,9 @@ class data {
width: '120',
render: (h, scope) => {
return (
<div class={'difference'}>
<p>{scope.row.BUSINESSTYPECOUNT}</p>
<p>{''}</p>
<div >
<p>{scope.row.registerBusinesstypecount}</p>
<p>{scope.row.accessBusinesstypecount}</p>
</div>
)
},
......
......@@ -120,8 +120,8 @@ export default {
endTimeChange (val) {
this.form.endTime = timeFormat(new Date(val), true)
},
queryClick () {
getRecordLogPage({ ...this.form, ...this.pageData }).then(res => {
featchData () {
getRecordLogPage({ ...this.form }).then(res => {
if (res.code === 200) {
let { records, total, current } = res.result
this.tableData.data = records ? records : []
......@@ -134,11 +134,8 @@ export default {
resetForm () {
this.$refs.ruleForm.resetFields();
this.form.currentPage = 1
this.queryClick();
},
featchData () {
this.queryClick();
},
this.featchData();
}
}
}
</script>
......
......@@ -185,8 +185,8 @@ export default {
this.form.exchangeEndTime = timeFormat(new Date(val), true)
},
// 初始化数据
queryClick () {
getDataReportPage({ ...this.form, ...this.pageData }).then((res) => {
featchData () {
getDataReportPage({ ...this.form }).then((res) => {
if (res.code === 200) {
let { total, records, current } = res.result;
this.tableData.total = total;
......@@ -195,11 +195,6 @@ export default {
}
});
},
featchData () {
this.queryClick();
},
// 多选
handleSelectionChange (val) { },
// 上报
handleEscalation () { },
// 详情
......@@ -212,7 +207,7 @@ export default {
this.$refs.ruleForm.resetFields();
this.form.exchangeEndTime = ""
this.form.currentPage = 1
this.queryClick();
this.featchData();
},
},
};
......
<template>
<!-- 编辑 -->
<dialogBox ref="addTask" width="60%" @submitForm="handleSubmit" :closed="true" @closeDialog="handleClose"
customClass="editValidRule" multiple title="新增定时任务">
<dialogBox ref="addTask" width="60%" @submitForm="handleSubmit" @closeDialog="handleClose" v-model="myValue"
customClass="editValidRule" title="新增定时任务">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="任务名" prop="job_name">
<el-input v-model="ruleForm.job_name" placeholder="任务名"></el-input>
<el-form-item label="任务名" prop="jobName">
<el-input v-model="ruleForm.jobName" placeholder="任务名"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务分组" prop="job_group">
<el-input v-model="ruleForm.job_group" placeholder="任务分组"></el-input>
<el-form-item label="类名" prop="beanName">
<el-input v-model="ruleForm.beanName" placeholder="类名"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="cron表达式" prop="cron_expression">
<el-input v-model="ruleForm.cron_expression" placeholder="cron表达式"></el-input>
<el-form-item label="cron表达式" prop="cronExpression">
<el-input v-model="ruleForm.cronExpression" placeholder="cron表达式"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务类名" prop="bean_class">
<el-input v-model="ruleForm.bean_class" placeholder="任务执行时调用哪个类的方法 包名+类名"></el-input>
<el-form-item label="方法名" prop="methodName">
<el-input v-model="ruleForm.methodName" placeholder="方法名"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="任务描述" prop="description">
<el-input v-model="ruleForm.description" placeholder="任务描述"></el-input>
<el-form-item label="任务描述" prop="remark">
<el-input v-model="ruleForm.remark" placeholder="任务描述"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -43,6 +43,7 @@
import sjsbTask from '@/api/sjsbTask.js'
export default {
props: {
value: { type: Boolean, default: false },
taskData: {
type: Object,
default: null
......@@ -50,42 +51,33 @@ export default {
},
data () {
return {
myValue: this.value,
ruleForm: {
job_name: '',
job_group: '',
cron_expression: '',
bean_class: '',
description: ''
jobName: '',
cronExpression: '',
beanName: '',
methodName: '',
methodParams: '',
remark: ''
},
rules: {
job_name: [
jobName: [
{ required: true, message: '任务名', trigger: 'blur' }
],
job_group: [
{ required: true, message: '分组', trigger: 'blur' }
],
cron_expression: [
cronExpression: [
{ required: true, message: 'cron表达式', trigger: 'blur' }
],
bean_class: [
beanName: [
{ required: true, message: '任务类名', trigger: 'blur' }
],
description: [
{ required: true, message: '任务描述', trigger: 'blur' }
],
methodName: [
{ required: true, message: '任务方法名', trigger: 'blur' }
]
},
message: ''
}
},
methods: {
isShow () {
this.$refs.addTask.isShow()
setTimeout(() => {
if (this.taskData) {
this.ruleForm = _.cloneDeep(this.taskData)
}
}, 0)
},
handleSubmit () {
let _this = this
this.$refs['ruleForm'].validate(async (valid) => {
......@@ -129,13 +121,49 @@ export default {
})
},
handleClose () {
this.$refs.addTask.isHide()
this.$refs['ruleForm'].resetFields()
this.$emit("input", false);
}
},
watch: {
value(val) {
this.myValue = val
},
taskData(val) {
if (val != null) {
this.ruleForm = val
} else {
this.ruleForm = {
jobName: '',
cronExpression: '',
beanName: '',
methodName: '',
methodParams: '',
remark: ''
}
}
}
}
}
</script>
<style rel="stylesheet/less" lang="less" scoped>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "~@/styles/public.scss";
.editDialogBox-box {
margin: 14px 18px 30px 18px !important
}
/deep/.el-form-item__label {
color: #fff;
}
/deep/.el-form-item {
color: #fff;
margin-bottom: 10px;
}
/deep/ .el-input__inner {
background-color: transparent;
border: 1px solid #458ACF;
}
</style>
......
......@@ -286,6 +286,7 @@ export default {
handleMinus (index, row) {
removeTreeListItem(this.tableData, row.dictid, 'dictid');
this.tableData = judgeSort(this.tableData)
this.key++;
},
handleSubmit () {
editDictNode({
......@@ -343,15 +344,12 @@ export default {
},
// 上移下移
moveUpward (index, row) {
console.log("row上移", row);
realMove(row.dictid, "UP", this.tableData);
let id = findParents(this.tableData, row.dictid);
this.keyList = id;
this.key++;
},
moveDown (index, row) {
console.log("row下移", row);
realMove(row.dictid, "DOWN", this.tableData);
let id = findParents(this.tableData, row.dictid);
this.keyList = id;
......
......@@ -20,16 +20,17 @@
v-for="(item, index) in sexList"
:key="index"
:label="item.value"
>{{ item.name }}</el-radio>
>{{ item.name }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="身份证号:" prop="idCard">
<el-input v-model="form.idCard" clearable />
</el-form-item>
<el-form-item label="手机号码:" prop="mobilePhone">
<el-input v-model="form.mobilePhone" clearable type="number" />
<el-input v-model="form.mobilePhone" clearable />
</el-form-item>
<el-form-item label="办公电话:">
<el-form-item label="办公电话:" prop="telephone">
<el-input v-model="form.telephone" clearable />
</el-form-item>
<el-form-item label="办公地址:">
......@@ -55,46 +56,53 @@ export default {
data() {
return {
form: {
"id": "3127e455-43ba-45ff-9326-0e02ef89485e",
"name": "超级管理员",
"sort": 1,
"loginName": "admin",
"email": null,
"lastLoginTime": null,
"mobilePhone": "18291003568",
"isLocked": false,
"status": "ACTIVE",
"passwordChangeTime": "2021-12-10T08:01:01.569+0000",
"idCard": "612725202111021521",
"departmentId": "2eae5304-544f-4f5b-b354-8f5d47433c9b",
"departmentName": null,
"organizationId": "0bca67ae-1d9e-4b41-b057-f165586d24aa",
"sex": "0",
"isDuty": true,
"code": "123324",
"jobLevel": null,
"telephone": "028-87720898",
"address": "办公地点修改测试"
},
id: "3127e455-43ba-45ff-9326-0e02ef89485e",
name: "超级管理员",
sort: 1,
loginName: "admin",
email: null,
lastLoginTime: null,
mobilePhone: "18291003568",
isLocked: false,
status: "ACTIVE",
passwordChangeTime: "2021-12-10T08:01:01.569+0000",
idCard: "612725202111021521",
departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
departmentName: null,
organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
sex: "0",
isDuty: true,
code: "123324",
jobLevel: null,
telephone: "028-87720898",
address: "办公地点修改测试",
},
sexList: [],
rules: {
mobilePhone: [
{
pattern:
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
message: '手机号码格式有误',
trigger: 'blur'
}
message: "手机号码格式有误",
trigger: "blur",
},
],
idCard: [
{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: '身份证号格式有误',
trigger: 'blur'
}
]
}
}
message: "身份证号格式有误",
trigger: "blur",
},
],
telephone: [
{
pattern: /\d{3}-\d{8}|\d{4}-\d{7}/,
message: "办公电话格式有误",
trigger: "blur",
},
],
},
};
},
watch: {
// userInfo: {
......@@ -108,71 +116,71 @@ export default {
mounted() {
// getDictItems('XB').then((res) => {
// if (res.status === 1) {
this.sexList = [
{
"id": "079c72b2-f3de-4a4f-b2a1-e5c8f085cc5f",
"createdAt": "2021-06-11T02:42:02.000+0000",
"updatedAt": "2021-09-03T09:21:46.000+0000",
"createdBy": "3127e455-43ba-45ff-9326-0e02ef89485e",
"updatedBy": "3127e455-43ba-45ff-9326-0e02ef89485e",
"sort": 2,
"name": "男",
"description": "",
"code": "N362",
"value": "0",
"parentId": null,
"baseDataCategoryId": "11441374-5e2a-4635-bfa5-d1a430222019",
"version": 1,
"valid": true,
"standard": false,
"standardName": null,
"standardValue": null,
"children": [],
"commonName": "男(N362)"
},
{
"id": "4d6f845d-6f6a-4848-8fc2-a3760764c196",
"createdAt": "2021-06-11T02:42:12.000+0000",
"updatedAt": "2021-09-03T09:21:46.000+0000",
"createdBy": "3127e455-43ba-45ff-9326-0e02ef89485e",
"updatedBy": "3127e455-43ba-45ff-9326-0e02ef89485e",
"sort": 1,
"name": "女",
"description": "",
"code": "N922",
"value": "1",
"parentId": null,
"baseDataCategoryId": "11441374-5e2a-4635-bfa5-d1a430222019",
"version": 1,
"valid": true,
"standard": false,
"standardName": null,
"standardValue": null,
"children": [],
"commonName": "女(N922)"
},
{
"id": "637c360b-d4e2-4afb-aa18-33624cf3abcb",
"createdAt": "2021-06-11T02:42:29.000+0000",
"updatedAt": "2021-09-03T09:21:43.000+0000",
"createdBy": "3127e455-43ba-45ff-9326-0e02ef89485e",
"updatedBy": "3127e455-43ba-45ff-9326-0e02ef89485e",
"sort": 0,
"name": "保密",
"description": "",
"code": "BM816",
"value": "2",
"parentId": null,
"baseDataCategoryId": "11441374-5e2a-4635-bfa5-d1a430222019",
"version": 1,
"valid": true,
"standard": false,
"standardName": null,
"standardValue": null,
"children": [],
"commonName": "保密(BM816)"
}
]
this.sexList = [
{
id: "079c72b2-f3de-4a4f-b2a1-e5c8f085cc5f",
createdAt: "2021-06-11T02:42:02.000+0000",
updatedAt: "2021-09-03T09:21:46.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 2,
name: "男",
description: "",
code: "N362",
value: "0",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "男(N362)",
},
{
id: "4d6f845d-6f6a-4848-8fc2-a3760764c196",
createdAt: "2021-06-11T02:42:12.000+0000",
updatedAt: "2021-09-03T09:21:46.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 1,
name: "女",
description: "",
code: "N922",
value: "1",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "女(N922)",
},
{
id: "637c360b-d4e2-4afb-aa18-33624cf3abcb",
createdAt: "2021-06-11T02:42:29.000+0000",
updatedAt: "2021-09-03T09:21:43.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 0,
name: "保密",
description: "",
code: "BM816",
value: "2",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "保密(BM816)",
},
];
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
......@@ -188,27 +196,28 @@ export default {
// }
// })
// },
// updateInfo() {
// this.$refs.form.validate((valid) => {
// if (valid) {
// putAction(`${api.users}/${this.form.id}`, this.form).then((res) => {
// if (res.status === 1) {
// this.$message.success({ message: res.message, showClose: true })
// this.getUserInfo(this.form.id)
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// }
// })
// }
}
}
// 更新信息
updateInfo() {
// this.$refs.form.validate((valid) => {
// if (valid) {
// putAction(`${api.users}/${this.form.id}`, this.form).then((res) => {
// if (res.status === 1) {
// this.$message.success({ message: res.message, showClose: true })
// this.getUserInfo(this.form.id)
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// }
// })
},
},
};
</script>
<style scoped lang="scss">
.user-info {
margin: 36px 200px;
margin: 0.1875rem 1.0417rem;
background: #ffffff;
max-height: 90%;
overflow-y: auto;
......@@ -223,7 +232,7 @@ export default {
padding: 0 8px;
height: 40px;
line-height: 40px;
border: 1px solid #dfe7f3;
border: 1px solid #6BC1FC;
}
}
}
......
<template>
<div class="information from-clues">
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<el-form ref="ruleForm" label-width="100px">
<el-form-item>
<Breadcrumb />
</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" @click="password">修改密码</btn>
</el-col>
</el-row>
</el-form>
</div>
<div class="from-clues-content">
<div class="contentbox">
<base-set :user-info="userData" v-show="isshow" />
<password-edit :user-info="userData" v-show="!isshow" />
<base-set v-show="isshow" />
<password-edit v-show="!isshow" />
</div>
</div>
<edit-dialog ref="dialogForm" />
<authorizationdiglog ref="rolesForm" />
</div>
</template>
<script>
import "@/utils/flexible.js";
import BaseSet from "./base-set.vue";
import PasswordEdit from "./password-edit.vue";
export default {
......@@ -53,6 +52,7 @@ export default {
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
.information{
.btnColRight{
......@@ -76,7 +76,7 @@ export default {
}
}
.contentbox{
height: 650px;
height: 3.0854rem;
}
}
......
......@@ -79,30 +79,31 @@ export default {
// }
},
mounted() {},
// methods: {
// validatorConfirmPassword(rule, value, callback) {
// const { newPassword } = this.form
// if (value !== newPassword) {
// callback('两次输入密码不一致')
// } else {
// callback()
// }
// },
// updatePassword() {
// this.$refs.form.validate((valid) => {
// if (valid) {
// 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 })
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// }
// })
// }
// }
methods: {
validatorConfirmPassword(rule, value, callback) {
const { newPassword } = this.form
if (value !== newPassword) {
callback('两次输入密码不一致')
} else {
callback()
}
},
// 确认修改
updatePassword() {
// this.$refs.form.validate((valid) => {
// if (valid) {
// 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 })
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// }
// })
}
}
}
</script>
......@@ -123,7 +124,7 @@ export default {
padding: 0 8px;
height: 40px;
line-height: 40px;
border: 1px solid #dfe7f3;
border: 1px solid #6BC1FC;
}
}
}
......
......@@ -119,7 +119,6 @@ export default {
// })
},
handleSelectionChange (val) {
console.log("vadddl",val);
this.multipleSelection = val
}
}
......
......@@ -19,10 +19,6 @@ class data extends filter {
width: 260,
label: "链接路径"
},
{
prop: "icon",
label: "图标"
}
]
}
}
......
......@@ -232,13 +232,6 @@ export default {
tableData: {
columns: [].concat(data.columns()).concat([
{
label: "排序",
width: 380,
render: (h, scope) => {
return <div></div>;
},
},
{
label: "操作",
width: 380,
render: (h, scope) => {
......
......@@ -20,14 +20,6 @@
</el-col>
<el-col :span="12">
<el-form-item label="角色类型:" prop="roleType">
<!-- <el-select v-model="dialogForm.roleType.value" placeholder="角色类型">
<el-option
v-for="item in roleTypeOptions"
:key="item.value"
:label="item.name"
:value="item.value">
</el-option>
</el-select> -->
<el-input
v-model="dialogForm.roleType"
clearable
......@@ -66,7 +58,7 @@
<script>
import Dialog from "@/components/Dialog/";
import { api, httpAction } from '@/api/manageApi'
export default {
components: {
Dialog
......@@ -104,55 +96,57 @@ export default {
if (valid) {
try {
const params = {
category: this.menuType,
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
// 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
// })
// }
// }
// )
params.id = this.roleId
console.log("修改",params.id,params);
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: '新增成功',
// showClose: true
// })
// this.dialogForm = {
// roleName: '',
// roleType: ''
// }
// this.showAddEditDialog = val
// this.$emit('ok', this.menuType)
// } else {
// this.$message.error({
// message: res.message,
// showClose: true
// })
// }
// })
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)
......@@ -162,6 +156,7 @@ export default {
},
// 取消事件
handleCloseDialog() {
this.$refs.form.resetFields()
this.dialogForm = {
roleName: '',
roleType: ''
......
......@@ -7,15 +7,23 @@
</el-form-item>
<el-row class="mb-5">
<el-col :span="2" class="btnColRight">
<btn nativeType="cx" @click="handleAdd">增加角色</btn>
<btn nativeType="cx" @click="handleAddEdit">增加角色</btn>
</el-col>
</el-row>
</el-form>
</div>
<div class="from-clues-content">
<lb-table :page-size="pageData.size" :current-page.sync="pageData.current" :total="pageData.total"
@size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
:data="tableData.data">
<lb-table
:page-size="pageData.size"
:current-page.sync="pageData.current"
:total="pageData.total"
@size-change="handleSizeChange"
@p-current-change="handleCurrentChange"
:column="tableData.columns"
:data="listdata"
:expand-row-keys="keyList"
row-key="id"
>
</lb-table>
</div>
<EditDialog ref="addEditDialog" />
......@@ -23,9 +31,17 @@
</div>
</template>
<script>
// 定时任务
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
import { getRolesById, getUserRoles } from "@/api/Rolemanagement";
import data from "./data";
import sjsbTask from "@/api/sjsbTask.js";
import { api, getAction,deleteAction } from "@/api/manageApi";
import tableMixin from "@/mixins/tableMixin.js";
import EditDialog from "./edit-dialog.vue";
import Roleslistdiglog from "./roleslistdiglog.vue";
......@@ -36,9 +52,13 @@ export default {
EditDialog,
Roleslistdiglog,
},
data () {
data() {
return {
taskData: null,
personlist: null,
waitMemberList: [],
keyList: [],
listdata: [],
tableUrl: api.roles,
form: {
job_name: "",
currentPage: 1,
......@@ -53,7 +73,6 @@ export default {
departmentId: "", // 部门ID
departmentList: [], // 部门列表
levelList: [], // 职务级别
tableData: [],
sexList: [],
typeOptions: [
{
......@@ -94,23 +113,21 @@ export default {
<div>
<el-button
type="text"
size="mini"
icon="el-icon-video-pause"
disabled={scope.row.isTop}
onClick={() => {
this.personnel(scope.row);
this.moveUpward(scope.$index, scope.row);
}}
>
人员
上移
</el-button>
<el-button
type="text"
size="mini"
icon="el-icon-edit"
disabled={scope.row.isBottom}
onClick={() => {
this.handleEdit(scope.row);
this.moveDown(scope.$index, scope.row);
}}
>
修改
下移
</el-button>
</div>
);
......@@ -124,37 +141,52 @@ export default {
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"
icon="el-icon-video-pause"
onClick={() => {
this.personnel(scope.row);
this.getUserList(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"
icon="el-icon-edit"
onClick={() => {
this.handleEdit(scope.row);
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"
icon="el-icon-delete"
style="color:#F56C6C"
// style="color:#F56C6C"
onClick={() => {
this.handleDel(scope.row);
this.handleDelete(scope.row.id, scope.row.name);
}}
>
删除
</el-button>
</span>
</el-tooltip>
</div>
);
},
......@@ -169,83 +201,148 @@ export default {
},
};
},
created () {
this.featchData();
created() {
this.getTableData();
},
mounted() {},
methods: {
// 新增角色
handleAdd () {
// this.$refs.addEditDialog.roleId = value.id
// this.roleSort = value.sort ? value.sort : 0
// 获取角色列表
getTableData() {
let Builtinrole=[]
let Publicrole=[]
this.$refs.addEditDialog.showAddEditDialog = true;
this.$refs.addEditDialog.dialogTitle = "新增";
getRolesById(1)
.then((res) => {
console.log("res.content", res.content);
Builtinrole = res.content;
getRolesById(2)
.then((res) => {
console.log("res.content", res.content);
Publicrole = res.content;
this.listdata = Builtinrole.concat(Publicrole);
this.listdata = judgeSort(this.listdata);
})
.catch((e) => console.error(e));
})
.catch((e) => console.error(e));
},
// 人员配置
getUserList(row) {
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.adds(this.waitMemberList, row.id);
} else {
this.$message.error({ message: res.message, showClose: true });
}
});
this.$refs.rolesForm.title = "人员配置";
} else this.$message.error({ message: res.message, showClose: true });
});
},
// 修改角色
handleEdit (row) {
this.$refs.addEditDialog.roleId = row.id;
this.roleSort = row.sort ? row.sort : 0;
if (row.id) {
this.$refs.addEditDialog.dialogForm.roleName = row.name;
this.$refs.addEditDialog.dialogForm.roleType = row.type;
this.$refs.addEditDialog.dialogForm.roleTextArea = row.description;
// 新增、修改角色
handleAddEdit(value) {
this.$refs.addEditDialog.menuType = this.menuType;
this.$refs.addEditDialog.roleId = value.id;
this.roleSort = value.sort ? value.sort : 0;
if (value.id) {
this.$refs.addEditDialog.dialogForm.roleName = value.name;
this.$refs.addEditDialog.dialogForm.roleType = value.type;
this.$refs.addEditDialog.dialogForm.roleTextArea = value.description;
}
this.$refs.addEditDialog.showAddEditDialog = true;
this.$refs.addEditDialog.dialogTitle = "修改";
this.$refs.addEditDialog.dialogTitle = value.id ? "修改" : "新增";
},
featchData () {
this.tableData.data = [
{
id: "2176e915-fdb4-414a-b8d6-6cf63171cffc",
createdAt: "2022-10-31T07:08:29.293+0000",
updatedAt: "2022-10-31T07:08:29.293+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 29,
name: "人事部材料管理员",
type: "材料管理员",
category: 2,
description: "管理内部材料",
_X_ROW_KEY: "row_365",
},
];
// 上移下移
moveUpward(index, row) {
realMove(row.id, "UP", this.listdata);
this.key++;
let id = findParents(this.listdata, row.id);
this.keyList = id;
},
personnel () {
this.$refs.rolesForm.adds();
this.$refs.rolesForm.title = "人员配置";
moveDown(index, row) {
realMove(row.id, "DOWN", this.listdata);
this.key++;
let id = findParents(this.listdata, row.id);
this.keyList = id;
},
handleDel (row) {
this.$confirm("此操将进行删除操作, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
// 删除
handleDelete: function(id, content = '') {
this.$confirm(
`<div class="customer-message-wrapper">
<h5 class="title">您确认要执行该操作用于以下信息:</h5>
<p class="content" aria-controls="${content}">${content}
</p>
<p class="result">执行后,数据将
<span >无法恢复</span>
</p>
</div>`,
'执行确认',
{
dangerouslyUseHTMLString: true,
customClass: 'customer-delete',
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
.then(() => {
sjsbTask
.sjsbTaskRemove(row.id)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: "success",
message: res.message,
});
this.featchData();
}
if (!this.tableUrl) {
this.$message.error({
message: '请设置tableUrl属性为接口地址!',
showClose: true
})
.catch((error) => {
this.$alert(error, "提示", {
confirmButtonText: "确定",
type: "error",
});
});
return
}
const url = this.tableUrl + '/' + id
deleteAction(url).then(res => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.loadDataS(this.subcode)
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
.catch(() => {})
},
},
};
......@@ -253,8 +350,8 @@ export default {
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
.btnColRight{
.btnColRight {
margin-left: -30px;
margin-top: 20px;
}
}
</style>
......
......@@ -27,28 +27,27 @@
<script>
import Dialog from "@/components/Dialog/";
import { updateUser } from "@/api/Rolemanagement";
export default {
name: "",
components: { Dialog },
props: {},
data() {
return {
title: "人员配置",
visible: false,
hasSelectList: [
{
name: "管理员",
loginName: "admin1",
departmentName: "研发部",
jobLevel: null,
},
{
name: "测试账号",
loginName: "admin2",
departmentName: "研发部",
jobLevel: null,
},
// {
// name: "管理员",
// loginName: "admin1",
// departmentName: "研发部",
// jobLevel: null,
// },
// {
// name: "测试账号",
// loginName: "admin2",
// departmentName: "研发部",
// jobLevel: null,
// },
], //已经选择的id组成的数组
tableData: {
column: [
......@@ -72,62 +71,24 @@ export default {
label: "职务",
},
],
data: [
{
id: "3127e455-43ba-45ff-9326-0e02ef89485e",
createdAt: null,
updatedAt: "2022-08-04T03:38:27.626+0000",
createdBy: null,
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 1,
name: "超级管理员",
loginName: "admin",
password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59",
passwordSalt: "5178114777136485",
email: null,
lastLoginTime: null,
mobilePhone: "18291003568",
status: "ACTIVE",
passwordChangeTime: "2021-12-10T08:01:01.569+0000",
idCard: "612725202111021521",
departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
sex: "0",
isDuty: true,
code: "123324",
jobLevel: null,
telephone: "028-87720898",
address: "办公地点修改测试",
isLocked: false,
departmentName: "研发部",
_X_ROW_KEY: "row_276",
},
{
name: "管理员",
loginName: "admin1",
departmentName: "研发部",
jobLevel: null,
selectStatus: 0,
},
{
name: "测试账号",
loginName: "admin2",
departmentName: "研发部",
jobLevel: null,
selectStatus: 0,
},
],
data: [],
// 角色id
roleId: "",
},
multipleSelection: [],
};
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
adds() {
// 人员配置根据selectStatus字段确定已选人员
adds(a, rid) {
this.roleId = rid;
this.visible = true;
console.log("a", a);
this.tableData.data = a;
this.tableData.data.forEach((item, index) => {
if (item.selectStatus === 0) {
this.$nextTick(() => {
......@@ -142,35 +103,35 @@ export default {
close() {
this.visible = false;
},
// 保存事件
// 保存
handleSaveMember() {
// if (this.memberList.length === 0) {
// this.$message.warning("请添加待选人员");
// return false;
// }
// const idList = this.memberList.map(item => item.id)
// updateUser(this.roleId, idList).then(res => {
// if (res.status === 1) {
// this.$message.success({ message: '保存成功', showClose: true })
// this.showMemberConfigDialog = false
// this.$emit('setUsers', this.roleId)
// this.resetMemberConfig()
// } else this.$message.error({ message: res.message, showClose: true })
// })
const idList = this.multipleSelection.map((item) => {
return item.id;
});
console.log("this.roleId",this.roleId,idList);
updateUser(this.roleId, idList).then((res) => {
console.log("res",res);
if (res.status === 1) {
this.$message.success({ message: "保存成功", showClose: true });
this.visible = false;
// this.$emit("setUsers", this.roleId);
// this.resetMemberConfig();
} else this.$message.error({ message: res.message, showClose: true });
});
},
handleSelectionChange(val) {
console.log("val", val);
this.multipleSelection = val;
},
},
};
</script>
<style scoped lang="scss">
/deep/.el-dialog__header{
text-align: center;
margin-bottom: 10px;
.el-dialog__title{
color: white;
}
/deep/.el-dialog__header {
text-align: center;
margin-bottom: 10px;
.el-dialog__title {
color: white;
}
}
</style>
......
......@@ -6,34 +6,35 @@ class data extends filter {
columns () {
return [
{
prop: "job_name",
prop: "jobName",
label: "任务名称",
width: 130
},
{
prop: "description",
prop: "remark",
label: "任务描述",
width: 300
},
{
prop: "cron_expression",
prop: "cronExpression",
label: "cron表达式"
},
{
prop: "bean_class",
prop: "beanName",
width: 260,
label: "任务类"
},
{
prop: "job_group",
label: "任务分组"
prop: "methodName",
label: "方法名称"
},
{
label: "状态",
prop: "jobStatus",
render: (h, scope) => {
return (
<div>
{ this.stateStatus(scope.row.job_status) }
{ this.stateStatus(scope.row.jobStatus) }
</div>
)
},
......
......@@ -8,11 +8,12 @@
<el-row>
<el-col :span="6">
<el-form-item label="搜索标题">
<el-input v-model="form.job_name" placeholder="标题"></el-input>
<el-input v-model="form.jobName" placeholder="标题"></el-input>
</el-form-item>
</el-col>
<el-col :span="18" class="btnColRight">
<btn nativeType="cx" @click="handleSearch">查询</btn>
<btn nativeType="cx" @click="handleSubmit">搜索</btn>
<btn nativeType="cx" @click="resetSe">重置</btn>
<btn nativeType="cx" @click="handleAdd">新增</btn>
</el-col>
</el-row>
......@@ -23,7 +24,7 @@
@size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
:data="tableData.data">
</lb-table>
<add-task ref="task" :taskData="taskData" />
<add-task ref="task" :taskData="taskData" v-model="isDialog"/>
</div>
</div>
</template>
......@@ -42,8 +43,9 @@ export default {
data () {
return {
taskData: null,
isDialog: false,
form: {
job_name: '',
jobName: '',
currentPage: 1
},
selectionList: [],
......@@ -60,37 +62,23 @@ export default {
render: (h, scope) => {
return (
<div>
<el-button type="text" size="mini" style="color: #67C23A"
v-show={scope.row.job_status !== '1' && scope.row.job_status !== '2'}
icon="el-icon-magic-stick"
onClick={() => { this.handleRecovery(scope.row) }}>激活
</el-button>
<el-button type="text" size="mini"
style="color: #67C23A;margin-left:0"
icon="el-icon-refresh-right"
v-show={scope.row.job_status === '2'}
onClick={() => { this.handleActivation(scope.row) }}>恢复
v-show={scope.row.jobStatus === 0}
icon="el-icon-video-pause"
onClick={() => { this.handleActive(scope.row) }}>激活
</el-button>
<el-button type="text" size="mini"
v-show={scope.row.job_status !== '1'}
icon="el-icon-stopwatch"
onClick={() => { this.handletest(scope.row) }}>手动测试
</el-button>
<el-button type="text" size="mini"
v-show={scope.row.job_status === '1'}
icon="el-icon-video-pause"
onClick={() => { this.handleSuspend(scope.row) }}>暂停
v-show={scope.row.jobStatus === -1}
icon="el-icon-video-pause"
onClick={() => { this.recover(scope.row) }}>恢复
</el-button>
<el-button type="text" size="mini"
icon="el-icon-edit"
v-show={scope.row.job_status === '2' || scope.row.job_status === '-1' || scope.row.job_status === '0'}
onClick={() => { this.handleEdit(scope.row) }}>编辑
</el-button>
<el-button type="text" size="mini"
icon="el-icon-delete" style="color:#F56C6C"
v-show={scope.row.job_status !== '1'}
v-show={scope.row.jobStatus !== -1}
onClick={() => { this.handleDel(scope.row) }}>删除
</el-button>
</div>
......@@ -110,37 +98,30 @@ export default {
methods: {
handleAdd () {
this.taskData = null
this.$refs.task.isShow()
this.isDialog = true
},
handleSearch () {
this.form.currentPage = 1
this.tableData.data = []
this.queryClick()
resetSe() {
this.form.jobName = ''
this.featchData()
},
async featchData () {
try {
this.form = Object.assign(this.form, this.formData)
let { result: { list, total, pages: pageSize, pageNum: current }
} = await sjsbTask.getTaskListByName(this.form)
this.tableData.data = list
this.pageData = {
pageSize,
current,
total
}
let { result } = await sjsbTask.getTaskListByName(this.form)
this.tableData.data = result.list
console.log(this.tableData.data, 'fffffffffffffffffff')
} catch (error) {
this.message = error
}
},
// 暂停
handleSuspend (row) {
this.$confirm('此操将进行暂停操作, 是否继续?', '提示', {
recover(row) {
this.$confirm('此操将进行恢复操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.pauseJob(row.id)
sjsbTask.recover(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
......@@ -164,15 +145,15 @@ export default {
})
})
},
// 激活
handleRecovery (row) {
handleActive(row) {
this.$confirm('此操将进行激活操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.activateJob(row.id)
sjsbTask.active(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
......@@ -196,15 +177,15 @@ export default {
})
})
},
// 恢复
handleActivation (row) {
this.$confirm('此操将进行恢复操作, 是否继续?', '提示', {
// 暂停
handleSuspend (row) {
this.$confirm('此操将进行暂停操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.resumeJob(row.id)
sjsbTask.pauseJob(row.id)
.then((res) => {
if ((res.code = 200)) {
this.$message({
......@@ -228,41 +209,9 @@ export default {
})
})
},
// 手动测试
handletest (row) {
this.$confirm('此操将进行手动测试, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.sjsbTaskRun(row.id)
.then((res) => {
if ((res.code = 200)) {
this.$alert(res.message, '提示', {
confirmButtonText: '确定',
type: 'success'
});
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
})
},
handleEdit (row) {
this.taskData = row
this.$refs.task.isShow()
this.isDialog = true
},
handleDel (row) {
this.$confirm('此操将进行删除操作, 是否继续?', '提示', {
......@@ -271,7 +220,7 @@ export default {
type: 'warning',
})
.then(() => {
sjsbTask.sjsbTaskRemove(row.id)
sjsbTask.sjsbTaskRemove(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
......
......@@ -24,8 +24,8 @@
@p-current-change="handleCurrentChange"
:column="tableData.columns"
:data="tableData.data"
:key="key"
:expand-row-keys="keyList" row-key="dictid"
:expand-row-keys="keyList"
row-key="dictid"
>
</lb-table>
</div>
......@@ -33,7 +33,6 @@
</div>
</template>
<script>
// 定时任务
import {
getUuid,
judgeSort,
......@@ -187,35 +186,18 @@ export default {
},
};
},
created() {
this.featchData();
},
methods: {
// 添加索引
// addIndexes (data = this.tableData.data, isAdd = true) {
// data.forEach((item, index) => {
// if (index == 0) {
// item.codeShow = true;
// item.nameShow = false;
// item.normcodeShow = false;
// item.normnameShow = false;
// } else {
// item.codeShow = false;
// item.nameShow = false;
// item.normcodeShow = false;
// item.normnameShow = false;
// }
// if (isAdd) {
// item.index = index + 1;
// }
// if (item.children) {
// this.addIndexes(item.children, false);
// }
// });
// },
handleAdd() {
this.taskData = null;
this.$refs.dialogForm.add();
this.$refs.dialogForm.title = "添加";
},
featchData() {
this.tableData.data = [
{
"dictid": "51b9f487861671f77782c5a23b5fe52e",
......@@ -226,8 +208,6 @@ export default {
"DNAME": "小红",
"SORT": null,
"index": 1,
"isTop": true,
"isBottom": false
},
{
"dictid": "2291d9e298274c1ea1f40df63fbcff47",
......@@ -238,8 +218,6 @@ export default {
"DNAME": "小李",
"SORT": null,
"index": 2,
"isTop": false,
"isBottom": false
},
{
"dictid": "e6a5aeb8957b8029fa31586fb30dd5b8",
......@@ -250,11 +228,10 @@ export default {
"DNAME": "小田",
"SORT": null,
"index": 13,
"isTop": false,
"isBottom": true
}
];
},
]
this.tableData.data=judgeSort(this.tableData.data)
},
// 更新用户解锁状态
updateLock(id, name) {
......