Pārlūkot izejas kodu

订阅页面完成

duwendi 1 gadu atpakaļ
vecāks
revīzija
536f88b5c8

+ 15 - 7
src/assets/css/element_ui.css

@@ -53,8 +53,8 @@
53 53
 
54 54
 .el-input-group>.el-input__inner {
55 55
   position: relative;
56
-  width: 220px;
57
-  height: 30px;
56
+  /*width: 220px;*/
57
+  height: 40px;
58 58
   font-size: 13px;
59 59
   padding: 0px 6px;
60 60
   background-color: transparent;
@@ -293,18 +293,26 @@
293 293
   padding-right: 5px;
294 294
 }
295 295
 
296
-.el-date-editor.el-input,
297
-.el-date-editor.el-input__inner {
298
-  width: 90px;
296
+/*.el-date-editor.el-input,*/
297
+/*.el-date-editor.el-input__inner {*/
298
+/*  width: 90px;*/
299
+/*}*/
300
+
301
+.el-date-editor .el-range-input {
302
+  background: transparent;
299 303
 }
300 304
 
301 305
 .el-picker-panel {
302 306
   color: #fff;
303
-  border: 1px solid #09f;
304
-  background: #060042;
307
+  /*border: 1px solid #09f;*/
308
+  background: #2d3744;
305 309
   margin: 5px 0;
306 310
 }
307 311
 
312
+.el-date-table td.in-range div, .el-date-table td.in-range div:hover, .el-date-table.is-week-mode .el-date-table__row.current div, .el-date-table.is-week-mode .el-date-table__row:hover div {
313
+  background: #747272;
314
+}
315
+
308 316
 .el-input--mini .el-input__inner {
309 317
   height: 25px;
310 318
   line-height: 25px;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 6 - 0
src/assets/u432.svg


+ 222 - 0
src/pages/index/components/credential_management_function.vue

@@ -0,0 +1,222 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-form class="form-wrapper" :inline="true" :model="formInline">
4
+      <el-row>
5
+        <el-col :span="8">
6
+          <el-form-item label="凭证名称">
7
+            <el-input v-model="formInline.credentialName" placeholder="请输入凭证"></el-input>
8
+          </el-form-item>
9
+        </el-col>
10
+        <el-col :span="8">
11
+          <el-form-item>
12
+            <el-button type="primary" @click="onSubmit">查询</el-button>
13
+          </el-form-item>
14
+        </el-col>
15
+      </el-row>
16
+    </el-form>
17
+    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
18
+      <el-table-column
19
+        label="序号"
20
+        type="index"
21
+        :index="indexMethod">
22
+      </el-table-column>
23
+      <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
24
+      </el-table-column>
25
+      <el-table-column
26
+        label="操作"
27
+        width="100">
28
+        <template slot-scope="scope">
29
+          <el-popconfirm title="确定删除吗?" @confirm="deleteRow(scope.row)">
30
+            <el-button type="danger" slot="reference">移除</el-button>
31
+          </el-popconfirm>
32
+        </template>
33
+      </el-table-column>
34
+    </el-table>
35
+    <div class="table-pagination">
36
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
37
+        :current-page.sync="pageNum" :page-size.sync="pageSize">
38
+      </el-pagination>
39
+    </div>
40
+    <el-dialog
41
+        title="审核"
42
+        :visible.sync="dialogVisible"
43
+        width="60%"
44
+        custom-class="audit-dialog">
45
+        <el-row class="mg-bt">
46
+            <el-col class="label" :span="4">审核:</el-col>
47
+            <el-col :span="18">
48
+                <el-radio v-model="radio" label="2">通过</el-radio>
49
+                <el-radio v-model="radio" label="3">驳回</el-radio>
50
+            </el-col>
51
+        </el-row>
52
+        <span slot="footer" class="dialog-footer">
53
+            <el-button @click="dialogVisible = false">取 消</el-button>
54
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
55
+        </span>
56
+    </el-dialog>
57
+  </div>
58
+</template>
59
+<script>
60
+import api from "@/api/audit.js";
61
+
62
+export default {
63
+    components: {},
64
+    data() {
65
+      return {
66
+        columns: [
67
+          {
68
+            label: '凭证ID',
69
+            key: 'resourceName'
70
+          },
71
+          {
72
+            label: '凭证名称',
73
+            key: 'resourceType'
74
+          },
75
+          {
76
+            label: '有效期',
77
+            key: 'applyTypeText'
78
+          }
79
+        ],
80
+        tableData: [],
81
+        total: 0,
82
+        pageSize: 10,
83
+        pageNum: 1,
84
+        radio: '2',
85
+        dialogVisible: false,
86
+        selRow: {},
87
+        formInline: {
88
+          credentialName: ''
89
+        }
90
+      }
91
+    },
92
+    mounted() {
93
+      this.getTableData()
94
+    },
95
+    watch: {
96
+    },
97
+    methods: {
98
+      indexMethod(index) {
99
+        return this.pageSize * (this.pageNum - 1) + index + 1
100
+      },
101
+      deleteRow (record) {
102
+        console.log(record, '11111')
103
+      },
104
+      handlePageChange() {
105
+        this.getTableData()
106
+      },
107
+      handleAudit(row) {
108
+        this.selRow = row
109
+        this.dialogVisible = true
110
+      },
111
+      handleCancelApply(row) {
112
+        console.log('enter handle cancel apply')
113
+      },
114
+      handleConfirm() {
115
+        const {id} = this.selRow
116
+        console.log('radio', this.radio)
117
+        api.applyResource({id, applyType: this.radio}).then(res => {
118
+          if(res.success) {
119
+            this.dialogVisible = false
120
+            this.$message({
121
+              message: '审核成功!',
122
+              type: 'success'
123
+            })
124
+            this.getTableData()
125
+          }
126
+        })
127
+      },
128
+      getTableData() {
129
+        const {pageNum, pageSize, searchWords} = this
130
+        api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
131
+          this.tableData = []
132
+          res.data.records.map((item, index) => {
133
+            const newItem = {...item}
134
+            newItem.applyTypeText = this.getApplyTypeText(item.applyType)
135
+            this.tableData.push(newItem)
136
+          })
137
+          this.total = res.data.total
138
+        })
139
+      },
140
+      getApplyTypeText(val) {
141
+        if (!val){
142
+          return '未申请'
143
+        }
144
+        const textMap = {
145
+          1: '待审批',
146
+          2: '审批通过',
147
+          3: '审批驳回'
148
+        }
149
+        return textMap[val]
150
+      },
151
+      handleSearch() {
152
+        this.pageNum = 1
153
+        this.getTableData()
154
+      }
155
+    }
156
+}
157
+</script>
158
+<style  lang="scss" scoped>
159
+.form-wrapper {
160
+  margin-bottom: 20px;
161
+}
162
+/deep/ .el-input__inner {
163
+  background: #2d3744;
164
+  border: none;
165
+  border-radius: 0;
166
+}
167
+/deep/ .el-select {
168
+  height: 40px;
169
+  .el-input__inner {
170
+    height: 40px;
171
+  }
172
+  .el-input__prefix, .el-input__suffix {
173
+    height: 40px;
174
+  }
175
+
176
+  /* 下面设置右侧按钮居中 */
177
+  .el-input__suffix {
178
+    top: 0px;
179
+    display: flex;
180
+    justify-content: center;
181
+    align-items: center;
182
+    flex-wrap: nowrap;
183
+    flex-direction: row;
184
+    align-content: flex-start;
185
+  }
186
+  /* 输入框加上上下边是 32px + 2px =34px */
187
+  .el-input__icon {
188
+    line-height: 0px;
189
+  }
190
+}
191
+/deep/ .form-wrapper .el-button {
192
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
193
+  width: 100px;
194
+  height: 40px;
195
+}
196
+.body-wrapper {
197
+  padding: 20px;
198
+  background: #0c0c0c;
199
+  .button-block{
200
+    text-align: right;
201
+    margin-bottom: 20px;
202
+  }
203
+  .table-pagination{
204
+    text-align: right;
205
+  }
206
+  .search-card{
207
+    margin-bottom: 20px;
208
+    text-align: center;
209
+    .input-wrapper{
210
+        width: 36%;
211
+    }
212
+  }
213
+}
214
+.audit-dialog{
215
+    .mg-bt{
216
+        margin-bottom: 24px;
217
+    }
218
+    .label{
219
+        text-align: right;
220
+    }
221
+}
222
+</style>

