guoqing 2 years ago
parent
commit
8757d1e5e1

+ 15 - 10
public/index.html

@@ -1,20 +1,25 @@
 <!DOCTYPE html>
 <html lang="">
-  <head>
+
+<head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable = no">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title><%= htmlWebpackPlugin.options.title %></title>
-
+    <title>
+        <%= htmlWebpackPlugin.options.title %>
+    </title>
     <!--小程序SDK 只有在小程序容器中才能加载到 -->
-	  <script src="shinemosdk://20000/index.js"></script>
-  </head>
-  <body>
+    <script src="shinemosdk://20000/index.js"></script>
+</head>
+
+<body>
     <noscript>
-      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+        <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
+                Please enable it to continue.</strong>
     </noscript>
     <div id="app"></div>
     <!-- built files will be auto injected -->
-  </body>
-</html>
+</body>
+
+</html>

BIN
public/loginbg/banner.jpg


+ 9 - 2
src/components/editor/WangEditor.vue

@@ -44,6 +44,7 @@ export default {
       this.editor.customConfig.placeholder = "请输入内容....";
       this.editor.customConfig.zIndex = 500;
       this.editor.customConfig.height = 150;
+      this.editor.customConfig.showLinkImg = false;
       this.editor.customConfig.uploadImgShowBase64 = true; // base 64 存储图片
       this.editor.customConfig.uploadImgServer = ""; // 配置服务器端地址
       this.editor.customConfig.uploadImgHeaders = {}; // 自定义 header
@@ -89,8 +90,14 @@ export default {
 <style lang="css">
 #editor {
   width: 100%;
-  height: 150px;
+  height: 400px;
   margin: 0 auto;
+  padding-right: 0 !important;
+}
+.w-e-text-container {
+  height: 300px !important;
+}
+.w-e-panel-container {
+  width: 120px !important;
 }
-
 </style>

+ 1 - 1
src/main.js

@@ -3,7 +3,7 @@ import App from './App.vue';
 import router from './router';
 
 import './styles/index.css';
-
+import './styles/style.css';
 import api from '@/api';
 import axios from 'axios';
 

+ 6 - 1
src/styles/index.css

@@ -7,7 +7,12 @@
 
 body {
     background-color: #f5f5f5;
-    ;
+}
+
+.main {
+    background-color: #fff;
+    position: relative;
+    top: 39.5px;
 }
 
 p {

+ 73 - 0
src/styles/style.css

@@ -1,3 +1,76 @@
 .van-field {
     font-size: 14px;
+}
+
+
+/* 导航栏样式 */
+
+.van-nav-bar {
+    background-color: #36a7f3!important;
+}
+
+.van-nav-bar__title {
+    color: #fff!important;
+}
+
+.van-badge__wrapper {
+    color: #fff!important;
+}
+
+
+/* 表单页样式 */
+
+
+/* 表单标题样式 */
+
+.miniTitle,
+.title {
+    height: 40px;
+    line-height: 40px;
+    color: #36a7f3;
+}
+
+.title {
+    font-size: 24px;
+    font-weight: 700;
+    padding-left: 20px;
+    border-bottom: 1px solid #eee;
+    margin-top: 5px;
+}
+
+.miniTitle {
+    font-size: 18px;
+}
+
+
+/* 表单域 */
+
+.formArea {
+    padding: 0px 20px;
+}
+
+.formArea .van-cell-group .van-field__label {
+    height: 35px;
+    line-height: 35px;
+    font-size: 16px;
+}
+
+
+/* 下拉箭头 */
+
+.formArea .van-badge__wrapper {
+    color: #999999!important;
+}
+
+
+/* 提交按钮 */
+
+.subbtn {
+    margin: 20px;
+    text-align: center;
+}
+
+.subbtn .van-button {
+    width: 40%;
+    margin: 5px;
 }

+ 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);
       // 活动信息

+ 16 - 17
src/views/activityMan/nonReligiousInformation/nonReligiousInformationView.vue

@@ -51,7 +51,7 @@
           show-cancel-button
           @confirm="reselected2"
         >
-          <organizations-list @selected="selected2" :type="1" :id="inputForm.nonReligiousCategoriesname"></organizations-list>
+          <organizations-list @selected="selected2" :type="1" :id="inputForm.nonReligiousCategories" ref="organ"></organizations-list>
         </van-dialog>
       </van-cell-group>
 
@@ -124,18 +124,6 @@
           </template>
         </van-field>
       </van-cell-group>
-
-      <!-- <van-cell-group>
-        <van-field
-          v-model="inputForm.eventOverview"
-          center
-          label="事件概述:"
-          placeholder="请填写事件概述"
-          input-align="right"
-          right-icon="location"
-        />
-      </van-cell-group> -->
-
       <van-cell-group>
         <div class="rowTextArea">
           <van-field
@@ -202,6 +190,8 @@ export default {
       eventOverview: "",
     });
     const contentEditor = ref(null);
