zhanghua
2025-04-14 829f5116884f98643ffc5b2a548a600d40c0cedb
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<template>
  <div class="otherInterface">
    <header>
      <div class="headerTitle">运营管理 >> 专项整治 > 普查列表</div>
    </header>
    <main>
      <div class="mainHeader">
        <div class="add">
          <el-button type="primary" icon="el-icon-plus" @click="handleAdd()"
            >新增任务</el-button
          >
        </div>
        <div class="date-search">
          <span>按天查询:</span>
          <div class="block">
            <el-date-picker
              v-model="beginTime"
              type="date"
              placeholder="请选择开始日期"
            >
            </el-date-picker>
          </div>
          <span>——— ———</span>
          <div class="block">
            <el-date-picker
              v-model="endTime"
              type="date"
              placeholder="请选择结束日期"
            >
            </el-date-picker>
          </div>
        </div>
        <div class="search">
          <el-input placeholder="请输入标题或者任务编号"></el-input>
        </div>
        <div class="btn">
          <el-button icon="el-icon-search" type="primary">搜索</el-button>
          <el-button icon="el-icon-delete">重置</el-button>
        </div>
      </div>
      <div class="mainContent">
        <!-- 数据渲染 -->
        <el-table
          ref="multipleTable"
          :data="tableData"
          tooltip-effect="dark"
          style="width: 100%"
          :header-cell-style="{
            'font-weight': '650',
            'line-height': '45px',
          }"
          :row-class-name="tableRowClassName"
        >
          <el-table-column label="任务编号" prop="num" min-width="10">
          </el-table-column>
          <el-table-column prop="type" label="问题类型" min-width="10">
          </el-table-column>
          <el-table-column prop="bigclass" label="大类" min-width="10">
          </el-table-column>
          <el-table-column prop="subclass" label="小类" min-width="10">
          </el-table-column>
          <el-table-column prop="street" label="街道" min-width="10">
          </el-table-column>
          <el-table-column prop="community" label="社区" min-width="10">
          </el-table-column>
          <el-table-column prop="task" label="任务描述" min-width="10">
          </el-table-column>
          <el-table-column prop="reportTime" label="上报时间" min-width="10">
          </el-table-column>
          <el-table-column label="操作" min-width="10">
            <template slot-scope="scope">
              <span @click="handleView(scope.row)" style="cursor: pointer"
                >查看</span
              >
            </template>
          </el-table-column>
        </el-table>
      </div>
    </main>
    <footer>
      <!-- 创建弹窗 -->
      <el-dialog
        :visible.sync="dialogCreate"
        title="新增"
        width="45%"
        v-if="dialogCreate"
        :before-close="handleClose"
      >
        <createInterface @closeDialog="closeDialog" />
      </el-dialog>
      <!-- 查看弹窗 -->
      <el-dialog
        :visible.sync="dialogUpdate"
        :title="updateFlag ? '编辑' : '详情'"
        width="45%"
        v-if="dialogUpdate"
        :before-close="handleClose"
      >
        <viewInterface :updateFlag="updateFlag" :userInfo="userInfo" />
      </el-dialog>
    </footer>
  </div>
