9ec6679c by renchao@pashanhoo.com

feat:配置修改

1 parent c5bdda73
...@@ -4,6 +4,5 @@ ...@@ -4,6 +4,5 @@
4 "AREARMAP": "610702", 4 "AREARMAP": "610702",
5 "XZQ": "汉中市", 5 "XZQ": "汉中市",
6 "SERVERAPI": "/bdcsjsb", 6 "SERVERAPI": "/bdcsjsb",
7 "MANAGEMENTAPI": "http://192.168.2.38:8090/management",
8 "ip": "http://192.168.2.38" 7 "ip": "http://192.168.2.38"
9 } 8 }
...\ No newline at end of file ...\ No newline at end of file
......
1 /*
2 * @Author: yangwei
3 * @Date: 2023-02-24 15:12:45
4 * @LastEditors: yangwei
5 * @LastEditTime: 2023-03-14 10:45:11
6 * @FilePath: \bdcjg-web\src\api\authorityManage.js
7 * @Description:
8 *
9 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
10 */
11
12 import { getParams } from './util'
13 import {
14 api,
15 getAction,
16 deleteAction,
17 putAction
18 } from './manageApi'
19 /** 角色管理开始 */
20 // 获取角色列表 by categoryId
21 export const getRolesById = categoryIdList => {
22 const conditionGroup = {
23 conditions: [
24 {
25 property: 'category',
26 value: categoryIdList,
27 operator: 'IN'
28 }
29 ],
30 queryRelation: 'AND',
31 }
32 const params = getParams(conditionGroup)
33 return getAction(api.roles, params)
34 }
35 /** 角色管理结束 */
36 /** 授权管理开始 */
37 // 获取权限列表
38 export const getAuthorityListAction = (productId, subsystemCode) => {
39 const conditionGroup = {
40 conditions: [
41 {
42 property: 'productId',
43 value: productId,
44 operator: 'EQ'
45 },
46 {
47 property: 'code',
48 value: subsystemCode + '_MENU',
49 operator: 'EQ'
50 }
51 ],
52 queryRelation: 'AND'
53 }
54 const params = getParams(conditionGroup)
55 return getAction(api.resourceCategory, params)
56 }
57
58 /**
59 * 获取角色的权限 id operationCodes resourceCategoryCode
60 * id 授权id
61 * operationCodes 操作符集合
62 * resourceCategoryCode 菜单默认MENU
63 */
64 export const getRoleAuthorityList = (
65 id,
66 operationCodes,
67 resourceCategoryCode
68 ) => {
69 return getAction(`${api.rolePermissions}/${id}`, {
70 operationCodes: operationCodes,
71 resourceCategoryCode: resourceCategoryCode
72 })
73 }
74 // 角色授权
75 export const roleAuthority = (id, permissionDtos) => {
76 return putAction(`${api.rolePermissions}/${id}`, permissionDtos)
77 }
78
79
80
81 // 获取父级菜单
82 // id是系统id
83 export const getParentMenuListAction = (id) => {
84 let conditionGroup = {}
85 if (id && id !== '') {
86 conditionGroup = {
87 conditions: [
88 {
89 property: 'productId',
90 value: id,
91 operator: 'EQ'
92 }
93 ],
94 queryRelation: 'AND'
95 }
96 }
97 const params = getParams(conditionGroup)
98 return getAction(api.menus, params)
99 }
100
1 /*
2 * @Description :公共方法api文件
3 * @Autor : miaofang
4 * @LastEditTime : 2023-05-17 10:41:47
5 */
6 import request from '@/utils/request'
7 // let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
8 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
9 const workflow = '/workflow'
10 const log = '/log'
11 const crud = '/crud'
12 export const api = {
13 userInfo: SERVER.MANAGEMENTAPI + '/rest/user-info', // 登录用户信息
14 permissionsUser: SERVER.MANAGEMENTAPI + '/rest/user-permissions', // 用户权限
15 baseDataCategory: SERVER.MANAGEMENTAPI + '/rest/base-data-category', // 数据字典类别
16 baseData: SERVER.MANAGEMENTAPI + '/rest/base-data', // 数据字典
17 districts: SERVER.MANAGEMENTAPI + '/rest/districts', // 行政区划
18 districtsAll: SERVER.MANAGEMENTAPI + '/rest/districts/parent-tree', // 条件查询所有行政区划
19 organizations: SERVER.MANAGEMENTAPI + '/rest/organizations', // 组织机构
20 departments: SERVER.MANAGEMENTAPI + '/rest/departments', // 部门
21 users: SERVER.MANAGEMENTAPI + '/rest/users', // 人员用户
22 roles: SERVER.MANAGEMENTAPI + '/rest/roles', // 角色
23 userRoles: SERVER.MANAGEMENTAPI + '/rest/user-roles', // 角色对应人员关系
24 productCategory: SERVER.MANAGEMENTAPI + '/rest/product-category', // 业务分类
25 resourceCategory: SERVER.MANAGEMENTAPI + '/rest/resource-category', // 资源分类
26 resources: SERVER.MANAGEMENTAPI + '/rest/resources', // 资源详情列表
27 subsystem: SERVER.MANAGEMENTAPI + '/rest/products', // 子系统管理
28 operations: SERVER.MANAGEMENTAPI + '/rest/operations', // 操作
29 menus: SERVER.MANAGEMENTAPI + '/rest/menus', // 菜单
30 organizationPermissions: SERVER.MANAGEMENTAPI + '/rest/organization-permissions', // 机构授权
31 departmentPermissions: SERVER.MANAGEMENTAPI + '/rest/department-permissions', // 部门授权
32 rolePermissions: SERVER.MANAGEMENTAPI + '/rest/role-permissions', // 角色授权
33 peoPermissions: SERVER.MANAGEMENTAPI + '/rest/user-permissions', // 用户授权
34 resourcePermissions: SERVER.MANAGEMENTAPI + '/rest/resource-permissions', // 资源授权查询
35 menuPermissions: SERVER.MANAGEMENTAPI + '/rest/menu-permissions', // 菜单授权查询
36 serviceCategory: SERVER.MANAGEMENTAPI + '/rest/service-category', // 服务分类
37 service: SERVER.MANAGEMENTAPI + '/rest/service', // 服务详情列表
38 databaseServer: workflow + '/rest/database-server', // 数据库服务器
39 materialCategory: workflow + '/rest/material-category', // 材料分类
40 material: workflow + '/rest/material', // 材料
41 function: workflow + '/rest/function', // 功能属性
42 eventCategory: workflow + '/rest/event-category', // 服务事件分类
43 event: workflow + '/rest/event', // 服务事件
44 formCategorys: workflow + '/rest/forms-category', // 表单分类
45 forms: workflow + '/rest/forms', // 表单
46 metadata: workflow + '/rest/metadata', // 元数据
47 dataObjectCategory: workflow + '/rest/data-object-category', // 对象管理类别
48 dataObject: workflow + '/rest/data-object', // 对象管理
49 workflowBusiness: workflow + '/rest/businesses', // 业务流程
50 // workflowModel: workflow+'/rest/workflow/model',//流程模型
51 modelcategorys: workflow + '/rest/model-categories', // 模型分类
52 models: workflow + '/rest/models', // 工作流模型表
53 businessesModels: workflow + '/rest/businesses-models', // 业务流程关系
54 pluginCategory: workflow + '/rest/plugin-category', // 流程插件分类管理
55 plugin: workflow + '/rest/plugins', // 流程插件分类管理
56 groups: workflow + '/rest/groups', // 用户组分类
57 groupUsers: workflow + '/rest/group-users', // 用户组人员
58 saveWorkflowGroupUser: workflow + '/rest/groups/sug', // 工作流设计器增加用户组
59 validate: workflow + '/rest/models/validate', // 流程验证
60 tokens: SERVER.MANAGEMENTAPI + '/rest/tokens', // token
61 session: '/rest/session', // session
62 pwdSetting: SERVER.MANAGEMENTAPI + '/rest/password-setting', //
63 singleSign: '/cas/rest/services', // 单点登录管理
64 attachments: SERVER.MANAGEMENTAPI + '/rest/attachments', // 文件上传服务
65 instances: workflow + '/rest/workflow/instances', // 实例
66 workflowTask: workflow + '/rest/workflow-task', // 任务
67 definitions: workflow + '/rest/workflow/definitions', // 流程实例
68 systemAccessLogs: log + '/rest/system-access-logs', // 系统访问日志
69 errorLogs: log + '/rest/common-log-statistics', // 错误日志
70 appAccess: log + '/rest/system-access-logs/count-app-access', // 系统访问数
71 userAccess: log + '/rest/system-access-logs/count-user-access', // 用户访问数
72 statisticMenus: log + '/rest/system-access-logs/statistic-menus', // 统计菜单访问数
73 statisticUsers: log + '/rest/system-access-logs/statistic-users', // 统计用户访问数
74 abnormal: log + '/rest/abnormal', // 统计平台报警
75 monitorConfig: log + '/rest/monitor-alert-config', // 监控预警配置
76 statisticTimes: log + '/rest/system-access-logs/statistic-times', // 监控预警配置
77 server: log + '/rest/server', // 服务器监控
78 serverStatistics: log + '/rest/server-statistics', // 服务器监控信息统计
79 avgTimes: log + '/rest/services-statistics/avg-times', // 根据时间查响应时间和访问次数
80 statisticDepts: log + '/rest/system-access-logs/statistic-depts', // 访问部门统计
81 crudHead: crud + '/rest/head', // crudhead
82 crudGet: crud + '/rest/get', // crudget
83 crudPost: crud + '/rest/post', // crudPost
84 crudPut: crud + '/rest/put', // crudPut
85 crudDel: crud + '/rest/delete', // crudDel
86 crudMetadata: crud + '/rest/metadata', //crudMetadata
87 crudBusiness: crud + '/rest/business', // crudBusiness
88 crudDatasources: crud + '/rest/datasources', // crudDatasources
89 }
90
91 // 根据code获取字典 params={isTree:true})
92 export function getDictItems (code, params = {}) {
93 return request({
94 url: `${api.baseDataCategory}/${code}/base-datas`,
95 method: 'get',
96 params
97 })
98 }
99 // 获取一级字典值下级接口
100 export function getDictItemsChild (id) {
101 return request({
102 url: `${api.baseData}/dict/${id}`,
103 method: 'get'
104 })
105 }
106 // 获取传入字段的所有级别字典值
107 export function getAllDictItems (name) {
108 return request({
109 url: `${api.baseDataCategory}/${name}/base-datas`,
110 method: 'get'
111 })
112 }
113 // get
114 export function getAction (url, params = {}) {
115 return request({
116 url,
117 method: 'get',
118 params
119 })
120 }
121 // post公共方法
122 export function postAction (url, data = null) {
123 return request({
124 url,
125 method: 'post',
126 data
127 })
128 }
129 // method= {post | put}
130 export function httpAction (url, data, method) {
131 return request({
132 url,
133 method,
134 data
135 })
136 }
137 // put公共方法
138 export function putAction (url, data = null) {
139 return request({
140 url,
141 method: 'put',
142 data
143 })
144 }
145 // delete
146 export function deleteAction (url, data = null) {
147 return request({
148 url,
149 method: 'delete',
150 data
151 })
152 }
153
154 // 批量删除
155 export function deleteBranch (url, data) {
156 return request({
157 url,
158 method: 'delete',
159 data
160 })
161 }
162
163
164
165
166
167
168
169
1 /*
2 * @Author: xiaomiao 1158771342@qq.com
3 * @Date: 2023-03-09 15:24:53
4 * @LastEditors: xiaomiao 1158771342@qq.com
5 * @LastEditTime: 2023-04-19 13:49:03
6 * @FilePath: \上报\bdcjg-web\src\api\personnelManage.js
7 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8 */
9
10 import {
11 api,
12 getAction,
13 deleteAction,
14 putAction
15 } from './manageApi'
16 import { getParams } from './util'
17
18 export const updateUserPassword = (data) => {
19 return putAction(`${api.users}/update-password`, data)
20 }
21
22 // 根据条件获取用户
23 export const getUserList = (params) => {
24 return getAction(api.users, params)
25 }
26 export const getUserLists = (queryParam) => {
27 const conditionGroup = {
28 conditions: [],
29 queryRelation: 'AND',
30 }
31 for (let key in queryParam) {
32 if (queryParam[key]) {
33 conditionGroup.conditions.push({
34 property: key,
35 value: queryParam[key],
36 operator: 'LIKE'
37 })
38 }
39
40 }
41 const params = getParams(conditionGroup)
42 return getAction(api.users, params)
43 }
44 // 重置用户密码
45 // export const resetPassword = id => {
46 // return putAction(`${api.users}/${id}/reset-password`)
47 // }
48
49 // 重置用户密码
50 export const resetPassword = (ids) => {
51 return putAction(`${api.users}/reset-passwords?ids=${ids}`)
52 }
53
54 // 人员列表
55 export const getUserRoles = (id) => {
56 return getAction(`${api.userRoles}/${id}/users`)
57 }
58 // 更新人员
59 export const updateUser = (id, data) => {
60 return putAction(`${api.userRoles}/${id}/users`, data)
61 }
62
1 /**
2 * 新增修改完成调用 dialogFormOk方法重置表单,修改新增弹框组件ref定义为dialogForm
3 * 弹框组件中新增方法add 编辑方法 edit
4 * 表格页面的data中tableUrl定义为接口地址
5 * 弹窗页面定义初始this.init()方法,获取弹窗需要的数据
6 * 表格ref=xTree
7 */
8 import { deleteAction, getAction } from '@/api/manageApi'
9
10 export const TableListMixin = {
11 data() {
12 return {
13 // 查询拼接json字符串
14 queryOptions: '',
15 queryParam: {}, // 查询条件
16 /* 数据源 */
17 tableData: [],
18 /* 分页参数*/
19 ipagination: {
20 pageNumber: 0,
21 pageSize: 10
22 },
23 /* table选中行*/
24 selectionRows: [],
25 loading: false // 表格加载状态
26 }
27 },
28 created() {
29 // console.log(' -- mixin created -- ')
30 // 初始化字典配置 在需要页面调用字典值获取方法
31 this.initDictConfig()
32 },
33 methods: {
34 // 加载表格数据
35 loadData(arg) {
36 if (!this.tableUrl) {
37 console.log('请设置tableUrl属性为接口地址!')
38 return
39 }
40 // 加载数据 若传入参数1则加载第一页的内容
41 // if (arg === 1) {
42 // }
43 const params = this.getQueryParams() // 查询条件
44 this.loading = true
45 getAction(this.tableUrl, params)
46 .then(res => {
47 if (res.status === 1) {
48 this.loading = false
49 this.tableData = res.content
50 this.$nextTick(() => {
51 if (this.tableData.length !== 0) {
52 this.$refs.xTree && this.$refs.xTree.setAllTreeExpand(true)
53 }
54 })
55 } else {
56 this.$message.error({ message: res.message, showClose: true })
57 this.loading = false
58 }
59 })
60 .catch(error => {
61 console.log('error', error)
62 this.loading = false
63 })
64 },
65 // 字典值配置
66 initDictConfig() {
67 // console.log('假初始化字典值方法!')
68 },
69 // 选择所有和取消所有
70 selectAllEvent({ checked, records }) {
71 this.selectionRows = records
72 },
73 // 选中节点
74 selectChangeEvent({ records }) {
75 this.selectionRows = records
76 },
77 // 使用查询条件查询
78 searchQuery() {
79 this.loadData()
80 },
81 // 获取查询条件
82 getQueryParams() {
83 if (this.queryOptions !== '') {
84 this.queryParam.queryOptions = JSON.stringify(this.queryOptions)
85 }
86 return this.$filterNullObj(this.queryParam)
87 },
88 // 新增
89 handleAdd: function() {
90 this.$refs.dialogForm.add()
91 this.$refs.dialogForm.title = '新增'
92 },
93 // 修改
94 handleEdit: function(record) {
95 localStorage.setItem('record', JSON.stringify(record))
96 this.$refs.dialogForm.edit(record)
97 this.$refs.dialogForm.title = '修改'
98 },
99 // 删除
100 handleDelete: function(id, content = '') {
101 this.$confirm(
102 `<div class="customer-message-wrapper">
103 <h5 class="title">您确认要执行该操作用于以下信息:</h5>
104 <p class="content" aria-controls="${content}">${content}
105 </p>
106 <p class="result">执行后,数据将
107 <span >无法恢复</span>
108 </p>
109 </div>`,
110 '执行确认',
111 {
112 dangerouslyUseHTMLString: true,
113 customClass: 'customer-delete',
114 confirmButtonText: '确定',
115 cancelButtonText: '取消',
116 type: 'warning'
117 }
118 )
119 .then(() => {
120 if (!this.tableUrl) {
121 this.$message.error({
122 message: '请设置tableUrl属性为接口地址!',
123 showClose: true
124 })
125 return
126 }
127 const url = this.tableUrl + '/' + id
128 deleteAction(url).then(res => {
129 if (res.status === 1) {
130 this.$message.success({ message: res.message, showClose: true })
131 this.loadDataS(this.subcode)
132 } else {
133 this.$message.error({ message: res.message, showClose: true })
134 }
135 })
136 })
137 .catch(() => {})
138 },
139 // 批量删除
140 batchDel: function() {
141 if (!this.tableUrl) {
142 this.$message.error({
143 message: '请设置tableUrl属性为接口地址!',
144 showClose: true
145 })
146 return
147 }
148 if (this.selectionRows.length === 0) {
149 this.$message.error({
150 message: '请选择删除项!',
151 showClose: true
152 })
153 return
154 }
155 this.$confirm('确定要删除吗?', '提示', {
156 confirmButtonText: '确定',
157 cancelButtonText: '取消',
158 type: 'warning'
159 })
160 .then(() => {
161 const ids = []
162 this.selectionRows.forEach(element => {
163 ids.push(element.id)
164 })
165 deleteAction(this.tableUrl, ids).then(res => {
166 if (res.status === 1) {
167 this.$message.success({ message: res.message, showClose: true })
168 this.loadData()
169 } else {
170 this.$message.error({ message: res.message, showClose: true })
171 }
172 })
173 })
174 .catch(() => {})
175 },
176 // 新增或修改成功时,重载列表
177 dialogFormOk() {
178 this.loadData()
179 },
180 // 导出
181 handleExportXls(data, name) {
182 if (name === '菜单' || name === '部门' || name === '机构' ||
183 name === '资源' || name === '资源分类' || name === '数据字典' || name === '行政区划') {
184 const params = this.getQueryParams() // 查询条件
185 getAction(this.tableUrl + '/export', params)
186 .then(res => {
187 if (res.status === 1) {
188 data = res.content
189 this.$downloadJson(data, name)
190 } else {
191 this.$message.error({ message: '导出失败', showClose: true })
192 }
193 })
194 } else if (name === '人员') {
195 exportUserList(this.queryParam).then((res) => {
196 if (res.status === 1) {
197 data = res.content
198 this.$downloadJson(data, name)
199 } else {
200 this.$message.error({ message: '导出失败', showClose: true })
201 }
202 })
203 } else {
204 this.$downloadJson(data, name)
205 }
206 },
207 /* 导入 */
208 handleImportExcel(info) {}
209 }
210 }
1 import filter from '@/utils/filter.js'
2 class data extends filter {
3 constructor() {
4 super()
5 }
6 columns () {
7 return [
8 {
9 prop: "name",
10 label: "区县代码",
11 width: 130
12 },
13 {
14 prop: "description",
15 label: "业务号"
16 },
17 {
18 prop: "description",
19 label: "受理业务名称"
20 },
21 {
22 prop: "description",
23 label: "受理业务编码"
24 },
25 {
26 prop: "description",
27 label: "受理时间"
28 },
29 {
30 prop: "description",
31 label: "登记时间"
32 },
33 {
34 prop: "description",
35 label: "接收时间"
36 },
37 {
38 prop: "description",
39 label: "读取时间"
40 }
41 ]
42 }
43 }
44 export default new data()
1 <!-- 新增 & 修改角色 -->
2 <template>
3 <dialogBox
4 class="PersonnelDialog"
5 :title="title"
6 :width="'567px'"
7 :isMain="true"
8 @closeDialog="close"
9 @submitForm="submitForm"
10 v-model="myValue">
11 <div class="dialogCon">
12 <el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px">
13 <el-row :gutter="24">
14 <el-col :span="23">
15 <el-form-item label="角色名称:" prop="roleName">
16 <el-input
17 v-model="dialogForm.roleName"
18 clearable
19 placeholder="角色名称" />
20 </el-form-item>
21 </el-col>
22 </el-row>
23 <el-row>
24 <el-col :span="23">
25 <el-form-item label="备注:" class="form-item-mb0">
26 <el-input
27 v-model="dialogForm.roleTextArea"
28 clearable
29 :rows="10"
30 type="textarea"
31 placeholder="备注" />
32 </el-form-item>
33 </el-col>
34 </el-row>
35 </el-form>
36 </div>
37 <!-- <template slot="footer">
38 <el-button
39 class="cancel-button"
40 @click="handleCloseDialog">取消</el-button>
41
42 <el-button
43 type="primary"
44 @click="handleSaveRole()">保存</el-button>
45 </template> -->
46 </dialogBox>
47 </template>
48
49 <script>
50 import Dialog from "@/components/Dialog/";
51 import { api, httpAction } from '@/api/manageApi'
52 export default {
53 components: {
54 Dialog
55 },
56 props: {
57 value: { type: Boolean, default: false },
58 },
59 data () {
60 return {
61 myValue: this.value,
62 title: '',
63 showAddEditDialog: false,
64 menuType: '',
65 roleId: '',
66 sort: 0,
67 dialogForm: {
68 roleName: '',
69 roleType: '',
70 roleTextArea: ''
71 },
72 rules: {
73 roleName: [
74 { required: true, message: '请输入角色名称', trigger: 'blur' }
75 ],
76 },
77 roleTypeOptions: [
78 { name: '定制', value: '定制' },
79 { name: '其他', value: '其他' }
80 ]
81 }
82 },
83 watch: {
84 value (val) {
85 this.myValue = val
86 }
87 },
88 methods: {
89 // 保存新增或关闭事件
90 submitForm () {
91 this.$refs.form.validate((valid) => {
92 if (valid) {
93 try {
94 const params = {
95 category: 2,
96 description: this.dialogForm.roleTextArea,
97 name: this.dialogForm.roleName,
98 sort: this.sort,
99 type: this.dialogForm.roleType
100 }
101 if (this.roleId) {
102 params.id = this.roleId
103 httpAction(`${api.roles}/${params.id}`, params, 'post').then(
104 (res) => {
105 if (res.status === 1) {
106 this.$message.success({
107 message: '修改成功',
108 showClose: true
109 })
110 this.dialogForm = {
111 roleName: '',
112 }
113 // this.showAddEditDialog = val
114 this.$emit('ok')
115 } else {
116 this.$message.error({
117 message: res.message,
118 showClose: true
119 })
120 }
121 }
122 )
123 } else {
124 httpAction(api.roles, params, 'post').then((res) => {
125 if (res.status === 1) {
126 this.$message.success({
127 message: '新增成功',
128 showClose: true
129 })
130 this.close()
131
132 this.$emit('ok')
133 // this.showAddEditDialog = val
134 this.$emit('ok', this.menuType)
135 } else {
136 this.$message.error({
137 message: res.message,
138 showClose: true
139 })
140 }
141 })
142 }
143 } catch (e) {
144 console.error(e)
145 }
146 }
147 })
148 },
149 // 重置
150 resetForm () {
151 this.dialogForm = {
152 roleName: '',
153 }
154 this.$refs.form.resetFields()
155 },
156 // 关闭
157 close () {
158 this.resetForm()
159 this.$emit('input', false)
160 }
161 }
162 }
163 </script>
164 <style scoped lang="scss">
165 </style>
1 <template>
2 <div class="from-clues">
3 <div class="from-clues-header">
4 <el-form ref="ruleForm" :model="form" label-width="100px">
5 <!-- 判断进入监管还是上报系统 -->
6 <el-form-item v-if="BASE_API.THEME=='jg'">
7 <Breadcrumb />
8 </el-form-item>
9 <el-row class="mb-5">
10 <el-col :span="4">
11 <el-form-item label="业务号:" prop="ywh">
12 <el-input v-model="form.ywh" class="width100" clearable placeholder="业务号"></el-input>
13 </el-form-item>
14 </el-col>
15 <el-col :span="4">
16 <el-form-item label="业务名称" prop="ywmc">
17 <el-input v-model.trim="form.rolesName" class="width100" clearable placeholder="业务名称"></el-input>
18 </el-form-item>
19 </el-col>
20 <el-col :span="6">
21 <el-form-item label="开始日期" prop="startTime">
22 <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
23 clearable v-model="form.startTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
24 </el-form-item>
25 </el-col>
26 <el-col :span="6">
27 <el-form-item label="结束日期" prop="endTime">
28 <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd" clearable
29 v-model="form.endTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
30 </el-form-item>
31 </el-col>
32 <!-- 操作按钮 -->
33 <el-col :span="4" class="btnColRight">
34 <btn nativeType="cz" @click="resetForm">重置</btn>
35 <btn nativeType="cx" @click="handleSearch">查询</btn>
36 </el-col>
37 </el-row>
38 </el-form>
39 </div>
40 <div class="from-clues-content">
41 <lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="160"
42 @p-current-change="handleCurrentChange" :column="tableData.columns" :data="listdata"
43 row-key="dictid">
44 </lb-table>
45 </div>
46 </div>
47 </template>
48 <script>
49 import {
50 getUuid,
51 judgeSort,
52 realMove,
53 findParents,
54 removeTreeListItem,
55 } from "@/utils/operation";
56 import { getRolesById, getAuthorityListAction } from "@/api/authorityManage";
57 import { getUserRoles } from "@/api/personnelManage";
58 import data from "./data";
59 import { api, getAction, deleteAction } from "@/api/manageApi";
60 import tableMixin from "@/mixins/tableMixin.js";
61 import EditDialog from "./edit-dialog.vue";
62 import Roleslistdiglog from "./roleslistdiglog.vue";
63 export default {
64 name: "menus",
65 mixins: [tableMixin],
66 components: {
67 EditDialog,
68 Roleslistdiglog,
69 },
70 data () {
71 return {
72 // 开始结束日期限制
73 pickerOptionsStart: {
74 disabledDate: (time) => {
75 if (this.form.endTime) {
76 return time.getTime() >= new Date(this.form.endTime).getTime()
77 }
78 }
79 },
80 // 结束日期限制
81 pickerOptionsEnd: {
82 disabledDate: (time) => {
83 if (this.form.startTime) {
84 return time.getTime() < new Date(this.form.startTime).getTime()
85 }
86 }
87 },
88 listdata: [],
89 setlistdata: [],
90 // 表单
91 form: {
92 ywh: '',
93 ywmc: '',
94 startTime: '',
95 endTime: '',
96 currentPage: 1
97 },
98 // 表格数据
99 tableData: {
100 columns: [
101 {
102 label: "序号",
103 type: "index",
104 width: "50",
105 index: this.indexMethod,
106 },
107 ]
108 .concat(data.columns())
109 .concat({
110 prop: "state",
111 label: "状态",
112 width: '120',
113 render: (h, scope) => {
114 return (
115 <div>
116 <span class='adopt' v-show={scope.row.state == 3}>上报失败</span>
117 <span class='adopt' v-show={scope.row.state == 2}>上报成功</span>
118 <span class='warehousing' v-show={scope.row.state == 1}>接入上报异常</span>
119 </div>
120 )
121 }
122 })
123 .concat([]),
124 },
125 data: [],
126 }
127 },
128 created () {
129 this.getTableData();
130 },
131 mounted () { },
132 methods: {
133 //查询
134 searchQuery () {
135 if (this.form.rolesName) {
136 this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName);
137 } else {
138 this.getTableData()
139 }
140 },
141 childrenFn (arr, key) {
142 let searchTree = [];
143 arr.forEach((item, index) => {
144 if (item.name.indexOf(key) != -1) {
145
146 searchTree.push(item);
147 }
148 });
149 if (searchTree != undefined && searchTree.length != 0) {
150 return judgeSort(searchTree);
151 }
152 },
153 // 获取角色列表
154 getTableData () {
155 getRolesById([1, 2])
156 .then((res) => {
157 this.listdata = res.content;
158 this.listdata = judgeSort(this.listdata);
159 this.setlistdata = res.content;
160 })
161 .catch((e) => console.error(e));
162 },
163
164
165 },
166 };
167 </script>
168 <style scoped lang="scss">
169 @import "~@/styles/mixin.scss";
170 // @import "~@/styles/public.scss";
171
172 /deep/.el-button.is-disabled.el-button--text {
173 width: 64px;
174 height: 28px;
175 background: rgba(255, 255, 255, 0.1);
176 border-radius: 16px;
177 }
178 </style>
1 <template>
2 <div class="informationbase">
3 <el-form
4 ref="form"
5 label-width="100px"
6 :model="form"
7 class="form-wrapper"
8 :rules="rules">
9 <el-form-item label="用户名:" required>
10 <el-input v-model="form.loginName" clearable disabled />
11 </el-form-item>
12 <el-form-item label="姓名:">
13 <el-input v-model="form.name" clearable />
14 </el-form-item>
15 <el-form-item label="性别:">
16 <el-radio-group v-model="form.sex">
17 <el-radio
18 v-for="(item, index) in sexList"
19 :key="index"
20 :label="item.value">{{ item.name }}</el-radio>
21 </el-radio-group>
22 </el-form-item>
23 <el-form-item label="身份证号:" prop="idCard">
24 <el-input v-model="form.idCard" clearable />
25 </el-form-item>
26 <el-form-item label="手机号码:" prop="mobilePhone">
27 <el-input v-model="form.mobilePhone" clearable />
28 </el-form-item>
29 <el-form-item label="办公电话:">
30 <el-input v-model="form.telephone" clearable />
31 </el-form-item>
32 <el-form-item label="办公地址:">
33 <el-input v-model="form.address" clearable />
34 </el-form-item>
35 </el-form>
36 <div class="bottom-wrapper">
37 <btn nativeType="cx" type="primary" @click="updateInfo">更新信息</btn>
38 </div>
39 </div>
40 </template>
41
42 <script>
43 import { api, getAction, putAction, getDictItems } from '@/api/manageApi'
44 export default {
45 props: {
46 userInfo: {
47 type: Object,
48 default: null
49 }
50 },
51 data () {
52 return {
53 form: {},
54 sexList: [],
55 rules: {
56 mobilePhone: [
57 {
58 pattern:
59 /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
60 message: '手机号码格式有误',
61 trigger: 'blur'
62 }
63 ],
64 idCard: [
65 {
66 pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
67 message: '身份证号格式有误',
68 trigger: 'blur'
69 }
70 ]
71 }
72 }
73 },
74 watch: {
75 userInfo: {
76 handler: function (val) {
77 if (val) {
78 this.getUserdata(val.id)
79 }
80 }
81 }
82 },
83 mounted () {
84 if (this.userInfo) {
85 this.getUserdata(this.userInfo.id)
86 }
87 this.sexList = [
88 {
89 "name": "男",
90 "value": "0",
91 },
92 {
93
94 "name": "女",
95 "value": "1",
96 },
97
98 {
99 "name": "保密",
100 "value": "2",
101
102 }
103 ]
104 },
105 methods: {
106 getUserdata (id) {
107 getAction(`${api.users}/${id}`).then((res) => {
108 if (res.status === 1) {
109 this.form = res.content
110 } else {
111 this.$message.error({ message: res.message, showClose: true })
112 }
113 })
114 },
115 updateInfo () {
116 this.$refs.form.validate((valid) => {
117 if (valid) {
118 putAction(`${api.users}/${this.form.id}`, this.form).then((res) => {
119 if (res.status === 1) {
120 this.$message.success({ message: res.message, showClose: true })
121 this.getUserdata(this.form.id)
122 } else {
123 this.$message.error({ message: res.message, showClose: true })
124 }
125 })
126 }
127 })
128 }
129 }
130 }
131 </script>
132
133 <style scoped lang="scss">
134 .user-info {
135 margin: 0.1875rem 1.0417rem;
136 overflow-y: auto;
137 .form-wrapper {
138 padding: 0px 120px 0px;
139 .el-form-item {
140 /deep/.el-form-item__label {
141 color: #ffffff;
142 }
143 ::v-deep .el-input .el-input__inner {
144 padding: 0 8px;
145 height: 40px;
146 line-height: 40px;
147 border: 1px solid #6bc1fc;
148 }
149 }
150 .el-form-item--small.el-form-item {
151 margin-bottom: 16px;
152 }
153 }
154 .bottom-wrapper {
155 padding: 0px 120px 0px;
156 text-align: center;
157 }
158 }
159 </style>
1 <!--
2 * @Author: xiaomiao 1158771342@qq.com
3 * @Date: 2023-03-09 20:54:28
4 * @LastEditors: Please set LastEditors
5 * @LastEditTime: 2023-03-30 11:21:49
6 * @FilePath: \上报\bdcjg-web\src\views\system\information\index.vue
7 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8 -->
9 <template>
10 <div class="information from-clues">
11 <div class="from-clues-header">
12 <el-form ref="ruleForm" label-width="100px">
13 <el-form-item v-if="BASE_API.THEME == 'jg'">
14 <Breadcrumb />
15 </el-form-item>
16 <el-row class="mb-5">
17 <el-col class="btnColRight">
18 <btn nativeType="cx" @click="information">
19 基本信息
20 </btn>
21 <btn nativeType="cx" @click="password">
22 修改密码
23 </btn>
24 </el-col>
25 </el-row>
26 </el-form>
27 </div>
28 <div class="from-clues-content">
29 <div class="contentbox">
30 <base-set v-if="isshow" :userInfo="userData" />
31 <password-edit v-if="!isshow" :userInfo="userData" />
32 </div>
33 </div>
34 </div>
35 </template>
36 <script>
37 import "@/utils/flexible.js";
38 import BaseSet from "./base-set.vue";
39 import PasswordEdit from "./password-edit.vue";
40 export default {
41 components: {
42 BaseSet,
43 PasswordEdit,
44 },
45 data () {
46 return {
47 isshow: true,
48 };
49 },
50 computed: {
51 userData () {
52 return this.$store.state.user.userInfo;
53 },
54 },
55 watch: {},
56 created () { },
57 mounted () { },
58 methods: {
59 information () {
60 this.isshow = true;
61 },
62 password () {
63 this.isshow = false;
64 },
65 },
66 };
67 </script>
68
69 <style scoped lang="scss">
70 @import "~@/styles/mixin.scss";
71 </style>
1 <template>
2 <div class="informationpassword">
3 <el-form
4 ref="form"
5 label-width="100px"
6 :model="form"
7 class="form-wrapper"
8 :rules="rules">
9 <el-form-item label="旧密码:" prop="oldPassword">
10 <el-input
11 v-model="form.oldPassword"
12 clearable
13 type="password"
14 show-password />
15 </el-form-item>
16 <el-form-item label="新密码:" prop="newPassword">
17 <el-input
18 v-model="form.newPassword"
19 clearable
20 type="password"
21 show-password />
22 </el-form-item>
23 <el-form-item label="确认密码:" prop="confirmPassword">
24 <el-input
25 v-model="form.confirmPassword"
26 clearable
27 type="password"
28 show-password />
29 </el-form-item>
30 </el-form>
31 <div class="bottom-wrapper">
32 <btn nativeType="cx" type="primary" @click="updatePassword">确认修改</btn>
33 </div>
34 </div>
35 </template>
36
37 <script>
38 import { updateUserPassword } from "@/api/personnelManage";
39 export default {
40 props: {
41 userInfo: {
42 type: Object,
43 default: null,
44 },
45 },
46 data () {
47 return {
48 form: {},
49 sexList: [],
50 userId: "",
51 rules: {
52 oldPassword: [
53 { required: true, message: "旧密码不能为空", trigger: "blur" },
54 ],
55 newPassword: [
56 { required: true, message: "新密码不能为空", trigger: "blur" },
57 ],
58 confirmPassword: [
59 { required: true, message: "确认密码不能为空", trigger: "blur" },
60 { validator: this.validatorConfirmPassword, trigger: "blur" },
61 ],
62 },
63 };
64 },
65 computed: {},
66 watch: {
67 userInfo: {
68 handler: function (val) {
69 if (val) {
70 this.getid(val);
71 }
72 },
73 },
74 },
75 mounted () {
76 if (this.userInfo) {
77 this.getid(this.userInfo);
78 }
79 },
80 methods: {
81 getid (val) {
82 this.userId = val.id;
83 },
84 validatorConfirmPassword (rule, value, callback) {
85 const { newPassword } = this.form;
86 if (value !== newPassword) {
87 callback("两次输入密码不一致");
88 } else {
89 callback();
90 }
91 },
92 updatePassword () {
93 this.$refs.form.validate((valid) => {
94 if (valid) {
95 const params = Object.assign({}, this.form, { id: this.userId });
96 updateUserPassword(params).then((res) => {
97 if (res.status === 1) {
98 this.$message.success({ message: res.message, showClose: true });
99 } else {
100 this.$message.error({ message: res.message, showClose: true });
101 }
102 });
103 }
104 });
105 },
106 },
107 };
108 </script>
109
110 <style scoped lang="scss">
111 </style>