+ 232 - 0
src/pages/index/components/ip_white_list.vue

@@ -0,0 +1,232 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-form class="form-wrapper" :inline="true" :model="formInline">
4
+      <el-row>
5
+        <el-col :span="8">
6
+          <el-form-item label="IP地址">
7
+            <el-input v-model="formInline.ipUrl" placeholder="请输入"></el-input>
8
+          </el-form-item>
9
+        </el-col>
10
+        <el-col :span="8">
11
+          <el-form-item>
12
+            <el-button type="primary" class="query-btn" @click="onSubmit">查询</el-button>
13
+          </el-form-item>
14
+          <el-form-item>
15
+            <el-button type="success" @click="handleAdd">添加白名单</el-button>
16
+          </el-form-item>
17
+        </el-col>
18
+      </el-row>
19
+    </el-form>
20
+    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
21
+      <el-table-column
22
+        label="序号"
23
+        type="index"
24
+        :index="indexMethod">
25
+      </el-table-column>
26
+      <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
27
+      </el-table-column>
28
+      <el-table-column
29
+        label="操作"
30
+        width="200">
31
+        <template slot-scope="scope" style="display: inline-block">
32
+          <el-button type="primary" @click="handleAudit(scope.row)" slot="reference">修改</el-button>
33
+          <el-popconfirm title="确定删除吗?" @confirm="deleteRow(scope.row)">
34
+            <el-button type="danger" slot="reference">删除</el-button>
35
+          </el-popconfirm>
36
+        </template>
37
+      </el-table-column>
38
+    </el-table>
39
+    <div class="table-pagination">
40
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
41
+                     :current-page.sync="pageNum" :page-size.sync="pageSize">
42
+      </el-pagination>
43
+    </div>
44
+    <el-dialog
45
+      :title="title"
46
+      :visible.sync="dialogVisible"
47
+      width="60%"
48
+      custom-class="audit-dialog">
49
+      <el-form label-position="left" label-width="80px" :model="formLabelAlign">
50
+        <el-form-item label="IP地址">
51
+          <el-input v-model="formLabelAlign.ipUrl"></el-input>
52
+        </el-form-item>
53
+      </el-form>
54
+      <span slot="footer" class="dialog-footer">
55
+            <el-button @click="dialogVisible = false">取 消</el-button>
56
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
57
+        </span>
58
+    </el-dialog>
59
+  </div>
60
+</template>
61
+<script>
62
+import api from "@/api/audit.js";
63
+
64
+export default {
65
+  components: {},
66
+  data() {
67
+    return {
68
+      columns: [
69
+        {
70
+          label: 'IP地址',
71
+          key: 'resourceName'
72
+        },
73
+        {
74
+          label: '最后操作时间',
75
+          key: 'resourceType'
76
+        }
77
+      ],
78
+      tableData: [],
79
+      total: 0,
80
+      pageSize: 10,
81
+      pageNum: 1,
82
+      radio: '2',
83
+      dialogVisible: false,
84
+      formInline: {
85
+        ipUrl: ''
86
+      },
87
+      formLabelAlign: {
88
+        ipUrl: ''
89
+      },
90
+      selRow: undefined,
91
+      title: ''
92
+    }
93
+  },
94
+  mounted() {
95
+    this.getTableData()
96
+  },
97
+  watch: {
98
+  },
99
+  methods: {
100
+    handleAudit(row) {
101
+      this.title = '修改白名单'
102
+      this.formLabelAlign.ipUrl = row.resourceName
103
+      this.dialogVisible = true
104
+    },
105
+    indexMethod(index) {
106
+      return this.pageSize * (this.pageNum - 1) + index + 1
107
+    },
108
+    handleAdd () {
109
+      this.title = '添加白名单'
110
+      this.formLabelAlign.ipUrl = ''
111
+      this.dialogVisible = true
112
+    },
113
+    onSubmit () {
114
+      this.getTableData()
115
+    },
116
+    deleteRow (record) {
117
+      console.log(record)
118
+    },
119
+    handlePageChange() {
120
+      this.getTableData()
121
+    },
122
+    handleConfirm() {
123
+      api.applyResource({idUrl: this.ipUrl}).then(res => {
124
+        if(res.success) {
125
+          this.dialogVisible = false
126
+          this.$message({
127
+            message: '添加成功!',
128
+            type: 'success'
129
+          })
130
+          this.getTableData()
131
+        }
132
+      })
133
+    },
134
+    getTableData() {
135
+      const {pageNum, pageSize} = this
136
+      api.applyList({pageNum, pageSize, ipUrl: this.formInline.ipUrl}).then(res => {
137
+        this.tableData = []
138
+        res.data.records.map((item, index) => {
139
+          const newItem = {...item}
140
+          newItem.applyTypeText = this.getApplyTypeText(item.applyType)
141
+          this.tableData.push(newItem)
142
+        })
143
+        this.total = res.data.total
144
+      })
145
+    },
146
+    getApplyTypeText(val) {
147
+      if (!val){
148
+        return '未申请'
149
+      }
150
+      const textMap = {
151
+        1: '待审批',
152
+        2: '审批通过',
153
+        3: '审批驳回'
154
+      }
155
+      return textMap[val]
156
+    },
157
+    handleSearch() {
158
+      this.pageNum = 1
159
+      this.getTableData()
160
+    }
161
+  }
162
+}
163
+</script>
164
+<style  lang="scss" scoped>
165
+
166
+.form-wrapper {
167
+  margin-bottom: 20px;
168
+}
169
+/deep/ .el-input__inner {
170
+  background: #2d3744;
171
+  border: none;
172
+  border-radius: 0;
173
+}
174
+/deep/ .el-select {
175
+  height: 40px;
176
+  .el-input__inner {
177
+    height: 40px;
178
+  }
179
+  .el-input__prefix, .el-input__suffix {
180
+    height: 40px;
181
+  }
182
+
183
+  /* 下面设置右侧按钮居中 */
184
+  .el-input__suffix {
185
+    top: 0px;
186
+    display: flex;
187
+    justify-content: center;
188
+    align-items: center;
189
+    flex-wrap: nowrap;
190
+    flex-direction: row;
191
+    align-content: flex-start;
192
+  }
193
+  /* 输入框加上上下边是 32px + 2px =34px */
194
+  .el-input__icon {
195
+    line-height: 0px;
196
+  }
197
+}
198
+/deep/ .form-wrapper .el-button {
199
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
200
+  width: 100px;
201
+  height: 40px;
202
+}
203
+.body-wrapper {
204
+  padding: 20px;
205
+  background: #0c0c0c;
206
+  .button-block{
207
+    text-align: right;
208
+    margin-bottom: 20px;
209
+  }
210
+  .table-pagination{
211
+    text-align: right;
212
+  }
213
+  .search-card{
214
+    margin-bottom: 20px;
215
+    text-align: center;
216
+    .input-wrapper{
217
+      width: 36%;
218
+    }
219
+  }
220
+}
221
+.audit-dialog{
222
+  .mg-bt{
223
+    margin-bottom: 24px;
224
+  }
225
+  .label{
226
+    text-align: right;
227
+  }
228
+  /deep/ .el-input__inner{
229
+    background: white;
230
+  }
231
+}
232
+</style>

