Compare commits
7
Commits
629f966037
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b049e2d6a | ||
|
|
8497918a5b | ||
|
|
d3800d7905 | ||
|
|
fe4951260c | ||
|
|
944274011e | ||
|
|
b8c7337aa4 | ||
|
|
44e3eee6d1 |
@@ -16,13 +16,18 @@ export const getProcessTypes = () => {
|
|||||||
* 对应接口: GET /blade-zhaocai/zcProcess/getPageList
|
* 对应接口: GET /blade-zhaocai/zcProcess/getPageList
|
||||||
*/
|
*/
|
||||||
export const getTodoList = (current, size, params) => {
|
export const getTodoList = (current, size, params) => {
|
||||||
|
const { keyWord, processName, processId, userCode, ...rest } = params;
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-zhaocai/zcProcess/getPageList',
|
url: '/blade-zhaocai/zcProcess/getPageList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...rest,
|
||||||
pageNo: current,
|
pageNo: current,
|
||||||
pageSize: size,
|
pageSize: size,
|
||||||
|
keyWord: keyWord || '',
|
||||||
|
processName: processName || '',
|
||||||
|
processId: processId || '',
|
||||||
|
userCode: userCode || '',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -32,13 +37,18 @@ export const getTodoList = (current, size, params) => {
|
|||||||
* 对应接口: GET /blade-zhaocai/zcProcess/getDonePageList
|
* 对应接口: GET /blade-zhaocai/zcProcess/getDonePageList
|
||||||
*/
|
*/
|
||||||
export const getDoneList = (current, size, params) => {
|
export const getDoneList = (current, size, params) => {
|
||||||
|
const { keyWord, processName, processId, userCode, ...rest } = params;
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-zhaocai/zcProcess/getDonePageList',
|
url: '/blade-zhaocai/zcProcess/getDonePageList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...rest,
|
||||||
pageNo: current,
|
pageNo: current,
|
||||||
pageSize: size,
|
pageSize: size,
|
||||||
|
keyWord: keyWord || '',
|
||||||
|
processName: processName || '',
|
||||||
|
processId: processId || '',
|
||||||
|
userCode: userCode || '',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -48,13 +58,18 @@ export const getDoneList = (current, size, params) => {
|
|||||||
* 对应接口: GET /blade-zhaocai/zcProcess/getAppliedPageList
|
* 对应接口: GET /blade-zhaocai/zcProcess/getAppliedPageList
|
||||||
*/
|
*/
|
||||||
export const getMyList = (current, size, params) => {
|
export const getMyList = (current, size, params) => {
|
||||||
|
const { keyWord, processName, processId, userCode, ...rest } = params;
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-zhaocai/zcProcess/getAppliedPageList',
|
url: '/blade-zhaocai/zcProcess/getAppliedPageList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
...params,
|
...rest,
|
||||||
pageNo: current,
|
pageNo: current,
|
||||||
pageSize: size,
|
pageSize: size,
|
||||||
|
keyWord: keyWord || '',
|
||||||
|
processName: processName || '',
|
||||||
|
processId: processId || '',
|
||||||
|
userCode: userCode || '',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -90,7 +90,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDoneList, getDetail } from '@/api/workflow';
|
import { getDoneList, getDetail, getProcessTypes } from '@/api/workflow';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -105,6 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
query: {},
|
query: {},
|
||||||
data: [],
|
data: [],
|
||||||
|
processTypes: [],
|
||||||
// 流转弹窗
|
// 流转弹窗
|
||||||
transferDialogVisible: false,
|
transferDialogVisible: false,
|
||||||
currentProcessName: '',
|
currentProcessName: '',
|
||||||
@@ -126,11 +128,25 @@ export default {
|
|||||||
menuWidth: 150,
|
menuWidth: 150,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
|
{
|
||||||
|
label: '关键字',
|
||||||
|
prop: 'keyWord',
|
||||||
|
search: true,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '流程名称',
|
label: '流程名称',
|
||||||
prop: 'processName',
|
prop: 'processName',
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '流程Key',
|
||||||
|
prop: 'processId',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
hide: true,
|
||||||
|
dicData: [],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '申请人',
|
label: '申请人',
|
||||||
prop: 'tCreateUser',
|
prop: 'tCreateUser',
|
||||||
@@ -150,7 +166,26 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.loadProcessTypes();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadProcessTypes() {
|
||||||
|
getProcessTypes().then(res => {
|
||||||
|
const data = res.data.data;
|
||||||
|
this.processTypes = data.map(item => ({
|
||||||
|
label: item.processName,
|
||||||
|
value: item.processId,
|
||||||
|
}));
|
||||||
|
const processIdColumn = this.option.column.find(item => item.prop === 'processId');
|
||||||
|
if (processIdColumn) {
|
||||||
|
processIdColumn.dicData = this.processTypes;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
@@ -175,6 +210,8 @@ export default {
|
|||||||
const query = {
|
const query = {
|
||||||
...this.query,
|
...this.query,
|
||||||
...params,
|
...params,
|
||||||
|
userCode: this.userInfo.account,
|
||||||
|
processName: '',
|
||||||
};
|
};
|
||||||
getDoneList(page.currentPage, page.pageSize, query).then(res => {
|
getDoneList(page.currentPage, page.pageSize, query).then(res => {
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
|
|||||||
@@ -97,6 +97,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getMyList, getProcessTypes } from '@/api/workflow';
|
import { getMyList, getProcessTypes } from '@/api/workflow';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
import { Document } from '@element-plus/icons-vue';
|
import { Document } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -122,7 +123,7 @@ export default {
|
|||||||
height: 'auto',
|
height: 'auto',
|
||||||
calcHeight: 32,
|
calcHeight: 32,
|
||||||
tip: false,
|
tip: false,
|
||||||
searchShow: false,
|
searchShow: true,
|
||||||
searchMenuSpan: 6,
|
searchMenuSpan: 6,
|
||||||
border: true,
|
border: true,
|
||||||
index: true,
|
index: true,
|
||||||
@@ -134,25 +135,30 @@ export default {
|
|||||||
menuWidth: 200,
|
menuWidth: 200,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
column: [
|
column: [
|
||||||
|
{
|
||||||
|
label: '关键字',
|
||||||
|
prop: 'keyWord',
|
||||||
|
search: true,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '流程名称',
|
label: '流程名称',
|
||||||
prop: 'processName',
|
prop: 'processName',
|
||||||
search: true,
|
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '流程Key',
|
||||||
|
prop: 'processId',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
hide: true,
|
||||||
|
dicData: [],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
slot: true,
|
slot: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
search: true,
|
|
||||||
type: 'select',
|
|
||||||
dicData: [
|
|
||||||
{ label: '待提交', value: '待提交' },
|
|
||||||
{ label: '审批中', value: '审批中' },
|
|
||||||
{ label: '已完成', value: '已完成' },
|
|
||||||
{ label: '已驳回', value: '已驳回' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '申请人',
|
label: '申请人',
|
||||||
@@ -173,6 +179,9 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadProcessTypes();
|
this.loadProcessTypes();
|
||||||
},
|
},
|
||||||
@@ -184,6 +193,10 @@ export default {
|
|||||||
label: item.processName,
|
label: item.processName,
|
||||||
value: item.processId,
|
value: item.processId,
|
||||||
}));
|
}));
|
||||||
|
const processIdColumn = this.option.column.find(item => item.prop === 'processId');
|
||||||
|
if (processIdColumn) {
|
||||||
|
processIdColumn.dicData = this.processTypes;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
@@ -210,6 +223,8 @@ export default {
|
|||||||
const query = {
|
const query = {
|
||||||
...this.query,
|
...this.query,
|
||||||
...params,
|
...params,
|
||||||
|
userCode: this.userInfo.account,
|
||||||
|
processName: '',
|
||||||
};
|
};
|
||||||
getMyList(page.currentPage, page.pageSize, query).then(res => {
|
getMyList(page.currentPage, page.pageSize, query).then(res => {
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ export default {
|
|||||||
userCode: this.userInfo.account,
|
userCode: this.userInfo.account,
|
||||||
processName: '',
|
processName: '',
|
||||||
};
|
};
|
||||||
|
console.log('[todo onLoad] userInfo:', this.userInfo, 'query:', query);
|
||||||
getTodoList(page.currentPage, page.pageSize, query).then(res => {
|
getTodoList(page.currentPage, page.pageSize, query).then(res => {
|
||||||
const data = res.data.data;
|
const data = res.data.data;
|
||||||
this.page.total = data.total;
|
this.page.total = data.total;
|
||||||
|
|||||||
Reference in New Issue
Block a user