+    // 获取组件
+    const organ = ref(null);
     let route = useRoute();
     onMounted(() => {
       // 根据路由初始化
@@ -218,6 +208,7 @@ export default {
               });
             });
             contentEditor.value.init(inputForm.value.eventContent);
+            
             isLoading.value = false;
           });
       } else {
@@ -238,12 +229,18 @@ export default {
       value: "id",
     };
     const getCategories = ({ selectedOptions }) => {
-      var that=this;
       if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){ 
         showCategories.value = false;
         inputForm.value.nonReligiousCategories = selectedOptions[0].id;
-        inputForm.value.nonReligiousCategoriesname = selectedOptions[0].name;
-        //organizationsList.flushByid(selectedOptions[0].id);
+        inputForm.value.nonReligiousCategoriesname = selectedOptions[0].name;        
+        //组件显示出来的时候就可以调用了
+        if(organ.value!=null){
+          organ.value.flushByid(selectedOptions[0].id)
+          inputForm.value.siteName.id = "";
+          inputForm.value.siteName.name = "";
+          list2.value = [];
+          list2.type = "";
+        }
       }
     };
 
@@ -306,7 +303,6 @@ export default {
         inputForm.value.placeSelectName = selectedOptions
           .map((option) => option.name)
           .join("/");
-          console.log("选择地区:"+selectedOptions);
 
           inputForm.value.place = selectedOptions
           .map((option) => option.id)
@@ -318,6 +314,8 @@ export default {
       }
 
     };
+    
+
     const submit = () => {
       isLoading.value = true;
       new nonReligiousInformationService().save(inputForm.value).then((res) => {
@@ -360,6 +358,7 @@ export default {
       contentEditor,
       // change,
       submit,
+      organ
     };
   },
 };

+ 5 - 7
src/views/activityMan/organizationsList.vue

@@ -19,7 +19,7 @@
           ref="checkboxGroup"
         >
           <van-button type="primary" size="mini" @click="checkAll"
-            >全选{{id}}</van-button
+            >全选</van-button
           >
           <van-cell-group inset>
             <van-cell
@@ -59,15 +59,13 @@
   </template>
   
   <script>
-  import { ref } from "vue";
+  import { ref,onMounted } from "vue";
   import tools from "@/api/sys/tools";
   export default {
     name: "organizationsList",
     emits: ["selected"],
     props: ["type","id"],
     setup(props, { emit }) {
-
-      console.log("选择组织id:"+props.id);
       let oType=props.id;
       const list = ref([]);
       const loading = ref(false);
@@ -112,15 +110,15 @@
       };
       const selectes = (val) => {
         checked.value = val;
-        //console.log(props.type);
-        //console.log(111);
         emit("selected", checked.value, 0);
       };
   
       const flushByid= (val) =>{
         index=0;
         oType=val;
-        console.log("子组件更新:"+val);
+        list.value=[];
+        checkboxRefs.value=[];
+        checked.value=[];
         onLoad();
       };
 

+ 6 - 23
src/views/activityMan/placeactivity/placeActivityInfo.vue

@@ -9,9 +9,7 @@
   <van-loading size="16px" v-show="isLoading">加载中...</van-loading>
   <div class="main" v-show="!isLoading">
     <div class="banner">
-      <h2>扎实提升“三力”</h2>
-      <h2>深入推进“三化”</h2>
-      <h2>坚持“三个思维”</h2>
+      <img src="../../../../public/loginbg/banner.jpg" alt="" />
     </div>
     <div class="info">
       <p>活动名称:{{ placeActivity.activityName }}</p>
@@ -141,27 +139,12 @@ export default {
 </script>
   
 <style lang="less">
-.main {
-  background: #fff;
-  position: relative;
-  top: 40px;
-}
 .banner {
-  background-color: #36a7f3;
-  padding: 20px 50px 40px 50px;
-  color: #fff;
-  h2 {
-    &:nth-child(1) {
-      margin-top: 0px;
-      text-align: left;
-    }
-    &:nth-child(2) {
-      text-align: center;
-    }
-    &:nth-child(3) {
-      text-align: right;
-    }
-  }
+  width: 100vw;
+}
+.banner img {
+  width: 100%;
+  height: 100%;
 }
 .info {
   position: relative;

+ 5 - 2
src/views/activityMan/placeactivity/placeActivityList.vue

@@ -3,11 +3,14 @@
     fixed
     title="场所活动"
     left-text=""
-    right-text="上报"
     left-arrow
     @click-left="onClickLeft"
     @click-right="onClickRight"
-  />
+  >
+    <template #right>
+      <van-icon name="plus" size="18" />
+    </template>
+  </van-nav-bar>
   <div class="main">
     <van-search
       v-model="searchVal"

+ 26 - 47
src/views/activityMan/placeactivity/placeActivityView.vue

@@ -15,6 +15,7 @@
         <van-field
           v-model="placeActivity.activityName"
           center
+          clearable
           label="活动名称:"
           placeholder="请填写活动名称"
           input-align="right"
@@ -72,6 +73,7 @@
         <van-field
           v-model="placeActivity.participantsNum"
           center
+          clearable
           label="参会人数:"
           placeholder="请填写参会人数"
           input-align="right"
@@ -112,6 +114,7 @@
         <van-field
           v-model="placeActivity.participation"
           center
+          clearable
           label="参加范围:"
           placeholder="请填写参加范围"
           input-align="right"
@@ -143,16 +146,21 @@
         <van-field
           v-model="placeActivity.placeDel"
           center
+          clearable
           label="详细地址:"
           placeholder="请填写活参加地点"
           input-align="right"
-          right-icon="location"
-        />
+        >
+          <template #right-icon>
+            <van-icon name="location" />
+          </template>
+        </van-field>
       </van-cell-group>
       <van-cell-group>
         <van-field
           v-model="placeActivity.sourceFunds"
           center
+          clearable
           label="经费来源:"
           placeholder="请选择"
           input-align="right"
@@ -181,6 +189,7 @@
         <van-field
           v-model="placeActivity.phone"
           center
+          readonly
           type="tel"
           label="联系方式:"
           placeholder="请填写联系方式"
@@ -197,7 +206,7 @@
               capture="camera"
               accept=""
             >
-              <van-button icon="plus">上传文件</van-button>
+              <van-button icon="plus" class="upload-icon">上传文件</van-button>
               <template #preview-cover="file">
                 <div class="preview-cover van-ellipsis">{{ file.name }}</div>
               </template>
@@ -230,6 +239,8 @@ import placeActivityServer from "@/api/placeActivity/placeActivityServer";
 import tools from "@/api/sys/tools";
 import UserManage from "@/api/user/UserManage";
 import { useRoute } from "vue-router";
+// 图片路径
+import $base from "@/utils/config";
 // 富文本编辑器
 import WangEditor from "@/components/editor/WangEditor";
 
@@ -302,10 +313,11 @@ export default {
                 name: decodeURIComponent(
                   item.substring(item.lastIndexOf("/") + 1)
                 ),
-                url: item,
+                url: $base + item,
               });
             }
           });
