浏览代码

合并风险监控两个状态页面

liu1tian 11 月之前
父节点
当前提交
ab9c802aa2

+ 21 - 0
src/router/index.js

@@ -321,6 +321,27 @@ export const constantRoutes = [
     component: () => import('@/views/business/as/after-sales/user/index'),
     hidden: true,
   },
+  // 风险监控
+  {
+    path: '/ctyc/info/approvalMain',
+    name: "ApprovalMain",
+    component: () => import('@/views/ctyc/info/approvalMain'),
+    hidden: true,
+  },
+  // 风险监控-待审阅
+  {
+    path: '/ctyc/info/approval',
+    name: "Approval",
+    component: () => import('@/views/ctyc/info/approval'),
+    hidden: true,
+  },
+  // 风险监控-已审阅
+  {
+    path: '/ctyc/info/approved',
+    name: "Approved",
+    component: () => import('@/views/ctyc/info/approved'),
+    hidden: true,
+  },
 ]
 
 

+ 10 - 0
src/views/ctyc/info/approval.vue

@@ -53,6 +53,16 @@
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" />
       <el-table-column label="监控人员" align="center" prop="monitorByName" />
+      <el-table-column label="操作" align="center">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleInfo(scope.row)"
+          >待审阅</el-button>
+        </template>
+      </el-table-column> 
     </el-table>
     
     <pagination

+ 38 - 0
src/views/ctyc/info/approvalMain.vue

@@ -0,0 +1,38 @@
+<template>
+  <div class="app-container">
+    <el-tabs v-model="activeName" >
+      <el-tab-pane label="待审阅" name="approval"></el-tab-pane>
+      <el-tab-pane label="已审阅" name="approved"></el-tab-pane>
+    </el-tabs>
+    <component :is="currentPage"></component>
+  </div>
+</template>
+
+<script>
+import approval from '@/views/ctyc/info/approval';
+import approved from '@/views/ctyc/info/approved';
+export default {
+  name: "tabs",
+  data() {
+    return {
+      activeName: 'approval' // 默认激活第一个标签
+    };
+  },
+  created() {
+    
+  },
+  methods: {
+    
+  },
+  components:{
+    approval,
+    approved
+  },
+  computed: {
+    // 计算属性返回当前应该显示的组件
+    currentPage() {
+      return this.activeName;
+    }
+  }
+};
+</script>

+ 0 - 287
src/views/ctyc/info/approved copy.vue

@@ -1,287 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      
-      <el-form-item label="企业名称" prop="companyName">
-        <el-input
-          v-model="queryParams.companyName"
-          placeholder="请输入企业名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-     <el-form-item label="审阅时间" prop="approvalTimes">
-      <el-date-picker
-        v-model="queryParams.approvalTimes"
-        type="datetimerange"
-        @keyup.enter.native="handleQuery"
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期">
-      </el-date-picker>
-    </el-form-item>
-      <el-form-item label="监控人员" prop="monitorByName">
-        <el-input
-          v-model="queryParams.monitorByName"
-          placeholder="请输入监控人员名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-
-      <el-form-item label="风险等级" prop="approvalLevel">
-        <el-select
-                clearable
-                v-model="queryParams.approvalLevel"
-                :size="size"
-                style="width: 200px"
-              >
-                <el-option
-                  v-for="level in levels"
-                  :key="level.value"
-                  :label="level.label"
-                  :value="level.value"
-                >
-                </el-option>
-              </el-select>
-      </el-form-item>
-
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <h4><span>&nbsp;&nbsp;&nbsp;备注: 风险A:风险较低,不影响继续合作; 风险B:风险一般,建议人工了解; 风险C:风险较高,可能影响合作。</span></h4>
-
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="企业名称" align="center" prop="companyName" />
-      <el-table-column label="新企业名称" align="center" prop="newCompanyName" />
-      <el-table-column label="企业风险预警" align="center" prop="riskRemark" />
-      <el-table-column label="人工审阅等级" align="center" prop="approvalLevel" />
-      <el-table-column label="审阅意见" align="center" prop="approvalRemark" />
-      <el-table-column label="审阅人" align="center" prop="approvalByName" />
-      <el-table-column label="审阅时间" align="center" prop="approvalTime" />
-    </el-table>
-    
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!--修改合作企业对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="企业名称" prop="companyName">
-          <el-input v-model="form.companyName" disabled="true" />
-        </el-form-item>
-        <el-form-item label="监控人员名称" prop="monitorByName">
-          <el-input v-model="form.monitorByName" placeholder="请输入监控人员名称" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/ctyc/info";
-
-export default {
-  name: "Info",
-  data() {
-    return {
-      // 风险等级
-      levels: [{
-          value: '',
-          label: '全部'
-        }, {
-          value: 'A',
-          label: 'A'
-        }, {
-          value: 'B',
-          label: 'B'
-        }, {
-          value: 'C',
-          label: 'C'
-        }],
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 合作企业表格数据
-      infoList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        companyId: null,
-        companyName: null,
-        newCompanyName: null,
-        monitorBy: null,
-        monitorByName: null,
-        revision: null,
-        tenantId: null,
-        approvalLevel: null,
-        approvalRemark: null,
-        approvalBy: null,
-        approvalByName: null,
-        approvalTime: null,
-        status: 1,
-        approvalTimes: '',
-        approvalTimeStart: '',
-        approvalTimeEnd: ''
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询合作企业列表 */
-    getList() {
-      this.loading = true;
-      if(this.queryParams.approvalTimes != null && this.queryParams.approvalTimes != ''){
-        this.queryParams.approvalTimeStart = new Date(this.queryParams.approvalTimes[0]).toLocaleString();
-        this.queryParams.approvalTimeEnd = new Date(this.queryParams.approvalTimes[1]).toLocaleString();
-      }
-      listInfo(this.queryParams).then(response => {
-        this.infoList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-        this.queryParams.approvalTimeStart = '';
-        this.queryParams.approvalTimeEnd = '';
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        companyId: null,
-        companyName: null,
-        newCompanyName: null,
-        monitorBy: null,
-        monitorByName: null,
-        revision: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        delFlag: null,
-        tenantId: null,
-        approvalLevel: null,
-        approvalRemark: null,
-        approvalBy: null,
-        approvalByName: null,
-        approvalTime: null,
-        status: 1,
-        approvalTimes: '',
-        approvalTimeStart: '',
-        approvalTimeEnd: ''
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      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 = "添加合作企业";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getInfo(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改合作企业";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateInfo(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addInfo(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除合作企业编号为"' + ids + '"的数据项?').then(function() {
-        return delInfo(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('ctyc/info/export', {
-        ...this.queryParams
-      }, `info_${new Date().getTime()}.xlsx`)
-    }
-  }
-};
-</script>

+ 10 - 0
src/views/ctyc/info/approved.vue

@@ -74,6 +74,16 @@
       <el-table-column label="审阅意见" align="center" prop="approvalRemark" />
       <el-table-column label="审阅人" align="center" prop="approvalByName" />
       <el-table-column label="审阅时间" align="center" prop="approvalTime" />
+      <el-table-column label="操作" align="center" >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleInfo(scope.row)"
+          >已审阅</el-button>
+        </template>
+      </el-table-column>
     </el-table>
     
     <pagination