Browse Source

BUG修复

master
wxc 2 years ago
parent
commit
42da7bef58
  1. 4
      src/api/mail.ts
  2. 1
      src/assets/icons/mp4.svg
  3. 10
      src/components/FileList.vue
  4. 2
      src/components/Upload.vue
  5. 5
      src/views/work/Query.vue
  6. 56
      src/views/work/components/MailDialog.vue
  7. 2
      src/views/work/components/templates/MailTypeForm.vue
  8. 2
      src/views/work/components/templates/ThreeHandlingDetail.vue

4
src/api/mail.ts

@ -32,6 +32,10 @@ export function updateContactInfo(body) {
return request.put({ url: '/mail/contactInfo', body})
}
export function updateMailCategory(body) {
return request.put({ url: '/mail/mailCategory', body})
}
export function deleteMail(body) {
return request.post({ url: '/mail/delete', body})
}

1
src/assets/icons/mp4.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712131041791" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10124" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M332.799002 686.081014m-332.799002 0a332.799002 332.799002 0 1 0 665.598003 0 332.799002 332.799002 0 1 0-665.598003 0Z" fill="#D3EFDE" p-id="10125"></path><path d="M883.19735 1024h-639.99808A141.055577 141.055577 0 0 1 102.399693 883.200422v-742.397772A141.055577 141.055577 0 0 1 243.19927 0.003072h516.350451a89.087733 89.087733 0 0 1 63.231811 25.599923l189.695431 189.695431A38.399885 38.399885 0 0 1 1023.996928 243.202342v639.99808a141.055577 141.055577 0 0 1-140.799578 140.799578zM243.19927 76.802842A63.999808 63.999808 0 0 0 179.199462 140.80265v742.397772A63.999808 63.999808 0 0 0 243.19927 947.20023h639.99808a63.999808 63.999808 0 0 0 63.999808-63.999808V259.074295l-179.199462-179.199463a12.799962 12.799962 0 0 0-8.447975-3.07199z" fill="#434260" p-id="10126"></path><path d="M278.527164 399.105875h40.959878L360.958917 512.001536c5.119985 15.103955 9.727971 30.463909 15.103955 45.823863h1.535995c5.119985-15.359954 9.471972-30.719908 14.847956-45.823863l40.959877-114.175657h41.215876v226.047321h-33.535899V512.001536c0-20.223939 2.815992-49.407852 4.607986-69.88779l-18.175946 51.199846-39.423881 107.775677h-22.015934l-40.959877-105.727683-17.919947-51.199846c1.535995 20.479939 4.351987 49.663851 4.351987 69.88779v111.871664h-33.023901zM533.502399 399.105875h68.351795c51.199846 0 86.271741 17.151949 86.271742 68.095795s-35.839892 72.191783-84.991745 72.191784h-34.047898v85.759743h-35.583894zM599.806201 512.001536c36.351891 0 53.503839-13.823959 53.503839-43.519869s-18.687944-39.679881-54.527836-39.679881h-29.695911V512.001536zM868.349395 563.201382h-28.927913v60.927818H806.397581V563.201382h-97.791707v-23.551929l89.855731-141.567575h40.703878V537.601459h28.927913z m-61.951814-25.599923v-59.90382c0-12.287963 0-31.231906 1.791994-43.51987-5.631983 11.263966-11.775965 23.039931-18.175945 34.815896L744.189767 537.601459z" fill="#434260" p-id="10127"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

10
src/components/FileList.vue

@ -100,6 +100,11 @@
@click.stop
></audio>
</template>
<template v-else-if="activeFile.type.indexOf('video') > -1">
<video controls @click.stop style="max-height: 100vh">
<source :src="`${VITE_API_URL}/api/file/stream/${activeFile.filepath}`" type="video/mp4">
</video>
</template>
<template v-else-if="activeFile.type.indexOf('word') > -1">
<vue-office-docx
:src="getDocFilepath()"
@ -338,6 +343,11 @@ function getIconName(filetype) {
) {
return "local-icon-xls";
}
if (
filetype.indexOf("video") > -1
) {
return "local-icon-mp4";
}
return "el-icon-document";
}

2
src/components/Upload.vue

@ -37,7 +37,7 @@ const props = defineProps({
},
accept: {
type: String,
default: "image/*,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,audio/mpeg,audio/mp4a-latm",
default: "image/*,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,audio/mpeg,audio/mp4a-latm,video/*",
}
});

5
src/views/work/Query.vue

