forked from xxhjsb/hbt-prevention-ui
feat:安全检查分析区域过滤,奖惩记录人去重过滤
parent
6659cc7af9
commit
0969ada1c2
|
@ -5,7 +5,7 @@ VUE_APP_TITLE = 汉邦唐全真数字服务平台
|
|||
# 网关地址
|
||||
VUE_APP_GATEWAY_URL="/prod-api"
|
||||
# 服务地址
|
||||
VUE_APP_BASE_API_URL=""
|
||||
VUE_APP_BASE_API_URL="http://119.45.186.133:8081"
|
||||
# 服务前-- 请严格遵守格式 不允许换行
|
||||
VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file","prevention":"/prevention","bpm":"/bpm"}'
|
||||
# 是否显示全部菜单
|
||||
|
|
|
@ -42,4 +42,10 @@ export default class DeviceService extends BaseService<any>{
|
|||
const url = this.prefix.prevention+'/device/inventory/filter/list';
|
||||
return this.post(url,params,{},true)
|
||||
}
|
||||
|
||||
//过滤区域单元
|
||||
public getDistinctList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/device/inventory/getDistinctList';
|
||||
return this.post(url,params)
|
||||
}
|
||||
}
|
|
@ -38,4 +38,9 @@ export default class RewardsRecordService extends BaseService<any>{
|
|||
const url = this.prefix.file+'/getSysFiles';
|
||||
return this.get(url,params,false)
|
||||
}
|
||||
//奖惩人过滤
|
||||
public getUserIds(params:any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/incentive/record/getUserIds';
|
||||
return this.get(url,params)
|
||||
}
|
||||
}
|
|
@ -294,7 +294,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
}),filterMethod:(data,row)=>{
|
||||
return row.types.indexOf(data)>=0;
|
||||
}});
|
||||
this.tableColumn.push({name:'编制人',key:"createBy"});
|
||||
this.tableColumn.push({name:'编制人',key:"createName"});
|
||||
this.tableColumn.push({name:'编制时间',key:"createTime"});
|
||||
this.updateTableColumn = [];
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { Component, Watch } from 'vue-property-decorator';
|
||||
import template from './rewardsRecord.component.html'
|
||||
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue";
|
||||
import FormComponent from "hbt-common/components/common/form.component.vue";
|
||||
|
@ -59,6 +59,8 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
|||
|
||||
public subShowUpdate = false;
|
||||
|
||||
public userList = [] as any;
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
@ -142,7 +144,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
showError: false,
|
||||
datas: this.$store.state.userList
|
||||
datas: this.userList
|
||||
},
|
||||
{
|
||||
name: "工号",
|
||||
|
@ -240,6 +242,8 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
|||
//
|
||||
}
|
||||
|
||||
|
||||
|
||||
public changes(data, item) {
|
||||
if (item && item.key === 'userId') {
|
||||
this.userService.getDetailsByIds({ userId: data }).then((res: any) => {
|
||||
|
@ -315,9 +319,28 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
|||
this.isReadonly = false;
|
||||
this.subIsReadonly = false;
|
||||
this.updateParams = { details: [] } as any;
|
||||
this.loadUserList()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//奖惩人
|
||||
public loadUserList(userId?) {
|
||||
this.tableService.getUserIds({}).then((res: any) => {
|
||||
let userList = this.$store.state.userList
|
||||
if (!userId && userId !== 0) {
|
||||
let filterUserList = userList.filter(item => res.data.indexOf(item.value) == -1)
|
||||
this.userList = filterUserList
|
||||
this.buildUpdateForm();
|
||||
this.showUpdate = true
|
||||
} else {
|
||||
let filterUserList = userList.filter(item => res.data.indexOf(item.value) == -1 || item.value === userId)
|
||||
this.userList = filterUserList
|
||||
this.buildUpdateForm();
|
||||
this.showUpdate = true
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 分页数据
|
||||
public getTableData() {
|
||||
|
@ -385,6 +408,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
|||
this.updateParams.details.forEach((item, index) => {
|
||||
item.index = index + 1;
|
||||
});
|
||||
this.loadUserList(row.userId)
|
||||
this.buildUpdateForm()
|
||||
this.showUpdate = true
|
||||
} else {
|
||||
|
|
|
@ -417,11 +417,11 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
public loadAreaData() {
|
||||
this.unitList = [];
|
||||
this.diviceList = [];
|
||||
this.areaService.selectByPage({ pageSize: 1000 }).then((res: any) => {
|
||||
this.areaList = res.data.datas.map(item => {
|
||||
this.tableService.getDistinctList({}).then((res: any) => {
|
||||
this.areaList = res.data.map(item => {
|
||||
return {
|
||||
name: item.name,
|
||||
value: item.id,
|
||||
name: item.areaName,
|
||||
value: item.areaId,
|
||||
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : null,
|
||||
}
|
||||
});
|
||||
|
@ -430,11 +430,11 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
}
|
||||
// 加载单元列表
|
||||
public loadUnitData(id?) {
|
||||
this.unitService.selectByPage({ pageSize: 1000, areaId: id }, false).then((res: any) => {
|
||||
this.unitList = res.data.datas.map(item => {
|
||||
this.tableService.getDistinctList({ areaId: id }).then((res: any) => {
|
||||
this.unitList = res.data.map(item => {
|
||||
return {
|
||||
name: item.name,
|
||||
value: item.id,
|
||||
name: item.unitName,
|
||||
value: item.unitId,
|
||||
deptId: item.chargeDeptId,
|
||||
userId: item.chargeUserId,
|
||||
deptName: item.chargeDeptName,
|
||||
|
|
|
@ -303,12 +303,12 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({ name: '审批人', key: "approveUserName" });
|
||||
|
||||
|
||||
this.subTableColumn.push({ name: '序号', key: "index", width: "60px" });
|
||||
this.subTableColumn.push({ name: '姓名', key: "userName", width: "80px" });
|
||||
this.subTableColumn.push({ name: '序号', key: "index", });
|
||||
this.subTableColumn.push({ name: '姓名', key: "userName",});
|
||||
this.subTableColumn.push({ name: '单位', key: "deptName",});
|
||||
this.subTableColumn.push({ name: '职务', key: "duty", });
|
||||
this.subTableColumn.push({ name: '联系方式', key: "phone",width:"130px" });
|
||||
this.subTableColumn.push({ name: '职责描述', key: "description", width: "200px", showTip: true, });
|
||||
this.subTableColumn.push({ name: '联系方式', key: "phone" });
|
||||
this.subTableColumn.push({ name: '职责描述', key: "description", width: "250px", showTip: true, });
|
||||
}
|
||||
|
||||
public callback(data, type) {
|
||||
|
|
Loading…
Reference in New Issue