Commit c2151650fa13c746420aa4ae61713bbb13d3fa82
Merge branch 'main' of http://git.yuntengiot.com/huang/yun-teng-iot-front
Showing
6 changed files
with
44 additions
and
11 deletions
| @@ -29,11 +29,11 @@ const { createMessage, createErrorModal } = useMessage(); | @@ -29,11 +29,11 @@ const { createMessage, createErrorModal } = useMessage(); | ||
| 29 | 29 | ||
| 30 | const getJwtTokenInfo = getAuthCache(REFRESH_TOKEN_KEY); | 30 | const getJwtTokenInfo = getAuthCache(REFRESH_TOKEN_KEY); |
| 31 | const getRefreshTokenInfo = getAuthCache(JWT_TOKEN_KEY); | 31 | const getRefreshTokenInfo = getAuthCache(JWT_TOKEN_KEY); |
| 32 | -console.log(getJwtTokenInfo); | ||
| 33 | -console.log(getRefreshTokenInfo); | 32 | +// console.log(getJwtTokenInfo); |
| 33 | +// console.log(getRefreshTokenInfo); | ||
| 34 | const getRefreshTokenInfo1 = getAuthCache(PROJ_CFG_KEY); | 34 | const getRefreshTokenInfo1 = getAuthCache(PROJ_CFG_KEY); |
| 35 | 35 | ||
| 36 | -console.log(getRefreshTokenInfo1); | 36 | +// console.log(getRefreshTokenInfo1); |
| 37 | 37 | ||
| 38 | /** | 38 | /** |
| 39 | * @description: 数据处理,方便区分多种处理方式 | 39 | * @description: 数据处理,方便区分多种处理方式 |
| @@ -12,14 +12,49 @@ | @@ -12,14 +12,49 @@ | ||
| 12 | <div class="md:w-3/10 w-full enter-y"> | 12 | <div class="md:w-3/10 w-full enter-y"> |
| 13 | <HelpDoc /> | 13 | <HelpDoc /> |
| 14 | </div> | 14 | </div> |
| 15 | + <!-- 密码弹窗 --> | ||
| 16 | + <BasicModal | ||
| 17 | + @register="register" | ||
| 18 | + v-bind="$attrs" | ||
| 19 | + :mask="true" | ||
| 20 | + :showCancelBtn="false" | ||
| 21 | + :showOkBtn="false" | ||
| 22 | + :canFullscreen="false" | ||
| 23 | + :closable="false" | ||
| 24 | + :maskStyle="maskColor" | ||
| 25 | + :height="600" | ||
| 26 | + :width="1500" | ||
| 27 | + :maskClosable="false" | ||
| 28 | + title="请修改密码" | ||
| 29 | + :helpMessage="['请您修改密码']" | ||
| 30 | + > | ||
| 31 | + <PasswordDialog /> | ||
| 32 | + </BasicModal> | ||
| 15 | </div> | 33 | </div> |
| 16 | </template> | 34 | </template> |
| 17 | <script lang="ts" setup> | 35 | <script lang="ts" setup> |
| 18 | - import { ref } from 'vue'; | 36 | + import PasswordDialog from '/@/views/system/password/index.vue'; |
| 37 | + import { BasicModal, useModal } from '/@/components/Modal'; | ||
| 38 | + import { getAuthCache } from '/@/utils/auth'; | ||
| 39 | + import { USER_INFO_KEY } from '/@/enums/cacheEnum'; | ||
| 40 | + import { ref, onMounted } from 'vue'; | ||
| 19 | import GrowCard from './components/GrowCard.vue'; | 41 | import GrowCard from './components/GrowCard.vue'; |
| 20 | import SiteAnalysis from './components/SiteAnalysis.vue'; | 42 | import SiteAnalysis from './components/SiteAnalysis.vue'; |
| 21 | import { Card } from 'ant-design-vue'; | 43 | import { Card } from 'ant-design-vue'; |
| 22 | import HelpDoc from './components/HelpDoc.vue'; | 44 | import HelpDoc from './components/HelpDoc.vue'; |
| 45 | + | ||
| 46 | + const maskColor = ref({ backgroundColor: 'grey' }); | ||
| 47 | + const statusModel = ref(false); | ||
| 48 | + const [register, { openModal }] = useModal(); | ||
| 49 | + onMounted(() => { | ||
| 50 | + const userInfo: object = getAuthCache(USER_INFO_KEY); | ||
| 51 | + if (userInfo.needSetPwd == true) { | ||
| 52 | + statusModel.value = true; | ||
| 53 | + openModal(statusModel.value); | ||
| 54 | + } else if (userInfo.needSetPwd == false) { | ||
| 55 | + openModal(statusModel.value); | ||
| 56 | + } | ||
| 57 | + }); | ||
| 23 | const loading = ref(true); | 58 | const loading = ref(true); |
| 24 | setTimeout(() => { | 59 | setTimeout(() => { |
| 25 | loading.value = false; | 60 | loading.value = false; |
| @@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
| 70 | }); | 70 | }); |
| 71 | 71 | ||
| 72 | //编辑模式,菜单名称为不可用 | 72 | //编辑模式,菜单名称为不可用 |
| 73 | - updateSchema({ field: 'title', componentProps: { disabled: true } }); | 73 | + updateSchema({ field: 'title', componentProps: { disabled: false } }); |
| 74 | } | 74 | } |
| 75 | if (isUpdate.value) { | 75 | if (isUpdate.value) { |
| 76 | menuId = Reflect.get(data.record, 'id'); | 76 | menuId = Reflect.get(data.record, 'id'); |
| @@ -128,7 +128,6 @@ | @@ -128,7 +128,6 @@ | ||
| 128 | status: Reflect.get(values, 'status'), | 128 | status: Reflect.get(values, 'status'), |
| 129 | }; | 129 | }; |
| 130 | Reflect.set(values, 'meta', metaTemp); | 130 | Reflect.set(values, 'meta', metaTemp); |
| 131 | - | ||
| 132 | // saveMenu | 131 | // saveMenu |
| 133 | const data = await saveMenuApi(values, isUpdate.value); | 132 | const data = await saveMenuApi(values, isUpdate.value); |
| 134 | console.log('_______保存返回结果____data:' + data); | 133 | console.log('_______保存返回结果____data:' + data); |
| @@ -54,8 +54,8 @@ export const columns: BasicColumn[] = [ | @@ -54,8 +54,8 @@ export const columns: BasicColumn[] = [ | ||
| 54 | const status = record.meta.status; | 54 | const status = record.meta.status; |
| 55 | const enable = ~~status === 0; | 55 | const enable = ~~status === 0; |
| 56 | const color = enable ? 'green' : 'red'; | 56 | const color = enable ? 'green' : 'red'; |
| 57 | - let enableText: string = t('routes.common.system.tableTitleSystemEnable'); //国际化处理--启用 | ||
| 58 | - let stopText: string = t('routes.common.system.tableTitleSystemStop'); //国际化处理--停用 | 57 | + const enableText: string = t('routes.common.system.tableTitleSystemEnable'); //国际化处理--启用 |
| 58 | + const stopText: string = t('routes.common.system.tableTitleSystemStop'); //国际化处理--停用 | ||
| 59 | const text = enable ? enableText : stopText; | 59 | const text = enable ? enableText : stopText; |
| 60 | return h(Tag, { color: color }, () => text); | 60 | return h(Tag, { color: color }, () => text); |
| 61 | }, | 61 | }, |
| @@ -50,7 +50,6 @@ | @@ -50,7 +50,6 @@ | ||
| 50 | const treeData = ref<TreeItem[]>([]); | 50 | const treeData = ref<TreeItem[]>([]); |
| 51 | const roleMenus = ref<string[]>([]); | 51 | const roleMenus = ref<string[]>([]); |
| 52 | const allCheckedKeys = ref<string[]>([]); | 52 | const allCheckedKeys = ref<string[]>([]); |
| 53 | - const roleHalfCheckedKeys = ref<string[]>([]); | ||
| 54 | const roleId = ref<string>(''); | 53 | const roleId = ref<string>(''); |
| 55 | const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ | 54 | const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ |
| 56 | labelWidth: 90, | 55 | labelWidth: 90, |