Commit 0eef19b36cca12b61e371691890315459ea6cdbf
Merge branch 'ww' into 'main'
perf: scheduled tasks if job groub is report will hidden edit button See merge request huang/yun-teng-iot-front!386
Showing
5 changed files
with
48 additions
and
80 deletions
| @@ -205,11 +205,9 @@ | @@ -205,11 +205,9 @@ | ||
| 205 | <List.Item> | 205 | <List.Item> |
| 206 | <Card hoverable> | 206 | <Card hoverable> |
| 207 | <template #cover> | 207 | <template #cover> |
| 208 | - <img | ||
| 209 | - class="w-36 h-36 flex justify-center items-center" | ||
| 210 | - alt="example" | ||
| 211 | - :src="item.thumbnail || configurationSrc" | ||
| 212 | - /> | 208 | + <div class="h-full w-full !flex justify-center items-center text-center"> |
| 209 | + <img class="w-36 h-36" alt="example" :src="item.thumbnail || configurationSrc" /> | ||
| 210 | + </div> | ||
| 213 | </template> | 211 | </template> |
| 214 | <template class="ant-card-actions" #actions> | 212 | <template class="ant-card-actions" #actions> |
| 215 | <Authority value="api:yt:configuration:center:get_configuration_info:get"> | 213 | <Authority value="api:yt:configuration:center:get_configuration_info:get"> |
| 1 | <template> | 1 | <template> |
| 2 | - <BasicDrawer v-bind="$attrs" title="产品详情" @register="register" width="50%"> | 2 | + <BasicDrawer v-bind="$attrs" title="产品详情" @register="register" width="60%"> |
| 3 | <Tabs :animated="true" v-model:activeKey="activeKey" @change="handlePanelChange"> | 3 | <Tabs :animated="true" v-model:activeKey="activeKey" @change="handlePanelChange"> |
| 4 | <TabPane forceRender key="product" tab="产品"> | 4 | <TabPane forceRender key="product" tab="产品"> |
| 5 | <div class="relative"> | 5 | <div class="relative"> |
| @@ -6,83 +6,60 @@ | @@ -6,83 +6,60 @@ | ||
| 6 | @register="registerTable" | 6 | @register="registerTable" |
| 7 | > | 7 | > |
| 8 | <template #toolbar> | 8 | <template #toolbar> |
| 9 | - <div class="p-column"> | ||
| 10 | - <div class="p-content"> | ||
| 11 | - <a-alert v-if="!isShowBtn" style="width: 511px" type="info" show-icon> | 9 | + <div class="flex-auto"> |
| 10 | + <div class="mb-2"> | ||
| 11 | + <a-alert v-if="!isShowBtn" type="info" show-icon> | ||
| 12 | <template #message> | 12 | <template #message> |
| 13 | - <span | ||
| 14 | - >当前展示的是已发布到线上的功能定义,如需修改,请点击 | 13 | + <span> |
| 14 | + 当前展示的是已发布到线上的功能定义,如需修改,请点击 | ||
| 15 | <span | 15 | <span |
| 16 | @click="handleEditPhysicalModel" | 16 | @click="handleEditPhysicalModel" |
| 17 | - class="ml-2" | ||
| 18 | - style="color: #409eff; cursor: pointer" | 17 | + class="cursor-pointer text-blue-400" |
| 19 | size="small" | 18 | size="small" |
| 20 | - >“编辑物模型”</span | ||
| 21 | - ></span | ||
| 22 | - > | 19 | + > |
| 20 | + “编辑物模型” | ||
| 21 | + </span> | ||
| 22 | + </span> | ||
| 23 | </template> | 23 | </template> |
| 24 | </a-alert> | 24 | </a-alert> |
| 25 | </div> | 25 | </div> |
| 26 | - <div style="height: 20px"></div> | ||
| 27 | - <div class="p-bottom"> | ||
| 28 | - <div> | 26 | + <div class="flex justify-between items-end"> |
| 27 | + <div class="flex gap-2"> | ||
| 29 | <Authority value=""> | 28 | <Authority value=""> |
| 30 | - <div style="display: flex"> | ||
| 31 | - <a-button | ||
| 32 | - v-if="isShowBtn" | ||
| 33 | - style="margin-left: -20px" | ||
| 34 | - type="primary" | ||
| 35 | - @click="handleCreateOrEdit(null)" | ||
| 36 | - > | ||
| 37 | - 新增物模型 | ||
| 38 | - </a-button> | ||
| 39 | - <a-button | ||
| 40 | - :style="[isShowBtn ? { left: 0 + 'px' } : { left: -29 + 'px' }]" | ||
| 41 | - class="ml-2" | ||
| 42 | - type="primary" | ||
| 43 | - @click="handleOpenTsl" | ||
| 44 | - > | ||
| 45 | - 物模型TSL | ||
| 46 | - </a-button> | ||
| 47 | - </div> | 29 | + <a-button v-if="isShowBtn" type="primary" @click="handleCreateOrEdit(null)"> |
| 30 | + 新增物模型 | ||
| 31 | + </a-button> | ||
| 32 | + <a-button type="primary" @click="handleOpenTsl"> 物模型TSL </a-button> | ||
| 48 | </Authority> | 33 | </Authority> |
| 49 | </div> | 34 | </div> |
| 50 | - <div> | 35 | + <div class="flex gap-2"> |
| 51 | <Authority value=""> | 36 | <Authority value=""> |
| 52 | - <div style="display: flex"> | ||
| 53 | - <Popconfirm | ||
| 54 | - title="是否需要发布上线?" | ||
| 55 | - ok-text="确定" | ||
| 56 | - cancel-text="取消" | ||
| 57 | - @confirm="handleEmit" | ||
| 58 | - > | ||
| 59 | - <a-button v-if="isShowBtn" type="primary"> 发布上线 </a-button> | ||
| 60 | - </Popconfirm> | 37 | + <Popconfirm |
| 38 | + title="是否需要发布上线?" | ||
| 39 | + ok-text="确定" | ||
| 40 | + cancel-text="取消" | ||
| 41 | + @confirm="handleEmit" | ||
| 42 | + > | ||
| 43 | + <a-button v-if="isShowBtn" type="primary"> 发布上线 </a-button> | ||
| 44 | + </Popconfirm> | ||
| 45 | + <a-button v-if="isShowBtn" class="!bg-gray-200" type="text" @click="handleReturn"> | ||
| 46 | + 返回 | ||
| 47 | + </a-button> | ||
| 48 | + <Popconfirm | ||
| 49 | + title="您确定要批量删除数据" | ||
| 50 | + ok-text="确定" | ||
| 51 | + cancel-text="取消" | ||
| 52 | + @confirm="handleDeleteOrBatchDelete(null)" | ||
| 53 | + > | ||
| 61 | <a-button | 54 | <a-button |
| 62 | - style="background: #d7d7d7" | ||
| 63 | - v-if="isShowBtn" | ||
| 64 | - class="ml-2" | ||
| 65 | - type="text" | ||
| 66 | - @click="handleReturn" | 55 | + style="display: none" |
| 56 | + type="primary" | ||
| 57 | + color="error" | ||
| 58 | + :disabled="hasBatchDelete" | ||
| 67 | > | 59 | > |
| 68 | - 返回 | 60 | + 批量删除 |
| 69 | </a-button> | 61 | </a-button> |
| 70 | - <Popconfirm | ||
| 71 | - title="您确定要批量删除数据" | ||
| 72 | - ok-text="确定" | ||
| 73 | - cancel-text="取消" | ||
| 74 | - @confirm="handleDeleteOrBatchDelete(null)" | ||
| 75 | - > | ||
| 76 | - <a-button | ||
| 77 | - style="display: none" | ||
| 78 | - type="primary" | ||
| 79 | - color="error" | ||
| 80 | - :disabled="hasBatchDelete" | ||
| 81 | - > | ||
| 82 | - 批量删除 | ||
| 83 | - </a-button> | ||
| 84 | - </Popconfirm> | ||
| 85 | - </div> | 62 | + </Popconfirm> |
| 86 | </Authority> | 63 | </Authority> |
| 87 | </div> | 64 | </div> |
| 88 | </div> | 65 | </div> |
| @@ -227,12 +204,4 @@ | @@ -227,12 +204,4 @@ | ||
| 227 | :deep(.ant-table-body) { | 204 | :deep(.ant-table-body) { |
| 228 | height: auto !important; | 205 | height: auto !important; |
| 229 | } | 206 | } |
| 230 | - | ||
| 231 | - :deep(.ant-divider) { | ||
| 232 | - margin-top: 58px; | ||
| 233 | - } | ||
| 234 | - | ||
| 235 | - :deep(.table-settings) { | ||
| 236 | - margin-top: 58px; | ||
| 237 | - } | ||
| 238 | </style> | 207 | </style> |
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | icon: 'clarity:note-edit-line', | 27 | icon: 'clarity:note-edit-line', |
| 28 | auth: 'api:yt:schedule:update', | 28 | auth: 'api:yt:schedule:update', |
| 29 | onClick: handleCreateOrEdit.bind(null, record), | 29 | onClick: handleCreateOrEdit.bind(null, record), |
| 30 | - ifShow: record.status === 0, | 30 | + ifShow: record.status === 0 && EJobGroup.REPORT !== record.jobGroup, |
| 31 | }, | 31 | }, |
| 32 | { | 32 | { |
| 33 | label: '删除', | 33 | label: '删除', |
| @@ -104,6 +104,7 @@ | @@ -104,6 +104,7 @@ | ||
| 104 | import { useDrawer } from '/@/components/Drawer'; | 104 | import { useDrawer } from '/@/components/Drawer'; |
| 105 | import { Authority } from '/@/components/Authority'; | 105 | import { Authority } from '/@/components/Authority'; |
| 106 | import { useMessage } from '/@/hooks/web/useMessage'; | 106 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 107 | + import { EJobGroup } from './config.data'; | ||
| 107 | 108 | ||
| 108 | const disabledSwitch = ref(false); | 109 | const disabledSwitch = ref(false); |
| 109 | const { createMessage } = useMessage(); | 110 | const { createMessage } = useMessage(); |
| @@ -7,7 +7,7 @@ import { | @@ -7,7 +7,7 @@ import { | ||
| 7 | DataSource, | 7 | DataSource, |
| 8 | GradientInfo, | 8 | GradientInfo, |
| 9 | } from '/@/api/dataBoard/model'; | 9 | } from '/@/api/dataBoard/model'; |
| 10 | -import { isArray } from '/@/utils/is'; | 10 | +import { isArray, isNumber } from '/@/utils/is'; |
| 11 | import { buildUUID } from '/@/utils/uuid'; | 11 | import { buildUUID } from '/@/utils/uuid'; |
| 12 | 12 | ||
| 13 | export interface GradientInfoRecord { | 13 | export interface GradientInfoRecord { |
| @@ -256,7 +256,7 @@ export const update_instrument_2_font = (radioRecord: RadioRecord) => { | @@ -256,7 +256,7 @@ export const update_instrument_2_font = (radioRecord: RadioRecord) => { | ||
| 256 | }; | 256 | }; |
| 257 | 257 | ||
| 258 | const handleValue = (value: any) => { | 258 | const handleValue = (value: any) => { |
| 259 | - return Number(value).toFixed(2); | 259 | + return isNumber(value) ? Number(value).toFixed(2) : 0; |
| 260 | }; | 260 | }; |
| 261 | 261 | ||
| 262 | export const update_instrument_1_value = (params: DashBoardValue) => { | 262 | export const update_instrument_1_value = (params: DashBoardValue) => { |