|
|
@@ -0,0 +1,476 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="24" :xs="24">
|
|
|
+ <div class="main-right-box">
|
|
|
+ <div class="main-search-box">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
+ >
|
|
|
+ <el-form-item label="组织机构">
|
|
|
+ <org-tree
|
|
|
+ v-model="queryParams.orgId"
|
|
|
+ @defaultKey="getDefaultKey"
|
|
|
+ @defaultOrg="getDefaultOrg"
|
|
|
+ @checkChange="checkChange"
|
|
|
+ @click="clickTreeNode"
|
|
|
+ ref="orgTree"
|
|
|
+ ></org-tree>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="资产类别" prop="taskName">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.taskName"
|
|
|
+ clearable
|
|
|
+ label="资产类别"
|
|
|
+ placeholder="请选择资产类别"
|
|
|
+ prop="orgType"
|
|
|
+ @change="cleanExecOrgList"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type.sys_org_type"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="设备类型" prop="planStartTime">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.planStartTime"
|
|
|
+ clearable
|
|
|
+ label="设备类型"
|
|
|
+ placeholder="请选择设备类型"
|
|
|
+ prop="orgType"
|
|
|
+ @change="cleanExecOrgList"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type.sys_org_type"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="设备状态" prop="planStartTime">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.planStartTime"
|
|
|
+ clearable
|
|
|
+ label="设备状态"
|
|
|
+ placeholder="请选择设备状态"
|
|
|
+ prop="orgType"
|
|
|
+ @change="cleanExecOrgList"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type.sys_org_type"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="在线状态" prop="planStartTime">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.planStartTime"
|
|
|
+ clearable
|
|
|
+ label="在线状态"
|
|
|
+ placeholder="请选择在线状态"
|
|
|
+ prop="orgType"
|
|
|
+ @change="cleanExecOrgList"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type.sys_org_type"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ size="mini"
|
|
|
+ @click="resetQuery"
|
|
|
+ >重置
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ size="mini"
|
|
|
+ @click="resetQuery"
|
|
|
+ >状态汇总
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['core:task:export']"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="taskList"
|
|
|
+ border
|
|
|
+ height="600"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <!-- <el-table-column
|
|
|
+ label="序号"
|
|
|
+ type="index"
|
|
|
+ align="center"
|
|
|
+ width="100"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{
|
|
|
+ (queryParams.pageNum - 1) * queryParams.pageSize +
|
|
|
+ scope.$index +
|
|
|
+ 1
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column
|
|
|
+ label="组织机构"
|
|
|
+ align="center"
|
|
|
+ prop="taskName"
|
|
|
+ width="220"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="设备编码"
|
|
|
+ align="center"
|
|
|
+ prop="sbmc"
|
|
|
+
|
|
|
+ show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="设备名称"
|
|
|
+ align="center"
|
|
|
+ prop="sbmc1"
|
|
|
+ width="220"
|
|
|
+ show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ label="资产类别"
|
|
|
+ align="center"
|
|
|
+ prop="pp"
|
|
|
+
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="设备类型"
|
|
|
+ align="center"
|
|
|
+ prop="ip"
|
|
|
+
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="设备状态"
|
|
|
+ align="center"
|
|
|
+ prop="status"
|
|
|
+
|
|
|
+ />
|
|
|
+ <el-table-column label="上报时间" align="center" prop="wlzt">
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ <dict-tag
|
|
|
+ :options="dict.type.retrieval_task_status"
|
|
|
+ :value="scope.row.status"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </template> -->
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="上报内容" align="center" prop="ypzs">
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
+ {{ scope.row.planStartTime }}~{{ scope.row.planEndTime }}
|
|
|
+ </template> -->
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ fixed="right"
|
|
|
+ style="width: 100px"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="lookView(scope.row)"
|
|
|
+ v-hasPermi="['core:task:query']"
|
|
|
+ >历史数据</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <dialog-info ref="infoDialog" @success="refresh(true)"></dialog-info>
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { listTask } from "@/api/core/task";
|
|
|
+import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
|
|
|
+import DialogInfo from "./dialog.vue";
|
|
|
+import { listPlanRole } from "@/api/core/edu/plan";
|
|
|
+import { formatTime } from "@/utils/ruoyi";
|
|
|
+import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
|
|
|
+import dayjs from "dayjs";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+export default {
|
|
|
+ components: { OrgTree, DialogInfo, DataRangePicker },
|
|
|
+ name: "Task",
|
|
|
+ // dicts: ["sys_access_cycle"],
|
|
|
+ dicts: ["sys_org_type", "plan_status"],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 遮罩层
|
|
|
+ loading: false,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个停用
|
|
|
+ single: true,
|
|
|
+ // 非多个停用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 1,
|
|
|
+ // 监控调阅任务表格数据
|
|
|
+ taskList: [
|
|
|
+ {
|
|
|
+ taskName: "长乐农商行",
|
|
|
+ sbmc: "三楼海康",
|
|
|
+ pp: "海康视频存储设备",
|
|
|
+ ip: "10.87.10.166",
|
|
|
+ wlzt: "正常",
|
|
|
+ ypzs: "50",
|
|
|
+ exceptionCount: "2",
|
|
|
+ sykj: "995G/7449G",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ taskName: null,
|
|
|
+ cycle: null,
|
|
|
+ dateRange: [],
|
|
|
+ planStartTime: null,
|
|
|
+ status: null,
|
|
|
+ roleId: null,
|
|
|
+ checkSub: true,
|
|
|
+ },
|
|
|
+ selectedOrgName: "",
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {},
|
|
|
+
|
|
|
+ orgName: "",
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.queryParams.orgId = this.$store.getters.orgId;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["orgId", "orgName"]),
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 查询监控调阅任务列表 */
|
|
|
+ getList() {
|
|
|
+ this.taskList = [
|
|
|
+ {
|
|
|
+ taskName: "福建农信",
|
|
|
+ sbmc: "80010",
|
|
|
+ sbmc1: "自助区卷帘门一",
|
|
|
+ pp: " 卷帘门门磁",
|
|
|
+ ip: "巡检主机传感器",
|
|
|
+ wlzt: "2023-12-22 15:01:25",
|
|
|
+ ypzs: "门已打开",
|
|
|
+ status: "在线",
|
|
|
+
|
|
|
+ },
|
|
|
+ { //自助区卷帘门一
|
|
|
+ taskName: "福建农信",
|
|
|
+ sbmc: "80011",
|
|
|
+ sbmc1: "自助区卷帘门一",
|
|
|
+ pp: " 卷帘门门磁",
|
|
|
+ ip: "巡检主机传感器",
|
|
|
+ wlzt: "2023-12-22 15:01:25",
|
|
|
+ ypzs: "未知",
|
|
|
+ status: "离线",
|
|
|
+
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ return;
|
|
|
+ this.loading = true;
|
|
|
+ listTask(this.queryParams).then((response) => {
|
|
|
+ this.taskList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ getDefaultOrg(org) {
|
|
|
+ this.orgName = org.name;
|
|
|
+ this.selectedOrgName = org.shortName;
|
|
|
+ },
|
|
|
+
|
|
|
+ getDefaultKey(key) {
|
|
|
+ this.queryParams.orgId = key;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ checkChange(state) {
|
|
|
+ this.queryParams.checkSub = state;
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 节点单击事件
|
|
|
+ clickTreeNode(data) {
|
|
|
+ this.queryParams.orgId = data.id;
|
|
|
+ this.orgName = data.name;
|
|
|
+ this.selectedOrgName = data.shortName;
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ /** 下穿状态改变*/
|
|
|
+ changeCheckBox() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ id: null,
|
|
|
+ planId: null,
|
|
|
+ taskName: null,
|
|
|
+ orgId: null,
|
|
|
+ orgPath: null,
|
|
|
+ orgName: null,
|
|
|
+ ymdDate: null,
|
|
|
+ ymdYear: null,
|
|
|
+ ymdHalfyear: null,
|
|
|
+ ymdQuarter: null,
|
|
|
+ ymdMonth: null,
|
|
|
+ ymdWeek: null,
|
|
|
+ ymdDay: null,
|
|
|
+ cycle: null,
|
|
|
+ planStartTime: null,
|
|
|
+ planEndTime: null,
|
|
|
+ startTime: null,
|
|
|
+ endTime: null,
|
|
|
+ status: null,
|
|
|
+ roleId: null,
|
|
|
+ retrievalUser: null,
|
|
|
+ orderNum: null,
|
|
|
+ batchNum: null,
|
|
|
+ submitTime: null,
|
|
|
+ exceptionCount: null,
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ //this.queryParams.dateRange = [];
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.queryParams.orgId = this.orgId;
|
|
|
+ this.selectedOrgName = this.orgName;
|
|
|
+ this.queryParams.checkSub = true;
|
|
|
+ this.queryParams.dateRange = ["", ""];
|
|
|
+ this.queryParams.planStartTime = null;
|
|
|
+ this.$refs["orgTree"].setCheckSub(this.queryParams.checkSub);
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加监控调阅任务";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ lookView(row) {
|
|
|
+ this.$refs["infoDialog"].show(row.id, {});
|
|
|
+ },
|
|
|
+
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ // handleExport() {
|
|
|
+ // console.log(this);
|
|
|
+ // this.download(
|
|
|
+ // "core/retrievalTask/export",
|
|
|
+ // {
|
|
|
+ // ...this.queryParams,
|
|
|
+ // },
|
|
|
+ // `${
|
|
|
+ // this.selectedOrgName
|
|
|
+ // }-${this.$tab.getCurrentTabName()}-${dayjs().format("YYYYMMDD")}.xlsx`
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+</style>
|