+ 38 - 13
src/pages/index/components/operation_log.vue

@@ -1,20 +1,42 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
3 3
     <el-form class="form-wrapper" :inline="true" :model="formInline">
4
-      <el-form-item label="审批人">
5
-        <el-input v-model="formInline.interfaceName" placeholder="审批人"></el-input>
6
-      </el-form-item>
7
-      <el-form-item label="活动区域">
8
-        <el-select v-model="formInline.region" placeholder="活动区域" class="cur-select">
9
-          <el-option label="区域一" value="shanghai"></el-option>
10
-          <el-option label="区域二" value="beijing"></el-option>
11
-        </el-select>
12
-      </el-form-item>
13
-      <el-form-item>
14
-        <el-button type="primary" @click="onSubmit">查询</el-button>
15
-      </el-form-item>
4
+      <el-row>
5
+        <el-col :span="8">
6
+          <el-form-item label="IP地址">
7
+            <el-input v-model="formInline.interfaceName" placeholder="请输入"></el-input>
8
+          </el-form-item>
9
+        </el-col>
10
+        <el-col :span="8">
11
+          <el-form-item label="日期">
12
+            <!--        <el-select v-model="formInline.region" placeholder="活动区域" class="cur-select">-->
13
+            <!--          <el-option label="区域一" value="shanghai"></el-option>-->
14
+            <!--          <el-option label="区域二" value="beijing"></el-option>-->
15
+            <!--        </el-select>-->
16
+            <el-date-picker
17
+              v-model="formInline.time"
18
+              type="daterange"
19
+              align="right"
20
+              unlink-panels
21
+              range-separator="-"
22
+              start-placeholder="开始日期"
23
+              end-placeholder="结束日期">
24
+            </el-date-picker>
25
+          </el-form-item>
26
+        </el-col>
27
+        <el-col :span="8">
28
+          <el-form-item>
29
+            <el-button type="primary" @click="onSubmit">查询</el-button>
30
+          </el-form-item>
31
+        </el-col>
32
+      </el-row>
16 33
     </el-form>
