yin_yu820 2 лет назад
Родитель
Сommit
bfc5b4ff78

+ 0 - 1
src/views/activityMan/nonReligiousInformation/nonReligiousInformationInfo.vue

@@ -28,7 +28,6 @@
   import { useRoute } from "vue-router";
   export default {
     setup() {
-      //window.xm.setNavigationBarTitle({ title: '其他有害信息详情'})
       let isLoading = ref(true);
       let canAudit = ref(false);
       // 活动信息

+ 0 - 1
src/views/activityMan/religiousConference/religiousConferenceInfo.vue

@@ -25,7 +25,6 @@
   import religiousConferenceService from "@/api/religiousConference/religiousConferenceService";  
   export default {
     setup() {
-      //window.xm.setNavigationBarTitle({ title: '负责人会议详情'})
       let isLoading = ref(true);
       let canAudit = ref(false);
       // 活动信息

+ 0 - 1
src/views/activityMan/securityFacilitiesErr/securityFacilitiesErrInfo.vue

@@ -34,7 +34,6 @@
   import { useRoute } from "vue-router";
   export default {
     setup() {
-      window.xm.setNavigationBarTitle({ title: '安防设施异常详情'})
       let isLoading = ref(true);
       let canAudit = ref(false);
       // 活动信息

+ 0 - 1
src/views/activityMan/siteInspection/siteInspectionInfo.vue

@@ -32,7 +32,6 @@
   import { useRoute } from "vue-router";
   export default {
     setup() {
-      //window.xm.setNavigationBarTitle({ title: '场所检查详情'})
       let isLoading = ref(true);
       let canAudit = ref(false);
       // 活动信息

+ 0 - 1
src/views/activityMan/siteInspection/siteInspectionList.vue

@@ -57,7 +57,6 @@ import siteInspectionService from "@/api/siteInspection/siteInspectionService";
 export default {
   name: "siteInspectionList",
   setup() {
-    window.xm.setNavigationBarTitle({ title: '场所检查情况'})
     const onClickLeft = () => {
       history.back();
     };

+ 40 - 11
src/views/activityMan/siteInspection/siteInspectionView.vue

@@ -32,16 +32,6 @@
       </van-cell-group>
 
       <van-cell-group>
-        <!-- <van-field
-          v-model="siteInspection.place"
-          center
-          readonly
-          label="地点:"
-          placeholder="请填写地点"
-          input-align="right"
-          right-icon="arrow-down"
-          @click="showArea = true"
-        /> -->
         <van-field
           v-model="siteInspection.place"
           center
@@ -98,7 +88,7 @@
         </van-popup>
       </van-cell-group>
 
-      <van-cell-group>
+      <!-- <van-cell-group>
         <van-field name="uploader" label="附件:">
           <template #input>
             <van-uploader>
@@ -106,7 +96,28 @@
             </van-uploader>
           </template>
         </van-field>
+      </van-cell-group> -->
+
+      <van-cell-group>
+        <van-field name="uploader" label="附件:">
+          <template #input>
+            <van-uploader
+              :after-read="afterRead"
+              v-model="fileList"
+              :max-count="1"
+              capture="camera"
+              accept=""
+            >
+              <van-button icon="plus">上传文件</van-button>
+              <template #preview-cover="file">
+                <div class="preview-cover van-ellipsis">{{ file.name }}</div>
+              </template>
+            </van-uploader>
+          </template>
+        </van-field>
       </van-cell-group>
+
+
       <van-cell-group>
         <div class="rowTextArea">
           <van-field
@@ -212,6 +223,21 @@ export default {
           .join("/");
       }
     };
+    // 文件上传
+    let fileList = ref([]);
+    const afterRead = (file) => {
+      fileList.value = [];
+      // 此时可以自行将文件上传至服务器
+      new tools()
+        .uploadFile(file, `csjcqk/siteInspection`)
+        .then(({ data }) => {
+          // window.xm.showToast({
+          //     message:data.url
+          // })
+          fileList.value.push("http://localhost:3000"+data.url);
+          //siteInspection.value.enclosure = data.url;
+        });
+    };
     // 提交数据
     const submit = () => {
       //添加保存前判断
@@ -247,6 +273,9 @@ export default {
       options,
       onFinish,
       cascaderValue,
+      // 文件上传
+      afterRead,
+      fileList,
       submit,
     };
   },