Commit 6e614aab3686d7808dd4357f9931f44389ecbee2
Merge branch 'ft_local_dev' into 'main'
fix:修改问题 See merge request huang/yun-teng-iot-front!396
Showing
6 changed files
with
34 additions
and
13 deletions
| ... | ... | @@ -7,8 +7,9 @@ import { useUserStoreWithOut } from '/@/store/modules/user'; |
| 7 | 7 | import projectSetting from '/@/settings/projectSetting'; |
| 8 | 8 | import { SessionTimeoutProcessingEnum } from '/@/enums/appEnum'; |
| 9 | 9 | |
| 10 | -const { createMessage, createErrorModal } = useMessage(); | |
| 10 | +const { createMessage } = useMessage(); | |
| 11 | 11 | const error = createMessage.error!; |
| 12 | +const success = createMessage.success!; | |
| 12 | 13 | const stp = projectSetting.sessionTimeoutProcessing; |
| 13 | 14 | export function checkStatus( |
| 14 | 15 | status: number, |
| ... | ... | @@ -18,7 +19,6 @@ export function checkStatus( |
| 18 | 19 | const { t } = useI18n(); |
| 19 | 20 | const userStore = useUserStoreWithOut(); |
| 20 | 21 | let errMessage = msg; |
| 21 | - // console.log('mag11', msg); | |
| 22 | 22 | switch (status) { |
| 23 | 23 | case 400: |
| 24 | 24 | errMessage = `${msg}`; |
| ... | ... | @@ -70,7 +70,6 @@ export function checkStatus( |
| 70 | 70 | break; |
| 71 | 71 | default: |
| 72 | 72 | } |
| 73 | - | |
| 74 | 73 | if (errMessage) { |
| 75 | 74 | if (errorMessageMode === 'message') { |
| 76 | 75 | error({ content: errMessage, key: `global_error_message_status_${status}` }); |
| ... | ... | @@ -81,4 +80,7 @@ export function checkStatus( |
| 81 | 80 | // error({ content: errMessage, key: `global_error_message_status_${status}` }); |
| 82 | 81 | // } |
| 83 | 82 | } |
| 83 | + if (errMessage == '密码重置成功,请自行通知用户!') { | |
| 84 | + success({ content: errMessage, key: `global_error_message_status_${status}` }); | |
| 85 | + } | |
| 84 | 86 | } | ... | ... |
| ... | ... | @@ -56,15 +56,15 @@ |
| 56 | 56 | }); |
| 57 | 57 | }); |
| 58 | 58 | const handleSuccess = async (opt) => { |
| 59 | - const res = await getScriptManageMeList(); | |
| 60 | - selectOptions.value = res.map((m) => { | |
| 61 | - return { | |
| 62 | - label: m.name, | |
| 63 | - value: m.id, | |
| 64 | - }; | |
| 65 | - }); | |
| 66 | 59 | if (opt.text !== 'test') { |
| 67 | 60 | selectScript.script = opt?.res?.id; |
| 61 | + const res = await getScriptManageMeList(); | |
| 62 | + selectOptions.value = res.map((m) => { | |
| 63 | + return { | |
| 64 | + label: m.name, | |
| 65 | + value: m.id, | |
| 66 | + }; | |
| 67 | + }); | |
| 68 | 68 | } |
| 69 | 69 | }; |
| 70 | 70 | ... | ... |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | <!-- 按钮 --> |
| 39 | 39 | <a-button type="primary" class="mt-4" @click="addTrigger" v-if="isView"> |
| 40 | 40 | <PlusOutlined /> |
| 41 | - 新增触发器 | |
| 41 | + 新增触发器<span style="visibility: hidden">发</span> | |
| 42 | 42 | </a-button> |
| 43 | 43 | <!-- 按钮 --> |
| 44 | 44 | </div> |
| ... | ... | @@ -656,6 +656,12 @@ |
| 656 | 656 | try { |
| 657 | 657 | setDrawerProps({ confirmLoading: true }); |
| 658 | 658 | getFormValueFunc(); |
| 659 | + //新增的代码2022-11-22 | |
| 660 | + if (unref(getTriggerFormValue).length === 0 && unref(getConditionFormValue).length === 0) { | |
| 661 | + createMessage.error('请添加触发器或者执行条件'); | |
| 662 | + throw '请添加触发器或者执行条件'; | |
| 663 | + } | |
| 664 | + //新增的代码2022-11-22 | |
| 659 | 665 | const postAddOrEditData = { |
| 660 | 666 | ...basicFormValue, |
| 661 | 667 | triggers: !unref(getTriggerFormValue).length ? null : unref(getTriggerFormValue), | ... | ... |
| ... | ... | @@ -97,7 +97,7 @@ |
| 97 | 97 | |
| 98 | 98 | //ft add 表单数据置空 |
| 99 | 99 | const resetConditionScreenForm = () => { |
| 100 | - // conditionScreeningList.value = []; | |
| 100 | + conditionScreeningList.value = []; | |
| 101 | 101 | resetFilter(); |
| 102 | 102 | for (let i = 0; i < unref(refItem.conditionScreeningRefs).length; i++) { |
| 103 | 103 | unref(refItem.conditionScreeningRefs)[i]?.resetConditionScreenForm(); |
| ... | ... | @@ -121,3 +121,12 @@ |
| 121 | 121 | resetConditionScreenForm, |
| 122 | 122 | }); |
| 123 | 123 | </script> |
| 124 | + | |
| 125 | +<style lang="less" scoped> | |
| 126 | + :deep(.vben-collapse-container__header) { | |
| 127 | + overflow: hidden !important; | |
| 128 | + overflow-y: scroll !important; | |
| 129 | + white-space: pre !important; | |
| 130 | + height: 93px !important; | |
| 131 | + } | |
| 132 | +</style> | ... | ... |
| ... | ... | @@ -231,9 +231,12 @@ |
| 231 | 231 | //TODO-fengtao-清除告警验证 |
| 232 | 232 | //TODO-fengtao-设备验证 |
| 233 | 233 | const validate = getFieldsValue(); |
| 234 | - if (validate.device == 'PART') { | |
| 234 | + //ft-add-2022-11-22 | |
| 235 | + const type = validate?.outTarget; | |
| 236 | + if (type === 'DEVICE_OUT' && validate.device == 'PART') { | |
| 235 | 237 | if (validate.deviceId == undefined) return createMessage.error('请选择设备'); |
| 236 | 238 | } |
| 239 | + //ft-add-2022-11-22 | |
| 237 | 240 | //TODO-fengtao-设备验证 |
| 238 | 241 | return { |
| 239 | 242 | ...getFieldsValue(), | ... | ... |