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

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

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

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

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

Loading…
Cancel
Save