ソースを参照

操作一栏增加fixed

caojc6 3 年 前
コミット
1e9e01eebe
共有1 個のファイルを変更した20 個の追加23 個の削除を含む
  1. 20 23
      2022/aiot-evaluate/src/views/settings/ApiResourceManagement.vue

+ 20 - 23
2022/aiot-evaluate/src/views/settings/ApiResourceManagement.vue

@ -81,38 +81,39 @@ const pageData = ref({
81 81
    {
82 82
      label: '资源名称',
83 83
      name: 'name',
84
      width: '193'
84
      'min-width': '193'
85 85
    },
86 86
    {
87 87
      label: '资源编码',
88 88
      name: 'code',
89
      width: '193'
89
      'min-width': '193'
90 90
    },
91 91
    {
92 92
      label: '资源类型',
93 93
      name: 'type',
94
      width: '137'
94
      'min-width': '137'
95 95
    },
96 96
    {
97 97
      label: '所属应用',
98 98
      name: 'clientId',
99
      width: '193'
99
      'min-width': '193'
100 100
    },
101 101
    {
102 102
      label: '资源地址',
103 103
      name: 'uri',
104
      width: '217'
104
      'min-width': '217'
105 105
    },
106 106
    {
107 107
      label: '排序',
108 108
      name: 'seq',
109
      width: '217'
109
      'min-width': '217'
110 110
    },
111 111
    {
112 112
      label: '操作',
113 113
      type: 'custom',
114 114
      name: 'custom',
115
      width: '217'
115
      width: '217',
116
      fixed: 'right'
116 117
    }
117 118
  ],
118 119
  tableData: [],
@ -275,15 +276,11 @@ const dialogData = ref({
275 276
276 277
// 搜索
277 278
const search = (data) => {
279
  console.log(data);
278 280
  const params = {
279 281
    ...data
280
    // page: pageData.value.page.num,
281
    // size: pageData.value.page.size
282 282
  };
283
  debugger;
284
  console.log(data);
285 283
  getPermissionData(params);
286
  // queryByType({ type: 1 });
287 284
  console.log('开始搜索');
288 285
};
289 286
// 清除搜索
@ -379,7 +376,7 @@ const changePermission = async (params) => {
379 376
};
380 377
381 378
// 删除API资源
382
const deletePermission = async (code) => {
379
const deletePermission = async(code) => {
383 380
  await proxy
384 381
    .$reqPost(`${proxy.$api.managementPermissionApi.deletePermission}?code=${code}`)
385 382
    .then((res) => {
@ -457,17 +454,17 @@ function deleteRow (row) {
457 454
      cancelButtonText: '取消',
458 455
      type: 'warning'
459 456
    }).then(() => {
460
      ElMessage({
461
        type: 'success',
462
        message: 'Delete completed'
463
      });
464
      deletePermission(row.roleCode);
465
    }).catch(() => {
466
      ElMessage({
467
        type: 'info',
468
        message: 'Delete canceled'
469
      });
457
    ElMessage({
458
      type: 'success',
459
      message: 'Delete completed'
460
    });
461
    deletePermission(row.roleCode);
462
  }).catch(() => {
463
    ElMessage({
464
      type: 'info',
465
      message: 'Delete canceled'
470 466
    });
467
  });
471 468
}
472 469
473 470
function cancelDialog () {