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,8 +7,9 @@ import { useUserStoreWithOut } from '/@/store/modules/user'; | ||
| 7 | import projectSetting from '/@/settings/projectSetting'; | 7 | import projectSetting from '/@/settings/projectSetting'; |
| 8 | import { SessionTimeoutProcessingEnum } from '/@/enums/appEnum'; | 8 | import { SessionTimeoutProcessingEnum } from '/@/enums/appEnum'; |
| 9 | 9 | ||
| 10 | -const { createMessage, createErrorModal } = useMessage(); | 10 | +const { createMessage } = useMessage(); |
| 11 | const error = createMessage.error!; | 11 | const error = createMessage.error!; |
| 12 | +const success = createMessage.success!; | ||
| 12 | const stp = projectSetting.sessionTimeoutProcessing; | 13 | const stp = projectSetting.sessionTimeoutProcessing; |
| 13 | export function checkStatus( | 14 | export function checkStatus( |
| 14 | status: number, | 15 | status: number, |
| @@ -18,7 +19,6 @@ export function checkStatus( | @@ -18,7 +19,6 @@ export function checkStatus( | ||
| 18 | const { t } = useI18n(); | 19 | const { t } = useI18n(); |
| 19 | const userStore = useUserStoreWithOut(); | 20 | const userStore = useUserStoreWithOut(); |
| 20 | let errMessage = msg; | 21 | let errMessage = msg; |
| 21 | - // console.log('mag11', msg); | ||
| 22 | switch (status) { | 22 | switch (status) { |
| 23 | case 400: | 23 | case 400: |
| 24 | errMessage = `${msg}`; | 24 | errMessage = `${msg}`; |
| @@ -70,7 +70,6 @@ export function checkStatus( | @@ -70,7 +70,6 @@ export function checkStatus( | ||
| 70 | break; | 70 | break; |
| 71 | default: | 71 | default: |
| 72 | } | 72 | } |
| 73 | - | ||
| 74 | if (errMessage) { | 73 | if (errMessage) { |
| 75 | if (errorMessageMode === 'message') { | 74 | if (errorMessageMode === 'message') { |
| 76 | error({ content: errMessage, key: `global_error_message_status_${status}` }); | 75 | error({ content: errMessage, key: `global_error_message_status_${status}` }); |
| @@ -81,4 +80,7 @@ export function checkStatus( | @@ -81,4 +80,7 @@ export function checkStatus( | ||
| 81 | // error({ content: errMessage, key: `global_error_message_status_${status}` }); | 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,15 +56,15 @@ | ||
| 56 | }); | 56 | }); |
| 57 | }); | 57 | }); |
| 58 | const handleSuccess = async (opt) => { | 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 | if (opt.text !== 'test') { | 59 | if (opt.text !== 'test') { |
| 67 | selectScript.script = opt?.res?.id; | 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,7 +38,7 @@ | ||
| 38 | <!-- 按钮 --> | 38 | <!-- 按钮 --> |
| 39 | <a-button type="primary" class="mt-4" @click="addTrigger" v-if="isView"> | 39 | <a-button type="primary" class="mt-4" @click="addTrigger" v-if="isView"> |
| 40 | <PlusOutlined /> | 40 | <PlusOutlined /> |
| 41 | - 新增触发器 | 41 | + 新增触发器<span style="visibility: hidden">发</span> |
| 42 | </a-button> | 42 | </a-button> |
| 43 | <!-- 按钮 --> | 43 | <!-- 按钮 --> |
| 44 | </div> | 44 | </div> |
| @@ -656,6 +656,12 @@ | @@ -656,6 +656,12 @@ | ||
| 656 | try { | 656 | try { |
| 657 | setDrawerProps({ confirmLoading: true }); | 657 | setDrawerProps({ confirmLoading: true }); |
| 658 | getFormValueFunc(); | 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 | const postAddOrEditData = { | 665 | const postAddOrEditData = { |
| 660 | ...basicFormValue, | 666 | ...basicFormValue, |
| 661 | triggers: !unref(getTriggerFormValue).length ? null : unref(getTriggerFormValue), | 667 | triggers: !unref(getTriggerFormValue).length ? null : unref(getTriggerFormValue), |
| @@ -97,7 +97,7 @@ | @@ -97,7 +97,7 @@ | ||
| 97 | 97 | ||
| 98 | //ft add 表单数据置空 | 98 | //ft add 表单数据置空 |
| 99 | const resetConditionScreenForm = () => { | 99 | const resetConditionScreenForm = () => { |
| 100 | - // conditionScreeningList.value = []; | 100 | + conditionScreeningList.value = []; |
| 101 | resetFilter(); | 101 | resetFilter(); |
| 102 | for (let i = 0; i < unref(refItem.conditionScreeningRefs).length; i++) { | 102 | for (let i = 0; i < unref(refItem.conditionScreeningRefs).length; i++) { |
| 103 | unref(refItem.conditionScreeningRefs)[i]?.resetConditionScreenForm(); | 103 | unref(refItem.conditionScreeningRefs)[i]?.resetConditionScreenForm(); |
| @@ -121,3 +121,12 @@ | @@ -121,3 +121,12 @@ | ||
| 121 | resetConditionScreenForm, | 121 | resetConditionScreenForm, |
| 122 | }); | 122 | }); |
| 123 | </script> | 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> |
| 1 | <template> | 1 | <template> |
| 2 | <div | 2 | <div |
| 3 | + style="width: 100%; flex-wrap: wrap" | ||
| 3 | v-if="otherAttribute.length > 0 && otherAttribute[0].value && otherAttribute[0].operation" | 4 | v-if="otherAttribute.length > 0 && otherAttribute[0].value && otherAttribute[0].operation" |
| 4 | class="flex" | 5 | class="flex" |
| 5 | > | 6 | > |
| @@ -231,9 +231,12 @@ | @@ -231,9 +231,12 @@ | ||
| 231 | //TODO-fengtao-清除告警验证 | 231 | //TODO-fengtao-清除告警验证 |
| 232 | //TODO-fengtao-设备验证 | 232 | //TODO-fengtao-设备验证 |
| 233 | const validate = getFieldsValue(); | 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 | if (validate.deviceId == undefined) return createMessage.error('请选择设备'); | 237 | if (validate.deviceId == undefined) return createMessage.error('请选择设备'); |
| 236 | } | 238 | } |
| 239 | + //ft-add-2022-11-22 | ||
| 237 | //TODO-fengtao-设备验证 | 240 | //TODO-fengtao-设备验证 |
| 238 | return { | 241 | return { |
| 239 | ...getFieldsValue(), | 242 | ...getFieldsValue(), |