pull/1/head
z 2024-01-12 09:51:58 +08:00
parent f12ae4a5bc
commit b30aaf9f34
14 changed files with 189 additions and 105 deletions

View File

@ -4,9 +4,8 @@
:model-value="visible && model === 'dialog'" :model-value="visible && model === 'dialog'"
@update:model-value="visible = false" @update:model-value="visible = false"
> >
<div v-if="visible && model === 'dialog'"> <div v-if="visible">
<vue-pdf <vue-pdf
ref="pdfRef"
v-for="page in numOfPages" v-for="page in numOfPages"
:key="page" :key="page"
:src="VITE_FILE_URL + src" :src="VITE_FILE_URL + src"
@ -14,9 +13,8 @@
/> />
</div> </div>
</el-dialog> </el-dialog>
<div v-if="model === 'normal'"> <div v-if="model === 'normal'" :key="src">
<vue-pdf <vue-pdf
ref="pdfRef"
v-for="page in numOfPages" v-for="page in numOfPages"
:key="page" :key="page"
:src="VITE_FILE_URL + src" :src="VITE_FILE_URL + src"
@ -53,11 +51,9 @@ const props = defineProps({
}); });
const emits = defineEmits(["update:visible"]); const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits); const visible = useVModel(props, "visible", emits);
const pdfRef = ref(null);
const numOfPages = ref(0); const numOfPages = ref(0);
watchEffect(() => { watchEffect(() => {
if (props.visible) { if (props.visible || props.src) {
console.log(1111);
const loadingTask = createLoadingTask(VITE_FILE_URL + props.src); const loadingTask = createLoadingTask(VITE_FILE_URL + props.src);
loadingTask.promise loadingTask.promise
.then((pdf) => { .then((pdf) => {

View File

@ -40,5 +40,13 @@ export const getHiddenDangerDatabaseList = (params) =>
post("/hiddenLibrary/list", params); // 隐患数据库列表 post("/hiddenLibrary/list", params); // 隐患数据库列表
export const setInventoryTroubleshootingOtherHiddenDangerAdd = (params) => export const setInventoryTroubleshootingOtherHiddenDangerAdd = (params) =>
post("/hidden/add", params); // 清单排查其它隐患添加 post("/hidden/add", params); // 清单排查其它隐患添加
export const setInventoryTroubleshootingOtherHiddenDangerView = (params) => export const getInventoryTroubleshootingOtherHiddenDangerView = (params) =>
post("/hidden/goEdit", params); // 清单排查其它隐患查看 post("/hidden/goEdit", params); // 清单排查其它隐患查看
export const setInventoryTroubleshootingOtherHiddenDangerDelete = (params) =>
post("/hidden/delete", params); // 清单排查其它隐患删除
export const setInventoryTroubleshootingOtherHiddenDangerEdit = (params) =>
post("/hidden/edit", params); // 清单排查其它隐患修改
export const setInventoryTroubleshootingOtherHiddenDangerListAdd = (params) =>
post("/hidden/listAdd", params); // 清单排查其它隐患添加
export const setInventoryTroubleshootingSubmit = (params) =>
post("/checkrecord/add", params); // 清单排查提交

View File

@ -10,12 +10,12 @@
> >
<el-space wrap> <el-space wrap>
<layout-upload <layout-upload
v-model:file-list="data.form.file" :file-list="[]"
accept=".pdf" accept=".pdf"
:show-file-list="false" :show-file-list="false"
auto-upload auto-upload
:http-request="fnUploadArchivesFile" :http-request="fnUploadArchivesFile"
:limit="1" :limit="999"
> >
<template #tip>只能上传pdf文件</template> <template #tip>只能上传pdf文件</template>
</layout-upload> </layout-upload>

View File

@ -62,8 +62,8 @@ const info = ref({});
const { list } = useListData(getInventoryManagementView, { const { list } = useListData(getInventoryManagementView, {
otherParams: { LISTMANAGER_ID }, otherParams: { LISTMANAGER_ID },
usePagination: false, usePagination: false,
callbackFn: (list, responseData) => { callbackFn: (list, resData) => {
info.value = responseData.pd; info.value = resData.pd;
}, },
}); });
console.log(list); console.log(list);

View File

@ -84,8 +84,8 @@ const { list } = useListData(getInventoryManagementView, {
LISTMANAGER_ID, LISTMANAGER_ID,
}, },
usePagination: false, usePagination: false,
callbackFn: (list, responseData) => { callbackFn: (list, resData) => {
info.value = responseData.pd; info.value = resData.pd;
}, },
}); });
const fnSelect = (row, index) => { const fnSelect = (row, index) => {

View File

@ -75,8 +75,8 @@ const { list } = useListData(getInventoryManagementView, {
LISTMANAGER_ID, LISTMANAGER_ID,
}, },
usePagination: false, usePagination: false,
callbackFn: (list, responseData) => { callbackFn: (list, resData) => {
info.value = responseData.pd; info.value = resData.pd;
}, },
}); });
const fnPartQrCode = (row) => { const fnPartQrCode = (row) => {

View File

@ -107,8 +107,8 @@ const { list } = useListData(getInventoryManagementView, {
LISTMANAGER_ID, LISTMANAGER_ID,
}, },
usePagination: false, usePagination: false,
callbackFn: (list, responseData) => { callbackFn: (list, resData) => {
info.value = responseData.pd; info.value = resData.pd;
}, },
}); });
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-model="visible" v-model="visible"
:title="type === 'add' ? '修改隐患' : '添加隐患'" :title="type === 'add' ? '添加隐患' : '修改隐患'"
:on-close="fnClose" :on-close="fnClose"
width="1200" width="1200"
> >
@ -201,10 +201,12 @@ import { reactive, ref, watchEffect } from "vue";
import LayoutUpload from "@/components/upload/index.vue"; import LayoutUpload from "@/components/upload/index.vue";
import { useVModels } from "@vueuse/core"; import { useVModels } from "@vueuse/core";
import { debounce } from "throttle-debounce"; import { debounce } from "throttle-debounce";
import { ElLoading, ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { import {
getHiddenDangerDatabaseList, getHiddenDangerDatabaseList,
setInventoryTroubleshootingOtherHiddenDangerAdd, setInventoryTroubleshootingOtherHiddenDangerAdd,
setInventoryTroubleshootingOtherHiddenDangerEdit,
setInventoryTroubleshootingOtherHiddenDangerListAdd,
} from "@/request/hazard_investigation.js"; } from "@/request/hazard_investigation.js";
import { import {
layoutFnGetHazardCategories, layoutFnGetHazardCategories,
@ -248,6 +250,16 @@ const props = defineProps({
required: true, required: true,
default: "", default: "",
}, },
longitude: {
type: Number,
required: true,
default: 0,
},
latitude: {
type: Number,
required: true,
default: 0,
},
}); });
const emits = defineEmits(["update:visible", "update:form", "submit"]); const emits = defineEmits(["update:visible", "update:form", "submit"]);
const { visible, form } = useVModels(props, emits); const { visible, form } = useVModels(props, emits);
@ -333,31 +345,32 @@ watchEffect(() => {
}); });
const fnClose = () => { const fnClose = () => {
formRef.value.resetFields(); formRef.value.resetFields();
data.list = [];
data.rectifyUserList = [];
visible.value = false; visible.value = false;
}; };
const fnSubmit = debounce( const fnSubmit = debounce(
1000, 1000,
async () => { async () => {
await useFormValidate(formRef); await useFormValidate(formRef);
const loading = ElLoading.service({ let currentHiddenId = "";
lock: true, let params = {
text: "加载中...", ...form.value,
background: "rgba(0, 0, 0, 0.5)", STATE: "0",
}); HIDDENTYPE1: form.value.HIDDENTYPE[0],
const geolocation = new window.BMapGL.Geolocation(); HIDDENTYPE2: form.value.HIDDENTYPE[1],
geolocation.getCurrentPosition(async (r) => { HIDDENTYPE3: form.value.HIDDENTYPE[2],
loading.close(); HIDDENTYPE_NAME: hiddenDangerTypeRef.value.getCheckedNodes(),
if (!r) { LISTMANAGER_ID: props.listManagerId,
ElMessage.error("获取位置信息失败,请重新提交"); };
if (props.hiddenType === "unqualified") {
if (!props.longitude && !props.latitude) {
ElMessage.error("正在获取当前位置中,请等待");
return; return;
} }
let currentHiddenId = "";
let params = {};
if (props.hiddenType === "unqualified") {
params = { params = {
...form.value, ...params,
SOURCE: "2", SOURCE: "2",
STATE: "0",
RISK_UNIT: props.info.RISKUNITNAME, RISK_UNIT: props.info.RISKUNITNAME,
IDENTIFICATION: props.info.PARTSNAME, IDENTIFICATION: props.info.PARTSNAME,
RISK_DESCR: props.info.RISK_DESCR, RISK_DESCR: props.info.RISK_DESCR,
@ -366,19 +379,33 @@ const fnSubmit = debounce(
CHECK_CONTENT: props.info.CHECK_CONTENT, CHECK_CONTENT: props.info.CHECK_CONTENT,
RECORDITEM_ID: props.info.RECORDITEM_ID, RECORDITEM_ID: props.info.RECORDITEM_ID,
RISKITEM_ID: props.info.LISTCHECKITEM_ID, RISKITEM_ID: props.info.LISTCHECKITEM_ID,
LISTMANAGER_ID: props.listManagerId, LONGITUDE: props.longitude,
LONGITUDE: r.longitude, LATITUDE: props.latitude,
LATITUDE: r.latitude,
HIDDENTYPE1: form.value.HIDDENTYPE[0],
HIDDENTYPE2: form.value.HIDDENTYPE[1],
HIDDENTYPE3: form.value.HIDDENTYPE[2],
HIDDENTYPE_NAME: hiddenDangerTypeRef.value.getCheckedNodes(),
}; };
const resData = await setInventoryTroubleshootingOtherHiddenDangerAdd( const resData = await setInventoryTroubleshootingOtherHiddenDangerAdd(
params params
); );
currentHiddenId = resData.pd.HIDDEN_ID; currentHiddenId = resData.pd.HIDDEN_ID;
} }
if (props.hiddenType === "otherHidden") {
params = {
...params,
HIDDEN_ID: props.info.HIDDEN_ID,
SOURCE: "3",
HAVESCHEME: 0,
};
if (props.type === "add") {
const resData =
await setInventoryTroubleshootingOtherHiddenDangerListAdd(params);
currentHiddenId = resData.pd.HIDDEN_ID;
}
if (props.type === "edit") {
const resData = await setInventoryTroubleshootingOtherHiddenDangerEdit(
params
);
currentHiddenId = resData.pd.HIDDEN_ID;
}
}
for (let i = 0; i < form.value.hiddenImgs.length; i++) { for (let i = 0; i < form.value.hiddenImgs.length; i++) {
if (form.value.hiddenImgs[i].raw) if (form.value.hiddenImgs[i].raw)
await fnUploadImage(currentHiddenId, form.value.hiddenImgs[i].raw, 3); await fnUploadImage(currentHiddenId, form.value.hiddenImgs[i].raw, 3);
@ -389,16 +416,11 @@ const fnSubmit = debounce(
} }
for (let i = 0; i < form.value.rectifyImgs.length; i++) { for (let i = 0; i < form.value.rectifyImgs.length; i++) {
if (form.value.rectifyImgs[i].raw) if (form.value.rectifyImgs[i].raw)
await fnUploadImage( await fnUploadImage(currentHiddenId, form.value.rectifyImgs[i].raw, 4);
currentHiddenId,
form.value.rectifyImgs[i].raw,
4
);
} }
fnClose(); fnClose();
ElMessage.success("保存成功"); ElMessage.success("保存成功");
emits("submit", currentHiddenId); emits("submit", currentHiddenId);
});
}, },
{ atBegin: true } { atBegin: true }
); );

View File

@ -158,8 +158,8 @@ const router = useRouter();
let ISREST = ""; let ISREST = "";
const { list, pagination, searchForm, fnGetData, fnResetPagination } = const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getInventoryTroubleshootingList, { useListData(getInventoryTroubleshootingList, {
callbackFn: (list, responseData) => { callbackFn: (list, resData) => {
ISREST = responseData.ISREST; ISREST = resData.ISREST;
}, },
}); });
const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle(); const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle();

View File

@ -51,7 +51,7 @@
<el-radio :label="1" @click.prevent="fnUnqualified($index, row)"> <el-radio :label="1" @click.prevent="fnUnqualified($index, row)">
不合格 不合格
</el-radio> </el-radio>
<el-radio :label="2" @click.prevent="fnNotInvolved($index)"> <el-radio :label="2" @click.prevent="fnNotInvolved($index, row)">
不涉及 不涉及
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
@ -60,7 +60,9 @@
</layout-table> </layout-table>
<el-divider content-position="left">其他隐患</el-divider> <el-divider content-position="left">其他隐患</el-divider>
<div class="tr mb-10"> <div class="tr mb-10">
<el-button type="primary"> 添加 </el-button> <el-button type="primary" @click="fnAddOrEditOtherHidden({}, 'add')">
添加
</el-button>
</div> </div>
<layout-table :data="otherHiddenList" :show-pagination="false"> <layout-table :data="otherHiddenList" :show-pagination="false">
<el-table-column label="序号" width="70" type="index" /> <el-table-column label="序号" width="70" type="index" />
@ -71,7 +73,7 @@
type="primary" type="primary"
text text
link link
@click="editOtherHidden(row.HIDDEN_ID)" @click="fnAddOrEditOtherHidden(row, 'edit')"
> >
修改 修改
</el-button> </el-button>
@ -79,7 +81,7 @@
type="primary" type="primary"
text text
link link
@click="removeOtherHidden(row.HIDDEN_ID)" @click="fnDeleteOtherHidden(row.HIDDEN_ID)"
> >
删除 删除
</el-button> </el-button>
@ -97,8 +99,8 @@
<el-form-item label="检查时间" prop="CHECK_TIME"> <el-form-item label="检查时间" prop="CHECK_TIME">
<el-date-picker <el-date-picker
v-model="data.form.CHECK_TIME" v-model="data.form.CHECK_TIME"
format="YYYY-MM-DD HH:mm:SS" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:SS" value-format="YYYY-MM-DD HH:mm:ss"
type="datetime" type="datetime"
placeholder="这里输入检查时间" placeholder="这里输入检查时间"
/> />
@ -201,17 +203,21 @@
:hidden-type="data.unQualifiedDialog.hiddenType" :hidden-type="data.unQualifiedDialog.hiddenType"
:list-manager-id="LISTMANAGER_ID" :list-manager-id="LISTMANAGER_ID"
:info="{ ...data.unQualifiedDialog.info, ...info.value }" :info="{ ...data.unQualifiedDialog.info, ...info.value }"
:longitude="data.longitude"
:latitude="data.latitude"
@submit="fnHiddenSubmit" @submit="fnHiddenSubmit"
/> />
</layout-card> </layout-card>
</template> </template>
<script setup> <script setup>
import { nextTick, reactive, ref } from "vue"; import { nextTick, onMounted, reactive, ref } from "vue";
import { import {
getInventoryManagementView, getInventoryManagementView,
getInventoryTroubleshootingOtherHiddenList, getInventoryTroubleshootingOtherHiddenList,
setInventoryTroubleshootingOtherHiddenDangerView, getInventoryTroubleshootingOtherHiddenDangerView,
setInventoryTroubleshootingOtherHiddenDangerDelete,
setInventoryTroubleshootingSubmit,
} from "@/request/hazard_investigation.js"; } from "@/request/hazard_investigation.js";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import useListData from "@/assets/js/useListData.js"; import useListData from "@/assets/js/useListData.js";
@ -225,9 +231,10 @@ import { getUserListAll } from "@/request/data_dictionary.js";
import { getViewImg } from "@/request/api.js"; import { getViewImg } from "@/request/api.js";
import { debounce } from "throttle-debounce"; import { debounce } from "throttle-debounce";
import useFormValidate from "@/assets/js/useFormValidate.js"; import useFormValidate from "@/assets/js/useFormValidate.js";
import { ElLoading, ElMessage } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import Qualified from "./components/qualified.vue"; import Qualified from "./components/qualified.vue";
import UnQualified from "./components/un_qualified.vue"; import UnQualified from "./components/un_qualified.vue";
import { cloneDeep } from "lodash-es";
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@ -240,6 +247,8 @@ const rules = {
const formRef = ref(null); const formRef = ref(null);
const info = ref({}); const info = ref({});
const data = reactive({ const data = reactive({
longitude: 0,
latitude: 0,
form: { form: {
CHECK_TIME: "", CHECK_TIME: "",
inspectedList: [], inspectedList: [],
@ -272,17 +281,30 @@ const data = reactive({
}, },
}, },
}); });
onMounted(() => {
const geolocation = new window.BMapGL.Geolocation();
geolocation.getCurrentPosition(async (r) => {
if (!r) {
await ElMessageBox.alert("获取位置信息失败,请刷新重试", {
type: "warning",
});
window.location.reload();
}
data.longitude = r.longitude;
data.latitude = r.latitude;
});
});
const { list: inspectionList } = useListData(getInventoryManagementView, { const { list: inspectionList } = useListData(getInventoryManagementView, {
otherParams: { LISTMANAGER_ID }, otherParams: { LISTMANAGER_ID },
usePagination: false, usePagination: false,
callbackFn: (list, responseData) => { callbackFn: (list, resData) => {
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
if (list[i].HASHIDDEN <= 0) list[i].ISNORMAL = 0; if (list[i].HASHIDDEN <= 0) list[i].ISNORMAL = 0;
} }
info.value = responseData.pd; info.value = resData.pd;
}, },
}); });
const { list: otherHiddenList } = useListData( const { list: otherHiddenList, fnGetData: fnGetOtherHidden } = useListData(
getInventoryTroubleshootingOtherHiddenList, getInventoryTroubleshootingOtherHiddenList,
{ {
otherParams: { LISTMANAGER_ID }, otherParams: { LISTMANAGER_ID },
@ -291,6 +313,7 @@ const { list: otherHiddenList } = useListData(
} }
); );
const fnQualified = async (index, row) => { const fnQualified = async (index, row) => {
if (row.HASHIDDEN > 0) return;
data.qualifiedDialog.visible = true; data.qualifiedDialog.visible = true;
await nextTick(); await nextTick();
data.qualifiedDialog.RECORDITEM_ID = row.RECORDITEM_ID; data.qualifiedDialog.RECORDITEM_ID = row.RECORDITEM_ID;
@ -304,7 +327,8 @@ const fnQualified = async (index, row) => {
} }
inspectionList.value[index].ISNORMAL = 0; inspectionList.value[index].ISNORMAL = 0;
}; };
const fnNotInvolved = (index) => { const fnNotInvolved = (index, row) => {
if (row.HASHIDDEN > 0) return;
fnRemoveUnqualified(index); fnRemoveUnqualified(index);
inspectionList.value[index].ISNORMAL = 2; inspectionList.value[index].ISNORMAL = 2;
}; };
@ -312,6 +336,7 @@ const fnRemoveUnqualified = (index) => {
inspectionList.value[index].HIDDEN_ID = ""; inspectionList.value[index].HIDDEN_ID = "";
}; };
const fnUnqualified = async (index, row) => { const fnUnqualified = async (index, row) => {
if (row.HASHIDDEN > 0) return;
data.unQualifiedDialog.visible = true; data.unQualifiedDialog.visible = true;
await nextTick(); await nextTick();
if ( if (
@ -328,7 +353,7 @@ const fnUnqualified = async (index, row) => {
data.unQualifiedDialog.hiddenType = "unqualified"; data.unQualifiedDialog.hiddenType = "unqualified";
}; };
const fnGetHiddenDangerView = async (HIDDEN_ID) => { const fnGetHiddenDangerView = async (HIDDEN_ID) => {
const resData = await setInventoryTroubleshootingOtherHiddenDangerView({ const resData = await getInventoryTroubleshootingOtherHiddenDangerView({
HIDDEN_ID, HIDDEN_ID,
}); });
data.unQualifiedDialog.form = resData.pd; data.unQualifiedDialog.form = resData.pd;
@ -354,6 +379,9 @@ const fnHiddenSubmit = (currentHiddenId) => {
inspectionList.value[index].ISNORMAL = 1; inspectionList.value[index].ISNORMAL = 1;
inspectionList.value[index].HIDDEN_ID = currentHiddenId; inspectionList.value[index].HIDDEN_ID = currentHiddenId;
} }
if (hiddenType === "otherHidden") {
fnGetOtherHidden();
}
}; };
const fnAddInspectedList = () => { const fnAddInspectedList = () => {
data.form.inspectedList.push({ data.form.inspectedList.push({
@ -372,19 +400,50 @@ const fnInspectDepartmentChange = async (event, index) => {
}); });
data.form.inspectedList[index].userList = resData.userList; data.form.inspectedList[index].userList = resData.userList;
}; };
const fnDeleteOtherHidden = async (HIDDEN_ID) => {
await ElMessageBox.confirm("确定要删除吗?", {
type: "warning",
});
await setInventoryTroubleshootingOtherHiddenDangerDelete({ HIDDEN_ID });
fnGetOtherHidden();
};
const fnAddOrEditOtherHidden = async (row, type) => {
data.unQualifiedDialog.visible = true;
await nextTick();
data.unQualifiedDialog.type = type;
data.unQualifiedDialog.info = row;
data.unQualifiedDialog.hiddenType = "otherHidden";
if (type === "edit") await fnGetHiddenDangerView(row.HIDDEN_ID);
};
const fnSubmit = debounce( const fnSubmit = debounce(
1000, 1000,
async () => { async () => {
await useFormValidate(formRef); await useFormValidate(formRef);
const loading = ElLoading.service({ const items = [];
lock: true, const ids = [];
text: "加载中...", for (let i = 0; i < inspectionList.value.length; i++) {
background: "rgba(0, 0, 0, 0.5)", const item = {};
}); item.LISTCHECKITEM_ID = inspectionList.value[i].LISTCHECKITEM_ID;
const geolocation = new window.BMapGL.Geolocation(); item.ISNORMAL = inspectionList.value[i].ISNORMAL;
geolocation.getCurrentPosition(async (r) => { item.RECORDITEM_ID = inspectionList.value[i].RECORDITEM_ID;
console.log(r); items.push(item);
loading.close(); if (inspectionList.value[i].ISNORMAL === 1)
ids.push(inspectionList.value[i].HIDDEN_ID);
}
const inspectedList = cloneDeep(data.form.inspectedList);
if (inspectedList.length > 0) inspectedList.splice(0, 1);
await setInventoryTroubleshootingSubmit({
LISTMANAGER_ID,
LIST_NAME: info.value.NAME,
CHECK_TIME: data.form.CHECK_TIME,
DESCR: data.form.DESCR,
ITEMS: JSON.stringify(items),
IDS: ids.join(","),
CHECKDEPT: data.form.inspectedList[0].DEPARTMENT_ID,
CHECKOR: data.form.inspectedList[0].USER_ID,
OTHER: JSON.stringify(inspectedList),
LONGITUDE: data.longitude,
LATITUDE: data.latitude,
}); });
ElMessage.success("操作成功"); ElMessage.success("操作成功");
router.back(); router.back();

View File

@ -288,7 +288,7 @@ const fnPreviewVideo = async (row) => {
}); });
if (respData && respData.type === "success") { if (respData && respData.type === "success") {
const video = {}; const video = {};
respData.videoList.forEach((item) => { respData.videoList?.forEach((item) => {
video[item.definition] = item.playURL; video[item.definition] = item.playURL;
}); });
data.videoDialog.src = JSON.stringify(video); data.videoDialog.src = JSON.stringify(video);

View File

@ -210,7 +210,7 @@ const fnPreviewVideo = async (row) => {
}); });
if (respData && respData.type === "success") { if (respData && respData.type === "success") {
const video = {}; const video = {};
respData.videoList.forEach((item) => { respData.videoList?.forEach((item) => {
video[item.definition] = item.playURL; video[item.definition] = item.playURL;
}); });
data.videoDialog.src = JSON.stringify(video); data.videoDialog.src = JSON.stringify(video);

View File

@ -196,7 +196,7 @@ const fnPreviewVideo = async (row) => {
}); });
if (respData && respData.type === "success") { if (respData && respData.type === "success") {
const video = {}; const video = {};
respData.videoList.forEach((item) => { respData.videoList?.forEach((item) => {
video[item.definition] = item.playURL; video[item.definition] = item.playURL;
}); });
data.videoDialog.src = JSON.stringify(video); data.videoDialog.src = JSON.stringify(video);

View File

@ -4,7 +4,6 @@
<el-descriptions-item label="试卷名称"> <el-descriptions-item label="试卷名称">
{{ data.paperInfo.EXAMNAME }} {{ data.paperInfo.EXAMNAME }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="" />
<el-descriptions-item label="试卷总分"> <el-descriptions-item label="试卷总分">
{{ data.paperInfo.EXAMSCORE }} {{ data.paperInfo.EXAMSCORE }}
</el-descriptions-item> </el-descriptions-item>
@ -37,7 +36,7 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<template v-for="(row, index) in data.questionList" :key="row.QUESTION_ID"> <div v-for="(row, index) in data.questionList" :key="row.QUESTION_ID">
<div class="mt-20"> <div class="mt-20">
{{ index + 1 }}. {{ index + 1 }}.
<span v-if="row.QUESTIONTYPE === '1'" class="question-type"> <span v-if="row.QUESTIONTYPE === '1'" class="question-type">
@ -83,7 +82,7 @@
</el-radio-group> </el-radio-group>
</div> </div>
<div class="mt-10">答案{{ row.ANSWER }}</div> <div class="mt-10">答案{{ row.ANSWER }}</div>
</template> </div>
</layout-card> </layout-card>
</template> </template>