浏览代码

Merge branch 'master' of https://e.coding.net/g-mklx3272/luohe/luohe_fronted

烬玊 1 年之前
父节点
当前提交
b9090eabbe

+ 32 - 0
src/api/article_z.js

@@ -59,4 +59,36 @@ export default {
59 59
   queryBerthPerationNalysis_Bwzzlfx(params) {
60 60
     return axios.post(`/dash/berth/peration/nalysis/turnover`, params)
61 61
   },
62
+  // 收费价格监管_收费单价分析
63
+  queryChargePrice_Sfdjfx(params) {
64
+    return axios.post(`/dash/charge/price/stat`, params)
65
+  },
66
+  //客户投诉监管_客诉分析
67
+  queryCustomerComplaint_Ksfx(params) {
68
+    return axios.post(`/dash/customer/complaint/stat`, params)
69
+  },
70
+  //设备运行监测_摄像头
71
+  queryEquipmentRunning_Sxt(params) {
72
+    return axios.post(`/dash/equipment/running/stat1`, params)
73
+  },
74
+  //设备运行监测_闸机
75
+  queryEquipmentRunning_Zj(params) {
76
+    return axios.post(`/dash/equipment/running/stat2`, params)
77
+  },
78
+  //设备运行监测_满位显示器
79
+  queryEquipmentRunning_Mwxsq(params) {
80
+    return axios.post(`/dash/equipment/running/stat3`, params)
81
+  },
82
+  //技术支持功能_查询
83
+  getSupport_get(params) {
84
+    return axios.get(`/dash/support/page`, params)
85
+  },
86
+  //技术支持功能_添加
87
+  addSupport_save(params) {
88
+    return axios.post(`/dash/support/save`, params)
89
+  },
90
+  //技术支持功能_删除
91
+  deleteSupport_delete(params) {
92
+    return axios.post(`/dash/support/delete`, params)
93
+  },
62 94
 }

+ 1 - 0
src/api/audit.js

@@ -159,4 +159,5 @@ export default {
159 159
   applyResource(params) {
160 160
     return axios.post('/resourceApply/approveApply', params);
161 161
   }
162
+
162 163
 }

+ 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
 }

+ 15 - 3
src/pages/index/components/charge_price.vue

@@ -8,8 +8,8 @@
8 8
       </el-table-column>
9 9
     </el-table>
10 10
     <div class="table-pagination">
11
-      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
12
-                     :current-page.sync="pageNum5" :page-size.sync="pageSize5">
11
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total2" @current-change="handlePageChange"
12
+                     :current-page.sync="pageNum2" :page-size.sync="pageSize2">
13 13
       </el-pagination>
14 14
     </div>
15 15
     <br>
@@ -50,6 +50,7 @@
50 50
 <script>
51 51
 import api from "@/api/audit.js";
52 52
 import piechart from "@/components/pieChart";
53
+import api1 from "@/api/article_z";
53 54
 
54 55
 export default {
55 56
   components: {
@@ -103,6 +104,12 @@ export default {
103 104
       dialogVisible: false,
104 105
       selRow: {},
105 106
       searchWords: undefined,
107
+      total2: 0,
108
+      pageSize2: 10,
109
+      pageNum2: 1,
110
+      radio2: '2',
111
+      dialogVisible2: false,
112
+      selRow2: {},
106 113
       searchWords2: undefined,
107 114
     }
108 115
   },
@@ -110,6 +117,7 @@ export default {
110 117
     this.getTableData()
111 118
     this.getTableData2()
112 119
     this.getTableData3()
120
+    this.getModelDataData()
113 121
   },
114 122
   watch: {
115 123
   },
@@ -164,7 +172,11 @@ export default {
164 172
         this.total3 = res.data.total
165 173
       })
166 174
     },
167
-
175
+    getModelDataData(){
176
+      api1.queryChargePrice_Sfdjfx().then(res=>{
177
+        this.modelData.list=res.data;
178
+      })
179
+    },
168 180
 