+          console.log("图片", fileList);
           subjectContentEditor.value.init(placeActivity.value.subjectContent);
           isLoading.value = false;
         });
@@ -400,9 +412,16 @@ export default {
       new tools()
         .uploadFile(file, `reporting/reportingActivities`)
         .then(({ data }) => {
-          fileList.value.push(data);
           placeActivity.value.safetyPlan = data.url;
+          fileList.value.push(data);
+          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
+            )
+          );
         });
+      console.log("上传文件", placeActivity.value.safetyPlan);
     };
     // 提交数据
     const submit = () => {
@@ -451,46 +470,10 @@ export default {
 </script>
 
 <style scoped>
-.main {
-  background: #fff;
-  position: relative;
-  top: 40px;
-}
-.miniTitle,
-.title {
-  height: 40px;
-  line-height: 40px;
-  color: #36a7f3;
-  border-bottom: 1px solid #eee;
-}
-.title {
-  font-size: 20px;
-  font-weight: 700;
-  padding-left: 20px;
-}
-.miniTitle {
-  font-size: 16px;
-}
-.formArea {
-  padding: 0px 20px;
-}
-.formArea .van-cell-group .van-field__label {
-  height: 40px;
-}
-/* .formArea .van-cell-group .van-cell {
-  line-height: 40px;
-} */
-.van-cell__value .van-field__right-icon .van-icon-location {
+.van-cell__value .van-field__right-icon .van-icon-location,
+.upload-icon {
   color: #36a7f3 !important;
 }
-.subbtn {
-  margin: 20px;
-  text-align: center;
-}
-.subbtn .van-button {
-  width: 40%;
-  margin: 5px;
-}
 .van-uploader .van-button {
   border: none;
   color: #36a7f3;
@@ -504,10 +487,6 @@ export default {
   text-align: center;
   margin-top: 80px;
 }
-#editor {
-  width: 100%;
-  height: 150px;
-}
 .preview-cover {
   position: absolute;
   bottom: 0;

+ 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,
     };
   },