forked from xxhjsb/hbt-prevention-ui
feat:添加查询条件
parent
813c0cc5c3
commit
ff4b15866d
|
@ -63,7 +63,24 @@ export default class checkResumption extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public riskSourceMap = {} as any;
|
public riskSourceMap = {} as any;
|
||||||
|
|
||||||
public dangerTypeMap = { 1: '主要负责人', 2: '技术负责人', 3: '操作负责人' }
|
public dangerTypeMap = { 1: '主要负责人', 2: '技术负责人', 3: '操作负责人' };
|
||||||
|
|
||||||
|
public dangerType = [{
|
||||||
|
value: 0,
|
||||||
|
name: "全部",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
name: "主要负责人",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
name: "技术负责人",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
name: "操作负责人",
|
||||||
|
},]
|
||||||
|
|
||||||
public tabs = [{
|
public tabs = [{
|
||||||
name: "统计台账",
|
name: "统计台账",
|
||||||
|
@ -117,6 +134,13 @@ export default class checkResumption extends BaseRecordComponent<any> {
|
||||||
datas: this.cycleList,
|
datas: this.cycleList,
|
||||||
hide: this.type === 2,
|
hide: this.type === 2,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "包保责任人类型",
|
||||||
|
key: "type",
|
||||||
|
type: "select",
|
||||||
|
datas: this.dangerType,
|
||||||
|
hide: this.type === 2,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "周期",
|
name: "周期",
|
||||||
key: "time",
|
key: "time",
|
||||||
|
@ -247,7 +271,10 @@ export default class checkResumption extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
// 分页数据
|
// 分页数据
|
||||||
public getTableData() {
|
public getTableData() {
|
||||||
this.tableService.selectByPage(this.params).then(res => {
|
const tmpParams = Object.assign(JSON.parse(JSON.stringify(this.params)), {
|
||||||
|
type: this.params.type ? this.params.type : null
|
||||||
|
})
|
||||||
|
this.tableService.selectByPage(tmpParams).then(res => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
this.tableData = res.data as any;
|
this.tableData = res.data as any;
|
||||||
}
|
}
|
||||||
|
@ -275,6 +302,12 @@ export default class checkResumption extends BaseRecordComponent<any> {
|
||||||
this.params.startTime = null;
|
this.params.startTime = null;
|
||||||
this.params.endTime = null;
|
this.params.endTime = null;
|
||||||
this.params.time = null;
|
this.params.time = null;
|
||||||
|
this.params.type = null;
|
||||||
|
if (this.type === 1) {
|
||||||
|
this.getTableData()
|
||||||
|
} else {
|
||||||
|
this.getReportTableData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleClose() {
|
public handleClose() {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="common-content-box dis-flex flex-col flex-1">
|
<div class="common-content-box dis-flex flex-col flex-1">
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
||||||
:full-btn="false" @change="change" btn-position="end"></FormComponent>
|
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box flex-1">
|
<div class="table-box flex-1">
|
||||||
<div class="full" v-if="isCheckTask">
|
<div class="full" v-if="isCheckTask">
|
||||||
|
|
|
@ -227,6 +227,13 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
name: "限期整改",
|
name: "限期整改",
|
||||||
value: 2
|
value: 2
|
||||||
}]
|
}]
|
||||||
|
},{
|
||||||
|
name: "整改部门",
|
||||||
|
key: "reformDeptId",
|
||||||
|
type: "treeSelect",
|
||||||
|
width:"280px",
|
||||||
|
expandLevel: Infinity,
|
||||||
|
datas: this.$store.state.deptTreeList
|
||||||
}];
|
}];
|
||||||
|
|
||||||
this.updateOptions = [{
|
this.updateOptions = [{
|
||||||
|
@ -737,6 +744,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
this.tableColumn.push({ name: '隐患级别', render: (data) => this.levelMap[data.level] });
|
this.tableColumn.push({ name: '隐患级别', render: (data) => this.levelMap[data.level] });
|
||||||
this.tableColumn.push({ name: '隐患分类', render: (data) => this.$store.getters.prevention_dangrous_type_map[data.classify] });
|
this.tableColumn.push({ name: '隐患分类', render: (data) => this.$store.getters.prevention_dangrous_type_map[data.classify] });
|
||||||
this.tableColumn.push({ name: '整改方式', render: (data) => this.reformModeMap[data.reformMode] });
|
this.tableColumn.push({ name: '整改方式', render: (data) => this.reformModeMap[data.reformMode] });
|
||||||
|
this.tableColumn.push({ name: '整改部门', render: (data) => data.reformDeptName });
|
||||||
this.tableColumn.push({ name: '隐患位置', width: "150", key: "locationName" });
|
this.tableColumn.push({ name: '隐患位置', width: "150", key: "locationName" });
|
||||||
this.tableColumn.push({ name: '治理人', width: "100", key: "executeUserName" });
|
this.tableColumn.push({ name: '治理人', width: "100", key: "executeUserName" });
|
||||||
this.tableColumn.push({ name: '整改结果', width: "100", render: (data) => this.executeResultMap[data.executeResult] });
|
this.tableColumn.push({ name: '整改结果', width: "100", render: (data) => this.executeResultMap[data.executeResult] });
|
||||||
|
|
|
@ -196,6 +196,11 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
key: "inspectType",
|
key: "inspectType",
|
||||||
type: "select",
|
type: "select",
|
||||||
datas: this.$store.state.prevention_danger_check_type
|
datas: this.$store.state.prevention_danger_check_type
|
||||||
|
},{
|
||||||
|
name:"检查负责人",
|
||||||
|
key: "chargeUserId",
|
||||||
|
type: "select",
|
||||||
|
datas: this.$store.state.userList
|
||||||
}];
|
}];
|
||||||
this.updateOptions = [{
|
this.updateOptions = [{
|
||||||
name: "隐患编号",
|
name: "隐患编号",
|
||||||
|
|
|
@ -73,11 +73,19 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
name: "重大危险源",
|
name: "重大危险源",
|
||||||
key: "majorHazard",
|
key: "majorHazard",
|
||||||
type: "select",
|
type: "select",
|
||||||
datas: this.$store.state.prevention_risk_source
|
datas: this.$store.state.prevention_risk_source,
|
||||||
|
clearable:true,
|
||||||
|
}, {
|
||||||
|
name: "责任人",
|
||||||
|
key: "taskChargeUserId",
|
||||||
|
type: "select",
|
||||||
|
datas: this.$store.state.userList,
|
||||||
|
clearable:true,
|
||||||
}, {
|
}, {
|
||||||
name: "状态",
|
name: "状态",
|
||||||
key: "status",
|
key: "status",
|
||||||
type: "select",
|
type: "select",
|
||||||
|
clearable:true,
|
||||||
datas: [{
|
datas: [{
|
||||||
name: '已排查',
|
name: '已排查',
|
||||||
value: 1
|
value: 1
|
||||||
|
@ -87,8 +95,11 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
}, {
|
}, {
|
||||||
name: '超期未排查',
|
name: '超期未排查',
|
||||||
value: 3
|
value: 3
|
||||||
|
}, {
|
||||||
|
name: '即将开始',
|
||||||
|
value: 4
|
||||||
}]
|
}]
|
||||||
}];
|
},];
|
||||||
|
|
||||||
public showUpdate = false;
|
public showUpdate = false;
|
||||||
public updateParams = {
|
public updateParams = {
|
||||||
|
|
|
@ -63,6 +63,20 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
name: "分析对象",
|
name: "分析对象",
|
||||||
key: "analName",
|
key: "analName",
|
||||||
type: "text",
|
type: "text",
|
||||||
|
}, {
|
||||||
|
name: "部门",
|
||||||
|
key: "chargeDeptId",
|
||||||
|
type: "treeSelect",
|
||||||
|
width: "280px",
|
||||||
|
expandLevel: Infinity,
|
||||||
|
datas: this.$store.state.deptTreeList,
|
||||||
|
clearable:true
|
||||||
|
}, {
|
||||||
|
name: "风险等级",
|
||||||
|
key: "riskLevel",
|
||||||
|
type: "select",
|
||||||
|
datas: this.$store.state.prevention_risk_level,
|
||||||
|
clearable:true
|
||||||
}];
|
}];
|
||||||
|
|
||||||
public subActions = [{
|
public subActions = [{
|
||||||
|
@ -349,6 +363,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
this.tableColumn.push({ name: '管控对象', key: "controlName", });
|
this.tableColumn.push({ name: '管控对象', key: "controlName", });
|
||||||
this.tableColumn.push({ name: '分析对象', key: "analName", });
|
this.tableColumn.push({ name: '分析对象', key: "analName", });
|
||||||
|
this.tableColumn.push({ name: '部门', key: "chargeDeptName", });
|
||||||
this.tableColumn.push({ name: '风险源', key: "riskSource", });
|
this.tableColumn.push({ name: '风险源', key: "riskSource", });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '事故后果', key: "seriousResult", render: (data) => {
|
name: '事故后果', key: "seriousResult", render: (data) => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="common-content-box dis-flex flex-col flex-1">
|
<div class="common-content-box dis-flex flex-col flex-1">
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
||||||
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
|
:full-btn="false" @change="callback" label-width="" btn-position="end"></FormComponent>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box flex-1">
|
<div class="table-box flex-1">
|
||||||
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
||||||
|
|
|
@ -40,6 +40,9 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
//管控措施
|
//管控措施
|
||||||
public measuresSelectData = {} as any;
|
public measuresSelectData = {} as any;
|
||||||
|
|
||||||
|
//二级管控措施查询条件
|
||||||
|
public querySecondMeasure = [] as any;
|
||||||
|
|
||||||
//排查任务
|
//排查任务
|
||||||
public tasksSelectData = {} as any;
|
public tasksSelectData = {} as any;
|
||||||
|
|
||||||
|
@ -113,8 +116,20 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
key: "majorHazard",
|
key: "majorHazard",
|
||||||
type: "select",
|
type: "select",
|
||||||
datas: this.$store.state.prevention_risk_source
|
datas: this.$store.state.prevention_risk_source
|
||||||
}
|
}, {
|
||||||
];
|
name: "一级管控措施",
|
||||||
|
key: "measureFirstType",
|
||||||
|
type: "select",
|
||||||
|
datas: this.$store.state.prevention_measures_sort,
|
||||||
|
clearable: true
|
||||||
|
}, {
|
||||||
|
name: "二级管控措施",
|
||||||
|
key: "measureSecondType",
|
||||||
|
type: "select",
|
||||||
|
datas: this.querySecondMeasure,
|
||||||
|
clearable: true
|
||||||
|
|
||||||
|
}];
|
||||||
|
|
||||||
public showUpdate = false;
|
public showUpdate = false;
|
||||||
public updateParams = {} as any;
|
public updateParams = {} as any;
|
||||||
|
@ -205,14 +220,14 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '管控措施分类', key: "measureFirstType", width: "120px", render: (data) => {
|
name: '一级管控措施分类', key: "measureFirstType", width: "140px", render: (data) => {
|
||||||
if (data.measureFirstType) {
|
if (data.measureFirstType) {
|
||||||
return this.$store.getters.prevention_measures_sort_map[data.measureFirstType]
|
return this.$store.getters.prevention_measures_sort_map[data.measureFirstType]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '管控措施分类', width: "120px", key: "measureSecondType",
|
name: '二级管控措施分类', width: "140px", key: "measureSecondType",
|
||||||
render: (data) => {
|
render: (data) => {
|
||||||
if (data.measureFirstType) {
|
if (data.measureFirstType) {
|
||||||
const secondTypeItem = this.measuresSelectData[data.measureFirstType]
|
const secondTypeItem = this.measuresSelectData[data.measureFirstType]
|
||||||
|
@ -220,7 +235,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({ name: '管控措施分类', width: "120px", key: "measureThirdType" });
|
this.tableColumn.push({ name: '三级管控措施分类', width: "140px", key: "measureThirdType" });
|
||||||
this.tableColumn.push({ name: '管控措施', key: "measureDescription", width: "250px" });
|
this.tableColumn.push({ name: '管控措施', key: "measureDescription", width: "250px" });
|
||||||
|
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
|
@ -358,14 +373,25 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
}
|
}
|
||||||
// 分页数据
|
// 分页数据
|
||||||
public getTableData() {
|
public getTableData() {
|
||||||
|
this.querySecondMeasure = []
|
||||||
|
if (this.params.measureFirstType) {
|
||||||
|
const measureSecondType = this.measuresSelectData[this.params.measureFirstType]
|
||||||
|
measureSecondType.forEach((item: any) => {
|
||||||
|
item.name = item.label;
|
||||||
|
item.value = item.id
|
||||||
|
})
|
||||||
|
this.querySecondMeasure = measureSecondType;
|
||||||
|
} else {
|
||||||
|
this.params.measureSecondType = null
|
||||||
|
}
|
||||||
|
const option = this.formOptions.find(item => item.key === "measureSecondType") as any;
|
||||||
|
option.datas = this.querySecondMeasure;
|
||||||
this.tableService.selectByPage(this.params).then(res => {
|
this.tableService.selectByPage(this.params).then(res => {
|
||||||
this.tableData = res.data as any;
|
this.tableData = res.data as any;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//发布--终止
|
//发布--终止
|
||||||
public doUpdate() {
|
public doUpdate() {
|
||||||
console.log('selectData', this.selectData);
|
|
||||||
|
|
||||||
if (this.selectData && this.selectData.length > 0) {
|
if (this.selectData && this.selectData.length > 0) {
|
||||||
this.filterStatusData = this.selectData[0]['status']
|
this.filterStatusData = this.selectData[0]['status']
|
||||||
const tmpSelectData = this.selectData.filter((item) => item.status !== this.filterStatusData)
|
const tmpSelectData = this.selectData.filter((item) => item.status !== this.filterStatusData)
|
||||||
|
@ -432,8 +458,6 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleSelectionChange(data) {
|
public handleSelectionChange(data) {
|
||||||
console.log('data', data);
|
|
||||||
|
|
||||||
this.selectData = data;
|
this.selectData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue