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