From a8695fd8bd56e1cf50e59da9dc0501267c158be2 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 24 Jun 2021 15:10:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86=EF=BC=88?= =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E6=88=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/icon-xiangyou.png | Bin 0 -> 499 bytes src/assets/img/icon-yigouxuan.png | Bin 0 -> 1598 bytes src/components/common/Sidebar.vue | 5 + src/components/page/Data.vue | 110 +++++++++ src/components/page/Framework.vue | 351 +++++++++++++++++++++++++++++ src/components/page/Introduce.vue | 127 +++++++++++ src/components/page/Product.vue | 253 +++++++++++++++++++++ src/components/page/StaffSide.vue | 362 ++++++++++++++++++++++++++++++ src/components/page/Stafftree.vue | 253 +++++++++++++++++++++ src/main.js | 4 +- src/router/index.js | 5 + src/utils/api.js | 17 +- src/utils/core.js | 40 +++- src/utils/http.js | 11 +- 14 files changed, 1528 insertions(+), 10 deletions(-) create mode 100644 src/assets/img/icon-xiangyou.png create mode 100644 src/assets/img/icon-yigouxuan.png create mode 100644 src/components/page/Data.vue create mode 100644 src/components/page/Framework.vue create mode 100644 src/components/page/Introduce.vue create mode 100644 src/components/page/Product.vue create mode 100644 src/components/page/StaffSide.vue create mode 100644 src/components/page/Stafftree.vue diff --git a/src/assets/img/icon-xiangyou.png b/src/assets/img/icon-xiangyou.png new file mode 100644 index 0000000000000000000000000000000000000000..63a09e1b842b2bb628be2e005c18842d4a4ab3f7 GIT binary patch literal 499 zcmV6+-s_TIKWF!;NQL#0DZ1fJXP1 z2V7q9CMF0W0jv{&BCmK53xwbR*23q50ft)zU;75p7l7sj_StlaQOVmrA@l~|Uo>%+ zl|1YVLjM5TR{6AA!R=mzk3<{*+U;L@50}q)7t#$e0r=|@r+LMrP!OU6&Xjd#1EiV{_rz^+bQ@i4I&i)jqZ=Sh8v&D zM#2C{TdJ7|tp_5Kr4>g&@k3B=8&rJ|@_^c-u;P~?)vv=^2O`=>VtR+79(u>(sxL+q zUyUig9MyY0uKEKB^`FQ{PC-J{5+8|$ShVDS7ywC{Db_Lvq_}I6Yc>Z+(oC_IIUvPd plU%boK$2#Pwafu2?waJ9e*vXG3Q$$H+MWOa002ovPDHLkV1lAD(_{bu literal 0 HcmV?d00001 diff --git a/src/assets/img/icon-yigouxuan.png b/src/assets/img/icon-yigouxuan.png new file mode 100644 index 0000000000000000000000000000000000000000..d1c0d1cd913816112c3c01383ccd7a77925faab5 GIT binary patch literal 1598 zcmV-E2EqA>P)(ARN$kvQiOz?H zkU_^S**mlI-CVeT?s?BS@AI7Z zeBAfEFOlcjvRp1cHwCQ*(P|0i8N>nsX6LI@?J@!fEWsXw*lP(!T25l5Yb*cGr5AG* zL`-=WKo5W`s|{*`{T~Cc*&F0WyLPe&h^~?8at=EI%%5P#wN`zYE$H;T$Rp{BWe^ZG zWt{-)YfbY~>O)|?C&(94ZH^HT@ylfp{8q}&YPKz6syDzBO26|2nDRD&&K&b(y#;>?sH^6Ue8FbEt+%Go( zcpZXyx(o#mdqRAZq32}EWEZ}IV7j(A40?ie*CTLU=cp+I0(4}2Cyx9Z#~f}loA;%84N)hlDfFmbfDfKa~_fF znG`#$O#+%0(3}FzHK4f&Hg^Gyf#x-uMG02lk-W#oC6|0Sqoy! ztK-yS8-jqCDSiv+%lLUC9`^*eeLO3udjcY+tOn3;_glL%$WI!YfQVmuAlQ`U*#R6o zZtB(o!anID5!1m7u#2bQ_C|SnywO+XbxA*q-);Omlrs9zov z!D}`EKRt66?o}K4yHoIWM?kb!mWpNLsTS;^pu^M8EFa%^WYo$VK$c66#D2Ko z)~~n51D+}`8v#+D+yi0(fN2oKJRyGVR4H99;+J*^25sseAmR1|_oUph&w=tMju3xO;*ecG^}hxv~(TIQ2z z_k{S_cx^Z-FB<{jUb&GL-UV=7h9bnDLbP}HG3(|jB^UF_Ld(Dq1ea>92VNV{rn>JJ^H-NlXwDrW(bZTt}ZgWLww&UFsE{5CqOBZ9Myru zmYDe*bs1>u>f@IYpUlCi*=O8HD{&EYc8Bf_2^yHxvt|n0i$uAW6bQ0951_(t{O?0aHw!suNI* z(xt4^B%oaWfKrZ9IooPlK+^)UgF#B-5-X?Kma^^U6tJ5Dx_yQ`(4x$NBtWRIr^?gZgUB}}H;%b6LH$R#we!S3>+1jWu^Y&RE#z%M(cTAMvCON-6IN$^ZZW07*qoM6N<$f{bYIO8@`> literal 0 HcmV?d00001 diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index d182cf6..14e45c5 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -81,6 +81,11 @@ export default { icon: 'el-icon-lx-emoji', index: 'curriculum', title: '课程管理' + }, + { + icon: 'el-icon-lx-emoji', + index: 'data', + title: '数据管理' } ] }; diff --git a/src/components/page/Data.vue b/src/components/page/Data.vue new file mode 100644 index 0000000..f49acbf --- /dev/null +++ b/src/components/page/Data.vue @@ -0,0 +1,110 @@ + + + + + \ No newline at end of file diff --git a/src/components/page/Framework.vue b/src/components/page/Framework.vue new file mode 100644 index 0000000..5ac00cd --- /dev/null +++ b/src/components/page/Framework.vue @@ -0,0 +1,351 @@ + + + diff --git a/src/components/page/Introduce.vue b/src/components/page/Introduce.vue new file mode 100644 index 0000000..8898d0d --- /dev/null +++ b/src/components/page/Introduce.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/components/page/Product.vue b/src/components/page/Product.vue new file mode 100644 index 0000000..0debee3 --- /dev/null +++ b/src/components/page/Product.vue @@ -0,0 +1,253 @@ + + + + + \ No newline at end of file diff --git a/src/components/page/StaffSide.vue b/src/components/page/StaffSide.vue new file mode 100644 index 0000000..a8d0da5 --- /dev/null +++ b/src/components/page/StaffSide.vue @@ -0,0 +1,362 @@ + + + diff --git a/src/components/page/Stafftree.vue b/src/components/page/Stafftree.vue new file mode 100644 index 0000000..caad8e0 --- /dev/null +++ b/src/components/page/Stafftree.vue @@ -0,0 +1,253 @@ + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 9211f8a..0fea15c 100644 --- a/src/main.js +++ b/src/main.js @@ -16,7 +16,7 @@ import api from './utils/api'; import store from './store' import config from '@/config' import { systemStatus, systemTypeStatus, systemAttributionStatus, courseTypeStatus, - hoursStatus, roleStatus, orderTypeFn, orderStatusFn, orderNatureFn, Percentage, removeByValue, isIE } from './utils/core'; + hoursStatus, roleStatus, orderTypeFn, orderStatusFn, orderNatureFn, Percentage, removeByValue, isIE, encodeString, formatDate } from './utils/core'; import preventReClick from './store/preventReClick' //防多次点击,重复提交 @@ -39,6 +39,8 @@ Vue.prototype.orderNatureFn = orderNatureFn; Vue.prototype.Percentage = Percentage; Vue.prototype.removeByValue = removeByValue; Vue.prototype.isIE = isIE; +Vue.prototype.encodeString = encodeString; +Vue.prototype.formatDate = formatDate; Vue.config.productionTip = false; Vue.use(VueI18n); diff --git a/src/router/index.js b/src/router/index.js index 146964b..7a579ec 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -71,6 +71,11 @@ export default new Router({ component: () => import(/* webpackChunkName: "form" */ '../components/page/AddLink.vue'), meta: { title: '添加环节' } }, + { + path: '/data', + component: () => import(/* webpackChunkName: "form" */ '../components/page/Data.vue'), + meta: { title: '数据管理' } + }, { // 国际化组件 path: '/i18n', diff --git a/src/utils/api.js b/src/utils/api.js index df88fbf..4805142 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -2,7 +2,7 @@ // let host = 'http://192.168.31.117:8080' // let host = 'http://www.huorantech.cn/liuwanr' let host = 'http://39.108.250.202' -// let host = 'http://www.liuwanr.cn:8080' +let host1 = 'http://192.168.31.216:8888' export default { logins: `${host}/liuwanr/userInfo/adminLogins`, //登录 @@ -94,8 +94,15 @@ export default { uploadFiles: `${host}/liuwanr/aliyun/uploadFiles`, //上传文件 downloadFiles: `${host}/liuwanr/aliyun/downloadFiles`, //下载文件 -} - - - + // 数据管理 + getIdQueryTable:`${host1}/data/huoran/data/table/getIdQueryTable`, + getTableByClassification:`${host1}/data/huoran/data/table/getTableByClassification`, + getTableByCondition:`${host1}/data/huoran/data/table/getTableByCondition`, + saveCategory:`${host1}/data/huoran/data/table/saveCategory`, + saveTable:`${host1}/data/huoran/data/table/saveTable`, + updateCategory:`${host1}/data/huoran/data/table/updateCategory`, + deleteCategory:`${host1}/data/huoran/data/table/deleteCategory`, + deleteTable:`${host1}/data/huoran/data/table/deleteTable`, + previewData:`${host1}/data/data/preview`, +} \ No newline at end of file diff --git a/src/utils/core.js b/src/utils/core.js index 833d6eb..1ea00ad 100644 --- a/src/utils/core.js +++ b/src/utils/core.js @@ -156,6 +156,42 @@ function isIE() { if (!!window.ActiveXObject || "ActiveXObject" in window) return true return false } +function encodeString(str) { + if(str.includes('[') || str.includes(']')){ + let newStr = '' + for(let i of str){ + if(i == '[' || i == ']'){ + newStr += encodeURI(i) + }else{ + newStr += i + } + } + return newStr + } + return str +} +//返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss" +function formatDate(fmt,date) { + var date = date ? date : new 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() //毫秒 + }; + if(/(y+)/.test(fmt)) { + fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); + } + for(var 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))); + } + } + return fmt; +} export { fMoney, @@ -174,5 +210,7 @@ export { getBirth, getSex, removeByValue, - isIE + isIE, + encodeString, + formatDate } \ No newline at end of file diff --git a/src/utils/http.js b/src/utils/http.js index 4b58f4b..e819b5a 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -168,8 +168,9 @@ export function get(url, params){ ); break; } + }else{ + resolve(res.data) } - }) .catch(err => { reject(err.data) @@ -229,6 +230,8 @@ export function post(url, params) { ); break; } + }else{ + resolve(res.data) } }) .catch(err => { @@ -295,8 +298,9 @@ export function post(url, params) { ); break; } + }else{ + resolve(res.data) } - }) .catch(err => { reject(err.data) @@ -359,8 +363,9 @@ export function put(url, params){ ); break; } + }else{ + resolve(res.data) } - }) .catch(err => { reject(err.data)