From c819024e241b9f7c54cc3786373ad0d2998f2190 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 05 五月 2023 08:55:46 +0800
Subject: [PATCH] 修改

---
 src/api/sgyhpczl/hiddenDangerManagement.js |  183 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 177 insertions(+), 6 deletions(-)

diff --git a/src/api/sgyhpczl/hiddenDangerManagement.js b/src/api/sgyhpczl/hiddenDangerManagement.js
index 97f91fa..20b710d 100644
--- a/src/api/sgyhpczl/hiddenDangerManagement.js
+++ b/src/api/sgyhpczl/hiddenDangerManagement.js
@@ -1,15 +1,186 @@
 import request from '@/utils/request';
 import {getTokenAndVerify} from "@/api/sgyhpczl/auth";
+import {getToken} from '@/utils/auth'
 
 
-export function getPageList(params) {
+export function getPageList(data) {
+    var arr = []
+    /*编号*/
+    if (data.form.number != null && data.form.number != '') {
+        arr.push({field: "number", value: data.form.number, type: 'TXT'})
+    }
+    /*检查人*/
+    if (data.form.check_man != null && data.form.check_man != '') {
+        arr.push({field: "check_man", value: data.form.check_man, type: 'TXT'})
+    }
+    /*隐患单位*/
+    if (data.form.ht_branch != null && data.form.ht_branch != '') {
+        arr.push({field: "ht_branch", value: data.form.ht_branch, type: 'TXT'})
+    }
+    /*隐患类别*/
+    if (data.form.ht_typesub != null && data.form.ht_typesub != '') {
+        arr.push({field: "ht_typesub", value: data.form.ht_typesub, type: 'OPT'})
+    }
+    /*隐患级别*/
+    if (data.form.ht_level != null && data.form.ht_level != '') {
+        arr.push({field: "ht_level", value: data.form.ht_level, type: 'OPT'})
+    }
+    /*隐患来源*/
+    if (data.form.qdJyfsId != null && data.form.qdJyfsId != '') {
+        arr.push({field: "qdJyfsId", value: data.form.qdJyfsId, type: 'NOT'})
+    }
+    /*隐患地点*/
+    if (data.form.address != null && data.form.address != '') {
+        arr.push({field: "address", value: data.form.address, type: 'TXT'})
+    }
+    /*隐患内容*/
+    if (data.form.ht_content != null && data.form.ht_content != '') {
+        arr.push({field: "ht_content", value: data.form.ht_content, type: 'TXT'})
+    }
+    /*班次*/
+    if (data.form.check_class != null && data.form.check_class != '') {
+        arr.push({field: "check_class", value: data.form.check_class, type: 'OPT'})
+    }
+    /*整改状态*/
+    if (data.form.alter_status != null && data.form.alter_status != '') {
+        arr.push({field: "alter_status", value: data.form.alter_status, type: 'OPT'})
+    }
+    /*是否关联*/
+    if(data.form.DTRisk_bankId!=null){
+        arr.push({field: "DTRisk_bankId", value: data.form.DTRisk_bankId, type: 'OPT'})
+    }
+    /*检查时间*/
+    if (data.form.check_dateStart != null && data.form.check_dateStart != '' && data.form.check_dateEnd != null && data.form.check_dateEnd != '') {
+        arr.push({field: "check_date", value: data.form.check_dateStart + "至" + data.form.check_dateEnd, type: 'DAT'})
+
+    }
+    /*限改时间*/
+    if (data.form.alter_timeStart != null && data.form.alter_timeStart != '' && data.form.alter_timeEnd != null && data.form.alter_timeEnd != '') {
+        arr.push({field: "alter_time", value: data.form.alter_timeStart + "至" + data.form.alter_timeEnd, type: 'DAT'})
+
+    }
+    data.query_condition = arr
     return request({
-        headers:{
+        headers: {
             'token': getTokenAndVerify().token,
-            'verify':getTokenAndVerify().verify
+            'verify': getTokenAndVerify().verify
         },
-        contentType: "multipart/form-data",
-        url: "/taboi/danger/self_list?page="+1+"&limit="+10,
-        method: 'GET',
+        url: "/taboi/danger/self_list",
+        contentType: "application/json",
+        method: 'POST',
+        data
     });
 }
+
+export function saveSelfDanger(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: "/taboi/danger/self_save_do",
+        contentType: "application/json",
+        method: 'POST',
+        data
+    });
+}
+
+export function self_export_do(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/excel/self_export_do',
+        method: 'post',
+        responseType: 'arraybuffer',
+        data
+    });
+}
+
+export function self_template() {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/download/self_template',
+        method: 'get',
+        responseType: 'arraybuffer',
+    });
+}
+
+export function self_import_do(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/excel/self_import_do',
+        method: 'post',
+        data
+    })
+}
+
+
+export function self_del_do(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/danger/self_del_do?id=' + data,
+        method: 'post',
+        data
+    })
+}
+export function self_revoke(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/danger/self_revoke?id=' + data,
+        method: 'post',
+        data
+    })
+}
+
+
+export function self_edit_do(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/danger/self_edit_do',
+        method: 'post',
+        data
+    })
+}
+
+export function getUserInfo() {
+    return request({
+        headers: {
+            'Authorization': getToken()
+        },
+        url:  '/auth/verify',
+        method: 'get',
+        data: { 'token': getToken(), 'action': 'getUserInfo' }
+    })
+}
+
+export function self_info(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/danger/self_info?id=' + data,
+        method: 'post',
+        data
+    })
+}
+
+
+

--
Gitblit v1.9.2