opt: 历史任务记录显示起点2终点2,监控大屏2秒刷新

This commit is contained in:
yanps
2024-05-14 09:00:00 +08:00
parent 9bbe7c8b68
commit 4df8527bb4
7 changed files with 125 additions and 105 deletions

View File

@@ -197,7 +197,6 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
//未联机 //未联机
} else if (mode == 0) { } else if (mode == 0) {
this.setIsonline(false); this.setIsonline(false);
this.setIserror(true);
message = "未联机"; message = "未联机";
//有报警 //有报警
} else if (error != 0) { } else if (error != 0) {

View File

@@ -127,7 +127,7 @@ public class ItemProtocol {
Boolean isonline; Boolean isonline;
Boolean isError; Boolean isError = false;
public int getOpcIntegerValue(String protocol) { public int getOpcIntegerValue(String protocol) {
Integer value = this.driver.getIntegeregerValue(protocol); Integer value = this.driver.getIntegeregerValue(protocol);

View File

@@ -113,7 +113,7 @@ public class ItemProtocol {
} }
Boolean isonline; Boolean isonline;
Boolean isError; Boolean isError = false;
public int getOpcIntegerValue(String protocol) { public int getOpcIntegerValue(String protocol) {
Integer value = this.driver.getIntegeregerValue(protocol); Integer value = this.driver.getIntegeregerValue(protocol);

View File

@@ -235,6 +235,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
String status = (String) whereJson.get("status"); String status = (String) whereJson.get("status");
String point_code = (String) whereJson.get("point_code"); String point_code = (String) whereJson.get("point_code");
String create_time = (String) whereJson.get("createTime"); String create_time = (String) whereJson.get("createTime");
String type = (String) whereJson.get("type");
String end_time = (String) whereJson.get("end_time"); String end_time = (String) whereJson.get("end_time");
IPage<InstructionMybatis> queryPage = PageUtil.toMybatisPage(page); IPage<InstructionMybatis> queryPage = PageUtil.toMybatisPage(page);
@@ -252,6 +253,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (!StrUtil.isEmpty(status)) { if (!StrUtil.isEmpty(status)) {
wrapper.eq(InstructionMybatis::getInstruction_status, status); wrapper.eq(InstructionMybatis::getInstruction_status, status);
} }
if (!StrUtil.isEmpty(type)) {
wrapper.eq(InstructionMybatis::getInstruction_type, type);
}
if (!StrUtil.isEmpty(point_code)) { if (!StrUtil.isEmpty(point_code)) {
wrapper.and(instructionMybatis -> instructionMybatis.like(InstructionMybatis::getStart_point_code, point_code).or().like(InstructionMybatis::getNext_point_code, point_code)); wrapper.and(instructionMybatis -> instructionMybatis.like(InstructionMybatis::getStart_point_code, point_code).or().like(InstructionMybatis::getNext_point_code, point_code));
} }

View File

@@ -60,6 +60,20 @@
<el-option v-for="item in dict.task_status" :key="item.id" :label="item.label" :value="item.value" /> <el-option v-for="item in dict.task_status" :key="item.id" :label="item.label" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('task.txt_box.Task_type')">
<el-select
v-model="query.type"
clearable
filterable
size="small"
:placeholder="$t('task.txt_box.Task_type')"
class="filter-item"
style="width: 190px"
@change="crud.toQuery"
>
<el-option v-for="item in dict.task_type" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('task.txt_box.Origin_or_destination')"> <el-form-item :label="$t('task.txt_box.Origin_or_destination')">
<el-input <el-input
v-model="query.point_code" v-model="query.point_code"
@@ -200,7 +214,7 @@ const defaultForm = {
update_time: null update_time: null
} }
export default { export default {
dicts: ['task_status'], dicts: ['task_status', 'task_type'],
name: 'Instruction', name: 'Instruction',
components: { pagination, crudOperation, Search }, components: { pagination, crudOperation, Search },
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],

View File

@@ -293,6 +293,8 @@
<el-table-column prop="priority" :label="$t('TaskRecord.table.Priority')" /> <el-table-column prop="priority" :label="$t('TaskRecord.table.Priority')" />
<el-table-column prop="start_point_code" :label="$t('task.select.Start_point')" /> <el-table-column prop="start_point_code" :label="$t('task.select.Start_point')" />
<el-table-column prop="next_point_code" :label="$t('task.select.Destination')" /> <el-table-column prop="next_point_code" :label="$t('task.select.Destination')" />
<el-table-column prop="start_point_code2" :label="$t('TaskRecord.table.Starting_point_two')" :min-width="flexWidth('start_point_code2',crud.data,$t('TaskRecord.table.Starting_point_two'))" />
<el-table-column prop="next_point_code2" :label="$t('TaskRecord.table.Endpoint_two')" :min-width="flexWidth('next_point_code2',crud.data,$t('TaskRecord.table.Endpoint_two'))" />
<el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" /> <el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" />
<el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" /> <el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" />
<el-table-column prop="remark" :label="$t('task.select.Remark')" /> <el-table-column prop="remark" :label="$t('task.select.Remark')" />

View File

@@ -386,6 +386,7 @@ export default {
// 开始渲染 // 开始渲染
lf.render(data) lf.render(data)
this.initStageData() this.initStageData()
this.changeStage(this.stage_code)
}, },
getStages() { getStages() {
selectStageList().then(data => { selectStageList().then(data => {