徐景良 2024-08-19 14:34:31 +08:00
commit 4758f47632
4 changed files with 291 additions and 241 deletions

View File

@ -34,23 +34,26 @@ export const columns: BasicColumn[] = [
{ {
title: '图斑类型', title: '图斑类型',
dataIndex: 'typename', dataIndex: 'typename',
width: 80,
}, },
{ {
title: '图斑面积', title: '图斑面积',
dataIndex: 'area', dataIndex: 'area',
width: 110,
}, },
{ {
title: '农用地面积', title: '农用地面积',
dataIndex: 'nongyongdiarea', dataIndex: 'nongyongdiarea',
width: 110,
}, },
{ {
title: '耕地面积', title: '耕地面积',
dataIndex: 'gengdiarea', dataIndex: 'gengdiarea',
width: 110,
}, },
{ {
title: '永农面积', title: '永农面积',
dataIndex: 'yongjiujibennongtianarea', dataIndex: 'yongjiujibennongtianarea',
width: 110,
}, },
{ {
title: '当前状态', title: '当前状态',

View File

@ -34,23 +34,26 @@ export const columns: BasicColumn[] = [
{ {
title: '图斑类型', title: '图斑类型',
dataIndex: 'typename', dataIndex: 'typename',
width: 80,
}, },
{ {
title: '图斑面积', title: '图斑面积',
dataIndex: 'area', dataIndex: 'area',
width: 110,
}, },
{ {
title: '农用地面积', title: '农用地面积',
dataIndex: 'nongyongdiarea', dataIndex: 'nongyongdiarea',
width: 110,
}, },
{ {
title: '耕地面积', title: '耕地面积',
dataIndex: 'gengdiarea', dataIndex: 'gengdiarea',
width: 110,
}, },
{ {
title: '永农面积', title: '永农面积',
dataIndex: 'yongjiujibennongtianarea', dataIndex: 'yongjiujibennongtianarea',
width: 110,
}, },
{ {
title: '当前状态', title: '当前状态',

View File

@ -38,18 +38,22 @@ export const columns: BasicColumn[] = [
{ {
title: '图斑面积', title: '图斑面积',
dataIndex: 'area', dataIndex: 'area',
width: 110,
}, },
{ {
title: '农用地面积', title: '农用地面积',
dataIndex: 'nongyongdiarea', dataIndex: 'nongyongdiarea',
width: 110,
}, },
{ {
title: '耕地面积', title: '耕地面积',
dataIndex: 'gengdiarea', dataIndex: 'gengdiarea',
width: 110,
}, },
{ {
title: '永农面积', title: '永农面积',
dataIndex: 'yongjiujibennongtianarea', dataIndex: 'yongjiujibennongtianarea',
width: 110,
}, },
{ {
title: '当前状态', title: '当前状态',

View File

@ -1,236 +1,238 @@
<template> <template>
<PageWrapper :class="prefixCls"> <PageWrapper :class="prefixCls">
<div class="btn-box"> <a-spin :spinning="spinning" style="width: 100%; height: 100%;">
<a-button type="primary" @click="confimReading" class="ml-2" v-if="props.isRead == 1" <div class="btn-box">
>确认阅读 <a-button type="primary" @click="confimReading" class="ml-2" v-if="props.isRead == 1"
</a-button> >确认阅读
<a-button type="primary" @click="closePage" class="ml-2" danger>关闭 </a-button> </a-button>
</div> <a-button type="primary" @click="closePage" class="ml-2" danger>关闭 </a-button>
<div class="maper-container" v-if="mapConfig?.isShowMap">
<MapboxMap
:mapConfig="mapConfig"
:geomsList="geomsList"
@handlerDrawComplete="handlerDrawComplete"
@mapOnLoad="onMapboxLoad"
ref="MapboxComponent"
/>
</div>
<div
id="form-container"
@mousemove="onFormContainerMouseOver"
style="position: relative"
:class="mapConfig?.isShowMap ? 'form-container' : ''"
>
<a-layout>
<a-layout>
<a-layout-content>
<a-tabs
v-model:activeKey="activeName"
tabPosition="bottom"
@change="changeActive"
type="card"
>
<a-tab-pane
key="form"
:tab="
designerData.formCurrentNode.formTitle
? designerData.formCurrentNode.formTitle
: '表单信息'
"
v-if="formVisble"
>
<div id="process-form-container">
<ImagePreview
style="width: 100%; height:"
v-if="isShowImagePreview"
:globalImagePreviewUrl="globalImagePreviewUrl"
:globalImagePreviewList="globalImagePreviewList"
@closeImagePreview="closeImagePreview"
/>
<FormViewer
ref="formBoxRef"
:formConfig="formConfig"
:processId="designerData.process.id"
:formVerison="designerData.formCurrentNode.formVerison"
:formRelationId="designerData.formCurrentNode.formRelationId"
:instanceInfo="designerData.process.instanceInfo"
@getFormSuccess="getFormSuccess"
v-if="formVisble"
/>
</div>
</a-tab-pane>
<a-tab-pane
key="form"
:tab="
designerData.formCurrentNode.formTitle
? designerData.formCurrentNode.formTitle
: '系统表单信息'
"
v-if="formUrlVisble"
>
<AsyncComponent ref="pcForm" />
</a-tab-pane>
<a-tab-pane key="flow" tab="流程模板" force-render v-if="false">
<div class="process-design" style="display: flex; height: calc(100vh - 350px)">
<process-viewer
v-if="processVisble"
:key="`designer-${id}`"
:events="['element.click']"
@element-click="elementClick"
:xml="flowContent"
:flowViewer="flowViewer"
/>
</div>
</a-tab-pane>
<a-tab-pane key="record" tab="操作记录" force-render v-if="false">
<div :style="'padding:10px 0 40px 0;overflow:auto; height:' + designerData.height">
<a-timeline>
<a-timeline-item
v-for="(item, index) in designerData.logs"
:key="index"
:color="item.type"
>
<div class="title">{{ item.time }}</div>
<a-card hoverable size="small">
<div class="type-title">{{ item.name }}</div>
<div class="content">
<span
class="link"
v-for="(userName, index2) in item.userNames"
:key="index2"
>{{ userName }}</span
>
{{ item.des }}
</div>
</a-card>
</a-timeline-item>
</a-timeline>
</div>
</a-tab-pane>
</a-tabs>
</a-layout-content>
<div :style="footerStyle">
<a-tabs v-if="props.isRead == 0" v-model:activeKey="auditName">
<a-tab-pane key="audit" :tab="auditTitleVal">
<div class="approval-column">
<a-form
ref="formRef"
:rules="rules"
:model="formData"
size="small"
labelAlign="left"
:label-col="2"
:wrapper-col="22"
>
<!-- <a-form-item :label="auditNameVal" /> -->
<!-- <div style="margin-bottom: 20px">某某退回 {{ backDescription }}</div> -->
<a-form-item :label="auditNameVal">
<a-textarea
v-model:value="formData.des"
placeholder="请输入"
:auto-size="{ minRows: 2, maxRows: 8 }"
/>
</a-form-item>
<a-form-item
label=""
:class="btnVisble ? 'l-task-btns' : 'l-task-btns btn-hidden'"
>
<a-button
v-for="(btn, index) in designerData.taskBtns"
:key="index"
:color="btn.type"
:type="btn.type ? btn.type : 'primary'"
@click="handleBtnClick(btn)"
>{{ btn.name }}</a-button
>
</a-form-item>
</a-form>
<!-- <auditInfo :data="designerData.userLogs" /> -->
</div>
</a-tab-pane>
<a-tab-pane key="record" tab="流转信息" force-render>
<div :style="'padding:10px 0 40px 0;overflow:auto; height:220px'">
<a-timeline>
<a-timeline-item
v-for="(item, index) in designerData.logs"
:key="index"
:color="item.type"
>
<div class="title">{{ item.time }}</div>
<a-card hoverable size="small">
<div class="type-title">{{ item.name }}</div>
<div class="content">
<span
class="link"
v-for="(userName, index2) in item.userNames"
:key="index2"
>{{ userName }}</span
>
{{ item.des }}
</div>
</a-card>
</a-timeline-item>
</a-timeline>
</div>
</a-tab-pane>
</a-tabs>
</div>
</a-layout>
</a-layout>
</div>
<!-- 节点记录信息 -->
<div class="info-box" v-if="designerData.nodeLogs.length > 0">
<a-drawer v-model:open="infoOpen" class="custom-class" title="记录信息" placement="right">
<a-timeline>
<a-timeline-item
v-for="(item, index) in designerData.nodeLogs"
:key="index"
:color="item.type"
>
<div class="title">{{ item.time }}</div>
<a-card hoverable size="small">
<div class="type-title">{{ item.name }}</div>
<div class="content">
<span class="link" v-for="(userName, index2) in item.userNames" :key="index2">{{
userName
}}</span>
{{ item.des }}
</div>
</a-card>
</a-timeline-item>
</a-timeline>
</a-drawer>
</div>
<a-modal
v-model:open="rejectOpen"
width="50%"
title="驳回节点选择"
@ok="rejectHandleOk"
:destroyOnClose="true"
>
<div class="l-from-body">
<a-form
ref="rejectFormRef"
:model="reject"
labelAlign="left"
:label-col="rejectLabelCol"
:wrapper-col="rejectWrapperCol"
:rules="rejectRules"
>
<a-form-item label="驳回到" name="nextId">
<a-select
v-model:value="reject.nextId"
placeholder="驳回节点选择"
:field-names="{ label: 'unitName', value: 'unitId' }"
:options="rejectRelations"
/>
</a-form-item>
</a-form>
</div> </div>
</a-modal>
<div class="maper-container" v-if="mapConfig?.isShowMap">
<MapboxMap
:mapConfig="mapConfig"
:geomsList="geomsList"
@handlerDrawComplete="handlerDrawComplete"
@mapOnLoad="onMapboxLoad"
ref="MapboxComponent"
/>
</div>
<div
id="form-container"
@mousemove="onFormContainerMouseOver"
style="position: relative"
:class="mapConfig?.isShowMap ? 'form-container' : ''"
>
<a-layout>
<a-layout>
<a-layout-content>
<a-tabs
v-model:activeKey="activeName"
tabPosition="bottom"
@change="changeActive"
type="card"
>
<a-tab-pane
key="form"
:tab="
designerData.formCurrentNode.formTitle
? designerData.formCurrentNode.formTitle
: '表单信息'
"
v-if="formVisble"
>
<div id="process-form-container">
<ImagePreview
style="width: 100%; height:"
v-if="isShowImagePreview"
:globalImagePreviewUrl="globalImagePreviewUrl"
:globalImagePreviewList="globalImagePreviewList"
@closeImagePreview="closeImagePreview"
/>
<FormViewer
ref="formBoxRef"
:formConfig="formConfig"
:processId="designerData.process.id"
:formVerison="designerData.formCurrentNode.formVerison"
:formRelationId="designerData.formCurrentNode.formRelationId"
:instanceInfo="designerData.process.instanceInfo"
@getFormSuccess="getFormSuccess"
v-if="formVisble"
/>
</div>
</a-tab-pane>
<a-tab-pane
key="form"
:tab="
designerData.formCurrentNode.formTitle
? designerData.formCurrentNode.formTitle
: '系统表单信息'
"
v-if="formUrlVisble"
>
<AsyncComponent ref="pcForm" />
</a-tab-pane>
<a-tab-pane key="flow" tab="流程模板" force-render v-if="false">
<div class="process-design" style="display: flex; height: calc(100vh - 350px)">
<process-viewer
v-if="processVisble"
:key="`designer-${id}`"
:events="['element.click']"
@element-click="elementClick"
:xml="flowContent"
:flowViewer="flowViewer"
/>
</div>
</a-tab-pane>
<a-tab-pane key="record" tab="操作记录" force-render v-if="false">
<div :style="'padding:10px 0 40px 0;overflow:auto; height:' + designerData.height">
<a-timeline>
<a-timeline-item
v-for="(item, index) in designerData.logs"
:key="index"
:color="item.type"
>
<div class="title">{{ item.time }}</div>
<a-card hoverable size="small">
<div class="type-title">{{ item.name }}</div>
<div class="content">
<span
class="link"
v-for="(userName, index2) in item.userNames"
:key="index2"
>{{ userName }}</span
>
{{ item.des }}
</div>
</a-card>
</a-timeline-item>
</a-timeline>
</div>
</a-tab-pane>
</a-tabs>
</a-layout-content>
<div :style="footerStyle">
<a-tabs v-if="props.isRead == 0" v-model:activeKey="auditName">
<a-tab-pane key="audit" :tab="auditTitleVal">
<div class="approval-column">
<a-form
ref="formRef"
:rules="rules"
:model="formData"
size="small"
labelAlign="left"
:label-col="2"
:wrapper-col="22"
>
<!-- <a-form-item :label="auditNameVal" /> -->
<!-- <div style="margin-bottom: 20px">某某退回 {{ backDescription }}</div> -->
<a-form-item :label="auditNameVal">
<a-textarea
v-model:value="formData.des"
placeholder="请输入"
:auto-size="{ minRows: 2, maxRows: 8 }"
/>
</a-form-item>
<a-form-item
label=""
:class="btnVisble ? 'l-task-btns' : 'l-task-btns btn-hidden'"
>
<a-button
v-for="(btn, index) in designerData.taskBtns"
:key="index"
:color="btn.type"
:type="btn.type ? btn.type : 'primary'"
@click="handleBtnClick(btn)"
>{{ btn.name }}</a-button
>
</a-form-item>
</a-form>
<!-- <auditInfo :data="designerData.userLogs" /> -->
</div>
</a-tab-pane>
<a-tab-pane key="record" tab="流转信息" force-render>
<div :style="'padding:10px 0 40px 0;overflow:auto; height:220px'">
<a-timeline>
<a-timeline-item
v-for="(item, index) in designerData.logs"
:key="index"
:color="item.type"
>
<div class="title">{{ item.time }}</div>
<a-card hoverable size="small">
<div class="type-title">{{ item.name }}</div>
<div class="content">
<span
class="link"
v-for="(userName, index2) in item.userNames"
:key="index2"
>{{ userName }}</span
>
{{ item.des }}
</div>
</a-card>
</a-timeline-item>
</a-timeline>
</div>
</a-tab-pane>
</a-tabs>
</div>
</a-layout>
</a-layout>
</div>
<!-- 节点记录信息 -->
<div class="info-box" v-if="designerData.nodeLogs.length > 0">
<a-drawer v-model:open="infoOpen" class="custom-class" title="记录信息" placement="right">
<a-timeline>
<a-timeline-item
v-for="(item, index) in designerData.nodeLogs"
:key="index"
:color="item.type"
>
<div class="title">{{ item.time }}</div>
<a-card hoverable size="small">
<div class="type-title">{{ item.name }}</div>
<div class="content">
<span class="link" v-for="(userName, index2) in item.userNames" :key="index2">{{
userName
}}</span>
{{ item.des }}
</div>
</a-card>
</a-timeline-item>
</a-timeline>
</a-drawer>
</div>
<a-modal
v-model:open="rejectOpen"
width="50%"
title="驳回节点选择"
@ok="rejectHandleOk"
:destroyOnClose="true"
>
<div class="l-from-body">
<a-form
ref="rejectFormRef"
:model="reject"
labelAlign="left"
:label-col="rejectLabelCol"
:wrapper-col="rejectWrapperCol"
:rules="rejectRules"
>
<a-form-item label="驳回到" name="nextId">
<a-select
v-model:value="reject.nextId"
placeholder="驳回节点选择"
:field-names="{ label: 'unitName', value: 'unitId' }"
:options="rejectRelations"
/>
</a-form-item>
</a-form>
</div>
</a-modal>
</a-spin>
</PageWrapper> </PageWrapper>
</template> </template>
@ -264,6 +266,9 @@
import { buildGUID } from '@/utils/uuid'; import { buildGUID } from '@/utils/uuid';
import { settings } from 'nprogress'; import { settings } from 'nprogress';
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue')); const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const spinning = ref(false)
let quickClick: any = null
const goClick = ref(true)
const geomsList = ref(); const geomsList = ref();
const mapConfig = ref({ isShowMap: false }); const mapConfig = ref({ isShowMap: false });
const MapboxComponent = ref(); const MapboxComponent = ref();
@ -679,6 +684,12 @@
designerData.taskBtns = btns; designerData.taskBtns = btns;
} }
async function handleBtnClick(btn) { async function handleBtnClick(btn) {
if(goClick.value){
goClick.value = false
quickClick = setTimeout(() => {goClick.value = true}, 1000)
}else{
return
}
const instanceInfo = designerData.process.instanceInfo; const instanceInfo = designerData.process.instanceInfo;
// //
// const data = await validateForm(); // const data = await validateForm();
@ -724,7 +735,9 @@
console.log('审核提交'); console.log('审核提交');
setTimeout(async () => { setTimeout(async () => {
querys.data = JSON.stringify(res); querys.data = JSON.stringify(res);
spinning.value = true
const formValue = await functionsaveForm(querys); const formValue = await functionsaveForm(querys);
spinning.value = false
if (formValue) { if (formValue) {
if (btn.code == 'zancun') { if (btn.code == 'zancun') {
createMessage.success('暂存成功'); createMessage.success('暂存成功');
@ -736,6 +749,7 @@
} }
}) })
.catch((error) => { .catch((error) => {
spinning.value = false
console.log(error); console.log(error);
activeName.value = 'form'; activeName.value = 'form';
return; return;
@ -755,10 +769,17 @@
let res: any; let res: any;
switch (btn.code) { switch (btn.code) {
case 'hc_create': case 'hc_create':
res = await createAgain({ try{
processId: props.processId, spinning.value = true
des: `重新提交${formData.value.des ? '-' : ''}${formData.value.des}`, res = await createAgain({
}); processId: props.processId,
des: `重新提交${formData.value.des ? '-' : ''}${formData.value.des}`,
});
spinning.value = false
}catch(e){
spinning.value = false
console.log(e);
}
break; break;
case 'hc_sign': case 'hc_sign':
designerData.tUserType = 2; designerData.tUserType = 2;
@ -771,11 +792,18 @@
default: default:
if (designerData.task.type == 6) { if (designerData.task.type == 6) {
// //
res = await signAudit(props.taskId, { try{
code: btn.code, spinning.value = true
name: btn.name, res = await signAudit(props.taskId, {
des: formData.value.des, code: btn.code,
}); name: btn.name,
des: formData.value.des,
});
spinning.value = false
}catch(e){
spinning.value = false
console.log(e);
}
} else { } else {
if (designerData.currentNode.rejectType == '2' && btn.code == 'disagree') { if (designerData.currentNode.rejectType == '2' && btn.code == 'disagree') {
designerData.selectRejectNodeVisible = true; designerData.selectRejectNodeVisible = true;
@ -807,10 +835,12 @@
btnVisble.value = false; btnVisble.value = false;
// //
if (designerData.currentBtn.isNextAuditor) { if (designerData.currentBtn.isNextAuditor) {
spinning.value = true
const res = await getLoadNextAuditors({ const res = await getLoadNextAuditors({
processId: props.processId, processId: props.processId,
nodeId: designerData.currentNode.id, nodeId: designerData.currentNode.id,
}); });
spinning.value = false
const nodeUserMap = res.data.data; const nodeUserMap = res.data.data;
const nodeUsers: nodeUsersType[] = []; const nodeUsers: nodeUsersType[] = [];
for (let key in nodeUserMap) { for (let key in nodeUserMap) {
@ -833,11 +863,13 @@
return; return;
} }
} }
spinning.value = true
const data = await audit(props.taskId, { const data = await audit(props.taskId, {
code: designerData.currentBtn.code, code: designerData.currentBtn.code,
name: designerData.currentBtn.name, name: designerData.currentBtn.name,
des: formData.value.des, des: formData.value.des,
}); });
spinning.value = false
if (data) { if (data) {
btnVisble.value = false; btnVisble.value = false;
closePage(); closePage();
@ -965,12 +997,14 @@
return false; return false;
}); });
if (res) { if (res) {
spinning.value = true
const data = await audit(props.taskId, { const data = await audit(props.taskId, {
code: designerData.currentBtn.code, code: designerData.currentBtn.code,
name: designerData.currentBtn.name, name: designerData.currentBtn.name,
des: formData.value.des, des: formData.value.des,
NextId: reject.value.nextId, NextId: reject.value.nextId,
}); });
spinning.value = false
if (data) { if (data) {
closePage(); closePage();
rejectOpen.value = false; rejectOpen.value = false;
@ -1014,6 +1048,12 @@
function onFormContainerMouseOver(event) {} function onFormContainerMouseOver(event) {}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-spin-nested-loading){
height: 100%;
.ant-spin-container{
height: 100%;
}
}
::v-deep .ant-tabs-nav-wrap { ::v-deep .ant-tabs-nav-wrap {
padding-left: 10px; padding-left: 10px;
} }