feat:添加查询条件

dev
kongyeqing 2023-10-10 15:27:47 +08:00
parent 813c0cc5c3
commit ff4b15866d
8 changed files with 114 additions and 18 deletions

View File

@ -63,7 +63,24 @@ export default class checkResumption extends BaseRecordComponent<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 = [{
name: "统计台账",
@ -117,6 +134,13 @@ export default class checkResumption extends BaseRecordComponent<any> {
datas: this.cycleList,
hide: this.type === 2,
},
{
name: "包保责任人类型",
key: "type",
type: "select",
datas: this.dangerType,
hide: this.type === 2,
},
{
name: "周期",
key: "time",
@ -214,9 +238,9 @@ export default class checkResumption extends BaseRecordComponent<any> {
public callback(data, type) {
if (type) {
if (this.type === 1) {
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
if (type === 'pageSize' || type === 'pageNum') {
this.params[type] = data;
}
this.getTableData()
} else {
this.getReportTableData()
@ -247,7 +271,10 @@ export default class checkResumption extends BaseRecordComponent<any> {
}
//
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) {
this.tableData = res.data as any;
}
@ -275,6 +302,12 @@ export default class checkResumption extends BaseRecordComponent<any> {
this.params.startTime = null;
this.params.endTime = null;
this.params.time = null;
this.params.type = null;
if (this.type === 1) {
this.getTableData()
} else {
this.getReportTableData()
}
}
public handleClose() {

View File

@ -2,7 +2,7 @@
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
<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 class="table-box flex-1">
<div class="full" v-if="isCheckTask">

View File

@ -227,6 +227,13 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
name: "限期整改",
value: 2
}]
},{
name: "整改部门",
key: "reformDeptId",
type: "treeSelect",
width:"280px",
expandLevel: Infinity,
datas: this.$store.state.deptTreeList
}];
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.$store.getters.prevention_dangrous_type_map[data.classify] });
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: "100", key: "executeUserName" });
this.tableColumn.push({ name: '整改结果', width: "100", render: (data) => this.executeResultMap[data.executeResult] });

View File

@ -196,6 +196,11 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
key: "inspectType",
type: "select",
datas: this.$store.state.prevention_danger_check_type
},{
name:"检查负责人",
key: "chargeUserId",
type: "select",
datas: this.$store.state.userList
}];
this.updateOptions = [{
name: "隐患编号",

View File

@ -73,11 +73,19 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
name: "重大危险源",
key: "majorHazard",
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: "状态",
key: "status",
type: "select",
clearable:true,
datas: [{
name: '已排查',
value: 1
@ -87,8 +95,11 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
}, {
name: '超期未排查',
value: 3
}, {
name: '即将开始',
value: 4
}]
}];
},];
public showUpdate = false;
public updateParams = {

View File

@ -63,6 +63,20 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
name: "分析对象",
key: "analName",
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 = [{
@ -349,6 +363,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
public buildTable() {
this.tableColumn.push({ name: '管控对象', key: "controlName", });
this.tableColumn.push({ name: '分析对象', key: "analName", });
this.tableColumn.push({ name: '部门', key: "chargeDeptName", });
this.tableColumn.push({ name: '风险源', key: "riskSource", });
this.tableColumn.push({
name: '事故后果', key: "seriousResult", render: (data) => {

View File

@ -5,7 +5,7 @@
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
<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 class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"

View File

@ -40,6 +40,9 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
//
public measuresSelectData = {} as any;
//
public querySecondMeasure = [] as any;
//
public tasksSelectData = {} as any;
@ -113,8 +116,20 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
key: "majorHazard",
type: "select",
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 updateParams = {} as any;
@ -205,14 +220,14 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
}
});
this.tableColumn.push({
name: '管控措施分类', key: "measureFirstType", width: "120px", render: (data) => {
name: '一级管控措施分类', key: "measureFirstType", width: "140px", render: (data) => {
if (data.measureFirstType) {
return this.$store.getters.prevention_measures_sort_map[data.measureFirstType]
}
}
});
this.tableColumn.push({
name: '管控措施分类', width: "120px", key: "measureSecondType",
name: '二级管控措施分类', width: "140px", key: "measureSecondType",
render: (data) => {
if (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({
@ -358,14 +373,25 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
}
//
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.tableData = res.data as any;
})
}
//--
public doUpdate() {
console.log('selectData', this.selectData);
if (this.selectData && this.selectData.length > 0) {
this.filterStatusData = this.selectData[0]['status']
const tmpSelectData = this.selectData.filter((item) => item.status !== this.filterStatusData)
@ -432,8 +458,6 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
}
public handleSelectionChange(data) {
console.log('data', data);
this.selectData = data;
}