17 34
     <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
35
+      <el-table-column
36
+        label="序号"
37
+        type="index"
38
+        :index="indexMethod">
39
+      </el-table-column>
18 40
       <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
19 41
       </el-table-column>
20 42
       <el-table-column
@@ -77,7 +99,7 @@ export default {
77 99
       selRow: {},
78 100
       formInline: {
79 101
         interfaceName: '',
80
-        region: ''
102
+        time: ''
81 103
       }
82 104
     }
83 105
   },
@@ -87,6 +109,9 @@ export default {
87 109
   watch: {
88 110
   },
89 111
   methods: {
112
+    indexMethod(index) {
113
+      return this.pageSize * (this.pageNum - 1) + index + 1
114
+    },
90 115
     handlePageChange() {
91 116
       this.getTableData()
92 117
     },

+ 143 - 0
src/pages/index/components/service_call_function.vue

@@ -0,0 +1,143 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-form class="form-wrapper" :model="ruleForm">
4
+      <el-form-item label="接口地址" prop="interfaceName">
5
+        <el-input v-model="ruleForm.interfaceName" placeholder="接口地址"></el-input>
6
+      </el-form-item>
7
+      <el-form-item label="accessKey" prop="accessKey">
8
+        <el-input v-model="ruleForm.accessKey" placeholder="接口地址"></el-input>
9
+      </el-form-item>
10
+      <el-form-item label="公钥" prop="publicKey">
11
+        <el-input v-model="ruleForm.publicKey" placeholder="接口地址"></el-input>
12
+      </el-form-item>
13
+      <el-form-item style="text-align: center;margin-top: 20px;">
14
+        <el-button type="primary" @click="submitForm('ruleForm')">调用接口</el-button>
15
+      </el-form-item>
16
+    </el-form>
17
+  </div>
18
+</template>
19
+<script>
20
+import api from "@/api/audit.js";
21
+
22
+export default {
23
+  components: {},
24
+  data() {
25
+    return {
26
+      columns: [
27
+        {
28
+          label: '日期',
29
+          key: 'resourceName'
30
+        },
31
+        {
32
+          label: '操作',
33
+          key: 'resourceType'
34
+        },
35
+        {
36
+          label: '用户',
37
+          key: 'userName'
38
+        },
39
+        {
40
+          label: '详情',
41
+          key: 'applyTypeText'
42
+        },
43
+        {
44
+          label: 'IP地址',
45
+          key: 'applyTypeText'
46
+        }
47
+      ],
48
+      tableData: [],
49
+      total: 0,
50
+      pageSize: 10,
51
+      pageNum: 1,
52
+      radio: '2',
53
+      dialogVisible: false,
54
+      selRow: {},
55
+      ruleForm: {
56
+        interfaceName: '',
57
+        time: ''
58
+      }
59
+    }
60
+  },
61
+  mounted() {
62
+  },
63
+  watch: {
64
+  },
65
+  methods: {
66
+    submitForm(formName) {
67
+      this.$refs[formName].validate((valid) => {
68
+        if (valid) {
69
+          alert('submit!');
70
+        } else {
71
+          console.log('error submit!!');
72
+          return false;
73
+        }
74
+      });
75
+    },
76
+    resetForm(formName) {
77
+      this.$refs[formName].resetFields();
78
+    }
79
+  }
80
+}
81
+</script>
82
+<style  lang="scss" scoped>
83
+.form-wrapper {
84
+  margin-bottom: 20px;
85
+}
86
+/deep/ .el-input__inner {
87
+  background: #2d3744;
88
+  border: none;
89
+  border-radius: 0;
90
+}
91
+/deep/ .el-select {
92
+  height: 40px;
93
+  .el-input__inner {
94
+    height: 40px;
95
+  }
96
+  .el-input__prefix, .el-input__suffix {
97
+    height: 40px;
98
+  }
99
+
100
+  /* 下面设置右侧按钮居中 */
101
+  .el-input__suffix {
102
+    top: 0px;
103
+    display: flex;
104
+    justify-content: center;
105
+    align-items: center;
106
+    flex-wrap: nowrap;
107
+    flex-direction: row;
108
+    align-content: flex-start;
109
+  }
110
+  /* 输入框加上上下边是 32px + 2px =34px */
111
+  .el-input__icon {
112
+    line-height: 0px;
113
+  }
114
+}
115
+/deep/ .form-wrapper .el-button {
116
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
117
+  width: 100px;
118
+  height: 40px;
119
+}
120
+.body-wrapper {
121
+  padding: 20px;
122
+  background: #0c0c0c;
123
+  .button-block{
124
+    text-align: right;
125
+    margin-bottom: 20px;
126
+  }
127
+  .table-pagination{
128
+    text-align: right;
129
+  }
130
+}
131
+.audit-dialog{
132
+  .mg-bt{
133
+    margin-bottom: 24px;
134
+  }
135
+  .label{
136
+    text-align: right;
137
+  }
138
+}
139
+/deep/ .el-textarea.is-disabled .el-textarea__inner {
140
+  background: #2a2a2a;
141
+  color: #fff;
142
+}
143
+</style>

+ 222 - 0
src/pages/index/components/service_subscription_function.vue

@@ -0,0 +1,222 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-form class="form-wrapper" :inline="true" :model="formInline">
4
+      <el-row>
5
+        <el-col :span="8">
6
+          <el-form-item label="服务名称">
7
+            <el-input v-model="formInline.serviceName" placeholder="请输入"></el-input>
8
+          </el-form-item>
9
+        </el-col>
10
+        <el-col :span="8">
11
+          <el-form-item>
12
+            <el-button type="primary" @click="onSubmit">查询</el-button>
13
+          </el-form-item>
14
+        </el-col>
15
+      </el-row>
16
+    </el-form>
17
+    <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
18
+      <el-table-column
19
+        label="序号"
20
+        type="index"
21
+        :index="indexMethod">
22
+      </el-table-column>
23
+      <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
24
+      </el-table-column>
25
+      <el-table-column
26
+        label="操作"
27
+        width="100">
28
+        <template slot-scope="scope">
29
+          <el-popconfirm title="确定订阅吗?" @confirm="subscribeRow(scope.row)">
30
+            <el-button type="success" slot="reference">订阅</el-button>
31
+          </el-popconfirm>
32
+        </template>
33
+      </el-table-column>
34
+    </el-table>
35
+    <div class="table-pagination">
36
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
37
+        :current-page.sync="pageNum" :page-size.sync="pageSize">
38
+      </el-pagination>
39
+    </div>
40
+    <el-dialog
41
+        title="审核"
42
+        :visible.sync="dialogVisible"
43
+        width="60%"
44
+        custom-class="audit-dialog">
45
+        <el-row class="mg-bt">
46
+            <el-col class="label" :span="4">审核:</el-col>
47
+            <el-col :span="18">
48
+                <el-radio v-model="radio" label="2">通过</el-radio>
49
+                <el-radio v-model="radio" label="3">驳回</el-radio>
50
+            </el-col>
51
+        </el-row>
52
+        <span slot="footer" class="dialog-footer">
53
+            <el-button @click="dialogVisible = false">取 消</el-button>
54
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
55
+        </span>
56
+    </el-dialog>
57
+  </div>
58
+</template>
59
+<script>
60
+import api from "@/api/audit.js";
61
+
62
+export default {
63
+    components: {},
64
+    data() {
65
+      return {
66
+        columns: [
67
+          {
68
+            label: '服务名称',
69
+            key: 'resourceName'
70
+          },
71
+          {
72
+            label: '状态',
73
+            key: 'applyTypeText'
74
+          }
75
+        ],
76
+        tableData: [],
77
+        total: 0,
78
+        pageSize: 10,
79
+        pageNum: 1,
80
+        radio: '2',
81
+        dialogVisible: false,
82
+        selRow: {},
83
+        formInline: {
84
+          serviceName: ''
85
+        }
86
+      }
87
+    },
88
+    mounted() {
89
+      this.getTableData()
90
+    },
91
+    watch: {
92
+    },
93
+    methods: {
94
+      indexMethod(index) {
95
+        return this.pageSize * (this.pageNum - 1) + index + 1
96
+      },
97
+      onSubmit () {
98
+        console.log(this.formInline)
99
+      },
100
+      subscribeRow (record) {
101
+        console.log(record)
102
+      },
103
+      handlePageChange() {
104
+        this.getTableData()
105
+      },
106
+      handleAudit(row) {
107
+        this.selRow = row
108
+        this.dialogVisible = true
109
+      },
110
+      handleCancelApply(row) {
111
+        console.log('enter handle cancel apply')
112
+      },
113
+      handleConfirm() {
114
+        const {id} = this.selRow
115
+        console.log('radio', this.radio)
116
+        api.applyResource({id, applyType: this.radio}).then(res => {
117
+          if(res.success) {
118
+            this.dialogVisible = false
119
+            this.$message({
120
+              message: '审核成功!',
121
+              type: 'success'
122
+            })
123
+            this.getTableData()
124
+          }
125
+        })
126
+      },
127
+      getTableData() {
128
+        const {pageNum, pageSize, searchWords} = this
129
+        api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
130
+          this.tableData = []
131
+          res.data.records.map((item, index) => {
132
+            const newItem = {...item}
133
+            newItem.applyTypeText = this.getApplyTypeText(item.applyType)
134
+            this.tableData.push(newItem)
135
+          })
136
+          this.total = res.data.total
137
+        })
138
+      },
139
+      getApplyTypeText(val) {
140
+        if (!val){
141
+          return '未申请'
142
+        }
143
+        const textMap = {
144
+          1: '待审批',
145
+          2: '审批通过',
146
+          3: '审批驳回'
147
+        }
148
+        return textMap[val]
149
+      },
150
+      handleSearch() {
151
+        this.pageNum = 1
152
+        this.getTableData()
153
+      }
154
+    }
155
+}
156
+</script>
157
+<style  lang="scss" scoped>
158
+
159
+.form-wrapper {
160
+  margin-bottom: 20px;
161
+}
162
+/deep/ .el-input__inner {
163
+  background: #2d3744;
164
+  border: none;
165
+  border-radius: 0;
166
+}
167
+/deep/ .el-select {
168
+  height: 40px;
169
+  .el-input__inner {
170
+    height: 40px;
171
+  }
172
+  .el-input__prefix, .el-input__suffix {
173
+    height: 40px;
174
+  }
175
+
176
+  /* 下面设置右侧按钮居中 */
177
+  .el-input__suffix {
178
+    top: 0px;
179
+    display: flex;
180
+    justify-content: center;
181
+    align-items: center;
182
+    flex-wrap: nowrap;
183
+    flex-direction: row;
184
+    align-content: flex-start;
185
+  }
186
+  /* 输入框加上上下边是 32px + 2px =34px */
187
+  .el-input__icon {
188
+    line-height: 0px;
189
+  }
190
+}
191
+/deep/ .form-wrapper .el-button {
192
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
193
+  width: 100px;
194
+  height: 40px;
195
+}
196
+.body-wrapper {
197
+  padding: 20px;
198
+  background: #0c0c0c;
199
+  .button-block{
200
+    text-align: right;
201
+    margin-bottom: 20px;
202
+  }
203
+  .table-pagination{
204
+    text-align: right;
205
+  }
206
+  .search-card{
207
+    margin-bottom: 20px;
208
+    text-align: center;
209
+    .input-wrapper{
210
+        width: 36%;
211
+    }
212
+  }
213
+}
214
+.audit-dialog{
215
+    .mg-bt{
216
+        margin-bottom: 24px;
217
+    }
218
+    .label{
219
+        text-align: right;
220
+    }
221
+}
222
+</style>

