작성자 | SHA1 | 메시지 | 날짜 |
---|---|---|---|
|
e0f7594b7f | 地图渲染 | 1 시간 전 |
|
5a66280b66 | 统计分析预警分析 | 2 시간 전 |
|
637085b2aa | xx预警清单 | 2 시간 전 |
|
4cbcb465ac | 资金往来不规范预警分析 | 2 시간 전 |
|
c16845a79f | 资金往来敏感词预警分析 | 3 시간 전 |
|
64753e9273 | 资金往来不规范预警排名 | 3 시간 전 |
|
b041e53832 | 资金往来敏感词预警排名 | 4 시간 전 |
|
f1d0fc3bb0 | 资金支出大额预警排名 | 4 시간 전 |
|
dac4df1580 | 资金支出分析 | 3 일 전 |
|
c9493b9b97 | 饼图和线图 | 3 일 전 |
|
84eb6adbd5 | 滚动图标封装 | 3 일 전 |
|
f2a4491d45 | 货币资金分析 | 4 일 전 |
|
f607bfa181 | 组件布局 | 4 일 전 |
|
f91cb02b7f | 项目初始化 | 4 일 전 |
@@ -0,0 +1,7 @@ | |||
rongxin_credit_expo.js | |||
/utils | |||
/config | |||
/routes | |||
/services | |||
/src/assets | |||
/loader |
@@ -0,0 +1,35 @@ | |||
module.exports = { | |||
root: true, | |||
parserOptions: { | |||
parser: "babel-eslint", | |||
}, | |||
env: { | |||
browser: true, | |||
}, | |||
extends: ["plugin:vue/essential"], | |||
// required to lint *.vue files | |||
plugins: ["vue"], | |||
// add your custom rules here | |||
rules: { | |||
// quotes: [2, "single"], | |||
// "default-case": "error", | |||
// semi: [2, "always"], // 语句强制分号结尾 | |||
// "key-spacing": [1, { beforeColon: false, afterColon: true }], // 对象字面量中冒号的前后空格 | |||
// "no-multiple-empty-lines": [1, { max: 1 }], // 空行最多不能超过2行 | |||
// "no-dupe-keys": 2, // 在创建对象字面量时不允许键重复 {a:1,a:1} | |||
// "no-spaced-func": 2, // 函数调用时 函数名与()之间不能有空格 | |||
// "no-trailing-spaces": 1, // 一行结束后面不要有空格 | |||
// "no-unreachable": 2, // 不能有无法执行的代码 | |||
// "no-unused-vars": [2, { vars: "all", args: "after-used" }], // 不能有声明后未被使用的变量或参数 | |||
// "no-var": 0, // 禁用var,用let和const代替 | |||
// "comma-dangle": [2, "never"], // 对象字面量项尾不能有逗号 | |||
// "comma-spacing": 1, // 逗号前后的空格 | |||
// "comma-style": [2, "last"], // 逗号风格,换行时在行首还是行尾 | |||
// eqeqeq: 2, // 必须使用全等 | |||
// indent: [2, 2], // 缩进风格 | |||
// "spaced-comment": 1, // 注释风格要不要有空格 | |||
// "eol-last": 2, // 文件以单一的换行符结束 | |||
// "semi-spacing": [2, { before: false, after: true }], // 分号前后空格 | |||
// "arrow-spacing": 2, // =>的前/后括号 | |||
}, | |||
}; |
@@ -0,0 +1,24 @@ | |||
.DS_Store | |||
node_modules | |||
/dist | |||
.editorconfig | |||
output.js | |||
package-lock.json | |||
# local env files | |||
.env.local | |||
.env.*.local | |||
# Log files | |||
npm-debug.log* | |||
yarn-debug.log* | |||
yarn-error.log* | |||
# Editor directories and files | |||
.idea | |||
.vscode | |||
*.suo | |||
*.ntvs* | |||
*.njsproj | |||
*.sln | |||
*.sw? |
@@ -0,0 +1,3 @@ | |||
module.exports = { | |||
presets: ['@vue/app'] | |||
}; |
@@ -0,0 +1,96 @@ | |||
{ | |||
"name": "rongxin.nongjing.expo", | |||
"version": "0.1.0", | |||
"private": true, | |||
"scripts": { | |||
"serve": "vue-cli-service serve --open", | |||
"clean": "echo 'do nothing right now'", | |||
"install": "npm update && npm rebuild", | |||
"codegen": "echo 'do nothing right now'", | |||
"build": "vue-cli-service build", | |||
"clean:dev": "echo 'do nothing right now'", | |||
"install:dev": "npm run install", | |||
"codegen:dev": "echo 'do nothing right now'", | |||
"build:dev": "npm run build", | |||
"clean:test": "echo 'do nothing right now'", | |||
"install:test": "npm run install", | |||
"codegen:test": "echo 'do nothing right now'", | |||
"build:test": "npm run build", | |||
"clean:stage": "echo 'do nothing right now'", | |||
"install:stage": "npm run install", | |||
"codegen:stage": "echo 'do nothing right now'", | |||
"build:stage": "npm run build", | |||
"clean:prod": "echo 'do nothing right now'", | |||
"install:prod": "npm run install", | |||
"codegen:prod": "echo 'do nothing right now'", | |||
"build:prod": "npm run build", | |||
"lint": "vue-cli-service lint" | |||
}, | |||
"dependencies": { | |||
"@antv/data-set": "0.11.1", | |||
"@antv/g2": "3.5.9", | |||
"@antv/g6": "2.1.3", | |||
"@turf/turf": "^6.5.0", | |||
"config": "1.30.0", | |||
"connect-redis": "3.3.3", | |||
"core-js": "3.19.1", | |||
"d3-force": "1.1.2", | |||
"echarts": "5.5.1", | |||
"echarts-gl": "2.0.8", | |||
"element-resize-detector": "1.2.4", | |||
"element-ui": "2.13.0", | |||
"ezuikit-js": "^0.6.1", | |||
"jquery": "3.4.1", | |||
"ol": "6.1.1", | |||
"proj4": "2.5.0", | |||
"v-scale-screen": "^1.0.2", | |||
"vue": "2.6.10", | |||
"vue-awesome-swiper": "3.1.3", | |||
"vue-baidu-map": "0.21.22", | |||
"vue-router": "3.0.6", | |||
"vuex": "3.1.2", | |||
"vuex-persist": "2.2.0" | |||
}, | |||
"devDependencies": { | |||
"@vue/cli-plugin-babel": "4.0.0", | |||
"@vue/cli-plugin-eslint": "4.0.0", | |||
"@vue/cli-plugin-router": "4.0.0", | |||
"@vue/cli-service": "4.0.0", | |||
"@vue/eslint-config-standard": "4.0.0", | |||
"axios": "0.19.0", | |||
"babel-cli": "^6.26.0", | |||
"babel-eslint": "10.0.1", | |||
"babel-preset-es2015": "^6.24.1", | |||
"eslint": "5.16.0", | |||
"eslint-plugin-vue": "5.0.0", | |||
"lodash.debounce": "4.0.8", | |||
"node-sass": "^4.14.1", | |||
"sass-loader": "8.0.0", | |||
"vue-axios": "2.1.4", | |||
"vue-seamless-scroll": "^1.1.23", | |||
"vue-template-compiler": "2.6.10" | |||
}, | |||
"eslintConfig": { | |||
"root": true, | |||
"env": { | |||
"node": true | |||
}, | |||
"extends": [ | |||
"plugin:vue/essential", | |||
"@vue/standard" | |||
], | |||
"rules": {}, | |||
"parserOptions": { | |||
"parser": "babel-eslint" | |||
} | |||
}, | |||
"postcss": { | |||
"plugins": { | |||
"autoprefixer": {} | |||
} | |||
}, | |||
"browserslist": [ | |||
"> 1%", | |||
"last 2 versions" | |||
] | |||
} |
@@ -0,0 +1,57 @@ | |||
<!DOCTYPE html> | |||
<html lang="en"> | |||
<head> | |||
<meta charset="utf-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |||
<meta name="viewport" content="width=device-width,initial-scale=0.8"> | |||
<!-- <link rel="icon" href="./zyic.ico"> --> | |||
<title>中农融信</title> | |||
</head> | |||
<body> | |||
<noscript> | |||
<strong>We're sorry but mine doesn't work properly without JavaScript enabled. Please enable it to | |||
continue.</strong> | |||
</noscript> | |||
<div id="app"></div> | |||
<script> | |||
</script> | |||
<script id="vertexShader" type="x-shader/x-vertex"> | |||
varying vec2 vUv; | |||
attribute float percent; | |||
uniform float u_time; | |||
uniform float number; | |||
uniform float speed; | |||
uniform float length; | |||
varying float opacity; | |||
uniform float size; | |||
void main() | |||
{ | |||
vUv = uv; | |||
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); | |||
float l = clamp(1.0-length,0.0,1.0); | |||
gl_PointSize = clamp(fract(percent*number + l - u_time*number*speed)-l ,0.0,1.) * size * (1./length); | |||
opacity = gl_PointSize/size; | |||
gl_Position = projectionMatrix * mvPosition; | |||
} | |||
</script> | |||
<!-- fragment shader a.k.a. pixel shader --> | |||
<script id="fragmentShader" type="x-shader/x-vertex"> | |||
#ifdef GL_ES | |||
precision mediump float; | |||
#endif | |||
varying float opacity; | |||
uniform vec3 color; | |||
void main(){ | |||
if(opacity <=0.2){ | |||
discard; | |||
} | |||
gl_FragColor = vec4(color,1.0); | |||
} | |||
</script> | |||
<!-- built files will be auto injected --> | |||
</body> | |||
</html> |
@@ -0,0 +1,3 @@ | |||
http://218.59.175.43:92/index | |||
demo | |||
Rx@345678 |
@@ -0,0 +1,15 @@ | |||
<template> | |||
<v-scale-screen width="1920" height="1080"> | |||
<div id="app"> | |||
<router-view /> | |||
</div> | |||
</v-scale-screen> | |||
</template> | |||
<script> | |||
export default { | |||
}; | |||
</script> | |||
<style lang='scss' scoped> | |||
</style> |
@@ -0,0 +1 @@ | |||
import request from '@/utils/request'; |
@@ -0,0 +1,10 @@ | |||
import request from '@/utils/request'; | |||
// 获取用户详细信息 | |||
export function getInfo () { | |||
return request({ | |||
url: 'api/getInfo', | |||
method: 'get' | |||
}) | |||
} |
@@ -0,0 +1,53 @@ | |||
import request from '@/utils/request' | |||
// 查询审批记录列表 | |||
export function listApprove(query) { | |||
return request({ | |||
url: '/system/approve/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询审批记录详细 | |||
export function getApprove(id) { | |||
return request({ | |||
url: '/system/approve/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增审批记录 | |||
export function addApprove(data) { | |||
return request({ | |||
url: '/system/approve/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改审批记录 | |||
export function updateApprove(data) { | |||
return request({ | |||
url: '/system/approve/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除审批记录 | |||
export function delApprove(id) { | |||
return request({ | |||
url: '/system/approve/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出审批记录 | |||
export function exportApprove(query) { | |||
return request({ | |||
url: '/system/approve/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,62 @@ | |||
import request from '@/utils/request' | |||
// 查询附件信息列表 | |||
export function listAttachment(query) { | |||
return request({ | |||
url: '/system/attachment/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询附件信息详细 | |||
export function getAttachment(id) { | |||
return request({ | |||
url: '/system/attachment/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 查询附件信息详细 | |||
export function findAttachment(data) { | |||
return request({ | |||
url: '/system/attachment/find', | |||
method: 'get', | |||
params: data | |||
}) | |||
} | |||
// 新增附件信息 | |||
export function addAttachment(data) { | |||
return request({ | |||
url: '/system/attachment/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改附件信息 | |||
export function updateAttachment(data) { | |||
return request({ | |||
url: '/system/attachment/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除附件信息 | |||
export function delAttachment(id) { | |||
return request({ | |||
url: '/system/attachment/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出附件信息 | |||
export function exportAttachment(query) { | |||
return request({ | |||
url: '/system/attachment/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,80 @@ | |||
import request from '@/utils/request' | |||
// 查询文件配置树 | |||
export function treeView(query) { | |||
return request({ | |||
url: '/system/attachmentConfig/treeView', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询文件配置树 | |||
export function treeSingleProcessView(query) { | |||
return request({ | |||
url: '/system/attachmentConfig/treeSingleProcessView', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询附件上传配置列表 | |||
export function listAttachmentConfig(query) { | |||
return request({ | |||
url: '/system/attachmentConfig/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询附件上传配置详细 | |||
export function getAttachmentConfig(id) { | |||
return request({ | |||
url: '/system/attachmentConfig/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增附件上传配置 | |||
export function addAttachmentConfig(data) { | |||
return request({ | |||
url: '/system/attachmentConfig/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改附件上传配置 | |||
export function updateAttachmentConfig(data) { | |||
return request({ | |||
url: '/system/attachmentConfig/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除附件上传配置 | |||
export function delAttachmentConfig(id) { | |||
return request({ | |||
url: '/system/attachmentConfig/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出附件上传配置 | |||
export function exportAttachmentConfig(query) { | |||
return request({ | |||
url: '/system/attachmentConfig/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询文件配置树 | |||
export function getAttachmentConfigTree(query) { | |||
return request({ | |||
url: '/system/attachmentConfig/getAttachmentConfigTree', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,53 @@ | |||
import request from '@/utils/request' | |||
// 查询用户和账套关系列表 | |||
export function listBook(query) { | |||
return request({ | |||
url: '/system/book/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询用户和账套关系详细 | |||
export function getBook(userId) { | |||
return request({ | |||
url: '/system/book/get/' + userId, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增用户和账套关系 | |||
export function addBook(data) { | |||
return request({ | |||
url: '/system/book/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改用户和账套关系 | |||
export function updateBook(data) { | |||
return request({ | |||
url: '/system/book/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除用户和账套关系 | |||
export function delBook(userId) { | |||
return request({ | |||
url: '/system/book/remove/' + userId, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出用户和账套关系 | |||
export function exportBook(query) { | |||
return request({ | |||
url: '/system/book/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,103 @@ | |||
import request from '@/utils/request' | |||
// 查询参数列表 | |||
export function listConfig (query) { | |||
return request({ | |||
url: '/system/config/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询参数详细 | |||
export function getConfig (configId) { | |||
return request({ | |||
url: '/api/system/config/get/' + configId, | |||
method: 'get' | |||
}) | |||
} | |||
// 根据参数键名查询参数值 | |||
export function getConfigKey (configKey) { | |||
return request({ | |||
url: '/api/system/config/configKey/' + configKey, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增参数配置 | |||
export function addConfig (data) { | |||
return request({ | |||
url: '/system/config/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改参数配置 | |||
export function updateConfig (data) { | |||
return request({ | |||
url: '/system/config/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除参数配置 | |||
export function delConfig (configId) { | |||
return request({ | |||
url: '/system/config/remove/' + configId, | |||
method: 'get' | |||
}) | |||
} | |||
// 清理参数缓存 | |||
export function clearCache () { | |||
return request({ | |||
url: '/system/config/clearCache', | |||
method: 'get' | |||
}) | |||
} | |||
// 导出参数 | |||
export function exportConfig (query) { | |||
return request({ | |||
url: '/system/config/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
//查询geoserver服务地址 | |||
export function getGeoServerConfigKey () { | |||
return request({ | |||
url: '/system/config/configKey/' + "system.geoServer.url", | |||
method: 'get' | |||
}) | |||
} | |||
// 查询application.yml键值 | |||
export function propValue (key) { | |||
return request({ | |||
url: '/system/config/prop/' + key, | |||
method: 'get' | |||
}) | |||
} | |||
export function getProperty (key, def) { | |||
return propValue(key).then((resp) => { | |||
return new Promise(function (resolve, reject) { | |||
resolve(resp.code == 200 && resp.data !== null ? resp.data : def); | |||
}); | |||
}).catch((e) => { | |||
return new Promise(function (resolve, reject) { | |||
resolve(def); | |||
}); | |||
}); | |||
} | |||
export function usingExternalUploadService () { | |||
return request({ | |||
url: '/system/config/usingExternalUploadService', | |||
method: 'get' | |||
}) | |||
} |
@@ -0,0 +1,208 @@ | |||
import request from '@/utils/request' | |||
// 查询部门列表 | |||
export function listDept (query) { | |||
return request({ | |||
url: '/system/dept/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询部门列表(排除节点) | |||
export function listDeptExcludeChild (deptId) { | |||
return request({ | |||
url: '/system/dept/list/exclude/' + deptId, | |||
method: 'get' | |||
}) | |||
} | |||
// 查询部门详细 | |||
export function getDept (deptId) { | |||
return request({ | |||
url: '/system/dept/get/' + deptId, | |||
method: 'get' | |||
}) | |||
} | |||
// 查询部门下拉树结构 | |||
export function treeselect () { | |||
return request({ | |||
url: '/system/dept/treeselect', | |||
method: 'get' | |||
}) | |||
} | |||
// 查询部门下拉树结构 | |||
export function treeselectByDeptId (query) { | |||
return request({ | |||
url: 'api/system/dept/treeselectByDeptId', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询部门 | |||
export function listData (query) { | |||
return request({ | |||
url: '/system/userDept/listData', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询组织机构下拉树结构 | |||
export function treeselectByUser () { | |||
return request({ | |||
url: '/system/dept/treeselectByUser', | |||
method: 'get' | |||
}) | |||
} | |||
// 查询级联账套下拉 | |||
export function listByDeptId (query) { | |||
return request({ | |||
url: '/finance/book/listByDeptId', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
//视图预览 查询级联账套下拉 | |||
export function listByDeptIdAndBusinessKey (query) { | |||
return request({ | |||
url: '/finance/book/listByDeptIdAndBusinessKey', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
//提交部门权限 | |||
export function userDept (data) { | |||
return request({ | |||
url: '/system/userDept/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 根据角色ID查询部门树结构 | |||
export function roleDeptTreeselect (roleId) { | |||
return request({ | |||
url: '/system/dept/roleDeptTreeselect/' + roleId, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增部门 | |||
export function addDept (data) { | |||
return request({ | |||
url: '/system/dept/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改部门 | |||
export function updateDept (data) { | |||
return request({ | |||
url: '/system/dept/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除部门 | |||
export function delDept (deptId) { | |||
return request({ | |||
url: '/system/dept/remove/' + deptId, | |||
method: 'get' | |||
}) | |||
} | |||
// 切换账套 | |||
export function changeBook (query) { | |||
return request({ | |||
url: '/system/user/changeBook', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 切换部门 | |||
export function changeDept (query) { | |||
return request({ | |||
url: '/system/user/changeDept', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
//右上代办事项闹铃-通用级 | |||
export function noticeCount (businessOwnership) { | |||
return request({ | |||
url: '/home/notice/count/' + businessOwnership, | |||
method: 'get' | |||
}) | |||
} | |||
//右上 帮助中心 | |||
export function systemModel (query) { | |||
return request({ | |||
url: '/home/system/model/' + query, | |||
method: 'get', | |||
// params: query | |||
}) | |||
} | |||
//查询账套权限列表 | |||
export function systemBookList (query) { | |||
return request({ | |||
url: '/system/book/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
//提交账套权限 | |||
export function bookDept (data) { | |||
return request({ | |||
url: '/system/book/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 根据deptId查询所在区县 | |||
export function getCountyInfoByDeptId (deptId) { | |||
return request({ | |||
url: '/system/dept/getCountyInfoByDeptId/' + deptId, | |||
method: 'get' | |||
}) | |||
} | |||
// 根据deptId查询所在乡镇 | |||
export function getTownInfoByDeptId (deptId) { | |||
return request({ | |||
url: '/system/dept/getTownInfoByDeptId/' + deptId, | |||
method: 'get' | |||
}) | |||
} | |||
// 更新所有部门的坐标信息 | |||
export function coordinatesUpdate () { | |||
return request({ | |||
url: '/system/dept/coordinatesUpdate', | |||
method: 'get' | |||
}) | |||
} | |||
// 获取当前部门的信息 | |||
export function getCurrentDept () { | |||
return request({ | |||
url: '/system/dept/get/current', | |||
method: 'get', | |||
}) | |||
} |
@@ -0,0 +1,70 @@ | |||
import request from '@/utils/request' | |||
// 查询字典数据列表 | |||
export function listData(query) { | |||
return request({ | |||
url: '/system/dict/data/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询字典数据详细 | |||
export function getData(dictCode) { | |||
return request({ | |||
url: '/system/dict/data/get/' + dictCode, | |||
method: 'get' | |||
}) | |||
} | |||
// 根据字典类型查询字典数据信息 | |||
export function getDicts(dictType) { | |||
return request({ | |||
url: '/system/dict/data/type/' + dictType, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增字典数据 | |||
export function addData(data) { | |||
return request({ | |||
url: '/system/dict/data/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改字典数据 | |||
export function updateData(data) { | |||
return request({ | |||
url: '/system/dict/data/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除字典数据 | |||
export function delData(dictCode) { | |||
return request({ | |||
url: '/system/dict/data/remove/' + dictCode, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出字典数据 | |||
export function exportData(query) { | |||
return request({ | |||
url: '/system/dict/data/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 启用/禁用 | |||
export function setDictDataStatus(id, status) { | |||
return request({ | |||
url: `/system/dict/data/setStatus/${id}`, | |||
method: 'post', | |||
params: { status } | |||
}) | |||
} |
@@ -0,0 +1,77 @@ | |||
import request from '@/utils/request' | |||
// 查询字典类型列表 | |||
export function listType(query) { | |||
return request({ | |||
url: '/system/dict/type/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询字典类型详细 | |||
export function getType(dictId) { | |||
return request({ | |||
url: '/system/dict/type/get/' + dictId, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增字典类型 | |||
export function addType(data) { | |||
return request({ | |||
url: '/system/dict/type/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改字典类型 | |||
export function updateType(data) { | |||
return request({ | |||
url: '/system/dict/type/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除字典类型 | |||
export function delType(dictId) { | |||
return request({ | |||
url: '/system/dict/type/remove/' + dictId, | |||
method: 'get' | |||
}) | |||
} | |||
// 清理参数缓存 | |||
export function clearCache() { | |||
return request({ | |||
url: '/system/dict/type/clearCache', | |||
method: 'get' | |||
}) | |||
} | |||
// 导出字典类型 | |||
export function exportType(query) { | |||
return request({ | |||
url: '/system/dict/type/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 获取字典选择框列表 | |||
export function optionselect() { | |||
return request({ | |||
url: '/system/dict/type/optionselect', | |||
method: 'get' | |||
}) | |||
} | |||
// 刷新参数缓存 | |||
export function refreshCache() { | |||
return request({ | |||
url: '/system/dict/type/refreshCache', | |||
method: 'get' | |||
}) | |||
} |
@@ -0,0 +1,81 @@ | |||
import request from '@/utils/request' | |||
// 查询树状字典列表 | |||
export function listDicttree(query) { | |||
return request({ | |||
url: '/system/dicttree/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 导出树状字典 | |||
export function exportDicttree(query) { | |||
return request({ | |||
url: '/system/dicttree/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询树状字典详细 | |||
export function getDicttree(id) { | |||
return request({ | |||
url: '/system/dicttree/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增树状字典 | |||
export function addDicttree(data) { | |||
return request({ | |||
url: '/system/dicttree/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改树状字典 | |||
export function updateDicttree(data) { | |||
return request({ | |||
url: '/system/dicttree/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除树状字典 | |||
export function delDicttree(id) { | |||
return request({ | |||
url: '/system/dicttree/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 查询树状字典列表(树) | |||
export function tree(query) { | |||
return request({ | |||
url: '/system/dicttree/tree', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询单个树状字典详细(树) | |||
export function dictClassTree(dictClass) { | |||
return request({ | |||
url: '/system/dicttree/dictClassTree/' + dictClass, | |||
method: 'get' | |||
}) | |||
} | |||
// 查询单个树状字典详细(列表) | |||
export function dictClassList(dictClass, query) { | |||
let q = query ? JSON.parse(JSON.stringify(query)) : {}; | |||
q.dictClass = dictClass; | |||
return request({ | |||
url: '/system/dicttree/list', | |||
method: 'get', | |||
params: q | |||
}) | |||
} |
@@ -0,0 +1,53 @@ | |||
import request from '@/utils/request' | |||
// 查询导入执行状态列表 | |||
export function listImport(query) { | |||
return request({ | |||
url: '/system/import/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询导入执行状态详细 | |||
export function getImport(id) { | |||
return request({ | |||
url: '/system/import/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增导入执行状态 | |||
export function addImport(data) { | |||
return request({ | |||
url: '/system/import/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改导入执行状态 | |||
export function updateImport(data) { | |||
return request({ | |||
url: '/system/import/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除导入执行状态 | |||
export function delImport(id) { | |||
return request({ | |||
url: '/system/import/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出导入执行状态 | |||
export function exportImport(query) { | |||
return request({ | |||
url: '/system/import/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,53 @@ | |||
import request from '@/utils/request' | |||
// 查询导入错误明细列表 | |||
export function listImportDetail(query) { | |||
return request({ | |||
url: '/system/detail/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询导入错误明细详细 | |||
export function getImportDetail(id) { | |||
return request({ | |||
url: '/system/detail/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增导入错误明细 | |||
export function addImportDetail(data) { | |||
return request({ | |||
url: '/system/detail/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改导入错误明细 | |||
export function updateImportDetail(data) { | |||
return request({ | |||
url: '/system/detail/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除导入错误明细 | |||
export function delImportDetail(id) { | |||
return request({ | |||
url: '/system/detail/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出导入错误明细 | |||
export function exportImportDetail(query) { | |||
return request({ | |||
url: '/system/detail/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,11 @@ | |||
import request from '@/utils/request' | |||
import { praseStrEmpty } from "@/utils/ruoyi"; | |||
// 系统首页 | |||
export function systemIndex(query) { | |||
return request({ | |||
url: '/system/index/statistics', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,60 @@ | |||
import request from '@/utils/request' | |||
// 查询菜单列表 | |||
export function listMenu(query) { | |||
return request({ | |||
url: '/system/menu/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询菜单详细 | |||
export function getMenu(menuId) { | |||
return request({ | |||
url: '/system/menu/get/' + menuId, | |||
method: 'get' | |||
}) | |||
} | |||
// 查询菜单下拉树结构 | |||
export function treeselect() { | |||
return request({ | |||
url: '/system/menu/treeselect', | |||
method: 'get' | |||
}) | |||
} | |||
// 根据角色ID查询菜单下拉树结构 | |||
export function roleMenuTreeselect(roleId) { | |||
return request({ | |||
url: '/system/menu/roleMenuTreeselect/' + roleId, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增菜单 | |||
export function addMenu(data) { | |||
return request({ | |||
url: '/system/menu/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改菜单 | |||
export function updateMenu(data) { | |||
return request({ | |||
url: '/system/menu/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除菜单 | |||
export function delMenu(menuId) { | |||
return request({ | |||
url: '/system/menu/remove/' + menuId, | |||
method: 'get' | |||
}) | |||
} |
@@ -0,0 +1,89 @@ | |||
import request from '@/utils/request' | |||
// 查询手机菜单列表 | |||
export function listMobile(query) { | |||
return request({ | |||
url: '/system/mobile/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 导出手机菜单 | |||
export function exportMobile(query) { | |||
return request({ | |||
url: '/system/mobile/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询手机菜单详细 | |||
export function getMobile(id) { | |||
return request({ | |||
url: '/system/mobile/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增手机菜单 | |||
export function addMobile(data) { | |||
return request({ | |||
url: '/system/mobile/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改手机菜单 | |||
export function updateMobile(data) { | |||
return request({ | |||
url: '/system/mobile/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除手机菜单 | |||
export function delMobile(id) { | |||
return request({ | |||
url: '/system/mobile/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 编辑角色 | |||
export function setupMobileRoles(id, data) { | |||
return request({ | |||
url: '/system/mobile/setupRoles/' + id, | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 获取角色 | |||
export function getMobileRoles(id) { | |||
return request({ | |||
url: '/system/mobile/getRoles/' + id, | |||
method: 'get', | |||
}) | |||
} | |||
// 获取菜单 | |||
export function getMobileMenus(query) { | |||
return request({ | |||
url: '/system/mobile/menus', | |||
method: 'get', | |||
params: query, | |||
}) | |||
} | |||
// 启用/禁用 | |||
export function setMobileStatus(id, status) { | |||
return request({ | |||
url: `/system/mobile/setStatus/${id}`, | |||
method: 'post', | |||
params: { status } | |||
}) | |||
} | |||
@@ -0,0 +1,63 @@ | |||
import request from '@/utils/request' | |||
// 查询模块配置列表 | |||
export function listModel(query) { | |||
return request({ | |||
url: '/system/model/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 导出模块配置 | |||
export function exportModel(query) { | |||
return request({ | |||
url: '/system/model/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询模块配置详细 | |||
export function getModel(id) { | |||
return request({ | |||
url: '/system/model/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增模块配置 | |||
export function addModel(data) { | |||
return request({ | |||
url: '/system/model/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改模块配置 | |||
export function updateModel(data) { | |||
return request({ | |||
url: '/system/model/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除模块配置 | |||
export function delModel(id) { | |||
return request({ | |||
url: '/system/model/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 启用/禁用 | |||
export function setModelStatus(id, status) { | |||
return request({ | |||
url: `/system/model/setStatus/${id}`, | |||
method: 'post', | |||
params: { status } | |||
}) | |||
} | |||
@@ -0,0 +1,61 @@ | |||
import request from '@/utils/request' | |||
/*// 查询统一通知列表 | |||
export function listUnifiedNotice() { | |||
return request({ | |||
url: '/system/notice/unifiedNoticeList', | |||
method: 'get' | |||
}) | |||
}*/ | |||
// 查询通知公告列表 | |||
export function listNotice(query) { | |||
return request({ | |||
url: '/system/notice/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 导出通知公告 | |||
export function exportNotice(query) { | |||
return request({ | |||
url: '/system/notice/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询通知公告详细 | |||
export function getNotice(noticeId) { | |||
return request({ | |||
url: '/system/notice/get/' + noticeId, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增通知公告 | |||
export function addNotice(data) { | |||
return request({ | |||
url: '/system/notice/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改通知公告 | |||
export function updateNotice(data) { | |||
return request({ | |||
url: '/system/notice/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除通知公告 | |||
export function delNotice(noticeId) { | |||
return request({ | |||
url: '/system/notice/remove/' + noticeId, | |||
method: 'get' | |||
}) | |||
} | |||
@@ -0,0 +1,53 @@ | |||
import request from '@/utils/request' | |||
// 查询通讯录列表 | |||
export function listPhones(query) { | |||
return request({ | |||
url: '/system/phones/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询通讯录详细 | |||
export function getPhones(id) { | |||
return request({ | |||
url: '/system/phones/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增通讯录 | |||
export function addPhones(data) { | |||
return request({ | |||
url: '/system/phones/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改通讯录 | |||
export function updatePhones(data) { | |||
return request({ | |||
url: '/system/phones/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除通讯录 | |||
export function delPhones(id) { | |||
return request({ | |||
url: '/system/phones/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出通讯录 | |||
export function exportPhones(query) { | |||
return request({ | |||
url: '/system/phones/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,53 @@ | |||
import request from '@/utils/request' | |||
// 查询岗位列表 | |||
export function listPost(query) { | |||
return request({ | |||
url: '/system/post/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询岗位详细 | |||
export function getPost(postId) { | |||
return request({ | |||
url: '/system/post/get/' + postId, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增岗位 | |||
export function addPost(data) { | |||
return request({ | |||
url: '/system/post/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改岗位 | |||
export function updatePost(data) { | |||
return request({ | |||
url: '/system/post/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除岗位 | |||
export function delPost(postId) { | |||
return request({ | |||
url: '/system/post/remove/' + postId, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出岗位 | |||
export function exportPost(query) { | |||
return request({ | |||
url: '/system/post/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,92 @@ | |||
import request from '@/utils/request' | |||
// 查询角色列表 | |||
export function listRole(query) { | |||
return request({ | |||
url: '/system/role/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询角色详细 | |||
export function getRole(roleId) { | |||
return request({ | |||
url: '/system/role/get/' + roleId, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增角色 | |||
export function addRole(data) { | |||
return request({ | |||
url: '/system/role/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改角色 | |||
export function updateRole(data) { | |||
return request({ | |||
url: '/system/role/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 角色数据权限 | |||
export function dataScope(data) { | |||
return request({ | |||
url: '/system/role/dataScope', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 角色状态修改 | |||
export function changeRoleStatus(roleId, status) { | |||
const data = { | |||
roleId, | |||
status | |||
} | |||
return request({ | |||
url: '/system/role/changeStatus', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除角色 | |||
export function delRole(roleId) { | |||
return request({ | |||
url: '/system/role/remove/' + roleId, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出角色 | |||
export function exportRole(query) { | |||
return request({ | |||
url: '/system/role/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 获取手机菜单 | |||
export function getRoleMobiles(roleId) { | |||
return request({ | |||
url: '/system/role/getMobiles/' + roleId, | |||
method: 'get' | |||
}) | |||
} | |||
// 编辑手机菜单 | |||
export function setupRoleMobiles(id, data) { | |||
return request({ | |||
url: '/system/role/setupMobiles/' + id, | |||
method: 'post', | |||
data: data | |||
}) | |||
} |
@@ -0,0 +1,70 @@ | |||
import request from '@/utils/request' | |||
// 查询用章申请列表 | |||
export function listSeal(query) { | |||
return request({ | |||
url: '/service/seal/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询用章申请详细 | |||
export function getSeal(id) { | |||
return request({ | |||
url: '/service/seal/get/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 新增用章申请 | |||
export function addSeal(data) { | |||
return request({ | |||
url: '/service/seal/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改用章申请 | |||
export function updateSeal(data) { | |||
return request({ | |||
url: '/service/seal/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除用章申请 | |||
export function delSeal(id) { | |||
return request({ | |||
url: '/service/seal/remove/' + id, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出用章申请 | |||
export function exportSeal(query) { | |||
return request({ | |||
url: '/service/seal/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 模糊查询权利人列表 | |||
export function checkMemberInformation(query) { | |||
return request({ | |||
url: '/service/farmer/queryListByName/', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询用章申请列表 | |||
export function listsSeal(query) { | |||
return request({ | |||
url: '/service/seal/lists', | |||
method: 'get', | |||
params: query | |||
}) | |||
} |
@@ -0,0 +1,159 @@ | |||
import request from '@/utils/request' | |||
import { praseStrEmpty } from "@/utils/ruoyi"; | |||
// 查询用户列表 | |||
export function listUser(query) { | |||
return request({ | |||
url: '/system/user/list', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询用户列表 | |||
export function getUserList(query) { | |||
return request({ | |||
url: '/system/user/getUserList', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询用户列表 | |||
export function listNoDataScopeUser(query) { | |||
return request({ | |||
url: '/system/user/listNoDataScope', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 查询用户详细 | |||
export function getUser(userId) { | |||
return request({ | |||
url: '/system/user/' + praseStrEmpty(userId), | |||
method: 'get' | |||
}) | |||
} | |||
// 新增用户 | |||
export function addUser(data) { | |||
return request({ | |||
url: '/system/user/add', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 修改用户 | |||
export function updateUser(data) { | |||
return request({ | |||
url: '/system/user/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 删除用户 | |||
export function delUser(userId) { | |||
return request({ | |||
url: '/system/user/remove/' + userId, | |||
method: 'get' | |||
}) | |||
} | |||
// 导出用户 | |||
export function exportUser(query) { | |||
return request({ | |||
url: '/system/user/export', | |||
method: 'get', | |||
params: query | |||
}) | |||
} | |||
// 用户密码重置 | |||
export function resetUserPwd(userId, password) { | |||
const data = { | |||
userId, | |||
password | |||
} | |||
return request({ | |||
url: '/system/user/resetPwd', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 用户状态修改 | |||
export function changeUserStatus(userId, status) { | |||
const data = { | |||
userId, | |||
status | |||
} | |||
return request({ | |||
url: '/system/user/changeStatus', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 查询用户个人信息 | |||
export function getUserProfile() { | |||
return request({ | |||
url: '/system/user/profile/get', | |||
method: 'get' | |||
}) | |||
} | |||
// 修改用户个人信息 | |||
export function updateUserProfile(data) { | |||
return request({ | |||
url: '/system/user/profile/edit', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 用户密码重置 | |||
export function updateUserPwd(oldPassword, newPassword) { | |||
const data = { | |||
oldPassword, | |||
newPassword | |||
} | |||
return request({ | |||
url: '/system/user/profile/updatePwd', | |||
method: 'post', | |||
params: data | |||
}) | |||
} | |||
// 用户头像上传 | |||
export function uploadAvatar(data) { | |||
return request({ | |||
url: '/system/user/profile/avatar', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 下载用户导入模板 | |||
export function importTemplate() { | |||
return request({ | |||
url: '/system/user/importTemplate', | |||
method: 'get' | |||
}) | |||
} | |||
//用户上传签字 | |||
export function electronicSignature(data) { | |||
return request({ | |||
url: '/system/user/profile/electronicSignature', | |||
method: 'post', | |||
data: data | |||
}) | |||
} | |||
// 上报春耕app | |||
export function chungengSyncUser(userId) { | |||
return request({ | |||
url: '/system/user/chungeng/syncUser/' + userId, | |||
method: 'post', | |||
}) | |||
} |
@@ -0,0 +1,3 @@ | |||
import Vue from 'vue'; | |||
export const eventBus = new Vue(); |
@@ -0,0 +1,7 @@ | |||
<div class="block"> | |||
<img :src="data.icon" class="icon"> | |||
<div class="right col"> | |||
<p class="value">{{data.value}}</p> | |||
<p class="name">{{data.name}}</p> | |||
</div> | |||
</div> |
@@ -0,0 +1,24 @@ | |||
export default { | |||
props: { | |||
data: { | |||
type: Object, | |||
default: function () { | |||
return { | |||
name: '标题', | |||
value: '值', | |||
icon: require('./icon.png') | |||
} | |||
} | |||
}, | |||
}, | |||
data () { | |||
return { | |||
}; | |||
}, | |||
created () { | |||
}, | |||
methods: { | |||
} | |||
}; |
@@ -0,0 +1,30 @@ | |||
.block { | |||
display: block; | |||
width: 100px; | |||
height: 40px; | |||
align-items: center; | |||
display: flex; | |||
.icon { | |||
width: 80px; | |||
height: 100px; | |||
} | |||
.right { | |||
flex: 1; | |||
display: flex; | |||
flex-direction: column; | |||
.value { | |||
font-weight: bold; | |||
font-size: 24px; | |||
color: #FFFFFF; | |||
text-shadow: 0px 3px 2px #05357D; | |||
} | |||
.name { | |||
color: rgba(185, 211, 235, 1); | |||
font-size: 12px; | |||
} | |||
} | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1 @@ | |||
<div :id="id" class="chart"></div> |
@@ -0,0 +1,249 @@ | |||
import * as echarts from 'echarts'; | |||
import elementResizeDetectorMaker from 'element-resize-detector'; | |||
export default { | |||
props: { | |||
id: { | |||
type: String, | |||
default: 'bar' | |||
}, | |||
data: { | |||
type: Array, | |||
default: function () { | |||
return [ | |||
{ | |||
name: '1月', | |||
value: '10' | |||
}, | |||
{ | |||
name: '2月', | |||
value: '19' | |||
} | |||
]; | |||
} | |||
}, | |||
unit: { | |||
type: String, | |||
default: '单位:万元' | |||
}, | |||
color: { | |||
type: Array, | |||
default: function () { | |||
return ['rgba(15, 252, 252, 1)', 'rgba(15, 252, 252, 0.04)'] | |||
} | |||
} | |||
}, | |||
data () { | |||
return { | |||
icon: require('./icon.png'), | |||
chart: null | |||
}; | |||
}, | |||
mounted () { | |||
this.initChart(); | |||
}, | |||
computed: { | |||
}, | |||
methods: { | |||
// 设置监听器 页面尺寸变化重新绘制图表 | |||
initResizeCallBack () { | |||
const erd = elementResizeDetectorMaker(); | |||
erd.listenTo(document.getElementById(this.id), () => { | |||
this.$nextTick(() => { | |||
this.chart.resize(); | |||
}); | |||
}); | |||
}, | |||
initChart () { | |||
this.chart = echarts.init(document.getElementById(this.id)); | |||
this.chartSetOption(); | |||
}, | |||
chartSetOption () { | |||
let xAxisData = []; | |||
let data = []; | |||
this.data.forEach(item => { | |||
xAxisData.push(item.name) | |||
data.push(item.value) | |||
}); | |||
const option = { | |||
color: ["#3398DB"], | |||
tooltip: { | |||
trigger: "axis", | |||
axisPointer: { | |||
type: "line", | |||
lineStyle: { | |||
opacity: 0, | |||
}, | |||
} | |||
}, | |||
legend: { | |||
data: ["直接访问", "背景"], | |||
show: false, | |||
}, | |||
grid: { | |||
left: "0%", | |||
right: "0%", | |||
bottom: "5%", | |||
top: "15%", | |||
containLabel: true, | |||
z: 22, | |||
}, | |||
xAxis: [ | |||
{ | |||
splitArea: { | |||
show: false, | |||
areaStyle: { | |||
color: ['RGBA(13, 31, 64, 1)'] | |||
} | |||
}, | |||
splitLine: { | |||
show: false, | |||
lineStyle: { | |||
color: ['rgba(18, 40, 83, 1)'], | |||
width: 100 | |||
} | |||
}, | |||
type: "category", | |||
gridIndex: 0, | |||
data: xAxisData, | |||
axisTick: { | |||
alignWithLabel: true, | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
color: "#0c3b71", | |||
}, | |||
}, | |||
axisLabel: { | |||
show: true, | |||
color: 'rgba(185, 211, 235, 1)' | |||
}, | |||
}, | |||
], | |||
yAxis: [ | |||
{ | |||
type: "value", | |||
name: this.unit, | |||
nameTextStyle: { | |||
color: 'rgba(185, 211, 235, 1)' | |||
}, | |||
axisLabel: { | |||
formatter: "{value}", | |||
textStyle: { | |||
color: "rgba(185, 211, 235, 1)", | |||
}, | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
color: "#27b4c2", | |||
}, | |||
}, | |||
axisTick: { | |||
show: false, | |||
}, | |||
splitLine: { | |||
show: true, | |||
lineStyle: { | |||
color: "#11366e", | |||
}, | |||
}, | |||
}, | |||
{ | |||
type: "value", | |||
gridIndex: 0, | |||
max: 100, | |||
splitNumber: 12, | |||
splitLine: { | |||
show: false, | |||
}, | |||
axisLine: { | |||
show: false, | |||
}, | |||
axisTick: { | |||
show: false, | |||
}, | |||
axisLabel: { | |||
show: false, | |||
} | |||
}, | |||
], | |||
series: [ | |||
{ | |||
name: "合格率", | |||
type: "bar", | |||
barWidth: 2, | |||
xAxisIndex: 0, | |||
yAxisIndex: 0, | |||
showBackground: false, | |||
backgroundStyle: { | |||
shadowBlur: 10, | |||
color: 'rgba(18, 40, 83, 1)' | |||
}, | |||
itemStyle: { | |||
normal: { | |||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ | |||
{ | |||
offset: 0, | |||
color: this.color[0], | |||
}, | |||
{ | |||
offset: 1, | |||
color: this.color[1], | |||
}, | |||
]), | |||
}, | |||
}, | |||
data: data, | |||
zlevel: 11, | |||
}, | |||
{ | |||
name: "合格率2", | |||
type: "pictorialBar", | |||
symbol: 'image://data:' + this.icon, | |||
symbolSize: [20, 20], | |||
symbolOffset: [0, -10], | |||
barWidth: 20, | |||
symbolPosition: 'end', | |||
xAxisIndex: 0, | |||
yAxisIndex: 0, | |||
showBackground: false, | |||
backgroundStyle: { | |||
shadowBlur: 10, | |||
color: 'rgba(18, 40, 83, 1)' | |||
}, | |||
data: data, | |||
zlevel: 11, | |||
}, | |||
{ | |||
type: 'custom', | |||
itemStyle: { | |||
color: 'rgba(18, 40, 83, 0.4)' | |||
}, | |||
renderItem: function (params, api) { | |||
//获取对应类目的axisTick中心点坐标 | |||
var start = api.coord([api.value(0)]); | |||
//通过坐标系的宽度和类目数,计算单个类目的背景 | |||
var width = (params.coordSys.width / 7) * 0.6; | |||
return { | |||
type: 'rect', | |||
shape: { | |||
// 相对左上角坐标 | |||
x: start[0] - width / 2, | |||
y: params.coordSys.y, | |||
width: width, | |||
height: params.coordSys.height, | |||
}, | |||
style: api.style() | |||
}; | |||
}, | |||
data: [100, 100, 100, 100, 100, 100, 100] | |||
}, | |||
], | |||
};; | |||
this.chart.setOption(option); | |||
this.initResizeCallBack(); | |||
} | |||
} | |||
}; |
@@ -0,0 +1,6 @@ | |||
.chart { | |||
overflow: visible; | |||
width: 100%; | |||
height: 100%; | |||
z-index: 2; | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1 @@ | |||
<div :id="id" class="chart"></div> |
@@ -0,0 +1,229 @@ | |||
import * as echarts from 'echarts'; | |||
import elementResizeDetectorMaker from 'element-resize-detector'; | |||
export default { | |||
props: { | |||
id: { | |||
type: String, | |||
default: 'bar' | |||
}, | |||
data: { | |||
type: Array, | |||
default: function () { | |||
return [ | |||
{ | |||
name: '1月', | |||
value: '10' | |||
}, | |||
{ | |||
name: '2月', | |||
value: '19' | |||
} | |||
]; | |||
} | |||
}, | |||
unit: { | |||
type: String, | |||
default: '单位:万元' | |||
}, | |||
color: { | |||
type: Array, | |||
default: function () { | |||
return ['rgba(15, 252, 252, 1)', 'rgba(53, 197, 124, 1)'] | |||
} | |||
} | |||
}, | |||
data () { | |||
return { | |||
chart: null | |||
}; | |||
}, | |||
mounted () { | |||
this.initChart(); | |||
}, | |||
computed: { | |||
}, | |||
methods: { | |||
// 设置监听器 页面尺寸变化重新绘制图表 | |||
initResizeCallBack () { | |||
const erd = elementResizeDetectorMaker(); | |||
erd.listenTo(document.getElementById(this.id), () => { | |||
this.$nextTick(() => { | |||
this.chart.resize(); | |||
}); | |||
}); | |||
}, | |||
initChart () { | |||
this.chart = echarts.init(document.getElementById(this.id)); | |||
this.chartSetOption(); | |||
}, | |||
chartSetOption () { | |||
let xAxisData = []; | |||
let data = []; | |||
this.data.forEach(item => { | |||
xAxisData.push(item.name) | |||
data.push(item.value) | |||
}); | |||
const option = { | |||
color: ["#3398DB"], | |||
tooltip: { | |||
trigger: "axis", | |||
axisPointer: { | |||
type: "line", | |||
lineStyle: { | |||
opacity: 0, | |||
}, | |||
} | |||
}, | |||
legend: { | |||
data: ["直接访问", "背景"], | |||
show: false, | |||
}, | |||
grid: { | |||
left: "0%", | |||
right: "0%", | |||
bottom: "5%", | |||
top: "15%", | |||
containLabel: true, | |||
z: 22, | |||
}, | |||
xAxis: [ | |||
{ | |||
splitArea: { | |||
show: false, | |||
areaStyle: { | |||
color: ['RGBA(13, 31, 64, 1)'] | |||
} | |||
}, | |||
splitLine: { | |||
show: false, | |||
lineStyle: { | |||
color: ['rgba(18, 40, 83, 1)'], | |||
width: 100 | |||
} | |||
}, | |||
type: "category", | |||
gridIndex: 0, | |||
data: xAxisData, | |||
axisTick: { | |||
alignWithLabel: true, | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
color: "#0c3b71", | |||
}, | |||
}, | |||
axisLabel: { | |||
show: true, | |||
color: 'rgba(185, 211, 235, 1)' | |||
}, | |||
}, | |||
], | |||
yAxis: [ | |||
{ | |||
type: "value", | |||
name: this.unit, | |||
nameTextStyle: { | |||
color: 'rgba(185, 211, 235, 1)' | |||
}, | |||
axisLabel: { | |||
formatter: "{value}", | |||
textStyle: { | |||
color: "rgba(185, 211, 235, 1)", | |||
}, | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
color: "#27b4c2", | |||
}, | |||
}, | |||
axisTick: { | |||
show: false, | |||
}, | |||
splitLine: { | |||
show: true, | |||
lineStyle: { | |||
color: "#11366e", | |||
}, | |||
}, | |||
}, | |||
{ | |||
type: "value", | |||
gridIndex: 0, | |||
max: 100, | |||
splitNumber: 12, | |||
splitLine: { | |||
show: false, | |||
}, | |||
axisLine: { | |||
show: false, | |||
}, | |||
axisTick: { | |||
show: false, | |||
}, | |||
axisLabel: { | |||
show: false, | |||
} | |||
}, | |||
], | |||
series: [ | |||
{ | |||
name: "合格率", | |||
type: "bar", | |||
barWidth: 15, | |||
xAxisIndex: 0, | |||
yAxisIndex: 0, | |||
showBackground: false, | |||
backgroundStyle: { | |||
shadowBlur: 10, | |||
color: 'rgba(18, 40, 83, 1)' | |||
}, | |||
itemStyle: { | |||
normal: { | |||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ | |||
{ | |||
offset: 0, | |||
color: this.color[0], | |||
}, | |||
{ | |||
offset: 1, | |||
color: this.color[1], | |||
}, | |||
]), | |||
}, | |||
}, | |||
data: data, | |||
zlevel: 11, | |||
}, | |||
{ | |||
type: 'custom', | |||
itemStyle: { | |||
color: 'rgba(18, 40, 83, 0.4)' | |||
}, | |||
renderItem: function (params, api) { | |||
//获取对应类目的axisTick中心点坐标 | |||
var start = api.coord([api.value(0)]); | |||
//通过坐标系的宽度和类目数,计算单个类目的背景 | |||
var width = (params.coordSys.width / 7) * 0.6; | |||
return { | |||
type: 'rect', | |||
shape: { | |||
// 相对左上角坐标 | |||
x: start[0] - width / 2, | |||
y: params.coordSys.y, | |||
width: width, | |||
height: params.coordSys.height, | |||
}, | |||
style: api.style() | |||
}; | |||
}, | |||
data: [100, 100, 100, 100, 100, 100, 100] | |||
}, | |||
], | |||
};; | |||
this.chart.setOption(option); | |||
this.initResizeCallBack(); | |||
} | |||
} | |||
}; |
@@ -0,0 +1,6 @@ | |||
.chart { | |||
overflow: visible; | |||
width: 100%; | |||
height: 100%; | |||
z-index: 2; | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1 @@ | |||
<div :id="id" class="chart"></div> |
@@ -0,0 +1,184 @@ | |||
import * as echarts from 'echarts'; | |||
import elementResizeDetectorMaker from 'element-resize-detector'; | |||
export default { | |||
props: { | |||
id: { | |||
type: String, | |||
default: 'line' | |||
}, | |||
data: { | |||
type: Array, | |||
default: function () { | |||
return [ | |||
{ | |||
name: '1月', | |||
value: '10' | |||
}, | |||
{ | |||
name: '2月', | |||
value: '19' | |||
} | |||
]; | |||
} | |||
} | |||
}, | |||
data () { | |||
return { | |||
chart: null | |||
}; | |||
}, | |||
mounted () { | |||
this.initChart(); | |||
}, | |||
computed: { | |||
}, | |||
methods: { | |||
// 设置监听器 页面尺寸变化重新绘制图表 | |||
initResizeCallBack () { | |||
const erd = elementResizeDetectorMaker(); | |||
erd.listenTo(document.getElementById(this.id), () => { | |||
this.$nextTick(() => { | |||
this.chart.resize(); | |||
}); | |||
}); | |||
}, | |||
initChart () { | |||
this.chart = echarts.init(document.getElementById(this.id)); | |||
this.chartSetOption(); | |||
}, | |||
chartSetOption () { | |||
let xAxisData = []; | |||
let data = []; | |||
this.data.forEach(item => { | |||
xAxisData.push(item.name) | |||
data.push(item.value) | |||
}); | |||
const option = { | |||
grid: { | |||
left: "5%", | |||
right: "10%", | |||
top: "15%", | |||
bottom: "10%", | |||
containLabel: true, | |||
}, | |||
tooltip: { | |||
show: true, | |||
trigger: "item", | |||
}, | |||
legend: { | |||
show: false | |||
}, | |||
color: { | |||
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ | |||
{ | |||
offset: 1, | |||
color: "rgba(134, 91, 252, 1)", | |||
}, | |||
{ | |||
offset: 0.5, | |||
color: "rgba(26, 106, 226, 0.5)", | |||
}, | |||
{ | |||
offset: 0, | |||
color: "rgba(26, 106, 226, 0)", | |||
}, | |||
]), | |||
}, | |||
xAxis: [ | |||
{ | |||
type: "category", | |||
boundaryGap: false, | |||
axisLabel: { | |||
color: 'rgba(185, 211, 235, 1)', | |||
}, | |||
axisLine: { | |||
show: false | |||
}, | |||
axisTick: { | |||
show: false | |||
}, | |||
splitLine: { | |||
show: false | |||
}, | |||
data: xAxisData | |||
}, | |||
], | |||
yAxis: [ | |||
{ | |||
type: "value", | |||
name: "单位:万元", | |||
nameTextStyle: { | |||
color: 'rgba(185, 211, 235, 1)' | |||
}, | |||
axisLabel: { | |||
formatter: "{value}", | |||
textStyle: { | |||
color: "rgba(185, 211, 235, 1)", | |||
}, | |||
}, | |||
axisLine: { | |||
lineStyle: { | |||
color: "#27b4c2", | |||
}, | |||
}, | |||
axisTick: { | |||
show: false, | |||
}, | |||
splitLine: { | |||
show: true, | |||
lineStyle: { | |||
color: "#11366e", | |||
}, | |||
}, | |||
} | |||
], | |||
series: [ | |||
{ | |||
name: "", | |||
type: "line", | |||
smooth: true, | |||
// symbol: "circle", | |||
symbolSize: 12, | |||
itemStyle: { | |||
normal: { | |||
color: "#0092f6", | |||
lineStyle: { | |||
color: "#0092f6", | |||
width: 1, | |||
}, | |||
areaStyle: { | |||
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ | |||
{ | |||
offset: 1, | |||
color: "rgba(134, 91, 252, 1)", | |||
}, | |||
{ | |||
offset: 0.5, | |||
color: "rgba(26, 106, 226, 0.5)", | |||
}, | |||
{ | |||
offset: 0, | |||
color: "rgba(26, 106, 226, 0)", | |||
}, | |||
]), | |||
}, | |||
}, | |||
}, | |||
markPoint: { | |||
itemStyle: { | |||
normal: { | |||
color: "red", | |||
}, | |||
}, | |||
}, | |||
data: data | |||
} | |||
], | |||
};; | |||
this.chart.setOption(option); | |||
this.initResizeCallBack(); | |||
} | |||
} | |||
}; |
@@ -0,0 +1,6 @@ | |||
.chart { | |||
overflow: visible; | |||
width: 100%; | |||
height: 100%; | |||
z-index: 2; | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1,5 @@ | |||
<div class="pie_full"> | |||
<div :id="id" class="chart"></div> | |||
<div class="cir"></div> | |||
</div> | |||
@@ -0,0 +1,163 @@ | |||
import * as echarts from 'echarts'; | |||
import elementResizeDetectorMaker from 'element-resize-detector'; | |||
export default { | |||
props: { | |||
id: { | |||
type: String, | |||
default: 'pie' | |||
}, | |||
data: { | |||
type: Array, | |||
default: function () { | |||
return [ | |||
{ | |||
value: 2154, | |||
unit: '万元', | |||
name: "项目一", | |||
}, | |||
{ | |||
value: 3854, | |||
unit: '万元', | |||
name: "项目二", | |||
}, | |||
{ | |||
value: 3854, | |||
unit: '万吨', | |||
name: "项目三", | |||
}, | |||
{ | |||
value: 3854, | |||
unit: '万吨', | |||
name: "项目四", | |||
} | |||
]; | |||
} | |||
} | |||
}, | |||
data () { | |||
return { | |||
chart: null | |||
}; | |||
}, | |||
mounted () { | |||
this.initChart(); | |||
}, | |||
computed: { | |||
}, | |||
methods: { | |||
// 设置监听器 页面尺寸变化重新绘制图表 | |||
initResizeCallBack () { | |||
const erd = elementResizeDetectorMaker(); | |||
erd.listenTo(document.getElementById(this.id), () => { | |||
this.$nextTick(() => { | |||
this.chart.resize(); | |||
}); | |||
}); | |||
}, | |||
initChart () { | |||
this.chart = echarts.init(document.getElementById(this.id)); | |||
this.chartSetOption(); | |||
}, | |||
chartSetOption () { | |||
var scale = 1; | |||
var echartData = [ | |||
...this.data | |||
]; | |||
var rich = { | |||
yellow: { | |||
color: "rgba(185, 211, 235, 1)", | |||
fontSize: 18 * scale, | |||
padding: [5, 4], | |||
align: "center", | |||
}, | |||
total: { | |||
color: "#ffc72b", | |||
fontSize: 40 * scale, | |||
align: "center", | |||
}, | |||
white: { | |||
color: "rgba(185, 211, 235, 1)", | |||
align: "center", | |||
fontSize: 18 * scale, | |||
padding: [0, 0], | |||
}, | |||
blue: { | |||
color: "rgba(185, 211, 235, 1)", | |||
fontSize: 16 * scale, | |||
align: "center", | |||
}, | |||
hr: { | |||
// borderColor: "#0b5263", | |||
width: "100%", | |||
borderWidth: 1, | |||
height: 0, | |||
}, | |||
}; | |||
const option = { | |||
title: [ | |||
{ | |||
text: "总库存量", | |||
left: "center", | |||
top: "40%", | |||
padding: [0, 0], | |||
textStyle: { | |||
color: "#fff", | |||
fontSize: 18 * scale, | |||
align: "center", | |||
}, | |||
}, | |||
{ | |||
text: "1000 万吨", | |||
left: "center", | |||
top: "50%", | |||
padding: [0, 0], | |||
textStyle: { | |||
color: "#fff", | |||
fontSize: 18 * scale, | |||
align: "center", | |||
}, | |||
} | |||
], | |||
series: [ | |||
{ | |||
name: "", | |||
type: "pie", | |||
radius: ["48%", "70%"], | |||
color: ["rgba(15, 252, 252, 1)", "rgba(134, 91, 252, 1)", "rgba(49, 129, 246, 1)", "rgba(29, 197, 104, 1)"], | |||
label: { | |||
normal: { | |||
formatter: function (params, ticket, callback) { | |||
var total = 0; //考生总数量 | |||
var percent = 0; //考生占比 | |||
echartData.forEach(function (value, index, array) { | |||
total += value.value; | |||
}); | |||
percent = ((params.value / total) * 100).toFixed(1); | |||
return ( | |||
"{white|" + | |||
percent + "%" + | |||
"}\n{blue|" + | |||
params.name + | |||
"}\n{hr|}\n{yellow|" + | |||
params.value + params.data.unit + '}' | |||
); | |||
}, | |||
rich: rich, | |||
}, | |||
}, | |||
labelLine: { | |||
normal: { | |||
length: 10 * scale, | |||
length2: 20 * scale, | |||
}, | |||
}, | |||
data: echartData, | |||
}, | |||
], | |||
}; | |||
this.chart.setOption(option); | |||
this.initResizeCallBack(); | |||
} | |||
} | |||
}; |
@@ -0,0 +1,25 @@ | |||
.pie_full { | |||
width: 100%; | |||
height: 100%; | |||
position: relative; | |||
.chart { | |||
overflow: visible; | |||
width: 100%; | |||
height: 100%; | |||
z-index: 2; | |||
} | |||
.cir { | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
width: 200px; | |||
height: 200px; | |||
border-radius: 50%; | |||
border: 1px solid rgba(49, 129, 246, 1); | |||
box-shadow: inset 0 0 10px 2px rgba(27, 123, 204, 0.8); | |||
/* 添加内发光效果 */ | |||
} | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1,6 @@ | |||
<div class="header"> | |||
<div class="left"> | |||
<slot name="left"></slot> | |||
</div> | |||
<p class="title">{{title}}</p> | |||
</div> |
@@ -0,0 +1,28 @@ | |||
export default { | |||
computed: { | |||
}, | |||
props: { | |||
title: { | |||
type: String, | |||
default: '我是标题' | |||
}, | |||
back: { | |||
type: Boolean, | |||
default: false | |||
}, | |||
backName: { | |||
type: String, | |||
default: '返回' | |||
} | |||
}, | |||
data () { | |||
return { | |||
}; | |||
}, | |||
created () { | |||
}, | |||
methods: { | |||
} | |||
}; |
@@ -0,0 +1,28 @@ | |||
.header { | |||
position: relative; | |||
background: url('./header_bk.png'); | |||
background-size: 100% 100%; | |||
width: 100%; | |||
height: 90px; | |||
.title { | |||
overflow: visible; | |||
padding: 0 20px; | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
font-size: 40px; | |||
font-style: italic; | |||
font-weight: 600; | |||
background: linear-gradient(180deg, #FFFFFF 38.330078125%, #99BAEC 100%); | |||
-webkit-background-clip: text; | |||
-webkit-text-fill-color: transparent; | |||
} | |||
.left { | |||
position: absolute; | |||
left: 20px; | |||
top: 20px; | |||
} | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1,3 @@ | |||
<div class="pannel_tabs row"> | |||
<div v-for="(item) in data" class="tab hover_pointer" :class="[item.id === currentClick ? 'active' : '']" @click="tabClick(item)">{{item.name}}</div> | |||
</div> |
@@ -0,0 +1,34 @@ | |||
export default { | |||
props: { | |||
data: { | |||
type: Array, | |||
default: function () { | |||
return [ | |||
{ | |||
id: '1', | |||
name: '趋势' | |||
}, | |||
{ | |||
id: '2', | |||
name: '类型' | |||
} | |||
] | |||
} | |||
}, | |||
}, | |||
data () { | |||
return { | |||
currentClick: '1' | |||
}; | |||
}, | |||
created () { | |||
}, | |||
methods: { | |||
tabClick (info) { | |||
this.currentClick = info.id | |||
this.$emit('change', info) | |||
} | |||
} | |||
}; |
@@ -0,0 +1,26 @@ | |||
.tab { | |||
margin-right: 4px; | |||
font-size: 12px; | |||
line-height: 23px; | |||
text-align: center; | |||
border-radius: 10px; | |||
width: 55px; | |||
height: 23px; | |||
background: RGBA(0, 0, 0, 0); | |||
border: 1px solid rgba(43, 108, 206, 0.66); | |||
} | |||
.pannel_tabs { | |||
height: 23px !important; | |||
width: auto; | |||
display: flex; | |||
justify-content: flex-end; | |||
} | |||
.active { | |||
background: linear-gradient(-90deg, #1c4ca5 0%, #215AC3 98%); | |||
font-size: 12px; | |||
width: 55px; | |||
height: 23px; | |||
text-align: center; | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1,27 @@ | |||
<div class="pannel" :style="style" :class="[bkClass]"> | |||
<div class="header_box"> | |||
<div class="top_line"> | |||
<div class="left_sign"></div> | |||
<div class="right_sign"></div> | |||
</div> | |||
<div class="header row align_item_center"> | |||
<div v-if="title" class="title_bk row align_item_center"> | |||
<i class="icon"></i> | |||
<p>{{title}}</p> | |||
</div> | |||
<div class="more"> | |||
<slot name="header"></slot> | |||
</div> | |||
</div> | |||
<div class="light"></div> | |||
</div> | |||
<div class="body"> | |||
<div> | |||
<slot></slot> | |||
</div> | |||
<div class="bottom_line"> | |||
<div class="left_sign"></div> | |||
<div class="right_sign"></div> | |||
</div> | |||
</div> | |||
</div> |
@@ -0,0 +1,42 @@ | |||
export default { | |||
props: { | |||
// 定义标题 | |||
title: { | |||
type: String, | |||
default: '我是标题' | |||
}, | |||
bkClass: { | |||
type: String, | |||
default: 'bk_normal' | |||
}, | |||
// 定义跳转页面url | |||
uri: { | |||
type: String, | |||
default: '' | |||
}, | |||
// 定义组件高度 | |||
height: { | |||
type: String, | |||
default: '300' | |||
}, | |||
// 定义组件高度 | |||
width: { | |||
type: String, | |||
default: '430' | |||
} | |||
}, | |||
computed: { | |||
style: function () { | |||
return { | |||
height: this.height + 'px', | |||
width: this.width + 'px' | |||
}; | |||
} | |||
}, | |||
data () { | |||
return { | |||
}; | |||
}, | |||
methods: { | |||
} | |||
}; |
@@ -0,0 +1,132 @@ | |||
.pannel { | |||
box-sizing: border-box; | |||
display: flex; | |||
flex-direction: column; | |||
// 頭部區域 | |||
.header_box { | |||
position: relative; | |||
height: 35px; | |||
overflow: visible !important; | |||
.top_line { | |||
display: flex; | |||
justify-content: space-between; | |||
background-color: rgba(22, 60, 114, 1); | |||
width: 100%; | |||
height: 2px; | |||
.left_sign { | |||
height: 2px; | |||
width: 13px; | |||
background-color: rgba(53, 143, 255, 1); | |||
} | |||
.right_sign { | |||
height: 2px; | |||
width: 13px; | |||
background-color: rgba(53, 143, 255, 1); | |||
} | |||
} | |||
.header { | |||
margin-top: 2px; | |||
height: 32px; | |||
background: rgba(8, 33, 71, 1); | |||
.title_bk { | |||
font-style: italic; | |||
font-weight: 600; | |||
height: 50px; | |||
margin-left: 20px; | |||
line-height: 32px; | |||
text-align: center; | |||
.icon { | |||
display: block; | |||
background: url('./icon.png'); | |||
background-size: 100% 100%; | |||
width: 18px; | |||
height: 18px; | |||
} | |||
} | |||
.more { | |||
margin-right: 20px; | |||
} | |||
} | |||
.light { | |||
position: absolute; | |||
bottom: -15px; | |||
left: 30px; | |||
background: url('./light.png'); | |||
background-size: 100% 100%; | |||
width: 280px; | |||
height: 30px; | |||
animation: lightmove 4s infinite; | |||
} | |||
} | |||
// 内容区域 | |||
.body { | |||
margin: 2px; | |||
padding: 10px; | |||
width: 100%; | |||
position: relative; | |||
flex: 1; | |||
background-color: rgba(11, 28, 58, 1); | |||
overflow: hidden; | |||
.bottom_line { | |||
position: absolute; | |||
left: 0; | |||
right: 0; | |||
bottom: 0; | |||
display: flex; | |||
justify-content: space-between; | |||
background-color: rgba(22, 60, 114, 1); | |||
width: 100%; | |||
height: 2px; | |||
.left_sign { | |||
height: 2px; | |||
width: 13px; | |||
background-color: rgba(53, 143, 255, 1); | |||
} | |||
.right_sign { | |||
height: 2px; | |||
width: 13px; | |||
background-color: rgba(53, 143, 255, 1); | |||
} | |||
} | |||
div { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
} | |||
} | |||
@keyframes lightmove { | |||
/* 动画关键帧 */ | |||
0% { | |||
opacity: 1; | |||
transform: translateX(0px); | |||
/* 样式 */ | |||
} | |||
50% { | |||
opacity: 0.2; | |||
transform: translateX(170px); | |||
} | |||
/* 。。。 */ | |||
100% { | |||
opacity: 1; | |||
transform: translateX(0px); | |||
/* 样式 */ | |||
} | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1,65 @@ | |||
export default [ | |||
{ | |||
area: '长春', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
}, | |||
{ | |||
area: '松原', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
}, | |||
{ | |||
area: '通化', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
}, | |||
{ | |||
area: '四平', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
}, | |||
{ | |||
area: '吉林', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
}, | |||
{ | |||
area: '辽源', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
}, | |||
{ | |||
area: '通化', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
}, | |||
{ | |||
area: '白山', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
}, | |||
{ | |||
area: '延边', | |||
count: 233, | |||
money: 534534, | |||
dealCount: 564, | |||
dealMoney: 31 | |||
} | |||
]; |
@@ -0,0 +1,16 @@ | |||
<div :style="[style]"> | |||
<div class="table_show"> | |||
<div class="table_header table_one clearfix"> | |||
<div v-for="header in headers" :key="header" class="item test_center">{{header}}</div> | |||
<div v-if="details" class="item test_center">操作</div> | |||
</div> | |||
<div class="table_bodyer" :style="[bodyStyle]"> | |||
<scroll :data="data" class="seamless-warp" :class-option="swiperOption"> | |||
<div v-for="(line, index) in data" class="table_one clearfix item_height"> | |||
<div v-for="(item, index) in line" class="item test_center ellipsis_1" >{{item }}</div> | |||
<div v-if="details" class="item test_center ellipsis_1" @cilck="lineClick(line)">查看详情</div> | |||
</div> | |||
</scroll> | |||
</div> | |||
</div> | |||
</div> |
@@ -0,0 +1,85 @@ | |||
import scroll from 'vue-seamless-scroll' | |||
export default { | |||
components: { | |||
scroll | |||
}, | |||
data () { | |||
return { | |||
}; | |||
}, | |||
props: { | |||
details: { | |||
type: Boolean, | |||
default: false | |||
}, | |||
width: { | |||
type: [String, Number], | |||
default: '100%' | |||
}, | |||
height: { | |||
type: [String, Number], | |||
default: '100' | |||
}, | |||
bodyHeight: { | |||
type: [Number], | |||
default: 200 | |||
}, | |||
headers: { | |||
type: Array, | |||
default: function () { | |||
return ['表头1', '表头2', '表头3'] | |||
} | |||
}, | |||
data: { | |||
type: Array, | |||
default: function () { | |||
return [ | |||
['表头1', '表头2', '表头3'], | |||
['表头1', '表头2', '表头3'], | |||
['表头1', '表头2', '表头3'], | |||
['表头1', '表头2', '表头3'], | |||
['表头1', '表头2', '表头3'], | |||
['表头1', '表头2', '表头3'], | |||
['表头1', '表头2', '表头3'], | |||
['表头11', '表头22', '表头33'] | |||
] | |||
} | |||
} | |||
}, | |||
computed: { | |||
dataLength: function () { | |||
return this.dataList.length; | |||
}, | |||
bodyStyle: function () { | |||
return { | |||
height: this.bodyHeight + 'px', | |||
}; | |||
}, | |||
style: function () { | |||
return { | |||
height: this.height, | |||
width: this.width | |||
}; | |||
}, | |||
// 如果数据不足5条则不滚动 | |||
swiperOption: function () { | |||
return { | |||
step: 0.4, | |||
limitMoveNum: 1, | |||
hoverStop: true, | |||
direction: 1, | |||
openWatch: true, | |||
singleHeight: 0, | |||
singleHeight: 0, | |||
waitTime: 1000 | |||
} | |||
} | |||
}, | |||
created () { | |||
}, | |||
methods: { | |||
lineClick (line) { | |||
this.$emit('lineClick', line) | |||
} | |||
} | |||
}; |
@@ -0,0 +1,132 @@ | |||
.table_show { | |||
box-sizing: border-box; | |||
padding: 0 10px; | |||
margin-top: 10px; | |||
.table_header { | |||
width: 100%; | |||
background: rgba(44, 117, 223, 0.5); | |||
border-radius: 4px; | |||
height: 40px; | |||
font-size: 12px; | |||
font-family: MicrosoftYaHeiUI, MicrosoftYaHeiUI-Bold; | |||
font-weight: 700; | |||
text-align: center; | |||
color: rgba(185, 211, 235, 1); | |||
} | |||
.table_bodyer { | |||
margin-top: 20px; | |||
overflow: hidden; | |||
height: 200px; | |||
line-height: 40px; | |||
.table_one { | |||
height: 40px; | |||
display: flex; | |||
justify-content: space-around; | |||
} | |||
} | |||
.table_one { | |||
width: 100%; | |||
height: 40px; | |||
display: flex; | |||
justify-content: space-around; | |||
align-items: center; | |||
} | |||
} | |||
.swiper-container { | |||
height: 100%; | |||
} | |||
.table_bodyer { | |||
height: 100%; | |||
} | |||
.margin { | |||
margin-right: 5px; | |||
} | |||
.item_height { | |||
color: rgba(214, 234, 252, 1); | |||
font-size: 10px; | |||
line-height: 40px; | |||
height: 40px; | |||
display: flex; | |||
justify-content: space-around; | |||
align-items: center; | |||
border-bottom: 1px solid #183053; | |||
&:nth-child(odd) { | |||
background-color: rgba(49, 129, 246, 0.1); | |||
} | |||
&:hover { | |||
color: rgba(49, 129, 246, 1); | |||
} | |||
} | |||
.item { | |||
font-size: 14px; | |||
text-align: center; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
} | |||
.item1 { | |||
flex: 1.8; | |||
} | |||
.item:nth-child(1) { | |||
text-align: left; | |||
flex: 1.8; | |||
padding-left: 5px; | |||
} | |||
.item:nth-child(2) { | |||
flex: 1.3; | |||
} | |||
.item:nth-child(3) { | |||
flex: 1.8; | |||
} | |||
.item:nth-child(4) { | |||
flex: 1.4; | |||
} | |||
.item:nth-child(5) { | |||
flex: 1.3; | |||
} | |||
.item:nth-child(6) { | |||
flex: 1.3; | |||
} | |||
.item:nth-child(7) { | |||
flex: 2; | |||
} | |||
.text_overflow { | |||
text-overflow: ellipsis; | |||
} | |||
.test_center { | |||
text-align: center; | |||
} | |||
.pop { | |||
padding: 4px; | |||
position: fixed; | |||
z-index: 20; | |||
color: white; | |||
background: rgba($color: #000000, $alpha: 0.3); | |||
border-radius: 6px; | |||
} | |||
.margin_top { | |||
margin-top: 5px; | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1,3 @@ | |||
<div class="tabs row"> | |||
<div v-for="(item) in data" class="tab hover_pointer" :class="[item.id === currentClick ? 'active' : '']" @click="tabClick(item)">{{item.name}}</div> | |||
</div> |
@@ -0,0 +1,34 @@ | |||
export default { | |||
props: { | |||
data: { | |||
type: Array, | |||
default: function () { | |||
return [ | |||
{ | |||
id: '1', | |||
name: '选项一' | |||
}, | |||
{ | |||
id: '2', | |||
name: '选项二' | |||
} | |||
] | |||
} | |||
}, | |||
}, | |||
data () { | |||
return { | |||
currentClick: '1' | |||
}; | |||
}, | |||
created () { | |||
}, | |||
methods: { | |||
tabClick (info) { | |||
this.currentClick = info.id | |||
this.$emit('change', info) | |||
} | |||
} | |||
}; |
@@ -0,0 +1,16 @@ | |||
.tab { | |||
width: 111px; | |||
height: 43px; | |||
line-height: 43px; | |||
text-align: center; | |||
background: url('./normal.png'); | |||
background-size: 100% 100%; | |||
} | |||
.active { | |||
width: 111px; | |||
height: 43px; | |||
text-align: center; | |||
background: url('./actice.png') !important; | |||
background-size: 100% 100% !important; | |||
} |
@@ -0,0 +1,3 @@ | |||
<template src='./index.html'/> | |||
<script lang='js' src='./index.js'></script> | |||
<style lang='scss' src='./index.scss' scoped></style> |
@@ -0,0 +1,81 @@ | |||
export default { | |||
// 全国图层 | |||
china: { | |||
extent: [73.446960449666, 5.000859278833502, 135.08270263661848, 53.55792617765189], | |||
center: [11610512.95505, 3757698.6283], | |||
chinaLayer: 'daping:china-province', | |||
owsUrl: '/geoserver/daping/ows', | |||
wmsUrl: '/geoserver/daping/wms' | |||
}, | |||
// 洮北区 | |||
taoBei: { | |||
extent: [13627351.035499997, 5676163.947099999, 13720947.290499996, 5750933.648900002], | |||
layer: 'insure:taobei', | |||
dkKey: 'DKBM', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 帮扶村 | |||
bangFuCun: { | |||
extent: [13628031.40103715, 5685826.0930099115, 13711464.357543252, 5756042.221053436], | |||
layer: 'insure:taobei_bangfucun', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 土地托管 | |||
tuDiTuoGuan: { | |||
extent: [13629963.844899997, 5692229.631300002, 13710367.254700001, 5743577.974200004], | |||
layer: 'insure:zhaobei_tudituoguan', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 金融 | |||
jinRong: { | |||
extent: [13636390.6003, 5676224.538699999, 13718188.136700002, 5745958.782800003], | |||
layer: 'insure:zhaobei_jinrong', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 投保地块 | |||
touBaoDiKuai: { | |||
extent: [13677950.270999998, 5729110.567000002, 13683404.956099996, 5732920.926799999], | |||
layer: 'insure:yongshengcun_toubaodikuai', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 作物分布 | |||
zuoWuFenBu: { | |||
extent: [13677477.028300002, 5728997.501000002, 13685086.327899998, 5733606.293399999], | |||
layer: 'insure:yongshengcun_zuowufenbu', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 玉米长势 | |||
yuMiZhangShi: { | |||
extent: [13677469.3815, 5729084.4776, 13683876.4346, 5733618.5767], | |||
layer: 'insure:YMZS3857', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 水稻长势 | |||
shuiDaoZhangShi: { | |||
extent: [13679435.2114, 5729185.7968, 13685095.2366, 5732582.71], | |||
layer: 'insure:SDZS3857', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 受灾情况 | |||
shouZaiQingKuang: { | |||
extent: [13677477.011100002, 5729120.854099996, 13683877.916900001, 5733606.541699996], | |||
layer: 'insure:yongsheng_shouzaiqingkuang', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
}, | |||
// 农机轨迹 | |||
nongJiGuiJi: { | |||
extent: [13680214.11150057, 5730490.893397581, 13681036.724032091, 5731328.1572273625], | |||
layer: 'insure:njgj3857', | |||
owsUrl: '/geoserver/insure/ows', | |||
wmsUrl: '/geoserver/insure/wms' | |||
} | |||
}; |
@@ -0,0 +1,75 @@ | |||
// 自定义指令 | |||
export default { | |||
increase: { // 自增 | |||
inserted: function (el) { | |||
console.log('【inserted】 inserted'); | |||
const endText = el.innerText; | |||
// const endText = el.dataset.value; | |||
const end = el.innerText * 1; | |||
const step = el.dataset.step; | |||
el.innerText = 0; | |||
const timer = setInterval(function () { | |||
el.innerText = el.innerText * 1 + step * 1; | |||
if (el.innerText >= end) { | |||
clearInterval(timer); | |||
el.innerText = endText; | |||
} | |||
}, 200); | |||
} | |||
}, | |||
input: { | |||
bind (el, bidding, vnode) { | |||
const input = el.tagName === 'INPUT' ? el : el.querySelector('input'); | |||
input.addEventListener('compositionstart', () => { | |||
vnode.locking = true; // 解决中文输入双向绑定失效 | |||
}); | |||
input.addEventListener('compositionend', () => { | |||
vnode.locking = false; // 解决中文输入双向绑定失效 | |||
input.dispatchEvent(new Event('input')); | |||
}); | |||
// 输入监听处理 | |||
input.onkeyup = () => { | |||
if (vnode.locking) return; | |||
let regObj = { | |||
num: /\D/g, // 只能输入数字可以0开头 | |||
int: /\D/g, // 只能输入整数 | |||
float: /[^\.\d]/g, // 只能输入数字、浮点数 | |||
numEn: /[^a-zA-Z0-9]/g, // 只能输入数字、字母 | |||
en: /[^a-zA-Z]/g, // 只能输入字母 | |||
numEnCn: /[^A-Za-z0-9-\u4e00-\u9fa5]/g // 只能输入汉字、数字、字母^A-Za-z0-9\u4e00-\u9fa5 | |||
}; | |||
for (let key in bidding.modifiers) { | |||
let reg = regObj[key]; | |||
if (key === 'float') { | |||
// v-input.flot="4" // 小数点位数 | |||
onlyFloat(input, bidding.value || 2); | |||
} else { | |||
input.value = input.value.replace(reg, ''); | |||
} | |||
// 使用Number函数最多16位,超过16位会转换为0 | |||
if (key === 'int') { | |||
input.value = input.value && Number(input.value); | |||
} | |||
} | |||
input.dispatchEvent(new Event('input')); | |||
}; | |||
} | |||
} | |||
}; | |||
function onlyFloat (input, n) { | |||
let value = input.value; | |||
value = value.replace(/[^\d.]/g, ''); | |||
value = value.replace(/^\./g, ''); | |||
value = value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); | |||
if (n && Number(n) > 0) { // 限制n位 | |||
var d = new Array(Number(n)).fill('\\d').join(''); | |||
var reg = new RegExp(`^(\\-)*(\\d+)\\.(${d}).*$`, 'ig'); | |||
value = value.replace(reg, '$1$2.$3'); | |||
} | |||
if (value && !value.includes('.')) { | |||
value = Number(value).toString(); // 去掉开头多个0 | |||
} | |||
input.value = value; | |||
}; |
@@ -0,0 +1,91 @@ | |||
export function formatDate(date, fmt) { | |||
let 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 (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))); | |||
return fmt; | |||
}; | |||
// 保留小数点一位 | |||
export function toFixedd(test) { | |||
var str = parseFloat(test); | |||
return str.toFixed(2); | |||
} | |||
// 如果为空 | |||
export function ifNullNum(val) { | |||
if (val === 0 || val === '' || val === null || val === '0') { | |||
return 0; | |||
} else { | |||
return val; | |||
} | |||
} | |||
// 保留整数 | |||
export function toInteger(test) { | |||
return parseInt(test); | |||
} | |||
export function fullDate(dateText) { | |||
let reg = /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$/; | |||
if (reg.test(dateText)) { | |||
return formatDate(new Date(dateText), 'yyyy-MM-dd hh:mm:ss'); | |||
} else { | |||
return dateText; | |||
} | |||
} | |||
// 空判断 | |||
export function ifNull2(value) { | |||
if (value === '' || !value) { | |||
return '-'; | |||
}else { | |||
return value; | |||
} | |||
} | |||
export function baseDate(dateText) { | |||
return formatDate(new Date(dateText), 'yyyy-MM-dd'); | |||
} | |||
// 数字转化为百分比 | |||
export function numberStrToFixed(str, length = 2) { | |||
return (str * 1).toFixed(length); | |||
} | |||
// 身份证加密 | |||
export function idCardChange(str) { | |||
if (str) { | |||
return str.replace(/(\w{6})\w*(\w{4})/, '$1********$2'); | |||
} | |||
return ''; | |||
} | |||
// 空判断 | |||
export function isNull(value) { | |||
if (!value) { | |||
return '暂无'; | |||
} else { | |||
return value; | |||
} | |||
} | |||
// 空判断 | |||
export function unit(value) { | |||
if (value) { | |||
return value+ '元'; | |||
} else { | |||
return 0+ '元'; | |||
} | |||
} | |||
export function toFixed(value) { | |||
return parseFloat(value).toFixed(0); | |||
} |
@@ -0,0 +1,42 @@ | |||
import Vue from 'vue'; | |||
import ElementUI from 'element-ui'; | |||
import 'element-ui/lib/theme-chalk/index.css'; | |||
import App from './App.vue'; | |||
import router from './router'; | |||
import store from './store/index'; | |||
import "swiper/dist/css/swiper.css"; | |||
import './style/_base.scss'; | |||
import * as filters from '@/filter/index.js'; | |||
import directives from '@/directive/index.js'; | |||
import message from '@/utils/message.js'; | |||
// import interceptor from '@/interceptor/index.js'; | |||
// import '@/permission'; // permission control | |||
import VScaleScreen from 'v-scale-screen'; | |||
// 过滤器 | |||
Object.keys(filters).forEach(key => { | |||
Vue.filter(key, filters[key]); | |||
}); | |||
// 自定义指令 | |||
Object.keys(directives).forEach(key => { | |||
Vue.directive(key, directives[key]); | |||
}); | |||
// 消息提醒 | |||
Object.keys(message).forEach(key => { | |||
Vue.prototype['$' + key] = message[key]; | |||
}); | |||
// interceptor.init(); | |||
Vue.use(ElementUI); | |||
// Vue.use(Select); | |||
// Vue.use(Option); | |||
// Vue.use(Input); | |||
// Vue.use(Pagination); | |||
// Vue.use(Button); | |||
// Vue.use(Dropdown); | |||
Vue.use(VScaleScreen); | |||
new Vue({ | |||
router, | |||
store, | |||
render: h => h(App) | |||
}).$mount('#app'); |
@@ -0,0 +1,18 @@ | |||
import router from './router'; | |||
import store from './store'; | |||
const whiteList = ['/login']; // 不重定向白名单 | |||
router.beforeEach((to, from, next) => { | |||
if (store.getters.loginInfo) { | |||
if (to.path === '/login') { | |||
next({ path: '/login' }); | |||
} else { | |||
next(); | |||
} | |||
} else { | |||
if (whiteList.indexOf(to.path) !== -1) { | |||
next(); | |||
} else { | |||
next(`/login?redirect=${to.path}`); // 否则全部重定向到登录页 | |||
} | |||
} | |||
}); |
@@ -0,0 +1,24 @@ | |||
import Vue from 'vue'; | |||
import VueRouter from 'vue-router'; | |||
Vue.use(VueRouter); | |||
const routes = [ | |||
{ | |||
path: '/', | |||
name: 'root', | |||
redirect: '/capital' | |||
}, | |||
// 首页 | |||
{ | |||
path: '/capital', | |||
name: 'capital', | |||
component: () => import('@/views/capital/index.vue') | |||
} | |||
]; | |||
const router = new VueRouter({ | |||
routes | |||
// mode: 'history' | |||
}); | |||
export default router; |
@@ -0,0 +1,27 @@ | |||
import { login } from '@/api/login.js'; | |||
import { setToken } from '@/utils/auth'; | |||
import { Message } from 'element-ui'; | |||
export const actions = { | |||
// 登录 | |||
Login ({ commit }, params) { | |||
return new Promise((resolve, reject) => { | |||
login(params).then(response => { | |||
if (response.code !== '0') { | |||
Message({ | |||
message: response.reason, | |||
type: 'error', | |||
duration: 2000 | |||
}); | |||
resolve(); | |||
}; | |||
const data = response.data; | |||
commit('SET_LOGIN_INFO', data); | |||
setToken(data.token); | |||
resolve(); | |||
}).catch(error => { | |||
reject(error); | |||
}); | |||
}); | |||
} | |||
}; |
@@ -0,0 +1,6 @@ | |||
export const getters = { | |||
areaCode: state => state.areaCode, | |||
loginInfo: state => state.loginInfo, | |||
industrialSubjectOccupancy: state => state.industrialSubjectOccupancy, | |||
currentLayerName: state => state.currentLayerName | |||
}; |
@@ -0,0 +1,11 @@ | |||
import { state } from './state'; | |||
import { mutations } from './mutations'; | |||
import { actions } from './actions'; | |||
import { getters } from './getters'; | |||
export default { | |||
state, | |||
mutations, | |||
actions, | |||
getters | |||
}; |
@@ -0,0 +1,14 @@ | |||
export const mutations = { | |||
SET_CURRENT_AREACODE: (state, areaCode) => { // 当前地图层级信息 | |||
state.areaCode = areaCode; | |||
}, | |||
SET_LOGIN_INFO: (state, item) => { | |||
state.loginInfo = item; | |||
}, | |||
RESET_LOGIN_INFO: (state) => { | |||
state.loginInfo = null; | |||
}, | |||
SET_CURRENT_LAYERNAME: (state, currentLayerName) => { | |||
state.currentLayerName = currentLayerName; | |||
}, | |||
}; |
@@ -0,0 +1,5 @@ | |||
export const state = { | |||
areaCode: '', | |||
loginInfo: null, | |||
currentLayerName: '' // 当前操作的图层名 | |||
}; |
@@ -0,0 +1,19 @@ | |||
import Vue from 'vue'; | |||
import Vuex from 'vuex'; | |||
import VuexPersistence from 'vuex-persist'; | |||
import app from '@/store/app/index.js'; | |||
Vue.use(Vuex); | |||
const vuexLocal = new VuexPersistence({ | |||
key: 'rongxin.nongjing.expo', | |||
modules: ['app'] | |||
}); | |||
export default new Vuex.Store({ | |||
modules: { | |||
app | |||
}, | |||
plugins: [vuexLocal.plugin] | |||
}); |
@@ -0,0 +1,112 @@ | |||
@import "./element-reset"; | |||
@import "./animation"; | |||
@import "./font"; | |||
@import "./layout"; | |||
* { | |||
margin: 0; | |||
padding: 0; | |||
font-family: '微软雅黑'; | |||
box-sizing: border-box; | |||
} | |||
html, | |||
body { | |||
position: relative; | |||
height: 100%; | |||
color: #FFFFFF; | |||
overflow-y: auto; | |||
} | |||
.page { | |||
position: relative; | |||
width: 1920px; | |||
height: 1080px; | |||
.left_side { | |||
position: absolute; | |||
left: 20px; | |||
top: 100px; | |||
bottom: 20px; | |||
} | |||
.right_side { | |||
position: absolute; | |||
right: 20px; | |||
top: 100px; | |||
bottom: 20px; | |||
} | |||
.buttom_side { | |||
position: absolute; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
bottom: 20px; | |||
} | |||
} | |||
.scrollbar::-webkit-scrollbar { | |||
width: 0; | |||
height: 0; | |||
} | |||
.scrollbar::-webkit-scrollbar-thumb { | |||
border-radius: 5px; | |||
background-color: #124394; | |||
} | |||
.scrollbar::-webkit-scrollbar-track { | |||
border-radius: 5px; | |||
background-color: #00286b; | |||
} | |||
.scrollbar2::-webkit-scrollbar { | |||
width: 5px; | |||
} | |||
.scrollbar2::-webkit-scrollbar-thumb { | |||
border-radius: 5px; | |||
background-color: #124394; | |||
} | |||
.scrollbar2::-webkit-scrollbar-track { | |||
border-radius: 5px; | |||
background-color: #00286b; | |||
} | |||
// 省略号 | |||
.ellipsis_1 { | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
white-space: nowrap; | |||
} | |||
.full { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.hover_pointer { | |||
cursor: pointer; | |||
} | |||
.border { | |||
border: 1px solid red; | |||
} | |||
.screen { | |||
width: 1920px; | |||
height: 1080px; | |||
} | |||
.relative { | |||
position: relative; | |||
} | |||
.menu_style { | |||
border: 1px solid #48B7FF; | |||
box-sizing: border-box; | |||
background-color: rgba(6, 24, 24, 0.585); | |||
border-radius: 4px; | |||
box-shadow: 0px 0px 13px 0px #48B7FF inset; | |||
} |
@@ -0,0 +1,67 @@ | |||
@keyframes selfRotate { | |||
from{ | |||
transform: translate(-50%, -50%) rotate(0deg); | |||
} | |||
to{ | |||
transform: translate(-50%, -50%) rotate(360deg); | |||
} | |||
} | |||
@keyframes selfRotate2 { | |||
from{ | |||
// transform: ; | |||
transform: rotate(0deg); | |||
} | |||
to{ | |||
// transform: ; | |||
transform: rotate(360deg); | |||
} | |||
} | |||
@keyframes selfRotateReverse { | |||
from{ | |||
transform: rotate(0deg); | |||
} | |||
to{ | |||
transform: rotate(-360deg); | |||
} | |||
} | |||
@keyframes showFromSmall { | |||
from{ | |||
transform: translate(-50%, -50%) scale(0.1); | |||
} | |||
to{ | |||
transform: translate(-50%, -50%) scale(1); | |||
} | |||
} | |||
@keyframes showfromSide { | |||
from{ | |||
opacity: 0 !important; | |||
transform: translateX(-100px); | |||
} | |||
to{ | |||
opacity: 1 !important; | |||
transform: translate(0px); | |||
} | |||
} | |||
@keyframes showfromSide2 { | |||
from{ | |||
opacity: 0.1; | |||
transform: translateX(100px); | |||
} | |||
to{ | |||
opacity: 1; | |||
transform: translate(0px); | |||
} | |||
} | |||
@keyframes selfRotateButtom { | |||
from{ | |||
transform: rotate(0deg); | |||
} | |||
to{ | |||
transform: rotate(-360deg); | |||
} | |||
} | |||
@@ -0,0 +1,112 @@ | |||
// 镇地图 | |||
$bg_color: rgba(0, 23, 59, 0.5); | |||
$border_color: rgba(30, 56, 92, 1); | |||
.map_select.el-select, | |||
.map_input { | |||
width: 100%; | |||
border: 1px solid red; | |||
display: block; | |||
.el-input__inner { | |||
height: 60px; | |||
line-height: 60px; | |||
background: $bg_color; | |||
border: 1px solid $border_color; | |||
color: #FFFFFF; | |||
} | |||
.el-input__inner::-webkit-input-placeholder { | |||
font-size: 14px; | |||
font-weight: 400; | |||
color: #6789AC; | |||
} | |||
} | |||
.el-input-number { | |||
width: 100%; | |||
} | |||
.el-textarea { | |||
width: 100% !important; | |||
.el-textarea__inner { | |||
border: 0; | |||
background: $bg_color; | |||
} | |||
} | |||
.map_select_popper.el-select-dropdown { | |||
background: $bg_color; | |||
border: 1px solid $border_color; | |||
width: 20px; | |||
.el-select-dropdown__item { | |||
height: 50px; | |||
line-height: 50px; | |||
color: #FFFFFF; | |||
&.hover { | |||
background: rgba(0, 31, 73, 1); | |||
} | |||
} | |||
.popper__arrow { | |||
border-bottom-color: $bg_color; | |||
&::after { | |||
border-bottom-color: $bg_color; | |||
} | |||
} | |||
} | |||
.pagination { | |||
* { | |||
background: transparent !important; | |||
color: #FFFFFF !important; | |||
} | |||
*:hover, | |||
.active { | |||
color: #409EFF !important; | |||
} | |||
} | |||
.el-popover { | |||
border: 0; | |||
border-radius: 0; | |||
background-color: transparent !important; | |||
z-index: 0; | |||
} | |||
.el-popper { | |||
z-index: 0; | |||
} | |||
.el-input__inner { | |||
width: 100% !important; | |||
color: #DFF2FF; | |||
border: 0; | |||
background: $bg_color; | |||
} | |||
.el-range-input { | |||
background-color: transparent !important; | |||
} | |||
.el-date-editor .el-range-separator { | |||
color: #C0C4CC !important; | |||
} | |||
.el-select { | |||
width: 100% !important; | |||
} | |||
.el-textarea__inner { | |||
color: #FFFFFF; | |||
} | |||
.el-date-editor { | |||
width: 100% !important; | |||
} |
@@ -0,0 +1,55 @@ | |||
// @font-face { | |||
// font-family: "special"; | |||
// src: url("~@/assets/fonts/DIN Alternate Bold.ttf"); | |||
// font-weight: normal; | |||
// font-style: normal; | |||
// } | |||
// @font-face { | |||
// font-family: "incline"; | |||
// src: url("~@/assets/fonts/优设标题黑.ttf"); | |||
// font-weight: normal; | |||
// font-style: normal; | |||
// } | |||
// @font-face { | |||
// font-family: "title"; | |||
// src: url("~@/assets/fonts/锐字真言体.ttf"); | |||
// font-weight: normal; | |||
// font-style: normal; | |||
// } | |||
// @font-face { | |||
// /* 重命名字体名 */ | |||
// font-family: 'title2'; | |||
// /* 引入字体 */ | |||
// src: url('~@/assets/fonts/庞门正道标题体.ttf'); | |||
// font-weight: normal; | |||
// font-style: normal; | |||
// } | |||
// .title2 { | |||
// font-family: title2 !important; | |||
// } | |||
// .special_font { | |||
// font-family: special !important; | |||
// } | |||
// .title_font { | |||
// font-family: title !important; | |||
// } | |||
// .incline_font { | |||
// font-family: incline !important; | |||
// } | |||
// .font_size_14 { | |||
// font-size: 14px; | |||
// } | |||
// .font_size_18 { | |||
// font-size: 18px; | |||
// } |
@@ -0,0 +1,61 @@ | |||
@function fact($number) { | |||
$value: 1; | |||
@if $number > 0 { | |||
@for $i from 1 through $number { | |||
$value: $value * $i; | |||
} | |||
} | |||
@return $value; | |||
} | |||
@function pow($number, $exp) { | |||
$value: 1; | |||
@if $exp > 0 { | |||
@for $i from 1 through $exp { | |||
$value: $value * $number; | |||
} | |||
} | |||
@else if $exp < 0 { | |||
@for $i from 1 through -$exp { | |||
$value: $value / $number; | |||
} | |||
} | |||
@return $value; | |||
} | |||
@function rad($angle) { | |||
$unit: unit($angle); | |||
$unitless: $angle / ($angle * 0 + 1); | |||
@if $unit == deg { | |||
$unitless: $unitless / 180 * pi(); | |||
} | |||
@return $unitless; | |||
} | |||
@function pi() { | |||
@return 3.14159265359; | |||
} | |||
@function sin($angle) { | |||
$sin: 0; | |||
$angle: rad($angle); | |||
// Iterate a bunch of times. | |||
@for $i from 0 through 10 { | |||
$sin: $sin + pow(-1, $i) * pow($angle, (2 * $i + 1)) / fact(2 * $i + 1); | |||
} | |||
@return $sin; | |||
} | |||
@function cos($angle) { | |||
$cos: 0; | |||
$angle: rad($angle); | |||
// Iterate a bunch of times. | |||
@for $i from 0 through 10 { | |||
$cos: $cos + pow(-1, $i) * pow($angle, 2 * $i) / fact(2 * $i); | |||
} | |||
@return $cos; | |||
} | |||
@function tan($angle) { | |||
@return sin($angle) / cos($angle); | |||
} |
@@ -0,0 +1,21 @@ | |||
.row { | |||
display: flex; | |||
} | |||
.col { | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.space_between { | |||
justify-content: space-between; | |||
} | |||
.flex_1 { | |||
flex: 1; | |||
} | |||
.align_item_center { | |||
align-items: center; | |||
} |
@@ -0,0 +1,15 @@ | |||
const TokenKey = 'Admin-Token'; | |||
// 获取token | |||
export function getToken () { | |||
return 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImM0MDZkM2Q0LTM5N2UtNGRjMi1hMDIyLTEzY2UwZGZkMDA3OCJ9.X2CyaATOQ8S811oh5uMWpD5WHeJ3Meya5E7TRoEmOukzoZy-U5AwmzRn7UJs_OY8IU3a-DGFZNZc---Vh336UQ'; // 将token保存在本地 | |||
} | |||
// 保存token | |||
export function setToken (token) { | |||
return localStorage.setItem(TokenKey, token); // 将token保存在本地 | |||
} | |||
// 删除token | |||
export function removeToken () { | |||
return localStorage.removeItem(TokenKey); | |||
} |