diff --git a/src/api/anno/anncmntDev.js b/src/api/anno/anncmntDev.js new file mode 100644 index 0000000..b8118d5 --- /dev/null +++ b/src/api/anno/anncmntDev.js @@ -0,0 +1,32 @@ +import axios from "@/utils/request"; + +export function list(query) { + return axios({ + url: "/anno/anncmnt/dev/list", + method: "get", + params: query + }); +} + + +// 保存 +export function savegg(data, formName, method = "post") { + let url = + formName !== "edit" + ? "/anno/anncmnt/dev/save" + : "/anno/anncmnt/dev/edit"; + return axios({ + url: url, + method: method, + data: data + }); +} + +// 删除 +export function deletegg(data) { + return axios({ + url: "/anno/anncmnt/dev/delete", + method: "post", + data: data + }); +} diff --git a/src/api/system/sysCustomConfig.js b/src/api/system/sysCustomConfig.js new file mode 100644 index 0000000..396f492 --- /dev/null +++ b/src/api/system/sysCustomConfig.js @@ -0,0 +1,41 @@ +import axios from "@/utils/request"; + +export function list(query) { + return axios({ + url: "/system/custom/config/list", + method: "get", + params: query + }); +} + + +// 保存 +export function saveCustomConfig(data, formName, method = "post") { + let url = + formName !== "edit" + ? "/system/custom/config/save" + : "/system/custom/config/edit"; + return axios({ + url: url, + method: method, + data: data + }); +} + +// 删除 +export function devCustomConfig(data) { + return axios({ + url: "/system/custom/config/delete", + method: "post", + data: data + }); +} + + +export function getConfigs(query) { + return axios({ + url: "/system/custom/config/getConfigs", + method: "post", + data: query + }); +} diff --git a/src/api/system/sysCustomConfigDetail.js b/src/api/system/sysCustomConfigDetail.js new file mode 100644 index 0000000..28505ea --- /dev/null +++ b/src/api/system/sysCustomConfigDetail.js @@ -0,0 +1,32 @@ +import axios from "@/utils/request"; + +export function list(query) { + return axios({ + url: "/system/custom/configDetail/list", + method: "get", + params: query + }); +} + + +// 保存 +export function saveCustomConfig(data, formName, method = "post") { + let url = + formName !== "edit" + ? "/system/custom/configDetail/save" + : "/system/custom/configDetail/edit"; + return axios({ + url: url, + method: method, + data: data + }); +} + +// 删除 +export function devCustomConfig(data) { + return axios({ + url: "/system/custom/configDetail/delete", + method: "post", + data: data + }); +} diff --git a/src/utils/customConfig.js b/src/utils/customConfig.js new file mode 100644 index 0000000..ea087af --- /dev/null +++ b/src/utils/customConfig.js @@ -0,0 +1,100 @@ +import {getConfigs} from "@/api/system/sysCustomConfig"; +import {Message} from "element-ui"; +function getColer(item,value){ + const colorRule = item.colorRule; + if(colorRule && colorRule.indexOf(",") != -1){ + var arr = colorRule.split("|"); + var reColor = ""; + arr.some(s => { + var arrTemp = s.split(","); + const type = arrTemp[0] + const valueT = arrTemp[1] + const color = arrTemp[2] + if(type == "=" && value == valueT){ + reColor = color; + }else if(type == ">=" && value >= valueT){ + reColor = color; + }else if(type == ">" && value > valueT){ + reColor = color; + }else if(type == "<" && value < valueT){ + reColor = color; + }else if(type == "<=" && value <= valueT){ + reColor = color; + } else if(type == "0"){ + reColor = color; + } + }) + return reColor; + }else{ + return colorRule; + } +} + + +export async function getHead(businessType,type){ + try { + var subData = {}; + subData.businessType = businessType; + subData.type = type; + const re = await getConfigs(subData); + if(re.code != 20000){ + Message.error("获取配置失败"); + } + return re; + } catch (error) { + console.error(error); + } +} + + +export function executeFuc(_this,row,type,clickFuc,obj){ + // 0 列表点击事件 1 列表页按钮事件 2 编辑页表单事件 3 列表页复选框事件 4列表页颜色方法 5列表查询框方法 + if("1" == type){ + //列表页按钮事件 + return callModelFun(_this,clickFuc,row); + }else if("4" == type){ + //列表页颜色方法 + if(clickFuc) { + return getColer(clickFuc, obj); + } + }else if("5" == type){ + //列表查询条件查询input方法 + if(clickFuc){ + return callModelFun(_this,clickFuc,row); + }else{ + return false; + } + }else if("2" == type){ + if(clickFuc){ + //编辑页表单事件 + return callModelFun(_this,clickFuc,row); + }else{ + return true; + } + }else if("3" == type){ + //列表页复选框事件 + if(clickFuc){ + return callModelFun(_this,clickFuc,row); + }else{ + return true; + } + }else if("0" == type){ + //表单点击事件 + if(clickFuc){ + return callModelFun(_this,clickFuc,row); + } + return true; + } +} + + +/** + * 根据方法名称调用方法 + */ +function callModelFun(_this,funcName,row) { + let methods = _this.$options.methods; + // 解释说明一下, this需要传入目标方法, 否则,在目标方法中修改data中的值, 将不会重新渲染dom, 跟v-if结合使用的过程中需要注意 + return methods[funcName](_this,row); +} + + diff --git a/src/views/anno/anncmntDev/index.vue b/src/views/anno/anncmntDev/index.vue new file mode 100644 index 0000000..6c27f96 --- /dev/null +++ b/src/views/anno/anncmntDev/index.vue @@ -0,0 +1,368 @@ + + + + + + + diff --git a/src/views/anno/anncmntDev/indexDialog.vue b/src/views/anno/anncmntDev/indexDialog.vue new file mode 100644 index 0000000..541c07d --- /dev/null +++ b/src/views/anno/anncmntDev/indexDialog.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/src/views/system/customConfig/configDetail.vue b/src/views/system/customConfig/configDetail.vue new file mode 100644 index 0000000..072f332 --- /dev/null +++ b/src/views/system/customConfig/configDetail.vue @@ -0,0 +1,616 @@ + + + diff --git a/src/views/system/customConfig/configFromDetail.vue b/src/views/system/customConfig/configFromDetail.vue new file mode 100644 index 0000000..9d23b72 --- /dev/null +++ b/src/views/system/customConfig/configFromDetail.vue @@ -0,0 +1,517 @@ + + + diff --git a/src/views/system/customConfig/configQueryDetail.vue b/src/views/system/customConfig/configQueryDetail.vue new file mode 100644 index 0000000..8483b4c --- /dev/null +++ b/src/views/system/customConfig/configQueryDetail.vue @@ -0,0 +1,475 @@ + + + diff --git a/src/views/system/customConfig/index.vue b/src/views/system/customConfig/index.vue new file mode 100644 index 0000000..1f0ef6b --- /dev/null +++ b/src/views/system/customConfig/index.vue @@ -0,0 +1,324 @@ + + +