From 0d6031d9c09dfccc879a76d18b41f58690773bb1 Mon Sep 17 00:00:00 2001 From: smallchill Date: Tue, 3 Dec 2019 17:00:20 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E6=8B=86=E5=88=86=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E5=92=8C=E4=B8=9A=E5=8A=A1=E5=AD=97=E5=85=B8?= =?UTF-8?q?,=E5=AD=97=E5=85=B8=E7=AE=A1=E7=90=86=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E4=B8=BA=E5=B7=A6=E5=8F=B3=E8=A1=A8=E5=BD=A2=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/api/system/dict.js | 2 +- src/api/system/dictbiz.js | 89 +++++ src/const/system/dict.js | 208 ++++++++++ src/const/system/dictbiz.js | 208 ++++++++++ src/page/index/top/top-lock.vue | 2 +- src/views/flow/follow.vue | 2 +- src/views/monitor/log/api.vue | 2 +- src/views/monitor/log/error.vue | 4 +- src/views/monitor/log/usual.vue | 2 +- src/views/system/dept.vue | 36 +- src/views/system/dict.vue | 491 ++++++++++++++---------- src/views/system/dictbiz.vue | 432 +++++++++++++++++++++ src/views/util/cache.vue | 2 +- src/views/util/demo/dict-classic.vue | 361 +++++++++++++++++ src/views/util/table.vue | 2 +- src/views/work/process/leave/detail.vue | 8 +- src/views/work/process/leave/handle.vue | 10 +- yarn.lock | 10 +- 19 files changed, 1639 insertions(+), 234 deletions(-) create mode 100644 src/api/system/dictbiz.js create mode 100644 src/const/system/dict.js create mode 100644 src/const/system/dictbiz.js create mode 100644 src/views/system/dictbiz.vue create mode 100644 src/views/util/demo/dict-classic.vue diff --git a/package.json b/package.json index 9f4c6f8..e6254f0 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@vue/cli-plugin-eslint": "^3.1.5", "@vue/cli-service": "^3.1.4", "chai": "^4.1.2", - "node-sass": "^4.9.0", + "node-sass": "^4.10.0", "sass-loader": "^7.0.1", "vue-template-compiler": "^2.5.17", "webpack-bundle-analyzer": "^3.0.3" diff --git a/src/api/system/dict.js b/src/api/system/dict.js index 96e42dc..183ed0c 100644 --- a/src/api/system/dict.js +++ b/src/api/system/dict.js @@ -32,7 +32,7 @@ export const getChildList = (current, size, parentId, params) => { ...params, current, size, - parentId, + parentId_equal: parentId, } }) } diff --git a/src/api/system/dictbiz.js b/src/api/system/dictbiz.js new file mode 100644 index 0000000..fa3c8ab --- /dev/null +++ b/src/api/system/dictbiz.js @@ -0,0 +1,89 @@ +import request from '@/router/axios'; + +export const getList = (current, size, params) => { + return request({ + url: '/api/blade-system/dict-biz/list', + method: 'get', + params: { + ...params, + current, + size, + } + }) +} + +export const getParentList = (current, size, params) => { + return request({ + url: '/api/blade-system/dict-biz/parent-list', + method: 'get', + params: { + ...params, + current, + size, + } + }) +} + +export const getChildList = (current, size, parentId, params) => { + return request({ + url: '/api/blade-system/dict-biz/child-list', + method: 'get', + params: { + ...params, + current, + size, + parentId_equal: parentId, + } + }) +} + +export const remove = (ids) => { + return request({ + url: '/api/blade-system/dict-biz/remove', + method: 'post', + params: { + ids, + } + }) +} + +export const add = (row) => { + return request({ + url: '/api/blade-system/dict-biz/submit', + method: 'post', + data: row + }) +} + +export const update = (row) => { + return request({ + url: '/api/blade-system/dict-biz/submit', + method: 'post', + data: row + }) +} + + +export const getDict = (id) => { + return request({ + url: '/api/blade-system/dict-biz/detail', + method: 'get', + params: { + id, + } + }) +} +export const getDictTree = () => { + return request({ + url: '/api/blade-system/dict-biz/tree?code=DICT', + method: 'get' + }) +} + +export const getDictionary = (params) => { + return request({ + url: '/api/blade-system/dict-biz/dictionary', + method: 'get', + params, + }) +} diff --git a/src/const/system/dict.js b/src/const/system/dict.js new file mode 100644 index 0000000..531ab9e --- /dev/null +++ b/src/const/system/dict.js @@ -0,0 +1,208 @@ +export const optionParent = { + height: 'auto', + calcHeight: 365, + tip: false, + tree: true, + border: true, + index: true, + selection: true, + viewBtn: true, + searchShow: false, + menuWidth: 150, + dialogWidth: 880, + dialogHeight: 320, + column: [ + { + label: "字典编号", + prop: "code", + search: true, + span: 24, + rules: [ + { + required: true, + message: "请输入字典编号", + trigger: "blur" + } + ] + }, + { + label: "字典名称", + prop: "dictValue", + search: true, + align: "center", + rules: [ + { + required: true, + message: "请输入字典名称", + trigger: "blur" + } + ] + }, + { + label: "字典排序", + prop: "sort", + type: "number", + align: "right", + width: 80, + rules: [ + { + required: true, + message: "请输入字典排序", + trigger: "blur" + } + ] + }, + { + label: "是否封存", + prop: "isSealed", + type: "select", + align: "center", + width: 80, + dicData: [ + { + label: "否", + value: 0 + }, + { + label: "是", + value: 1 + } + ], + valueDefault: 0, + slot: true, + rules: [ + { + required: true, + message: "请选择是否封存", + trigger: "blur" + } + ] + }, + { + label: "字典备注", + prop: "remark", + hide: true + } + ] +}; + +export const optionChild = { + height: 'auto', + calcHeight: 365, + tip: false, + tree: true, + border: true, + index: true, + selection: true, + viewBtn: true, + searchShow: false, + menuWidth: 150, + dialogWidth: 880, + dialogHeight: 320, + column: [ + { + label: "字典编号", + prop: "code", + addDisabled: true, + editDisabled: true, + search: true, + span: 24, + rules: [ + { + required: true, + message: "请输入字典编号", + trigger: "blur" + } + ] + }, + { + label: "字典名称", + prop: "dictValue", + search: true, + align: "center", + rules: [ + { + required: true, + message: "请输入字典名称", + trigger: "blur" + } + ] + }, + { + label: "上级字典", + prop: "parentId", + type: "tree", + dicData: [], + hide: true, + props: { + label: "title" + }, + addDisabled: true, + editDisabled: true, + rules: [ + { + required: false, + message: "请选择上级字典", + trigger: "click" + } + ] + }, + { + label: "字典键值", + prop: "dictKey", + width: 80, + rules: [ + { + required: true, + message: "请输入字典键值", + trigger: "blur" + } + ] + }, + { + label: "字典排序", + prop: "sort", + type: "number", + align: "right", + width: 80, + rules: [ + { + required: true, + message: "请输入字典排序", + trigger: "blur" + } + ] + }, + { + label: "是否封存", + prop: "isSealed", + type: "select", + align: "center", + width: 80, + dicData: [ + { + label: "否", + value: 0 + }, + { + label: "是", + value: 1 + } + ], + valueDefault: 0, + slot: true, + rules: [ + { + required: true, + message: "请选择是否封存", + trigger: "blur" + } + ] + }, + { + label: "字典备注", + prop: "remark", + hide: true + } + ] +}; diff --git a/src/const/system/dictbiz.js b/src/const/system/dictbiz.js new file mode 100644 index 0000000..531ab9e --- /dev/null +++ b/src/const/system/dictbiz.js @@ -0,0 +1,208 @@ +export const optionParent = { + height: 'auto', + calcHeight: 365, + tip: false, + tree: true, + border: true, + index: true, + selection: true, + viewBtn: true, + searchShow: false, + menuWidth: 150, + dialogWidth: 880, + dialogHeight: 320, + column: [ + { + label: "字典编号", + prop: "code", + search: true, + span: 24, + rules: [ + { + required: true, + message: "请输入字典编号", + trigger: "blur" + } + ] + }, + { + label: "字典名称", + prop: "dictValue", + search: true, + align: "center", + rules: [ + { + required: true, + message: "请输入字典名称", + trigger: "blur" + } + ] + }, + { + label: "字典排序", + prop: "sort", + type: "number", + align: "right", + width: 80, + rules: [ + { + required: true, + message: "请输入字典排序", + trigger: "blur" + } + ] + }, + { + label: "是否封存", + prop: "isSealed", + type: "select", + align: "center", + width: 80, + dicData: [ + { + label: "否", + value: 0 + }, + { + label: "是", + value: 1 + } + ], + valueDefault: 0, + slot: true, + rules: [ + { + required: true, + message: "请选择是否封存", + trigger: "blur" + } + ] + }, + { + label: "字典备注", + prop: "remark", + hide: true + } + ] +}; + +export const optionChild = { + height: 'auto', + calcHeight: 365, + tip: false, + tree: true, + border: true, + index: true, + selection: true, + viewBtn: true, + searchShow: false, + menuWidth: 150, + dialogWidth: 880, + dialogHeight: 320, + column: [ + { + label: "字典编号", + prop: "code", + addDisabled: true, + editDisabled: true, + search: true, + span: 24, + rules: [ + { + required: true, + message: "请输入字典编号", + trigger: "blur" + } + ] + }, + { + label: "字典名称", + prop: "dictValue", + search: true, + align: "center", + rules: [ + { + required: true, + message: "请输入字典名称", + trigger: "blur" + } + ] + }, + { + label: "上级字典", + prop: "parentId", + type: "tree", + dicData: [], + hide: true, + props: { + label: "title" + }, + addDisabled: true, + editDisabled: true, + rules: [ + { + required: false, + message: "请选择上级字典", + trigger: "click" + } + ] + }, + { + label: "字典键值", + prop: "dictKey", + width: 80, + rules: [ + { + required: true, + message: "请输入字典键值", + trigger: "blur" + } + ] + }, + { + label: "字典排序", + prop: "sort", + type: "number", + align: "right", + width: 80, + rules: [ + { + required: true, + message: "请输入字典排序", + trigger: "blur" + } + ] + }, + { + label: "是否封存", + prop: "isSealed", + type: "select", + align: "center", + width: 80, + dicData: [ + { + label: "否", + value: 0 + }, + { + label: "是", + value: 1 + } + ], + valueDefault: 0, + slot: true, + rules: [ + { + required: true, + message: "请选择是否封存", + trigger: "blur" + } + ] + }, + { + label: "字典备注", + prop: "remark", + hide: true + } + ] +}; diff --git a/src/page/index/top/top-lock.vue b/src/page/index/top/top-lock.vue index 48ff32c..bbc9132 100644 --- a/src/page/index/top/top-lock.vue +++ b/src/page/index/top/top-lock.vue @@ -13,7 +13,7 @@ prop="passwd" :rules="[{ required: true, message: '锁屏密码不能为空'}]"> + placeholder="请输入锁屏密码" /> + placeholder="请输入删除理由" /> { + getApiLogs(this.form.id).then(res => { this.form = res.data.data; }); } diff --git a/src/views/monitor/log/error.vue b/src/views/monitor/log/error.vue index babcac5..76777a9 100644 --- a/src/views/monitor/log/error.vue +++ b/src/views/monitor/log/error.vue @@ -56,7 +56,7 @@ label: "服务host", prop: "serverHost", search: true, - width:'120' + width:'150' }, { label: "服务ip", @@ -129,7 +129,7 @@ }, beforeOpen(done, type) { if (["edit", "view"].includes(type)) { - getErrorLogs(this.form.strId).then(res => { + getErrorLogs(this.form.id).then(res => { this.form = res.data.data; }); } diff --git a/src/views/monitor/log/usual.vue b/src/views/monitor/log/usual.vue index f944673..52e65b6 100644 --- a/src/views/monitor/log/usual.vue +++ b/src/views/monitor/log/usual.vue @@ -121,7 +121,7 @@ }, beforeOpen(done, type) { if (["edit", "view"].includes(type)) { - getUsualLogs(this.form.strId).then(res => { + getUsualLogs(this.form.id).then(res => { this.form = res.data.data; }); } diff --git a/src/views/system/dept.vue b/src/views/system/dept.vue index 582ec54..340763d 100644 --- a/src/views/system/dept.vue +++ b/src/views/system/dept.vue @@ -7,6 +7,7 @@ v-model="form" :permission="permissionList" :before-open="beforeOpen" + :before-close="beforeClose" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave" @@ -26,6 +27,15 @@ @click="handleDelete">删 除 + diff --git a/src/views/work/process/leave/detail.vue b/src/views/work/process/leave/detail.vue index f40abb1..19fd29d 100644 --- a/src/views/work/process/leave/detail.vue +++ b/src/views/work/process/leave/detail.vue @@ -11,22 +11,22 @@ 审批信息 - + - + - + - + diff --git a/src/views/work/process/leave/handle.vue b/src/views/work/process/leave/handle.vue index bff30e0..20d7ead 100644 --- a/src/views/work/process/leave/handle.vue +++ b/src/views/work/process/leave/handle.vue @@ -13,25 +13,25 @@ 审批信息 - + - + - + - + - + diff --git a/yarn.lock b/yarn.lock index 2e489ef..7951140 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5521,10 +5521,10 @@ node-releases@^1.1.25: dependencies: semver "^5.3.0" -node-sass@^4.9.0: - version "4.12.0" - resolved "https://registry.npm.taobao.org/node-sass/download/node-sass-4.12.0.tgz#0914f531932380114a30cc5fa4fa63233a25f017" - integrity sha1-CRT1MZMjgBFKMMxfpPpjIzol8Bc= +node-sass@^4.10.0: + version "4.13.0" + resolved "https://registry.npm.taobao.org/node-sass/download/node-sass-4.13.0.tgz?cache=0&sync_timestamp=1571899943857&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-sass%2Fdownload%2Fnode-sass-4.13.0.tgz#b647288babdd6a1cb726de4545516b31f90da066" + integrity sha1-tkcoi6vdahy3Jt5FRVFrMfkNoGY= dependencies: async-foreach "^0.1.3" chalk "^1.1.1" @@ -5533,7 +5533,7 @@ node-sass@^4.9.0: get-stdin "^4.0.1" glob "^7.0.3" in-publish "^2.0.0" - lodash "^4.17.11" + lodash "^4.17.15" meow "^3.7.0" mkdirp "^0.5.1" nan "^2.13.2"