Browse Source

样式调整

duwendi 1 year ago
parent
commit
3191c18f89

+ 1 - 2
src/pages/index/components/announcement_function.vue

@@ -190,11 +190,10 @@ export default {
190 190
   }
191 191
   .form-div{
192 192
     /deep/ .el-input__inner{
193
-      background: white;
194 193
       height: 35px;
195 194
       width: 90%;
196 195
       border: 1px solid #a6a5a5;
197
-      color: black;
196
+      color: #fff;
198 197
     }
199 198
   }
200 199
 }

+ 83 - 63
src/pages/index/components/credential_management_function.vue

@@ -10,6 +10,9 @@
10 10
         <el-col :span="8">
11 11
           <el-form-item>
12 12
             <el-button type="primary" @click="onSubmit">查询</el-button>
13
+            <el-form-item>
14
+              <el-button type="success" @click="handleAdd">添加凭证</el-button>
15
+            </el-form-item>
13 16
           </el-form-item>
14 17
         </el-col>
15 18
       </el-row>
@@ -25,7 +28,8 @@
25 28
       <el-table-column
26 29
         label="操作"
27 30
         width="100">
28
-        <template slot-scope="scope">
31
+        <template slot-scope="scope" style="display: inline-block">
32
+          <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>
29 33
           <el-popconfirm title="确定删除吗?" @confirm="deleteRow(scope.row)">
30 34
             <el-button type="danger" slot="reference">移除</el-button>
31 35
           </el-popconfirm>
@@ -38,18 +42,19 @@
38 42
       </el-pagination>
39 43
     </div>
40 44
     <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">
45
+      :title="title"
46
+      :visible.sync="dialogVisible"
47
+      width="60%"
48
+      custom-class="audit-dialog">
49
+      <el-form  style="height: 100px" class="form-div" label-position="left" label-width="80px" :model="formLabelAlign">
50
+        <el-form-item label="凭证ID">
51
+          <el-input v-model="formLabelAlign.pzId"></el-input>
52
+        </el-form-item>
53
+        <el-form-item label="凭证名称">
54
+          <el-input v-model="formLabelAlign.pzName"></el-input>
55
+        </el-form-item>
56
+      </el-form>
57
+      <span slot="footer" class="dialog-footer">
53 58
             <el-button @click="dialogVisible = false">取 消</el-button>
54 59
             <el-button type="primary" @click="handleConfirm">确 定</el-button>
55 60
         </span>
