Skip to content

Commit c941376

Browse files
committed
Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/visual
2 parents 4bfaa5a + 70b8537 commit c941376

File tree

40 files changed

+9435
-10092
lines changed

40 files changed

+9435
-10092
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"fuse.js": "6.4.3",
5151
"highlight.js": "9.18.5",
5252
"js-beautify": "1.13.0",
53-
"js-cookie": "3.0.1",
5453
"jsencrypt": "3.0.0-rc.1",
5554
"nprogress": "0.2.0",
5655
"quill": "1.3.7",

src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,21 @@ export default {
120120
this.bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach(n => {
121121
let activity = activityList.find(m => m.key === n.id) // 找到对应的活动
122122
if (n.$type === 'bpmn:UserTask') { // 用户任务
123-
debugger
124123
if (!activity) {
125124
return;
126125
}
127126
// 处理用户任务的高亮
128127
const task = this.taskList.find(m => m.id === activity.taskId); // 找到活动对应的 taskId
129-
if (task) {
130-
canvas.addMarker(n.id, this.getResultCss(task.result));
131-
// 如果非通过,就不走后面的线条了
132-
if (task.result !== 2) {
133-
return;
134-
}
128+
if (!task) {
129+
return;
135130
}
131+
// 高亮任务
132+
canvas.addMarker(n.id, this.getResultCss(task.result));
136133
134+
// 如果非通过,就不走后面的线条了
135+
if (task.result !== 2) {
136+
return;
137+
}
137138
// 处理 outgoing 出线
138139
const outgoing = this.getActivityOutgoing(activity);
139140
outgoing?.forEach(nn => {
@@ -219,13 +220,13 @@ export default {
219220
return activity.endTime ? 'highlight' : 'highlight-todo';
220221
},
221222
getResultCss(result) {
222-
if (result === 1) {
223+
if (result === 1) { // 审批中
223224
return 'highlight-todo';
224-
} else if (result === 2) {
225+
} else if (result === 2) { // 已通过
225226
return 'highlight';
226-
} else if (result === 3) {
227+
} else if (result === 3) { // 不通过
227228
return 'highlight-reject';
228-
} else if (result === 4) {
229+
} else if (result === 4) { // 已取消
229230
return 'highlight-cancel';
230231
}
231232
return '';

src/main.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import Vue from 'vue'
22

3-
import Cookies from 'js-cookie'
4-
53
import Element from 'element-ui'
64
import './assets/styles/element-variables.scss'
75

@@ -18,7 +16,7 @@ import './permission' // permission control
1816
import './tongji' // 百度统计
1917
import { getDicts } from "@/api/system/dict/data";
2018
import { getConfigKey } from "@/api/infra/config";
21-
import { parseTime, resetForm, addDateRange, addBeginAndEndTime, handleTree} from "@/utils/ruoyi";
19+
import { parseTime, resetForm, handleTree} from "@/utils/ruoyi";
2220
import Pagination from "@/components/Pagination";
2321
// 自定义表格工具扩展
2422
import RightToolbar from "@/components/RightToolbar"
@@ -32,8 +30,6 @@ Vue.prototype.getDicts = getDicts
3230
Vue.prototype.getConfigKey = getConfigKey
3331
Vue.prototype.parseTime = parseTime
3432
Vue.prototype.resetForm = resetForm
35-
Vue.prototype.addDateRange = addDateRange
36-
Vue.prototype.addBeginAndEndTime = addBeginAndEndTime
3733
Vue.prototype.getDictDatas = getDictDatas
3834
Vue.prototype.getDictDatas2 = getDictDatas2
3935
Vue.prototype.getDictDataLabel = getDictDataLabel
@@ -84,8 +80,8 @@ import '@/styles/index.scss'
8480
*/
8581

8682
Vue.use(Element, {
87-
size: Cookies.get('size') || 'medium' // set element-ui default size
88-
})
83+
size: localStorage.getItem("size") || "medium", // set element-ui default size
84+
});
8985

9086
Vue.config.productionTip = false
9187

src/store/modules/app.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
import Cookies from 'js-cookie'
2-
31
const state = {
42
sidebar: {
5-
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
3+
opened: localStorage.getItem("sidebarStatus")
4+
? !!+localStorage.getItem("sidebarStatus")
5+
: true,
66
withoutAnimation: false,
7-
hide: false
7+
hide: false,
88
},
9-
device: 'desktop',
10-
size: Cookies.get('size') || 'medium'
11-
}
9+
device: "desktop",
10+
size: localStorage.getItem("size") || "medium",
11+
};
1212

1313
const mutations = {
14-
TOGGLE_SIDEBAR: state => {
14+
TOGGLE_SIDEBAR: (state) => {
1515
if (state.sidebar.hide) {
1616
return false;
1717
}
18-
state.sidebar.opened = !state.sidebar.opened
19-
state.sidebar.withoutAnimation = false
18+
state.sidebar.opened = !state.sidebar.opened;
19+
state.sidebar.withoutAnimation = false;
2020
if (state.sidebar.opened) {
21-
Cookies.set('sidebarStatus', 1)
21+
localStorage.setItem("sidebarStatus", 1);
2222
} else {
23-
Cookies.set('sidebarStatus', 0)
23+
localStorage.setItem("sidebarStatus", 0);
2424
}
2525
},
2626
CLOSE_SIDEBAR: (state, withoutAnimation) => {
27-
Cookies.set('sidebarStatus', 0)
28-
state.sidebar.opened = false
29-
state.sidebar.withoutAnimation = withoutAnimation
27+
localStorage.setItem("sidebarStatus", 0);
28+
state.sidebar.opened = false;
29+
state.sidebar.withoutAnimation = withoutAnimation;
3030
},
3131
TOGGLE_DEVICE: (state, device) => {
32-
state.device = device
32+
state.device = device;
3333
},
3434
SET_SIZE: (state, size) => {
35-
state.size = size
36-
Cookies.set('size', size)
35+
state.size = size;
36+
localStorage.setItem("size", size);
3737
},
3838
SET_SIDEBAR_HIDE: (state, status) => {
39-
state.sidebar.hide = status
40-
}
41-
}
39+
state.sidebar.hide = status;
40+
},
41+
};
4242

4343
const actions = {
4444
toggleSideBar({ commit }) {
45-
commit('TOGGLE_SIDEBAR')
45+
commit("TOGGLE_SIDEBAR");
4646
},
4747
closeSideBar({ commit }, { withoutAnimation }) {
48-
commit('CLOSE_SIDEBAR', withoutAnimation)
48+
commit("CLOSE_SIDEBAR", withoutAnimation);
4949
},
5050
toggleDevice({ commit }, device) {
51-
commit('TOGGLE_DEVICE', device)
51+
commit("TOGGLE_DEVICE", device);
5252
},
5353
setSize({ commit }, size) {
54-
commit('SET_SIZE', size)
54+
commit("SET_SIZE", size);
5555
},
5656
toggleSideBarHide({ commit }, status) {
57-
commit('SET_SIDEBAR_HIDE', status)
58-
}
59-
}
57+
commit("SET_SIDEBAR_HIDE", status);
58+
},
59+
};
6060

6161
export default {
6262
namespaced: true,
6363
state,
6464
mutations,
65-
actions
66-
}
65+
actions,
66+
};

src/views/bpm/group/index.vue

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
:key="dict.value" :label="dict.label" :value="dict.value"/>
1414
</el-select>
1515
</el-form-item>
16-
<el-form-item label="创建时间">
17-
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
18-
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
16+
<el-form-item label="创建时间" prop="createTime">
17+
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
18+
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
1919
</el-form-item>
2020
<el-form-item>
2121
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@@ -121,14 +121,14 @@ export default {
121121
title: "",
122122
// 是否显示弹出层
123123
open: false,
124-
dateRangeCreateTime: [],
125124
// 查询参数
126125
queryParams: {
127126
pageNo: 1,
128127
pageSize: 10,
129128
name: null,
130129
status: null,
131130
tenantId: null,
131+
createTime: []
132132
},
133133
// 表单参数
134134
form: {},
@@ -152,11 +152,8 @@ export default {
152152
/** 查询列表 */
153153
getList() {
154154
this.loading = true;
155-
// 处理查询参数
156-
let params = {...this.queryParams};
157-
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
158155
// 执行查询
159-
getUserGroupPage(params).then(response => {
156+
getUserGroupPage(this.queryParams).then(response => {
160157
this.list = response.data.list;
161158
this.total = response.data.total;
162159
this.loading = false;
@@ -185,7 +182,6 @@ export default {
185182
},
186183
/** 重置按钮操作 */
187184
resetQuery() {
188-
this.dateRangeCreateTime = [];
189185
this.resetForm("queryForm");
190186
this.handleQuery();
191187
},

src/views/bpm/oa/leave/index.vue

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<el-option v-for="dict in leaveTypeDictData" :key="dict.value" :label="dict.label" :value="dict.value" />
1010
</el-select>
1111
</el-form-item>
12-
<el-form-item label="申请时间">
13-
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
14-
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
12+
<el-form-item label="申请时间" prop="createTime">
13+
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
14+
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
1515
</el-form-item>
1616
<el-form-item label="结果" prop="result">
1717
<el-select v-model="queryParams.result" placeholder="请选择流结果" clearable>
@@ -102,15 +102,14 @@ export default {
102102
total: 0,
103103
// 请假申请列表
104104
list: [],
105-
//审批进度弹出层
106-
dateRangeCreateTime: [],
107105
// 查询参数
108106
queryParams: {
109107
pageNo: 1,
110108
pageSize: 10,
111109
result: null,
112110
type: null,
113111
reason: null,
112+
createTime: []
114113
},
115114
116115
leaveTypeDictData: getDictDatas(DICT_TYPE.BPM_OA_LEAVE_TYPE),
@@ -124,11 +123,8 @@ export default {
124123
/** 查询列表 */
125124
getList() {
126125
this.loading = true;
127-
// 处理查询参数
128-
let params = {...this.queryParams};
129-
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
130126
// 执行查询
131-
getLeavePage(params).then(response => {
127+
getLeavePage(this.queryParams).then(response => {
132128
this.list = response.data.list;
133129
this.total = response.data.total;
134130
this.loading = false;
@@ -141,7 +137,6 @@ export default {
141137
},
142138
/** 重置按钮操作 */
143139
resetQuery() {
144-
this.dateRangeCreateTime = [];
145140
this.resetForm("queryForm");
146141
this.handleQuery();
147142
},

src/views/bpm/processInstance/detail.vue

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<el-col v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 10"
3636
:span="16" :offset="6">
3737
<div >
38-
<parser :key="new Date().getTime()" :form-conf="detailForm" @submit="submitForm" />
38+
<parser :key="new Date().getTime()" :form-conf="detailForm" />
3939
</div>
4040
</el-col>
4141
<div v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 20">
@@ -45,6 +45,8 @@
4545
</router-link>
4646
</div>
4747
</el-card>
48+
49+
<!-- 审批记录 -->
4850
<el-card class="box-card" v-loading="tasksLoad">
4951
<div slot="header" class="clearfix">
5052
<span class="el-icon-picture-outline">审批记录</span>
@@ -290,31 +292,6 @@ export default {
290292
// 这里暂时无需加载流程图,因为跳出到另外个 Tab;
291293
}
292294
},
293-
/** 提交按钮 */
294-
submitForm(params) {
295-
if (!params) {
296-
return;
297-
}
298-
// 设置表单禁用
299-
const conf = params.conf;
300-
conf.disabled = true; // 表单禁用
301-
conf.formBtns = false; // 按钮隐藏
302-
303-
// 提交表单,创建流程
304-
const variables = params.values;
305-
createProcessInstance({
306-
processDefinitionId: this.selectProcessInstance.id,
307-
variables: variables
308-
}).then(response => {
309-
this.$modal.msgSuccess("发起流程成功");
310-
// 关闭当前窗口
311-
this.$tab.closeOpenPage();
312-
this.$router.go(-1);
313-
}).catch(() => {
314-
conf.disabled = false; // 表单开启
315-
conf.formBtns = true; // 按钮展示
316-
})
317-
},
318295
getDateStar(ms) {
319296
return getDate(ms);
320297
},

src/views/bpm/processInstance/index.vue

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
:key="dict.value" :label="dict.label" :value="dict.value"/>
1717
</el-select>
1818
</el-form-item>
19-
<el-form-item label="提交时间">
20-
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
21-
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
19+
<el-form-item label="提交时间" prop="createTime">
20+
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
21+
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
2222
</el-form-item>
2323
<el-form-item label="状态" prop="status">
2424
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
@@ -116,8 +116,6 @@ export default {
116116
total: 0,
117117
// 工作流的流程实例的拓展列表
118118
list: [],
119-
// 是否显示弹出层
120-
dateRangeCreateTime: [],
121119
// 查询参数
122120
queryParams: {
123121
pageNo: 1,
@@ -127,6 +125,7 @@ export default {
127125
category: null,
128126
status: null,
129127
result: null,
128+
createTime: []
130129
}
131130
};
132131
},
@@ -137,11 +136,8 @@ export default {
137136
/** 查询列表 */
138137
getList() {
139138
this.loading = true;
140-
// 处理查询参数
141-
let params = {...this.queryParams};
142-
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
143139
// 执行查询
144-
getMyProcessInstancePage(params).then(response => {
140+
getMyProcessInstancePage(this.queryParams).then(response => {
145141
this.list = response.data.list;
146142
this.total = response.data.total;
147143
this.loading = false;
@@ -154,7 +150,6 @@ export default {
154150
},
155151
/** 重置按钮操作 */
156152
resetQuery() {
157-
this.dateRangeCreateTime = [];
158153
this.resetForm("queryForm");
159154
this.handleQuery();
160155
},

0 commit comments

Comments
 (0)