From 784be21ad345a44a2985f8c3fa6db37fb2abefae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Thu, 11 Jul 2024 20:40:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E3=80=81=E5=A4=9A=E9=80=89=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/scDatePicker/index.vue | 64 +++++++++++ src/components/scDialog/index.vue | 42 ++++---- src/components/scMultipleSelect/index.vue | 72 +++++++++++++ src/layout/index.vue | 4 +- src/scui.js | 4 + src/style/pages.scss | 8 +- src/utils/tool.js | 25 +++-- src/views/login/components/commonPage.vue | 7 +- src/views/login/userRegister.vue | 126 +++++++++++----------- src/views/setting/company/index.vue | 23 ++-- 10 files changed, 265 insertions(+), 110 deletions(-) create mode 100644 src/components/scDatePicker/index.vue create mode 100644 src/components/scMultipleSelect/index.vue diff --git a/src/components/scDatePicker/index.vue b/src/components/scDatePicker/index.vue new file mode 100644 index 0000000..3763996 --- /dev/null +++ b/src/components/scDatePicker/index.vue @@ -0,0 +1,64 @@ + + + + + + + diff --git a/src/components/scDialog/index.vue b/src/components/scDialog/index.vue index 276586c..1a37bb3 100644 --- a/src/components/scDialog/index.vue +++ b/src/components/scDialog/index.vue @@ -9,28 +9,28 @@ diff --git a/src/components/scMultipleSelect/index.vue b/src/components/scMultipleSelect/index.vue new file mode 100644 index 0000000..45af96b --- /dev/null +++ b/src/components/scMultipleSelect/index.vue @@ -0,0 +1,72 @@ + + + + + + + diff --git a/src/layout/index.vue b/src/layout/index.vue index 66a1734..696dd13 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -55,8 +55,8 @@
- - + + {{ $CONFIG.APP_NAME }}
diff --git a/src/scui.js b/src/scui.js index 0818548..f065259 100644 --- a/src/scui.js +++ b/src/scui.js @@ -21,6 +21,8 @@ import scWaterMark from './components/scWaterMark' import scQrCode from './components/scQrCode' import ossImgUpload from "./components/scUpload/uploadImg"; import ossImgListUpload from "./components/scUpload/uploadListImg"; +import scDatePicker from "./components/scDatePicker"; +import scMultipleSelect from "./components/scMultipleSelect"; import scStatusIndicator from './components/scMini/scStatusIndicator' import scTrend from './components/scMini/scTrend' @@ -66,6 +68,8 @@ export default { app.component('scTrend', scTrend); app.component('ossImgUpload', ossImgUpload); app.component('ossImgListUpload', ossImgListUpload); + app.component('scDatePicker', scDatePicker); + app.component('scMultipleSelect', scMultipleSelect); //注册全局指令 app.directive('auth', auth) diff --git a/src/style/pages.scss b/src/style/pages.scss index 11d4a06..17d2437 100644 --- a/src/style/pages.scss +++ b/src/style/pages.scss @@ -32,10 +32,10 @@ .common-header-right {display: flex;align-items: center;} .common-header-right a {font-size: 14px;color: var(--el-color-primary);cursor: pointer;} .common-header-right a:hover {color: var(--el-color-primary-light-3);} -.common-container {max-width: 1240px;margin:30px auto 30px auto;} -.common-main {padding:20px;} -.common-title {font-size: 26px;margin-bottom: 20px;font-weight: normal;} -.common-main .el-form {width: 500px;margin:30px auto;} +.common-container {max-width: 1200px;margin:30px auto 30px auto;} +.common-main {padding:20px;border:0;} +.common-title {font-size: 24px;margin-bottom: 20px;font-weight: normal;} +.common-main .el-form {width: 420px;margin:30px auto;} .common-main .el-steps .el-step__title {font-size: 14px;} .common-main .el-steps .el-step__icon {border: 1px solid;} .common-main .yzm {display: flex;width: 100%;} diff --git a/src/utils/tool.js b/src/utils/tool.js index 82edd6a..c71c425 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -148,19 +148,19 @@ tool.objCopy = function (obj) { /* 日期格式化 */ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') { date = new Date(date) - var o = { - "M+" : date.getMonth()+1, //月份 - "d+" : date.getDate(), //日 - "h+" : date.getHours(), //小时 - "m+" : date.getMinutes(), //分 - "s+" : date.getSeconds(), //秒 - "q+" : Math.floor((date.getMonth()+3)/3), //季度 - "S" : date.getMilliseconds() //毫秒 + const o = { + "M+": date.getMonth() + 1, // 月份 + "d+": date.getDate(), // 日 + "h+": date.getHours(), // 小时 + "m+": date.getMinutes(), // 分 + "s+": date.getSeconds(), // 秒 + "q+": Math.floor((date.getMonth() + 3) / 3), // 季度 + "S": date.getMilliseconds() // 毫秒 }; if(/(y+)/.test(fmt)) { - fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); + fmt = fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); } - for(var k in o) { + for(let k in o) { if(new RegExp("("+ k +")").test(fmt)){ fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); } @@ -168,6 +168,11 @@ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') { return fmt; } +tool.getTime = function (date){ + date = new Date(date); + return Math.floor(date.getTime() / 1000); +} + /* 千分符 */ tool.groupSeparator = function (num) { num = num + ''; diff --git a/src/views/login/components/commonPage.vue b/src/views/login/components/commonPage.vue index ccac3d0..3886624 100644 --- a/src/views/login/components/commonPage.vue +++ b/src/views/login/components/commonPage.vue @@ -12,7 +12,7 @@ 返回登录 - +

{{title}}

@@ -31,5 +31,8 @@ } - diff --git a/src/views/login/userRegister.vue b/src/views/login/userRegister.vue index c41d8d5..b0017ec 100644 --- a/src/views/login/userRegister.vue +++ b/src/views/login/userRegister.vue @@ -1,59 +1,51 @@