diff --git a/.env.development b/.env.development index 67b0aeefd192aa6e5dab18ac737831c9b66a9704..e30117693815a7926bbc59254114b9c2b5fb2014 100644 --- a/.env.development +++ b/.env.development @@ -1 +1 @@ -VUE_APP_API_BASE_URL=http://dev.iczer.com +VUE_APP_API_BASE_URL=http://platform.kuopu.net:9300 diff --git a/README.md b/README.md index 2684560693d04d3252fb259e7c2c34684371af5b..7344e31dae778b4ca9e8c1e920a527940a6f2ba7 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,6 @@ $ npm run serve ### 说明 用户名/密码:admin/666666 + + css 工具函数 地址 + https://www.tailwindcss.cn/docs/installation#post-css-7 diff --git a/global.d.ts b/global.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5d66a2aef0aea6030e9654976cc2bd99d3251fe8 --- /dev/null +++ b/global.d.ts @@ -0,0 +1,7 @@ +import Vue from 'vue'; + +declare module 'vue/types/vue' { + interface Vue { + $t: (s: string) => any; + } +} diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..43851bdccce26221bc3fce4effb6dc175799f3ba --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] + } + } +} diff --git a/package.json b/package.json index 6fa200d2f9555a2ac65e574388357edc48395ace..3c6f911523d164d9349bb813f05a0fe38fe6826d 100644 --- a/package.json +++ b/package.json @@ -15,17 +15,19 @@ }, "dependencies": { "@antv/data-set": "^0.11.4", + "@tailwindcss/postcss7-compat": "^2.2.2", "animate.css": "^4.1.0", "ant-design-vue": "1.7.2", "axios": "^0.19.2", "clipboard": "^2.0.6", "core-js": "^3.6.5", + "crypto-js": "^4.0.0", "date-fns": "^2.14.0", "enquire.js": "^2.1.6", "highlight.js": "^10.2.1", - "js-cookie": "^2.2.1", "mockjs": "^1.1.0", "nprogress": "^0.2.0", + "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.2", "viser-vue": "^2.4.8", "vue": "^2.6.11", "vue-i18n": "^8.18.2", diff --git a/src/App.vue b/src/App.vue index ae8793731afb3af999f79a431699a235a9847c40..3246e33a242b764903977bc599fe145ffbe254a1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,27 +20,26 @@ export default { created() { this.setHtmlTitle(); this.setLanguage(this.lang); - enquireScreen((isMobile) => this.setDevice(isMobile)); + enquireScreen(isMobile => this.setDevice(isMobile)); }, mounted() {}, watch: { lang(val) { - this.setLanguage(val); this.setHtmlTitle(); }, $route() { this.setHtmlTitle(); }, - 'theme.mode': function (val) { + 'theme.mode': function(val) { let closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`); changeThemeColor(this.theme.color, val).then(closeMessage); }, - 'theme.color': function (val) { + 'theme.color': function(val) { let closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`); changeThemeColor(val, this.theme.mode).then(closeMessage); }, - layout: function () { + layout: function() { window.dispatchEvent(new Event('resize')); }, }, @@ -77,6 +76,3 @@ export default { }, }; - - diff --git a/src/api/index.js b/src/api/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e5b11052c9eb1333765eb767a7c5677d226f313e --- /dev/null +++ b/src/api/index.js @@ -0,0 +1,5 @@ +import { request, METHOD } from '@/utils'; + +export function getUserDetailInfoApi() { + return request('/api/v1/detail', METHOD.GET); +} diff --git a/src/components/index.js b/src/components/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f49b5a1f4916b9918cdf74d759e8f1a8dfe62924 --- /dev/null +++ b/src/components/index.js @@ -0,0 +1,3 @@ +import Table from './table/index.vue'; + +export { Table }; diff --git a/src/components/page/PageHeader.vue b/src/components/page/PageHeader.vue index ae2c4bafb43a56801839cb9b637935de2a811323..85dc6d35c85c647f683b233ab67a0c1843881fda 100644 --- a/src/components/page/PageHeader.vue +++ b/src/components/page/PageHeader.vue @@ -1,35 +1,10 @@ @@ -63,43 +38,11 @@ export default { diff --git a/src/components/table/index.vue b/src/components/table/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..c2fca438e877f2b9aa3406f1a34b559fe91cbcc7 --- /dev/null +++ b/src/components/table/index.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/src/main.js b/src/main.js index 6a586cdc0c9be107b4adc498258ccfbd7cdf6dfb..1f68627dd7264abed6b6c044af4411f20ac19ef7 100644 --- a/src/main.js +++ b/src/main.js @@ -5,29 +5,29 @@ import Viser from 'viser-vue'; import Router from 'vue-router'; import { initRouter } from './router'; import VueI18n from 'vue-i18n'; -import {accountModule, settingModule} from './pages/frame/store'; +import { accountModule, settingModule } from './pages/frame/store'; import App from './App.vue'; +import 'tailwindcss/tailwind.css'; import 'animate.css/source/animate.css'; import './theme/index.less'; import Plugins from './plugins'; import { loadRoutes, loadGuards, setAppOptions } from './utils/routerUtil'; -import { loadInterceptors } from './utils/requestUtil'; import guards from './router/guards'; -import interceptors from './router/interceptors'; +import { loadResponseInterceptor } from './utils/requestUtil'; -import '@/mock'; +// import '@/mock'; import 'moment/locale/zh-cn'; -//设置为非生产提示 +//设置为非生产提示 Vue.config.productionTip = false; //装载Vuex控件 -Vue.use(Vuex) -//加载 框架的module包括 命名空间accountModule,settingModule +Vue.use(Vuex); +//加载 框架的module包括 命名空间accountModule,settingModule const store = new Vuex.Store({ - modules: {accountModule, settingModule} + modules: { accountModule, settingModule }, }); //装载vue-router控件 如果开发时 不用动态可直接修改这里 isAsynRount=false @@ -43,11 +43,10 @@ const localeLang = store.state.settingModule.lang; //default'EN' const fallbackLang = store.state.settingModule.fallbackLang; const i18n = new VueI18n({ - locale: localeLang, - fallbackLocale: fallbackLang, - silentFallbackWarn: true, + locale: localeLang, + fallbackLocale: fallbackLang, + silentFallbackWarn: true, }); - //装载antd控件 Vue.use(Antd); @@ -59,17 +58,26 @@ Vue.use(Plugins); //启动引导方法应用启动时需要执行的操作放在这里 //设置应用配置 setAppOptions({ router, store, i18n }); -// 加载 axios 拦截器 -loadInterceptors(interceptors, { router, store, i18n, message: Vue.prototype.$message }); + // 加载路由 loadRoutes(); // 加载路由守卫 loadGuards(guards, { router, store, i18n, message: Vue.prototype.$message }); +// this.$notification.open({ +// message: 'Notification Title', +// description: +// 'This is the content of the notification. This is the content of the notification. This is the content of the notification.', +// onClick: () => { +// console.log('Notification Clicked!'); +// }, +// }); + +loadResponseInterceptor({ router }); new Vue({ - router, - store, - i18n, - render: h => h(App), + router, + store, + i18n, + render: h => h(App), }).$mount('#app'); diff --git a/src/mock/frame/tableDataMock.js b/src/mock/frame/tableDataMock.js new file mode 100644 index 0000000000000000000000000000000000000000..c04b95a02d4e83837662b930d55fb005f2a12c3b --- /dev/null +++ b/src/mock/frame/tableDataMock.js @@ -0,0 +1,58 @@ +import Mock from 'mockjs'; + +Mock.mock(`${process.env.VUE_APP_API_BASE_URL}/table`, 'post', () => ({ + data: { + pageNum: 1, + pageSize: 10, + records: [ + { + regionId: 1403455275008032, + regionName: '陈浩玮', + organizationId: 146, + organizationName: '一级系统:巴基斯坦公司', + remark: '123', + editorId: 1, + editorName: '管理员', + editTime: '2021-03-16 22:20:25', + }, + { + regionId: 1403455136596000, + regionName: '地点测试', + organizationId: 212, + organizationName: '吴国', + remark: '123', + editorId: 1, + editorName: '管理员', + editTime: '2021-03-16 22:19:19', + }, + { + regionId: 1400871246102560, + regionName: '陈浩玮测试', + organizationId: 212, + organizationName: '吴国', + remark: '321', + editorId: 1, + editorName: '管理员', + editTime: '2021-03-02 16:04:25', + }, + { + regionId: 1396338094768160, + regionName: '文件地区', + organizationId: 208, + organizationName: '扩普发展', + remark: '123213123123213213223123123', + editorId: 1, + editorName: '管理员', + editTime: '2021-03-02 15:37:11', + }, + ], + total: 4, + size: 10, + current: 1, + pages: 1, + }, + code: 'sys.success', + message: null, + traceId: '1805b654e82a4f2a8357d2f8922d9b19', + meta: null, +})); diff --git a/src/pages/frame/components/header/LayoutTopHeaderLang.vue b/src/pages/frame/components/header/LayoutTopHeaderLang.vue index 8ceab99fd1db7600fb71f6eceb2b5694ea2f1ee7..1aabba52913c0100d461de8472fc856a8a47ffcc 100644 --- a/src/pages/frame/components/header/LayoutTopHeaderLang.vue +++ b/src/pages/frame/components/header/LayoutTopHeaderLang.vue @@ -1,38 +1,35 @@ - - diff --git a/src/pages/frame/layouts/AdminLayout.vue b/src/pages/frame/layouts/AdminLayout.vue index ae7621acdc210956e2463a0c4f0f204df0cf681b..78b4feda0e42f18375c25243782686ab0d06965f 100644 --- a/src/pages/frame/layouts/AdminLayout.vue +++ b/src/pages/frame/layouts/AdminLayout.vue @@ -1,13 +1,29 @@