|
@@ -0,0 +1,253 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="abstract">
|
|
|
|
+ <el-tabs v-model="activeName" class="demo-tabs h-full" @tab-click="handleClick">
|
|
|
|
+ <el-tab-pane label="现场图" name="1">
|
|
|
|
+ <div class="xct">
|
|
|
|
+ <el-button
|
|
|
|
+ style="width: calc(50% - 7px)"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="submitForm(ruleFormRef)"
|
|
|
|
+ >
|
|
|
|
+ 绘制平面图
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ style="width: calc(50% - 6px)"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="submitForm(ruleFormRef)"
|
|
|
|
+ >
|
|
|
|
+ AI 平面图
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ class="w-full mt-4"
|
|
|
|
+ style="margin-left: 0"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="submitForm(ruleFormRef)"
|
|
|
|
+ >
|
|
|
|
+ 绘制方位图
|
|
|
|
+ </el-button>
|
|
|
|
+ <div class="phote my-4">
|
|
|
|
+ <p class="pb-4">平面图</p>
|
|
|
|
+ <div class="pmt-phote w-full flex justify-between">
|
|
|
|
+ <div
|
|
|
|
+ class="phote-item"
|
|
|
|
+ style="width: calc(50% - 10px)"
|
|
|
|
+ v-for="(item, index) in srcList"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <el-image
|
|
|
|
+ style="width: 100%; height: 100px"
|
|
|
|
+ :src="item"
|
|
|
|
+ :zoom-rate="1.2"
|
|
|
|
+ :max-scale="7"
|
|
|
|
+ :min-scale="0.2"
|
|
|
|
+ :preview-src-list="srcList"
|
|
|
|
+ preview-teleported
|
|
|
|
+ :initial-index="index"
|
|
|
|
+ fit="cover"
|
|
|
|
+ />
|
|
|
|
+ <div class="but flex justify-around">
|
|
|
|
+ <el-icon :size="20"><Edit /></el-icon>
|
|
|
|
+ <el-icon color="red" :size="20"><Delete /></el-icon>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="phote my-4">
|
|
|
|
+ <p class="pb-4">方位图</p>
|
|
|
|
+ <div class="pmt-phote w-full flex justify-between">
|
|
|
|
+ <div
|
|
|
|
+ class="phote-item"
|
|
|
|
+ style="width: calc(50% - 10px)"
|
|
|
|
+ v-for="(item, index) in srcList"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <el-image
|
|
|
|
+ style="width: 100%; height: 100px"
|
|
|
|
+ :src="item"
|
|
|
|
+ :zoom-rate="1.2"
|
|
|
|
+ :max-scale="7"
|
|
|
|
+ :min-scale="0.2"
|
|
|
|
+ :preview-src-list="srcList"
|
|
|
|
+ preview-teleported
|
|
|
|
+ :initial-index="index"
|
|
|
|
+ fit="cover"
|
|
|
|
+ />
|
|
|
|
+ <div class="but flex justify-around">
|
|
|
|
+ <el-icon :size="20"><Edit /></el-icon>
|
|
|
|
+ <el-icon color="red" :size="20"><Delete /></el-icon>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane class="h-full" label="现场照片" name="2">
|
|
|
|
+ <div class="scene relative h-full">
|
|
|
|
+ <el-button class="w-full" @click="handleAdd">上传</el-button>
|
|
|
|
+ <!-- <el-button class="w-full my-4" style="margin-left: 0; margin-right: 0">添加场景</el-button> -->
|
|
|
|
+ <div class="scene-list">
|
|
|
|
+ <div
|
|
|
|
+ class="scene-title flex justify-between content-center py-4"
|
|
|
|
+ style="line-height: 14px"
|
|
|
|
+ >
|
|
|
|
+ <span>场景列表</span>
|
|
|
|
+ <span @click="settype = !settype">{{
|
|
|
|
+ settype ? "完成" : "修改分类"
|
|
|
|
+ }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="list">
|
|
|
|
+ <div class="listItem py-2" v-for="item in 3" :key="itme">
|
|
|
|
+ <div class="title1">一级标题</div>
|
|
|
|
+ <div class="list2">
|
|
|
|
+ <div class="title2">2级标题</div>
|
|
|
|
+
|
|
|
|
+ <div
|
|
|
|
+ class="item2 inline-block relative"
|
|
|
|
+ v-for="(item2, index) in srcList"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <el-icon
|
|
|
|
+ :size="20"
|
|
|
|
+ class="absolute z-1 cursor-pointer"
|
|
|
|
+ style="right: -0px; top: -8px"
|
|
|
|
+ >
|
|
|
|
+ <CircleCloseFilled @click="handleDel" v-if="!settype" />
|
|
|
|
+ <EditPen v-else />
|
|
|
|
+ </el-icon>
|
|
|
|
+ <el-image
|
|
|
|
+ class="z-0 relative"
|
|
|
|
+ :preview-src-list="srcList"
|
|
|
|
+ preview-teleported
|
|
|
|
+ :initial-index="index"
|
|
|
|
+ style="width: 80px; height: 80px; margin-right: 10px"
|
|
|
|
+ :src="item2"
|
|
|
|
+ :fit="fit"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <el-button class="w-full absolute bottom-0" @click="handleAdd">照片制卷</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="勘验笔录" name="3">
|
|
|
|
+ <div class="blfrom">
|
|
|
|
+ <el-upload
|
|
|
|
+ class="upload-demo"
|
|
|
|
+ :multiple="false"
|
|
|
|
+ drag
|
|
|
|
+ :limit="1"
|
|
|
|
+ :disabled="!!file"
|
|
|
|
+ :before-upload="upload"
|
|
|
|
+ :file-list="fileList"
|
|
|
|
+ :http-request="() => {}"
|
|
|
|
+ :on-preview="previewFile"
|
|
|
|
+ :accept="accept"
|
|
|
|
+ :before-remove="removeFile"
|
|
|
|
+ >
|
|
|
|
+ <div type="primary" :disabled="!!file">
|
|
|
|
+ <div>点击或拖拽文件上传</div>
|
|
|
|
+ <div class="">支持 pdf、word 格式图片上传</div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-upload>
|
|
|
|
+ <el-button class="w-full" @click="handleAdd">在线填写</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="blList">
|
|
|
|
+ <div class="bllistItem flex justify-between items-center mt-2">
|
|
|
|
+ <div>点击或拖拽文件上传11</div>
|
|
|
|
+ <el-dropdown>
|
|
|
|
+ <el-icon>
|
|
|
|
+ <MoreFilled />
|
|
|
|
+ </el-icon>
|
|
|
|
+ <template #dropdown>
|
|
|
|
+ <el-dropdown-menu>
|
|
|
|
+ <el-dropdown-item>编辑</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item>删除</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item>下载</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup lang="ts">
|
|
|
|
+import { computed, ref, reactive } from "vue";
|
|
|
|
+import { addCaseFile } from "../originalPhoto/quisk";
|
|
|
|
+import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
+import { useUpload } from "@/hook/upload";
|
|
|
|
+import { Delete, Edit } from "@element-plus/icons-vue";
|
|
|
|
+const active = ref(true);
|
|
|
|
+const srcList = [
|
|
|
|
+ "https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg",
|
|
|
|
+ "https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg",
|
|
|
|
+];
|
|
|
|
+const settype = ref(false);
|
|
|
|
+const ruleFormRef = ref(null);
|
|
|
|
+const activeName = ref("1");
|
|
|
|
+const showModal = ref(false);
|
|
|
|
+const { size, fileList, upload, removeFile, previewFile, file, accept } =
|
|
|
|
+ useUpload({
|
|
|
|
+ maxSize: 10 * 1024 * 1024,
|
|
|
|
+ formats: [".word", ".pdf"],
|
|
|
|
+ });
|
|
|
|
+const handleClick = (tab) => {
|
|
|
|
+ console.log(tab);
|
|
|
|
+};
|
|
|
|
+const submitForm = async (formEl) => {
|
|
|
|
+ if (!formEl) return;
|
|
|
|
+ await formEl.validate((valid, fields) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ console.log("submit!");
|
|
|
|
+ } else {
|
|
|
|
+ console.log("error submit!", fields);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+const resetForm = (formEl) => {
|
|
|
|
+ if (!formEl) return;
|
|
|
|
+ formEl.resetFields();
|
|
|
|
+};
|
|
|
|
+function handleActive(params) {
|
|
|
|
+ console.log("handleActive", params);
|
|
|
|
+}
|
|
|
|
+async function handleAdd() {
|
|
|
|
+ await addCaseFile({ caseId: 2, fileType: 1 });
|
|
|
|
+ console.log("handleAdd");
|
|
|
|
+}
|
|
|
|
+function handleDel() {
|
|
|
|
+ ElMessageBox.confirm("确定删除?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ }).then(() => {
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "删除成功",
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.abstract {
|
|
|
|
+ height: 100%;
|
|
|
|
+ .el-form-item--label-top {
|
|
|
|
+ margin-bottom: 14px;
|
|
|
|
+ }
|
|
|
|
+ .form-content {
|
|
|
|
+ height: calc(100vh - 225px);
|
|
|
|
+ overflow-y: scroll;
|
|
|
|
+ }
|
|
|
|
+ .demo-tabs {
|
|
|
|
+ .el-tabs__item {
|
|
|
|
+ height: 32px;
|
|
|
|
+ line-height: 32px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|