+ 5 - 4
src/pages/index/layouts/indexLayout.vue

@@ -66,8 +66,6 @@ export default {
66 66
         {name: '运营停车场主题', url: '/parking_operate'},
67 67
         {name: '区域停车主题', url: '/parking_area'},
68 68
         {name: '设备运营主题', url: '/service_operations'},
69
-        {name: '操作日志', url: '/operation_log'},
70
-<<<<<<< Updated upstream
71 69
         {name: '停车饱和预警', url: '/saturation_warning'},
72 70
         {name: '停车缺口分析', url: '/gap_analysis'},
73 71
         {name: '停车难易指数', url: '/park_easy'},
@@ -78,12 +76,15 @@ export default {
78 76
         {name: '服务发布功能', url: '/service_publish'},
79 77
         {name: '公告功能', url: '/announcement_function'},
80 78
         {name: '消息中心功能', url: '/message'},
81
-=======
82 79
         {name: '泊位使用情况', url: '/berths_usage'},
83 80
         {name: '泊位营收情况', url: '/berths_revenue'},
84 81
         {name: '泊位营收情况', url: '/parking_lot_situation'},
85 82
         {name: '其他分析', url: '/other_analyse'},
86
->>>>>>> Stashed changes
83
+        {name: '凭证管理功能', url: '/credential_management_function'},
84
+        {name: '服务订阅功能', url: '/service_subscription_function'},
85
+        {name: 'IP白名单功能', url: '/ip_white_list'},
86
+        {name: '服务调用功能', url: '/service_call_function'},
87
+        {name: '操作日志功能', url: '/operation_log'},
87 88
       ]
88 89
     }
