田源
2023-12-15 15be1cdf63a5c531f218c7d66e3e28f85897cf07
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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<template>
  <!--系统集成的系统日志页面-->
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data || getList"
               :page.sync="page"
               ref="crud"
               @cell-dblclick="cellDbClick"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot-scope="scope" slot="menuLeft">
        <vci-docking-search :SearchObject="SearchObject" :page="page" :formInline="formInline" :status="status" @getList="dockingGetList"></vci-docking-search>
      </template>
      <template slot="paramString" slot-scope="scope">
        <avue-text-ellipsis :text="scope.row.paramString" :height="50">
          <small slot="more">...</small>
        </avue-text-ellipsis>
      </template>
      <template slot="returnString" slot-scope="scope">
        <avue-text-ellipsis :text="scope.row.returnString" :height="50">
          <small slot="more">...</small>
        </avue-text-ellipsis>
      </template>
    </avue-crud>
  </basic-container>
</template>
 
<script>
import {getLogoList} from "@/api/docking/loge";
import {validatenull} from "@/util/validate";
import {mapGetters} from "vuex";
 
export default {
  name: "loge",
  data(){
    return {
      value:'',
      //各个类型状态
      status:{
        type:'loge',
        typeFlag:false,
        dateFlag:false,
        stateFlag:false,
      },
      //model绑定
      formInline:{
        type:'',
        cut:'',
        text:'',
        Date:'',
        state:''
      },
      //集成类型死数据
      SearchObject:{
        searchData:[
          {
            label:'数据编码',
            prop: "id",
            value:0
          },
          {
            label:'分类代号',
            prop: 'classifyId',
            value:1
          },
          {
            label:'分类名称',
            prop: 'classifyName',
            value:2
          },
          {
            label:'集成系统编号',
            prop: 'systemCode',
            value:3
          },
          {
            label:'集成系统名称',
            prop: 'systemName',
            value:4
          },
          {
            label:'类型',
            prop: 'typeText',
            value:5
          },
          {
            label:'记录时间',
            value:6,
            prop: 'createTime',
          },
          {
            label:'是否成功',
            prop: 'interfaceStatus',
            value:7
          },
          {
            label: '标准申请',
            prop: 'applyCodeForBZ',
            value:8          },
          {
            label: '部门申请',
            prop: 'syncDataForOrg',
            value:9
          },
          {
            label: '人员申请',
            prop: 'syncDataForPerson',
            value:10
          },
        ],
      },
      loading: false,
      query: {},
      selectionList: [],
      page: {
        pageSize: 20,
        currentPage: 1,
        total: 0
      },
      data:[],
      option: {
        height:'auto',
        calcHeight: 0,
        tip: false,
        searchShow: false,
        border: true,
        index: true,
        selection: false,
        dialogClickModal: false,
        menuFixed:false,
        dialogType: 'drawer',
        viewBtn: true,
        addBtn:false,
        editBtn:false,
        delBtn:false,
        column: [
          {
            label: "数据编码",
            prop: "id",
            sortable:true,
            width:130
          },
          {
            label: "图号",
            prop: "uniqueCode",
            hide:true,
            sortable:true,
            width:150
          },
          {
            label: '分类代号',
            prop: 'classifyId',
            sortable:true,
            overHidden:true,
            width: 150
          },
          {
            label: '分类名称',
            prop: 'classifyName',
            sortable:true,
            overHidden: true,
            width: 140
          },
          {
            label: '标准申请',
            prop: 'applyCodeForBZ',
            sortable:true,
            width: 130
          },
          {
            label: '部门申请',
            prop: 'syncDataForOrg',
            sortable:true,
            width: 130
          },
          {
            label: '人员申请',
            prop: 'syncDataForPerson',
            sortable:true,
            width: 130
          },
          {
            label: '集成系统编号',
            prop: 'systemCode',
            labelWidth:150,
            sortable:true,
            width: 130
          },
          {
            label: '集成系统名称',
            prop: 'systemName',
            sortable:true,
            labelWidth:150,
            width: 150
          },
          {
            label: '类型',
            prop: 'typeText',
            sortable:true,
            width: 150
          },
          {
            label:'接口参数',
            prop:'paramString',
            sortable:true,
            minRows: 20,
            width: 150,
            type: "textarea",
            slot: true,
          },
          {
            label:'返回参数',
            prop:'returnString',
            sortable:true,
            minRows: 20,
            width: 150,
            type: "textarea",
            slot: true,
          },
          {
            label: '返回msg',
            prop: 'msg',
            overHidden: true
          },
          {
            label: '记录时间',
            prop: 'createTime',
            sortable:true,
            width: 160
          },
          {
            label: '是否成功',
            prop: 'interfaceStatus',
            sortable:true,
            width: 120,
            html:true,
            align:'center',
            type:'select',
            searchLabelWidth:130,
            dicData: [{key:'true',value:'是'},{key:'false',value:'否'}],
            props: {
              label: "value",
              value: "key"
            },
            formatter : function (row, column) {
              return row.interfaceStatus == 'true' || row.interfaceStatus == '' ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>'
            }
          },
        ]
      }
    }
  },
  computed:{
    ...mapGetters([ "permission"]),
    permissionList() {
      return {
        addBtn: false,
        viewBtn: false,
        delBtn: false,
        editBtn: false
      };
    }
  },
  methods: {
    dockingGetList(val){
      this.data=val.records;
      this.page.pageSize=val.size;
      this.page.currentPage=val.current;
      this.page.total=val.total;
    },
    async cellDbClick(row, column, cell, event) {
      for (const key in row) {
        if (key === column.property) {
          this.value = row[key];
        }
      }
      try {
        await this.$copyText(this.value);
        this.$message.success('复制成功');
      } catch (error) {
        this.$message.warning('复制失败');
      }
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page);
    },
    onLoad(page, params={}) {
      this.loading = true;
      var query={}
      if (this.query) {
        for (var key in this.query) {
          query['conditionMap["' + key + '"]'] = this.query[key];
        }
      }
      getLogoList(page.currentPage, page.pageSize,'createTime','desc',Object.assign(params,this.params, query,this.query),).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      }).catch(error=>{
        this.$message.error(error);
        this.loading = false;
      });
    }
  }
 
}
</script>
 
<style lang="scss" scoped>
// 滚动条样式修改
// 滚动条的宽度
   /deep/ .el-table__body-wrapper::-webkit-scrollbar {
     height: 15px; // 纵向滚动条 必写
   background: white;
     border: white;
     width: 10px;
 
   }
// 滚动条的滑块
   /deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
     background-color: #ececec;
     border-radius: 20px;
     border: #ececec;
   }
</style>