dinghao 6 months ago
parent
commit
ab7217f0f0
  1. 17
      hx-ai-intelligent/src/config/app.config.ts
  2. 11
      hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue
  3. 12
      lib/saas/view/system/layout/header.vue
  4. 2
      lib/saas/view/system/layout/tags.vue
  5. 6
      lib/use/use-action.ts

17
hx-ai-intelligent/src/config/app.config.ts

@ -1,6 +1,8 @@
/** @format */ /** @format */
import { dateUtil } from '/nerv-lib/util/date-util'; import { dateUtil } from '/nerv-lib/util/date-util';
import mockResource from './resource.json'; import mockResource from './resource.json';
import { ref } from 'vue';
const value = ref('1');
export const appConfig = { export const appConfig = {
projectType: 'web', projectType: 'web',
@ -16,6 +18,21 @@ export const appConfig = {
// }, // },
// customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'), // customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'),
headerSlotConfig: {
component: 'NsSelect',
componentProps: {
style: { width: '200px' },
placeholder: '请选择',
value,
onChange: (cur) => {
value.value = cur;
},
options: [
{ label: '济阳', value: '1' },
{ label: '临沂', value: '2' },
],
},
},
timeout: 60 * 1000, timeout: 60 * 1000,
userLoginApi: () => { userLoginApi: () => {
return { return {

11
hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue

@ -301,6 +301,7 @@
title: '是否冻结该账户', title: '是否冻结该账户',
icon: createVNode(ExclamationCircleOutlined), icon: createVNode(ExclamationCircleOutlined),
content: createVNode('div', { style: 'color:red;' }, ''), content: createVNode('div', { style: 'color:red;' }, ''),
onOk() { onOk() {
// http // http
// .post('/api/parking_merchant/objs/gateInfo/delete', { // .post('/api/parking_merchant/objs/gateInfo/delete', {
@ -309,10 +310,9 @@
// .then((res) => { // .then((res) => {
// mainRef.value.nsTableRef.reload(); // mainRef.value.nsTableRef.reload();
// }); // });
NsMessage.success('冻结成功'); return new Promise((resolve, reject) => {
}, NsMessage.success('冻结成功');
onCancel() { }).catch(() => console.log('Oops errors!'));
console.log('Cancel');
}, },
class: 'test', class: 'test',
}); });
@ -465,9 +465,6 @@
{ {
label: '删除', label: '删除',
name: 'RoleTypeEdit', name: 'RoleTypeEdit',
dynamicParams: {
uuid: 'uuid',
},
confirm: true, confirm: true,
handle: (record: any, name, reload) => { handle: (record: any, name, reload) => {
console.log(record, name, reload, 'record'); console.log(record, name, reload, 'record');

12
lib/saas/view/system/layout/header.vue

@ -9,6 +9,9 @@
style="width: 192px; height: 48px; object-fit: contain" /> style="width: 192px; height: 48px; object-fit: contain" />
<ns-icon v-else name="headerLogin" class="headerLogin" style="width: auto; height: 48px" /> <ns-icon v-else name="headerLogin" class="headerLogin" style="width: auto; height: 48px" />
</div> </div>
<div>
<component :is="headerSlot.component" v-bind="headerSlot.componentProps" />
</div>
<div class="header-menu"> <div class="header-menu">
<a-menu style="width: 100%" mode="horizontal" :selectedKeys="initHeaderKey"> <a-menu style="width: 100%" mode="horizontal" :selectedKeys="initHeaderKey">
<a-menu-item v-for="item in menuList" :key="item.name"> <a-menu-item v-for="item in menuList" :key="item.name">
@ -157,6 +160,7 @@
import { SettingOutlined, CheckOutlined } from '@ant-design/icons-vue'; import { SettingOutlined, CheckOutlined } from '@ant-design/icons-vue';
import { messagecount } from '/nerv-lib/saas/store/modules/messagecount'; import { messagecount } from '/nerv-lib/saas/store/modules/messagecount';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
// import { appConfig } from '/@/config/app.config.ts';
export default defineComponent({ export default defineComponent({
name: 'NsHeader', name: 'NsHeader',
components: { components: {
@ -170,7 +174,12 @@
}, },
setup: (props: any) => { setup: (props: any) => {
const configStore = appConfigStore(); const configStore = appConfigStore();
const { getThemeConfig: themeConfig } = storeToRefs(configStore); const { getThemeConfig: themeConfig } = storeToRefs(configStore);
console.log(configStore.headerSlotConfig);
const headerSlot = computed(() => {
return configStore.headerSlotConfig;
});
const { getHeaderBellInfo: headerBellInfo } = storeToRefs(configStore); const { getHeaderBellInfo: headerBellInfo } = storeToRefs(configStore);
const messagecountStore = messagecount(); const messagecountStore = messagecount();
const bellInfo = ref(); const bellInfo = ref();
@ -377,6 +386,7 @@
dropOut, dropOut,
getOPMenu, getOPMenu,
configStore, configStore,
headerSlot,
}; };
}, },
beforeUnmount() { beforeUnmount() {
@ -437,7 +447,7 @@
padding: 0; padding: 0;
position: fixed; position: fixed;
top: 0; top: 0;
z-index: 505; z-index: 5;
width: 100%; width: 100%;
background-image: url(/asset/image/header.png); background-image: url(/asset/image/header.png);
background-size: 100% 100%; background-size: 100% 100%;

2
lib/saas/view/system/layout/tags.vue

@ -285,7 +285,7 @@
align-items: center; align-items: center;
position: fixed; position: fixed;
top: 48px; top: 48px;
z-index: 505; z-index: 2;
border-bottom: 1px solid rgba(0, 0, 0, 0.05); border-bottom: 1px solid rgba(0, 0, 0, 0.05);
} }
.nav-shutters-collapsed { .nav-shutters-collapsed {

6
lib/use/use-action.ts

@ -324,7 +324,11 @@ export function useAction(actionParams: actionParams = {}) {
if (handleList.route) return handleList.route(); if (handleList.route) return handleList.route();
if (handleList.api) await handleList.api(); if (handleList.api) await handleList.api();
// handleList.api && showSuccess !== false && NsMessage.success(`${label}成功`); // handleList.api && showSuccess !== false && NsMessage.success(`${label}成功`);
if (handleList.handle) await handleList.handle(data, name, { ...extraData }); try {
if (handleList.handle) await handleList.handle(data, name, { ...extraData });
} catch (error) {
console.log(error);
}
if (isReload) { if (isReload) {
isFunction(reload) && reload(); isFunction(reload) && reload();
} }

Loading…
Cancel
Save