diff --git a/package.json b/package.json index 6a46cc5..45aa156 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "@riophae/vue-treeselect": "0.4.0", "axios": "0.24.0", "clipboard": "2.0.8", + "codemirror": "^5.65.16", "core-js": "3.25.3", "echarts": "5.4.0", "element-ui": "2.15.13", @@ -53,6 +54,7 @@ "screenfull": "5.0.2", "sortablejs": "1.10.2", "vue": "2.6.12", + "vue-codemirror": "^4.0.6", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", "vue-meta": "2.4.0", diff --git a/src/api/dataSource/dictionary.js b/src/api/dataSource/dictionary.js index 7575f08..22d3c43 100644 --- a/src/api/dataSource/dictionary.js +++ b/src/api/dataSource/dictionary.js @@ -8,3 +8,32 @@ export function findDictionaryByStructureId(id) { params:id }) } +export function addDictionaryType(data) { + return request({ + url: '/dataSource/dict/addDictionaryType', + method: 'post', + data:data + }) +} +export function addDictionaryData(data) { + return request({ + url: '/dataSource/dict/addDictionaryData', + method: 'post', + data:data + }) +} + +export function deleteDictionaryData(id) { + return request({ + url: '/dataSource/dict/deleteDictionaryData?id='+id, + method: 'post', + params:id, + }) +} +export function updateDictionaryData(data) { + return request({ + url: '/dataSource/dict/updateDictionaryData', + method: 'post', + data:data + }) +} diff --git a/src/api/rule_engine/config.js b/src/api/rule_engine/config.js new file mode 100644 index 0000000..f43da02 --- /dev/null +++ b/src/api/rule_engine/config.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +//查询规则配置作用域列表 +export function listScope() { + return request({ + url: '/ruleEngine/config/getScopeList', + method: 'get' + }) +} + +//查询规则配置作用域 +export function getScope(query) { + return request({ + url: '/ruleEngine/config/getScopeInfo/'+query, + method: 'get' + }) +} + +// 查询引擎规则配置列表 +export function listConfig(query) { + return request({ + url: '/ruleEngine/config/list', + method: 'get', + params: query + }) +} + +// 测试引擎规则配置 +export function ruleTest(data) { + return request({ + url: '/ruleEngine/config/test', + method: 'post', + data: data + }) +} + +// 新增引擎规则配置 +export function addConfig(data) { + return request({ + url: '/ruleEngine/config', + method: 'post', + data: data + }) +} + +// 修改引擎规则配置 +export function updateConfig(data) { + return request({ + url: '/ruleEngine/config/'+data.id, + method: 'put', + data: data + }) +} + +// 删除引擎规则配置 +export function delConfig(id) { + return request({ + url: '/ruleEngine/config/' + id, + method: 'delete' + }) +} + diff --git a/src/api/rule_engine/maintenance.js b/src/api/rule_engine/maintenance.js new file mode 100644 index 0000000..f454aff --- /dev/null +++ b/src/api/rule_engine/maintenance.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询引擎维护列表 +export function listMaintenance(query) { + return request({ + url: '/ruleEngine/maintenance/list', + method: 'get', + params: query + }) +} + +// 查询引擎维护详细 +export function getMaintenance(id) { + return request({ + url: '/ruleEngine/maintenance/' + id, + method: 'get' + }) +} + +// 新增引擎维护 +export function addMaintenance(data) { + return request({ + url: '/ruleEngine/maintenance', + method: 'post', + data: data + }) +} + +// 修改引擎维护 +export function updateMaintenance(data) { + return request({ + url: '/ruleEngine/maintenance/'+data.id, + method: 'put', + data: data + }) +} + +// 删除引擎维护 +export function delMaintenance(id) { + return request({ + url: '/ruleEngine/maintenance/' + id, + method: 'delete' + }) +} diff --git a/src/components/Encoding/index.vue b/src/components/Encoding/index.vue new file mode 100644 index 0000000..5fb8795 --- /dev/null +++ b/src/components/Encoding/index.vue @@ -0,0 +1,94 @@ + + + + + + diff --git a/src/main.js b/src/main.js index 546f125..f82e3a9 100644 --- a/src/main.js +++ b/src/main.js @@ -4,7 +4,6 @@ import Cookies from 'js-cookie' import Element from 'element-ui' import './assets/styles/element-variables.scss' - import '@/assets/styles/index.scss' // global css import '@/assets/styles/muyu.scss' // muyu css import App from './App' diff --git a/src/views/dataSource/assets/OverallAssetStructure.vue b/src/views/dataSource/assets/OverallAssetStructure.vue index bde03b2..76ccc08 100644 --- a/src/views/dataSource/assets/OverallAssetStructure.vue +++ b/src/views/dataSource/assets/OverallAssetStructure.vue @@ -17,6 +17,7 @@
资产模型详细信息
+ @@ -55,13 +56,9 @@ placement="left" width="200" trigger="hover"> - - - + + + {{scope.row.dictKey}} @@ -150,15 +147,15 @@ - + - - - + + + @@ -193,6 +190,14 @@ export default { value:Object, default:{} }, + structureId:{ + value:Number, + default:0 + }, + dictionaryTypeList:{ + value:Array, + default:[] + }, childrenList:{ value:Array, default:[] @@ -202,17 +207,6 @@ export default { return { form: {}, formStatus: false, - dictMap: { - "system_sex": [ - { label: '男', val: '1', isEdit: false }, - { label: '女', val: '2', isEdit: false }, - { label: '未知', val: '0', isEdit: false }, - ], - "system_y_n": [ - { label: '是', val: '1', isEdit: false }, - { label: '否', val: '0', isEdit: false } - ], - } } }, watch:{ @@ -235,11 +229,11 @@ export default { }, created() { // this.findDataBaseByInformationId() - // this.init(); + this.init(); }, methods:{ init(){ - + console.log("123",this.dictionaryTypeList) }, update(row) { this.form = row; diff --git a/src/views/dataSource/assets/OverallSpecificAssets.vue b/src/views/dataSource/assets/OverallSpecificAssets.vue index f5eb371..362555e 100644 --- a/src/views/dataSource/assets/OverallSpecificAssets.vue +++ b/src/views/dataSource/assets/OverallSpecificAssets.vue @@ -50,7 +50,7 @@ - 确定 + 确定 新增字典 @@ -68,7 +68,7 @@ >新增 - + - + @@ -121,12 +127,22 @@ import CountTo from 'vue-count-to' import OverallAssetStructure from "@/views/dataSource/assets/OverallAssetStructure.vue"; import table from "table"; +import { + addDictionaryData, + addDictionaryType, + deleteDictionaryData, + updateDictionaryData +} from "@/api/dataSource/dictionary"; export default { props: { title: { type: String, default: "-" }, + structureId:{ + type:Object, + default:0 + }, num:{ type:Object, default:0 @@ -166,33 +182,67 @@ export default { // console.log(this.databaseTable); // }, init(){ - let rows = [ - { - tableName: "sys_user", - tableAsName: "用户表" - }, - { - tableName: "sys_dept", - tableAsName: "部门表" - }, - ]; - this.tableList = rows; - this.activeName = rows[0].tableName; + }, - editConfirm(row){ - if (!row.label || !row.val) { - this.$message.error('字典标签或字典值,不可为空'); + deleteConfirm(row){ + console.log(row) + deleteDictionaryData(row.id).then( + res=>{ + this.$message.success(res.msg); + } + ) + }, + editConfirm(item,row){ + console.log(item) + console.log(row) + + if (row.id!=null) { + updateDictionaryData(row).then( + res=>{ + this.$message.success(res.msg); + } + ) return; + }else { + let dictionaryDataList = { + dictionaryLabel:row.dictionaryLabel, + dictionaryValue:row.dictionaryValue, + dictionaryType:item.dictionaryType, + dictionaryName:item.dictionaryName, + } + addDictionaryData(dictionaryDataList).then( + res=>{ + this.$message.success(res.msg); + } + ) } - row.isEdit = false; + }, - addDict(){ + addDict(structureId,dictAddName){ + console.log(structureId) + console.log(dictAddName) if (!this.dictAddName){ this.$message.error('数据字典,不可为空'); return; } - this.dictMap[this.dictAddName] = [] - this.dictAddName = null + const dictAddNameArr= dictAddName.split(","); + const dictionaryType=dictAddNameArr[0]; + const dictionaryName=dictAddNameArr[1]; + + console.log(dictionaryType) + console.log(dictionaryName) + let dictionaryTypeList = { + structureId,dictionaryType,dictionaryName,dictAddName + } + console.log(dictionaryTypeList) + addDictionaryType(dictionaryTypeList).then( + res=>{ + this.$message.success(res.msg); + // this.dictionaryTypeList(); + } + ) + // this.dictName[this.dictName.dictionaryTypes] = [] + // this.dictName.dictionaryTypes = null }, handleSetLineChartData(type) { this.$emit('handleSetLineChartData', type) diff --git a/src/views/dataSource/assets/index.vue b/src/views/dataSource/assets/index.vue index 3f85c79..ab7609e 100644 --- a/src/views/dataSource/assets/index.vue +++ b/src/views/dataSource/assets/index.vue @@ -15,8 +15,8 @@ - - + + @@ -27,7 +27,6 @@ import OverallSpecificAssets from "@/views/dataSource/assets/OverallSpecificAsse import OverallAssets from "@/views/dataSource/assets/OverallAssets.vue"; import { findAssetStructure, findDataBaseByAssetId, findDataBaseByInformationId, findDataBaseTable, - findDataBaseTableById, findInformationById } from "@/api/dataSource/source"; import OverallAssetStructure from "@/views/dataSource/assets/OverallAssetStructure.vue"; @@ -35,7 +34,7 @@ import {findDictionaryByStructureId} from "@/api/dataSource/dictionary"; export default { name: 'assets', - components: {OverallAssetStructure, OverallSpecificAssets, OverallAssets }, + components: {OverallAssetStructure, OverallSpecificAssets, OverallAssets }, data() { return { mainHeight: window.innerHeight - 85, @@ -55,6 +54,7 @@ export default { num:0, dataTotal:0, dictionaryTypeList:[], + structureId:0, } }, created() { @@ -77,7 +77,7 @@ export default { ) findDictionaryByStructureId(data.id).then( res=>{ - console.log(data.id) + this.structureId=data.id; this.dictionaryTypeList=res.data; } ) diff --git a/src/views/rule_engine/config/index.vue b/src/views/rule_engine/config/index.vue new file mode 100644 index 0000000..b01ac4e --- /dev/null +++ b/src/views/rule_engine/config/index.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/views/rule_engine/maintenance/index.vue b/src/views/rule_engine/maintenance/index.vue new file mode 100644 index 0000000..9abcd0d --- /dev/null +++ b/src/views/rule_engine/maintenance/index.vue @@ -0,0 +1,386 @@ + + + diff --git a/src/views/rule_engine/version/index.vue b/src/views/rule_engine/version/index.vue new file mode 100644 index 0000000..bb6df07 --- /dev/null +++ b/src/views/rule_engine/version/index.vue @@ -0,0 +1,204 @@ + + + + +