|
@@ -117,7 +117,6 @@
|
|
|
</van-field>
|
|
|
</van-cell-group>
|
|
|
|
|
|
-
|
|
|
<van-cell-group>
|
|
|
<div class="rowTextArea">
|
|
|
<van-field
|
|
@@ -143,6 +142,8 @@ import { reactive, ref } from "vue";
|
|
|
import personList from "../personList.vue";
|
|
|
import siteInspectionService from "@/api/siteInspection/siteInspectionService";
|
|
|
import tools from "@/api/sys/tools";
|
|
|
+// 图片路径
|
|
|
+import $base from "@/utils/config";
|
|
|
export default {
|
|
|
components: { personList },
|
|
|
setup() {
|
|
@@ -234,8 +235,29 @@ export default {
|
|
|
// window.xm.showToast({
|
|
|
// message:data.url
|
|
|
// })
|
|
|
- fileList.value.push("http://localhost:3000"+data.url);
|
|
|
- //siteInspection.value.enclosure = data.url;
|
|
|
+ // /fileList.value.push("http://localhost:3000"+data.url);
|
|
|
+
|
|
|
+
|
|
|
+ data.name = decodeURIComponent(
|
|
|
+ data.url.substring(
|
|
|
+ data.url.lastIndexOf("/") + 1
|
|
|
+ )
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+ data.url = `${$base}` + data.url;
|
|
|
+ fileList.value.push(data);
|
|
|
+ siteInspection.value.enclosure = data.url;
|
|
|
+
|
|
|
+ //fileList.value[0].url = `${$base}` + fileList.value[0].url;
|
|
|
+ // fileList.value[0].name = decodeURIComponent(
|
|
|
+ // fileList.value[0].url.substring(
|
|
|
+ // fileList.value[0].url.lastIndexOf("/") + 1
|
|
|
+ // )
|
|
|
+ // );
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
};
|
|
|
// 提交数据
|
|
@@ -342,4 +364,15 @@ export default {
|
|
|
width: 80%;
|
|
|
top: 50%;
|
|
|
}
|
|
|
+.preview-cover {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 100%;
|
|
|
+ padding: 4px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: center;
|
|
|
+ background: rgba(0, 0, 0, 0.3);
|
|
|
+ }
|
|
|
</style>
|