From aff6b5b463c6a56e175f1bea4316772c97474cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Wed, 5 Jan 2022 14:08:39 +0800 Subject: [PATCH] =?UTF-8?q?key=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/api.js | 2 +- src/assets/enum.js | 11 +++++++++++ src/pages/plan/key/detail/list.js | 16 ++++++++-------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/assets/api.js b/src/assets/api.js index f9a268a9..36243158 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -836,7 +836,7 @@ export const delSystemTemplate= (id) => { //key码列表 export const getkeyDetailList= (id,data) => { - return req('get', baseurl + "/key/"+id,data) + return req('get', "http://192.168.6.98:8000" + "/key/"+id,data) } diff --git a/src/assets/enum.js b/src/assets/enum.js index 6b0b1303..6072510a 100644 --- a/src/assets/enum.js +++ b/src/assets/enum.js @@ -58,12 +58,23 @@ const menu={ case 7:return '#b6bcb8';break; } }, + //计划任务状态 + keyStatus(params) { + switch(params){ + case 1:return '待使用';break; + case 2:return '已使用';break; + case 3:return '已失效';break; + case 4:return '已作废';break; + case 5:return '使用锁定中';break; + } + }, keyStatusBg(params) { switch(params){ case 1:return '#BFBFBF';break; case 2:return '#43A65D';break; case 3:return '#ffaa00';break; case 4:return '#e64c00';break; + case 5:return '#3575C7'; break; } }, diff --git a/src/pages/plan/key/detail/list.js b/src/pages/plan/key/detail/list.js index 7b1474bd..e3b53062 100644 --- a/src/pages/plan/key/detail/list.js +++ b/src/pages/plan/key/detail/list.js @@ -209,13 +209,13 @@ export default class acclist extends React.Component{ prop:'plan_title', name: 'plan_title', }, - // { - // title: '状态', - // prop:'status', - // name: 'status', - // width:'auto', - // type: "slot", - // }, + { + title: '状态', + prop:'status', + name: 'status', + width:'auto', + type: "slot", + }, { title: '使用量', name: 'usage', @@ -308,7 +308,7 @@ export default class acclist extends React.Component{ } if(com == "status") { - return

{rowData.status_text}

+ return

{ menu.keyStatus(parseInt(rowData.status))}

} if(com == "opearo") {