| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460 |
- <template>
- <div class="app-container">
- <el-row :gutter="20">
- <!--机构数据-->
- <!-- <el-col :span="4" :xs="24">
- <org-tree
- v-model="queryParams.orgId"
- @defaultKey="getDefaultKey"
- @defaultOrg="getDefaultOrg"
- @checkChange="checkChange"
- @click="clickTreeNode"
- ></org-tree>
- </el-col> -->
- <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-input
- v-model="queryParams.taskName"
- placeholder="请输入任务名称"
- clearable
- @keyup.enter.native="handleQuery"
- maxlength="50"
- />
- </el-form-item>
- <el-form-item label="调阅人员" prop="roleId">
- <el-select
- v-model="queryParams.roleId"
- placeholder="请选择调阅人员"
- clearable
- >
- <el-option
- v-for="item in roleList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="任务进度" prop="status">
- <el-select
- v-model="queryParams.status"
- placeholder="请选择进度"
- clearable
- >
- <el-option
- v-for="dict in dict.type.retrieval_task_status"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="任务时间" prop="planStartTime">
- <DataRangePicker
- type="daterange"
- value-format="yyyy-MM-dd HH:mm:ss"
- :default-time="['00:00:00', '23:59:59']"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- v-model="queryParams.dateRange"
- :picker-options="pickerOptions"
- >
- </DataRangePicker>
- </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-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"
- show-overflow-tooltip="true"
- />
- <el-table-column
- label="地区"
- align="center"
- prop="affiliatedArea"
- width="220"
- />
- <el-table-column
- label="行社名称"
- align="center"
- prop="affiliatedBank"
- width="220"
- />
- <el-table-column
- label="调阅机构"
- align="center"
- prop="orgName"
- width="220"
- />
- <el-table-column
- label="调阅人员"
- align="center"
- prop="roleName"
- width="160"
- />
- <el-table-column label="任务进度" align="center" prop="status">
- <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" width="300">
- <template slot-scope="scope">
- {{ scope.row.planStartTime }}~{{ scope.row.planEndTime }}
- </template>
- </el-table-column>
- <el-table-column
- label="异常数量"
- align="center"
- prop="exceptionCount"
- />
- <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
- >
- <el-button
- icon="el-icon-document-copy"
- type="text"
- v-if="scope.row.pdfUrl"
- @click="onDown(scope.row.pdfUrl)"
- >登记簿
- </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,
- getTask,
- delTask,
- addTask,
- updateTask,
- roleList,
- exportExcel,
- } from "@/api/core/task";
- import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
- import DialogInfo from "./dialog.info";
- 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", "retrieval_task_status"],
- data() {
- return {
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个停用
- single: true,
- // 非多个停用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 监控调阅任务表格数据
- taskList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- taskName: null,
- cycle: null,
- dateRange: [],
- planStartTime:null,
- status: null,
- roleId: null,
- checkSub: true,
- },
- selectedOrgName: "",
- // 表单参数
- form: {},
- // 表单校验
- rules: {},
- roleList: [],
- orgName: "",
- };
- },
- created() {
- this.queryParams.orgId = this.$store.getters.orgId;
- this.getList();
- this.initRoleList();
- },
- computed: {
- ...mapGetters(["orgId","orgName"]),
- },
- methods: {
- /** 查询监控调阅任务列表 */
- getList() {
- this.loading = true;
- listTask(this.queryParams).then((response) => {
- this.taskList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- /* handleExport() {
- console.log(this,'this')
- this.$http()
- .post('/core/task/export',this.queryParams)
- /!* exportExcel(this.queryParams).then(res => {
- let file = new File([res],res.getHeader())
- console.log(res,'res111')
- });*!/
- },*/
- async onDown(pdfUrl) {
- window.open(pdfUrl);
- },
- getDefaultOrg(org) {
- this.orgName = org.name;
- this.selectedOrgName = org.shortName;
- },
- initRoleList() {
- roleList({}).then((response) => {
- this.roleList = response.data;
- });
- },
- 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`
- );
- },
- statusColor(status) {
- let color = "";
- switch (status) {
- case "0":
- color = "#00B0F0";
- break;
- case "1":
- color = "#FFC000";
- break;
- case "2":
- color = "#00B050";
- break;
- case "3":
- color = "#FF0000";
- break;
- }
- return "color:" + color;
- },
- },
- };
- </script>
|