组织机构字段新增
Showing
6 changed files
with
101 additions
and
80 deletions
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: xiaomiao 1158771342@qq.com | 2 | * @Author: xiaomiao 1158771342@qq.com |
| 3 | * @Date: 2023-03-09 15:24:53 | 3 | * @Date: 2023-03-09 15:24:53 |
| 4 | * @LastEditors: xiaomiao 1158771342@qq.com | 4 | * @LastEditors: xiaomiao 1158771342@qq.com |
| 5 | * @LastEditTime: 2023-03-20 09:21:04 | 5 | * @LastEditTime: 2023-03-21 14:59:20 |
| 6 | * @FilePath: \上报\bdcjg-web\src\api\personnelManage.js | 6 | * @FilePath: \上报\bdcjg-web\src\api\personnelManage.js |
| 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| 8 | */ | 8 | */ |
| ... | @@ -25,36 +25,20 @@ export const getUserList = (params) => { | ... | @@ -25,36 +25,20 @@ export const getUserList = (params) => { |
| 25 | } | 25 | } |
| 26 | export const getUserLists = (queryParam) => { | 26 | export const getUserLists = (queryParam) => { |
| 27 | const conditionGroup = { | 27 | const conditionGroup = { |
| 28 | conditions: [{ | 28 | conditions: [], |
| 29 | property: 'code', | ||
| 30 | value: queryParam.code ? queryParam.code : null, | ||
| 31 | operator: 'LIKE' | ||
| 32 | }, | ||
| 33 | { | ||
| 34 | property: 'name', | ||
| 35 | value: queryParam.name ? queryParam.name : null, | ||
| 36 | operator: 'LIKE' | ||
| 37 | } | ||
| 38 | , | ||
| 39 | { | ||
| 40 | property: 'loginName', | ||
| 41 | value: queryParam.loginName ? queryParam.loginName : null, | ||
| 42 | operator: 'LIKE' | ||
| 43 | }, | ||
| 44 | { | ||
| 45 | property: 'organizationId', | ||
| 46 | value: queryParam.organizationId, | ||
| 47 | operator: 'IN' | ||
| 48 | } | ||
| 49 | , | ||
| 50 | { | ||
| 51 | property: 'departmentId', | ||
| 52 | value: queryParam.departmentId, | ||
| 53 | operator: 'IN' | ||
| 54 | } | ||
| 55 | ], | ||
| 56 | queryRelation: 'AND', | 29 | queryRelation: 'AND', |
| 57 | } | 30 | } |
| 31 | console.log("queryParam", queryParam); | ||
| 32 | for (let key in queryParam) { | ||
| 33 | if (queryParam[key]) { | ||
| 34 | conditionGroup.conditions.push({ | ||
| 35 | property: key, | ||
| 36 | value: queryParam[key], | ||
| 37 | operator: 'LIKE' | ||
| 38 | }) | ||
| 39 | } | ||
| 40 | |||
| 41 | } | ||
| 58 | const params = getParams(conditionGroup) | 42 | const params = getParams(conditionGroup) |
| 59 | return getAction(api.users, params) | 43 | return getAction(api.users, params) |
| 60 | } | 44 | } | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-03-21 14:27:07 | 4 | * @LastEditTime: 2023-03-21 14:45:26 |
| 5 | */ | 5 | */ |
| 6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
| 7 | import Layout from '@/layout1' | 7 | import Layout from '@/layout' |
| 8 | const config = require('/public/config.json') | 8 | const config = require('/public/config.json') |
| 9 | console.log(config, 'Vue.2222222222222.BASE_API'); | 9 | console.log(config, 'Vue.2222222222222.BASE_API'); |
| 10 | export default function filterAsyncRouter (routers) { | 10 | export default function filterAsyncRouter (routers) { | ... | ... |
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: xiaomiao 1158771342@qq.com | 2 | * @Author: xiaomiao 1158771342@qq.com |
| 3 | * @Date: 2023-01-30 17:59:51 | 3 | * @Date: 2023-01-30 17:59:51 |
| 4 | * @LastEditors: xiaomiao 1158771342@qq.com | 4 | * @LastEditors: xiaomiao 1158771342@qq.com |
| 5 | * @LastEditTime: 2023-03-08 15:09:15 | 5 | * @LastEditTime: 2023-03-21 15:00:39 |
| 6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js | 6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js |
| 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| 8 | */ | 8 | */ |
| ... | @@ -29,7 +29,7 @@ class data extends filter { | ... | @@ -29,7 +29,7 @@ class data extends filter { |
| 29 | }, | 29 | }, |
| 30 | { | 30 | { |
| 31 | prop: "departmentName", | 31 | prop: "departmentName", |
| 32 | label: "所属部门" | 32 | label: "组织机构" |
| 33 | }, | 33 | }, |
| 34 | { | 34 | { |
| 35 | prop: "job_group", | 35 | prop: "job_group", | ... | ... |
| ... | @@ -61,6 +61,15 @@ | ... | @@ -61,6 +61,15 @@ |
| 61 | </el-row> | 61 | </el-row> |
| 62 | <el-row :gutter="24"> | 62 | <el-row :gutter="24"> |
| 63 | <el-col :span="24"> | 63 | <el-col :span="24"> |
| 64 | <el-form-item label="组织机构:" label-width="100px"> | ||
| 65 | <el-select class="selbig" v-model="form.departmentName" placeholder="组织机构"> | ||
| 66 | <el-option v-for="item in districtAreaList" :key="item.id" :label="item.name" :value="item.id" /> | ||
| 67 | </el-select> | ||
| 68 | </el-form-item> | ||
| 69 | </el-col> | ||
| 70 | </el-row> | ||
| 71 | <el-row :gutter="24"> | ||
| 72 | <el-col :span="24"> | ||
| 64 | <el-form-item label="办公地点:" label-width="100px" class="form-item-mb0"> | 73 | <el-form-item label="办公地点:" label-width="100px" class="form-item-mb0"> |
| 65 | <el-input v-model="form.address" placeholder="办公地点" /> | 74 | <el-input v-model="form.address" placeholder="办公地点" /> |
| 66 | </el-form-item> | 75 | </el-form-item> |
| ... | @@ -72,7 +81,7 @@ | ... | @@ -72,7 +81,7 @@ |
| 72 | </template> | 81 | </template> |
| 73 | 82 | ||
| 74 | <script> | 83 | <script> |
| 75 | import { api, httpAction } from '@/api/manageApi' | 84 | import { api, httpAction, getAction } from '@/api/manageApi' |
| 76 | export default { | 85 | export default { |
| 77 | name: "", | 86 | name: "", |
| 78 | props: { | 87 | props: { |
| ... | @@ -81,6 +90,7 @@ | ... | @@ -81,6 +90,7 @@ |
| 81 | data () { | 90 | data () { |
| 82 | return { | 91 | return { |
| 83 | myValue: this.value, | 92 | myValue: this.value, |
| 93 | districtAreaList: [], | ||
| 84 | form: { | 94 | form: { |
| 85 | sex: "0", | 95 | sex: "0", |
| 86 | }, | 96 | }, |
| ... | @@ -109,7 +119,20 @@ | ... | @@ -109,7 +119,20 @@ |
| 109 | this.myValue = val | 119 | this.myValue = val |
| 110 | } | 120 | } |
| 111 | }, | 121 | }, |
| 122 | created () { | ||
| 123 | this.getdistricts() | ||
| 124 | }, | ||
| 112 | methods: { | 125 | methods: { |
| 126 | getdistricts () { | ||
| 127 | getAction(api.departments, { | ||
| 128 | queryOptions: { orderBys: [{ property: "sort", direction: "desc" }] }, | ||
| 129 | }).then((res) => { | ||
| 130 | this.districtAreaList = res.content; | ||
| 131 | |||
| 132 | }); | ||
| 133 | |||
| 134 | |||
| 135 | }, | ||
| 113 | // 添加人员 | 136 | // 添加人员 |
| 114 | adds () { | 137 | adds () { |
| 115 | this.showLoginName = false | 138 | this.showLoginName = false |
| ... | @@ -195,5 +218,8 @@ | ... | @@ -195,5 +218,8 @@ |
| 195 | } | 218 | } |
| 196 | } | 219 | } |
| 197 | } | 220 | } |
| 221 | .selbig { | ||
| 222 | width: 500px; | ||
| 223 | } | ||
| 198 | } | 224 | } |
| 199 | </style> | 225 | </style> | ... | ... |
| ... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
| 23 | </el-col> | 23 | </el-col> |
| 24 | <!-- 操作按钮 --> | 24 | <!-- 操作按钮 --> |
| 25 | <el-col :span="3" class="btnColRight"> | 25 | <el-col :span="3" class="btnColRight"> |
| 26 | <btn nativeType="cx" @click="searchQuery">查询</btn> | 26 | <btn nativeType="cx" @click="getTableList">查询</btn> |
| 27 | <btn nativeType="cx" @click="handleAdd">添加人员</btn> | 27 | <btn nativeType="cx" @click="handleAdd">添加人员</btn> |
| 28 | </el-col> | 28 | </el-col> |
| 29 | </el-row> | 29 | </el-row> |
| ... | @@ -49,7 +49,7 @@ | ... | @@ -49,7 +49,7 @@ |
| 49 | resetPassword, | 49 | resetPassword, |
| 50 | getUserList, getUserLists | 50 | getUserList, getUserLists |
| 51 | } from "@/api/personnelManage"; | 51 | } from "@/api/personnelManage"; |
| 52 | import { api, deleteAction } from '@/api/manageApi' | 52 | import { api, deleteAction, getAction } from '@/api/manageApi' |
| 53 | import data from "./data"; | 53 | import data from "./data"; |
| 54 | import { deleteDomStr } from '@/utils/proDomStr' | 54 | import { deleteDomStr } from '@/utils/proDomStr' |
| 55 | import tableMixin from "@/mixins/tableMixin.js"; | 55 | import tableMixin from "@/mixins/tableMixin.js"; |
| ... | @@ -229,11 +229,8 @@ | ... | @@ -229,11 +229,8 @@ |
| 229 | this.$refs.dialogForm.title = "添加"; | 229 | this.$refs.dialogForm.title = "添加"; |
| 230 | }, | 230 | }, |
| 231 | // 查询 | 231 | // 查询 |
| 232 | searchQuery () { | 232 | getTableList () { |
| 233 | console.log(" console.log(this.form);", this.form); | ||
| 234 | this.queryParam = { | 233 | this.queryParam = { |
| 235 | organizationId: this.departmentid.organizationId, | ||
| 236 | departmentId: this.departmentid.departmentId, | ||
| 237 | name: this.form.name, | 234 | name: this.form.name, |
| 238 | code: this.form.code, | 235 | code: this.form.code, |
| 239 | loginName: this.form.loginName, | 236 | loginName: this.form.loginName, |
| ... | @@ -244,26 +241,65 @@ | ... | @@ -244,26 +241,65 @@ |
| 244 | this.loading = false; | 241 | this.loading = false; |
| 245 | this.tableData.data = res.content; | 242 | this.tableData.data = res.content; |
| 246 | this.tableData.data = judgeSort(this.tableData.data); | 243 | this.tableData.data = judgeSort(this.tableData.data); |
| 247 | console.log("this.tableData.data111111111111111", this.tableData.data); | 244 | let arr = [] |
| 245 | this.tableData.data.forEach((item) => { | ||
| 246 | arr.push(item.departmentId) | ||
| 247 | }) | ||
| 248 | this.getDepts(arr) | ||
| 248 | } else { | 249 | } else { |
| 249 | this.$message.error({ message: res.message, showClose: true }) | 250 | this.$message.error({ message: res.message, showClose: true }) |
| 250 | } | 251 | } |
| 251 | }) | 252 | }) |
| 252 | }, | 253 | }, |
| 253 | getTableList () { | 254 | // 获取组织机构 |
| 254 | this.loading = true; | 255 | getDepts (deptIdArr) { |
| 256 | let params = { | ||
| 257 | queryOptions: { | ||
| 258 | conditionGroup: { | ||
| 259 | conditions: [ | ||
| 260 | { | ||
| 261 | property: "id", | ||
| 262 | value: deptIdArr, | ||
| 263 | operator: "IN", | ||
| 264 | }, | ||
| 265 | ], | ||
| 266 | queryRelation: "AND", | ||
| 267 | }, | ||
| 268 | orderBys: [], | ||
| 269 | }, | ||
| 270 | }; | ||
| 271 | getAction(api.departments, params).then( | ||
| 272 | (res) => { | ||
| 273 | let deptsList = res.content; | ||
| 274 | console.log(deptsList); | ||
| 275 | deptsList.forEach((ele) => { | ||
| 276 | this.tableData.data.forEach((item) => { | ||
| 277 | if (ele.id == item.departmentId) { | ||
| 278 | item.departmentName = ele.name | ||
| 279 | } | ||
| 280 | }) | ||
| 281 | }) | ||
| 255 | 282 | ||
| 256 | getUserList().then((res) => { | 283 | }, |
| 257 | if (res.status === 1) { | 284 | (err) => { |
| 258 | console.log("res人员列表", res); | 285 | console.log("err :", err); |
| 259 | this.loading = false; | ||
| 260 | this.tableData.data = res.content; | ||
| 261 | this.tableData.data = judgeSort(this.tableData.data); | ||
| 262 | } else { | ||
| 263 | this.$message.error({ message: res.message, showClose: true }); | ||
| 264 | } | 286 | } |
| 265 | }); | 287 | ); |
| 266 | }, | 288 | }, |
| 289 | // getTableList () { | ||
| 290 | // this.loading = true; | ||
| 291 | |||
| 292 | // getUserList().then((res) => { | ||
| 293 | // if (res.status === 1) { | ||
| 294 | // console.log("res人员列表", res); | ||
| 295 | // this.loading = false; | ||
| 296 | // this.tableData.data = res.content; | ||
| 297 | // this.tableData.data = judgeSort(this.tableData.data); | ||
| 298 | // } else { | ||
| 299 | // this.$message.error({ message: res.message, showClose: true }); | ||
| 300 | // } | ||
| 301 | // }); | ||
| 302 | // }, | ||
| 267 | 303 | ||
| 268 | // 重置用户密码 | 304 | // 重置用户密码 |
| 269 | resetPassword (data) { | 305 | resetPassword (data) { |
| ... | @@ -328,32 +364,7 @@ | ... | @@ -328,32 +364,7 @@ |
| 328 | } | 364 | } |
| 329 | }) | 365 | }) |
| 330 | }, | 366 | }, |
| 331 | getDepts (deptIdArr) { | 367 | |
| 332 | let params = { | ||
| 333 | queryOptions: { | ||
| 334 | conditionGroup: { | ||
| 335 | conditions: [ | ||
| 336 | { | ||
| 337 | property: "id", | ||
| 338 | value: deptIdArr, | ||
| 339 | operator: "IN", | ||
| 340 | }, | ||
| 341 | ], | ||
| 342 | queryRelation: "AND", | ||
| 343 | }, | ||
| 344 | orderBys: [], | ||
| 345 | }, | ||
| 346 | }; | ||
| 347 | getAction(api.departments, params).then( | ||
| 348 | (res) => { | ||
| 349 | let deptsList = res.content; | ||
| 350 | console.log(deptsList); | ||
| 351 | }, | ||
| 352 | (err) => { | ||
| 353 | console.log("err :", err); | ||
| 354 | } | ||
| 355 | ); | ||
| 356 | }, | ||
| 357 | // 修改人员信息 | 368 | // 修改人员信息 |
| 358 | handleEdit (row) { | 369 | handleEdit (row) { |
| 359 | this.isDialog = true | 370 | this.isDialog = true | ... | ... |
-
Please register or sign in to post a comment