|
@@ -6,8 +6,8 @@
|
|
|
:placeholder="$t('lang.NeedApproveWorkflow.describe1')"
|
|
:placeholder="$t('lang.NeedApproveWorkflow.describe1')"
|
|
|
enter-button="搜索"
|
|
enter-button="搜索"
|
|
|
allow-clear
|
|
allow-clear
|
|
|
- style="width: 300px;"
|
|
|
|
|
- @search="searchDatas"
|
|
|
|
|
|
|
+ style="width: 300px"
|
|
|
|
|
+ @search="queryDatas"
|
|
|
/>
|
|
/>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col>
|
|
<a-col>
|
|
@@ -15,28 +15,24 @@
|
|
|
<WorkflowSearch :function-type="6" @get-search-params="searchWorkflow" />
|
|
<WorkflowSearch :function-type="6" @get-search-params="searchWorkflow" />
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
- <CommonTable
|
|
|
|
|
- ref="table"
|
|
|
|
|
- :total="total"
|
|
|
|
|
|
|
+ <a-table
|
|
|
|
|
+ sticky
|
|
|
|
|
+ bordered
|
|
|
|
|
+ :pagination="false"
|
|
|
:columns="approveColumns"
|
|
:columns="approveColumns"
|
|
|
- :data-source="approveDatas"
|
|
|
|
|
- @get-pager="getPageParams"
|
|
|
|
|
|
|
+ :data-source="notApproveDatas"
|
|
|
>
|
|
>
|
|
|
<template #bodyCell="{ column, record }">
|
|
<template #bodyCell="{ column, record }">
|
|
|
- <template v-if="column.key === 'title'">
|
|
|
|
|
- <span v-if="record.category != 'CurdWindow'">
|
|
|
|
|
- {{ record.name }}
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else>
|
|
|
|
|
- {{ record.title }}
|
|
|
|
|
- </span>
|
|
|
|
|
- </template>
|
|
|
|
|
<template v-if="column.key === 'description'">
|
|
<template v-if="column.key === 'description'">
|
|
|
- <span
|
|
|
|
|
- v-if="record.category != 'CurdWindow'"
|
|
|
|
|
- style="white-space: pre-line"
|
|
|
|
|
- >{{ record.description }}</span>
|
|
|
|
|
- <span v-else style="white-space: pre-line">{{ record.content }}</span>
|
|
|
|
|
|
|
+ <span style="white-space: pre-line">{{ record.content }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.key === 'documentStatus'">
|
|
|
|
|
+ <a-tag v-if="record.documentStatus === '已完成'" color="success">
|
|
|
|
|
+ 已完成
|
|
|
|
|
+ </a-tag>
|
|
|
|
|
+ <a-tag v-if="record.documentStatus === '进行中'" color="processing">
|
|
|
|
|
+ 进行中
|
|
|
|
|
+ </a-tag>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="column.key === 'operation'">
|
|
<template v-if="column.key === 'operation'">
|
|
|
<a-button type="link" @click="selectTaskInfo(record)">
|
|
<a-button type="link" @click="selectTaskInfo(record)">
|
|
@@ -44,7 +40,12 @@
|
|
|
</a-button>
|
|
</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
- </CommonTable>
|
|
|
|
|
|
|
+ <template v-if="notApproveDatas.length > 0 && isShowMore" #footer>
|
|
|
|
|
+ <div style="text-align: center">
|
|
|
|
|
+ <a-button type="link" @click="loadMore">加载更多</a-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
<Loading v-if="isLoading" />
|
|
<Loading v-if="isLoading" />
|
|
|
<CustomerTask
|
|
<CustomerTask
|
|
|
ref="customerTask"
|
|
ref="customerTask"
|
|
@@ -58,7 +59,6 @@ import { ref, reactive, defineEmits, onMounted } from 'vue';
|
|
|
import Common from '../common/Common';
|
|
import Common from '../common/Common';
|
|
|
import WorkflowType from './WorkflowType.vue';
|
|
import WorkflowType from './WorkflowType.vue';
|
|
|
import WorkflowSearch from './WorkflowSearch.vue';
|
|
import WorkflowSearch from './WorkflowSearch.vue';
|
|
|
-import CommonTable from '../common/CommonTable.vue';
|
|
|
|
|
import { ajaxApi } from '../api/workflow/workflow.js';
|
|
import { ajaxApi } from '../api/workflow/workflow.js';
|
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
import { approvedColumns } from './configData.js';
|
|
import { approvedColumns } from './configData.js';
|
|
@@ -68,51 +68,60 @@ import CustomerTask from './CustomerTask.vue';
|
|
|
import { Notify } from 'pc-component-v3';
|
|
import { Notify } from 'pc-component-v3';
|
|
|
|
|
|
|
|
const emit = defineEmits(['refreshStasticCount']);
|
|
const emit = defineEmits(['refreshStasticCount']);
|
|
|
-const total = ref(0);
|
|
|
|
|
-const table = ref(null);
|
|
|
|
|
const customerTask = ref(null);
|
|
const customerTask = ref(null);
|
|
|
const selectedTaskId = ref(null);
|
|
const selectedTaskId = ref(null);
|
|
|
const isLoading = ref(false);
|
|
const isLoading = ref(false);
|
|
|
-const approveDatas = ref([]);
|
|
|
|
|
|
|
+const isShowMore = ref(true);
|
|
|
|
|
+const notApproveDatas = ref([]);
|
|
|
const approveColumns = ref(approvedColumns);
|
|
const approveColumns = ref(approvedColumns);
|
|
|
const searchParams = ref({});
|
|
const searchParams = ref({});
|
|
|
const filterParams = ref({});
|
|
const filterParams = ref({});
|
|
|
const pager = reactive({
|
|
const pager = reactive({
|
|
|
- start: 1,
|
|
|
|
|
- length: 20,
|
|
|
|
|
|
|
+ start: 0,
|
|
|
|
|
+ length: 10,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
searchDatas();
|
|
searchDatas();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// 查询,回到第一页
|
|
|
|
|
-const searchDatas = () => {
|
|
|
|
|
- table.value.backFirstPage();
|
|
|
|
|
|
|
+// 查询条件时从0开始
|
|
|
|
|
+const queryDatas = () => {
|
|
|
|
|
+ pager.start = 0;
|
|
|
|
|
+ isShowMore.value = true;
|
|
|
|
|
+ searchDatas(true);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 加载更多时push
|
|
|
|
|
+const loadMore = () => {
|
|
|
|
|
+ pager.start += 10;
|
|
|
|
|
+ searchDatas();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// 获取分页
|
|
|
|
|
-const getPageParams = (start, length) => {
|
|
|
|
|
- pager.start = (start - 1) * length;
|
|
|
|
|
- pager.length = length;
|
|
|
|
|
|
|
+// 查询
|
|
|
|
|
+const searchDatas = isSearch => {
|
|
|
const params = { ...searchParams.value, ...filterParams.value, ...pager };
|
|
const params = { ...searchParams.value, ...filterParams.value, ...pager };
|
|
|
- searchApprove(params);
|
|
|
|
|
|
|
+ searchApprove(params, isSearch);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 获取类型no
|
|
// 获取类型no
|
|
|
const getTypeNo = windowNo => {
|
|
const getTypeNo = windowNo => {
|
|
|
|
|
+ pager.start = 0;
|
|
|
|
|
+ isShowMore.value = true;
|
|
|
searchParams.value.windowNo = windowNo;
|
|
searchParams.value.windowNo = windowNo;
|
|
|
- searchDatas();
|
|
|
|
|
|
|
+ searchDatas(true);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 通过高级查询搜索
|
|
// 通过高级查询搜索
|
|
|
const searchWorkflow = value => {
|
|
const searchWorkflow = value => {
|
|
|
|
|
+ pager.start = 0;
|
|
|
|
|
+ isShowMore.value = true;
|
|
|
filterParams.value = value;
|
|
filterParams.value = value;
|
|
|
- searchDatas();
|
|
|
|
|
|
|
+ searchDatas(true);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 查询数据API
|
|
// 查询数据API
|
|
|
-const searchApprove = params => {
|
|
|
|
|
|
|
+const searchApprove = (params, isSearch) => {
|
|
|
isLoading.value = true;
|
|
isLoading.value = true;
|
|
|
const url = 'api/WorkflowResource/refuse';
|
|
const url = 'api/WorkflowResource/refuse';
|
|
|
ajaxApi(url, params).then(
|
|
ajaxApi(url, params).then(
|
|
@@ -121,12 +130,21 @@ const searchApprove = params => {
|
|
|
if (success.datas && success.datas.length > 0) {
|
|
if (success.datas && success.datas.length > 0) {
|
|
|
success.datas.forEach(item => {
|
|
success.datas.forEach(item => {
|
|
|
item.content = parseContent(item.content);
|
|
item.content = parseContent(item.content);
|
|
|
|
|
+ if (!isSearch) {
|
|
|
|
|
+ notApproveDatas.value.push(item);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
- total.value = success.total;
|
|
|
|
|
- approveDatas.value = success.datas;
|
|
|
|
|
|
|
+ if (isSearch) {
|
|
|
|
|
+ notApproveDatas.value = success.datas;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
- total.value = 0;
|
|
|
|
|
- approveDatas.value = [];
|
|
|
|
|
|
|
+ if (!isSearch) {
|
|
|
|
|
+ message.info('没有更多数据了。');
|
|
|
|
|
+ isShowMore.value = false;
|
|
|
|
|
+ isLoading.value = false;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ notApproveDatas.value = [];
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
message.warning(success.errorMessage);
|
|
message.warning(success.errorMessage);
|
|
@@ -185,4 +203,7 @@ const parseContent = content => {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
|
+.ant-table-wrapper {
|
|
|
|
|
+ margin-top: 8px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|