169 181
     getApplyTypeText(val) {
170 182
       if (!val){

+ 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 - 2
src/pages/index/components/customer_complaint.vue

@@ -106,6 +106,7 @@
106 106
 <script>
107 107
 import api from "@/api/audit.js";
108 108
 import piechart from "@/components/pieChart";
109
+import api1 from "@/api/article_z";
109 110
 
110 111
 export default {
111 112
   components: {
@@ -169,8 +170,6 @@ export default {
169 170
       modelData: {
170 171
         list: [{name: '服务态度', value: 100}, {name: '收费乱', value: 100},{name: '设备部灵敏', value: 100}, {name: '环境差', value: 100}]
171 172
       },
172
-      linedata: [{month: '11', lastYearAmount: 20, thisYearAmount: 30}, {month: '12', lastYearAmount: 40, thisYearAmount: 50}],
173
-      bardata: [{month: '01', hs: 100, cs: 200},{month: '02', hs: 300, cs: 200},{month: '03', hs: 400, cs: 200},],
174 173
       tableData: [],
175 174
       tableData2: [],
176 175
       total: 0,
@@ -182,17 +181,24 @@ export default {
182 181
         ipUrl: ''
183 182
       },
184 183
       selRow: undefined,
184
+      searchWords: undefined,
185 185
       title: ''
186 186
     }
187 187
   },
188 188
   mounted() {
189 189
     this.getTableData()
190 190
     this.getTableData2()
191
+    this.getModelDataData()
191 192
   },
192 193
   watch: {
193 194
   },
194 195
   methods: {
195 196
 
197
+    getModelDataData(){
198
+      api1.queryCustomerComplaint_Ksfx().then(res=>{
199
+        this.modelData.list=res.data;
200
+      })
201
+    },
196 202
     handlePageChange() {
197 203
       this.getTableData()
198 204
     },

+ 21 - 1
src/pages/index/components/equipment_running.vue

@@ -59,6 +59,7 @@
59 59
 <script>
60 60
 import api from "@/api/audit.js";
61 61
 import piechart from "@/components/pieChart";
62
+import api1 from "@/api/article_z";
62 63
 
63 64
 export default {
64 65
   components: {
@@ -106,15 +107,34 @@ export default {
106 107
     this.getTableData2()
107 108
     this.getTableData3()
108 109
     this.getTableData4()
110
+    this.getModelDataData()
111
+    this.getModelData2Data()
112
+    this.getModelData3Data()
109 113
   },
110 114
   watch: {
111 115
   },
112 116
   methods: {
117
+
118
+    getModelDataData(){
119
+      api1.queryEquipmentRunning_Sxt().then(res=>{
120
+        this.modelData.list=res.data;
121
+      })
122
+    },
123
+    getModelData2Data(){
124
+      api1.queryEquipmentRunning_Zj().then(res=>{
125
+        this.modelData2.list=res.data;
126
+      })
127
+    },
128
+    getModelData3Data(){
129
+      api1.queryEquipmentRunning_Mwxsq().then(res=>{
130
+        this.modelData3.list=res.data;
131
+      })
132
+    },
113 133
     handlePageChange() {
114 134
       this.getTableData()
115 135
       this.getTableData2()
116 136
       this.getTableData3()
117
-      this.getTableDat4()
137
+      this.getTableData4()
118 138
     },
119 139
     handleAudit(row) {
120 140
       this.selRow = row

+ 8 - 2
src/pages/index/components/ip_white_list.vue

@@ -222,8 +222,14 @@ export default {
222 222
   .label{
223 223
     text-align: right;
224 224
   }
225
-  /deep/ .el-input__inner{
226
-    background: white;
225
+  .form-div{
226
+    /deep/ .el-input__inner{
227
+      height: 35px;
228
+      width: 90%;
229
+      border: 1px solid #a6a5a5;
230
+      color: #fff;
231
+      background: #2d3744;
232
+    }
227 233
   }
228 234
 }
229 235
 </style>

+ 67 - 71
src/pages/index/components/message.vue

@@ -7,13 +7,14 @@
7 7
       <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
8 8
       </el-table-column>
9 9
       <el-table-column label="操作" width="150">
10
-      <div slot-scope="scope">
11
-        <el-button  @click="handleDetail(scope.row)" type="primary" size="mini">详情</el-button>
12
-      </div>
13
-    </el-table-column>
10
+        <div slot-scope="scope">
11
+          <el-button @click="handleDetail(scope.row)" type="primary" size="mini">详情</el-button>
12
+        </div>
13
+      </el-table-column>
14 14
     </el-table>
15 15
     <div class="table-pagination">
16
-      <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
16
+      <el-pagination :background="false" layout="total, prev, pager, next" :total="total"
17
+                     @current-change="handlePageChange"
17 18
                      :current-page.sync="pageNum" :page-size.sync="pageSize">
18 19
       </el-pagination>
19 20
     </div>
@@ -22,11 +23,17 @@
22 23
       :visible.sync="dialogVisible"
23 24
       width="50%"
24 25
       custom-class="audit-dialog">
25
-      <div class="form-div">
26
-        <el-input disabled v-model="selRow.title"></el-input>
27
-        <el-input type="textarea" disabled v-model="selRow.messageType"></el-input>
28
-        <el-input disabled v-model="selRow.publicTime"></el-input>
29
-      </div>
26
+      <el-form style="height: 120px" class="form-div" label-position="left" label-width="80px" :model="selRow">
27
+        <el-form-item label="标题">
28
+          <el-input disabled v-model="selRow.title"/>
29
+        </el-form-item>
30
+        <el-form-item label="消息类型">
31
+          <el-input disabled v-model="selRow.messageType"/>
32
+        </el-form-item>
33
+        <el-form-item label="发布时间">
34
+          <el-input disabled v-model="selRow.publicTime"/>
35
+        </el-form-item>
36
+      </el-form>
30 37
     </el-dialog>
31 38
   </div>
32 39
 </template>
@@ -51,83 +58,77 @@ export default {
51 58
           key: 'publicTime'
52 59
         },
53 60
       ],
54
-      tableData: [{"title":'系统升级',"messageType":'公告',"publicTime":'2023-12-29 10:00:00'},
55
-        {"title":'预警提示',"messageType":'系统通知',"publicTime":'2023-12-25 10:00:00'},
56
-        {"title":'故障提醒',"messageType":'系统通知',"publicTime":'2023-12-29 10:00:00'},],
61
+      tableData: [{"title": '系统升级', "messageType": '公告', "publicTime": '2023-12-29 10:00:00'},
62
+        {"title": '预警提示', "messageType": '系统通知', "publicTime": '2023-12-25 10:00:00'},
63
+        {"title": '故障提醒', "messageType": '系统通知', "publicTime": '2023-12-29 10:00:00'},],
57 64
       total: 3,
58 65
       pageSize: 10,
59 66
       pageNum: 1,
60
-      radio: '2',
61 67
       dialogVisible: false,
62 68
       selRow: {},
63
-      searchWords: undefined
64 69
     }
65 70
   },
66 71
   mounted() {
67 72
     this.getTableData()
68 73
   },
69
-  watch: {
70
-  },
74
+  watch: {},
71 75
   methods: {
72 76
     handlePageChange() {
73 77
       this.getTableData()
74 78
     },
75
-    handleAudit(row) {
76
-      this.selRow = row
77
-      this.dialogVisible = true
78
-    },
79
-    handleCancelApply(row) {
80
-      console.log('enter handle cancel apply')
81
-    },
82 79
     handleDetail(row) {
83 80
       this.selRow = row
84 81
       this.dialogVisible = true
85 82
     },
86
-    handleConfirm() {
87
-      const {id} = this.selRow
88
-      console.log('radio', this.radio)
89
-      api.applyResource({id, applyType: this.radio}).then(res => {
90
-        if(res.success) {
91
-          this.dialogVisible = false
92
-          this.$message({
93
-            message: '审核成功!',
94
-            type: 'success'
95
-          })
96
-          this.getTableData()
97
-        }
98
-      })
99
-    },
100 83
     getTableData() {
101
-      const {pageNum, pageSize, searchWords} = this
102
-      api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
103
-        this.tableData = []
104
-        res.data.records.map((item, index) => {
105
-          const newItem = {...item}
106
-          newItem.applyTypeText = this.getApplyTypeText(item.applyType)
107
-          this.tableData.push(newItem)
108
-        })
84
+      const {pageNum, pageSize} = this
85
+      api.messageListByPage({pageNum, pageSize}).then(res => {
86
+        this.tableData = res.data.records || []
109 87
         this.total = res.data.total
110 88
       })
111 89
     },
112
-    getApplyTypeText(val) {
113
-      if (!val){
114
-        return '未申请'
115
-      }
116
-      const textMap = {
117
-        1: '待审批',
118
-        2: '审批通过',
119
-        3: '审批驳回'
120
-      }
121
-      return textMap[val]
122
-    },
123
-    handleSearch() {
124
-      this.pageNum = 1
125
-      this.getTableData()
126
-    }
127 90
   }
128 91
 }
129 92
 </script>
130
-<style  lang="scss" scoped>
93
+<style lang="scss" scoped>
94
+.form-wrapper {
95
+  margin-bottom: 20px;
96
+}
97
+/deep/ .el-input__inner {
98
+  background: #2d3744;
99
+  border: none;
100
+  border-radius: 0;
101
+}
102
+/deep/ .el-select {
103
+  height: 40px;
104
+  .el-input__inner {
105
+    height: 40px;
106
+  }
107
+  .el-input__prefix, .el-input__suffix {
108
+    height: 40px;
109
+  }
110
+
111
+  /* 下面设置右侧按钮居中 */
112
+  .el-input__suffix {
113
+    top: 0px;
114
+    display: flex;
115
+    justify-content: center;
116
+    align-items: center;
117
+    flex-wrap: nowrap;
118
+    flex-direction: row;
119
+    align-content: flex-start;
120
+  }
121
+  /* 输入框加上上下边是 32px + 2px =34px */
122
+  .el-input__icon {
123
+    line-height: 0px;
124
+  }
125
+}
126
+/deep/ .form-wrapper .el-button {
127
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
128
+  width: 100px;
129
+  height: 40px;
130
+}
131
+
131 132
 .body-wrapper {
132 133
   padding: 20px;
133 134
   background: #0c0c0c;
@@ -143,17 +144,12 @@ export default {
143 144
     text-align: right;
144 145
   }
145 146
   .form-div{
146
-    width: 90%;
147 147
     /deep/ .el-input__inner{
148
-      background: white;
149 148
       height: 35px;
150
-      color: black;
151
-      margin-bottom: 10px;
152
-    }
153
-    /deep/ .el-textarea.is-disabled .el-textarea__inner {
154
-      background: white;
155
-      color: black;
156
-      margin-bottom: 10px;
149
+      width: 90%;
150
+      border: 1px solid #a6a5a5;
151
+      color: #fff;
152
+      background: #2d3744;
157 153
     }
158 154
   }
159 155
 }

+ 1 - 1
src/pages/index/components/saturation_warning.vue

@@ -144,7 +144,7 @@ export default {
144 144
     lineTooltipFormat(params) {
145 145
       const data = params[0].data;
146 146
       return `<div class="line-tooltip">
147
-        <div style="color: ${params[1].color}">${params[1].seriesName}: ${
147
+        <div style="color: ${params[0].color}">${params[1].seriesName}: ${
148 148
         params[0].data.lastAmount || "--"
149 149
       }(%)</div>
150 150
         <div style="color: red">${params[0].seriesName}: ${

+ 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
 }

+ 110 - 49
src/pages/index/components/support.vue

@@ -7,6 +7,16 @@
7 7
     <el-table :data="tableData" style="background: #2a2a2a;border-color: #333;">
8 8
       <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
9 9
       </el-table-column>
10
+      <el-table-column
11
+        label="操作"
12
+        width="200">
13
+        <template slot-scope="scope" style="display: inline-block">
14
+          <el-button type="success" @click="handleAudit(scope.row)" slot="reference">修改</el-button>
15
+          <el-popconfirm title="确定删除吗?" @confirm="deleteRow(scope.row)">
16
+            <el-button type="danger" slot="reference">删除</el-button>
17
+          </el-popconfirm>
18
+        </template>
19
+      </el-table-column>
10 20
     </el-table>
11 21
     <div class="table-pagination">
12 22
       <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
@@ -19,7 +29,6 @@
19 29
       width="50%"
20 30
       custom-class="audit-dialog">
21 31
       <div style="height: 100px" class="form-div">
22
-        <el-form label-position="left" label-width="80px" :model="formLabelAlign">
23 32
           <el-form label-position="left" label-width="80px" :model="formLabelAlign">
24 33
             <el-form-item label="申请名称">
25 34
               <el-input v-model="formLabelAlign.requestTitle"></el-input>
@@ -28,17 +37,17 @@
28 37
               <el-input v-model="formLabelAlign.supportChannel"></el-input>
29 38
             </el-form-item>
30 39
           </el-form>
31
-        </el-form>
32 40
       </div>
33 41
       <span slot="footer" class="dialog-footer">
34 42
             <el-button @click="dialogVisible = false">取 消</el-button>
35
-            <el-button type="primary" @click="handleConfirm">确 定</el-button>
43
+            <el-button type="success" @click="handleConfirm">确 定</el-button>
36 44
         </span>
37 45
     </el-dialog>
38 46
   </div>
39 47
 </template>
40 48
 <script>
41 49
 import api from "@/api/audit.js";
50
+import api1 from "@/api/article_z";
42 51
 
43 52
 export default {
44 53
   components: {},
@@ -51,7 +60,7 @@ export default {
51 60
         },
52 61
         {
53 62
           label: '申请时间',
54
-          key: 'requestTime'
63
+          key: 'createTime'
55 64
         },
56 65
         {
57 66
           label: '支持渠道',
@@ -59,22 +68,26 @@ export default {
59 68
         },
60 69
         {
61 70
           label: '受理状态',
62
-          key: 'acceptanceStatus'
71
+          key: 'requestState'
63 72
         }
64 73
       ],
65
-      tableData: [{"requestTitle":'申请更换闸机',"requestTime":'2023-12-25 10:00:00',"supportChannel":'留言板',"acceptanceStatus":'已受理'},
66
-        {"requestTitle":'申请路面整修',"requestTime":'2023-12-30 10:00:00',"supportChannel":'电话沟通',"acceptanceStatus":'未受理'},],
67
-      total: 3,
74
+      tableData: [{"requestTitle":'申请更换闸机',"createTime":'2023-12-25 10:00:00',"supportChannel":'留言板',"requestState":'已受理'},
75
+        {"requestTitle":'申请路面整修',"createTime":'2023-12-30 10:00:00',"supportChannel":'电话沟通',"requestState":'未受理'},],
76
+      total: 0,
68 77
       pageSize: 10,
69 78
       pageNum: 1,
70 79
       radio: '2',
71 80
       dialogVisible: false,
72
-      selRow: {},
81
+      // selRow: {},
73 82
       searchWords: undefined,
74 83
       formLabelAlign: {
84
+        id: '',
75 85
         requestTitle: '',
76
-        supportChannel: ''
86
+        createTime:'',
87
+        supportChannel: '',
88
+        requestState:''
77 89
       },
90
+      title:'',
78 91
     }
79 92
   },
80 93
   mounted() {
@@ -87,11 +100,17 @@ export default {
87 100
       this.getTableData()
88 101
     },
89 102
     handleAudit(row) {
90
-      this.selRow = row
103
+      this.title = '修改技术支持'
104
+      this.formLabelAlign= row
91 105
       this.dialogVisible = true
92 106
     },
93
-    handleCancelApply(row) {
94
-      console.log('enter handle cancel apply')
107
+    deleteRow (record) {
108
+      api1.deleteSupport_delete({id: record.id}).then(res => {
109
+        if (res.code === 200) {
110
+          this.$message({type: 'success', message: '删除成功!'})
111
+          this.getTableData()
112
+        }
113
+      })
95 114
     },
96 115
     handleAdd () {
97 116
       this.title = '技术支持申请'
@@ -100,50 +119,90 @@ export default {
100 119
       this.dialogVisible = true
101 120
     },
102 121
     handleConfirm() {
103
-      const {id} = this.selRow
104
-      console.log('radio', this.radio)
105
-      api.applyResource({id, applyType: this.formLabelAlign.requestTitle}).then(res => {
106
-        if(res.success) {
107
-          this.dialogVisible = false
108
-          this.$message({
109
-            message: '审核成功!',
110
-            type: 'success'
111
-          })
112
-          this.getTableData()
113
-        }
114
-      })
122
+      if (this.title === '修改技术支持') {
123
+        api1.addSupport_save({id: this.formLabelAlign.id, requestTitle: this.formLabelAlign.requestTitle, supportChannel: this.formLabelAlign.supportChannel}).then(res => {
124
+          if(res.code === 200) {
125
+            this.dialogVisible = false
126
+            this.$message({
127
+              message: '修改成功!',
128
+              type: 'success'
129
+            })
130
+            this.getTableData()
131
+          }
132
+        })
133
+      }else {
134
+        api1.addSupport_save({requestTitle: this.formLabelAlign.requestTitle, supportChannel: this.formLabelAlign.supportChannel}).then(res => {
135
+          if(res.code === 200) {
136
+            this.dialogVisible = false
137
+            this.$message({
138
+              message: '添加成功!',
139
+              type: 'success'
140
+            })
141
+            this.getTableData()
142
+          }
143
+        })
144
+      }
145
+
115 146
     },
116 147
     getTableData() {
117
-      const {pageNum, pageSize, searchWords} = this
118
-      api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
119
-        this.tableData = []
120
-        res.data.records.map((item, index) => {
121
-          const newItem = {...item}
122
-          newItem.applyTypeText = this.getApplyTypeText(item.applyType)
123
-          this.tableData.push(newItem)
124
-        })
148
+      const {pageNum, pageSize} = this
149
+      api1.getSupport_get({current: pageNum, size: pageSize,}).then(res => {
150
+        this.tableData =  res.data.records || []
125 151
         this.total = res.data.total
126 152
       })
127 153
     },
128
-    getApplyTypeText(val) {
129
-      if (!val){
130
-        return '未申请'
131
-      }
132
-      const textMap = {
133
-        1: '待审批',
134
-        2: '审批通过',
135
-        3: '审批驳回'
136
-      }
137
-      return textMap[val]
138
-    },
139
-    handleSearch() {
140
-      this.pageNum = 1
141
-      this.getTableData()
142
-    }
154
+    // getCurrentTime() {
155
+    //   //获取当前时间并打印
156
+    //   let yy = new Date().getFullYear();
157
+    //   let mm = new Date().getMonth()+1;
158
+    //   let dd = new Date().getDate();
159
+    //   let hh = new Date().getHours();
160
+    //   let mf = new Date().getMinutes()<10 ? '0'+new Date().getMinutes() : new Date().getMinutes();
161
+    //   let ss = new Date().getSeconds()<10 ? '0'+new Date().getSeconds() : new Date().getSeconds();
162
+    //   return yy+'/'+mm+'/'+dd+' '+hh+':'+mf+':'+ss;
163
+    // }
143 164
   }
144 165
 }
145 166
 </script>
146 167
 <style  lang="scss" scoped>
168
+.form-wrapper {
169
+  margin-bottom: 20px;
170
+}
171
+/deep/ .el-input__inner {
172
+  background: #2d3744;
173
+  border: none;
174
+  border-radius: 0;
175
+}
176
+/deep/ .el-select {
177
+  height: 40px;
178
+  .el-input__inner {
179
+    height: 40px;
180
+  }
181
+  .el-input__prefix, .el-input__suffix {
182
+    height: 40px;
183
+  }
184
+
185
+  /* 下面设置右侧按钮居中 */
186
+  .el-input__suffix {
187
+    top: 0px;
188
+    display: flex;
189
+    justify-content: center;
190
+    align-items: center;
191
+    flex-wrap: nowrap;
192
+    flex-direction: row;
193
+    align-content: flex-start;
194
+  }
195
+  /* 输入框加上上下边是 32px + 2px =34px */
196
+  .el-input__icon {
197
+    line-height: 0px;
198
+  }
199
+}
200
+/deep/ .form-wrapper .el-button {
201
+  background: linear-gradient(90deg,#0158d9,#3c97e4);
202
+  width: 100px;
203
+  height: 40px;
204
+}
205
+
147 206
 .body-wrapper {
148 207
   padding: 20px;
149 208
   background: #0c0c0c;
@@ -163,8 +222,10 @@ export default {
163 222
       height: 35px;
164 223
       width: 90%;
165 224
       border: 1px solid #a6a5a5;
166
-      color: black;
225
+      color: #fff;
226
+      background: #2d3744;
167 227
     }
168 228
   }
169 229
 }
230
+
170 231
 </style>