longyvfengyun
2023-12-25 d8d792a6842832e8f6af6604274c438b25053afe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
import axios from 'axios'
export default {
    /**
     * 查询状态信息
     *  无参
     */
    searchStatus() {
        return axios({
            method: 'post',
            url: 'PageParamAction!findByCategoryId',
            data: 'json='+JSON.stringify({categoryId:1})
        });
    },
    /**
     * 查询控制信息
     *  无参
     */
    searchControl() {
        return axios({
            method: 'post',
            url: 'PageParamAction!findByCategoryId',
            data: 'json='+JSON.stringify({categoryId:2})
        });
    },
    /**
     * 查询控制信息
     *  无参
     */
    searchConfig() {
        return axios({
            method: 'post',
            url: 'PageParamAction!findByCategoryId',
            data: 'json='+JSON.stringify({categoryId:2})
        });
    },
    /**
     * 批量添加
     *
     * @param   {Array}  list  id的集合
     *
     */
    add(list) {
        // 处理数据,格式化成需要的数据
        let searchParams = list.map(item=>{
            return {
                id: item,
                status: 1,
            }
        });
        // 请求后台
        return axios({
            method: 'post',
            url: 'PageParamAction!batchUpdate',
            data: 'json='+JSON.stringify(searchParams)
        });
    },
    /**
     * 批量移除
     *
     * @param   {Array}  list  id的集合
     *
     */
    remove(list) {
        // 处理数据,格式化成需要的数据
        let searchParams = list.map(item=>{
            return {
                id: item,
                status: 0,
            }
        });
        // 请求后台
        return axios({
            method: 'post',
            url: 'PageParamAction!batchUpdate',
            data: 'json='+JSON.stringify(searchParams)
        });
    },
    searchVersion() {
        return axios({
            method: 'post',
            url: 'PageParamAction!findByCategoryId',
            data: 'json='+JSON.stringify({categoryId:6})
        });
    },
    searchName() {
        return axios({
            method: 'post',
            url: 'PageParamAction!findByCategoryId',
            data: 'json='+JSON.stringify({categoryId:5})
        });
    },
    searchParam(data) {
        return axios({
            method: 'post',
            url: 'PageParamAction!findByCategoryId',
            data: 'json='+JSON.stringify(data)
        });
    },
    updateParam(data) {
        return axios({
            method: 'post',
            url: 'PageParamAction!updateParamById',
            data: 'json='+JSON.stringify(data)
        });
    },
    updateStatus(data) {
        return axios({
            method: 'post',
            url: 'PageParamAction!update',
            data: 'json='+JSON.stringify(data)
        });
    },
 
    /**
     * 获取实时页面的标签页配置
     * @returns {AxiosPromise}
     */
    getRealTabsConfig(type) {
        type = type?type:1;
        return axios({
            method: 'post',
            url: 'PageParamUserAction!getAll',
            data: "json="+JSON.stringify({
                type,
            })
        });
    },
 
    /**
     * 设置实时页面的标签页配置
     * @param data  设置的数据
     * @returns {AxiosPromise}
     */
    addRealTabConfig(data) {
        return axios({
            method: 'post',
            url: 'PageParamUserAction!saveAll',
            data: 'json='+JSON.stringify(data)
        });
    },
    /**
     * 查询参数
     * @returns {AxiosPromise}
     */
    searchPageParam2() {
        return axios({
            method: 'post',
            url: 'PageParam2Action!getVisitSet',
            data: 'json='+JSON.stringify({categoryId:1})
        });
    },
    /**
     * 更新参数数据
     * @param data
     * @returns {AxiosPromise}
     */
    updatePageParam2(data) {
        return axios({
            method: 'post',
            url: 'PageParam2Action!updateVisitSet',
            data: 'json='+JSON.stringify(data)
        });
    },
    /**
     * 查询审计容量数
     * @returns {AxiosPromise}
     */
    searchAuditCapNumber() {
        return axios({
            method: 'post',
            url: 'PageParam2Action!getAuditCap',
            data: null
        });
    },
    /**
     * 更新审计容量数据
     * @param value 审计容量数
     * @returns {AxiosPromise}
     */
    updateAuditCapNumber(value) {
        return axios({
            method: 'post',
            url: 'PageParam2Action!updateAuditCap',
            data: "json="+JSON.stringify({
                value
            })
        });
    }
}