|
@@ -11,24 +11,65 @@
|
|
|
请上传执行照片
|
|
请上传执行照片
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <upload :textShow="true" class="upload-wrap"></upload>
|
|
|
|
|
- <div class="btn" @click="handleUpload">请求确认</div>
|
|
|
|
|
|
|
+ <upload exampleImg class="upload-wrap" @handleUpload="handleUpload">
|
|
|
|
|
+ <img class="example" src="@/assets/img/home/example-4.png" alt="" />
|
|
|
|
|
+ <img class="example" src="@/assets/img/home/plus.png" alt="">
|
|
|
|
|
+ </upload>
|
|
|
|
|
+ <div class="btn" @click="handleConfirm">请求确认</div>
|
|
|
</popup>
|
|
</popup>
|
|
|
|
|
+ <FnShareSheet v-model:show="showShare" @select="onSelect" :class="className" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { Popup } from "vant";
|
|
import { Popup } from "vant";
|
|
|
-import { onMounted, onUnmounted, ref } from "vue";
|
|
|
|
|
|
|
+import { ref } from "vue";
|
|
|
import upload from "@/components/upload";
|
|
import upload from "@/components/upload";
|
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
|
|
|
+import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
|
|
|
|
|
+
|
|
|
|
|
+const props = defineProps({
|
|
|
|
|
+ onlyShare: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: false,
|
|
|
|
|
+ },
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
const show = ref(false);
|
|
const show = ref(false);
|
|
|
|
|
+const className = ref(null);
|
|
|
|
|
+const farmWorkRecordId = ref(null);
|
|
|
|
|
+function showPopup(id,classNameVal) {
|
|
|
|
|
+ if (props.onlyShare) {
|
|
|
|
|
+ showShare.value = true;
|
|
|
|
|
+ className.value = classNameVal;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ show.value = true;
|
|
|
|
|
+ farmWorkRecordId.value = id;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const images = ref([]);
|
|
|
|
|
+function handleUpload({imgArr}) {
|
|
|
|
|
+ images.value = imgArr;
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
-function showPopup() {
|
|
|
|
|
- show.value = true;
|
|
|
|
|
|
|
+function handleConfirm() {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ recordId: farmWorkRecordId.value,
|
|
|
|
|
+ executeEvidence: images.value,
|
|
|
|
|
+ };
|
|
|
|
|
+ VE_API.z_farm_work_record.addExecuteImg(params).then((res) => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ ElMessage.success('请求确认成功');
|
|
|
|
|
+ show.value = false;
|
|
|
|
|
+ showShare.value = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function handleUpload() {}
|
|
|
|
|
|
|
+const showShare = ref(false);
|
|
|
|
|
+const onSelect = ({type}) => {
|
|
|
|
|
+ console.log(type);
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
showPopup,
|
|
showPopup,
|
|
@@ -69,6 +110,13 @@ defineExpose({
|
|
|
.upload-wrap {
|
|
.upload-wrap {
|
|
|
margin: 12px 0 24px;
|
|
margin: 12px 0 24px;
|
|
|
}
|
|
}
|
|
|
|
|
+ .example {
|
|
|
|
|
+ width: 80px;
|
|
|
|
|
+ height: 80px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .example + .example {
|
|
|
|
|
+ margin-left: 12px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.btn {
|
|
.btn {
|
|
@@ -81,3 +129,8 @@ defineExpose({
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
</style>
|
|
|
|
|
+<style>
|
|
|
|
|
+.share-sheet{
|
|
|
|
|
+ bottom: 50px;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|