89 90
   },

+ 22 - 3
src/router/index.js

@@ -175,7 +175,6 @@ export default new Router({
175 175
           component: () => import("../pages/index/components/operation_log.vue")
176 176
         },
177 177
         {
178
-<<<<<<< Updated upstream
179 178
           name: "saturation_warning",
180 179
           path: "/saturation_warning",
181 180
           component: () => import("../pages/index/components/saturation_warning.vue")
@@ -224,7 +223,8 @@ export default new Router({
224 223
           name: "message",
225 224
           path: "/message",
226 225
           component: () => import("../pages/index/components/message.vue")
227
-=======
226
+        },
227
+        {
228 228
           name: "berths_usage",
229 229
           path: "/berths_usage",
230 230
           component: () => import("../pages/index/components/berths_usage.vue")
@@ -243,7 +243,26 @@ export default new Router({
243 243
           name: "other_analyse",
244 244
           path: "/other_analyse",
245 245
           component: () => import("../pages/index/components/other_analyse.vue")
246
->>>>>>> Stashed changes
246
+        },
247
+        {
248
+          name: "service_call_function",
249
+          path: "/service_call_function",
250
+          component: () => import("../pages/index/components/service_call_function.vue")
251
+        },
252
+        {
253
+          name: "ip_white_list",
254
+          path: "/ip_white_list",
255
+          component: () => import("../pages/index/components/ip_white_list.vue")
256
+        },
257
+        {
258
+          name: "service_subscription_function",
259
+          path: "/service_subscription_function",
260
+          component: () => import("../pages/index/components/service_subscription_function.vue")
261
+        },
262
+        {
263
+          name: "credential_management_function",
264
+          path: "/credential_management_function",
265
+          component: () => import("../pages/index/components/credential_management_function.vue")
247 266
         },
248 267
       ]
249 268
     }