Commit eed6a9a689abe12daa88fed4423fde93a35a1666

Authored by xingyu4j
1 parent d485b828

fix

yudao-ui-admin-vue3/src/views/system/errorCode/index.vue
... ... @@ -110,18 +110,18 @@ const handleCreate = () => {
110 110  
111 111 // 修改操作
112 112 const handleUpdate = async (rowId: number) => {
  113 + setDialogTile('update')
113 114 // 设置数据
114 115 const res = await ErrorCodeApi.getErrorCodeApi(rowId)
115 116 unref(formRef)?.setValues(res)
116   - setDialogTile('update')
117 117 }
118 118  
119 119 // 详情操作
120 120 const handleDetail = async (rowId: number) => {
  121 + setDialogTile('detail')
121 122 // 设置数据
122 123 const res = await ErrorCodeApi.getErrorCodeApi(rowId)
123 124 detailRef.value = res
124   - setDialogTile('detail')
125 125 }
126 126  
127 127 // 删除操作
... ...
yudao-ui-admin-vue3/src/views/system/notice/index.vue
... ... @@ -109,18 +109,18 @@ const handleCreate = () => {
109 109  
110 110 // 修改操作
111 111 const handleUpdate = async (rowId: number) => {
  112 + setDialogTile('update')
112 113 // 设置数据
113 114 const res = await NoticeApi.getNoticeApi(rowId)
114 115 unref(formRef)?.setValues(res)
115   - setDialogTile('update')
116 116 }
117 117  
118 118 // 详情操作
119 119 const handleDetail = async (rowId: number) => {
  120 + setDialogTile('detail')
120 121 // 设置数据
121 122 const res = await NoticeApi.getNoticeApi(rowId)
122 123 detailRef.value = res
123   - setDialogTile('detail')
124 124 }
125 125  
126 126 // 删除操作
... ...
yudao-ui-admin-vue3/src/views/system/notice/notice.data.ts
... ... @@ -34,7 +34,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
34 34 isSearch: true
35 35 },
36 36 {
37   - title: '公告内容', // TODO 星语:详情时,公告展示有办法是 html 么?
  37 + title: '公告内容',
38 38 field: 'content',
39 39 table: {
40 40 type: 'html'
... ...
yudao-ui-admin-vue3/src/views/system/oauth2/client/client.data.ts
... ... @@ -49,21 +49,31 @@ const crudSchemas = reactive<VxeCrudSchema>({
49 49 },
50 50 {
51 51 title: '访问令牌的有效期',
52   - field: 'accessTokenValiditySeconds', // TODO 星语:展示时,要有 xxx 秒
  52 + field: 'accessTokenValiditySeconds',
53 53 form: {
54 54 component: 'InputNumber'
  55 + },
  56 + table: {
  57 + slots: {
  58 + default: 'accessTokenValiditySeconds_default'
  59 + }
55 60 }
56 61 },
57 62 {
58 63 title: '刷新令牌的有效期',
59   - field: 'refreshTokenValiditySeconds', // TODO 星语:展示时,要有 xxx 秒
  64 + field: 'refreshTokenValiditySeconds',
60 65 form: {
61 66 component: 'InputNumber'
  67 + },
  68 + table: {
  69 + slots: {
  70 + default: 'refreshTokenValiditySeconds_default'
  71 + }
62 72 }
63 73 },
64 74 {
65 75 title: '授权类型',
66   - field: 'authorizedGrantTypes', // TODO 星语:详情展示时,应该类似 table 也是多个 tag
  76 + field: 'authorizedGrantTypes',
67 77 table: {
68 78 width: 300,
69 79 slots: {
... ... @@ -74,17 +84,17 @@ const crudSchemas = reactive<VxeCrudSchema>({
74 84 {
75 85 title: '授权范围',
76 86 field: 'scopes', // TODO @星语:带输入的 SELECT
77   - isTable: false // TODO 星语:详情展示时,应该类似 table 也是多个 tag
  87 + isTable: false
78 88 },
79 89 {
80 90 title: '自动授权范围',
81 91 field: 'autoApproveScopes', // TODO @星语:带输入的 SELECT
82   - isTable: false // TODO 星语:详情展示时,应该类似 table 也是多个 tag
  92 + isTable: false
83 93 },
84 94 {
85 95 title: '可重定向的 URI 地址',
86 96 field: 'redirectUris', // TODO @星语:带输入的 SELECT
87   - isTable: false // TODO 星语:详情展示时,应该类似 table 也是多个 tag
  97 + isTable: false
88 98 },
89 99 {
90 100 title: '权限',
... ...
yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue
... ... @@ -12,6 +12,12 @@
12 12 @click="handleCreate()"
13 13 />
14 14 </template>
  15 + <template #accessTokenValiditySeconds_default="{ row }">
  16 + {{ row.accessTokenValiditySeconds + '秒' }}
  17 + </template>
  18 + <template #refreshTokenValiditySeconds_default="{ row }">
  19 + {{ row.refreshTokenValiditySeconds + '秒' }}
  20 + </template>
15 21 <template #authorizedGrantTypes_default="{ row }">
16 22 <el-tag
17 23 :disable-transitions="true"
... ... @@ -61,7 +67,54 @@
61 67 v-if="actionType === 'detail'"
62 68 :schema="allSchemas.detailSchema"
63 69 :data="detailRef"
64   - />
  70 + >
  71 + <template #accessTokenValiditySeconds="{ row }">
  72 + {{ row.accessTokenValiditySeconds + '秒' }}
  73 + </template>
  74 + <template #refreshTokenValiditySeconds="{ row }">
  75 + {{ row.refreshTokenValiditySeconds + '秒' }}
  76 + </template>
  77 + <template #authorizedGrantTypes="{ row }">
  78 + <el-tag
  79 + :disable-transitions="true"
  80 + :key="index"
  81 + v-for="(authorizedGrantType, index) in row.authorizedGrantTypes"
  82 + :index="index"
  83 + >
  84 + {{ authorizedGrantType }}
  85 + </el-tag>
  86 + </template>
  87 + <template #scopes="{ row }">
  88 + <el-tag
  89 + :disable-transitions="true"
  90 + :key="index"
  91 + v-for="(scopes, index) in row.scopes"
  92 + :index="index"
  93 + >
  94 + {{ scopes }}
  95 + </el-tag>
  96 + </template>
  97 + <template #autoApproveScopes="{ row }">
  98 + <el-tag
  99 + :disable-transitions="true"
  100 + :key="index"
  101 + v-for="(autoApproveScopes, index) in row.autoApproveScopes"
  102 + :index="index"
  103 + >
  104 + {{ autoApproveScopes }}
  105 + </el-tag>
  106 + </template>
  107 + <template #redirectUris="{ row }">
  108 + <el-tag
  109 + :disable-transitions="true"
  110 + :key="index"
  111 + v-for="(redirectUris, index) in row.redirectUris"
  112 + :index="index"
  113 + >
  114 + {{ redirectUris }}
  115 + </el-tag>
  116 + </template>
  117 + </Descriptions>
65 118 <template #footer>
66 119 <!-- 按钮:保存 -->
67 120 <XButton
... ... @@ -121,17 +174,17 @@ const handleCreate = () =&gt; {
121 174  
122 175 // 修改操作
123 176 const handleUpdate = async (rowId: number) => {
  177 + setDialogTile('update')
124 178 // 设置数据
125 179 const res = await ClientApi.getOAuth2ClientApi(rowId)
126 180 unref(formRef)?.setValues(res)
127   - setDialogTile('update')
128 181 }
129 182  
130 183 // 详情操作
131 184 const handleDetail = async (rowId: number) => {
  185 + setDialogTile('detail')
132 186 const res = await ClientApi.getOAuth2ClientApi(rowId)
133 187 detailRef.value = res
134   - setDialogTile('detail')
135 188 }
136 189  
137 190 // 删除操作
... ...
yudao-ui-admin-vue3/src/views/system/role/index.vue
... ... @@ -202,18 +202,18 @@ const handleCreate = () =&gt; {
202 202  
203 203 // 修改操作
204 204 const handleUpdate = async (rowId: number) => {
  205 + setDialogTile('update')
205 206 // 设置数据
206 207 const res = await RoleApi.getRoleApi(rowId)
207 208 unref(formRef)?.setValues(res)
208   - setDialogTile('update')
209 209 }
210 210  
211 211 // 详情操作
212 212 const handleDetail = async (rowId: number) => {
  213 + setDialogTile('detail')
213 214 // 设置数据
214 215 const res = await RoleApi.getRoleApi(rowId)
215 216 detailRef.value = res
216   - setDialogTile('detail')
217 217 }
218 218  
219 219 // 删除操作
... ...
yudao-ui-admin-vue3/src/views/system/sms/smsChannel/index.vue
... ... @@ -113,17 +113,17 @@ const handleCreate = () =&gt; {
113 113  
114 114 // 修改操作
115 115 const handleUpdate = async (rowId: number) => {
  116 + setDialogTile('update')
116 117 // 设置数据
117 118 const res = await SmsChannelApi.getSmsChannelApi(rowId)
118 119 unref(formRef)?.setValues(res)
119   - setDialogTile('update')
120 120 }
121 121  
122 122 // 详情操作
123 123 const handleDetail = async (rowId: number) => {
  124 + setDialogTile('detail')
124 125 const res = await SmsChannelApi.getSmsChannelApi(rowId)
125 126 detailData.value = res
126   - setDialogTile('detail')
127 127 }
128 128  
129 129 // 删除操作
... ...