@@ -63,6 +68,9 @@ export default {
63 68
     components: {},
64 69
     data() {
65 70
       return {
71
+        formInline: {
72
+          credentialName: ''
73
+        },
66 74
         columns: [
67 75
           {
68 76
             label: '凭证ID',
@@ -81,11 +89,11 @@ export default {
81 89
         total: 0,
82 90
         pageSize: 10,
83 91
         pageNum: 1,
84
-        radio: '2',
85 92
         dialogVisible: false,
86
-        selRow: {},
87
-        formInline: {
88
-          credentialName: ''
93
+        title: '',
94
+        formLabelAlign: {
95
+          pzId: '',
96
+          pzName: ''
89 97
         }
90 98
       }
91 99
     },
@@ -98,59 +106,62 @@ export default {
98 106
       indexMethod(index) {
99 107
         return this.pageSize * (this.pageNum - 1) + index + 1
100 108
       },
101
-      deleteRow (record) {
102
-        console.log(record, '11111')
103
-      },
104
-      handlePageChange() {
105
-        this.getTableData()
106
-      },
107
-      handleAudit(row) {
108
-        this.selRow = row
109
+      handleEdit(row) {
110
+        this.title = '修改凭证'
111
+        this.formLabelAlign = row
109 112
         this.dialogVisible = true
110 113
       },
111
-      handleCancelApply(row) {
112
-        console.log('enter handle cancel apply')
114
+      handleAdd () {
115
+        this.title = '添加凭证'
116
+        this.formLabelAlign = {}
117
+        this.dialogVisible = true
113 118
       },
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
119
+      deleteRow (record) {
120
+        api.deletePz({id: record.id}).then(res => {
121
+          if (res.code === 200) {
120 122
             this.$message({
121
-              message: '审核成功!',
123
+              message: '删除成功!',
122 124
               type: 'success'
123 125
             })
124 126
             this.getTableData()
125 127
           }
126 128
         })
127 129
       },
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
-        })
130
+      handlePageChange() {
131
+        this.getTableData()
139 132
       },
140
-      getApplyTypeText(val) {
141
-        if (!val){
142
-          return '未申请'
143
-        }
144
-        const textMap = {
145
-          1: '待审批',
146
-          2: '审批通过',
147
-          3: '审批驳回'
133
+      handleConfirm() {
134
+        if (this.title === '修改凭证') {
135
+          let params = {...formLabelAlign}
136
+          api.addPz().then(res => {
137
+            if(res.code === 200) {
138
+              this.dialogVisible = false
139
+              this.$message({
140
+                message: '修改成功!',
141
+                type: 'success'
142
+              })
143
+              this.getTableData()
144
+            }
145
+          })
146
+        } else {
147
+          api.addPz({ipAddr: this.formLabelAlign.ipAddr}).then(res => {
148
+            if(res.code === 200) {
149
+              this.dialogVisible = false
150
+              this.$message({
151
+                message: '添加成功!',
152
+                type: 'success'
153
+              })
154
+              this.getTableData()
155
+            }
156
+          })
148 157
         }
149
-        return textMap[val]
150 158
       },
151
-      handleSearch() {
152
-        this.pageNum = 1
153
-        this.getTableData()
159
+      getTableData() {
160
+        const {pageNum, pageSize} = this
161
+        api.pzglListByPage({pageNum, pageSize, credentialName: this.formInline.credentialName}).then(res => {
162
+          this.tableData = res.data.records || []
163
+          this.total = res.data.total
164
+        })
154 165
       }
155 166
     }
156 167
 }
@@ -193,6 +204,7 @@ export default {
193 204
   width: 100px;
194 205
   height: 40px;
195 206
 }
207
+
196 208
 .body-wrapper {
197 209
   padding: 20px;
198 210
   background: #0c0c0c;
@@ -207,16 +219,24 @@ export default {
207 219
     margin-bottom: 20px;
208 220
     text-align: center;
209 221
     .input-wrapper{
210
-        width: 36%;
222
+      width: 36%;
211 223
     }
212 224
   }
213 225
 }
214 226
 .audit-dialog{
215
-    .mg-bt{
216
-        margin-bottom: 24px;
217
-    }
218
-    .label{
219
-        text-align: right;
227
+  .mg-bt{
228
+    margin-bottom: 24px;
229
+  }
230
+  .label{
231
+    text-align: right;
232
+  }
233
+  .form-div{
234
+    /deep/ .el-input__inner{
235
+      height: 35px;
236
+      width: 90%;
237
+      border: 1px solid #a6a5a5;
238
+      color: #fff;
220 239
     }
240
+  }
221 241
 }
222 242
 </style>

+ 8 - 32
src/pages/index/components/service_call_function.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
3
-    <el-form class="form-wrapper" :model="ruleForm">
3
+    <el-form ref="ruleForm" class="form-wrapper" :model="ruleForm">
4 4
       <el-form-item label="接口地址" prop="interfaceName">
5 5
         <el-input v-model="ruleForm.interfaceName" placeholder="接口地址"></el-input>
6 6
       </el-form-item>
@@ -23,38 +23,10 @@ export default {
23 23
   components: {},
24 24
   data() {
25 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 26
       ruleForm: {
56 27
         interfaceName: '',
57
-        time: ''
28
+        accessKey: '',
29
+        publicKey: ''
58 30
       }
59 31
     }
60 32
   },
@@ -66,7 +38,11 @@ export default {
66 38
     submitForm(formName) {
67 39
       this.$refs[formName].validate((valid) => {
68 40
         if (valid) {
69
-          alert('submit!');
41
+          let params = this.ruleForm
42
+          api.fwdy(params).then(res => {
43
+            this.$message({type: 'success', message: '调用成功!'})
44
+            this.resetForm(formName)
45
+          })
70 46
         } else {
71 47
           console.log('error submit!!');
72 48
           return false;

+ 7 - 2
src/pages/index/components/service_publish.vue

@@ -179,8 +179,13 @@ export default {
179 179
   .label{
180 180
     text-align: right;
181 181
   }
182
-  /deep/ .el-input__inner{
183
-    background: white;
182
+  .form-div{
183
+    /deep/ .el-input__inner{
184
+      height: 35px;
185
+      width: 90%;
186
+      border: 1px solid #a6a5a5;
187
+      color: #fff;
188
+    }
184 189
   }
185 190
 }
186 191
 </style>

+ 16 - 56
src/pages/index/components/service_subscription_function.vue

@@ -25,7 +25,7 @@
25 25
       <el-table-column
26 26
         label="操作"
27 27
         width="100">
28
-        <template slot-scope="scope">
28
+        <template slot-scope="scope" style="display: inline-block">
29 29
           <el-popconfirm title="确定订阅吗?" @confirm="subscribeRow(scope.row)">
30 30
             <el-button type="success" slot="reference">订阅</el-button>
31 31
           </el-popconfirm>
@@ -37,23 +37,6 @@
37 37
         :current-page.sync="pageNum" :page-size.sync="pageSize">
38 38
       </el-pagination>
39 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 40
   </div>
58 41
 </template>
59 42
 <script>
@@ -95,37 +78,29 @@ export default {
95 78
         return this.pageSize * (this.pageNum - 1) + index + 1
96 79
       },
97 80
       onSubmit () {
98
-        console.log(this.formInline)
99
-      },
100
-      subscribeRow (record) {
101
-        console.log(record)
102
-      },
103
-      handlePageChange() {
104 81
         this.getTableData()
105 82
       },
106
-      handleAudit(row) {
107
-        this.selRow = row
108
-        this.dialogVisible = true
109
-      },
110
-      handleCancelApply(row) {
111
-        console.log('enter handle cancel apply')
83
+      subscribeRow (record) {
84
+        api.subscription({id: record.id}).then(res => {
85
+          if (res.code === 200) {
86
+            this.$message({type: 'success', message: '订阅成功!'})
87
+            this.getTableData()
88
+          }
89
+        })
112 90
       },
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
-            })
91
+      unsubscribeRow (record) {
92
+        api.subscription({id: record.id}).then(res => {
93
+          if (res.code === 200) {
94
+            this.$message({type: 'success', message: '取消订阅成功!'})
123 95
             this.getTableData()
124 96
           }
125 97
         })
126 98
       },
99
+      handlePageChange() {
100
+        this.getTableData()
101
+      },
127 102
       getTableData() {
128
-        const {pageNum, pageSize, searchWords} = this
103
+        const {pageNum, pageSize, formInline} = this
129 104
         // api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
130 105
         //   this.tableData = []
131 106
         //   res.data.records.map((item, index) => {
@@ -135,21 +110,6 @@ export default {
135 110
         //   })
136 111
         //   this.total = res.data.total
137 112
         // })
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 113
       }
154 114
     }
155 115
 }

+ 40 - 1
src/pages/index/components/support.vue

@@ -144,6 +144,44 @@ export default {
144 144
 }
145 145
 </script>
146 146
 <style  lang="scss" scoped>
147
+.form-wrapper {
148
+  margin-bottom: 20px;
149
+}
150
+/deep/ .el-input__inner {
151
+  background: #2d3744;
152
+  border: none;
153
+  border-radius: 0;
154
+}
155
+/deep/ .el-select {
156
+  height: 40px;
157
+  .el-input__inner {
158
+    height: 40px;
159
+  }
160
+  .el-input__prefix, .el-input__suffix {
161
+    height: 40px;
162
+  }
163
+
164
+  /* 下面设置右侧按钮居中 */
165
+  .el-input__suffix {
166
+    top: 0px;
167
+    display: flex;
168
+    justify-content: center;
169
+    align-items: center;
170
+    flex-wrap: nowrap;
171
+    flex-direction: row;
172
+    align-content: flex-start;
173
+  }
174
+  /* 输入框加上上下边是 32px + 2px =34px */
175
+  .el-input__icon {
176
+    line-height: 0px;
177
+  }
178
+}
179
+/deep/ .form-wrapper .el-button {
180
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
181
+  width: 100px;
182
+  height: 40px;
183
+}
184
+
147 185
 .body-wrapper {
148 186
   padding: 20px;
149 187
   background: #0c0c0c;
@@ -163,8 +201,9 @@ export default {
163 201
       height: 35px;
164 202
       width: 90%;
165 203
       border: 1px solid #a6a5a5;
166
-      color: black;
204
+      color: #fff;
167 205
     }
168 206
   }
169 207
 }
208
+
170 209
 </style>