import axios from "./index.js"
//page:分页页码  seach：搜索条件   idNo:工作流图流程key
//通用方法待办
export function getTodoBase(page, seach, idNo) {
    return axios({
        url: "/market/waf/queryTodoBase",
        method: "post",
        method: "post",
        headers: {
            "Content-Type": "application/json",
            page: '{"pageNo":"' + page + '","pageSize":"10"}',
        },
        data: idNo,
    })
}
//通用方法已办
export function getDoneBase(page, seach, idNo) {
    return axios({
        url: "/market/waf/queryDoneBase",
        method: "post",
        method: "post",
        headers: {
            "Content-Type": "application/json",
            page: '{"pageNo":"' + page + '","pageSize":"10"}',
        },
        data: idNo,
    })
}
//通用方法待阅
export function queryReadBase(page, seach, idNo) {
    return axios({
        url: "/market/waf/queryReadBase",
        method: "post",
        method: "post",
        headers: {
            "Content-Type": "application/json",
            page: '{"pageNo":"' + page + '","pageSize":"10"}',
        },
        data: idNo,
    })
}
//通用方法已阅
export function queryReadDoneBase(page, seach, idNo) {
    return axios({
        url: "/market/waf/queryReadDoneBase",
        method: "post",
        method: "post",
        headers: {
            "Content-Type": "application/json",
            page: '{"pageNo":"' + page + '","pageSize":"10"}',
        },
        data: idNo,
    })
}
//通用方法发起
export function getInitiateBase(page, seach, idNo) {
    return axios({
        url: "/market/waf/queryInitiateBase",
        method: "post",
        method: "post",
        headers: {
            "Content-Type": "application/json",
            page: '{"pageNo":"' + page + '","pageSize":"10"}',
        },
        data: idNo,
    })
}
//通用更新方法
export function updateBase(e) {
    return axios({
        url: "/market/waf/updateBase",
        method: "post",
        headers: {
            "Content-Type": "application/json",
        },
        data: e,
    })
}
export function getNowdata(e) {
    let yy = new Date().getFullYear()
    let mm = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
    let dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
    let hh = new Date().getHours()< 10 ? '0' + new Date().getHours() : new Date().getHours()
    let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
    let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
    let time = yy + e.a + mm + e.a + dd + e.b + hh + e.c + mf + e.c + ss
    return time
}
export default { getTodoBase, getDoneBase, getInitiateBase, updateBase, getNowdata, queryReadBase,queryReadDoneBase };