diff --git a/src/assets/img/icon-xiangyou.png b/src/assets/img/icon-xiangyou.png new file mode 100644 index 0000000..63a09e1 Binary files /dev/null and b/src/assets/img/icon-xiangyou.png differ diff --git a/src/assets/img/icon-yigouxuan.png b/src/assets/img/icon-yigouxuan.png new file mode 100644 index 0000000..d1c0d1c Binary files /dev/null and b/src/assets/img/icon-yigouxuan.png differ 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 @@ + + + + {{item}} + + + + + + + + + + + + + + + + + \ 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 @@ + + + + + + + + + + {{ node.label }} + + + + + + + + + + + + + + + + + + + + 导入数据 + 批量删除 + + + + + + + + + + + + 预览 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + + 取 消 + 确 定 + + + + + + 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 @@ + + + + + + + + + + + + {{introduceText}} + + {{introduceText ? '编辑简介' : '添加简介'}} + + + + + + 取 消 + 确 定 + + + + + + + + + + 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 @@ + + + + + + + + + + + + + {{item.label}} + + + + + + + + + + {{item1.label}} + + + + + + + + + + + + \ 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)
{{introduceText}}
+ + +