@ -194,7 +194,7 @@
</template>
</el-table-column>
<el-table-column prop="mailLabels" label="信件标签" width="160" align="center" />
<el-table-column label="操作" width="160" fixed="right">
<el-table-column label="操作" width="164" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="handleMail(row.id)" size="small">详情</el-button>
<el-button type="primary" link @click="handleMailLabel(row.id)" size="small" v-show="!IsdeleteMail(row)">标签</el-button>
@ -235,12 +235,11 @@ import MailTodoByChangeVue from "./components/MailTodoByChange.vue";
import { getMails } from "@/api/work";
import { useDictData } from "@/hooks/useDictOptions";
import useMailStore from "@/stores/modules/mail";
import { formatTimeText, getDictLable, getFlowTagType } from "@/utils/util";
import { getDictLable, getFlowTagType } from "@/utils/util";
import { useDictOptions } from '@/hooks/useDictOptions'
import { deptLists } from '@/api/org/department'
import { labelLists } from '@/api/org/label'
import { getFlowNodes } from '@/api/org/flowNode'
import { ElMessage, ElTable } from "element-plus";
import { getToken } from '@/utils/auth'
import axios from 'axios'
import { useRouterParamsStore } from "@/stores/modules/routerParams";

56
src/views/work/components/MailDialog.vue

@ -105,9 +105,12 @@
</div>
</div>
<div ref="mailInfoRef">
<div class="col mb-10" v-if="mail.mailCategory">
<template v-if="mail.mailCategory">
<div class="col mb-10" >
<label style="width: 56px">信件分类</label>
<span style="width: calc(100% - 74px)">
<mail-category-select v-model="form.mailCategory" @current-change="handleCategoryChange" size="small" v-if="mailCategoryEditable" />
<template v-else>
<span v-if="mail.mailFirstCategory">{{
mail.mailFirstCategory
}}</span>
@ -117,8 +120,21 @@
<span v-if="mail.mailThreeCategory">{{
" > " + mail.mailThreeCategory
}}</span>
</template>
</span>
</div>
<div class="flex end" v-perms="['mail:updateMailCategory']">
<div v-if="mailCategoryEditable">
<el-button size="small" @click="mailCategoryEditable = false">取消</el-button
>
<el-button size="small" type="primary" @click="handleUpdateMailCategory">提交</el-button
>
</div>
<el-button type="primary" size="small" plain v-else @click="handleMailCategoryEditable">修改信件分类</el-button>
</div>
</template>
<div
class="col"
v-if="mail.mailLevel"
@ -493,7 +509,7 @@ import ExtensionApprovalReturn from "./ExtensionApprovalReturn.vue";
import RemainingTime from "./RemainingTime.vue";
import { getMailFlowDetail, flowNext, extensionApproval } from "@/api/mail";
import { getMailFlowDetail, flowNext, extensionApproval, updateMailCategory } from "@/api/mail";
import { getMailDetail } from "@/api/work";
import { addFav, delFav } from "@/api/work/fav";
import { useDictData } from "@/hooks/useDictOptions";
@ -864,6 +880,42 @@ function getFlowHandler(item) {
}
return `${item.handlerDeptName} ${item.handlerName}`;
}
const mailCategoryEditable = ref(false);
const form = reactive({});
function handleMailCategoryEditable() {
mailCategoryEditable.value = true
form.mailId = props.mailId
form.mailCategory = mail.value.mailCategory;
form.mailFirstCategory = mail.value.mailFirstCategory;
form.mailSecondCategory = mail.value.mailSecondCategory;
form.mailThreeCategory = mail.value.mailThreeCategory;
}
function handleCategoryChange(data, node) {
if (node.level === 1) {
form.mailFirstCategory = data.label;
form.mailSecondCategory = null;
form.mailThreeCategory = null;
}
debugger
if (node.level === 2) {
form.mailFirstCategory = node.parent.data.label;
form.mailSecondCategory = data.label;
form.mailThreeCategory = null;
}
if (node.level === 3) {
form.mailFirstCategory = node.parent.parent.data.label;
form.mailSecondCategory = node.parent.data.label;
form.mailThreeCategory = data.label;
}
}
function handleUpdateMailCategory() {
updateMailCategory(form).then(() => {
mailCategoryEditable.value = false
getDetail()
})
}
</script>
<style lang="scss" scoped>
.dialog-header {

2
src/views/work/components/templates/MailTypeForm.vue

@ -131,7 +131,7 @@ function handleCategoryChange(data, node) {
}
if (node.level === 2) {
form.mailFirstCategory = node.parent.data.label;
form.mailSecondCategory = data.id;
form.mailSecondCategory = data.label;
form.mailThreeCategory = null;
}
if (node.level === 3) {

2
src/views/work/components/templates/ThreeHandlingDetail.vue

@ -28,7 +28,7 @@
</div>
</div>
</el-collapse-item>
<el-collapse-item title="联系群众/领导接访情况" name="2">
<el-collapse-item title="联系群众/领导接访情况" name="2" v-if="mail.contactPoliceName">
<div class="flex mb-12" v-if="mail.contactPoliceName">
<div class="col" v-if="mail.mainDeptSignTime">
<label>主单位签收时长</label>

Loading…
Cancel
Save