Explorar o código

修改了文件上传路径和表单页样式

LuChongMei hai 1 ano
pai
achega
e652c23695

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

+ 1 - 1
src/utils/config.js

@@ -2,7 +2,7 @@ let APP_SERVER_URL = ""
 
 if (process.env.NODE_ENV === 'development') {
     // 开发环境
-    APP_SERVER_URL = 'http://192.168.139.86:8084'
+    APP_SERVER_URL = 'http://192.168.139.110:8084'
 } else {
     // 生产环境
     APP_SERVER_URL = 'http://123.57.226.179:8010/hs'

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