Browse Source

待办和已办操作栏固定

master
21819 2 years ago
parent
commit
3e7afc72da
  1. 179
      src/views/work/Done.vue
  2. 2
      src/views/work/Todo.vue

179
src/views/work/Done.vue

@ -1,71 +1,40 @@
<template> <template>
<div class="container"> <div class="container">
<header> <header>
<el-form <el-form :label-width="120">
:label-width="120"
>
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="来信时间"> <el-form-item label="来信时间">
<el-date-picker <el-date-picker v-model="query.mailTime" value-format="YYYY-MM-DD" type="daterange"
v-model="query.mailTime" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期"
value-format="YYYY-MM-DD" @change="handleMailTimeQuery" />
type="daterange"
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="handleMailTimeQuery"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="信件来源"> <el-form-item label="信件来源">
<el-select <el-select v-model="query.source" placeholder="请选择信件来源" clearable>
v-model="query.source" <el-option v-for="item in dictData.mail_source" :key="item.value" :label="item.name"
placeholder="请选择信件来源" :value="item.value" />
clearable
>
<el-option
v-for="item in dictData.mail_source"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="来信人员"> <el-form-item label="来信人员">
<div class="flex gap"> <div class="flex gap">
<el-select <el-select v-model="query.contactField" style="width: 180px">
v-model="query.contactField"
style="width: 180px"
>
<el-option label="姓名" value="name" /> <el-option label="姓名" value="name" />
<el-option label="身份证" value="idCard" /> <el-option label="身份证" value="idCard" />
<el-option label="联系电话" value="phone" /> <el-option label="联系电话" value="phone" />
</el-select> </el-select>
<el-input <el-input v-model="query.contactFieldValue" placeholder="请输入" clearable />
v-model="query.contactFieldValue"
placeholder="请输入"
clearable
/>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="信件等级"> <el-form-item label="信件等级">
<el-select <el-select v-model="query.mailLevel" placeholder="请选择信件等级" clearable>
v-model="query.mailLevel" <el-option v-for="item in dictData.mail_level" :key="item.value" :label="item.name"
placeholder="请选择信件等级" :value="item.value" />
clearable
>
<el-option
v-for="item in dictData.mail_level"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -73,27 +42,15 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="信件分类"> <el-form-item label="信件分类">
<el-tree-select <el-tree-select v-model="query.mailCategory" :data="mailStore.mailCategorys" check-strictly
v-model="query.mailCategory" filterable />
:data="mailStore.mailCategorys"
check-strictly
filterable
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="信件状态"> <el-form-item label="信件状态">
<el-select <el-select v-model="query.mailState" placeholder="请选择信件状态" clearable>
v-model="query.mailState" <el-option v-for="item in dictData.mail_state" :key="item.value" :label="item.name"
placeholder="请选择信件状态" :value="item.value" />
clearable
>
<el-option
v-for="item in dictData.mail_state"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -116,7 +73,7 @@
:value="item.key" /> :value="item.key" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="flex end mb-20"> <div class="flex end mb-20">
<el-button type="primary" @click="getList">查询</el-button> <el-button type="primary" @click="getList">查询</el-button>
@ -127,109 +84,75 @@
<main> <main>
<div class="table-container"> <div class="table-container">
<el-table :data="dones" style="width: 100%" stripe> <el-table :data="dones" style="width: 100%" stripe>
<el-table-column <el-table-column prop="mailTime" label="来信时间" align="center" width="180" />
prop="mailTime" <el-table-column label="信件来源" align="center" width="120">
label="来信时间"
align="center"
width="180"
/>
<el-table-column
label="信件来源"
align="center"
width="120"
>
<template #default="{ row }"> <template #default="{ row }">
<span>{{ <span>{{
dictData.mail_source.filter( dictData.mail_source.filter(
(item) => item.value === row.source (item) => item.value === row.source
)[0].name )[0].name
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="contactName" label="姓名" align="center" width="120" />
prop="contactName" <el-table-column prop="contactPhone" label="联系电话" width="120" />
label="姓名"
align="center"
width="120"
/>
<el-table-column
prop="contactPhone"
label="联系电话"
width="120"
/>
<el-table-column label="信件等级" width="120"> <el-table-column label="信件等级" width="120">
<template #default="{ row }"> <template #default="{ row }">
<mail-level <mail-level :value="row.mailLevel" :list="dictData.mail_level" />
:value="row.mailLevel"
:list="dictData.mail_level"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mailCategory" label="信件分类" /> <el-table-column prop="mailCategory" label="信件分类" />
<el-table-column label="信件状态" width="90"> <el-table-column label="信件状态" width="90">
<template #default="{ row }"> <template #default="{ row }">
<span>{{ <span>{{
getDictLable(dictData.mail_state, row.mailState) getDictLable(dictData.mail_state, row.mailState)
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="threeDeptName" label="办理单位" /> <el-table-column prop="threeDeptName" label="办理单位" />
<el-table-column prop="currentOperator" label="当前处理对象"></el-table-column> <el-table-column prop="currentOperator" label="当前处理对象"></el-table-column>
<el-table-column label="流程节点" class-name="text-no-ellipsis" align="center"> <el-table-column label="流程节点" class-name="text-no-ellipsis" align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-tag <el-tag :type="getFlowTagType(row.mailFlowName)">{{ row.mailFlowName }}</el-tag>
:type="getFlowTagType(row.mailFlowName)"
>{{ row.mailFlowName }}</el-tag
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="流程限时" align="center"> <el-table-column label="流程限时" align="center">
<template #default="{ row }"> <template #default="{ row }">
<div <div v-if="row.flowLimitedRemainingTime > 0" class="success">
v-if="row.flowLimitedRemainingTime > 0"
class="success"
>
<span class="mr-4">剩余</span> <span class="mr-4">剩余</span>
<span class="text">{{ <span class="text">{{
formatTimeText(row.flowLimitedRemainingTime) formatTimeText(row.flowLimitedRemainingTime)
}}</span> }}</span>
</div> </div>
<div <div v-if="row.flowLimitedRemainingTime < 0" class="error">
v-if="row.flowLimitedRemainingTime < 0"
class="error"
>
<span class="mr-4">超时</span> <span class="mr-4">超时</span>
<span class="text">{{ <span class="text">{{
formatTimeText( formatTimeText(
-row.flowLimitedRemainingTime -row.flowLimitedRemainingTime
) )
}}</span> }}</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button type="primary" link @click="handleMail(row)">详情</el-button>
type="primary"
link
@click="handleMail(row)"
>详情</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="flex mt-4 end"> <div class="flex mt-4 end">
<el-pagination @size-change="getList" @current-change="getList" :current-page="query.current" <el-pagination @size-change="getList" @current-change="getList" :current-page="query.current"
:page-sizes="[10, 20, 50]" :page-size="query.size" v-model:current-page="query.current" :page-sizes="[10, 20, 50]" :page-size="query.size" v-model:current-page="query.current"
layout="total,sizes, prev, pager, next, jumper" :total="totalSize.total"> layout="total,sizes, prev, pager, next, jumper" :total="totalSize.total">
</el-pagination> </el-pagination>
</div> </div>
</main> </main>
</div> </div>
<MailDialog v-model:show="showModel" :mail-id="activeMailId" :work-id="activeWorkId" :disabled="true" @update="getList" /> <MailDialog v-model:show="showModel" :mail-id="activeMailId" :work-id="activeWorkId" :disabled="true"
@update="getList" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import MailDialog from "./components/MailDialog.vue"; import MailDialog from "./components/MailDialog.vue";
@ -240,7 +163,7 @@ import { useDictData } from "@/hooks/useDictOptions";
import { useDictOptions } from '@/hooks/useDictOptions' import { useDictOptions } from '@/hooks/useDictOptions'
import useMailStore from "@/stores/modules/mail"; import useMailStore from "@/stores/modules/mail";
import { getDictLable, formatTimeText,getFlowTagType } from "@/utils/util"; import { getDictLable, formatTimeText, getFlowTagType } from "@/utils/util";
import { ref, reactive, watchEffect } from "vue"; import { ref, reactive, watchEffect } from "vue";
import { deptLists } from '@/api/org/department' import { deptLists } from '@/api/org/department'
import { getFlowNodes } from '@/api/org/flowNode' import { getFlowNodes } from '@/api/org/flowNode'
@ -297,7 +220,7 @@ function handleMailTimeQuery(val) {
if (val) { if (val) {
query.value.mailTimeStart = val[0]; query.value.mailTimeStart = val[0];
query.value.mailTimeEnd = val[1]; query.value.mailTimeEnd = val[1];
}else{ } else {
delete query.value.mailTimeStart delete query.value.mailTimeStart
delete query.value.mailTimeEnd delete query.value.mailTimeEnd
} }
@ -314,10 +237,12 @@ function handleMailTimeQuery(val) {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
text-align: center; text-align: center;
.text { .text {
color: #128009; color: #128009;
} }
} }
.error { .error {
background-color: #ff0000; background-color: #ff0000;
color: #fff; color: #fff;

2
src/views/work/Todo.vue

@ -217,7 +217,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button
type="primary" type="primary"

Loading…
Cancel
Save