diff --git a/src/assets/images/login-background.png b/src/assets/images/login-background.png new file mode 100644 index 0000000..672fc4a Binary files /dev/null and b/src/assets/images/login-background.png differ diff --git a/src/main.js b/src/main.js index 5e620fd..95200ba 100644 --- a/src/main.js +++ b/src/main.js @@ -19,6 +19,7 @@ import './permission' // permission control import { getDicts, getAllDicts } from "@/api/system/dict/data" import { getConfigKey } from "@/api/system/config" import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi" +import { format } from "@/utils/utils"; // 分页组件 import Pagination from "@/components/Pagination" // 自定义表格工具组件 @@ -50,6 +51,7 @@ Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.download = download Vue.prototype.handleTree = handleTree +Vue.prototype.format = format // 全局组件挂载 Vue.component('DictTag', DictTag) diff --git a/src/permission.js b/src/permission.js index 72760bc..07baae4 100644 --- a/src/permission.js +++ b/src/permission.js @@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request' NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/register', '/app/login', '/app/list', '/app/edit', '/app/map'] +const whiteList = ['/login', '/register', '/app/login', '/app/list', '/app/attribute_edit', '/app/operate_edit', '/app/map', '/app/detail'] const isWhiteList = (path) => { return whiteList.some(pattern => isPathMatch(pattern, path)) diff --git a/src/router/index.js b/src/router/index.js index fce72a4..a63fa1f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -115,7 +115,7 @@ export const constantRoutes = [ }, component: (resolve) => require(['@/views/app/user'], resolve) }, - { //用户页 + { //列表 path: '/app/list', name: 'appList', hidden: true, @@ -124,16 +124,25 @@ export const constantRoutes = [ }, component: (resolve) => require(['@/views/app/list'], resolve) }, - { //用户页 - path: '/app/edit', - name: 'appEdit', + { //属性修改 + path: '/app/attribute_edit', + name: 'appAttributeEdit', hidden: true, meta: { title: '修改', }, - component: (resolve) => require(['@/views/app/edit'], resolve) + component: (resolve) => require(['@/views/app/attribute_edit'], resolve) }, - { //用户页 + { //经营修改 + path: '/app/operate_edit', + name: 'appOperateEdit', + hidden: true, + meta: { + title: '修改', + }, + component: (resolve) => require(['@/views/app/operate_edit'], resolve) + }, + { //地图 path: '/app/map', name: 'appMap', hidden: true, @@ -142,6 +151,15 @@ export const constantRoutes = [ }, component: (resolve) => require(['@/views/app/map'], resolve) }, + { //详情 + path: '/app/detail', + name: 'appDetail', + hidden: true, + meta: { + title: '详情', + }, + component: (resolve) => require(['@/views/app/detail'], resolve) + }, ] // 动态路由,基于用户权限动态去加载 diff --git a/src/utils/request.js b/src/utils/request.js index 811b5ba..ac6e463 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -81,7 +81,7 @@ service.interceptors.response.use(res => { if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { return res.data } - console.log(location) + //console.log(location) if (code === 401) { if (!isRelogin.show) { isRelogin.show = true diff --git a/src/utils/utils.js b/src/utils/utils.js new file mode 100644 index 0000000..5eae968 --- /dev/null +++ b/src/utils/utils.js @@ -0,0 +1,164 @@ + +export function selectDictLabel(datas, value) { + var actions = []; + Object.keys(datas).some((key) => { + if (datas[key].dictValue == ('' + value)) { + actions.push(datas[key].dictLabel); + return true; + } + }) + return actions.join(''); +} + +export function selectDictScheme(datas, value) { + var actions = []; + Object.keys(datas).some((key) => { + if (datas[key].id == ('' + value)) { + actions.push(datas[key].schemeName); + return true; + } + }) + return actions.join(''); +} + +//回退 +export function onClickLeft(){ + history.back(-1); +} + +export function getNowFormatDate(time) { + var date; + if (!time){ + date = new Date(); + }else{ + date = time; + } + var seperator1 = "-"; + var seperator2 = ":"; + var month = date.getMonth() + 1; + var day = date.getDate(); + var hours = date.getHours(); + var minutes = date.getMinutes(); + var seconds = date.getSeconds(); + if (month >= 1 && month <= 9) { + month = "0" + month; + } + if (day >= 0 && day <= 9) { + day = "0" + day; + } + if (hours >= 0 && hours <= 9) { + hours = "0" + hours; + } + if (minutes >= 0 && minutes <= 9) { + minutes = "0" + minutes; + } + if (seconds >= 0 && seconds <= 9) { + seconds = "0" + seconds; + } + var currentdate = date.getFullYear() + seperator1 + month + seperator1 + day + " " + hours + seperator2 + minutes + seperator2 + seconds; + + return currentdate; +} + +export function format(time, format) { + var t = new Date(time); + var tf = function (i) { return (i < 10 ? '0' : '') + i }; + return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) { + switch (a) { + case 'yyyy': + return tf(t.getFullYear()); + break; + case 'MM': + return tf(t.getMonth() + 1); + break; + case 'mm': + return tf(t.getMinutes()); + break; + case 'dd': + return tf(t.getDate()); + break; + case 'HH': + return tf(t.getHours()); + break; + case 'ss': + return tf(t.getSeconds()); + break; + } + }) +} + +/** + * @author Rui.Zhang + * @description 判断是否为银行卡号 + * @param {String} str_cardNo 待校验的数据 + * @returns {Boolean}, true:是银行卡号 + **/ +export function isBankCard (str_cardNo) { + str_cardNo = str_cardNo || String(this); + if ("" == str_cardNo.trim() || undefined == str_cardNo) { + return false; + } + var lastNum = str_cardNo.substr(str_cardNo.length - 1, 1);//取出最后一位(与luhm进行比较) + + var first15Num = str_cardNo.substr(0, str_cardNo.length - 1);//前15或18位 + var newArr=new Array(); + for(var i=first15Num.length-1;i>-1;i--){ //前15或18位倒序存进数组 + newArr.push(first15Num.substr(i,1)); + } + var arrJiShu=new Array(); //奇数位*2的积 <9 + var arrJiShu2=new Array(); //奇数位*2的积 >9 + + var arrOuShu=new Array(); //偶数位数组 + for(var j=0;j9 的分割之后的数组个位数 + var jishu_child2=new Array();//奇数位*2 >9 的分割之后的数组十位数 + for(var h=0;h9 的分割之后的数组个位数之和 + var sumJiShuChild2=0; //奇数位*2 >9 的分割之后的数组十位数之和 + var sumTotal=0; + for(var m=0;m +
+ + + +
+

地块信息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 提交 +
+ +
+ + + + + diff --git a/src/views/app/detail.vue b/src/views/app/detail.vue new file mode 100644 index 0000000..e26f3d5 --- /dev/null +++ b/src/views/app/detail.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/src/views/app/edit.vue b/src/views/app/edit.vue deleted file mode 100644 index fcdb38a..0000000 --- a/src/views/app/edit.vue +++ /dev/null @@ -1,109 +0,0 @@ - - - - - diff --git a/src/views/app/list.vue b/src/views/app/list.vue index 35aea5e..ef5149a 100644 --- a/src/views/app/list.vue +++ b/src/views/app/list.vue @@ -10,12 +10,22 @@ + + + +
- -
+ +
-
334656556565
-
已清查
+
{{item.dkbm}}
+
-
名称名称名称名称名称名
-
67.08
+
{{item.dkmc}}
+
{{item.scmjm}}
@@ -50,25 +60,91 @@ + + diff --git a/src/views/login.vue b/src/views/login.vue index 507ef2b..27e0f07 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -2,7 +2,7 @@