</template>
<script>
import createInterface from "./components/createInterface";
import viewInterface from "./components/viewInterface";
export default {
  components: {
    createInterface,
    viewInterface,
  },
  data() {
    return {
      tableData: [
        {
          num: 1234,
          type: "城管类事件",
          bigclass: "其他",
          subclass: "其他",
          street: "街道",
          community: "社区",
          task: "任务描述",
          reportTime: "2022-10-31 13:20",
        },
        {
          num: 1234,
          type: "城管类事件",
          bigclass: "其他",
          subclass: "其他",
          street: "街道",
          community: "社区",
          task: "任务描述",
          reportTime: "2022-10-31 13:20",
        },
        {
          num: 1234,
          type: "城管类事件",
          bigclass: "其他",
          subclass: "其他",
          street: "街道",
          community: "社区",
          task: "任务描述",
          reportTime: "2022-10-31 13:20",
        },
      ],
      search: "",
      dialogCreate: false,
      dialogUpdate: false,
      updateFlag: false,
      userInfo: "",
      date: "",
      beginTime: "",
      endTime: "",
    };
  },
  created() {
    this.getUserList();
  },
  methods: {
    // 获取接口列表
    getUserList() {
      const that = this;
      this.dialogCreate = false;
      this.$axios.get("sccg/system/portal/thirdApp/search").then((res) => {
        const { code, data } = res;
        if (code === 200) {
          this.tableData = data;
        }
      });
    },
    // 设置表格斑马纹
    tableRowClassName({ row, rowIndex }) {
      if ((rowIndex + 1) % 2 === 0) {
        return "warning-row";
      } else {
        return "success-row";
      }
    },
    // 打开新增界面
    handleAdd() {
      this.dialogCreate = true;
    },
    // 创建弹窗关闭
    handleClose(done) {
      const that = this;
      this.$confirm("确认关闭?")
        .then((_) => {
          that.dialogCreate = false;
          done();
        })
        .catch((_) => {});
    },
    closeDialog({ flag, index }) {
      this.dialogCreate = flag;
    },
    // 创建查看弹窗
    handleView(rowData) {
      this.userInfo = rowData;
      this.dialogUpdate = true;
    },
    // 删除第三方接口
    handleDelete({ id }) {
      this.$axios
        .delete("sccg/system/portal/thirdApp/delete", {
          params: {
            id,
          },
        })
        .then((res) => {
        });
    },
  },
};
</script>
<style lang="scss" scoped>
.otherInterface {
  header {
    display: flex;
    line-height: 60px;
    justify-content: space-between;
    padding: 0 20px;
    color: #4b9bb7;
    &::v-deep .el-button {
      background-color: #eb5d01;
      border: none;
      color: #fff;
      border-radius: 20px;
    }
  }
 
  main {
    padding: 10px 20px;
 
    .mainHeader {
      padding-left: 20px;
      display: flex;
      line-height: 60px;
      color: #4b9bb7;
      // background-color: #09152f;
      display: flex;
      .add,
      .search,
      .btn {
        flex: 1;
      }
      .date-search {
        flex: 3;
        display: flex;
        .mydate {
          display: flex;
          .line {
            margin: 0 10px 0 20px;
          }
        }
      }
      .el-input {
        width: 180px;
        height: 35px;
        margin-left: 10px;
 
        // &::v-deep .el-input__inner {
        //   background-color: #09152f;
        //   border: 1px solid #17324c;
        //   font-size: 12px;
        // }
      }
    }
 
    .mainContent {
      margin-top: 20px;
 
      .el-table {
        // color: #4b9bb7;
 
        &::v-deep .el-table__empty-block {
          background-color: #06122c;
        }
 
        &::v-deep .el-table__empty-text {
          color: #4b9bb7;
        }
 
        &::v-deep .warning-row {
          background-color: #06122c;
        }
 
        &::v-deep .success-row {
          background-color: #071f39;
        }
      }
 
      .line {
        padding: 0 5px;
        // margin-top: -10px;
      }
    }
  }
 
  footer {
    &::v-deep .el-dialog__header,
    &::v-deep .el-dialog__body {
      background-color: #06122c;
    }
 
    &::v-deep .el-dialog__header {
      display: flex;
      align-items: center;
      background-color: #fff;
      padding: 20px;
      line-height: 60px;
    }
 
    &::v-deep .el-dialog__title {
      color: #4b9bb7;
    }
 
    &::v-deep .el-dialog__close {
      width: 20px;
      height: 20px;
      // color: #fff;
    }
 
    &::v-deep .el-dialog__body {
      padding: 0;
    }
  }
}
</style>