版本2.0更新
3
h5-enginex-manager/.browserslistrc
Normal file
@@ -0,0 +1,3 @@
|
||||
> 1%
|
||||
last 2 versions
|
||||
not ie <= 8
|
||||
3
h5-enginex-manager/.env.jia
Normal file
@@ -0,0 +1,3 @@
|
||||
NODE_ENV = 'jia'
|
||||
VUE_CURRENTMODE = 'jia'
|
||||
VUE_PROXY = true
|
||||
3
h5-enginex-manager/.env.niu
Normal file
@@ -0,0 +1,3 @@
|
||||
NODE_ENV = 'niu'
|
||||
VUE_CURRENTMODE = 'niu'
|
||||
VUE_PROXY = true
|
||||
3
h5-enginex-manager/.env.produce
Normal file
@@ -0,0 +1,3 @@
|
||||
NODE_ENV = 'produce'
|
||||
VUE_CURRENTMODE = 'produce'
|
||||
VUE_PROXY = true
|
||||
3
h5-enginex-manager/.env.release
Normal file
@@ -0,0 +1,3 @@
|
||||
NODE_ENV = 'release'
|
||||
VUE_CURRENTMODE = 'release'
|
||||
VUE_PROXY = true
|
||||
3
h5-enginex-manager/.env.test
Normal file
@@ -0,0 +1,3 @@
|
||||
NODE_ENV = 'test'
|
||||
VUE_CURRENTMODE = 'test'
|
||||
VUE_PROXY = true
|
||||
3
h5-enginex-manager/.env.wang
Normal file
@@ -0,0 +1,3 @@
|
||||
NODE_ENV = 'wang'
|
||||
VUE_CURRENTMODE = 'wang'
|
||||
VUE_PROXY = true
|
||||
12
h5-enginex-manager/.eslintrc.js
Normal file
@@ -0,0 +1,12 @@
|
||||
// {
|
||||
// "presets": [
|
||||
// ["env", {
|
||||
// "modules": false,
|
||||
// "targets": {
|
||||
// "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
||||
// }
|
||||
// }],
|
||||
// "stage-2"
|
||||
// ],
|
||||
// "plugins": ["transform-remove-strict-mode"]
|
||||
// }
|
||||
22
h5-enginex-manager/.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
example.html
|
||||
favicon.ico
|
||||
# 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*
|
||||
6
h5-enginex-manager/.prettierrc
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"tabWidth": 4,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"printWidth": 140
|
||||
}
|
||||
21
h5-enginex-manager/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016-2019 vue-manage-system
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
6
h5-enginex-manager/babel.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/app'
|
||||
],
|
||||
|
||||
}
|
||||
89
h5-enginex-manager/baseUrl.js
Normal file
@@ -0,0 +1,89 @@
|
||||
// console.log(process.env)
|
||||
var proxyObj = {}
|
||||
// console.log(process.env.VUE_PROXY)
|
||||
switch (process.env.NODE_ENV) {
|
||||
case 'development': // 开发环境代理地址
|
||||
proxyObj = {
|
||||
'/Riskmanage': {
|
||||
target: 'http://localhost:80', // 开发环境
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {
|
||||
'^/Riskmanage': '/Riskmanage'
|
||||
},
|
||||
|
||||
},
|
||||
'/trading': {
|
||||
target: 'http://localhost:80', // 开发环境
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {
|
||||
'^/trading': '/trading'
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
break
|
||||
case 'test': // 测试环境代理地址
|
||||
proxyObj = {
|
||||
'/Riskmanage': {
|
||||
target: 'http://localhost:8080', // 测试环境
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {
|
||||
'^/Riskmanage': '/Riskmanage'
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'release': // 军环境
|
||||
proxyObj = {
|
||||
'/Riskmanage': {
|
||||
target: 'http://192.168.3.155:8080', // 谭环境
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {
|
||||
'^/Riskmanage': '/Riskmanage'
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'niu': // 牛环境
|
||||
proxyObj = {
|
||||
'/Riskmanage': {
|
||||
target: 'http://ex.fibo.cn:80', // 生产环境
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {
|
||||
'^/Riskmanage': '/Riskmanage'
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'jia': // 贾环境
|
||||
proxyObj = {
|
||||
'/Riskmanage': {
|
||||
target: 'http://zhangzj.vip:8000', // 生产环境
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {
|
||||
'^/Riskmanage': '/Riskmanage'
|
||||
}
|
||||
}
|
||||
// '/list': {
|
||||
// target: 'http://127.0.0.1:8888', // 生产环境
|
||||
// changeOrigin: true, // 是否跨域
|
||||
// pathRewrite: {
|
||||
// '^/list': '/list'
|
||||
// }
|
||||
// },
|
||||
}
|
||||
break
|
||||
case 'wang': // 汪环境
|
||||
proxyObj = {
|
||||
'/Riskmanage': {
|
||||
target: 'http://192.168.50.228:8080', // 生产环境
|
||||
changeOrigin: true, // 是否跨域
|
||||
pathRewrite: {
|
||||
'^/Riskmanage': '/Riskmanage'
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
module.exports = proxyObj
|
||||
BIN
h5-enginex-manager/favicon.icon
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
9
h5-enginex-manager/h5-enginex-manager.iml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
14
h5-enginex-manager/index.html
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite App</title>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="./src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
h5-enginex-manager/logo.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
13840
h5-enginex-manager/package-lock.json
generated
Normal file
57
h5-enginex-manager/package.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "vue-manage-system",
|
||||
"version": "4.2.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"serve:test": "vue-cli-service serve --mode test",
|
||||
"serve:jia": "vue-cli-service serve --mode jia",
|
||||
"serve:niu": "vue-cli-service serve --mode niu",
|
||||
"serve:wang": "vue-cli-service serve --mode wang",
|
||||
"serve:release": "vue-cli-service serve --mode release",
|
||||
"serve:produce": "vue-cli-service serve --mode produce",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint",
|
||||
"eslint": "eslint --fix --ext .js,.vue src",
|
||||
"stylelint": "stylelint **/*.{vue,css,scss,less} --fix",
|
||||
"standard": "standard",
|
||||
"standfix": "standard --fix",
|
||||
"dev": "vite",
|
||||
"start": "vite",
|
||||
"preview": "vite preview",
|
||||
"vite-build": "vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.18.1",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"echarts": "^5.1.2",
|
||||
"element-ui": "^2.11.0",
|
||||
"js-cookie": "^2.2.1",
|
||||
"less": "^4.1.1",
|
||||
"less-loader": "^5.0.0",
|
||||
"mavon-editor": "^2.6.17",
|
||||
"node-sass": "^4.14.1",
|
||||
"vue": "^2.6.10",
|
||||
"vue-codemirror": "^4.0.6",
|
||||
"vue-cropperjs": "^3.0.0",
|
||||
"vue-i18n": "^8.10.0",
|
||||
"vue-quill-editor": "^3.0.6",
|
||||
"vue-router": "^3.0.3",
|
||||
"vuedraggable": "^2.17.0",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^3.9.0",
|
||||
"@vue/cli-service": "^3.9.0",
|
||||
"babel-plugin-transform-remove-strict-mode": "0.0.2",
|
||||
"mockjs": "^1.1.0",
|
||||
"sass-loader": "^7.3.1",
|
||||
"sass-resources-loader": "^2.1.1",
|
||||
"style-loader": "^2.0.0",
|
||||
"vue-template-compiler": "^2.6.10",
|
||||
"vite": "2",
|
||||
"@vitejs/plugin-legacy": "^1.4.4",
|
||||
"vite-plugin-mock": "2",
|
||||
"vite-plugin-vue2": "latest"
|
||||
}
|
||||
}
|
||||
5
h5-enginex-manager/postcss.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
||||
BIN
h5-enginex-manager/public/img/baimingdan.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
h5-enginex-manager/public/img/blackName.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
h5-enginex-manager/public/img/champion.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
h5-enginex-manager/public/img/childEngine.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
h5-enginex-manager/public/img/createBlackName.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
h5-enginex-manager/public/img/createCrediteLevel.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
h5-enginex-manager/public/img/createDcisionOption.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
h5-enginex-manager/public/img/createRiverRate.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
h5-enginex-manager/public/img/createRuleGroup.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
h5-enginex-manager/public/img/createScoreLevel.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
h5-enginex-manager/public/img/createUserGroup.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
h5-enginex-manager/public/img/createWhiteName.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
h5-enginex-manager/public/img/dcisionOption.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
h5-enginex-manager/public/img/decisionBcg.jpg
Normal file
|
After Width: | Height: | Size: 684 KiB |
BIN
h5-enginex-manager/public/img/gettogether.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
h5-enginex-manager/public/img/guizeji.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
h5-enginex-manager/public/img/heimingdan.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
h5-enginex-manager/public/img/juecebiao.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
h5-enginex-manager/public/img/juecebiaonode.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
h5-enginex-manager/public/img/jueceshu.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
h5-enginex-manager/public/img/jueceshuNode.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
h5-enginex-manager/public/img/models.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
h5-enginex-manager/public/img/moxing.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
h5-enginex-manager/public/img/parallelNode.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
h5-enginex-manager/public/img/pingfenka.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
h5-enginex-manager/public/img/rpc.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
h5-enginex-manager/public/img/rpcnode.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
h5-enginex-manager/public/img/ruleGroup.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
h5-enginex-manager/public/img/scoreLevel.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
h5-enginex-manager/public/img/start.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
h5-enginex-manager/public/img/userGroup.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
h5-enginex-manager/public/img/whiteName.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
h5-enginex-manager/public/img/ziyinqing.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
290
h5-enginex-manager/public/index.html
Normal file
2930
h5-enginex-manager/public/jtopo-0.4.8-min.js
vendored
Normal file
BIN
h5-enginex-manager/public/logo.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
40
h5-enginex-manager/public/table.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"list": [{
|
||||
"id": 1,
|
||||
"name": "张三",
|
||||
"money": 123,
|
||||
"address": "广东省东莞市长安镇",
|
||||
"state": "成功",
|
||||
"date": "2019-11-1",
|
||||
"thumb": "https://lin-xin.gitee.io/images/post/wms.png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "李四",
|
||||
"money": 456,
|
||||
"address": "广东省广州市白云区",
|
||||
"state": "成功",
|
||||
"date": "2019-10-11",
|
||||
"thumb": "https://lin-xin.gitee.io/images/post/node3.png"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "王五",
|
||||
"money": 789,
|
||||
"address": "湖南省长沙市",
|
||||
"state": "失败",
|
||||
"date": "2019-11-11",
|
||||
"thumb": "https://lin-xin.gitee.io/images/post/parcel.png"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "赵六",
|
||||
"money": 1011,
|
||||
"address": "福建省厦门市鼓浪屿",
|
||||
"state": "成功",
|
||||
"date": "2019-10-20",
|
||||
"thumb": "https://lin-xin.gitee.io/images/post/notice.png"
|
||||
}
|
||||
],
|
||||
"pageTotal": 4
|
||||
}
|
||||
65
h5-enginex-manager/src/App.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
|
||||
<!-- <keep-alive include="history"> -->
|
||||
<router-view></router-view>
|
||||
<!-- </keep-alive> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// import {
|
||||
// fieldusing
|
||||
// } from '@/api/index.js'
|
||||
export default {
|
||||
name: 'App',
|
||||
created() {
|
||||
|
||||
// getV({page:2}).then(res=>{
|
||||
|
||||
// console.log(String(res))
|
||||
// })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
@import "./assets/css/main.css";
|
||||
@import "./assets/css/color-dark.css";
|
||||
|
||||
/*深色主题*/
|
||||
/*@import "./assets/css/theme-green/color-green.css"; 浅绿色主题*/
|
||||
.setting-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.setting-wrapper .line {
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.call-mode-wrapper,
|
||||
.setting-wrapper {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.conditions-wrapper {
|
||||
/* display: flex; */
|
||||
margin: 15px 0;
|
||||
/* align-items: center; */
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.type3_submit_home {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding-right: 10px;
|
||||
/* position: absolute; */
|
||||
/* left: 80%; */
|
||||
margin-top: 100px;
|
||||
/* top: 74.5vh; */
|
||||
/* bottom: 20px; */
|
||||
z-index: 999;
|
||||
}
|
||||
</style>
|
||||
616
h5-enginex-manager/src/api/index.js
Normal file
@@ -0,0 +1,616 @@
|
||||
import request from '../utils/request';
|
||||
// console.log(request)
|
||||
|
||||
// export const getV = (params) => request.get(`${window.location.origin}/index.html?time=${new Date().getTime()}`)
|
||||
|
||||
|
||||
|
||||
export const fetchData = (params) => request.get('./table.json',{params})
|
||||
// 登录接口
|
||||
export const getLogin = (params) => request.post('Riskmanage/v2/login/login',params)
|
||||
// 登出接口
|
||||
export const getLogout = (params) => request.post('Riskmanage/v2/login/logout',params)
|
||||
// 查询菜单权限接口
|
||||
export const getMenus = (params) => request.post('Riskmanage/v2/sysMenu/getMenus',params)
|
||||
// 查询首页统计信息
|
||||
export const getIndexInfo = (params) => request.post('Riskmanage/v2/engine/getIndexInfo',params)
|
||||
// 查询模型列表信息
|
||||
export const getModelsList = (params) => request.post('Riskmanage/models/getModelsList',params)
|
||||
// 获取组织下全量指标信息
|
||||
export const getAllFields = (params) => request.post('Riskmanage/models/getAllFields',params)
|
||||
// 添加模型
|
||||
export const saveModel = (params) => request.post('Riskmanage/models/save',params)
|
||||
// 删除模型
|
||||
export const deleteModel = (id) => request.delete('Riskmanage/models/delete/' + id)
|
||||
// 修改模型
|
||||
export const updateModel = (id, params) => request.put('Riskmanage/models/update/' + id, params)
|
||||
// 获取模型详细信息
|
||||
export const getModelDetailInfo = (id) => request.get('Riskmanage/models/getDetailInfo/' + id)
|
||||
|
||||
// 查询引擎列表
|
||||
export const getEngineList = (params) => request.get('Riskmanage/v2/engine/getEngineList',{params})
|
||||
// 获取UUID
|
||||
export const getEngineUUID = () => request.get('Riskmanage/v2/engine/getUUID')
|
||||
// 引擎信息回显
|
||||
export const engineInitupdate = (id) => request.get('Riskmanage/v2/engine/initupdate/' + id)
|
||||
// 保存引擎信息
|
||||
export const updateEngine = (params) => request.put('Riskmanage/v2/engine/update',params)
|
||||
|
||||
|
||||
|
||||
// 数据源 数据库列表
|
||||
export const getDataSourcelist = (params) => request.post('/Riskmanage/datasource/getDataSourceList',params)
|
||||
// 数据源 修改以及创建数据库
|
||||
export const setDataSource = (params) => request.post('/Riskmanage/datasource/save',params)
|
||||
// 数据源 删除
|
||||
export const deleteDataSource = (id) => request.delete('/Riskmanage/datasource/'+id)
|
||||
// 数据源 修改数据源
|
||||
export const updataDataSource = (params) => request.post('/Riskmanage/datasource/update',params)
|
||||
|
||||
|
||||
// 指标管理 listTree 获取
|
||||
export const getfieldListTree = (params) => request.post('/Riskmanage/v2/datamanage/field/newListTree',params)
|
||||
|
||||
// 指标管理 指标列表 获取
|
||||
export const getfieldList = (params) => request.post('/Riskmanage/v2/datamanage/field/list',params)
|
||||
|
||||
// 指标管理 指标列表 获取
|
||||
export const addfieldList = (params) => request.post('/Riskmanage/v2/datamanage/field/addTree',params)
|
||||
// 指标管理 更新类型 名称
|
||||
export const updatafieldList = (params) => request.post('/Riskmanage/v2/datamanage/field/updateTree',params)
|
||||
// 指标管理 更新类型 名称
|
||||
export const getFieldUser = (params) => request.post('/Riskmanage/v2/datamanage/field/findFieldByUser',params)
|
||||
|
||||
// 保存 增加属性
|
||||
export const getfieldsave = (params) => request.post('/Riskmanage/v2/datamanage/field/save',params)
|
||||
// 编辑保存
|
||||
export const updatafield = (params) => request.post('/Riskmanage/v2/datamanage/field/update',params)
|
||||
// 启用等
|
||||
export const fieldusing = (params) => request.post('/Riskmanage/v2/datamanage/field/updateStatus',params)
|
||||
// 指标导入模板下载
|
||||
export const fielddownTemplate = (params) => request.post('/Riskmanage/v2/datamanage/field/downTemplate',params)
|
||||
// 指标批量模板上传
|
||||
export const fieldupdata = (params) => request.post('/Riskmanage/v2/datamanage/field/upload',params)
|
||||
// 获取指标管理
|
||||
export const getfieldInfo = (id,params) => request.post('/Riskmanage/v2/datamanage/field/getFieldInfo/'+id,{params})
|
||||
|
||||
// 指标文件夹移动
|
||||
export const updateFieldFolder = (params) => request.post('/Riskmanage/v2/datamanage/field/updateFieldFolder',params)
|
||||
|
||||
// ========================================规则管理==========================
|
||||
|
||||
|
||||
|
||||
// // groovy管理 list获取
|
||||
// export const getRulesList = (params) => request.post('/Riskmanage/v3/rule/getRuleList',params)
|
||||
// // groovy管理 删启停
|
||||
// export const Rulesusing = (params) => request.post('/Riskmanage/v3/rule/updateRuleStatus',params)
|
||||
|
||||
// // groovy管理 保存
|
||||
// export const getrulesave = (params) => request.post('/Riskmanage/v3/rule/addRule',params)
|
||||
// groovy管理 具体元素内容获取
|
||||
export const getScriptRuleInfo = (params) => request.post('/Riskmanage/v3/rule/getScriptRule/'+params)
|
||||
// // groovy管理 修改保存
|
||||
// export const getRuleUpdata = (params) => request.post('/Riskmanage/v3/rule/updateRule',params)
|
||||
// groovy管理 获取规则主体
|
||||
export const getRuleScriptVersionInfo = (id) => request.post('/Riskmanage/v3/ruleScriptVersion/getRuleScriptVersion/'+id.id)
|
||||
// groovy管理 添加规则版本
|
||||
export const addRuleScriptVersion = (params) => request.post('/Riskmanage/v3/ruleScriptVersion/addRuleScriptVersion',params)
|
||||
// groovy管理 更新规则版本状态
|
||||
export const updateRuleScriptVersionStatus = (params) => request.post('/Riskmanage/v3/ruleScriptVersion/updateRuleScriptVersionStatus ',params)
|
||||
// groovy管理 复制规则版本
|
||||
export const copyRuleScriptVersion = (params) => request.post('/Riskmanage/v3/ruleScriptVersion/copyRuleScriptVersion',params)
|
||||
// groovy管理 规则版本重命名
|
||||
export const updateRuleScriptVersion = (params) => request.post('/Riskmanage/v3/ruleScriptVersion/updateRuleScriptVersion',params)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 规则管理 listTree 获取
|
||||
export const getRulesListTree = (params) => request.post('/Riskmanage/v2/knowledge/tree/list',params)
|
||||
// 规则管理 list获取
|
||||
export const getRulesList = (params) => request.post('/Riskmanage/v3/rule/getRuleList',params)
|
||||
// 规则管理 删启停
|
||||
export const Rulesusing = (params) => request.post('/Riskmanage/v3/rule/updateRuleStatus',params)
|
||||
// 规则管理 文件夹新增
|
||||
export const addListRules = (params) => request.post('/Riskmanage/v2/knowledge/tree/save',params)
|
||||
// 规则管理 文件夹删除 修改
|
||||
export const updataListRules = (params) => request.post('/Riskmanage/v2/knowledge/tree/update',params)
|
||||
// 规则管理 保存
|
||||
export const getrulesave = (params) => request.post('/Riskmanage/v3/rule/addRule',params)
|
||||
// 规则管理 具体元素内容获取
|
||||
export const getRuleInfo = (id) => request.post('/Riskmanage/v3/rule/getRuleInfo/'+id)
|
||||
// 规则管理 修改保存
|
||||
export const getRuleUpdata = (params) => request.post('/Riskmanage/v3/rule/updateRule',params)
|
||||
// 规则管理 获取规则主体
|
||||
export const getRuleVersionInfo = (params) => request.post('/Riskmanage/v3/ruleVersion/getRuleVersionInfo/'+params.id)
|
||||
// 规则管理 添加规则版本
|
||||
export const addRuleVersion = (params) => request.post('/Riskmanage/v3/ruleVersion/addRuleVersion',params)
|
||||
// 规则管理 更新规则版本状态
|
||||
export const updateRuleVersionStatus = (params) => request.post('/Riskmanage/v3/ruleVersion/updateRuleVersionStatus',params)
|
||||
// 规则管理 复制规则版本
|
||||
export const copyRuleVersion = (params) => request.post('/Riskmanage/v3/ruleVersion/copyRuleVersion',params)
|
||||
// 规则管理 规则版本重命名
|
||||
export const updateRuleVersion = (params) => request.post('/Riskmanage/v3/ruleVersion/updateRuleVersion',params)
|
||||
|
||||
|
||||
|
||||
// 简单规则管理 保存
|
||||
export const getEasyRulesave = (params) => request.post('/Riskmanage/v3/rule/addRule',params)
|
||||
// 简单规则管理 修改保存
|
||||
export const getEasyRuleUpdata = (params) => request.post('/Riskmanage/v3/rule/updateRule',params)
|
||||
// 简单规则管理 具体元素内容获取
|
||||
export const getEasyRuleInfo = (params) => request.post('/Riskmanage/v3/rule/getSimpleRule/'+params.id)
|
||||
// 简单规则管理 批量上传
|
||||
export const ruleupdata = (params) => request.post('/Riskmanage/v3/rule/upload',params)
|
||||
// 规则文件夹移动
|
||||
export const updateRuleParent = (params) => request.post('/Riskmanage/v3/rule/updateRuleParent',params)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//===============================================评分卡管理===============================
|
||||
// 评分卡 list 获取
|
||||
// export const getSCOList = (params) => request.post('/Riskmanage/v2/knowledge/scorecard/list',params)
|
||||
export const getSCOList = (params) => request.post('/Riskmanage/v3/scorecard/list',params)
|
||||
// 评分卡 list 删启停
|
||||
export const updataListSCO = (params) => request.post('/Riskmanage/v3/scorecard/updateStatus',params)
|
||||
// 评分卡 检测区间是否闭环
|
||||
export const validateSection = (params) => request.post('/Riskmanage/v3/scorecard/section',params)
|
||||
// 评分卡 新增列表
|
||||
export const addSCO = (params) => request.post('/Riskmanage/v3/scorecard/add',params)
|
||||
// 评分卡 获取评分卡版本
|
||||
export const getSCOVersion = (params) => request.post('/Riskmanage/v3/scorecard/getScorecardInfo/'+params.id)
|
||||
// 评分卡 添加评分卡版本
|
||||
export const addScorecardVersion = (params) => request.post('/Riskmanage/v3/scorecardVersion/addScorecardVersion',params)
|
||||
// 评分卡 更新版本状态
|
||||
export const updateScorecardVersionStatus = (params) => request.post('/Riskmanage/v3/scorecardVersion/updateScorecardVersionStatus',params)
|
||||
// 评分卡 复制版本
|
||||
export const copyScorecardVersion = (params) => request.post('/Riskmanage/v3/scorecardVersion/copyScorecardVersion',params)
|
||||
// 评分卡 版本重命名
|
||||
export const updateScorecardVersion = (params) => request.post('/Riskmanage/v3/scorecardVersion/updateScorecardVersion',params)
|
||||
// 评分卡 获取评分卡主体
|
||||
export const getSCOInfo = (params) => request.post('/Riskmanage/v3/scorecardVersion/getScorecardVersionInfo/'+params.id)
|
||||
// 评分卡 修改列表提交
|
||||
export const getSCOUpdata = (params) => request.post('/Riskmanage/v3/scorecard/update',params)
|
||||
|
||||
|
||||
|
||||
|
||||
//======================================黑名单=======================================
|
||||
|
||||
// 黑白名单库管理 首次进来获取名单列表
|
||||
export const getBlackWhiteList = (params) => request.post('/Riskmanage/v2/datamanage/listmanage/list',params)
|
||||
// 黑白名单库管理 添加名单库
|
||||
export const saveBlackWhiteList = (params) => request.post('/Riskmanage/v2/datamanage/listmanage/save',params)
|
||||
// 黑白名单库管理 编辑名单库
|
||||
export const updateBlackWhiteList = (params) => request.post('/Riskmanage/v2/datamanage/listmanage/update',params)
|
||||
// 黑白名单库管理 获取详情
|
||||
export const getListDbInfo = (id,params) => request.post('/Riskmanage/v2/datamanage/listmanage/getListDbInfo/'+id,params)
|
||||
// /
|
||||
export const updateStatus = (params) => request.post('/Riskmanage/v2/datamanage/listmanage/updateStatus',params)
|
||||
// 导入
|
||||
export const listmanageUpload = (id,params) => request.post('/Riskmanage/v2/datamanage/listmanage/upload/'+id,params)
|
||||
//下载模板
|
||||
export const listmanageDownTemplate = () => request.post('/Riskmanage/v2/datamanage/listmanage/downTemplate')
|
||||
// v2/datamanage/listmanage/getListDbData
|
||||
export const getListDbData = (params) => request.post('/Riskmanage/v2/datamanage/listmanage/getListDbData',params)
|
||||
|
||||
// ================================== 系统管理 ===================================
|
||||
// ---------------------用户管理
|
||||
// 获取用户列表
|
||||
export const getUserList = (params) => request.post('/Riskmanage/v2/sysUser/getUserList',params)
|
||||
// 创建用户
|
||||
export const saveUser = (params) => request.post('/Riskmanage/v2/sysUser/save',params)
|
||||
// 编辑修改
|
||||
export const updateUser = (params) => request.post('/Riskmanage/v2/sysUser/update',params)
|
||||
// 启用、停用、删除
|
||||
export const userUpdateStatus = (params) => request.post('/Riskmanage/v2/sysUser/updateStatus',params)
|
||||
// 获取组织列表
|
||||
export const getOrganList = (params) => request.post('/Riskmanage/v2/sysOrganization/getOrganList',params)
|
||||
// 获取已启用的组织列表
|
||||
export const getAllValidOrgan = (params) => request.post('/Riskmanage/v2/sysOrganization/getAllValidOrgan',params)
|
||||
// 获取角色
|
||||
export const getAllValidRole = (params) => request.post('/Riskmanage/v2/sysRole/getAllValidRole',params)
|
||||
// 修改密码
|
||||
export const updateUserPassword = (params) => request.post('/Riskmanage/v2/sysUser/updatePassword',params)
|
||||
|
||||
//----------------------- 角色管理
|
||||
// 获取角色列表
|
||||
export const getRoleList = (params) => request.post('/Riskmanage/v2/sysRole/getRoleList',params)
|
||||
// 修改批量操作
|
||||
export const roleUpdateStatus = (params) => request.post('/Riskmanage/v2/sysRole/updateStatus',params)
|
||||
// 创建角色
|
||||
export const saveRole = (params) => request.post('/Riskmanage/v2/sysRole/save',params)
|
||||
// 修改角色
|
||||
export const updateRole = (params) => request.post('/Riskmanage/v2/sysRole/update',params)
|
||||
// 获取资源树
|
||||
export const getFindTreeList = (params) => request.post('/Riskmanage/v2/sysMenu/findTreeList',params)
|
||||
// 获取引擎树
|
||||
export const getEngineTree = (params) => request.post('/Riskmanage/v2/sysMenu/getEngineTree',params)
|
||||
// 权限分配资源树保存
|
||||
export const insertRoleMenu = (params) => request.post('/Riskmanage/v2/sysMenu/insertRoleMenu',params)
|
||||
// 权限分配引擎树保存
|
||||
export const insertRoleEngine = (params) => request.post('/Riskmanage/v2/sysMenu/insertRoleEngine',params)
|
||||
// -----------------------资源管理
|
||||
// 获取资源列表
|
||||
export const getRsourceMenuList = (params) => request.post('/Riskmanage/v2/sysMenu/getMenuList',params)
|
||||
// 删除资源
|
||||
export const resourceUpdateStatus = (params) => request.post('/Riskmanage/v2/sysMenu/updateStatus',params)
|
||||
// 新增/修改资源获取的父节点树
|
||||
export const getResourceTreeMenu = (params) => request.post('/Riskmanage/v2/sysMenu/getTreeMenu',params)
|
||||
// 编辑资源
|
||||
export const resourceUpdate = (params) => request.post('/Riskmanage/v2/sysMenu/update',params)
|
||||
// 新增资源
|
||||
export const resourceSave = (params) => request.post('/Riskmanage/v2/sysMenu/save',params)
|
||||
// -----------------------组织管理
|
||||
// 创建组织
|
||||
export const saveOrgan = (params) => request.post('/Riskmanage/v2/sysOrganization/save',params)
|
||||
// 修改组织
|
||||
export const updateOrgan = (params) => request.post('/Riskmanage/v2/sysOrganization/update',params)
|
||||
// 更新状态
|
||||
export const updateStatusOrgan = (params) => request.post('/Riskmanage/v2/sysOrganization/updateStatus',params)
|
||||
// -----------------------日志管理
|
||||
// 列表
|
||||
export const getLogList = (params) => request.post('/Riskmanage/v2/sysLog/getLogList',params)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//==========================================决策流==============================
|
||||
|
||||
// 决策流 获取版本信息
|
||||
export const getversion = (id) => request.post('/Riskmanage/v2/engine/version/'+id)
|
||||
// 决策流 获取节点
|
||||
export const getNodeList = (id) => request.post('/Riskmanage/v2/decision_flow/getNodeList/'+id)
|
||||
// 决策流 新增
|
||||
export const setAddNode = (params) => request.post('/Riskmanage/v2/decision_flow/save',params)
|
||||
// 决策流 新增黑白
|
||||
export const setAddNodeHB = (params) => request.post('/Riskmanage/v2/bwListNode/create',params)
|
||||
// 决策流 移动节点
|
||||
export const setmoveNode = (params) => request.post('/Riskmanage/v2/decision_flow/updatePropertyForMove',params)
|
||||
// 决策流 删除节点
|
||||
export const setdelectNode = (params) => request.post('/Riskmanage/v2/decision_flow/removeNode',params)
|
||||
// 决策流 删除节点
|
||||
export const setdelectNodeList = (params) => request.post('/Riskmanage/v2/decision_flow/removeNodeList',params)
|
||||
// 决策流 连线
|
||||
export const setupdateProperty = (params) => request.post('/Riskmanage/v2/decision_flow/updateProperty',params)
|
||||
// 决策流 断线
|
||||
export const setremoveLink = (params) => request.post('/Riskmanage/v2/decision_flow/removeLink',params)
|
||||
// 决策流 部署引擎
|
||||
// export const getVersionDeploy = (id) => request.post('/Riskmanage/v2/engineVersion/deploy/'+id)
|
||||
// 决策流 部署引擎V2
|
||||
export const getVersionDeploy = (id) => request.post('/Riskmanage/v2/engineVersion/applyDeploy/'+id)
|
||||
// 决策流 取消部署引擎
|
||||
export const getVersionUnDeploy = (id) => request.post('/Riskmanage/v2/engineVersion/undeploy/'+id)
|
||||
// 决策流 复制版本
|
||||
export const getCopyVer = (id) => request.post('/Riskmanage/v2/decision_flow/saveVersion/'+id)
|
||||
// 决策流 复制节点
|
||||
export const getCopyNode = (params) => request.post('/Riskmanage/v2/decision_flow/copy',params)
|
||||
// 决策流 清空节点
|
||||
export const getClearNode = (id) => request.post('/Riskmanage/v2/engineVersion/clear/'+id)
|
||||
// 决策流 删除版本
|
||||
export const delectVer = (id) => request.post('/Riskmanage/v2/engineVersion/delete/'+id)
|
||||
// 决策流 新建版本
|
||||
export const getAddVer = (id,Vid) => request.post('/Riskmanage/v2/engineVersion/add/'+id+'/'+Vid)
|
||||
// 决策流 重命名
|
||||
export const setRenameNode = (params) => request.post('/Riskmanage/v2/decision_flow/renameNode',params)
|
||||
// 决策流 批量测试模板下载
|
||||
// export const createSampleData = (params) => request.post('/Riskmanage/v2/engine/createSampleData',params)
|
||||
// 决策流 json下载
|
||||
export const getDownloadJsonField = (params) => request.post('/Riskmanage/v2/engine/downloadJsonField',params)
|
||||
// 批量测试
|
||||
export const batchTest = (params) => request.post('/Riskmanage/v2/engine/batchTest',params)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//===========================================type N ==================================
|
||||
//==========type2 规则集
|
||||
|
||||
// 规则集 获取规则集 一级树
|
||||
export const getType2 = (params) => request.post('/Riskmanage/v2/ruleNode/getFolderList',params)
|
||||
// 规则集 获取规则集 二级树
|
||||
export const getType2tree = (params) => request.post('/Riskmanage/v2/ruleNode/getRuleDataForEngine',params)
|
||||
// 规则集 提交规则集
|
||||
// export const setType2 = (params) => request.post('/Riskmanage/v2/decision_flow/update',params)
|
||||
|
||||
|
||||
//==========type4 评分卡
|
||||
// 评分卡 获取评分卡
|
||||
export const getType4 = (params) => request.post('/Riskmanage/v2/cardNode/cardList',params)
|
||||
|
||||
|
||||
|
||||
|
||||
//==========type5-6 黑白名单
|
||||
// 黑白名单 获取黑白名单
|
||||
export const getType56 = (params) => request.post('/Riskmanage/v2/bwListNode/findBwList',params)
|
||||
|
||||
|
||||
|
||||
//==========type 7 决策结果
|
||||
// 决策结果 获取规则集
|
||||
// export const getType7 = (params) => request.post('/Riskmanage/v2/decision_flow/getFieldOrScorecardForOption',params)
|
||||
|
||||
|
||||
|
||||
//==========type15 模型
|
||||
// 模型 获取评分卡
|
||||
export const getType15 = (params) => request.post('/Riskmanage/modelNode/getModelList',params)
|
||||
|
||||
|
||||
|
||||
//==========type14 子引擎
|
||||
// 子引擎 获取子引擎
|
||||
export const getType14 = (params) => request.post('/Riskmanage/childEngineNode/getEngineList',params)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 统一提交节点提交
|
||||
export const setType4 = (params) => request.post('/Riskmanage/v2/decision_flow/update',params)
|
||||
|
||||
|
||||
|
||||
|
||||
// =========================交叉决策表=================
|
||||
// 获取list
|
||||
export const getDecisionTablesList = (params) => request.post('/Riskmanage/v3/decisionTables/getDecisionTablesList',params)
|
||||
// 获得 info
|
||||
export const getDecisionTablesInfo = (id) => request.post('/Riskmanage/v3/decisionTables/getDecisionTablesInfo/'+id)
|
||||
// 添加列表
|
||||
export const addDecisionTables = (params) => request.post('/Riskmanage/v3/decisionTables/addDecisionTables',params)
|
||||
// 更新列表
|
||||
export const updateDecisionTables = (params) => request.post('/Riskmanage/v3/decisionTables/updateDecisionTables',params)
|
||||
// 状态更改
|
||||
export const updateDecisionTablesStatus = (params) => request.post('/Riskmanage/v3/decisionTables/updateDecisionTablesStatus',params)
|
||||
// 文件夹移动
|
||||
export const updateDecisionTablesParent = (params) => request.post('/Riskmanage/v3/decisionTables/updateDecisionTablesParent',params)
|
||||
// 获取 版本
|
||||
export const getDecisionTablesVersionInfo = (id) => request.post('/Riskmanage/v3/decisionTables/version/getVersionInfo/'+id)
|
||||
// 添加版本
|
||||
export const addDecVersion = (params) => request.post('/Riskmanage/v3/decisionTables/version/addVersion',params)
|
||||
// 复制版本
|
||||
export const copyDecVersion = (params) => request.post('/Riskmanage/v3/decisionTables/version/copyVersion',params)
|
||||
// 重命名 版本
|
||||
export const updateDecVersion = (params) => request.post('/Riskmanage/v3/decisionTables/version/updateVersion',params)
|
||||
// 删除版本
|
||||
export const updateDecVersionStatus = (params) => request.post('/Riskmanage/v3/decisionTables/version/updateVersionStatus',params)
|
||||
|
||||
|
||||
|
||||
// =========================决策树=================
|
||||
|
||||
// 获取list
|
||||
export const getDecisionTreeList = (params) => request.post('/Riskmanage/v3/decisionTree/getDecisionTreeList',params)
|
||||
// 获得 info
|
||||
export const getDecisionTreeInfo = (id) => request.post('/Riskmanage/v3/decisionTree/getDecisionTreeInfo/'+id)
|
||||
// 添加列表
|
||||
export const addDecisionTree = (params) => request.post('/Riskmanage/v3/decisionTree/addDecisionTree',params)
|
||||
// 更新列表
|
||||
export const updateDecisionTree = (params) => request.post('/Riskmanage/v3/decisionTree/updateDecisionTree',params)
|
||||
// 状态更改
|
||||
export const updateDecisionTreeStatus = (params) => request.post('/Riskmanage/v3/decisionTree/updateDecisionTreeStatus',params)
|
||||
// 文件夹移动
|
||||
export const updateDecisionTreeFolder = (params) => request.post('/Riskmanage/v3/decisionTree/updateDecisionTreeFolder',params)
|
||||
// 获取 版本
|
||||
export const getDecisionTreeVersionInfo = (id) => request.post('/Riskmanage/v3/decisionTree/version/getVersionInfo/'+id)
|
||||
// 添加版本
|
||||
export const addDecTreeVersion = (params) => request.post('/Riskmanage/v3/decisionTree/version/addVersion',params)
|
||||
// 复制版本
|
||||
export const copyDecTreeVersion = (params) => request.post('/Riskmanage/v3/decisionTree/version/copyVersion',params)
|
||||
// 重命名 版本
|
||||
export const updateDecTreeVersion = (params) => request.post('/Riskmanage/v3/decisionTree/version/updateVersion',params)
|
||||
// 删除版本
|
||||
export const updateDecTreeVersionStatus = (params) => request.post('/Riskmanage/v3/decisionTree/version/updateVersionStatus',params)
|
||||
|
||||
|
||||
// =====================接口管理==============================
|
||||
// 获取list
|
||||
export const getInterfaceList = (params) => request.post('/Riskmanage/v3/interface/getInterfaceList',params)
|
||||
// 新增list
|
||||
export const addInterface = (params) => request.post('/Riskmanage/v3/interface/addInterface',params)
|
||||
// 修改list
|
||||
export const updateInterface = (params) => request.post('/Riskmanage/v3/interface/updateInterface',params)
|
||||
// 删除list
|
||||
export const deleteInterface = (params) => request.post('/Riskmanage/v3/interface/deleteInterface',params)
|
||||
// 测试接口
|
||||
export const getHttpResponse = (params) => request.post('/Riskmanage/v3/interface/getHttpResponse',params)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ======================接口管理 ==============================
|
||||
|
||||
export const getengineSummaryList = (params) => request.post('/Riskmanage/v3/1',params)
|
||||
// export const getengineSummaryList = (params) => request.post('/Riskmanage/v3/1',params)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ======================趋势分析 ==============================
|
||||
|
||||
export const getTendencyList = (params) => request.post('/Riskmanage/v3/qvshi1',params)
|
||||
// export const getengineSummaryList = (params) => request.post('/Riskmanage/v3/1',params)
|
||||
|
||||
|
||||
// =============决策流 - 7.25. 获取决策流条件入参==================
|
||||
export const getConditionInputParam = (params) => request.post('/Riskmanage/v2/decision_flow/getNodeConditionInputParam',params)
|
||||
|
||||
|
||||
|
||||
|
||||
// ======================决策流监控 ==============================
|
||||
// 获取list
|
||||
export const getMonitorResults = (params) => request.post('/Riskmanage/v2/monitor/results',params)
|
||||
// 获取具体数据
|
||||
export const getMonitorDecisionFlow = (params) => request.post('/Riskmanage/v2/monitor/decisionFlow',params)
|
||||
// 根据ID获取Node节点
|
||||
export const getMonitorNode = (params) => request.post('/Riskmanage/v2/monitor/node',params)
|
||||
// 策略层面接口返回信息
|
||||
export const getStrategy = (params) => request.post('/Riskmanage/v2/monitor/strategy',params)
|
||||
// 获取具体数据
|
||||
export const getMonitorDecisionFlowMysql = (params) => request.post('/Riskmanage/v2/monitor/decisionFlowMysql',params)
|
||||
// 根据ID获取Node节点
|
||||
export const getMonitorNodeMysql = (params) => request.post('/Riskmanage/v2/monitor/nodeMysql',params)
|
||||
// 策略层面接口返回信息
|
||||
export const getStrategyMysql = (params) => request.post('/Riskmanage/v2/monitor/strategyMysql',params)
|
||||
|
||||
|
||||
|
||||
// ======================趋势分析 ==============================
|
||||
// 获取list
|
||||
export const getAnalyseData = (params) => request.post('/Riskmanage/v3/analyse/getData',params)
|
||||
|
||||
// 获取总数
|
||||
export const getAnalyseSummary = (params) => request.post('/Riskmanage/v3/analyse/getEngineSummary',params)
|
||||
|
||||
// ======================= 审批设置 ======================
|
||||
// 获取审批设置
|
||||
export const approvalConfigGetApprovalList = (params) => request.post('/Riskmanage/v3/approvalConfig/getApprovalList',params)
|
||||
// 更改审批设置
|
||||
export const approvalConfigUpdateApprovalStatus = (params) => request.post('/Riskmanage/v3/approvalConfig/updateApprovalStatus',params)
|
||||
|
||||
|
||||
// ======================== 审批管理 ======================
|
||||
// 获取审批列表
|
||||
export const approvalGetApprovalList = (params) => request.post('/Riskmanage/v3/approval/getApprovalList',params)
|
||||
// 更改审批状态
|
||||
export const approvalUpdateApplyStatus = (params) => request.post('/Riskmanage/v3/approval/updateApplyStatus',params)
|
||||
|
||||
|
||||
// =============================集合操作==============
|
||||
|
||||
// 获取list
|
||||
export const getListOperationList = (params) => request.post('/Riskmanage/v3/listOperation/getListOperationList',params)
|
||||
// 获得 info
|
||||
export const getListOperation = (id) => request.post('/Riskmanage/v3/listOperation/getListOperation/'+id)
|
||||
// 添加列表
|
||||
export const addListOperation = (params) => request.post('/Riskmanage/v3/listOperation/addListOperation',params)
|
||||
// 更新列表
|
||||
export const updateListOperation = (params) => request.post('/Riskmanage/v3/listOperation/updateListOperation',params)
|
||||
// 状态更改
|
||||
export const updateListOperationStatus = (params) => request.post('/Riskmanage/v3/listOperation/updateListOperationStatus',params)
|
||||
// 文件夹移动
|
||||
export const updateListOperationFolder = (params) => request.post('/Riskmanage/v3/listOperation/updateListOperationFolder',params)
|
||||
|
||||
|
||||
// // 获取 版本
|
||||
// export const getDecisionTreeVersionInfo = (id) => request.post('/Riskmanage/v3/listOperation/version/getVersionInfo/'+id)
|
||||
// // 添加版本
|
||||
export const addlistOperationVersion = (params) => request.post('/Riskmanage/v3/listOperation/version/addVersion',params)
|
||||
// // 复制版本
|
||||
export const copyListOperationVersion = (params) => request.post('/Riskmanage/v3/listOperation/version/copyVersion',params)
|
||||
// // 重命名 版本
|
||||
export const updatelistOperationVersion = (params) => request.post('/Riskmanage/v3/listOperation/version/updateVersion',params)
|
||||
// // 删除版本
|
||||
export const updatelistOperationStatusVersion = (params) => request.post('/Riskmanage/v3/listOperation/version/updateVersionStatus',params)
|
||||
|
||||
|
||||
// =============================数据清洗==============
|
||||
|
||||
// 获取list
|
||||
export const getDataCleanList = (params) => request.post('/Riskmanage/dataClean/getDataCleanList',params)
|
||||
// 获得 info
|
||||
export const getDataClean = (id) => request.post('/Riskmanage/dataClean/getDataClean/'+id)
|
||||
// 添加列表
|
||||
export const addDataClean = (params) => request.post('/Riskmanage/dataClean/addDataClean',params)
|
||||
// 更新列表
|
||||
export const updateDataClean = (params) => request.post('/Riskmanage/dataClean/updateDataClean',params)
|
||||
// 状态更改
|
||||
export const updateDataCleanStatus = (params) => request.post('/Riskmanage/dataClean/updateDataCleanStatus',params)
|
||||
// 文件夹移动
|
||||
export const updateDataCleanFolder = (params) => request.post('/Riskmanage/dataClean/updateDataCleanFolder',params)
|
||||
|
||||
|
||||
// // 获取 版本
|
||||
// export const getDecisionTreeVersionInfo = (id) => request.post('/Riskmanage/v3/dataClean/version/getVersionInfo/'+id)
|
||||
// // 添加版本
|
||||
export const addDataCleanVersion = (params) => request.post('/Riskmanage/dataClean/version/addVersion',params)
|
||||
// // 复制版本
|
||||
export const copyDataCleanVersion = (params) => request.post('/Riskmanage/dataClean/version/copyVersion',params)
|
||||
// // 重命名 版本
|
||||
export const updateDataCleanVersion = (params) => request.post('/Riskmanage/dataClean/version/updateVersion',params)
|
||||
// // 删除版本
|
||||
export const updateDataCleanStatusVersion = (params) => request.post('/Riskmanage/dataClean/version/updateVersionStatus',params)
|
||||
|
||||
|
||||
|
||||
// =====================================类型关联====================
|
||||
// 获取类型关联
|
||||
export const businessRuleRelGetList = (params) => request.post('/Riskmanage/businessRuleRel/list',params)
|
||||
// 添加类型关联
|
||||
export const businessRuleRelAdd = (params) => request.post('/Riskmanage/businessRuleRel/add',params)
|
||||
// 删除类型关联
|
||||
export const businessRuleRelDelete = (params) => request.post('/Riskmanage/businessRuleRel/delete',params)
|
||||
// 更改类型关联
|
||||
export const businessRuleRelUpdate = (params) => request.post('/Riskmanage/businessRuleRel/edit',params)
|
||||
|
||||
// =====================================规则报表====================
|
||||
// 获取规则报表
|
||||
export const getRuleLogList = (params) => request.post('/Riskmanage/cignacmb/getRuleLogList',params)
|
||||
|
||||
// =====================================事件报表====================
|
||||
// 获取事件报表
|
||||
export const getEventLogList = (params) => request.post('/Riskmanage/cignacmb/getEventLogList',params)
|
||||
// 事件对应规则输出详情
|
||||
export const getEventLogDetails = (params) => request.post('/Riskmanage/cignacmb/getEventLogDetails',params)
|
||||
|
||||
// ======================================= 获取消息队列============
|
||||
export const getMqSourceList = (params) => request.post('/Riskmanage/mqSource/getMqSourceList',params)
|
||||
|
||||
|
||||
|
||||
|
||||
// =====================================数据流引擎====================
|
||||
// 获取引擎
|
||||
export const engineGetList = (params) => request.post('/Riskmanage/v3/engine/getEngineList',params)
|
||||
// 获取引擎
|
||||
export const engineGetEngineCode = (params) => request.post('/Riskmanage/v3/engine/getEngineCode',params)
|
||||
// 删除引擎
|
||||
export const engineUpdateStatus = (params) => request.post('/Riskmanage/v3/engine/updateStatus',params)
|
||||
// 删除引擎
|
||||
export const engineAdd = (params) => request.post('/Riskmanage/v3/engine/addEngine',params)
|
||||
// 删除引擎
|
||||
export const engineUpdate = (params) => request.post('/Riskmanage/v3/engine/updateEngine',params)
|
||||
|
||||
// =================================数据流引擎内容======================
|
||||
// 获取数据流引擎的版本信息
|
||||
export const getDataEngineVersionList = (params) => request.post('/Riskmanage/v3/engineVersion/getEngineVersionList',params)
|
||||
// 获取数据流引擎的版本info信息
|
||||
export const getDataEngineVersionInfo = (params) => request.post('/Riskmanage/v3/engineVersionContent/getEngineVersionContentInfo',params)
|
||||
// 更新数据流引擎数据
|
||||
export const updateDataEngineVersionInfo = (params) => request.post('/Riskmanage/v3/engineVersionContent/updateEngineVersionContentInfo',params)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const getV = (params) => request.post('/list/product',params)
|
||||
|
||||
|
||||
|
||||
7
h5-enginex-manager/src/api/oss.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
export function policy() {
|
||||
return request({
|
||||
url:'/aliyun/oss/policy',
|
||||
method:'get',
|
||||
})
|
||||
}
|
||||
134
h5-enginex-manager/src/api/toolbar.js
Normal file
@@ -0,0 +1,134 @@
|
||||
|
||||
|
||||
// 页面工具栏
|
||||
function showJTopoToobar(stage){
|
||||
var toobarDiv = $('<div class="jtopo_toolbar">').html(''
|
||||
+'<input type="radio" name="modeRadio" value="normal" checked id="r1"/>'
|
||||
+'<label for="r1"> 默认</label>'
|
||||
+' <input type="radio" name="modeRadio" value="select" id="r2"/><label for="r2"> 框选</label>'
|
||||
+' <input type="radio" name="modeRadio" value="edit" id="r4"/><label for="r4"> 加线</label>'
|
||||
+' <input type="button" id="centerButton" value="居中显示"/>'
|
||||
+'<input type="button" id="fullScreenButton" value="全屏显示"/>'
|
||||
+'<input type="button" id="zoomOutButton" value=" 放 大 " />'
|
||||
+'<input type="button" id="zoomInButton" value=" 缩 小 " />'
|
||||
+' <input type="checkbox" id="zoomCheckbox"/><label for="zoomCheckbox">鼠标缩放</label>'
|
||||
+' <input type="text" id="findText" style="width: 100px;" value="" onkeydown="enterPressHandler(event)">'
|
||||
+ '<input type="button" id="findButton" value=" 查 询 ">'
|
||||
+ ' <input type="button" id="cloneButton" value="选中克隆">'
|
||||
+' <input type="button" id="exportButton" value="导出PNG">'
|
||||
+ ' <input type="button" id="printButton" value="导出PDF">');
|
||||
|
||||
$('#content').prepend(toobarDiv);
|
||||
|
||||
// 工具栏按钮处理
|
||||
$("input[name='modeRadio']").click(function(){
|
||||
stage.mode = $("input[name='modeRadio']:checked").val();
|
||||
});
|
||||
$('#centerButton').click(function(){
|
||||
stage.centerAndZoom(); //缩放并居中显示
|
||||
});
|
||||
$('#zoomOutButton').click(function(){
|
||||
stage.zoomOut();
|
||||
});
|
||||
$('#zoomInButton').click(function(){
|
||||
stage.zoomIn();
|
||||
});
|
||||
$('#cloneButton').click(function(){
|
||||
stage.saveImageInfo();
|
||||
});
|
||||
$('#exportButton').click(function() {
|
||||
stage.saveImageInfo();
|
||||
});
|
||||
$('#printButton').click(function() {
|
||||
stage.saveImageInfo();
|
||||
});
|
||||
$('#zoomCheckbox').click(function(){
|
||||
if($('#zoomCheckbox').is(':checked')){
|
||||
stage.wheelZoom = 1.2; // 设置鼠标缩放比例
|
||||
}else{
|
||||
stage.wheelZoom = null; // 取消鼠标缩放比例
|
||||
}
|
||||
});
|
||||
$('#fullScreenButton').click(function(){
|
||||
runPrefixMethod(stage.canvas, "RequestFullScreen")
|
||||
});
|
||||
|
||||
window.enterPressHandler = function (event){
|
||||
if(event.keyCode == 13 || event.which == 13){
|
||||
$('#findButton').click();
|
||||
}
|
||||
};
|
||||
|
||||
// 查询
|
||||
$('#findButton').click(function(){
|
||||
var text = $('#findText').val().trim();
|
||||
//var nodes = stage.find('node[text="'+text+'"]');
|
||||
var scene = stage.childs[0];
|
||||
var nodes = scene.childs.filter(function(e){
|
||||
return e instanceof JTopo.Node;
|
||||
});
|
||||
nodes = nodes.filter(function(e){
|
||||
if(e.text == null) return false;
|
||||
return e.text.indexOf(text) != -1;
|
||||
});
|
||||
|
||||
if(nodes.length > 0){
|
||||
var node = nodes[0];
|
||||
node.selected = true;
|
||||
var location = node.getCenterLocation();
|
||||
// 查询到的节点居中显示
|
||||
stage.setCenter(location.x, location.y);
|
||||
|
||||
function nodeFlash(node, n){
|
||||
if(n == 0) {
|
||||
node.selected = false;
|
||||
return;
|
||||
};
|
||||
node.selected = !node.selected;
|
||||
setTimeout(function(){
|
||||
nodeFlash(node, n-1);
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// 闪烁几下
|
||||
nodeFlash(node, 6);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var runPrefixMethod = function(element, method) {
|
||||
var usablePrefixMethod;
|
||||
["webkit", "moz", "ms", "o", ""].forEach(function(prefix) {
|
||||
if (usablePrefixMethod) return;
|
||||
if (prefix === "") {
|
||||
// 无前缀,方法首字母小写
|
||||
method = method.slice(0,1).toLowerCase() + method.slice(1);
|
||||
}
|
||||
var typePrefixMethod = typeof element[prefix + method];
|
||||
if (typePrefixMethod + "" !== "undefined") {
|
||||
if (typePrefixMethod === "function") {
|
||||
usablePrefixMethod = element[prefix + method]();
|
||||
} else {
|
||||
usablePrefixMethod = element[prefix + method];
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return usablePrefixMethod;
|
||||
};
|
||||
/*
|
||||
runPrefixMethod(this, "RequestFullScreen");
|
||||
if (typeof window.screenX === "number") {
|
||||
var eleFull = canvas;
|
||||
eleFull.addEventListener("click", function() {
|
||||
if (runPrefixMethod(document, "FullScreen") || runPrefixMethod(document, "IsFullScreen")) {
|
||||
runPrefixMethod(document, "CancelFullScreen");
|
||||
this.title = this.title.replace("退出", "");
|
||||
} else if (runPrefixMethod(this, "RequestFullScreen")) {
|
||||
this.title = this.title.replace("点击", "点击退出");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert("浏览器不支持");
|
||||
}*/
|
||||
159
h5-enginex-manager/src/assets/css/ManageRedact.css
Normal file
@@ -0,0 +1,159 @@
|
||||
.dataManageRedact {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.MR_header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
padding:20px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #ddd;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.MR_header>div:nth-of-type(1) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 12%;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.MR_input {
|
||||
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
border-bottom: 1px solid #ddd;
|
||||
transition: all 0.2s;
|
||||
|
||||
padding: 20px 0 20px 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.MR_input input {
|
||||
|
||||
|
||||
transition: all 0.2s;
|
||||
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.MR_scope {
|
||||
border-bottom: 1px solid #ddd;
|
||||
transition: all 0.2s;
|
||||
padding: 20px 0 20px 0;
|
||||
font-size: 16px;
|
||||
/* display: flex; */
|
||||
}
|
||||
|
||||
.MR_scope input {
|
||||
height: 40px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.MR_headerSmall {
|
||||
padding:8px 20px 8px 20px;
|
||||
|
||||
}
|
||||
.MR_inputSmall {
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.MR_inputSmall input {
|
||||
height: 25px;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.MR_scopeSmall input {
|
||||
height: 25px;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.MR_scopeSmall {
|
||||
padding:0;
|
||||
font-size: 14px;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.MR_input>div {
|
||||
width: 30%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
margin-left: 2%;
|
||||
}
|
||||
|
||||
.MR_input>div>p {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.MR_checkbox {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.MR_scope>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 2%;
|
||||
}
|
||||
|
||||
.MR_scope>div>p {
|
||||
width: 7.6%;
|
||||
}
|
||||
|
||||
.MR_derive {
|
||||
|
||||
margin: 0 40px 0 40px;
|
||||
|
||||
}
|
||||
|
||||
.MR_rule_home {
|
||||
overflow: scroll;
|
||||
overflow-x: hidden;
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.MR_rule_home::-webkit-scrollbar {
|
||||
display: none;
|
||||
/* Chrome Safari */
|
||||
}
|
||||
|
||||
.MR_toolbar {
|
||||
background-color: #F0F0F0;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
}
|
||||
|
||||
.MR_toolbar>p:hover {
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
265
h5-enginex-manager/src/assets/css/alicdn.css
Normal file
28
h5-enginex-manager/src/assets/css/color-dark.css
Normal file
@@ -0,0 +1,28 @@
|
||||
.header{
|
||||
background-color: #242f42;
|
||||
}
|
||||
.login-wrap{
|
||||
background: #324157;
|
||||
}
|
||||
.plugins-tips{
|
||||
background: #eef1f6;
|
||||
}
|
||||
.plugins-tips a{
|
||||
color: #20a0ff;
|
||||
}
|
||||
.el-upload--text em {
|
||||
color: #20a0ff;
|
||||
}
|
||||
.pure-button{
|
||||
background: #20a0ff;
|
||||
}
|
||||
.tags-li.active {
|
||||
border: 1px solid #409EFF;
|
||||
background-color: #409EFF;
|
||||
}
|
||||
.message-title{
|
||||
color: #20a0ff;
|
||||
}
|
||||
.collapse-btn:hover{
|
||||
background: rgb(40,52,70);
|
||||
}
|
||||
124
h5-enginex-manager/src/assets/css/cont.css
Normal file
@@ -0,0 +1,124 @@
|
||||
.cont_cont {
|
||||
display: flex;
|
||||
border-radius: 20px;
|
||||
height: 85vh;
|
||||
}
|
||||
|
||||
.cont_left {
|
||||
width: 200px;
|
||||
flex-shrink: 0;
|
||||
background-color: #fff;
|
||||
border-radius: 10px 0 0 10px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.cont_list {
|
||||
height: 70vh;
|
||||
overflow: scroll;
|
||||
scrollbar-width: none;
|
||||
/* Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* IE 10+ */
|
||||
overflow-x: hidden;
|
||||
/* position: relative; */
|
||||
}
|
||||
|
||||
.cont_list::-webkit-scrollbar {
|
||||
display: none;
|
||||
/* Chrome Safari */
|
||||
}
|
||||
|
||||
.cont_left::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 10px;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.cont_header {
|
||||
margin-left: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.cont_header_title {
|
||||
color: #444;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.cont_header_subtitle {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.cont_new_file {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 10px 0 10px 15px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 15px;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.cont_new_file>div{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.file_select {
|
||||
border: #409EFF 2px solid;
|
||||
border-radius: 2px;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.cont_right {
|
||||
flex-grow: 1;
|
||||
overflow: hidden;
|
||||
background-color: #fafafa;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.cont_right_hint {
|
||||
font-size: 100px;
|
||||
color: #00000011;
|
||||
text-align: center;
|
||||
line-height: 80vh;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.cont_right_top {
|
||||
padding: 21px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px solid #eee;
|
||||
}
|
||||
.contText{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: block;
|
||||
}
|
||||
.contText:hover{
|
||||
white-space:inherit !important
|
||||
}
|
||||
.fileHint{
|
||||
position: fixed;
|
||||
background-color: #fafafa;
|
||||
padding: 5px;
|
||||
|
||||
}
|
||||
.fileHint>p{
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
.fileHint>p:hover{
|
||||
color: #409EFF;
|
||||
}
|
||||
4
h5-enginex-manager/src/assets/css/icon.css
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
[class*=" el-icon-lx"], [class^=el-icon-lx] {
|
||||
font-family: lx-iconfont!important;
|
||||
}
|
||||
185
h5-enginex-manager/src/assets/css/main.css
Normal file
@@ -0,0 +1,185 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#app,
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
|
||||
.content-box {
|
||||
position: absolute;
|
||||
left: 250px;
|
||||
right: 0;
|
||||
top: 70px;
|
||||
bottom: 0;
|
||||
padding-bottom: 30px;
|
||||
-webkit-transition: left .3s ease-in-out;
|
||||
transition: left .3s ease-in-out;
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: auto;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
/* overflow-y: scroll; */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.content-collapse {
|
||||
left: 65px;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 30px;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.crumbs {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.el-table th {
|
||||
background-color: #f5f7fa !important;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin: 20px 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.plugins-tips {
|
||||
padding: 20px 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.el-button+.el-tooltip {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.el-table tr:hover {
|
||||
background: #f6faff;
|
||||
}
|
||||
|
||||
.mgb20 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.move-enter-active,
|
||||
.move-leave-active {
|
||||
transition: opacity .5s;
|
||||
}
|
||||
|
||||
.move-enter,
|
||||
.move-leave {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/*BaseForm*/
|
||||
|
||||
.form-box {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.form-box .line {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-time-panel__content::after,
|
||||
.el-time-panel__content::before {
|
||||
margin-top: -7px;
|
||||
}
|
||||
|
||||
.el-time-spinner__wrapper .el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default) {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/*Upload*/
|
||||
|
||||
.pure-button {
|
||||
width: 150px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.g-core-image-corp-container .info-aside {
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.el-upload--text {
|
||||
background-color: #fff;
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
width: 360px;
|
||||
height: 180px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.el-upload--text .el-icon-upload {
|
||||
font-size: 67px;
|
||||
color: #97a8be;
|
||||
margin: 40px 0 16px;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.el-upload--text {
|
||||
color: #97a8be;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-upload--text em {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/*VueEditor*/
|
||||
|
||||
.ql-container {
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.ql-snow .ql-tooltip {
|
||||
transform: translateX(117.5px) translateY(10px) !important;
|
||||
}
|
||||
|
||||
.editor-btn {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/*markdown*/
|
||||
|
||||
.v-note-wrapper .v-note-panel {
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
.content-wrapper{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 21px;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
.header{
|
||||
background-color: #07c4a8;
|
||||
}
|
||||
.login-wrap{
|
||||
background: rgba(56, 157, 170, 0.82);;
|
||||
}
|
||||
.plugins-tips{
|
||||
background: #f2f2f2;
|
||||
}
|
||||
.plugins-tips a{
|
||||
color: #00d1b2;
|
||||
}
|
||||
.el-upload--text em {
|
||||
color: #00d1b2;
|
||||
}
|
||||
.pure-button{
|
||||
background: #00d1b2;
|
||||
}
|
||||
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus, .pagination > .active > span, .pagination > .active > span:hover, .pagination > .active > span:focus {
|
||||
background-color: #00d1b2 !important;
|
||||
border-color: #00d1b2 !important;
|
||||
}
|
||||
.tags-li.active {
|
||||
border: 1px solid #00d1b2;
|
||||
background-color: #00d1b2;
|
||||
}
|
||||
.collapse-btn:hover{
|
||||
background: #00d1b2;
|
||||
}
|
||||
1
h5-enginex-manager/src/assets/css/theme-green/index.css
Normal file
BIN
h5-enginex-manager/src/assets/img/img.jpg
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
h5-enginex-manager/src/assets/img/img(1).jpg
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
h5-enginex-manager/src/assets/img/login-bg.jpg
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
h5-enginex-manager/src/assets/logo.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
24
h5-enginex-manager/src/assets/utils.js
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
export function formatDate (date, fmt) {
|
||||
if (/(y+)/.test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
|
||||
}
|
||||
let o = {
|
||||
'M+': date.getMonth() + 1,
|
||||
'd+': date.getDate(),
|
||||
'h+': date.getHours(),
|
||||
'm+': date.getMinutes(),
|
||||
's+': date.getSeconds()
|
||||
};
|
||||
for (let k in o) {
|
||||
if (new RegExp(`(${k})`).test(fmt)) {
|
||||
let str = o[k] + '';
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
|
||||
}
|
||||
}
|
||||
return fmt;
|
||||
};
|
||||
|
||||
function padLeftZero (str) {
|
||||
return ('00' + str).substr(str.length);
|
||||
};
|
||||
401
h5-enginex-manager/src/components/common/GeneralRule.vue
Normal file
@@ -0,0 +1,401 @@
|
||||
<style>
|
||||
.rule {
|
||||
display: flex;
|
||||
/* margin-left: 5px; */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.Rule_cont {
|
||||
width: 30px;
|
||||
border-top: 1px dashed #C7C6C8;
|
||||
/* border-top: 1px dashed rgb(1,1,1); */
|
||||
margin-top: 7px;
|
||||
flex-grow: 0;
|
||||
height: 1px;
|
||||
/* background-color: #C7C6C8; */
|
||||
margin: 12px 0px 0 0;
|
||||
height: 0;
|
||||
|
||||
}
|
||||
|
||||
.RuleIcon {
|
||||
background-color: #EBEBEB;
|
||||
border: #DADADA 1px solid;
|
||||
border-radius: 4px;
|
||||
padding: 4px 6px 4px 2px;
|
||||
}
|
||||
|
||||
.RuleSelcet .el-input__inner {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.RuleCont_for_out {
|
||||
border-left: 1px dashed #ccc;
|
||||
border-bottom: 1px dashed #ccc;
|
||||
border-right: 1px dashed #ccc;
|
||||
padding-top: 5px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div class="rule" :style="{marginLeft:ZIndex==1?'20px':'0px'}" v-if="data">
|
||||
<div :style="{position: 'absolute',top:'0px', left: '-20px',marginTop: top===0?'0':'8px'}" class="RuleIcon">
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-s-operation" :style="{color: color[ZIndex%5] ,fontSize: '16px'}"></i>
|
||||
</span>
|
||||
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-plus" command="addRule" v-if="data.conditionType!=3">添加规则
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-circle-plus-outline" command="addlogical">添加关系</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-close" command="delect" v-if="ZIndex!=1&&data.conditionType!=4">
|
||||
删除此节点</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div v-if="data.conditionType==1" class="RuleSelcet">
|
||||
|
||||
<div :style="{width: '80px',marginTop: top===0?'0':'8px'}">
|
||||
<el-select v-model="data.logical" placeholder="请选择" size="mini">
|
||||
<el-option :key="1" label="AND" value="&&"></el-option>
|
||||
<el-option :key="2" label="OR" value="||"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 10px;height: 0;border-top: 1px dashed #C7C6C8;margin-top: 19px;margin-left: 5px;">
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
:style="{border: '1px dashed '+ color[ZIndex%5],borderRadius: '5px',paddingRight: '5px',paddingBottom: '5px',position:'relative',minWidth:'30px',minHeight:'40px'}">
|
||||
|
||||
<div :style="{border:'',margin:'',padding:'',paddingLeft:'0px'}">
|
||||
|
||||
<div v-for="(item,index) in data.children" style="display: flex;margin-top: 7px;">
|
||||
<div class="Rule_cont"
|
||||
:style="{marginTop:item.conditionType===0?'12px':(index===0?'11px':'20px')}">
|
||||
</div>
|
||||
<!-- conditionType==2 规则部分 -->
|
||||
<div v-if="item.conditionType==2" style="display: flex;">
|
||||
<!-- {{fieldType}} -->
|
||||
<div v-if="fieldType!='for'" style="display: flex;">
|
||||
<!-- 普通规则部分 -->
|
||||
|
||||
<!-- 不为输出节点 则拉选 fielduser-->
|
||||
<div style="display: flex;">
|
||||
|
||||
<el-cascader v-model="item.fieldId" filterable size="mini"
|
||||
:options="fieldUserObj" clearable @change="ruleCascaderChange(item)"
|
||||
:key="keyValue+(item.random?item.random:0)" style="margin-left: 10px;"
|
||||
:props="{ expandTrigger: 'hover' }" @visible-change="randomAdd(item,$event)">
|
||||
</el-cascader>
|
||||
<ruleRelation v-model="item.operator" :value2.sync="item.variableValue"
|
||||
:variableType.sync="item.variableType"
|
||||
:valueType="GetValueTypeByJSONEn(item.fieldId)" size="mini" >
|
||||
</ruleRelation>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<i class="el-icon-circle-close" style="color: #fa4949;margin-left: 5px;"
|
||||
@click="deleteSon(index)"></i>
|
||||
</div>
|
||||
<!-- conditionType==1 关系节点 conditionType==3 for的输出的关系节点 节点部分 -->
|
||||
<div v-if="item.conditionType==1">
|
||||
<!-- {{fieldType}} -->
|
||||
<rule :data="item" :top="index" :ZIndex="ZIndex+1" :index="index"
|
||||
@delectLogical="delectLogical" :customUserObj="customUserObj">
|
||||
</rule>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ruleRelation from '@/components/common/ruleRelation.vue'
|
||||
import bigElCascader from '@/components/common/bigElCascader.vue'
|
||||
import {
|
||||
GetdeepObj
|
||||
} from '@/utils/GetdeepObj.js'
|
||||
export default {
|
||||
components: {
|
||||
ruleRelation,
|
||||
bigElCascader
|
||||
},
|
||||
name: 'rule',
|
||||
data() {
|
||||
return {
|
||||
color: ['#0D183E', '#409EFF', '#67C23A', '#F56C6C', '#FFCD43'],
|
||||
|
||||
keyValue: 1, //用于给级联选择框重新渲染
|
||||
keyValueReady: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
if (this.data) {
|
||||
if (Array.isArray(this.data.fieldEn)) {
|
||||
if (this.data.fieldEn.length > 0) {
|
||||
this.EnChange(this.data.fieldEn, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
||||
fieldType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
ZIndex: {
|
||||
type: Number,
|
||||
default: -1
|
||||
},
|
||||
|
||||
data: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
top: {
|
||||
tyep: String,
|
||||
default: '8px'
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: -1
|
||||
},
|
||||
|
||||
customUserObj: { //自定义规则下拉
|
||||
type: Object || null,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
fieldUserObj() {
|
||||
|
||||
if (this.customUserObj) {
|
||||
|
||||
return GetdeepObj(JSON.parse(JSON.stringify(this.customUserObj)))
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
|
||||
},
|
||||
// fielduserArr() {
|
||||
// let arr = []
|
||||
// // console.log(11,this.fielduser)
|
||||
// if (this.fielduser.length > 1) {
|
||||
// if (this.fieldType != "for") { // 如果元素不为 for 则 用fielduser里的 json 格式指标
|
||||
// arr = this.fielduser.filter((value) => {
|
||||
// return value.valueType == 6
|
||||
// })
|
||||
|
||||
// arr = arr.map((value) => {
|
||||
// let obj = {
|
||||
// value: value.fieldEn,
|
||||
// label: value.fieldCn,
|
||||
// }
|
||||
// obj.children = this.getdeepArr(JSON.parse(value.jsonValue))
|
||||
// return obj
|
||||
// })
|
||||
// }
|
||||
// // console.log(arr)
|
||||
// return arr
|
||||
|
||||
// } else {
|
||||
// return []
|
||||
// }
|
||||
// },
|
||||
// fielduser() {
|
||||
// if (this.$store.state.FieldUser) {
|
||||
// return this.$store.state.FieldUser.data.fieldList
|
||||
// } else {
|
||||
// return []
|
||||
// }
|
||||
|
||||
// },
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
GetValueTypeByJSONEn(en) {
|
||||
if (!en) {
|
||||
return
|
||||
}
|
||||
|
||||
// console.log(en)
|
||||
|
||||
let obj
|
||||
|
||||
en.forEach((value, index) => {
|
||||
if (index == 0) {
|
||||
obj = this.fieldUserObj.find(x => x.value == value)
|
||||
|
||||
// console.log(this.fieldUserObj)
|
||||
// console.log(obj)
|
||||
// debugger
|
||||
|
||||
} else {
|
||||
obj = obj.children.find(x => x.value == value)
|
||||
}
|
||||
})
|
||||
return obj && obj.valueType
|
||||
},
|
||||
|
||||
getvalueTypebyEn(e) { //通过en 获取 valueType
|
||||
if (!Array.isArray(e)) {
|
||||
return
|
||||
}
|
||||
if (e[0][0] !== '%') {
|
||||
return this.mixinGetValueTypeByEn(e[0])
|
||||
}
|
||||
if (e[e.length - 1] == 'length') {
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
EnChange(e, clear = true) {
|
||||
|
||||
this.en = e.join('.')
|
||||
if (!clear) return
|
||||
this.deepClearEn(this.data)
|
||||
},
|
||||
deepClearEn(obj) { // 递归清除用到父级的 en
|
||||
obj.children.forEach(value => {
|
||||
if (Array.isArray(value.fieldEn)) {
|
||||
if (value.fieldEn[0][0] == "%") {
|
||||
value.fieldEn = ""
|
||||
}
|
||||
}
|
||||
if (value.children.length > 0) {
|
||||
this.deepClearEn(value)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// getdeepArr(obj) {
|
||||
// if (Array.isArray(obj)) {
|
||||
// return false
|
||||
// } else if (typeof obj == 'object') {
|
||||
// let arr = []
|
||||
// for (let key in obj) {
|
||||
// if (obj.hasOwnProperty(key)) {
|
||||
// if (Array.isArray(obj[key])) {
|
||||
// arr.push({
|
||||
// value: key,
|
||||
// label: key
|
||||
// })
|
||||
// } else if (typeof obj[key] == 'object') {
|
||||
// arr.push({
|
||||
// value: key,
|
||||
// label: key,
|
||||
// children: this.getdeepArr(obj[key])
|
||||
// })
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
// return arr
|
||||
// } else {
|
||||
// return []
|
||||
// }
|
||||
|
||||
|
||||
// },
|
||||
|
||||
delectLogical(index) {
|
||||
this.data.children.splice(index, 1)
|
||||
},
|
||||
handleCommand(str) {
|
||||
if (str == "addRule") { //添加规则
|
||||
// console.log(this.data)
|
||||
this.data.children.push({
|
||||
"logical": null,
|
||||
"fieldId": null,
|
||||
"operator": "",
|
||||
"fieldValue": "",
|
||||
"conditionType": 2,
|
||||
"variableType": 1,
|
||||
"children": [],
|
||||
})
|
||||
|
||||
|
||||
} else if (str == "addlogical") { //添加链接符
|
||||
let obj = {
|
||||
"logical": '&&',
|
||||
"fieldId": "",
|
||||
"operator": "",
|
||||
"fieldValue": "",
|
||||
"conditionType": 1,
|
||||
"children": [],
|
||||
}
|
||||
this.data.children.push(obj)
|
||||
|
||||
|
||||
} else if (str == "delect") {
|
||||
this.$confirm('确定删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$emit('delectLogical', this.index)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
deleteSon(index) {
|
||||
|
||||
this.$confirm('确定删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.data.children.splice(index, 1)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
ruleCascaderChange(item) {
|
||||
item.valueType = this.mixinGetValueTypeByJSONEn(item.fieldEn)
|
||||
item.fieldValue = ""
|
||||
item.operator = ""
|
||||
},
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
// fielduserArr() {
|
||||
// if (this.keyValueReady) {
|
||||
// this.keyValue++
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
352
h5-enginex-manager/src/components/common/Header.vue
Normal file
@@ -0,0 +1,352 @@
|
||||
<template>
|
||||
<div class="header">
|
||||
<!-- 折叠按钮 -->
|
||||
<div class="collapse-btn" @click="collapseChage">
|
||||
<i v-if="!collapse" class="el-icon-s-fold"></i>
|
||||
<i v-else class="el-icon-s-unfold"></i>
|
||||
</div>
|
||||
<div class="logo">数字决策平台</div>
|
||||
<div class="header-right">
|
||||
<!-- {{fielduser}} -->
|
||||
<!-- {{ruleList}} -->
|
||||
|
||||
<!-- {{fielduser==''}} -->
|
||||
<!-- {{ruleList==null}} -->
|
||||
<div class="header-user-con">
|
||||
|
||||
<div style="display: flex;font-size: 14px;">
|
||||
|
||||
<div v-for="value in link.e" class="header_link" @click="go(value)">
|
||||
{{value.title}}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- -->
|
||||
<div class="btn-fullscreen" @click="ReGetStorage">
|
||||
<!-- {{fielduser}} -->
|
||||
<!-- {{ruleList=='[]'}} -->
|
||||
<el-tooltip effect="dark" content="刷新缓存" placement="bottom">
|
||||
|
||||
<i :class="Loading?'el-icon-loading':'el-icon-refresh'"></i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<!-- 全屏显示 -->
|
||||
<div class="btn-fullscreen" @click="handleFullScreen">
|
||||
<el-tooltip effect="dark" :content="fullscreen?`取消全屏`:`全屏`" placement="bottom">
|
||||
<i class="el-icon-rank"></i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<!-- 用户头像 -->
|
||||
<div class="user-avator">
|
||||
<img src="../../assets/img/img.jpg" />
|
||||
</div>
|
||||
<!-- 用户名下拉菜单 -->
|
||||
<el-dropdown class="user-name" trigger="click" @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
{{username}}
|
||||
<i class="el-icon-caret-bottom"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item divided command="loginout">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import bus from '../common/bus';
|
||||
import {
|
||||
getLogout
|
||||
} from '../../api/index';
|
||||
import linkOr from '@/utils/link.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
collapse: false,
|
||||
fullscreen: false,
|
||||
name: '',
|
||||
message: 2,
|
||||
link: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.link = linkOr
|
||||
bus.$on('collapseHeader', res => {
|
||||
this.busCollapseChage(res)
|
||||
})
|
||||
bus.$on('regetcache', res => {
|
||||
|
||||
this.$store.dispatch('regetcache', res)
|
||||
})
|
||||
|
||||
this.$store.dispatch('getfielduser')
|
||||
this.$store.dispatch('getRuleList')
|
||||
|
||||
|
||||
Object.keys(this.$store.state.cacheList).forEach(value => {
|
||||
this.$store.dispatch('getcache', value)
|
||||
})
|
||||
|
||||
|
||||
if (!sessionStorage.getItem('reGet')) {
|
||||
this.$store.dispatch('reGetfielduser')
|
||||
this.$store.dispatch('regetcache', 'Interface')
|
||||
this.$store.dispatch('regetcache', 'Sourcelist')
|
||||
|
||||
sessionStorage.setItem('reGet', 1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.$store.commit('setbarShrink', this.collapse)
|
||||
},
|
||||
computed: {
|
||||
username() {
|
||||
if (localStorage.getItem('ms_username')) {
|
||||
return localStorage.getItem('ms_username');
|
||||
} else {
|
||||
return "未命名"
|
||||
}
|
||||
},
|
||||
fielduser() {
|
||||
if (this.$store.state.FieldUser) {
|
||||
return this.$store.state.FieldUser.data.fieldList
|
||||
} else {
|
||||
|
||||
return null
|
||||
}
|
||||
},
|
||||
ruleList() {
|
||||
if (this.$store.state.RuleList) {
|
||||
return this.$store.state.RuleList
|
||||
|
||||
} else {
|
||||
|
||||
return null
|
||||
}
|
||||
},
|
||||
Loading() {
|
||||
if (this.$store.state.FieldUser == null) {
|
||||
return true
|
||||
}
|
||||
if (this.$store.state.RuleList == null) {
|
||||
return true
|
||||
}
|
||||
let is = false
|
||||
Object.keys(this.$store.state.cacheList).forEach(value => {
|
||||
if (this.$store.state[value] == null) {
|
||||
is = true
|
||||
}
|
||||
})
|
||||
if (is) return true
|
||||
|
||||
// if (this.$store.state.SCO == null) {
|
||||
// return true
|
||||
// }
|
||||
// if (this.$store.state.Interface == null) {
|
||||
// return true
|
||||
// }
|
||||
// if (this.$store.state.decisionTable == null) {
|
||||
// return true
|
||||
// }
|
||||
// if (this.$store.state.decisionTree == null) {
|
||||
// return true
|
||||
// }
|
||||
// if (this.$store.state.Sourcelist == null) {
|
||||
// return true
|
||||
// }
|
||||
// if (this.$store.state.Engine == null) {
|
||||
// return true
|
||||
// }
|
||||
|
||||
|
||||
|
||||
return false
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
go(value) {
|
||||
var url = window.location.href
|
||||
|
||||
if (value[url.split('#')[0]]) {
|
||||
window.open(value[url.split('#')[0]])
|
||||
} else {
|
||||
this.$message.error('请检查跳转配置')
|
||||
}
|
||||
},
|
||||
ReGetStorage() {
|
||||
|
||||
if (this.Loading) {
|
||||
return
|
||||
}
|
||||
|
||||
this.mixinReGetStorage()
|
||||
},
|
||||
// 用户名下拉菜单选择事件
|
||||
handleCommand(command) {
|
||||
if (command == 'loginout') {
|
||||
// 调用退出登录接口
|
||||
getLogout();
|
||||
localStorage.removeItem("engineId");
|
||||
// localStorage.removeItem("token");
|
||||
localStorage.removeItem('ms_username');
|
||||
this.$router.push('/login');
|
||||
}
|
||||
},
|
||||
// Bus侧边栏折叠
|
||||
busCollapseChage(res) {
|
||||
this.collapse = res;
|
||||
this.$store.commit('setbarShrink', this.collapse)
|
||||
bus.$emit('collapse', this.collapse);
|
||||
},
|
||||
// 侧边栏折叠
|
||||
collapseChage() {
|
||||
this.collapse = !this.collapse;
|
||||
this.$store.commit('setbarShrink', this.collapse)
|
||||
bus.$emit('collapse', this.collapse);
|
||||
},
|
||||
// 全屏事件
|
||||
handleFullScreen() {
|
||||
let element = document.documentElement;
|
||||
if (this.fullscreen) {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.webkitCancelFullScreen) {
|
||||
document.webkitCancelFullScreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen();
|
||||
}
|
||||
} else {
|
||||
if (element.requestFullscreen) {
|
||||
element.requestFullscreen();
|
||||
} else if (element.webkitRequestFullScreen) {
|
||||
element.webkitRequestFullScreen();
|
||||
} else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen();
|
||||
} else if (element.msRequestFullscreen) {
|
||||
// IE11
|
||||
element.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
this.fullscreen = !this.fullscreen;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (document.body.clientWidth < 1500) {
|
||||
this.collapseChage();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.header {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
font-size: 22px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.header_link {
|
||||
padding: 4px;
|
||||
margin-right: 20px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.header_link:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.collapse-btn {
|
||||
float: left;
|
||||
padding: 0 21px;
|
||||
cursor: pointer;
|
||||
line-height: 70px;
|
||||
}
|
||||
|
||||
.header .logo {
|
||||
float: left;
|
||||
width: 250px;
|
||||
line-height: 70px;
|
||||
}
|
||||
|
||||
.header-right {
|
||||
float: right;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
.header-user-con {
|
||||
display: flex;
|
||||
height: 70px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn-fullscreen {
|
||||
transform: rotate(45deg);
|
||||
margin-right: 5px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.btn-bell,
|
||||
.btn-fullscreen {
|
||||
position: relative;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
border-radius: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-bell-badge {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -2px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 4px;
|
||||
background: #f56c6c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-bell .el-icon-bell {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.user-avator {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.user-avator img {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.el-dropdown-link {
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-dropdown-menu__item {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
51
h5-enginex-manager/src/components/common/Home.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<v-head></v-head>
|
||||
<v-sidebar></v-sidebar>
|
||||
<div class="content-box" :class="{'content-collapse':collapse}">
|
||||
<v-tags></v-tags>
|
||||
<div class="content" >
|
||||
<transition name="move" mode="out-in">
|
||||
<keep-alive :include="tagsList">
|
||||
<router-view></router-view>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
<el-backtop target=".content"></el-backtop>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vHead from './Header.vue';
|
||||
import vSidebar from './Sidebar.vue';
|
||||
import vTags from './Tags.vue';
|
||||
import bus from './bus';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tagsList: [],
|
||||
collapse: false
|
||||
};
|
||||
},
|
||||
components: {
|
||||
vHead,
|
||||
vSidebar,
|
||||
vTags
|
||||
},
|
||||
created() {
|
||||
bus.$on('collapse-content', msg => {
|
||||
this.collapse = msg;
|
||||
});
|
||||
|
||||
// 只有在标签页列表里的页面才使用keep-alive,即关闭标签之后就不保存到内存中了。
|
||||
bus.$on('tags', msg => {
|
||||
let arr = [];
|
||||
for (let i = 0, len = msg.length; i < len; i++) {
|
||||
msg[i].name && arr.push(msg[i].name);
|
||||
}
|
||||
this.tagsList = arr;
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
234
h5-enginex-manager/src/components/common/SCO/SCOCont.vue
Normal file
@@ -0,0 +1,234 @@
|
||||
|
||||
<template>
|
||||
<div class="cont_cont">
|
||||
|
||||
<div class="cont_left" v-loading="leftloading" v-if="!listRedact">
|
||||
<div class="cont_header">
|
||||
<p class="cont_header_title">{{title}}</p>
|
||||
<p class="cont_header_subtitle">{{title}}</p>
|
||||
</div>
|
||||
<contNewFule v-model="tempNewF" :newf.sync="newf" @newFileSure="newFileSure" @newFile="newFile" ></contNewFule>
|
||||
|
||||
<div class="cont_list">
|
||||
<fileHome :data="list" @curr="clickCurrid" :currid="currid" @RenameFun="RenameFun" @RenameClose="RenameClose"
|
||||
@updatafilelist="updatafilelist" @delectFun="delectFun">
|
||||
</fileHome>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cont_right" v-loading="contloading" @click="tempHintLeft=null;tempHintTop=null;">
|
||||
<div v-if="!listRedact">
|
||||
<div v-if="showRight===false" class="cont_right_hint">
|
||||
请先选择左侧文件夹
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="cont_right_top">
|
||||
<div>
|
||||
<el-button type="primary" @click="listRedact=true" :disabled="currid!=99999999?false:'disabled'">新增</el-button>
|
||||
<el-button type="danger" @click="using(-1);$store.dispatch('regetcache','SCO')" :disabled="this.selection.length>0?false:'disabled'">删除</el-button>
|
||||
<el-button type="success" @click="using(1)" :disabled="this.selection.length>0?false:'disabled'">启用</el-button>
|
||||
<el-button type="warning" @click="using(0)" :disabled="this.selection.length>0?false:'disabled'">停用</el-button>
|
||||
<!-- <el-select v-model="tempMove" placeholder="移动到:" style="margin-left: 10px;" :disabled="this.selection.length>0?false:'disabled'" filterable @change="mixinMoveChange"> -->
|
||||
<el-select v-model="tempMove" placeholder="移动到:" style="margin-left: 10px;" disabled filterable @change="mixinMoveChange">
|
||||
<el-option v-for="value in listunfold" :key="value.id" :label="value.name" :value="value.id" v-show="value.id!=99999999"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入评分卡名称" v-model="search">
|
||||
<i slot="suffix" class="el-input__icon el-icon-search" @click="getsearch"></i>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont_right_cont">
|
||||
|
||||
<div v-if="data">
|
||||
<el-table border :data="data.data.scorecardList" @select-all="selectAll" @select="select" style="width: 100%"
|
||||
:cell-style="{padding: '10px'}">
|
||||
<el-table-column type="selection" width="70">
|
||||
</el-table-column>
|
||||
<el-table-column v-for="item in getData.row" :key="item.id" :prop="item.row" :label="item.label" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="item.type==='Blooen'">
|
||||
{{scope.row[item.row]?"是":"否"}}
|
||||
</span>
|
||||
<span v-else-if="item.type==='State'">
|
||||
{{scope.row[item.row]==1?'启用':'未启用'}}
|
||||
</span>
|
||||
<span v-else-if="item.type==='Time'" style="white-space: nowrap;" class="contText">{{
|
||||
new Date(scope.row[item.row]).toLocaleDateString().replace(/\//g, "-") + " " + new Date(scope.row[item.row]).toTimeString().substr(0, 8)
|
||||
}}</span>
|
||||
<span class="contText" v-else>
|
||||
{{scope.row[item.row]}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" size="s">
|
||||
<template slot-scope="scope">
|
||||
<el-button icon="el-icon-setting" circle size="mini" @click="dialogShow(scope.row.id)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination style="float: right;margin-right: 40px;margin-top: 40px;" :current-page="currPage"
|
||||
@current-change="clickpage" background layout="prev, pager, next" :total="data.data.pageInfo.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else style="height: 100%;">
|
||||
<dataManageRedact @close="listRedact=false;tempRedactId=0" @Ok="tempRedactId=$event"
|
||||
:id='tempRedactId' :nameId="currid" :getData="getData"></dataManageRedact>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import contNewFule from '@/components/common/contNewFile.vue'
|
||||
import '@/assets/css/cont.css'
|
||||
import fileHome from '@/components/common/fileHome.vue'
|
||||
import dataManageRedact from '@/components/common/SCO/SCOManageRedact.vue'
|
||||
import contmixin from '@/utils/contminxin/contmixin.js'
|
||||
export default {
|
||||
mixins: [
|
||||
contmixin
|
||||
],
|
||||
components: {
|
||||
fileHome,
|
||||
dataManageRedact,
|
||||
contNewFule
|
||||
},
|
||||
props: {
|
||||
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
getData: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
list() {
|
||||
if (this.list.length > 0) {
|
||||
this.leftloading = false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list:[],
|
||||
tempMove: '',
|
||||
leftloading: true,
|
||||
search: "",
|
||||
fileName: "",
|
||||
fileList: [],
|
||||
upShow: false,
|
||||
currPage: 1,
|
||||
currid: null,
|
||||
data: null,
|
||||
contloading: false,
|
||||
newf: false,
|
||||
tempNewF: "",
|
||||
listRedact: false, //新增页面开启
|
||||
tempRedactId: 0,
|
||||
selection: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData.getTree({
|
||||
parentId: 0,
|
||||
treeType:this.getData.treeType,
|
||||
type: 1
|
||||
}).then(res => {
|
||||
this.list = this.listTreeDeep(res.data, 1)
|
||||
this.clickCurrid(99999999)
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
getsearch() {
|
||||
this.contloading = true
|
||||
// this.listRedact = false
|
||||
let params = {
|
||||
value: this.search,
|
||||
"search": true,
|
||||
pageSize: 10,
|
||||
status: [0, 1],
|
||||
"parentId": String(this.currid) === "99999999" ? 0 : String(this.currid),
|
||||
"pageNum": 1,
|
||||
}
|
||||
this.getData.getlist(params).then(res => {
|
||||
this.data = res
|
||||
this.selection=[]
|
||||
this.contloading = false
|
||||
})
|
||||
this.currPage = 1
|
||||
},
|
||||
getlist() {
|
||||
this.contloading = true
|
||||
this.listRedact = false
|
||||
let params = {
|
||||
value: this.search,
|
||||
"search": this.search ? true : false,
|
||||
pageSize: 10,
|
||||
status: [0, 1],
|
||||
"parentId": String(this.currid) === "99999999" ? 0 : String(this.currid),
|
||||
"pageNum": 1,
|
||||
}
|
||||
this.getData.getlist(params).then(res => {
|
||||
this.data = res
|
||||
this.contloading = false
|
||||
})
|
||||
|
||||
},
|
||||
clickpage(e) {
|
||||
this.currPage = e
|
||||
this.contloading = true
|
||||
let params = {
|
||||
value: this.search,
|
||||
"search": false,
|
||||
pageSize: 10,
|
||||
status: [0, 1],
|
||||
"parentId": String(this.currid) === "99999999" ? 0 : String(this.currid),
|
||||
"pageNum": e,
|
||||
}
|
||||
this.getData.getlist(params).then(res => {
|
||||
if(res.status=="1"){
|
||||
this.data = res
|
||||
|
||||
this.contloading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
newFileSure() {
|
||||
this.leftloading = true
|
||||
let params = {
|
||||
parentId: String(this.currid),
|
||||
name: this.tempNewF,
|
||||
"treeType": "1",
|
||||
"type": "1",
|
||||
"engineId": ""
|
||||
}
|
||||
|
||||
|
||||
if(this.mixnewFileZindexVerify(this.list,this.currid)==6){
|
||||
this.$message.error('已达到最深层级')
|
||||
this.leftloading = false
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.mixnewFileSure(params)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
893
h5-enginex-manager/src/components/common/SCO/SCOManageRedact.vue
Normal file
@@ -0,0 +1,893 @@
|
||||
<style>
|
||||
|
||||
.table{
|
||||
/* border-bottom: 1px solid #ddd; */
|
||||
border-left: 1px solid #ddd;
|
||||
min-height: 50px;
|
||||
display: flex;
|
||||
min-width: 300px;
|
||||
}
|
||||
.table div{
|
||||
min-height: 50px;
|
||||
width: 300px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.table p{
|
||||
width: 300px;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
.SCO_scoreHome{
|
||||
width: 75vw;
|
||||
height: 55vh;
|
||||
overflow: scroll;
|
||||
transform-origin: 0 0;
|
||||
user-select:none;
|
||||
}
|
||||
|
||||
.SCO_cont::-webkit-scrollbar{
|
||||
display: none;
|
||||
}
|
||||
.SCO_cont{
|
||||
height: 60vh;
|
||||
overflow: scroll;
|
||||
}
|
||||
.SCO_tableHeader{
|
||||
display: flex;
|
||||
margin-left: 20px;
|
||||
/* margin-top: 20px; */
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
.SCO_tableHeader>div{
|
||||
height: 40px;
|
||||
width: 300px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-left: 1px solid #ddd;
|
||||
font-size: 14px;
|
||||
}
|
||||
.sco_cont_home{
|
||||
overflow: scroll;
|
||||
flex: 1;
|
||||
}
|
||||
.sco_version{
|
||||
margin-top: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.sco_version_buttom{
|
||||
/* width: 100px; */
|
||||
margin-left: 20px !important;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="dataManageRedact" v-loading="loading">
|
||||
<div :class="smallHeader?'MR_header MR_headerSmall':'MR_header'">
|
||||
<div>
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-arrow-left" circle @click="mixinClose"></el-button>
|
||||
</div>
|
||||
<div>
|
||||
<span v-if="id===0">新增评分卡 :</span>
|
||||
<span v-else>编辑评分卡 :</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<el-button :icon="smallHeader?'el-icon-bottom':'el-icon-top'" circle @click="openHeader">
|
||||
</el-button>
|
||||
<el-button type="success" icon="el-icon-check" circle @click="submit" :disabled="addVersionStatus"></el-button>
|
||||
<!-- <el-button type="danger" icon="el-icon-close" circle @click="$emit('close')"></el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div :class="smallHeader?'MR_input MR_inputSmall':'MR_input'">
|
||||
<div>
|
||||
<p>评分卡代码: </p>
|
||||
<el-input placeholder="请输入评分卡代码" maxlength="30" v-model="code" :disabled="addVersionStatus" clearable></el-input>
|
||||
</div>
|
||||
<div>
|
||||
<p> 评分卡名称: </p>
|
||||
<el-input placeholder="请输入评分卡名称" maxlength="20" v-model="name" :disabled="addVersionStatus" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="smallHeader?'MR_scope MR_scopeSmall':'MR_scope'">
|
||||
<div>
|
||||
<p>评分卡描述: </p>
|
||||
<el-input placeholder="请输入评分卡描述" maxlength="300" v-model="description" :disabled="addVersionStatus" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<version style="margin:5px;" :id="id" :ruleVersionList="versionList" :version="version"
|
||||
:addVersionStatus="addVersionStatus" :addVersionDialog="addVersionDialog" :addVersionLoading="addVersionLoading"
|
||||
@addVersion="addVersion" @addVersionClose="addVersionClose" @copyVersion="copyVersion" @delectVersion="delectVersion"
|
||||
@updateVersion="updateVersion" @addVersionSure="addVersionSure" @Dialog="addVersionDialog=$event" @addVersionExamine="addVersionExamine"
|
||||
@versionChange="versionChange" @StatusChange="addVersionStatus=$event"></version>
|
||||
|
||||
|
||||
<div class="sco_cont_home">
|
||||
<div class="SCO_tableHeader">
|
||||
<div style="background-color: #409EFF;color: #fff;">维度</div>
|
||||
<div style="width: 100px;background-color: #409EFF;color: #fff;">权重</div>
|
||||
<div v-for=" value in tier" style="background-color: #409EFF;color: #fff;">
|
||||
指标{{value}}
|
||||
</div>
|
||||
<div style="border-top: 1px solid #ddd;border-right: 1px solid #ddd;margin-top: -1px;margin-left: 1px;background-color: #409EFF;color: #fff;width: 200px;">
|
||||
评分
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;margin-left: 20px;">
|
||||
<div style="border-right: 1px solid #ddd;border-left: 1px solid #ddd;border-top: 1px solid #ddd;">
|
||||
<div v-for="(value,index) in table" style="min-height: 50px;display: flex;border-bottom: 1px solid #ddd;position: relative;">
|
||||
<div style="min-width: 300px;display: flex;align-items: center;justify-content: center;position: relative;">
|
||||
<div style="position: absolute;left: 0;top: 0;color: #409EFF;">
|
||||
<el-dropdown @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-s-operation"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown" trigger="click">
|
||||
<el-dropdown-item icon="el-icon-bottom" :command="'addBrother|'+index">向下添加</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-right" :command="'addSon|'+index" v-show="!value.children.length">向右添加</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-close" :command="'delect|'+index" v-show="index!=0">删除此字段</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-document-copy" :command="'copy|'+index">复制此字段</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<textInput :text="String(value.dimensionName)" :center="true" :examine="3" @input="dimensioninput(value,$event)"></textInput>
|
||||
</div>
|
||||
<div style="width: 100px;borderLeft:1px solid #ddd;display: flex;align-items: center;justify-content: center;flex-shrink: 0;">
|
||||
<textInput :text="String(value.weight)" :examine='2' :center="true" @input="value.weight=$event"></textInput>
|
||||
</div>
|
||||
<recursion :data="value" :tier="1"></recursion>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p style="color: #F56C6C;font-size: 12px;margin-left: 20px;margin-top: 10px;">(1,10]表示 大于1 并且 小于等于 10 <br> 双击编辑</p>
|
||||
|
||||
<div style="margin-top: 50px;margin-bottom: 20px;">
|
||||
<span style="font-size: 14px;margin-left: 20px;margin-right: 10px;color: #409EFF;">计算方式:</span>
|
||||
<el-select v-model="scoreCalculateType" placeholder="请选择" size="mini">
|
||||
<el-option :key="1" label="求和" :value="1"></el-option>
|
||||
<el-option :key="2" label="加权求和" :value="2"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<outcontent :outcontent="outcontent" type="scorecard" style="margin-top: 20px;margin-left: 50px;">
|
||||
<div style="display:flex; align-items: center;">
|
||||
<el-select v-model="out" filterable placeholder="请选择" style="width: 200px;" clearable>
|
||||
<el-option v-for="item in FieldUser" :key="item.id" :label="item.fieldCn" :value="item.fieldEn">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<p style="margin: 10px;">
|
||||
=
|
||||
</p>
|
||||
<el-select filterable value="评分" disabled style="width: 255px;">
|
||||
</el-select>
|
||||
</div>
|
||||
</outcontent>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mangeRedactMixin from '@/utils/contminxin/MangeRedactMixin.js'
|
||||
import '@/assets/css/ManageRedact.css'
|
||||
import version from '@/components/common/Version.vue'
|
||||
import outcontent from '@/components/models/outcontent.vue'
|
||||
import textInput from '../textInput.vue'
|
||||
import recursion from './recursion.vue'
|
||||
import bus from './bus.js'
|
||||
export default {
|
||||
mixins: [mangeRedactMixin],
|
||||
components: {
|
||||
outcontent,
|
||||
recursion,
|
||||
textInput,
|
||||
version
|
||||
},
|
||||
props: {
|
||||
getData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
fieldTypeId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
nameId: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
addVersionLoading: false,
|
||||
addVersionDialog: false,
|
||||
tempadd: {},
|
||||
out: '',
|
||||
versionList: [],
|
||||
addVersionStatus: false,
|
||||
version: {},
|
||||
table: [{
|
||||
"id": null,
|
||||
"cardId": '',
|
||||
"dimensionName": "",
|
||||
"fieldId": '',
|
||||
"weight": 1,
|
||||
"executeType": null,
|
||||
"createTime": null,
|
||||
"updateTime": null,
|
||||
"children": [{
|
||||
condition: '',
|
||||
children: [],
|
||||
id: null,
|
||||
"score": 1,
|
||||
"fieldId": '',
|
||||
"coefficient": 1,
|
||||
"calculateType": 1,
|
||||
custom: '',
|
||||
}]
|
||||
}],
|
||||
score: null,
|
||||
loading: false,
|
||||
valueScope: '',
|
||||
code: '',
|
||||
name: '',
|
||||
description: '',
|
||||
"outcontent": [],
|
||||
scoreCalculateType: 1,
|
||||
max: 0,
|
||||
|
||||
parentId: ''
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
bus.$on('look', () => {
|
||||
console.log(this.table)
|
||||
})
|
||||
if (this.id != 0) {
|
||||
this.loading = true
|
||||
this.getData.getVersion({
|
||||
"id": this.id,
|
||||
}).then(res => {
|
||||
if (res.status == '1') {
|
||||
this.versionList = res.data.versionList
|
||||
this.version = JSON.parse(JSON.stringify(this.versionList[0]))
|
||||
this.code = res.data.code
|
||||
this.name = res.data.name
|
||||
this.description = res.data.description
|
||||
this.parentId = res.data.parentId
|
||||
this.getScorecardCont()
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
computed: {
|
||||
FieldUser() {
|
||||
return this.$store.state.FieldUser.data.fieldList
|
||||
},
|
||||
|
||||
|
||||
|
||||
tier() {
|
||||
|
||||
this.max = 0
|
||||
|
||||
this.each(this.table, 1)
|
||||
return this.max - 1
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
updateVersion(tempVersion) {
|
||||
this.addVersionLoading = true
|
||||
let obj = {
|
||||
scorecardId: this.id,
|
||||
id: this.version.id,
|
||||
scorecardDimension: this.table,
|
||||
scoreCalculateType: this.scoreCalculateType,
|
||||
resultFieldEn: this.out,
|
||||
strategyOutputList: this.outcontent,
|
||||
versionCode: tempVersion.versionCode,
|
||||
description: tempVersion.description
|
||||
}
|
||||
this.getData.updateVersion(obj).then(res => {
|
||||
if (res.status == '1') {
|
||||
this.$message({
|
||||
message: '版本重命名成功',
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
this.versionList = res.data
|
||||
this.version = JSON.parse(JSON.stringify(this.versionList[0]))
|
||||
this.addVersionDialog = false
|
||||
this.addVersionStatus = false
|
||||
this.getScorecardCont()
|
||||
}
|
||||
this.addVersionLoading = false
|
||||
})
|
||||
},
|
||||
addVersionSure(tempVersion) {
|
||||
this.addVersionLoading = true
|
||||
let obj = {
|
||||
scorecardId: this.id,
|
||||
scorecardDimension: this.table,
|
||||
scoreCalculateType: this.scoreCalculateType,
|
||||
resultFieldEn: this.out,
|
||||
strategyOutputList: this.outcontent,
|
||||
versionCode: tempVersion.versionCode,
|
||||
description: tempVersion.description
|
||||
}
|
||||
this.getData.addVersion(obj).then(res => {
|
||||
if (res.status == '1') {
|
||||
this.$message({
|
||||
message: '添加版本成功',
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
this.versionList = res.data
|
||||
this.version = JSON.parse(JSON.stringify(this.versionList[0]))
|
||||
this.addVersionDialog = false
|
||||
this.addVersionStatus = false
|
||||
this.getScorecardCont()
|
||||
}
|
||||
this.addVersionLoading = false
|
||||
})
|
||||
},
|
||||
copyVersion(tempVersion) {
|
||||
this.addVersionLoading = true
|
||||
let obj = {
|
||||
scorecardId: this.id,
|
||||
id: this.version.id,
|
||||
versionCode: tempVersion.versionCode,
|
||||
description: tempVersion.description
|
||||
}
|
||||
this.getData.copyVersion(obj).then(res => {
|
||||
if (res.status == '1') {
|
||||
this.$message({
|
||||
message: '复制版本成功',
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
this.versionList = res.data
|
||||
this.version = JSON.parse(JSON.stringify(this.versionList[0]))
|
||||
this.addVersionDialog = false
|
||||
this.addVersionStatus = false
|
||||
this.getScorecardCont()
|
||||
}
|
||||
this.addVersionLoading = false
|
||||
})
|
||||
},
|
||||
addVersionExamine() {
|
||||
if (this.verification()) {
|
||||
return
|
||||
}
|
||||
this.addVersionDialog = true
|
||||
},
|
||||
versionChange() {
|
||||
this.versionList.forEach(value => {
|
||||
if (value.id === this.version.id) {
|
||||
this.version = JSON.parse(JSON.stringify(value))
|
||||
}
|
||||
})
|
||||
this.getScorecardCont()
|
||||
},
|
||||
getScorecardCont() {
|
||||
this.loading = true
|
||||
this.getData.getInfo({
|
||||
id: this.version.id
|
||||
}).then(res => {
|
||||
if (res.status == "1") {
|
||||
this.out = res.data.resultFieldEn
|
||||
this.outcontent = res.data.strategyOutputList
|
||||
if (res.data.scorecardDimension.length > 0) {
|
||||
this.table = res.data.scorecardDimension
|
||||
}
|
||||
if (res.data.scoreCalculateType) {
|
||||
this.scoreCalculateType = res.data.scoreCalculateType
|
||||
}
|
||||
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
delectVersion() { //删除版本
|
||||
this.getData.delectVersion({
|
||||
status: -1,
|
||||
ids: [this.version.id],
|
||||
strategyId: this.id
|
||||
}).then(res => {
|
||||
if (res.status == "1") {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
this.versionList = res.data
|
||||
this.version = JSON.parse(JSON.stringify(this.versionList[0]))
|
||||
this.getScorecardCont()
|
||||
}
|
||||
})
|
||||
},
|
||||
addVaersionSure() { // 二次确认添加新版本
|
||||
this.addVersionLoading = true
|
||||
let that = this
|
||||
if (this.verificationTempVersion()) {
|
||||
that.addVersionLoading = false
|
||||
return
|
||||
}
|
||||
|
||||
if (this.addVersionStatus) { // 添加版本
|
||||
add()
|
||||
} else if (this.updateVersion) { //重命名版本
|
||||
updateVersion()
|
||||
} else { // 复制版本
|
||||
copy()
|
||||
|
||||
}
|
||||
|
||||
|
||||
function add() {
|
||||
let obj = {
|
||||
scorecardId: that.id,
|
||||
scorecardDimension: that.table,
|
||||
scoreCalculateType: that.scoreCalculateType,
|
||||
resultFieldEn: that.out,
|
||||
strategyOutputList: that.outcontent,
|
||||
versionCode: that.tempVersion.versionCode,
|
||||
description: that.tempVersion.description
|
||||
}
|
||||
that.getData.addVersion(obj).then(res => {
|
||||
if (res.status == '1') {
|
||||
that.$message({
|
||||
message: '添加版本成功',
|
||||
type: 'success'
|
||||
});
|
||||
that.$store.dispatch('regetcache','SCO')
|
||||
that.versionList = res.data
|
||||
that.version = JSON.parse(JSON.stringify(that.versionList[0]))
|
||||
that.addVersionDialog = false
|
||||
that.addVersionStatus = false
|
||||
that.getScorecardCont()
|
||||
}
|
||||
that.addVersionLoading = false
|
||||
})
|
||||
}
|
||||
|
||||
function copy() {
|
||||
let obj = {
|
||||
scorecardId: that.id,
|
||||
id: that.version.id,
|
||||
versionCode: that.tempVersion.versionCode,
|
||||
description: that.tempVersion.description
|
||||
}
|
||||
that.getData.copyVersion(obj).then(res => {
|
||||
if (res.status == '1') {
|
||||
that.$message({
|
||||
message: '复制版本成功',
|
||||
type: 'success'
|
||||
});
|
||||
that.$store.dispatch('regetcache','SCO')
|
||||
that.versionList = res.data
|
||||
that.version = JSON.parse(JSON.stringify(that.versionList[0]))
|
||||
that.addVersionDialog = false
|
||||
that.addVersionStatus = false
|
||||
that.getScorecardCont()
|
||||
}
|
||||
that.addVersionLoading = false
|
||||
})
|
||||
}
|
||||
|
||||
function updateVersion() {
|
||||
let obj = {
|
||||
scorecardId: that.id,
|
||||
id: that.version.id,
|
||||
scorecardDimension: that.table,
|
||||
scoreCalculateType: that.scoreCalculateType,
|
||||
resultFieldEn: that.out,
|
||||
strategyOutputList: that.outcontent,
|
||||
versionCode: that.tempVersion.versionCode,
|
||||
description: that.tempVersion.description
|
||||
}
|
||||
that.getData.updateVersion(obj).then(res => {
|
||||
if (res.status == '1') {
|
||||
that.$message({
|
||||
message: '版本重命名成功',
|
||||
type: 'success'
|
||||
});
|
||||
that.$store.dispatch('regetcache','SCO')
|
||||
that.versionList = res.data
|
||||
that.version = JSON.parse(JSON.stringify(that.versionList[0]))
|
||||
that.addVersionDialog = false
|
||||
that.addVersionStatus = false
|
||||
that.getScorecardCont()
|
||||
}
|
||||
that.addVersionLoading = false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
sureAddVersion() { // 确认添加新版本
|
||||
if (this.verification()) {
|
||||
return
|
||||
}
|
||||
this.addVersionDialog = true
|
||||
|
||||
},
|
||||
reset() { //重置默认数据
|
||||
this.out = ''
|
||||
this.table = [{
|
||||
"id": null,
|
||||
"cardId": '',
|
||||
"dimensionName": "",
|
||||
"fieldId": '',
|
||||
"weight": 1,
|
||||
"executeType": null,
|
||||
"createTime": null,
|
||||
"updateTime": null,
|
||||
"children": [{
|
||||
condition: '',
|
||||
children: [],
|
||||
id: null,
|
||||
"score": 1,
|
||||
"fieldId": '',
|
||||
"coefficient": 1,
|
||||
"calculateType": 1,
|
||||
custom: '',
|
||||
}]
|
||||
}]
|
||||
this.outcontent = []
|
||||
this.scoreCalculateType = 1
|
||||
},
|
||||
addVersion() {
|
||||
this.addVersionStatus = true
|
||||
this.tempadd = {
|
||||
out: this.out,
|
||||
table: this.table,
|
||||
outcontent: this.outcontent,
|
||||
scoreCalculateType: this.scoreCalculateType
|
||||
}
|
||||
this.reset()
|
||||
},
|
||||
addVersionClose() {
|
||||
this.addVersionStatus = false
|
||||
|
||||
this.out = this.tempadd.out
|
||||
this.table = this.tempadd.table
|
||||
this.outcontent = this.tempadd.outcontent
|
||||
this.scoreCalculateType = this.tempadd.scoreCalculateType
|
||||
|
||||
},
|
||||
dimensioninput(value, e) {
|
||||
value.dimensionName = e
|
||||
},
|
||||
handleCommand(str) {
|
||||
console.log(str)
|
||||
switch (str.split('|')[0]) {
|
||||
case 'addBrother':
|
||||
this.addBrother(str.split('|')[1])
|
||||
break;
|
||||
case 'delect':
|
||||
this.delect(str.split('|')[1])
|
||||
break;
|
||||
case 'addSon':
|
||||
this.addSon(str.split('|')[1])
|
||||
break;
|
||||
case 'copy':
|
||||
this.copy(str.split('|')[1])
|
||||
break;
|
||||
}
|
||||
},
|
||||
each(data, floor) {
|
||||
data.forEach(e => {
|
||||
e.floor = floor
|
||||
if (floor > this.max) {
|
||||
this.max = floor
|
||||
}
|
||||
if (e.children.length > 0) {
|
||||
this.each(e.children, floor + 1)
|
||||
}
|
||||
})
|
||||
},
|
||||
objectSpanMethod() {
|
||||
return {
|
||||
rowspan: 1,
|
||||
colspan: 1
|
||||
}
|
||||
},
|
||||
outAdd(index) {
|
||||
this.outcontent.splice(index, 0, {
|
||||
"fieldId": "",
|
||||
"fieldValue": ""
|
||||
})
|
||||
},
|
||||
outDelect(index) {
|
||||
this.outcontent.splice(index, 1, )
|
||||
},
|
||||
examine(item, issumm) {
|
||||
|
||||
item.forEach(value => {
|
||||
let Z = /^((\[|\()(\d(\d)*(\.(\d)+)?)|\(),((\d(\d)*(\.(\d)+)?(\]|\)))|\))$/
|
||||
|
||||
if (value.children.length > 0) {
|
||||
this.examine(value.children, issumm)
|
||||
}
|
||||
if (value.children.length == 0) {
|
||||
if (value.calculateType == 1 && (String(value.score).trim() === "" || isNaN(Number(String(value.score).trim())))) {
|
||||
issumm.is = false
|
||||
issumm.msg = '请检查是否有分值未填'
|
||||
}
|
||||
if (value.calculateType == 2 && (String(value.coefficient).trim() === "" || isNaN(Number(String(value.coefficient)
|
||||
.trim())))) {
|
||||
issumm.is = false
|
||||
issumm.msg = '请检查是否有系数未填'
|
||||
}
|
||||
if (value.calculateType == 3 && (String(value.custom).trim() === "" || JSON.parse(value.custom).formula.trim() ===
|
||||
"")) {
|
||||
issumm.is = false
|
||||
issumm.msg = '请检查是否有自定义评分未填'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (!value.weight && value.weight != 0) {
|
||||
if (!Z.test(value.condition)) {
|
||||
issumm.is = false
|
||||
issumm.msg = '请检查是否有范围未填'
|
||||
}
|
||||
}
|
||||
if (!value.weight && value.weight != 0) {
|
||||
if (!value.fieldId) {
|
||||
issumm.is = false
|
||||
issumm.msg = '请检查是否有指标未选'
|
||||
}
|
||||
} else {
|
||||
if (!String(value.dimensionName).trim()) {
|
||||
issumm.is = false
|
||||
issumm.msg = '请检查是否有维度未填'
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
verification() {
|
||||
let reg = /[\u4e00-\u9fa5]+/g;
|
||||
if (this.code.match(reg) != null) {
|
||||
this.$message.error('代码不允许出现中文');
|
||||
return true
|
||||
}
|
||||
if(this.verificationCode(this.code)||this.verificationName(this.name)){
|
||||
return true
|
||||
}
|
||||
let issumm = {
|
||||
is: true,
|
||||
msg: '提交失败 请检查是否有未填项'
|
||||
}
|
||||
|
||||
|
||||
if (this.code.trim() == '') {
|
||||
this.$message.error('请填入评分卡代码,并检查空格');
|
||||
return true
|
||||
}
|
||||
if (this.name.trim() == '') {
|
||||
this.$message.error('请填入评分卡名称,并检查空格');
|
||||
return true
|
||||
}
|
||||
if (this.description.trim() == '') {
|
||||
this.$message.error('请填入评分卡描述,并检查空格');
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.outcontent.forEach(value => {
|
||||
if (value.fieldId === "" || String(value.fieldValue).trim() === "" || value.variableType === "") {
|
||||
|
||||
issumm.is = false
|
||||
issumm.msg = '请检查自定义输出部分是否有未填项'
|
||||
}
|
||||
if (value.variableType == 3 && (String(value.fieldValue).trim() === "" || JSON.parse(value.fieldValue).formula.trim() ===
|
||||
'')) {
|
||||
issumm.is = false
|
||||
issumm.msg = '请检查自定义输出部分是否有未填项'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
this.examine(this.table, issumm)
|
||||
if (!issumm.is) {
|
||||
this.$message.error(issumm.msg);
|
||||
issumm.is = true
|
||||
return true
|
||||
}
|
||||
let num = 0
|
||||
let is = false
|
||||
this.table.forEach(value => {
|
||||
if (Number(value.weight) < 0) {
|
||||
is = true
|
||||
return true
|
||||
}
|
||||
if (String(value.weight).trim() == "") {
|
||||
is = true
|
||||
}
|
||||
num += Number(value.weight)
|
||||
|
||||
})
|
||||
if (is) {
|
||||
this.$message.error('权重不允许有负数或空值或空格');
|
||||
return true
|
||||
}
|
||||
if (num != 1 && num != 100 && num != 0) {
|
||||
this.$message.error('权重的和需要为100或1或0');
|
||||
return true
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
|
||||
if (this.verification()) {
|
||||
return
|
||||
}
|
||||
let obj = {
|
||||
"code": this.code.trim(),
|
||||
"name": this.name.trim(),
|
||||
"description": String(this.description).trim(),
|
||||
"author": null,
|
||||
"userId": null,
|
||||
"status": 1,
|
||||
"created": null,
|
||||
"updated": null,
|
||||
versionList: [{
|
||||
scorecardDimension: this.table,
|
||||
scoreCalculateType: this.scoreCalculateType,
|
||||
resultFieldEn: this.out,
|
||||
strategyOutputList: this.outcontent
|
||||
}]
|
||||
}
|
||||
|
||||
if (this.id == 0) {
|
||||
this.loading = true
|
||||
obj.parentId = this.nameId == 99999999 ? 0 : this.nameId
|
||||
obj.parentIds = this.nameId == 99999999 ? 0 : this.nameId
|
||||
obj.versionList[0].versionCode = 'V:0'
|
||||
obj.versionList[0].description = '初始版本'
|
||||
this.getData.setsave(obj).then(res => {
|
||||
this.loading = false
|
||||
if (res.status === "1") {
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
this.$emit('Ok', res.data.id)
|
||||
this.versionList = res.data.versionList
|
||||
this.version = JSON.parse(JSON.stringify(this.versionList[0]))
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
this.$message.error('网络出现问题-_-');
|
||||
})
|
||||
} else {
|
||||
obj.id = this.id
|
||||
obj.parentId = this.parentId
|
||||
obj.parentIds = this.parentId
|
||||
obj.versionList[0].id = this.version.id
|
||||
|
||||
this.loading = true
|
||||
this.getData.updatafield(obj).then(res => {
|
||||
this.loading = false
|
||||
if (res.status === "1") {
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
});
|
||||
|
||||
// this.$emit('Ok')
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
this.$message.error('网络出现问题-_-');
|
||||
})
|
||||
}
|
||||
},
|
||||
change(index) {
|
||||
this.ruledata[index].operator = ""
|
||||
this.ruledata[index].fieldValue = ""
|
||||
},
|
||||
faadd(index) { //rule父节点添加
|
||||
console.log(index)
|
||||
this.ruledata.content.splice(index, 0, {
|
||||
output: {
|
||||
field_name: '1'
|
||||
}
|
||||
})
|
||||
console.log(this.ruledata)
|
||||
|
||||
},
|
||||
fadelect(index) {
|
||||
this.ruledata.splice(index, 1)
|
||||
},
|
||||
// ====================================== v2.1 部分===================================
|
||||
addSon(index) {
|
||||
this.table[index].children.push({
|
||||
condition: '',
|
||||
children: [],
|
||||
id: null,
|
||||
"score": 1,
|
||||
"coefficient": null,
|
||||
"calculateType": 1,
|
||||
custom: '',
|
||||
})
|
||||
},
|
||||
delect(index) {
|
||||
this.table.splice(index, 1)
|
||||
},
|
||||
addBrother(index) {
|
||||
this.table.splice(index + 1, 0, {
|
||||
weight: 0,
|
||||
condition: '',
|
||||
dimensionName: '',
|
||||
children: [{
|
||||
condition: '',
|
||||
children: [],
|
||||
id: null,
|
||||
"score": 1,
|
||||
"fieldId": '',
|
||||
"coefficient": null,
|
||||
"calculateType": 1,
|
||||
custom: '',
|
||||
}],
|
||||
id: null,
|
||||
"score": 1,
|
||||
"coefficient": null,
|
||||
"calculateType": 1,
|
||||
custom: '',
|
||||
})
|
||||
},
|
||||
copy(index) {
|
||||
let obj = JSON.parse(JSON.stringify(this.table[index]))
|
||||
obj.id = null
|
||||
this.table.splice(index + 1, 0, obj)
|
||||
bus.$emit('look')
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
6
h5-enginex-manager/src/components/common/SCO/bus.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
// 使用 Event Bus
|
||||
const bus = new Vue();
|
||||
|
||||
export default bus;
|
||||
159
h5-enginex-manager/src/components/common/SCO/recursion.vue
Normal file
@@ -0,0 +1,159 @@
|
||||
<style>
|
||||
.SCO_defen {
|
||||
position: absolute;
|
||||
right: -200px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
/* margin-top: 1px; */
|
||||
}
|
||||
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.demonstration {
|
||||
display: block;
|
||||
color: #8492a6;
|
||||
font-size: 14px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div v-for="(item,index) in data.children" :style="{'boxSizing':'border-box','marginLeft':'-1px',display:'flex',borderLeft:'1px solid #ddd',minHeight:'50px',borderBottom:index==(data.children.length-1)?'':'1px solid #ddd'}">
|
||||
<div style="min-width: 295px;margin-left: 5px;margin-top: 5px;position: relative;">
|
||||
|
||||
|
||||
<div style="margin-left: 20px;">
|
||||
<textSelect :data="item" :Number="true"></textSelect>
|
||||
<textInput :text="String(item.condition)" @input="item.condition=$event"></textInput>
|
||||
</div>
|
||||
<div style="position: absolute;left: 0;top: 0;font-size: 12px;color: #409EFF;">
|
||||
<el-dropdown @command="handleCommand" trigger="click">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-s-operation"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-bottom" :command="'addBrother|'+index">向下添加</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-right" :command="'addSon|'+index" v-show="!item.children.length">向右添加</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-close" :command="'delect|'+index">删除此字段</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-document-copy" :command="'copy|'+index">复制此字段</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<recursion v-if="item.children.length>0" :data="item" :tier="tier+1"></recursion>
|
||||
<div v-else class="SCO_defen" >
|
||||
<textSelect :data="item" :type="2" @change="item.score=1;item.coefficient=1;item.custom='';"></textSelect>
|
||||
<textInput style="width: 110px;" v-show="item.calculateType==1" :text="String(item.score)" :examine="2" @input="item.score=$event"></textInput>
|
||||
<textInput style="width: 110px;" v-show="item.calculateType==2" :text="String(item.coefficient)" :examine="2" @input="item.coefficient=$event"></textInput>
|
||||
<textCustom style="width: 110px;" v-if="item.calculateType==3" v-model="item.custom" ></textCustom>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import textInput from '@/components/common/textInput.vue'
|
||||
import textCustom from '@/components/common/textCustom.vue'
|
||||
import textSelect from '@/components/common/textSelect.vue'
|
||||
import bus from './bus.js'
|
||||
export default {
|
||||
components: {
|
||||
textInput,
|
||||
textSelect,
|
||||
textCustom
|
||||
},
|
||||
name: 'recursion',
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
tier: {
|
||||
type: Number,
|
||||
default: -1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log(this.tier,this.data)
|
||||
this.data.children.forEach(value=>{
|
||||
if(value.coefficient==null){
|
||||
value.coefficient = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleCommand(str) {
|
||||
console.log(str)
|
||||
switch (str.split('|')[0]) {
|
||||
case 'addBrother':
|
||||
this.addBrother(str.split('|')[1])
|
||||
break;
|
||||
case 'delect':
|
||||
this.delect(str.split('|')[1])
|
||||
break;
|
||||
case 'addSon':
|
||||
this.addSon(str.split('|')[1])
|
||||
break;
|
||||
case 'copy':
|
||||
this.copy(str.split('|')[1])
|
||||
break;
|
||||
}
|
||||
},
|
||||
addSon(index) {
|
||||
this.data.children[index].children.push({
|
||||
condition: '',
|
||||
children: [],
|
||||
id: null,
|
||||
"score": 1,
|
||||
"fieldId":'',
|
||||
"coefficient": null,
|
||||
"calculateType": 1,
|
||||
custom:'',
|
||||
})
|
||||
},
|
||||
delect(index) {
|
||||
this.data.children.splice(Number(index), 1)
|
||||
},
|
||||
addBrother(index) {
|
||||
this.data.children.splice(Number(index) + 1, 0, {
|
||||
condition: '',
|
||||
children: [],
|
||||
"score": 1,
|
||||
"coefficient": null,
|
||||
"fieldId":'',
|
||||
"calculateType": 1,
|
||||
custom:'',
|
||||
id: null,
|
||||
})
|
||||
bus.$emit('look')
|
||||
},
|
||||
copy(index) {
|
||||
let obj = JSON.parse(JSON.stringify(this.data.children[index]))
|
||||
obj.id = null
|
||||
this.data.children.splice(Number(index) + 1, 0, obj)
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
103
h5-enginex-manager/src/components/common/Sidebar.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div class="sidebar">
|
||||
<el-menu class="sidebar-el-menu" :default-active="onRoutes" :collapse="collapse" background-color="#324157"
|
||||
text-color="#bfcbd9" active-text-color="#20a0ff" unique-opened :router="true">
|
||||
<template v-for="item in items">
|
||||
<template v-if="item.subs">
|
||||
<el-submenu :index="item.index" :key="item.index">
|
||||
<template slot="title">
|
||||
<i :class="item.icon"></i>
|
||||
<span slot="title">{{ item.title }}</span>
|
||||
</template>
|
||||
<template v-for="subItem in item.subs">
|
||||
<el-submenu v-if="subItem.subs" :index="subItem.index" :key="subItem.index">
|
||||
<template slot="title">{{ subItem.title }}</template>
|
||||
<el-menu-item v-for="(threeItem,i) in subItem.subs" :key="i" :index="threeItem.index">{{ threeItem.title }}</el-menu-item>
|
||||
</el-submenu>
|
||||
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}</el-menu-item>
|
||||
</template>
|
||||
</el-submenu>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-menu-item :index="item.index" :key="item.index">
|
||||
<i :class="item.icon"></i>
|
||||
<span slot="title">{{ item.title }}</span>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</template>
|
||||
</el-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from './bus';
|
||||
import {
|
||||
getMenus
|
||||
} from '../../api/index';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
collapse: false,
|
||||
items: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
onRoutes() {
|
||||
return this.$route.path
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 通过 Event Bus 进行组件间通信,来折叠侧边栏
|
||||
bus.$on('collapse', msg => {
|
||||
this.collapse = msg;
|
||||
// bus.$emit('setcanvasn',msg)
|
||||
bus.$emit('collapse-content', msg);
|
||||
});
|
||||
|
||||
// 获取菜单接口
|
||||
this.getMenus()
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getMenus() {
|
||||
const data = await getMenus({entity:{resourceSystem:'EngineX'}});
|
||||
// console.log('菜单接口返回的数据',data);
|
||||
if (data.status === "0") {
|
||||
this.$message.error(data.msg);
|
||||
if (data.error === "01000103") {
|
||||
this.$router.push('/login')
|
||||
}
|
||||
}
|
||||
|
||||
this.items = data.data;
|
||||
if(this.items.length == 0){
|
||||
this.$message.error('您没有导航权限,请联系管理员');
|
||||
}
|
||||
// console.log("items", this.items);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.sidebar {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 70px;
|
||||
bottom: 0;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.sidebar::-webkit-scrollbar {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.sidebar-el-menu:not(.el-menu--collapse) {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.sidebar>ul {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
186
h5-enginex-manager/src/components/common/Tags.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div class="tags" v-if="showTags">
|
||||
<ul>
|
||||
<li class="tags-li" v-for="(item,index) in tagsList" :class="{'active': isActive(item.path)}" :key="index">
|
||||
<router-link :to="item.path" class="tags-li-title">
|
||||
{{item.title}}
|
||||
</router-link>
|
||||
<span class="tags-li-icon" @click="closeTags(index)"><i class="el-icon-close"></i></span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tags-close-box">
|
||||
<el-dropdown @command="handleTags">
|
||||
<el-button size="mini" type="primary">
|
||||
标签选项<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</el-button>
|
||||
<el-dropdown-menu size="small" slot="dropdown">
|
||||
<el-dropdown-item command="other">关闭其他</el-dropdown-item>
|
||||
<el-dropdown-item command="all">关闭所有</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from './bus';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tagsList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isActive(path) {
|
||||
return path === this.$route.fullPath;
|
||||
},
|
||||
// 关闭单个标签
|
||||
closeTags(index) {
|
||||
const delItem = this.tagsList.splice(index, 1)[0];
|
||||
const item = this.tagsList[index] ? this.tagsList[index] : this.tagsList[index - 1];
|
||||
if (item) {
|
||||
delItem.path === this.$route.fullPath && this.$router.push(item.path);
|
||||
}else{
|
||||
this.$router.push('/');
|
||||
}
|
||||
},
|
||||
// 关闭全部标签
|
||||
closeAll(){
|
||||
this.tagsList = [];
|
||||
this.$router.push('/');
|
||||
},
|
||||
// 关闭其他标签
|
||||
closeOther(){
|
||||
const curItem = this.tagsList.filter(item => {
|
||||
return item.path === this.$route.fullPath;
|
||||
})
|
||||
this.tagsList = curItem;
|
||||
},
|
||||
// 设置标签
|
||||
setTags(route){
|
||||
const isExist = this.tagsList.some(item => {
|
||||
return item.path === route.fullPath;
|
||||
})
|
||||
if(!isExist){
|
||||
if(this.tagsList.length >= 8){
|
||||
this.tagsList.shift();
|
||||
}
|
||||
this.tagsList.push({
|
||||
title: route.meta.title,
|
||||
path: route.fullPath,
|
||||
name: route.matched[1].components.default.name
|
||||
})
|
||||
}
|
||||
bus.$emit('tags', this.tagsList);
|
||||
},
|
||||
handleTags(command){
|
||||
command === 'other' ? this.closeOther() : this.closeAll();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showTags() {
|
||||
return this.tagsList.length > 0;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route(newValue, oldValue){
|
||||
this.setTags(newValue);
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.setTags(this.$route);
|
||||
// 监听关闭当前页面的标签页
|
||||
bus.$on('close_current_tags', () => {
|
||||
for (let i = 0, len = this.tagsList.length; i < len; i++) {
|
||||
const item = this.tagsList[i];
|
||||
if(item.path === this.$route.fullPath){
|
||||
if(i < len - 1){
|
||||
this.$router.push(this.tagsList[i+1].path);
|
||||
}else if(i > 0){
|
||||
this.$router.push(this.tagsList[i-1].path);
|
||||
}else{
|
||||
this.$router.push('/');
|
||||
}
|
||||
this.tagsList.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.tags {
|
||||
position: relative;
|
||||
height: 30px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
padding-right: 120px;
|
||||
box-shadow: 0 5px 10px #ddd;
|
||||
}
|
||||
|
||||
.tags ul {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tags-li {
|
||||
float: left;
|
||||
margin: 3px 5px 2px 3px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
height: 23px;
|
||||
line-height: 23px;
|
||||
border: 1px solid #e9eaec;
|
||||
background: #fff;
|
||||
padding: 0 5px 0 12px;
|
||||
vertical-align: middle;
|
||||
color: #666;
|
||||
-webkit-transition: all .3s ease-in;
|
||||
-moz-transition: all .3s ease-in;
|
||||
transition: all .3s ease-in;
|
||||
}
|
||||
|
||||
.tags-li:not(.active):hover {
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.tags-li.active {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tags-li-title {
|
||||
float: left;
|
||||
max-width: 80px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 5px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.tags-li.active .tags-li-title {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tags-close-box {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
box-sizing: border-box;
|
||||
padding-top: 1px;
|
||||
text-align: center;
|
||||
width: 110px;
|
||||
height: 30px;
|
||||
background: #fff;
|
||||
box-shadow: -3px 0 15px 3px rgba(0, 0, 0, .1);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
</style>
|
||||
286
h5-enginex-manager/src/components/common/Version.vue
Normal file
@@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="Rule_version">
|
||||
<el-select value="V:0" placeholder="请选择版本" v-if="!id" :disabled="true" @change="versionChange" size='mini'>
|
||||
</el-select>
|
||||
<el-select v-model="version.id" placeholder="请选择版本" v-else :disabled="addVersionStatus"
|
||||
@change="versionChange" size='mini'>
|
||||
<el-option v-for="item in ruleVersionList" :key="item.id" :label="item.versionCode" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button plain class="Rule_version_buttom" style="margin-left: 10px;" size='mini' @click="addVersion"
|
||||
v-show="!addVersionStatus" :disabled="!id">新增版本</el-button>
|
||||
<el-button plain class="Rule_version_buttom" size='mini' type="success" @click="sureAddVersion"
|
||||
v-show="addVersionStatus">确认新增</el-button>
|
||||
<el-button plain class="Rule_version_buttom" size='mini' type="danger" @click="addVersionClose"
|
||||
v-show="addVersionStatus">取消新增</el-button>
|
||||
<el-button plain class="Rule_version_buttom" size='mini' @click="$emit('Dialog',true)"
|
||||
:disabled="addVersionStatus||!id">复制版本</el-button>
|
||||
<el-button plain class="Rule_version_buttom" size='mini' @click="updateVersion=true;$emit('Dialog',true)"
|
||||
:disabled="addVersionStatus||!id">版本重命名</el-button>
|
||||
<el-button plain class="Rule_version_buttom" size='mini' type="danger" @click="delectVersion"
|
||||
:disabled="addVersionStatus||!id">删除此版本</el-button>
|
||||
<el-button plain class="Rule_version_buttom" size='mini' @click="$emit('exportVersion')"
|
||||
v-if="exportVersion" :disabled="addVersionStatus||!id">导出此版本</el-button>
|
||||
<el-button plain class="Rule_version_buttom" size='mini' @click="importVersion" v-if="exportVersion"
|
||||
:disabled="addVersionStatus||!id">导入版本</el-button>
|
||||
|
||||
<span style="font-size: 12px;color: #999;margin-left: 10px;">切换版本并不会自动保存内容 请手动保存</span>
|
||||
|
||||
</div>
|
||||
<span style="color: #00A854;font-size: 14px;margin-left: 10px;">版本描述:{{id?version.description:'初始版本'}}</span>
|
||||
<el-dialog title="提示" :visible.sync="addVersionDialog" width="30%"
|
||||
@close="updateVersion=false;tempVersion.versionCode='',tempVersion.description=''"
|
||||
:close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
|
||||
<div v-loading="addVersionLoading">
|
||||
<p style="margin-top: 20px;"><span style="width: 30%;">新版本名称:</span>
|
||||
<el-input placeholder="请输入新版本名称" maxlength="30" v-model="tempVersion.versionCode" clearable
|
||||
style="width: 70%;"></el-input>
|
||||
</p>
|
||||
<p style="margin-top: 20px;"><span style="width: 30%;">新版本描述:</span>
|
||||
<el-input placeholder="请输入新版本描述" maxlength="30" v-model="tempVersion.description" clearable
|
||||
style="width: 70%;"></el-input>
|
||||
</p>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: right;margin-top: 20px;">
|
||||
<el-button @click="$emit('Dialog',false)">取 消</el-button>
|
||||
<el-button type="primary" @click="addVersionSure">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="提示" :visible.sync="importVersionDialog" width="30%" @close="" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" :show-close="false">
|
||||
<div v-loading="importVersionLoading">
|
||||
<p style="margin-top: 20px;"><span style="width: 30%;">新版本名称:</span>
|
||||
<el-input placeholder="请输入新版本名称" maxlength="30" v-model="tempVersion.versionCode" clearable
|
||||
style="width: 70%;"></el-input>
|
||||
</p>
|
||||
<p style="margin-top: 20px;"><span style="width: 30%;">新版本描述:</span>
|
||||
<el-input placeholder="请输入新版本描述" maxlength="30" v-model="tempVersion.description" clearable
|
||||
style="width: 70%;"></el-input>
|
||||
</p>
|
||||
|
||||
<div style="display: flex;justify-content: center;padding-top: 20px;">
|
||||
<el-upload class="upload-demo" ref="upload" action="doUpload" :limit="1" :file-list="fileList"
|
||||
:before-upload="beforeUpload" v-loading="Uploadloading">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">只能上传json文件,且不超过5MB</div>
|
||||
<div slot="tip" class="el-upload-list__item-name">{{fileName}}</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: right;margin-top: 20px;">
|
||||
<el-button @click="importVersionDialog=false">取 消</el-button>
|
||||
<el-button type="primary" @click="importVersionSure">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ruleVersionList: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
version: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
id: '',
|
||||
description: '',
|
||||
versionCode: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
addVersionDialog: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
addVersionLoading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
addVersionStatus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
exportVersion: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempJsonObj: null,
|
||||
files: null,
|
||||
fileName: '',
|
||||
fileList: [],
|
||||
importVersionDialog: false,
|
||||
importVersionLoading: false,
|
||||
Uploadloading: false,
|
||||
tempVersion: {
|
||||
versionCode: '',
|
||||
description: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
beforeUpload(file) {
|
||||
// console.log(file, '文件');
|
||||
this.files = file;
|
||||
const extension = file.name.split('.')[file.name.split('.').length - 1] === 'json'
|
||||
const isLt2M = file.size / 1024 / 1024 < 5
|
||||
if (!extension) {
|
||||
this.$message.warning('上传模板只能是 json格式!')
|
||||
return
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.warning('上传模板大小不能超过 5MB!')
|
||||
return
|
||||
}
|
||||
this.fileName = file.name;
|
||||
|
||||
var reader = new FileReader() // 新建一个FileReader
|
||||
reader.readAsText(file, 'UTF-8') // 读取文件
|
||||
reader.onload =(evt)=>{ // 读取完文件之后会回来这里
|
||||
this.tempJsonObj = JSON.parse(evt.target.result) // 读取文件内容
|
||||
console.log(this.tempJsonObj)
|
||||
}
|
||||
return false // 返回false不会自动上传
|
||||
},
|
||||
importVersionSure() {
|
||||
if(this.tempJsonObj==null){
|
||||
this.$message.error('请上传文件')
|
||||
return
|
||||
}
|
||||
if(this.tempVersion.versionCode.trim()===''){
|
||||
this.$message.error('请填写新版本名称')
|
||||
return
|
||||
}
|
||||
if(this.tempVersion.description.trim()===''){
|
||||
this.$message.error('请填写新版本描述')
|
||||
return
|
||||
}
|
||||
console.log(JSON.parse(JSON.stringify(this.tempJsonObj)))
|
||||
this.$emit('importNewVersion',{data:JSON.parse(JSON.stringify(this.tempJsonObj)),name:JSON.parse(JSON.stringify(this.tempVersion))})
|
||||
this.tempJsonObj=null
|
||||
this.tempVersion.versionCode=''
|
||||
this.tempVersion.description=''
|
||||
this.importVersionDialog = false
|
||||
},
|
||||
importVersion() {
|
||||
this.importVersionDialog = true
|
||||
},
|
||||
versionChange(e) {
|
||||
this.ruleVersionList.forEach(value => {
|
||||
if (value.id === this.version.id) {
|
||||
this.$emit('versionChange', value)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
addVersion(e) {
|
||||
// this.addVersionStatus = true
|
||||
this.$emit('StatusChange', true)
|
||||
this.$emit('addVersion', e)
|
||||
},
|
||||
sureAddVersion(e) {
|
||||
this.$emit('addVersionExamine', this.tempVersion)
|
||||
// this.addVersionDialog = true
|
||||
// this.$emit('Dialog',true)
|
||||
},
|
||||
delectVersion(e) {
|
||||
if (this.ruleVersionList.length == 1) {
|
||||
this.$message.error('最少要有一个版本存在')
|
||||
return
|
||||
}
|
||||
this.$confirm('确定删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$emit('delectVersion', e)
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
addVersionSure(e) {
|
||||
if (this.verificationTempVersion()) {
|
||||
this.addVersionLoading = false
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
console.log(1)
|
||||
if (this.addVersionStatus) { // 添加版本
|
||||
this.$emit('addVersionSure', this.tempVersion)
|
||||
} else if (this.updateVersion) { //重命名版本
|
||||
this.$emit('updateVersion', this.tempVersion)
|
||||
} else { // 复制版本
|
||||
this.$emit('copyVersion', this.tempVersion)
|
||||
}
|
||||
// this.addVersionStatus = false
|
||||
// this.$emit('StatusChange',false)
|
||||
|
||||
},
|
||||
addVersionClose(e) {
|
||||
// this.addVersionStatus = false
|
||||
this.$emit('StatusChange', false)
|
||||
this.$emit('addVersionClose', e)
|
||||
},
|
||||
verificationTempVersion() {
|
||||
if (this.tempVersion.versionCode.trim() === "") {
|
||||
this.$message.error('请填入新版本名称')
|
||||
return true
|
||||
}
|
||||
let is = {
|
||||
is: false,
|
||||
msg: '',
|
||||
}
|
||||
this.ruleVersionList.forEach(value => {
|
||||
if (value.versionCode === this.tempVersion.versionCode) {
|
||||
is.is = true
|
||||
is.msg = '已存在此版本名'
|
||||
}
|
||||
})
|
||||
if (is.is) {
|
||||
this.$message.error(is.msg)
|
||||
return true
|
||||
}
|
||||
if (this.tempVersion.description.trim() === "") {
|
||||
this.$message.error('请填入新版本描述')
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.Rule_version {
|
||||
/* margin-top: 20px; */
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
108
h5-enginex-manager/src/components/common/ZoomView.vue
Normal file
@@ -0,0 +1,108 @@
|
||||
<style>
|
||||
.zoomView {
|
||||
background-color: #eee;
|
||||
height: 250px;
|
||||
/* overflow: hidden; */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#zoomView_cont {
|
||||
background-color: #DDDDDD;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
transition: all 0.1s;
|
||||
position: absolute;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
.zoomView_modal{
|
||||
/* background-color: #0000FF; */
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div class="zoomView" @mouseup="mouseup" ref="zoomView">
|
||||
<span style="font-size: 12px;color: #aaa;">双击回归原位置</span>
|
||||
<div id="zoomView_cont" ref="zoomViewCont" :style="{transform: 'scale('+mult+','+mult+')',top:top,left:left}">
|
||||
<div class="zoomView_modal">
|
||||
|
||||
</div>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mult: 1,
|
||||
ismove: false,
|
||||
timeout: null,
|
||||
top: '0px',
|
||||
left: '0px',
|
||||
ClientX: '',
|
||||
ClientY: '',
|
||||
OffsetLeft: '',
|
||||
OffsetTop: '',
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.onmousemove = () => {}
|
||||
window.mouseup = () => {}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.zoomView.onmousewheel = (e) => {
|
||||
this.mult -= e.deltaY / 1000
|
||||
if (this.mult >= 1) {
|
||||
|
||||
} else {
|
||||
this.mult = 1
|
||||
}
|
||||
}
|
||||
this.$refs.zoomView.onmousedown = (e) => {
|
||||
this.ismove = true
|
||||
this.ClientX = e.clientX;
|
||||
this.ClientY = e.clientY;
|
||||
this.OffsetLeft = this.$refs.zoomViewCont.offsetLeft
|
||||
this.OffsetTop = this.$refs.zoomViewCont.offsetTop
|
||||
}
|
||||
window.onmousemove = (e) => {
|
||||
if (this.ismove && (new Date() - this.timeout > 50 || this.timeout == null)) {
|
||||
|
||||
|
||||
this.top = e.clientY - (this.ClientY - this.OffsetTop) + 'px'
|
||||
this.left = e.clientX - (this.ClientX - this.OffsetLeft) + 'px'
|
||||
|
||||
|
||||
|
||||
this.timeout = new Date()
|
||||
}
|
||||
|
||||
}
|
||||
window.mouseup = () => {
|
||||
this.ismove = false
|
||||
}
|
||||
this.$refs.zoomViewCont.ondblclick = () => {
|
||||
this.top = '0px'
|
||||
this.left = '0px'
|
||||
this.mult = 1
|
||||
}
|
||||
this.$refs.zoomView.ondblclick = () => {
|
||||
this.top = '0px'
|
||||
this.left = '0px'
|
||||
this.mult = 1
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
mouseup() {
|
||||
this.ismove = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
87
h5-enginex-manager/src/components/common/autoInput.vue
Normal file
@@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<!-- <div> -->
|
||||
<el-form class="formItenBox">
|
||||
<div v-for="value in rule" :key="value.name">
|
||||
<!-- {{value.name}} -->
|
||||
<div class="formItem" >
|
||||
<p class="formItemTitle">{{ value.label }}</p>
|
||||
<el-input v-if="value.type == String" v-model="data[value.name]" size="mini" class="formInput">
|
||||
</el-input>
|
||||
<el-input v-if="value.type == Number" type="number" v-model="data[value.name]" size="mini"
|
||||
class="formInput"></el-input>
|
||||
|
||||
<el-switch v-if="value.type == Boolean" v-model="data[value.name]" active-color="#13ce66"
|
||||
inactive-color="#ff4949" size="mini"></el-switch>
|
||||
<el-date-picker v-if="value.type == Date" v-model="data[value.name]" type="datetime"
|
||||
placeholder="选择日期时间" size="mini" class="formInput">
|
||||
</el-date-picker>
|
||||
<el-select v-if="value.type == 'Enum'" v-model="data[value.name]" size="mini"
|
||||
class="formInput">
|
||||
<el-option v-for="item in value.Enum" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
rule: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
this.rule.forEach(value=>{
|
||||
if(value.defaultValue){
|
||||
if(!this.data[value.name]){
|
||||
this.data[value.name] = value.defaultValue
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.formItenBox {
|
||||
align-content: space-around;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-content: flex-start;
|
||||
flex-flow: row wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
.formInput {
|
||||
width: 300px !important;
|
||||
}
|
||||
.formItem {
|
||||
width: 420px;
|
||||
display: flex;
|
||||
|
||||
margin-top: 5px;
|
||||
align-items: center;
|
||||
}
|
||||
.formItemTitle {
|
||||
width: 40%;
|
||||
justify-content: flex-end;
|
||||
padding-right: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
86
h5-enginex-manager/src/components/common/bigElCascader.vue
Normal file
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<el-cascader :value="value" @input="$emit('input',$evnet)" v-el-select-loadmore="loadMore(num)" filterable
|
||||
:size="size" :options="MyOptions" clearable @change="$emit('change',$event)" :key="Mykey" :props="props">
|
||||
</el-cascader>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
options: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
Mykey: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
props: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {
|
||||
expandTrigger: 'hover'
|
||||
}
|
||||
}
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'mini'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
num: 10,
|
||||
MyOptions: [],
|
||||
page: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadMore()
|
||||
},
|
||||
methods: {
|
||||
loadMore(n) {
|
||||
let start = (this.page - 1) * 10
|
||||
this.MyOptions.push(...this.options.splice(start, start + 10))
|
||||
console.log(this.MyOptions)
|
||||
this.page++
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
directives: {
|
||||
|
||||
'el-select-loadmore': (el, binding) => {
|
||||
// 获取element-ui定义好的scroll盒子
|
||||
const SELECTWRAP_DOM = el.querySelector(".el-cascader-menu .el-scrollbar__wrap");
|
||||
console.log(SELECTWRAP_DOM)
|
||||
if (SELECTWRAP_DOM) {
|
||||
SELECTWRAP_DOM.addEventListener("scroll", function() {
|
||||
/**
|
||||
* scrollHeight 获取元素内容高度(只读)
|
||||
* scrollTop 获取或者设置元素的偏移值,
|
||||
* 常用于:计算滚动条的位置, 当一个元素的容器没有产生垂直方向的滚动条, 那它的scrollTop的值默认为0.
|
||||
* clientHeight 读取元素的可见高度(只读)
|
||||
* 如果元素滚动到底, 下面等式返回true, 没有则返回false:
|
||||
* ele.scrollHeight - ele.scrollTop === ele.clientHeight;
|
||||
*/
|
||||
const condition = this.scrollHeight - this.scrollTop <= this.clientHeight;
|
||||
if (condition) this.loadMore();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
94
h5-enginex-manager/src/components/common/bindParam.vue
Normal file
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div>
|
||||
<p style="margin-top: 20px;padding-top: 10px;display: flex;align-items: center;">
|
||||
变量:<i class="el-icon-circle-plus-outline" style="color:#409EFF;font-size: 24px;" @click="addVariable"></i>
|
||||
</p>
|
||||
|
||||
<div v-for="(value,index) in Variable" style="display: flex;align-items: center;margin-top: 10px;">
|
||||
<el-input v-model="value.key" style="width: 200px;" placeholder="键" :size="size"></el-input>
|
||||
<p style="margin:10px;">:</p>
|
||||
<el-input v-model="value.value" style="width: 200px;" placeholder="默认值" :size="size"></el-input>
|
||||
<i class="el-icon-circle-close" :style="{color:'#F56C6C',fontSize: '24px',marginLeft:'10px'}"
|
||||
@click="delectVariable(index)"></i>
|
||||
</div>
|
||||
|
||||
|
||||
<p style="margin-top: 20px;display: flex;align-items: center;">
|
||||
字典变量:<i class="el-icon-circle-plus-outline" style="color:#409EFF;font-size: 24px;"
|
||||
@click="addDictVariable"></i></p>
|
||||
|
||||
<div v-for="(value,index) in dictVariable" style="display: flex;align-items: center;margin-top: 10px;">
|
||||
<el-input v-model="value.key" style="width: 200px;" placeholder="键" :size="size"></el-input>
|
||||
<p style="margin:10px;">:</p>
|
||||
<el-select v-model="value.type" placeholder="请选择类型" :size="size">
|
||||
<el-option v-for="item in dictVariableType" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input v-model="value.value" style="width: 200px;margin-left: 20px;" placeholder="格式" :size="size"></el-input>
|
||||
<i class="el-icon-circle-close" :style="{color:'#F56C6C',fontSize: '24px',marginLeft:'10px'}"
|
||||
@click="delectDictVariable(index)"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
Variable: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
dictVariable: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
size:{
|
||||
type: String,
|
||||
default:''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dictVariableType: [{
|
||||
label: '时间',
|
||||
value: 'date'
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addVariable() {
|
||||
this.Variable.push({
|
||||
value: '',
|
||||
key: ''
|
||||
})
|
||||
},
|
||||
delectVariable(index) {
|
||||
this.Variable.splice(index, 1)
|
||||
},
|
||||
addDictVariable() {
|
||||
this.dictVariable.push({
|
||||
key: '',
|
||||
type: '',
|
||||
value: ''
|
||||
})
|
||||
},
|
||||
delectDictVariable(index) {
|
||||
|
||||
this.dictVariable.splice(index, 1)
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
6
h5-enginex-manager/src/components/common/bus.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
// 使用 Event Bus
|
||||
const bus = new Vue();
|
||||
|
||||
export default bus;
|
||||
55
h5-enginex-manager/src/components/common/charts.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div :id="sid" :style="{height: height,width:width}">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
props: {
|
||||
sid: {
|
||||
type: String,
|
||||
default: 'echartsId'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
option: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartDom: null,
|
||||
myChart: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.chartDom = document.getElementById(this.sid);
|
||||
this.myChart = echarts.init(this.chartDom);
|
||||
this.myChart.setOption(this.option);
|
||||
},
|
||||
watch: {
|
||||
option: {
|
||||
handler: function() {
|
||||
this.myChart.clear()
|
||||
this.myChart.setOption(this.option);
|
||||
},
|
||||
// 开启深度监听:只要obj中的任何一个属性发生改变,都会触发相应的代码
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
101
h5-enginex-manager/src/components/common/codemirror.vue
Normal file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<textarea :ref="MYname" class="codesql" :value="value" style="height:200px;width:600px;" :key="keynum"></textarea>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import "codemirror/theme/ambiance.css";
|
||||
import "codemirror/theme/ayu-dark.css";
|
||||
import "codemirror/lib/codemirror.css";
|
||||
import "codemirror/addon/hint/show-hint.css";
|
||||
|
||||
let CodeMirror = require("codemirror/lib/codemirror");
|
||||
require("codemirror/addon/edit/matchbrackets");
|
||||
require("codemirror/addon/selection/active-line");
|
||||
require("codemirror/mode/javascript/javascript");
|
||||
require("codemirror/mode/sql/sql");
|
||||
require("codemirror/mode/lua/lua");
|
||||
require("codemirror/addon/hint/show-hint");
|
||||
require("codemirror/addon/hint/sql-hint");
|
||||
require("codemirror/addon/hint/javascript-hint");
|
||||
export default {
|
||||
name: "codeMirror",
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: '123'
|
||||
},
|
||||
mime: {
|
||||
type: String,
|
||||
default: 'text/javascript'
|
||||
},
|
||||
autocomplete: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
MYname: {
|
||||
type: String,
|
||||
default: 'mycode'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keynum: 0,
|
||||
editor: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.keynum = 1
|
||||
this.keynum = 0
|
||||
console.log(this.value)
|
||||
},
|
||||
watch:{
|
||||
mime() {
|
||||
|
||||
this.editor.setOption("mode", this.mime)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// let mime = 'text/x-sql'
|
||||
let mime = this.mime
|
||||
let theme = 'ayu-dark' //设置主题,不设置的会使用默认主题
|
||||
let extraKeys = this.autocomplete ? {
|
||||
'Tab': 'autocomplete'
|
||||
} : {}
|
||||
|
||||
this.editor = CodeMirror.fromTextArea(this.$refs[this.MYname], {
|
||||
mode: mime, //选择对应代码编辑器的语言,我这边选的是数据库,根据个人情况自行设置即可
|
||||
indentWithTabs: true,
|
||||
smartIndent: true,
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
theme: theme,
|
||||
// autofocus: true,
|
||||
extraKeys: extraKeys, //自定义快捷键
|
||||
hintOptions: { //自定义提示选项
|
||||
tables: {
|
||||
users: ['name', 'score', 'birthDate'],
|
||||
countries: ['name', 'population', 'size']
|
||||
}
|
||||
}
|
||||
})
|
||||
this.editor.on('changes', (e,e2) => {
|
||||
// console.log( e.display.maxLine.text)
|
||||
let str = e.display.view?e.display.view.map(x=>x.line.text).join(''):''
|
||||
this.$emit('input', str)
|
||||
})
|
||||
console.log(this.editor)
|
||||
//
|
||||
},
|
||||
beforeUnmount() {
|
||||
console.log(1)
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.codesql {
|
||||
font-size: 11pt;
|
||||
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
|
||||
}
|
||||
</style>
|
||||
56
h5-enginex-manager/src/components/common/condition.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<div>
|
||||
+
|
||||
</div>
|
||||
<div>
|
||||
X
|
||||
</div>
|
||||
<div>
|
||||
<el-select v-model="value" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inp1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<input type="text">
|
||||
</div>
|
||||
<div>
|
||||
<input type="text">
|
||||
</div>
|
||||
<div>
|
||||
<input type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
porps:{
|
||||
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
value:1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
351
h5-enginex-manager/src/components/common/cont.vue
Normal file
@@ -0,0 +1,351 @@
|
||||
|
||||
|
||||
<template>
|
||||
<div class="cont_cont">
|
||||
|
||||
<div class="cont_left" v-loading="leftloading">
|
||||
<div class="cont_header">
|
||||
<p class="cont_header_title">{{title}}</p>
|
||||
<p class="cont_header_subtitle">{{title}}</p>
|
||||
</div>
|
||||
|
||||
<contNewFule v-model="tempNewF" :newf.sync="newf" @newFileSure="newFileSure" @newFile="newFile" ></contNewFule>
|
||||
<div class="cont_list">
|
||||
<fileHome :data="list" @curr="clickCurrid" :currid="currid" @RenameFun="RenameFun" @RenameClose="RenameClose"
|
||||
@updatafilelist="updatafilelist" @delectFun="delectFun">
|
||||
</fileHome>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont_right" v-loading="contloading" @click="tempHintLeft=null;tempHintTop=null;">
|
||||
<div v-if="!listRedact">
|
||||
<div v-if="showRight===false" class="cont_right_hint">
|
||||
请先选择左侧文件夹
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="cont_right_top">
|
||||
<div>
|
||||
<el-button type="primary" @click="listRedact=true" :disabled="currid!=99999999?false:'disabled'">新增</el-button>
|
||||
<el-button type="danger" @click="using(-1)" :disabled="this.selection.length>0?false:'disabled'">删除</el-button>
|
||||
<el-button type="success" @click="using(1)" :disabled="this.selection.length>0?false:'disabled'">启用</el-button>
|
||||
<el-button type="warning" @click="using(0)" :disabled="this.selection.length>0?false:'disabled'">停用</el-button>
|
||||
<!-- <el-select v-model="tempMove" placeholder="移动到:" style="margin-left: 10px;" :disabled="this.selection.length>0?false:'disabled'" filterable @change="mixinMoveChange"> -->
|
||||
<el-select v-model="tempMove" placeholder="移动到:" style="margin-left: 10px;" :disabled="this.selection.length>0?false:'disabled'"
|
||||
filterable @change="moveChange">
|
||||
<el-option v-for="value in listunfold" :key="value.id" :label="value.name" :value="value.id" v-show="value.id!=99999999"></el-option>
|
||||
</el-select>
|
||||
<!-- 断点 准备移动 -->
|
||||
</div>
|
||||
<div v-if="getData.type==1">
|
||||
<el-button @click="upShow=true">批量导入</el-button>
|
||||
<el-button @click="down">模板下载</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont_right_cont">
|
||||
<div v-if="data">
|
||||
<el-table border :data="data.data.klist" @select-all="selectAll" @select="select" style="width: 100%"
|
||||
:cell-style="{padding: '10px'}">
|
||||
<el-table-column type="selection" width="70">
|
||||
</el-table-column>
|
||||
<el-table-column v-for="item in getData.row" :key="item.id" :prop="item.row" :label="item.label" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="item.type==='Blooen'">
|
||||
{{scope.row[item.row]?"是":"否"}}
|
||||
</span>
|
||||
<span v-else-if="item.type==='State'">
|
||||
{{scope.row[item.row]=="1"?'启用':'未启用'}}
|
||||
</span>
|
||||
<span v-else-if="item.type==='type'">
|
||||
{{scope.row[item.row]=="1"?'数值型':(scope.row[item.row]=="2"?'字符型':(scope.row[item.row]=="3"?'枚举型':(scope.row[item.row]=="4"?'小数型':(scope.row[item.row]=="5"?'数组型':(scope.row[item.row]=="6"?'JSON型':'')))))}}
|
||||
</span>
|
||||
<span v-else-if="item.fn">
|
||||
{{item.fn(scope.row[item.row])}}
|
||||
</span>
|
||||
<span v-else-if="item.type==='Time'" style="white-space: nowrap;" class="contText">{{
|
||||
new Date(scope.row[item.row]).toLocaleDateString().replace(/\//g, "-") + " " + new Date(scope.row[item.row]).toTimeString().substr(0, 8)
|
||||
}}</span>
|
||||
<span class="contText" v-else>
|
||||
{{scope.row[item.row]}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" size="s">
|
||||
<template slot-scope="scope">
|
||||
<el-button icon="el-icon-setting" circle size="mini" @click="dialogShow(scope.row.id)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination style="float: right;margin-right: 40px;margin-top: 40px;" :current-page="currPage"
|
||||
@current-change="clickpage" background layout="prev, pager, next" :total="data.data.pager.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<template v-else>
|
||||
<dataManageRedact @close="listRedact=false;tempRedactId=0" @Ok="listRedact=false;tempRedactId=0;getlist();currPage=1"
|
||||
:updata="getData.updatafield" :id='tempRedactId' :fieldTypeId="currid" :setsave="getData.setsave" :getInfo="getData.getInfo"
|
||||
:ftype="getData.type"></dataManageRedact>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<el-dialog title="上传文件" :visible.sync="upShow" width="30%" :before-close="upShowClose">
|
||||
<div style="margin: 0 auto;display: flex;justify-content: center;">
|
||||
<el-upload class="upload-demo" ref="upload" action="doUpload" :limit="1" :file-list="fileList" :before-upload="beforeUpload"
|
||||
v-loading="Uploadloading">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">只能上传excel文件,且不超过5MB</div>
|
||||
<div slot="tip" class="el-upload-list__item-name">{{fileName}}</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="upShow = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitUpload()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import contNewFule from '@/components/common/contNewFile.vue'
|
||||
import '@/assets/css/cont.css'
|
||||
import fileHome from '@/components/common/fileHome.vue'
|
||||
import dataManageRedact from '@/components/common/dataManageRedact.vue'
|
||||
import contmixin from '@/utils/contminxin/contmixin.js'
|
||||
import {
|
||||
updateFieldFolder
|
||||
} from '@/api/index.js'
|
||||
export default {
|
||||
mixins: [
|
||||
contmixin
|
||||
],
|
||||
components: {
|
||||
fileHome,
|
||||
dataManageRedact,
|
||||
updateFieldFolder,
|
||||
contNewFule
|
||||
},
|
||||
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
getData: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
|
||||
},
|
||||
watch: {
|
||||
list() {
|
||||
if (this.list.length > 0) {
|
||||
this.leftloading = false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
Uploadloading: false,
|
||||
tempMove: '',
|
||||
leftloading: true,
|
||||
fileName: "",
|
||||
fileList: [],
|
||||
upShow: false,
|
||||
currPage: 1,
|
||||
currid: null,
|
||||
data: null,
|
||||
contloading: false,
|
||||
newf: false,
|
||||
tempNewF: "",
|
||||
tempHintTop: null,
|
||||
tempHintLeft: null,
|
||||
tempId: null,
|
||||
listRedact: false, //新增页面开启
|
||||
tempRedactId: 0,
|
||||
selection: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData.getTree({
|
||||
type: this.getData.type
|
||||
}).then(res => {
|
||||
this.list = this.listTreeDeep(res.data, 1)
|
||||
this.clickCurrid(99999999)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
moveChange(e) { //移动文件夹
|
||||
let arr = this.selection.map((value) => {
|
||||
return value.id
|
||||
})
|
||||
if (arr.length < 1) {
|
||||
this.$message.error('未选择任何文件');
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
ids: arr,
|
||||
folderId: e
|
||||
}
|
||||
updateFieldFolder(params).then(res => {
|
||||
if (res.status == "1") {
|
||||
this.clickCurrid(this.currid)
|
||||
this.$message({
|
||||
message: '移动成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.selection = []
|
||||
}
|
||||
})
|
||||
this.tempMove = ""
|
||||
},
|
||||
|
||||
down() {
|
||||
window.open(window.origin + '/Riskmanage/v2/datamanage/field/downTemplate')
|
||||
},
|
||||
delectFun(id) {
|
||||
let name
|
||||
this.deepGetCurr(id, this.list, (value) => {
|
||||
name = value.name
|
||||
})
|
||||
let params = {
|
||||
status: -1,
|
||||
id: id,
|
||||
fieldType: name
|
||||
}
|
||||
this.getData.updatalist(params).then(res => {
|
||||
if (res.status === "1") {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
|
||||
this.deepGetCurr(id, this.list, (value, item, index) => {
|
||||
item.splice(index, 1)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
this.leftloading = false
|
||||
this.currid = 99999999
|
||||
this.getlist()
|
||||
|
||||
}).catch(() => {
|
||||
this.$message.error("请求失败了" + '-_-');
|
||||
this.leftloading = false
|
||||
})
|
||||
},
|
||||
updatafilelist(params) {
|
||||
this.leftloading = true
|
||||
let tempNum = null
|
||||
|
||||
this.deepGetCurr(params.id, this.list, (value) => {
|
||||
tempNum = value.parentId
|
||||
})
|
||||
params.parentId = tempNum == 99999999 ? 0 : tempNum
|
||||
tempNum = null
|
||||
let obj = {
|
||||
fieldType: params.name,
|
||||
id: params.id,
|
||||
parentId: params.parentId
|
||||
}
|
||||
this.getData.updatalist(obj).then(res => {
|
||||
if (res.status === "1") {
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.deepGetCurr(params.id, this.list, (value) => {
|
||||
value.name = params.name
|
||||
value.Rename = false
|
||||
})
|
||||
this.leftloading = false
|
||||
} else {
|
||||
this.leftloading = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error("请求失败了" + '-_-');
|
||||
this.leftloading = false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
getlist() {
|
||||
this.contloading = true
|
||||
this.listRedact = false
|
||||
let params = {
|
||||
"isCommon": 1,
|
||||
"fieldTypeId": String(this.currid),
|
||||
"pageNo": 1
|
||||
}
|
||||
this.getData.getlist(params).then(res => {
|
||||
this.data = res
|
||||
this.contloading = false
|
||||
})
|
||||
|
||||
},
|
||||
clickpage(e) {
|
||||
this.currPage = e
|
||||
this.contloading = true
|
||||
let params = {
|
||||
"isCommon": 1,
|
||||
"fieldTypeId": String(this.currid),
|
||||
"pageNo": e
|
||||
}
|
||||
this.getData.getlist(params).then(res => {
|
||||
if (res.status == "1") {
|
||||
this.data = res
|
||||
this.selection = []
|
||||
this.contloading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
using(id) {
|
||||
|
||||
let arr = this.selection.map((value) => {
|
||||
return value.id
|
||||
})
|
||||
if (arr.length < 1) {
|
||||
this.$message.error('未选择任何文件');
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
status: id,
|
||||
ids: arr.join(','),
|
||||
fieldTypeId: this.currid
|
||||
}
|
||||
|
||||
this.getData.fieldusing(params).then(res => {
|
||||
if (res.status == "1") {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.getlist()
|
||||
this.$store.dispatch('reGetfielduser')
|
||||
}
|
||||
})
|
||||
},
|
||||
newFileSure() {
|
||||
this.leftloading = true
|
||||
let params = {
|
||||
parentId: this.currid,
|
||||
fieldType: this.tempNewF,
|
||||
type: this.getData.type
|
||||
}
|
||||
if(this.mixnewFileZindexVerify(this.list,this.currid)==6){
|
||||
this.$message.error('已达到最深层级')
|
||||
this.leftloading = false
|
||||
return
|
||||
}
|
||||
|
||||
this.mixnewFileSure(params)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
45
h5-enginex-manager/src/components/common/contNewFile.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="cont_new_file">
|
||||
<div v-if="!newf" @click="newFile"><i class="el-icon-folder-add" @click="newFile" style="margin-right: 10px;"></i>新建文件夹</div>
|
||||
<div v-else style="padding: 5px;box-sizing:border-box;">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<i class="el-icon-folder-add" @click="newFile" style="margin-right: 10px;"></i>
|
||||
<el-input :value="value" @input="$emit('input',$event)" placeholder="请输入新文件夹名字,最长20个字符" size="small" @keyup.enter.native="newFileSure"></el-input>
|
||||
</div>
|
||||
<el-button style="margin-left: 60px;margin-top: 10px;" type="danger" icon="el-icon-close" circle size="mini"
|
||||
@click="newFileClose"></el-button>
|
||||
<el-button type="success" icon="el-icon-check" circle size="mini" @click="newFileSure"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default{
|
||||
props:{
|
||||
newf:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
value:{
|
||||
type:String,
|
||||
default:''
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
newFile(){
|
||||
this.$emit('newFile')
|
||||
},
|
||||
newFileSure(){
|
||||
this.$emit('newFileSure')
|
||||
},
|
||||
newFileClose(){
|
||||
this.$emit('input','')
|
||||
this.$emit('update:newf',false)
|
||||
// newf=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
823
h5-enginex-manager/src/components/common/dataManageRedact.vue
Normal file
@@ -0,0 +1,823 @@
|
||||
<style>
|
||||
.dataManageRedact {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.MR_checkbox {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.MR_scope {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.MR_scope>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.MR_scope>div>p {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.MR_derive {
|
||||
|
||||
margin: 0 40px 0 30px;
|
||||
|
||||
}
|
||||
|
||||
.MR_rule_home {
|
||||
overflow: scroll;
|
||||
overflow-x: hidden;
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.MR_rule_home::-webkit-scrollbar {
|
||||
display: none;
|
||||
/* Chrome Safari */
|
||||
}
|
||||
|
||||
.MR_toolbar {
|
||||
background-color: #F0F0F0;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
}
|
||||
|
||||
.MR_toolbar>p:hover {
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.codemirrirPs {
|
||||
padding: 5px;
|
||||
margin: 30px 0;
|
||||
background-color: #999;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.codemirrirPs>span:nth-of-type(1) {
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="dataManageRedact" v-loading="loading">
|
||||
<div :class="smallHeader?'MR_header MR_headerSmall':'MR_header'">
|
||||
<div>
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-arrow-left" circle @click="$emit('close')"></el-button>
|
||||
</div>
|
||||
<div>
|
||||
<span v-if="id===0">新增字段 :</span>
|
||||
<span v-else>编辑字段 :</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<el-button :icon="smallHeader?'el-icon-bottom':'el-icon-top'" circle @click="openHeader">
|
||||
</el-button>
|
||||
<el-button type="success" icon="el-icon-check" circle @click="submit"></el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div :class="smallHeader?'MR_input MR_inputSmall':'MR_input'">
|
||||
<div>
|
||||
<p>字段名称: </p>
|
||||
<el-input placeholder="请输入字段名" maxlength="30" v-model="fieldEn" clearable></el-input>
|
||||
</div>
|
||||
<div>
|
||||
<p>字段中文名: </p>
|
||||
<el-input placeholder="请输入字段中文名" maxlength="20" v-model="fieldCn" clearable></el-input>
|
||||
</div>
|
||||
<div>
|
||||
<p>值类型 : </p>
|
||||
<el-select v-model="valueType" placeholder="请选择">
|
||||
<el-option label="数值型" :value="1" v-if="ftype!=5" />
|
||||
<el-option label="字符型" :value="2" v-if="ftype!=5" />
|
||||
<!-- <el-option label="枚举型" :value="3" /> -->
|
||||
<!-- <el-option label="小数型" :value="4" /> -->
|
||||
<!-- <el-option label="数组型" :value="5" /> -->
|
||||
<el-option label="JSON型" :value="6" />
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1;overflow: auto;">
|
||||
|
||||
<div v-show="isDerivative=='Derivative'" class="MR_derive">
|
||||
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="条件区域" name="first">
|
||||
<div class="MR_rule_home">
|
||||
<rule :Data="ruledata" @faadd="faadd" @fadelect="fadelect" @sonadd="sonadd"
|
||||
@sondelect="sondelect" @change="change"></rule>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="公式编辑" name="second">
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="groovy脚本" name="third">
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div v-show="activeName!=='first'">
|
||||
<teV2 v-model="formula" :hint="activeName=='second'">
|
||||
|
||||
</teV2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="Sourcelist">
|
||||
<div v-if="isDerivative=='SQL'" class="MR_derive">
|
||||
|
||||
<el-select v-model="SQLType" placeholder="请选择数据源类型" style="margin-top: 20px;width: 200px;"
|
||||
@change="SQLName = ''">
|
||||
<el-option v-for="item in SourcelistType" :key="item.type" :label="item.type"
|
||||
:value="item.type">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<el-select v-model="SQLName" placeholder="请选择数据源" style="margin-top: 20px;margin-left: 20px;">
|
||||
<el-option v-for="item in Sourcelist" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<bindParam :Variable="sqlVariable" :dictVariable="dictVariable"></bindParam>
|
||||
<!-- <el-input type="textarea" v-model="SQLItem" rows="9" style="margin-top: 20px;"
|
||||
placeholder="请输入SQL语句">
|
||||
</el-input> -->
|
||||
|
||||
<div class="codemirrirPs">
|
||||
<span>
|
||||
{{sqlplaceholder[SQLType]&&sqlplaceholder[SQLType].placeholder}} 按Tab键自动补全
|
||||
|
||||
|
||||
</span>
|
||||
<codemirror v-model="SQLItem" :MYname="sqlplaceholder[SQLType]&&sqlplaceholder[SQLType].mime"
|
||||
:mime="sqlplaceholder[SQLType]&&sqlplaceholder[SQLType].mime"></codemirror>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ftype==4">
|
||||
<el-select v-model="interfaceId" placeholder="请选择接口" style="margin-top: 20px;margin-left: 20px;">
|
||||
<el-option v-for="item in interfaceList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-cascader style="margin-left: 20px;" placeholder="请选择接口下的字段" v-model="interfaceParseField"
|
||||
:key="keynum" :options="dataJson" :props="{ checkStrictly: true }" clearable></el-cascader>
|
||||
</div>
|
||||
<div v-if="valueType==6" class="MR_derive">
|
||||
<p style="margin-top: 20px;">JSON:</p>
|
||||
<!-- <el-input type="textarea" v-model="jsonValue" :rows="9" style="margin-top: 20px;"
|
||||
placeholder="请输入格式JSON">
|
||||
</el-input> -->
|
||||
<div class="codemirrirPs">
|
||||
<span>
|
||||
请输入 JSON
|
||||
</span>
|
||||
<codemirror v-model="jsonValue" MYname="json" mime="text/javascript" :autocomplete="false">
|
||||
</codemirror>
|
||||
<!-- <p style="background-color: #fff;padding: 5px;border-radius: 3px;"> -->
|
||||
<!-- <el-checkbox v-model="isStaticJsonValue" style="color: #fff;"></el-checkbox><span style="color: #fff;font-size: 12px;margin-left: 10px;">静态</span> -->
|
||||
<!-- </p> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import codemirror from '@/components/common/codemirror.vue'
|
||||
// import fieldUserTable from './fieldUserTable.vue'
|
||||
import bindParam from '@/components/common/bindParam.vue'
|
||||
import '@/assets/css/ManageRedact.css'
|
||||
import teV2 from '@/components/common/teV2.vue'
|
||||
import mangeRedactMixin from '@/utils/contminxin/MangeRedactMixin.js'
|
||||
// import {
|
||||
// getInterfaceList
|
||||
// } from '@/api/index.js'
|
||||
import rule from './rule.vue'
|
||||
export default {
|
||||
mixins: [mangeRedactMixin],
|
||||
components: {
|
||||
// getInterfaceList,
|
||||
// fieldUserTable,
|
||||
rule,
|
||||
teV2,
|
||||
bindParam,
|
||||
codemirror
|
||||
},
|
||||
props: {
|
||||
fieldTypeId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
setsave: {
|
||||
type: Function,
|
||||
default: () => {}
|
||||
},
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
getInfo: {
|
||||
type: Function,
|
||||
default: () => {}
|
||||
},
|
||||
updata: {
|
||||
type: Function,
|
||||
default: () => {}
|
||||
},
|
||||
ftype: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
sqlVariable: [],
|
||||
interfaceParseField: [],
|
||||
keynum: 1,
|
||||
interfaceId: '',
|
||||
jsonValue: '',
|
||||
loading: false,
|
||||
SQLItem: '',
|
||||
SQLName: '',
|
||||
tempFormula: '',
|
||||
formula: '',
|
||||
fieldEn: '',
|
||||
fieldCn: '',
|
||||
valueType: '',
|
||||
SQLType: '',
|
||||
isDerivative: "",
|
||||
isOutput: false,
|
||||
activeName: 'first',
|
||||
isrecord: false, //开始记录
|
||||
text: '', //剪出的字符串
|
||||
tempIndex: null, //暂存index
|
||||
lest: "", //暂存末尾
|
||||
isshow: false,
|
||||
islest: true,
|
||||
isStaticJsonValue: 0, //json是否为静态的 0为否
|
||||
// interfaceList: [],
|
||||
ruledata: [{
|
||||
"fieldSubCond": [{
|
||||
"fieldId": '',
|
||||
"operator": "",
|
||||
"fieldValue": "",
|
||||
"logical": ""
|
||||
}],
|
||||
"conditionValue": "",
|
||||
"fieldValue": ""
|
||||
}],
|
||||
dictVariable: [],
|
||||
sqlplaceholder: {
|
||||
MySQL: {
|
||||
placeholder: '请输入sql语句',
|
||||
mime: 'text/x-sql'
|
||||
},
|
||||
Redis: {
|
||||
placeholder: '请输入lua脚本',
|
||||
mime: 'text/x-lua'
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
|
||||
this.$store.dispatch('getfielduser')
|
||||
if (this.id != 0) {
|
||||
this.loading = true
|
||||
this.getInfo(this.id, {}).then(res => {
|
||||
this.loading = false
|
||||
|
||||
if (res.status === "1") {
|
||||
this.jsonValue = JSON.stringify(JSON.parse(res.data.fieldVo.jsonValue), null, 4)
|
||||
|
||||
this.fieldCn = res.data.fieldVo.fieldCn
|
||||
// this.isStaticJsonValue = res.data.fieldVo.isStaticJsonValue
|
||||
|
||||
|
||||
|
||||
this.fieldEn = res.data.fieldVo.fieldEn
|
||||
this.valueType = res.data.fieldVo.valueType
|
||||
this.interfaceId = res.data.fieldVo.interfaceId
|
||||
this.interfaceParseField = res.data.fieldVo.interfaceParseField ? res.data.fieldVo
|
||||
.interfaceParseField.split('.') : ''
|
||||
this.fid = res.data.fieldVo.fieldTypeId
|
||||
this.isOutput = res.data.fieldVo.isOutput == 1 ? true : false
|
||||
|
||||
if (res.data.fieldVo.isDerivative) {
|
||||
this.isDerivative = 'Derivative'
|
||||
} else if (res.data.fieldVo.useSql) {
|
||||
this.isDerivative = 'SQL'
|
||||
this.SQLType = this.$store.state.Sourcelist.find(x => x.id == res.data.fieldVo
|
||||
.dataSourceId).type
|
||||
|
||||
this.SQLName = res.data.fieldVo.dataSourceId
|
||||
this.SQLItem = res.data.fieldVo.sqlStatement
|
||||
}
|
||||
if (res.data.hasFormula == "y" || res.data.hasGroovy == "y") {
|
||||
this.formula = JSON.parse(res.data.fieldVo.formula)[0].formula
|
||||
if (res.data.hasFormula == "y") {
|
||||
this.activeName = "second"
|
||||
}
|
||||
if (res.data.hasGroovy == "y") {
|
||||
this.activeName = "third"
|
||||
}
|
||||
} else if (res.data.fieldVo.fieldCondList.length > 0) {
|
||||
|
||||
this.ruledata = res.data.fieldVo.fieldCondList
|
||||
}
|
||||
if (this.ftype == 2) {
|
||||
if (res.data.fieldVo.sqlVariable == null) {
|
||||
this.sqlVariable = []
|
||||
} else {
|
||||
this.sqlVariable = JSON.parse(res.data.fieldVo.sqlVariable)
|
||||
}
|
||||
if (res.data.fieldVo.dictVariable == null) {
|
||||
this.dictVariable = []
|
||||
} else {
|
||||
this.dictVariable = JSON.parse(res.data.fieldVo.dictVariable)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// console.log(res.data.fieldVo.fieldCondList)
|
||||
}
|
||||
if (this.ftype == 2) {
|
||||
this.isDerivative = 'SQL'
|
||||
console.log(1)
|
||||
} else if (this.ftype == 3) {
|
||||
this.isDerivative = 'Derivative'
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
this.$message.error('网络出现问题-_-');
|
||||
})
|
||||
} else {
|
||||
if (this.ftype == 2) {
|
||||
this.isDerivative = 'SQL'
|
||||
console.log(1)
|
||||
} else if (this.ftype == 3) {
|
||||
this.isDerivative = 'Derivative'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
interfaceList() {
|
||||
return this.$store.state.Interface
|
||||
},
|
||||
dataJson() {
|
||||
if (this.ftype != 4) {
|
||||
return {}
|
||||
}
|
||||
let obj = {}
|
||||
this.interfaceList.forEach(value => {
|
||||
if (value.id == this.interfaceId) {
|
||||
obj = JSON.parse(value.responseBody)
|
||||
}
|
||||
})
|
||||
|
||||
obj = this.deepGetLayout(obj)
|
||||
console.log(obj)
|
||||
return obj
|
||||
},
|
||||
FieldUser() {
|
||||
return this.$store.state.FieldUser
|
||||
},
|
||||
SourcelistType() {
|
||||
let arr = []
|
||||
if (this.$store.state.Sourcelist) {
|
||||
this.$store.state.Sourcelist.forEach(value => {
|
||||
let sarr = arr.find(x => x.type == value.type)
|
||||
if (sarr) {
|
||||
sarr.data.push(value)
|
||||
} else {
|
||||
arr.push({
|
||||
type: value.type,
|
||||
data: [value]
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
console.log(arr)
|
||||
return arr
|
||||
},
|
||||
Sourcelist() {
|
||||
let arr = this.SourcelistType.find(x => x.type == this.SQLType)
|
||||
if (arr) {
|
||||
return arr.data
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$refs.textarea.$refs.textarea.onkeydown = (e) => {
|
||||
// if (e.key === 'Backspace') {
|
||||
// this.text = ""
|
||||
// }
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
|
||||
deepGetLayout(obj) {
|
||||
let sobj = []
|
||||
for (let key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
if (typeof obj[key] == 'object' && !Array.isArray(obj[key]) && obj[key] != null) {
|
||||
sobj.push({
|
||||
label: key,
|
||||
value: key,
|
||||
children: this.deepGetLayout(obj[key])
|
||||
})
|
||||
|
||||
} else if (typeof obj[key] == 'object' && Array.isArray(obj[key]) && obj[key] != null) {
|
||||
sobj.push({
|
||||
label: key,
|
||||
value: key,
|
||||
children: [{
|
||||
label: '元素',
|
||||
value: '[]',
|
||||
children: this.deepGetLayout(obj[key][0])
|
||||
}]
|
||||
})
|
||||
} else {
|
||||
sobj.push({
|
||||
label: key,
|
||||
value: key,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
return sobj
|
||||
},
|
||||
submit() {
|
||||
let reg = /[\u4e00-\u9fa5]+/g;
|
||||
if (this.fieldEn.match(reg) != null) {
|
||||
this.$message.error('代码不允许出现中文');
|
||||
return
|
||||
}
|
||||
if (this.verificationCode(this.fieldEn) || this.verificationName(this.fieldCn)) {
|
||||
return
|
||||
}
|
||||
if (this.fieldEn.trim() == '' || this.fieldCn.trim() == '' || this.valueType == '') {
|
||||
this.$message.error('请填入所有字段,并检查空格');
|
||||
return
|
||||
}
|
||||
if (this.isDerivative == 'SQL' && (!this.SQLName || !this.SQLType)) {
|
||||
this.$message.error('请选择数据源');
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (this.ftype == 4 && (!this.interfaceId || this.interfaceParseField.length == 0)) {
|
||||
this.$message.error('请选择接口');
|
||||
return
|
||||
}
|
||||
let is = {
|
||||
is: true,
|
||||
msg: '请填入页面中未填的部分'
|
||||
}
|
||||
if (this.isDerivative == "Derivative" && this.activeName == 'first') {
|
||||
this.ruledata.forEach(value => {
|
||||
if (value.conditionValue.length < 1) {
|
||||
is.is = false
|
||||
}
|
||||
value.fieldSubCond.forEach((item, inde) => {
|
||||
if (item.fieldId == "" || item.operator == "" || item.fieldValue.length < 1) {
|
||||
is.is = false
|
||||
}
|
||||
if (item.logical == "" && inde !== value.fieldSubCond.length - 1) {
|
||||
is.is = false
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
if (this.ftype == 2) {
|
||||
this.sqlVariable.forEach(value => {
|
||||
if (value.value.trim() === "" || value.key.trim() === "") {
|
||||
is.is = false
|
||||
}
|
||||
})
|
||||
|
||||
this.dictVariable.forEach(value => {
|
||||
if (value.key.trim() === "" || value.type === "" || value.value.trim() === "") {
|
||||
is.is = false
|
||||
}
|
||||
})
|
||||
|
||||
let arr = []
|
||||
arr.push(...this.sqlVariable.map(value => value.key))
|
||||
arr.push(...this.dictVariable.map(value => value.key))
|
||||
|
||||
if (arr.length != Array.from(new Set(arr)).length) {
|
||||
is.is = false
|
||||
is.msg = '不允许出现重复的变量'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (this.ftype == 4 && !this.interfaceId) {
|
||||
is.is = false
|
||||
}
|
||||
if (is.is === false) {
|
||||
this.$message.error(is.msg);
|
||||
return
|
||||
}
|
||||
|
||||
if (this.valueType == 6 && !this.isJSON(this.jsonValue)) {
|
||||
this.$message.error('请检查JSON格式');
|
||||
return
|
||||
}
|
||||
|
||||
let obj = {
|
||||
searchKey: '',
|
||||
fieldEn: this.fieldEn,
|
||||
fieldCn: this.fieldCn,
|
||||
valueType: this.valueType, //字段值类型
|
||||
isDerivative: this.isDerivative == "Derivative" ? 1 : 0, //是否衍生字段
|
||||
isOutput: this.isOutput ? 1 : 0, //是否输出字段
|
||||
// valueScope: this.valueScope, //字段约束范围
|
||||
fieldCondList: '',
|
||||
isStaticJsonValue: this.valueType == 6 ? this.isStaticJsonValue : 0,
|
||||
formulaHidden: '',
|
||||
isUseSql: this.isDerivative == "SQL" ? true : false, //是否使用sql
|
||||
dataSourceId: 0,
|
||||
sqlStatement: '', //sql语句
|
||||
}
|
||||
if (this.valueType == 6) {
|
||||
obj.jsonValue = this.jsonValue
|
||||
}
|
||||
if (this.ftype == 2) {
|
||||
if (this.sqlVariable.length == 0) {
|
||||
obj.sqlVariable = null
|
||||
} else {
|
||||
obj.sqlVariable = JSON.stringify(this.sqlVariable)
|
||||
}
|
||||
obj.dictVariable = JSON.stringify(this.dictVariable)
|
||||
}
|
||||
if (this.ftype == 4) {
|
||||
obj.isInterface = 1
|
||||
obj.interfaceId = this.interfaceId
|
||||
obj.interfaceParseField = this.interfaceParseField.join('.')
|
||||
} else {
|
||||
obj.isInterface = 0
|
||||
}
|
||||
// console.log(this.isDerivative)
|
||||
if (this.isDerivative == "Derivative") {
|
||||
if (this.activeName == "first") {
|
||||
obj.fieldCondList = JSON.stringify(this.ruledata)
|
||||
} else if (this.activeName == "second" || this.activeName == "third") {
|
||||
let tempArr = []
|
||||
let num = 0
|
||||
for (let i of this.formula) {
|
||||
if (i === "@") {
|
||||
num++
|
||||
}
|
||||
}
|
||||
if (num % 2 === 0 && num != 0) {
|
||||
this.formula.match(/@.*?@/g).forEach(value => {
|
||||
let tempObj = {
|
||||
fieldCN: value.substring(1, value.length - 1),
|
||||
fieldCond: ''
|
||||
}
|
||||
tempArr.push(tempObj)
|
||||
})
|
||||
}
|
||||
obj.formulaHidden = JSON.stringify([{
|
||||
fvalue: '',
|
||||
formula: this.formula.trim(),
|
||||
idx: '0',
|
||||
farr: tempArr,
|
||||
}])
|
||||
}
|
||||
|
||||
} else if (this.isDerivative == "SQL") {
|
||||
obj.dataSourceId = this.SQLName
|
||||
obj.sqlStatement = this.SQLItem
|
||||
|
||||
}
|
||||
let isT = true;
|
||||
if (this.isDerivative == "SQL") {
|
||||
let sqlCheck = obj.sqlStatement.match(/(create|update|delete|truncate|alert|drop)\s+/im);
|
||||
if (sqlCheck != null) {
|
||||
isT = false;
|
||||
this.$message.error('存在有风险sql关键词:' + sqlCheck[0].toUpperCase());
|
||||
}
|
||||
}
|
||||
if (isT) {
|
||||
if (this.id == 0) {
|
||||
obj.fieldTypeId = this.fieldTypeId == 99999999 ? 0 : this.fieldTypeId,
|
||||
this.loading = true
|
||||
this.setsave(obj).then(res => {
|
||||
this.loading = false
|
||||
if (res.status === "1") {
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.$emit('Ok')
|
||||
// this.$store.dispatch('reGetisOutput')
|
||||
this.$store.dispatch('reGetfielduser')
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
this.$message.error('网络出现问题-_-');
|
||||
})
|
||||
} else {
|
||||
obj.id = this.id
|
||||
obj.fieldTypeId = this.fid
|
||||
this.loading = true
|
||||
this.updata(obj).then(res => {
|
||||
this.loading = false
|
||||
if (res.status === "1") {
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.$emit('Ok')
|
||||
|
||||
// this.$store.dispatch('reGetisOutput')
|
||||
this.$store.dispatch('reGetfielduser')
|
||||
|
||||
}
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
this.$message.error('网络出现问题-_-');
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
isJSON(str) {
|
||||
if (typeof str == 'string') {
|
||||
try {
|
||||
var obj = JSON.parse(str);
|
||||
if (typeof obj == 'object' && obj) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.log('error:' + str + '!!!' + e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
change(index, inde) {
|
||||
this.ruledata[index].fieldSubCond[inde].operator = ""
|
||||
this.ruledata[index].fieldSubCond[inde].fieldValue = ""
|
||||
},
|
||||
sondelect(index, inde) {
|
||||
this.ruledata[index].fieldSubCond.splice(inde, 1)
|
||||
},
|
||||
sonadd(index, inde) {
|
||||
this.ruledata[index].fieldSubCond.splice(inde + 1, 0, {
|
||||
"fieldId": "",
|
||||
"operator": "",
|
||||
"fieldValue": "",
|
||||
"logical": ""
|
||||
})
|
||||
},
|
||||
faadd(index) { //rule父节点添加
|
||||
this.ruledata.splice(index + 1, 0, {
|
||||
"conditionValue": "",
|
||||
"fieldSubCond": [{
|
||||
"fieldId": "",
|
||||
"operator": "",
|
||||
"fieldValue": "",
|
||||
"logical": "",
|
||||
|
||||
|
||||
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
fadelect(index) {
|
||||
this.ruledata.splice(index, 1)
|
||||
},
|
||||
textareaAdd(text) {
|
||||
if (text === "fx") {
|
||||
this.formula = "def main(_){\n\n}"
|
||||
} else {
|
||||
this.formula += text
|
||||
}
|
||||
},
|
||||
dbclick(e) {
|
||||
let T = ""
|
||||
T = this.formula.split("")
|
||||
|
||||
T.splice(this.tempIndex, this.text.length + 1, '@' + e + '@')
|
||||
this.formula = T.join("")
|
||||
this.isshow = false
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
jsonValue() {
|
||||
console.log(this.jsonValue)
|
||||
},
|
||||
SQLItem() {
|
||||
console.log(this.SQLItem)
|
||||
},
|
||||
interfaceId() {
|
||||
this.keynum++
|
||||
},
|
||||
formula() {
|
||||
let num = 0
|
||||
for (let i of this.formula) {
|
||||
if (i === "@") {
|
||||
num++
|
||||
}
|
||||
}
|
||||
if (num % 2 === 1) {
|
||||
this.isshow = true
|
||||
for (let i in this.formula) {
|
||||
if (this.formula[i] !== this.tempFormula[i] && this.formula[i] == "@") {
|
||||
|
||||
if (this.islest) {
|
||||
this.tempIndex = i
|
||||
|
||||
this.lest = this.formula.substring(parseInt(this.tempIndex) + 1, this.formula.length)
|
||||
this.islest = false
|
||||
}
|
||||
// console.log('字段:' + this.formula[i] + "暂存字段:" + this.tempFormula[i])
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
let T = this.formula.substring(parseInt(this.tempIndex) + 1, this.formula.length)
|
||||
if (this.lest !== "") {
|
||||
// console.log(T)
|
||||
T = T.substring(0, T.indexOf(this.lest))
|
||||
|
||||
} else {
|
||||
T = T.substring(0, T.length)
|
||||
}
|
||||
|
||||
this.text = T
|
||||
|
||||
// console.log('lest:' + this.lest, 'index:' + this.tempIndex, "T:" + T)
|
||||
|
||||
} else {
|
||||
this.islest = true
|
||||
this.text = ""
|
||||
this.tempIndex = null
|
||||
this.isshow = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.tempFormula = this.formula
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
427
h5-enginex-manager/src/components/common/dataRinse/RuleCont.vue
Normal file
@@ -0,0 +1,427 @@
|
||||
<style>
|
||||
.rule {
|
||||
display: flex;
|
||||
/* margin-left: 5px; */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.Rule_cont {
|
||||
width: 30px;
|
||||
border-top: 1px dashed #C7C6C8;
|
||||
/* border-top: 1px dashed rgb(1,1,1); */
|
||||
margin-top: 7px;
|
||||
flex-grow: 0;
|
||||
height: 1px;
|
||||
/* background-color: #C7C6C8; */
|
||||
margin: 12px 0px 0 0;
|
||||
height: 0;
|
||||
|
||||
}
|
||||
|
||||
.RuleIcon {
|
||||
background-color: #EBEBEB;
|
||||
border: #DADADA 1px solid;
|
||||
border-radius: 4px;
|
||||
padding: 4px 6px 4px 2px;
|
||||
}
|
||||
|
||||
.RuleSelcet .el-input__inner {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.RuleCont_for_out {
|
||||
border-left: 1px dashed #ccc;
|
||||
border-bottom: 1px dashed #ccc;
|
||||
border-right: 1px dashed #ccc;
|
||||
padding-top: 5px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div class="rule" :style="{marginLeft:ZIndex==1?'20px':'0px'}" v-if="data">
|
||||
<div :style="{position: 'absolute',top:'0px', left: '-20px',marginTop: top===0?'0':'8px'}" class="RuleIcon">
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-s-operation" :style="{color: color[ZIndex%5] ,fontSize: '16px'}"></i>
|
||||
</span>
|
||||
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-plus" command="addRule" v-if="data.conditionType!=3">添加规则
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-circle-plus-outline" command="addlogical">添加关系</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-close" command="delect" v-if="ZIndex!=1&&data.conditionType!=4">
|
||||
删除此节点</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div v-if="data.conditionType==1" class="RuleSelcet">
|
||||
|
||||
<div :style="{width: '80px',marginTop: top===0?'0':'8px'}">
|
||||
<el-select v-model="data.logical" placeholder="请选择" size="mini">
|
||||
<el-option :key="1" label="AND" value="&&"></el-option>
|
||||
<el-option :key="2" label="OR" value="||"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 10px;height: 0;border-top: 1px dashed #C7C6C8;margin-top: 19px;margin-left: 5px;">
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
:style="{border: '1px dashed '+ color[ZIndex%5],borderRadius: '5px',paddingRight: '5px',paddingBottom: '5px',position:'relative',minWidth:'30px',minHeight:'40px'}">
|
||||
|
||||
<div
|
||||
:style="{border:'',margin:'',padding:'',paddingLeft:'0px'}">
|
||||
|
||||
<div v-for="(item,index) in data.children" style="display: flex;margin-top: 7px;">
|
||||
<div class="Rule_cont"
|
||||
:style="{marginTop:item.conditionType===0?'12px':(index===0?'11px':'20px')}">
|
||||
</div>
|
||||
<!-- conditionType==2 规则部分 -->
|
||||
<div v-if="item.conditionType==2" style="display: flex;">
|
||||
<!-- {{fieldType}} -->
|
||||
<div v-if="fieldType!='for'" style="display: flex;">
|
||||
<!-- 普通规则部分 -->
|
||||
|
||||
<!-- 不为输出节点 则拉选 fielduser-->
|
||||
<div style="display: flex;">
|
||||
|
||||
<!-- <el-select v-model="item.opType" placeholder="请选择" size="mini" style="width: 100px;" @change="emptyOpKey($event,item)">
|
||||
<el-option :key="value.value" :label="value.label" :value="value.value" v-for="value in ruleList"></el-option>
|
||||
</el-select> -->
|
||||
|
||||
<el-cascader v-model="item.opKey" filterable size="mini" :options="fieldUserObj" clearable @change="ruleCascaderChange(item)"
|
||||
:key="keyValue+(item.random?item.random:0)" :props="{ expandTrigger: 'hover' }" @visible-change="randomAdd(item,$event)" style="width: 300px;flex-shrink: 0;">
|
||||
</el-cascader>
|
||||
<ruleRelation v-model="item.operator" :value2.sync="item.variableValue"
|
||||
:variableType.sync="item.variableType"
|
||||
:valueType="GetValueTypeByJSONEn(item.opKey)" size="mini" :variableDis="[2]"
|
||||
:interceptCustom="true" @CustomCallback="$emit('CustomCallback',item)"
|
||||
></ruleRelation>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<i class="el-icon-circle-close" style="color: #fa4949;margin-left: 5px;"
|
||||
@click="deleteSon(index)"></i>
|
||||
</div>
|
||||
<!-- conditionType==1 关系节点 conditionType==3 for的输出的关系节点 节点部分 -->
|
||||
<div v-if="item.conditionType==1">
|
||||
<!-- {{fieldType}} -->
|
||||
<rule :data="item" :top="index" :ZIndex="ZIndex+1"
|
||||
:index="index" @delectLogical="delectLogical"
|
||||
|
||||
:customUserObj="customUserObj"
|
||||
>
|
||||
</rule>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ruleRelation from '@/components/common/ruleRelation.vue'
|
||||
import bigElCascader from '@/components/common/bigElCascader.vue'
|
||||
export default {
|
||||
components: {
|
||||
ruleRelation,
|
||||
bigElCascader
|
||||
},
|
||||
name: 'rule',
|
||||
data() {
|
||||
return {
|
||||
color: ['#0D183E', '#409EFF', '#67C23A', '#F56C6C', '#FFCD43'],
|
||||
|
||||
keyValue: 1, //用于给级联选择框重新渲染
|
||||
keyValueReady: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
if (this.data) {
|
||||
if (Array.isArray(this.data.fieldEn)) {
|
||||
if (this.data.fieldEn.length > 0) {
|
||||
this.EnChange(this.data.fieldEn, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
||||
fieldType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
ZIndex: {
|
||||
type: Number,
|
||||
default: -1
|
||||
},
|
||||
|
||||
data: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
top: {
|
||||
tyep: String,
|
||||
default: '8px'
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: -1
|
||||
},
|
||||
// ruleList:{ //算子
|
||||
// type:Array||null,
|
||||
// default:null
|
||||
// },
|
||||
customUserObj:{ //自定义规则下拉
|
||||
type:Array||null,
|
||||
default:null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
fieldUserObj() {
|
||||
|
||||
if(this.customUserObj){
|
||||
return this.customUserObj
|
||||
}else{
|
||||
return []
|
||||
}
|
||||
// if (this.$store.state.FieldUserObj) {
|
||||
// return this.$store.state.FieldUserObj.data.fieldList
|
||||
// } else {
|
||||
// return []
|
||||
// }
|
||||
},
|
||||
fielduserArr() {
|
||||
let arr = []
|
||||
// console.log(11,this.fielduser)
|
||||
if (this.fielduser.length > 1) {
|
||||
if (this.fieldType != "for") { // 如果元素不为 for 则 用fielduser里的 json 格式指标
|
||||
arr = this.fielduser.filter((value) => {
|
||||
return value.valueType == 6
|
||||
})
|
||||
|
||||
arr = arr.map((value) => {
|
||||
let obj = {
|
||||
value: value.fieldEn,
|
||||
label: value.fieldCn,
|
||||
}
|
||||
obj.children = this.getdeepArr(JSON.parse(value.jsonValue))
|
||||
return obj
|
||||
})
|
||||
}
|
||||
// console.log(arr)
|
||||
return arr
|
||||
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
},
|
||||
fielduser() {
|
||||
if (this.$store.state.FieldUser) {
|
||||
return this.$store.state.FieldUser.data.fieldList
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
emptyOpKey(e,item){
|
||||
// console.log(e,item)
|
||||
if(e=='count'){
|
||||
item.opKey = []
|
||||
}
|
||||
},
|
||||
GetValueTypeByJSONEn(en){
|
||||
if(!en){
|
||||
return
|
||||
}
|
||||
|
||||
// console.log(en)
|
||||
|
||||
let obj
|
||||
|
||||
en.forEach((value,index)=>{
|
||||
if(index==0){
|
||||
obj = this.fieldUserObj.find(x=>x.value==value)
|
||||
|
||||
// console.log(this.fieldUserObj)
|
||||
// console.log(obj)
|
||||
// debugger
|
||||
|
||||
}else{
|
||||
obj = obj.children.find(x=>x.value==value)
|
||||
}
|
||||
})
|
||||
return obj&&obj.valueType
|
||||
},
|
||||
|
||||
getvalueTypebyEn(e) { //通过en 获取 valueType
|
||||
if (!Array.isArray(e)) {
|
||||
return
|
||||
}
|
||||
if (e[0][0] !== '%') {
|
||||
return this.mixinGetValueTypeByEn(e[0])
|
||||
}
|
||||
if (e[e.length - 1] == 'length') {
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
EnChange(e, clear = true) {
|
||||
|
||||
this.en = e.join('.')
|
||||
if (!clear) return
|
||||
this.deepClearEn(this.data)
|
||||
},
|
||||
deepClearEn(obj) { // 递归清除用到父级的 en
|
||||
obj.children.forEach(value => {
|
||||
if (Array.isArray(value.fieldEn)) {
|
||||
if (value.fieldEn[0][0] == "%") {
|
||||
value.fieldEn = ""
|
||||
}
|
||||
}
|
||||
if (value.children.length > 0) {
|
||||
this.deepClearEn(value)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
getdeepArr(obj) {
|
||||
if (Array.isArray(obj)) {
|
||||
return false
|
||||
} else if (typeof obj == 'object') {
|
||||
let arr = []
|
||||
for (let key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
if (Array.isArray(obj[key])) {
|
||||
arr.push({
|
||||
value: key,
|
||||
label: key
|
||||
})
|
||||
} else if (typeof obj[key] == 'object') {
|
||||
arr.push({
|
||||
value: key,
|
||||
label: key,
|
||||
children: this.getdeepArr(obj[key])
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return arr
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
delectLogical(index) {
|
||||
this.data.children.splice(index, 1)
|
||||
},
|
||||
handleCommand(str) {
|
||||
if (str == "addRule") { //添加规则
|
||||
// console.log(this.data)
|
||||
this.data.children.push({
|
||||
"logical": null,
|
||||
"opKey": '',
|
||||
"operator": "",
|
||||
"variableValue": "",
|
||||
"conditionType": 2,
|
||||
"variableType": 1,
|
||||
"children": [],
|
||||
|
||||
})
|
||||
|
||||
|
||||
} else if (str == "addlogical") { //添加链接符
|
||||
let obj = {
|
||||
"logical": '&&',
|
||||
"fieldId": "",
|
||||
"operator": "",
|
||||
"fieldValue": "",
|
||||
"conditionType": 1,
|
||||
"children": [],
|
||||
}
|
||||
this.data.children.push(obj)
|
||||
|
||||
|
||||
} else if (str == "delect") {
|
||||
this.$confirm('确定删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$emit('delectLogical', this.index)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
deleteSon(index) {
|
||||
|
||||
this.$confirm('确定删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.data.children.splice(index, 1)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
ruleCascaderChange(item) {
|
||||
item.valueType = this.mixinGetValueTypeByJSONEn(item.fieldEn)
|
||||
item.fieldValue = ""
|
||||
item.operator = ""
|
||||
},
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
fielduserArr() {
|
||||
if (this.keyValueReady) {
|
||||
this.keyValue++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div v-for="(value,index) in list" style="width: 800px;display: flex;align-items: center;margin-bottom: 10px;">
|
||||
|
||||
|
||||
<el-cascader v-model="value.outputKey" filterable :options="option" clearable placeholder="请选择属性"
|
||||
:key="(value.random?value.random:0)" style="margin-right: 10px;width: 300px;" :props="{ expandTrigger: 'hover' }"
|
||||
@visible-change="randomAdd(value,$event)">
|
||||
</el-cascader>
|
||||
|
||||
|
||||
=
|
||||
<varialeSelect :variableType.sync="value.variableType" :disabled="[2]" size="medium" height="36px"
|
||||
v-model="value.outputValue" style="margin-left: 10px;" :interceptCustom="true" @CustomCallback="$emit('CustomCallback',value)">
|
||||
</varialeSelect>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<i class="el-icon-circle-close" style="color: red;margin-left: 10px;" @click="deleteDataClear(index)"></i>
|
||||
</div>
|
||||
<el-button @click="addDataClear">+</el-button>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import varialeSelect from '@/components/models/varialeSelect.vue'
|
||||
export default {
|
||||
components: {
|
||||
varialeSelect
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
option: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
filterType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
deleteDataClear(index) {
|
||||
this.list.splice(index, 1)
|
||||
},
|
||||
addDataClear() {
|
||||
this.list.push({
|
||||
variableType: 3,
|
||||
variableValue: '',
|
||||
operator: '==',
|
||||
filterType: this.filterType
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,239 @@
|
||||
|
||||
<template>
|
||||
<div class="cont_cont">
|
||||
|
||||
<div class="cont_left" v-loading="leftloading" v-if="!listRedact">
|
||||
<div class="cont_header">
|
||||
<p class="cont_header_title">{{title}}</p>
|
||||
<p class="cont_header_subtitle">{{title}}</p>
|
||||
</div>
|
||||
<contNewFule v-model="tempNewF" :newf.sync="newf" @newFileSure="newFileSure" @newFile="newFile" ></contNewFule>
|
||||
|
||||
<div class="cont_list">
|
||||
|
||||
|
||||
<fileHome :data="list" @curr="clickCurrid" :currid="currid" @RenameFun="RenameFun" @RenameClose="RenameClose"
|
||||
@updatafilelist="updatafilelist" @delectFun="delectFun">
|
||||
</fileHome>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cont_right" v-loading="contloading" @click="tempHintLeft=null;tempHintTop=null;" >
|
||||
<div v-if="!listRedact">
|
||||
<div v-if="showRight===false" class="cont_right_hint">
|
||||
请先选择左侧文件夹
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="cont_right_top">
|
||||
<div>
|
||||
<el-button type="primary" @click="listRedact=true" :disabled="currid!=99999999?false:'disabled'">新增</el-button>
|
||||
<el-button type="danger" @click="using(-1);$store.dispatch('regetcache', 'decisionTree')" :disabled="this.selection.length>0?false:'disabled'">删除</el-button>
|
||||
<el-button type="success" @click="using(1)" :disabled="this.selection.length>0?false:'disabled'">启用</el-button>
|
||||
<el-button type="warning" @click="using(0)" :disabled="this.selection.length>0?false:'disabled'">停用</el-button>
|
||||
<el-select v-model="tempMove" placeholder="移动到:" style="margin-left: 10px;" :disabled="this.selection.length>0?false:'disabled'"
|
||||
filterable @change="mixinMoveChange">
|
||||
<el-option v-for="value in listunfold" :key="value.id" :label="value.name" :value="value.id" v-show="value.id!=99999999"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-input placeholder="请输入搜索内容" v-model="search">
|
||||
<i slot="suffix" class="el-input__icon el-icon-search" @click="getsearch"></i>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont_right_cont">
|
||||
<div v-if="data">
|
||||
<el-table border :data="data.data.klist" @select-all="selectAll" @select="select" style="width: 100%"
|
||||
:cell-style="{padding: '10px'}">
|
||||
<el-table-column type="selection" width="70">
|
||||
</el-table-column>
|
||||
<el-table-column v-for="item in getData.row" :key="item.id" :prop="item.row" :label="item.label" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="item.type==='Blooen'">
|
||||
{{scope.row[item.row]?"是":"否"}}
|
||||
</span>
|
||||
<span v-else-if="item.type==='State'">
|
||||
{{scope.row[item.row]==1?'启用':'未启用'}}
|
||||
</span>
|
||||
<span v-else-if="item.type==='Time'" style="white-space: nowrap;" class="contText">{{
|
||||
new Date(scope.row[item.row]).toLocaleDateString().replace(/\//g, "-") + " " + new Date(scope.row[item.row]).toTimeString().substr(0, 8)
|
||||
}}</span>
|
||||
<span v-else-if="item.fn">
|
||||
<!-- {{scope.row[item.row]}} -->
|
||||
{{item.fn(scope.row[item.row])}}
|
||||
</span>
|
||||
<span class="contText" v-else>
|
||||
{{scope.row[item.row]}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" size="s">
|
||||
<template slot-scope="scope">
|
||||
<el-button icon="el-icon-setting" circle size="mini" @click="dialogShow(scope.row.id)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination style="float: right;margin-right: 40px;margin-top: 40px;" :current-page="currPage"
|
||||
@current-change="clickpage" background layout="prev, pager, next" :total="data.data.pageInfo.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="listRedact" style="height: 100%;overflow: hidden;">
|
||||
<dataManageRedact v-if="listRedact" @close="listRedact=false;tempRedactId=0" @Ok="listRedact=false;tempRedactId=0;getlist()" :getData="getData"
|
||||
:id='tempRedactId' :nameId="currid" :type="getData.type"></dataManageRedact>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import contNewFule from '@/components/common/contNewFile.vue'
|
||||
import '@/assets/css/cont.css'
|
||||
import fileHome from '@/components/common/fileHome.vue'
|
||||
import dataManageRedact from './rinseManageRedact.vue'
|
||||
import contmixin from '@/utils/contminxin/contmixin.js'
|
||||
export default {
|
||||
mixins: [
|
||||
contmixin
|
||||
],
|
||||
components: {
|
||||
fileHome,
|
||||
dataManageRedact,
|
||||
contNewFule
|
||||
},
|
||||
created() {
|
||||
|
||||
this.getData.getTree({
|
||||
parentId: 0,
|
||||
treeType: this.getData.treeType,
|
||||
type: 1
|
||||
}).then(res => {
|
||||
this.list = this.listTreeDeep(res.data, 1)
|
||||
this.clickCurrid(99999999)
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
getData: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
list() {
|
||||
if (this.list.length > 0) {
|
||||
this.leftloading = false
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
tempMove: '',
|
||||
leftloading: true,
|
||||
search: "",
|
||||
fileName: "",
|
||||
fileList: [],
|
||||
upShow: false,
|
||||
currPage: 1,
|
||||
currid: null,
|
||||
data: null,
|
||||
contloading: false,
|
||||
newf: false,
|
||||
tempNewF: "",
|
||||
listRedact: false, //新增页面开启
|
||||
tempRedactId: 0,
|
||||
selection: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
getsearch() {
|
||||
this.contloading = true
|
||||
let params = {
|
||||
entity: {
|
||||
name: this.search,
|
||||
"folderId": String(this.currid) === "99999999" ? '' : String(this.currid),
|
||||
},
|
||||
key: "ruleName",
|
||||
status: "0,1",
|
||||
|
||||
"pageNum": 1,
|
||||
isSearch: 1
|
||||
}
|
||||
this.getData.getlist(params).then(res => {
|
||||
this.data = res
|
||||
this.contloading = false
|
||||
})
|
||||
this.currPage = 1
|
||||
},
|
||||
|
||||
getlist() {
|
||||
this.contloading = true
|
||||
this.listRedact = false
|
||||
let params = {
|
||||
status: "0,1",
|
||||
entity: {},
|
||||
"pageNum": 1
|
||||
}
|
||||
if (String(this.currid) !== "99999999") {
|
||||
params.entity.folderId = this.currid
|
||||
}
|
||||
this.getData.getlist(params).then(res => {
|
||||
this.data = res
|
||||
this.contloading = false
|
||||
})
|
||||
|
||||
},
|
||||
clickpage(e) {
|
||||
this.currPage = e
|
||||
this.contloading = true
|
||||
let params = {
|
||||
status: "0,1",
|
||||
entity: {},
|
||||
"pageNum": e
|
||||
}
|
||||
if (String(this.currid) !== "99999999") {
|
||||
params.entity.folderId = this.currid
|
||||
}
|
||||
this.getData.getlist(params).then(res => {
|
||||
if (res.status == 1) {
|
||||
this.data = res
|
||||
this.selection = []
|
||||
this.contloading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
newFileSure() {
|
||||
this.leftloading = true
|
||||
let params = {
|
||||
parentId: String(this.currid),
|
||||
name: this.tempNewF,
|
||||
"treeType":this.getData.treeType,
|
||||
"type": "1",
|
||||
"engineId": ""
|
||||
}
|
||||
if(this.mixnewFileZindexVerify(this.list,this.currid)==6){
|
||||
this.$message.error('已达到最深层级')
|
||||
this.leftloading = false
|
||||
return
|
||||
}
|
||||
this.mixnewFileSure(params)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||