diff --git a/package.json b/package.json index cf4276a..2ad5230 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "element-ui": "^2.15.14", "js-cookie": "^3.0.5", "js-md5": "^0.8.3", + "moment": "^2.30.1", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", "sass-loader": "^14.2.1", diff --git a/src/api/info.js b/src/api/info.js index a224893..599cac1 100644 --- a/src/api/info.js +++ b/src/api/info.js @@ -16,6 +16,13 @@ export async function getInfoList(data) { params: data }); } +export async function getUpdataRecord(data) { + return await request({ + url: '/Extend/basesysteminfolog/SearchSystemList', + method: 'get', + params: data + }); +} export async function updataSystem(data) { let id = data.id; return await request({ diff --git a/src/assets/mockdata/demodata.json b/src/assets/mockdata/demodata.json index 71acf5d..4143df0 100644 --- a/src/assets/mockdata/demodata.json +++ b/src/assets/mockdata/demodata.json @@ -32,5 +32,22 @@ {"title": "清单管理"}, {"title": "查询上报"}, {"title": "数字大屏"} - ] + ], + "infoKeyName": { + "companyId": "主体企业", + "systemType": "系统类型", + "systemName": "系统名称", + "systemClass": "系统分类", + "systemRecordNumber": "备案号", + "recordLicense": "备案许可证", + "platform": "归属平坦", + "domain": "域名", + "systemDownloadVolume": "下载量", + "version": "版本", + "principalName": "负责人姓名", + "principalPhone": "负责人电话", + "officeAddress": "办公地址", + "systemIcon": "系统图标", + "areaId": "所属区县" + } } \ No newline at end of file diff --git a/src/components/InfoEditRecord/index.vue b/src/components/InfoEditRecord/index.vue new file mode 100644 index 0000000..a673ca8 --- /dev/null +++ b/src/components/InfoEditRecord/index.vue @@ -0,0 +1,524 @@ + + + + diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue new file mode 100644 index 0000000..56f5a6b --- /dev/null +++ b/src/components/Pagination/index.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/components/index.js b/src/components/index.js index c7ae740..b5cd59c 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -2,11 +2,16 @@ import InfoForm from '@/components/InfoForm' import CompanyForm from '@/components/CompanyForm' import PasswordForm from '@/components/PasswordForm' import RegisterForm from '@/components/RegisterForm' +import InfoEditRecord from '@/components/InfoEditRecord' +import Pagination from '@/components/Pagination' + export default { install(Vue, options) { Vue.component('InfoForm', InfoForm) Vue.component('CompanyForm', CompanyForm) Vue.component('PasswordForm', PasswordForm) Vue.component('RegisterForm', RegisterForm) + Vue.component('InfoEditRecord', InfoEditRecord) + Vue.component('Pagination', Pagination) } } \ No newline at end of file diff --git a/src/main.js b/src/main.js index c37ef8a..30b2c18 100644 --- a/src/main.js +++ b/src/main.js @@ -7,8 +7,10 @@ import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; import store from './store' import './permission' +import moment from "moment"; Vue.config.productionTip = false +Vue.prototype.$m = moment Vue.use(ElementUI); // 批量引入组件 import components from './components' diff --git a/src/router/index.js b/src/router/index.js index 3ce4a52..bc2e124 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,7 @@ import Vue from "vue"; import VueRouter from "vue-router"; -import Layout from '@/views/HomePage.vue' +import Layout from '@/views/homePage/HomePage.vue' Vue.use(VueRouter); @@ -17,7 +17,7 @@ const router = new VueRouter({ { path: '/homePage', name: 'homePage', - component: () => import('@/components/Overview.vue'), + component: () => import('@/views/overView/Overview.vue'), meta: { title: '首页', icon: 'dashboard', affix: true } }, ] @@ -30,7 +30,7 @@ const router = new VueRouter({ { path: '/infoList', name: 'infoList', - component: () => import('@/components/InfoList.vue'), + component: () => import('@/views/systemPage/InfoList.vue'), meta: { title: '系统', icon: 'dashboard', affix: true } }, ] diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index b85665c..5eaa708 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -1,7 +1,7 @@ // import auth from '@/plugins/auth' import router, { constantRoutes, dynamicRoutes } from '@/router' // import { getRouters } from '@/api/menu' -import Layout from '@/views/HomePage.vue' +import Layout from '@/views/homePage/HomePage.vue' import ParentView from '@/components/ParentView' const permission = { diff --git a/src/utils/scroll-to.js b/src/utils/scroll-to.js new file mode 100644 index 0000000..c5d8e04 --- /dev/null +++ b/src/utils/scroll-to.js @@ -0,0 +1,58 @@ +Math.easeInOutQuad = function(t, b, c, d) { + t /= d / 2 + if (t < 1) { + return c / 2 * t * t + b + } + t-- + return -c / 2 * (t * (t - 2) - 1) + b +} + +// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts +var requestAnimFrame = (function() { + return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } +})() + +/** + * Because it's so fucking difficult to detect the scrolling element, just move them all + * @param {number} amount + */ +function move(amount) { + document.documentElement.scrollTop = amount + document.body.parentNode.scrollTop = amount + document.body.scrollTop = amount +} + +function position() { + return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop +} + +/** + * @param {number} to + * @param {number} duration + * @param {Function} callback + */ +export function scrollTo(to, duration, callback) { + const start = position() + const change = to - start + const increment = 20 + let currentTime = 0 + duration = (typeof (duration) === 'undefined') ? 500 : duration + var animateScroll = function() { + // increment the time + currentTime += increment + // find the value with the quadratic in-out easing function + var val = Math.easeInOutQuad(currentTime, start, change, duration) + // move the document.body + move(val) + // do the animation unless its over + if (currentTime < duration) { + requestAnimFrame(animateScroll) + } else { + if (callback && typeof (callback) === 'function') { + // the animation is done so lets callback + callback() + } + } + } + animateScroll() +} diff --git a/src/views/Systeminfo/AddDialog.vue b/src/views/Systeminfo/AddDialog.vue deleted file mode 100644 index b92539a..0000000 --- a/src/views/Systeminfo/AddDialog.vue +++ /dev/null @@ -1,173 +0,0 @@ - - - - - diff --git a/src/views/HomePage.vue b/src/views/homePage/HomePage.vue index ece6ae2..18cf399 100644 --- a/src/views/HomePage.vue +++ b/src/views/homePage/HomePage.vue @@ -57,7 +57,7 @@ r