Browse Source

完善

master
wxc 2 years ago
parent
commit
eeed1b1f24
  1. 2
      src/components/Upload.vue
  2. 17
      src/views/work/components/templates/InterviewWriterFrom.vue
  3. 24
      src/views/work/components/templates/VerifyForm.vue

2
src/components/Upload.vue

@ -18,7 +18,7 @@
</el-upload>
<div class="flex wrap img-box mt-10">
<template v-for="(item, index) in files" :key="index">
<div class="releative">
<div class="relative">
<img
:src="`${VITE_API_URL}/api/file/stream/${item.filepath}`"
/>

17
src/views/work/components/templates/InterviewWriterFrom.vue

@ -44,7 +44,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="上传佐证" prop="interviewAttachments">
<Upload />
<Upload v-model="form.interviewAttachments" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -61,9 +61,6 @@
<script setup>
import { getToken } from "@/utils/auth";
import { useDictData } from "@/hooks/useDictOptions";
const { dictData } = useDictData(["interview_type"]);
const form = ref({});
@ -93,12 +90,12 @@ const rules = {
message: "请填写接访情况",
},
],
// interviewAttachments: [
// {
// required: true,
// message: "",
// },
// ],
interviewAttachments: [
{
required: true,
message: "请上传佐证",
},
],
};

24
src/views/work/components/templates/VerifyForm.vue

@ -145,21 +145,8 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="上传佐证">
<el-upload
v-model:file-list="fileList"
:action="`${VITE_API_URL}/api/file/upload`"
:headers="{'Admin': getToken()}"
multiple
>
<el-button
>上传
<template #icon>
<icon name="el-icon-Upload" />
</template>
</el-button>
</el-upload>
<el-form-item label="上传佐证" prop="verifyAttachments">
<Upload v-model="form.verifyAttachments" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -185,7 +172,6 @@ import { useDictData } from "@/hooks/useDictOptions";
import { listByThree } from "@/api/org/department";
import { allLists } from "@/api/perms/admin";
import { getToken } from "@/utils/auth";
const { VITE_API_URL } = process.env;
const { dictData } = useDictData(["verify_problem", "verify_punish", "satisfaction_status", "verify_is_true"]);
const threeDepts = ref([]);
const polices = ref([]);
@ -237,6 +223,12 @@ const rules = {
message: "请选择回访人",
},
],
verifyAttachments: [
{
required: true,
message: "请上传佐证",
},
]
};
listByThree().then((data) => {

Loading…
Cancel
Save