Jelajahi Sumber

细节调整

sunran 3 tahun lalu
induk
melakukan
349ed910f5

+ 4 - 1
src/styles/index.css

@@ -19,6 +19,9 @@
 .van-overlay {
     z-index: 9999 !important;
 }
-.van-dialog,.van-popup{
+
+.van-dialog,
+.van-popup,
+.van-image-preview {
     z-index: 19999 !important;
 }

+ 2 - 2
src/views/weibao/App.vue

@@ -18,8 +18,8 @@ export default {
   methods: {
     async loginApp() {
       const res = await loginApp({
-        loginName: '15620220622',
-        // loginName: '16601217325',
+        // loginName: '15620220622',
+        loginName: '16601217325',
         password: '123456',
       })
       console.log(res)

+ 1 - 0
src/views/weibao/views/consultation/details.vue

@@ -77,6 +77,7 @@ export default {
     async consultationDetail() {
       const res = await consultationDetail({ id: this.id })
       this.form = res.data
+      if (!res.data.appendFile) return
       this.appendFile = this.form.pics.split(',')
     },
   },

+ 135 - 130
src/views/weibao/views/followUp/addfollow.vue

@@ -2,136 +2,138 @@
   <div>
     <van-nav-bar title="新建随访" @click-left="$router.back()" left-arrow fixed placeholder safe-area-inset-top />
     <div class="main">
-      <van-row class="cell">
-        <van-col span="4">姓名:</van-col>
-        <van-col span="8" @click="searchshow=true">
-          <van-field v-model="form.name" placeholder="请选择" disabled />
-        </van-col>
-        <van-popup position="bottom" v-model="searchshow" :style="{ height: '50%' }">
-          <van-search placeholder="请输入姓名查询" @input="listChildInfoByName" v-model="positionSearch" />
-          <van-picker value-key="name" show-toolbar :columns="childList" @confirm="onConfirmPicker" @cancel="showPicker = false">
-            <template #option="item">
-              <div>{{item.name}}</div>
-              <div>({{item.idCard}})</div>
-            </template>
-          </van-picker>
-          <!-- <van-picker v-show="streetList.length>0" show-toolbar :columns="childList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" /> -->
-        </van-popup>
-        <van-col span="6">儿童类型:</van-col>
-        <van-col span="6">
-          <van-field v-model="form.typeDesc" placeholder="请选择" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="4">年龄:</van-col>
-        <van-col span="8" @click="searchshow=true">
-          <van-field v-model="form.age" placeholder="请选择" disabled />
-        </van-col>
-        <van-col span="6">性别:</van-col>
-        <van-col span="6">
-          <van-field v-model="form.genderDesc" placeholder="请选择" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">教育情况:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.school" placeholder="教育情况" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">健康情况:</van-col>
-        <van-col span="18">
-          <van-field v-model="['','健康','患病','残疾'][form.healthStatus]" placeholder="健康情况" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">监护人:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.guardianName" placeholder="监护人" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="9">监护人联系方式:</van-col>
-        <van-col span="15">
-          <van-field v-model="form.guardianOutVO" placeholder="监护人联系方式" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">居住地址:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.address" placeholder="居住地址" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="7">帮扶责任人:</van-col>
-        <van-col span="17">
-          <van-field v-model="form.tutelageName" placeholder="帮扶责任人" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">随访时间:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.followDate" @click="showPopup" placeholder="请选择" disabled />
-        </van-col>
-        <!-- <van-col span="18" @click="showPopup">{{form.followDate?form.followDate:'请选择'}}</van-col> -->
-        <van-popup v-model="show" position="bottom" :style="{ height: '30%' }">
-          <van-datetime-picker @confirm="dateConfirm" @cancel="showPopup" v-model="followDate" type="date" :min-date="minDate" :max-date="maxDate" :columns-order="[ 'year','month', 'day']"
-            :formatter="formatter" />
-        </van-popup>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">选择街道:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.streetName" @click="streetshowPopup" placeholder="请选择" disabled />
-        </van-col>
-        <!-- <van-col span="18" @click="streetshowPopup">{{form.streetName?form.streetName:'请选择'}}</van-col> -->
-        <van-popup v-model="streetShow" position="bottom" :style="{ height: '30%' }">
-          <van-picker show-toolbar :columns="streetList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" />
-        </van-popup>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">随访地点:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.place" placeholder="请输入随访地点" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">随访人员:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.personnel" placeholder="请输入" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">联系方式:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.phone" type="tel" placeholder="请输入" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">随访记录:</van-col>
-        <van-col span="18">
-          <van-field class="textarea" v-model="form.remark" rows="1" type="textarea" placeholder="请输入随访记录" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">图片视频:</van-col>
-        <van-col span="18">
-          <div class="box" ref="boxlist">
-            <div class="boxlist">
-              <div v-for="(item,index) in form.fileList" :key="index">
-                <img v-if="item.type.indexOf('image') !== -1" :src="item.url" alt="">
-                <video v-else style="object-fit:cover;" :src="item.url"></video>
+      <van-form @submit="saveFollowUp">
+        <van-row class="cell">
+          <van-col span="4">姓名:</van-col>
+          <van-col span="8" @click="searchshow=true">
+            <van-field v-model="form.name" placeholder="请选择" :rules="[{ required: true}]" disabled />
+          </van-col>
+          <van-popup position="bottom" v-model="searchshow" :style="{ height: '50%' }">
+            <van-search placeholder="请输入姓名查询" @input="listChildInfoByName" v-model="positionSearch" />
+            <van-picker value-key="name" show-toolbar :columns="childList" @confirm="onConfirmPicker" @cancel="showPicker = false">
+              <template #option="item">
+                <div>{{item.name}}</div>
+                <div>({{item.idCard}})</div>
+              </template>
+            </van-picker>
+            <!-- <van-picker v-show="streetList.length>0" show-toolbar :columns="childList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" /> -->
+          </van-popup>
+          <van-col span="6">儿童类型:</van-col>
+          <van-col span="6">
+            <van-field v-model="form.typeDesc" placeholder="请选择" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="4">年龄:</van-col>
+          <van-col span="8" @click="searchshow=true">
+            <van-field v-model="form.age" placeholder="请选择" disabled />
+          </van-col>
+          <van-col span="6">性别:</van-col>
+          <van-col span="6">
+            <van-field v-model="form.genderDesc" placeholder="请选择" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">教育情况:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.school" placeholder="教育情况" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">健康情况:</van-col>
+          <van-col span="18">
+            <van-field v-model="['','健康','患病','残疾'][form.healthStatus]" placeholder="健康情况" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">监护人:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.guardianName" placeholder="监护人" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="9">监护人联系方式:</van-col>
+          <van-col span="15">
+            <van-field v-model="form.guardianOutVO" placeholder="监护人联系方式" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">居住地址:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.address" placeholder="居住地址" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="7">帮扶责任人:</van-col>
+          <van-col span="17">
+            <van-field v-model="form.tutelageName" placeholder="帮扶责任人" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">随访时间:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.followDate" @click="showPopup" placeholder="请选择" :rules="[{ required: true}]" disabled />
+          </van-col>
+          <!-- <van-col span="18" @click="showPopup">{{form.followDate?form.followDate:'请选择'}}</van-col> -->
+          <van-popup v-model="show" position="bottom" :style="{ height: '30%' }">
+            <van-datetime-picker @confirm="dateConfirm" @cancel="showPopup" v-model="followDate" type="date" :min-date="minDate" :max-date="maxDate" :columns-order="[ 'year','month', 'day']"
+              :formatter="formatter" />
+          </van-popup>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">选择街道:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.streetName" @click="streetshowPopup" placeholder="请选择" :rules="[{ required: true}]" disabled />
+          </van-col>
+          <!-- <van-col span="18" @click="streetshowPopup">{{form.streetName?form.streetName:'请选择'}}</van-col> -->
+          <van-popup v-model="streetShow" position="bottom" :style="{ height: '30%' }">
+            <van-picker show-toolbar :columns="streetList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" />
+          </van-popup>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">随访地点:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.place" placeholder="请输入随访地点" :rules="[{ required: true}]" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">随访人员:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.personnel" placeholder="请输入" :rules="[{ required: true}]" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">联系方式:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.phone" type="tel" placeholder="请输入手机号" :rules="[{validator,required: true, message:'手机号格式不正确'}]" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">随访记录:</van-col>
+          <van-col span="18">
+            <van-field class="textarea" :rules="[{ required: true}]" v-model="form.remark" rows="1" type="textarea" placeholder="请输入随访记录" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">图片视频:</van-col>
+          <van-col span="18">
+            <div class="box" ref="boxlist">
+              <div class="boxlist">
+                <div v-for="(item,index) in form.fileList" :key="index">
+                  <img v-if="item.type.indexOf('image') !== -1" :src="item.url" alt="">
+                  <video v-else style="object-fit:cover;" :src="item.url"></video>
+                </div>
               </div>
+              <van-uploader v-model="fileList" accept="*" :after-read="afterRead" @delete='deleteUploader'>
+              </van-uploader>
             </div>
-            <van-uploader v-model="fileList" accept="*" :after-read="afterRead" @delete='deleteUploader'>
-            </van-uploader>
-          </div>
 
-        </van-col>
-      </van-row>
-    </div>
-    <div style="text-align:center;">
-      <van-button @click="saveFollowUp">确 定</van-button>
+          </van-col>
+        </van-row>
+        <div style="text-align:center;">
+          <van-button native-type="submit">确 定</van-button>
+        </div>
+      </van-form>
     </div>
 
   </div>
@@ -170,6 +172,10 @@ export default {
       const res = await listChildInfoByName({ name: this.positionSearch })
       this.childList = res.data
     },
+
+    validator(val) {
+      return /^1(3|4|5|6|7|8|9)\d{9}$/.test(val)
+    },
     formatter(type, val) {
       if (type === 'year') {
         return val + '年'
@@ -225,12 +231,12 @@ export default {
       this.form.followDate = this.timeFormat(v)
       this.show = false
     },
-    async saveFollowUp() {
+    async saveFollowUp(values) {
+      console.log('submit', values)
       var appendFile = []
       this.form.fileList.forEach((item) => {
         appendFile.push(item.url)
       })
-
       this.form.appendFile = appendFile.join(',')
       var data = JSON.parse(JSON.stringify(this.form))
       data.followDate = data.followDate + ' 00:00:00'
@@ -246,7 +252,6 @@ export default {
     },
     getPositionList() {},
     async afterRead(file) {
-      console.log(file.file)
       file.status = 'uploading'
       file.message = '上传中...'
       let formDate = new FormData()

+ 2 - 1
src/views/weibao/views/followUp/details.vue

@@ -39,7 +39,7 @@
         </div>
       </div>
       <div>
-        <p>照片视频:</p>
+        <p>照片视频:</p>
         <div class="boximg">
           <div v-for="(item,index) in appendFile" :key="index">
             <van-image v-if="item.indexOf('.png')==-1||item.indexOf('.jpg')==-1" fit="contain" :src="item" alt="" @click="showPopup" />
@@ -77,6 +77,7 @@ export default {
     async followUpHistoryDetail() {
       const res = await followUpHistoryDetail({ id: this.id })
       this.dataList = res.data
+      if(!res.data.appendFile)return
       this.appendFile = res.data.appendFile.split(',')
       //   appendFile.forEach(item => {
       //       if(){

+ 13 - 7
src/views/weibao/views/followUp/historySupervisor.vue

@@ -2,7 +2,7 @@
   <div>
     <van-nav-bar title="历史随访" @click-left="$router.back()" left-arrow fixed placeholder safe-area-inset-top />
     <van-sticky>
-      <van-search v-model="value" shape="round" show-action placeholder="请输入搜索关键词" @search="onSearch">
+      <van-search v-model="historyform.name" shape="round" show-action placeholder="请输入姓名" @search="onSearch">
         <template #action>
           <div style="display:flex;align-items:center;">
             <div @click="onSearch">搜索</div>
@@ -11,7 +11,7 @@
         </template>
       </van-search>
     </van-sticky>
-    <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
+    <van-list v-model="loading" :immediate-check="false" :finished="finished" finished-text="没有更多了" @load="onLoad">
       <history :historyList="historyList"></history>
     </van-list>
   </div>
@@ -23,14 +23,13 @@ export default {
   components: { history },
   data() {
     return {
-      value: '',
       active: 0,
       loading: false,
       finished: false,
       historyList: '',
       historyform: {
         pageNum: 1,
-        pageSize: 5,
+        pageSize: 10,
         isSupervise:
           JSON.parse(sessionStorage.getItem('userInfo')).roleIdStr == 14
             ? 2
@@ -39,15 +38,18 @@ export default {
       },
     }
   },
+  created() {
+    this.historyFollowUp()
+  },
   methods: {
     async historyFollowUp() {
       const res = await historyFollowUp(this.historyform)
       if (this.historyform.pageNum == 1) {
         this.historyList = res.data.records
       } else {
-        this.historyList = this.newsList.concat(res.data.records)
+        this.historyList = this.historyList.concat(res.data.records)
       }
-      this.historyform.pageNum = this.historyform.pageNum + 1
+
       if (this.historyList.length >= res.data.total) {
         this.finished = true
       } else {
@@ -55,9 +57,13 @@ export default {
       }
     },
     onLoad() {
+      this.historyform.pageNum = this.historyform.pageNum + 1
+      this.historyFollowUp()
+    },
+    onSearch() {
+      this.historyform.pageNum = 1
       this.historyFollowUp()
     },
-    onSearch() {},
   },
 }
 </script>

+ 12 - 7
src/views/weibao/views/loveHelp/details.vue

@@ -5,7 +5,7 @@
       <van-row class="cell">
         <van-col span="6">活动名称:</van-col>
         <van-col span="18">
-          <van-field v-model="form.name" placeholder="活动名称" :disabled="id" />
+          <van-field v-model="form.name" placeholder="活动名称" :disabled="id!=''" />
         </van-col>
       </van-row>
 
@@ -30,7 +30,7 @@
       <van-row class="cell">
         <van-col span="6">活动地址:</van-col>
         <van-col span="18">
-          <van-field v-model="form.address" placeholder="请输入活动地址" :disabled="id" />
+          <van-field v-model="form.address" placeholder="请输入活动地址" :disabled="id!=''" />
         </van-col>
       </van-row>
       <van-row class="cell">
@@ -69,7 +69,7 @@
       <van-row class="cell">
         <van-col span="6">活动详情:</van-col>
         <van-col span="18">
-          <van-field class="textarea" :disabled="id" v-model="form.content" rows="1" type="textarea" placeholder="请输入活动详情" />
+          <van-field class="textarea" :disabled="id!=''" v-model="form.content" rows="1" type="textarea" placeholder="请输入活动详情" />
         </van-col>
       </van-row>
       <van-row v-if="!id" class="cell">
@@ -96,7 +96,7 @@
             <video v-else @click="showvideoplay=true" style="object-fit:cover;" :src="item"></video>
           </div>
         </div>
-        <van-image-preview v-model="show" :images="appendFile" @change="onChange"></van-image-preview>
+        <van-image-preview v-model="show" :images="appendFile"></van-image-preview>
       </div>
     </div>
     <div style="text-align:center;" v-if="!id">
@@ -128,7 +128,7 @@ export default {
         fileList: [],
       },
       dateshow: false,
-      appendFile: '',
+      appendFile: [],
       workDate: new Date(),
       minDate: new Date(2020, 0, 1),
       maxDate: new Date(2025, 10, 1),
@@ -137,12 +137,15 @@ export default {
       serviceTarget: [],
       childList: [],
       id: '',
+      orgId: '',
     }
   },
   created() {
+    this.id = this.$route.query.id
+    this.orgId = this.$route.query.orgId
     this.getStreetList()
     this.organizationDetail()
-    this.id = this.$route.query.id
+
     if (this.id) {
       this.lovingHelpDetail()
     }
@@ -167,6 +170,7 @@ export default {
     async lovingHelpDetail() {
       const res = await lovingHelpDetail({ id: this.id })
       this.form = res.data
+      if (!res.data.pics) return
       this.appendFile = this.form.pics.split(',')
     },
     async listChildInfoByName() {
@@ -175,7 +179,8 @@ export default {
       this.childList = res.data
     },
     async organizationDetail() {
-      const res = await organizationDetail()
+      console.log(this.orgId, 'this.orgId')
+      const res = await organizationDetail({ id: this.orgId })
       this.orglist = res.data
     },
     onConfirm(value) {

+ 3 - 2
src/views/weibao/views/loveHelp/index.vue

@@ -6,13 +6,13 @@
         <template #action>
           <div style="display:flex;align-items:center;">
             <div @click="onSearch">搜索</div>
-            <van-button size="mini" @click="$router.push({path:'/loveHelp/details'})">新建</van-button>
+            <van-button v-if="roleIdStr==23" size="mini" @click="$router.push({path:'/loveHelp/details'})">新建</van-button>
           </div>
         </template>
       </van-search>
     </van-sticky>
     <van-list v-model="loading" :finished="finished" :immediate-check="false" finished-text="没有更多了" @load="onLoad">
-      <div class="list" v-for="item in dataList" :key="item.id" @click="$router.push({path:'/loveHelp/details',query:{id:item.id}})">
+      <div class="list" v-for="item in dataList" :key="item.id" @click="$router.push({path:'/loveHelp/details',query:{id:item.id,orgId:item.orgId}})">
         <div class="img">
           <van-image fit="scale-down" :src="getpics(item.pics)" alt="" />
         </div>
@@ -31,6 +31,7 @@ import { lovingHelpPage } from '../../api/index.js'
 export default {
   data() {
     return {
+      roleIdStr: JSON.parse(sessionStorage.getItem('userInfo')).roleIdStr,
       loading: false,
       finished: false,
       dataList: '',

+ 1 - 0
src/views/weibao/views/reporting/details.vue

@@ -65,6 +65,7 @@ export default {
     async mandatoryDetail() {
       const res = await mandatoryDetail({ id: this.id })
       this.form = res.data
+        if(!res.data.appendFile)return
       this.appendFile = this.form.appendFile.split(',')
     },
   },

+ 3 - 6
src/views/weibao/views/specialServices/details.vue

@@ -53,14 +53,10 @@
               <video v-else @click="showvideoplay=true" style="object-fit:cover;" :src="item"></video>
             </div>
           </div>
-          <van-image-preview v-model="show" :images="images" @change="onChange"></van-image-preview>
+          <van-image-preview v-model="show" :images="appendFile"></van-image-preview>
         </div>
       </div>
     </div>
-    <!-- <div style="text-align:center;">
-      <van-button>确 定</van-button>
-    </div> -->
-
   </div>
 </template>
 <script>
@@ -91,6 +87,7 @@ export default {
       const res = await getProjectHistory({ id: this.id })
       this.form = res.data
       this.address = this.form.streetName + this.form.address
+      if (!res.data.appendFile) return
       this.appendFile = this.form.multiMediaUrl.split(',')
     },
   },
@@ -131,7 +128,7 @@ export default {
   .boximg {
     min-height: 100px;
     border: 1px solid #eee;
-   padding: 20px 0;
+    padding: 20px 0;
     font-size: 26px;
     color: #999;
     display: flex;

+ 2 - 0
src/views/weibao/views/specialServices/index.vue

@@ -48,6 +48,7 @@ export default {
   },
   created() {
     this.pageAppProject()
+    this.pageProjectHistory()
   },
   methods: {
     onSearch() {
@@ -78,6 +79,7 @@ export default {
       const res = await pageAppProject(this.planform)
       if (this.planform.pageNum == 1) {
         this.planformList = res.data.records
+        console.log(this.planformList, 'this.planformList')
       } else {
         this.planformList = this.planformList.concat(res.data.records)
       }

+ 4 - 2
src/views/weibao/views/specialServices/serviceComplete.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="div">
+  <div :class="roleIdStr==21?'div' :''">
     <div class="list" v-for="item in historyList" :key="item.id" @click="$router.push({path:'/specialServices/details',query:{id:item.historyId}})">
       <div class="text">
         <div class="num"><span>服务内容:</span>
@@ -23,7 +23,9 @@
 export default {
   props: ['historyList'],
   data() {
-    return {}
+    return {
+      roleIdStr: JSON.parse(sessionStorage.getItem('userInfo')).roleIdStr,
+    }
   },
 }
 </script>

+ 85 - 83
src/views/weibao/views/specialServices/startServiceplay.vue

@@ -12,96 +12,98 @@
         <van-col span="24">服务内容:{{dataInfo.serviceContent}}</van-col>
       </van-row>
     </div>
-    <div class="main">
-      <van-row class="cell">
-        <van-col span="6">服务对象:</van-col>
-        <van-col span="18">
-          <div class="serviceTarget" @click="serviceTargetPopup">{{form.serviceTarget?form.serviceTarget:'请选择'}}</div>
-          <!-- <van-field @click="serviceTargetPopup" type="textarea" v-model="form.serviceTarget" placeholder="请输入服务对象" disabled /> -->
-          <van-popup position="bottom" v-model="serviceTargetShow">
-            <van-search placeholder="请输入姓名查询" @input="listChildInfoByName" v-model="positionSearch" />
-            <van-picker cancel-button-text='取消' value-key="title" show-toolbar :columns="childList" @confirm="onConfirmPicker" @cancel="serviceTargetShow = false">
-              <template #option="item">
-                <span>{{item.name}}</span>
-                <span>({{item.idCard}})</span>
-              </template>
-            </van-picker>
+    <van-form @submit="addProjectHistory">
+      <div class="main">
+        <van-row class="cell">
+          <van-col span="6">服务对象:</van-col>
+          <van-col span="18">
+            <div class="serviceTarget" @click="serviceTargetPopup">{{form.serviceTarget?form.serviceTarget:'请选择'}}</div>
+            <!-- <van-field @click="serviceTargetPopup" type="textarea" v-model="form.serviceTarget" placeholder="请输入服务对象" disabled /> -->
+            <van-popup position="bottom" v-model="serviceTargetShow">
+              <van-search placeholder="请输入姓名查询" @input="listChildInfoByName" v-model="positionSearch" />
+              <van-picker cancel-button-text='取消' value-key="title" show-toolbar :columns="childList" @confirm="onConfirmPicker" @cancel="serviceTargetShow = false">
+                <template #option="item">
+                  <span>{{item.name}}</span>
+                  <span>({{item.idCard}})</span>
+                </template>
+              </van-picker>
+            </van-popup>
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">服务时间:</van-col>
+          <van-col span="18" @click="showPopup">{{form.servicetTime?form.servicetTime:'请选择'}}</van-col>
+          <van-popup v-model="show" position="bottom" :style="{ height: '30%' }">
+            <van-datetime-picker @confirm="dateConfirm" @cancel="showPopup" v-model="servicetTime" type="date" :min-date="minDate" :max-date="maxDate" :columns-order="[ 'year','month', 'day']"
+              :formatter="formatter" />
           </van-popup>
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">服务时间:</van-col>
-        <van-col span="18" @click="showPopup">{{form.servicetTime?form.servicetTime:'请选择'}}</van-col>
-        <van-popup v-model="show" position="bottom" :style="{ height: '30%' }">
-          <van-datetime-picker @confirm="dateConfirm" @cancel="showPopup" v-model="servicetTime" type="date" :min-date="minDate" :max-date="maxDate" :columns-order="[ 'year','month', 'day']"
-            :formatter="formatter" />
-        </van-popup>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">选择街道:</van-col>
-        <van-col span="18" @click="streetshowPopup">{{form.streetName?form.streetName:'请选择'}}</van-col>
-        <van-popup v-model="streetShow" position="bottom" :style="{ height: '30%' }">
-          <van-picker show-toolbar :columns="streetList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" />
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">选择街道:</van-col>
+          <van-col span="18" @click="streetshowPopup">{{form.streetName?form.streetName:'请选择'}}</van-col>
+          <van-popup v-model="streetShow" position="bottom" :style="{ height: '30%' }">
+            <van-picker show-toolbar :columns="streetList" @confirm="onConfirm" @cancel="streetshowPopup" @change="onChange" value-key="name" />
 
-        </van-popup>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">服务地点:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.address" placeholder="请输入服务地点" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">服务人员:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.serviceStaff" @click="serviceShow=true" placeholder="请选择" disabled />
-          <van-popup v-model="serviceShow" position="bottom" :style="{ height: '30%' }">
-            <div class="popup">
-              <div class="btn">
-                <div @click="serviceShow=false" class="cancle">取消</div>
-                <div @click="serviceConfirm" class="confirm">确定</div>
-              </div>
-              <van-checkbox-group v-model="result">
-                <van-cell-group>
-                  <van-cell v-for="(item,index) in employeeList" clickable :key="index" :title="item.name" @click="toggle(item,index)">
-                    <template #right-icon>
-                      <van-checkbox :name="item.name" ref="checkboxes" />
-                    </template>
-                  </van-cell>
-                </van-cell-group>
-              </van-checkbox-group>
-            </div>
           </van-popup>
-        </van-col>
-      </van-row>
-
-      <van-row class="cell">
-        <van-col span="6">服务记录:</van-col>
-        <van-col span="18">
-          <van-field class="textarea" v-model="form.serviceRecord" rows="1" type="textarea" placeholder="请输入服务记录" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">图片视频:</van-col>
-        <van-col span="18">
-          <div class="box" ref="boxlist">
-            <div class="boxlist">
-              <div v-for="(item,index) in form.fileList" :key="index">
-                <img v-if="item.type.indexOf('image') !== -1" :src="item.url" alt="">
-                <video v-else style="object-fit:cover;" :src="item.url"></video>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">服务地点:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.address" :rules="[{ required: true}]" placeholder="请输入服务地点" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">服务人员:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.serviceStaff" @click="serviceShow=true" placeholder="请选择" disabled />
+            <van-popup v-model="serviceShow" position="bottom" :style="{ height: '30%' }">
+              <div class="popup">
+                <div class="btn">
+                  <div @click="serviceShow=false" class="cancle">取消</div>
+                  <div @click="serviceConfirm" class="confirm">确定</div>
+                </div>
+                <van-checkbox-group v-model="result">
+                  <van-cell-group>
+                    <van-cell v-for="(item,index) in employeeList" clickable :key="index" :title="item.name" @click="toggle(item,index)">
+                      <template #right-icon>
+                        <van-checkbox :name="item.name" ref="checkboxes" />
+                      </template>
+                    </van-cell>
+                  </van-cell-group>
+                </van-checkbox-group>
               </div>
+            </van-popup>
+          </van-col>
+        </van-row>
 
+        <van-row class="cell">
+          <van-col span="6">服务记录:</van-col>
+          <van-col span="18">
+            <van-field class="textarea" v-model="form.serviceRecord" rows="1" type="textarea" placeholder="请输入服务记录" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">图片视频:</van-col>
+          <van-col span="18">
+            <div class="box" ref="boxlist">
+              <div class="boxlist">
+                <div v-for="(item,index) in form.fileList" :key="index">
+                  <img v-if="item.type.indexOf('image') !== -1" :src="item.url" alt="">
+                  <video v-else style="object-fit:cover;" :src="item.url"></video>
+                </div>
+
+              </div>
+              <van-uploader v-model="multiMediaUrl" accept="*" :after-read="afterRead" @delete='deleteUploader'>
+              </van-uploader>
             </div>
-            <van-uploader v-model="multiMediaUrl" accept="*" :after-read="afterRead" @delete='deleteUploader'>
-            </van-uploader>
-          </div>
 
-        </van-col>
-      </van-row>
-    </div>
-    <div class="but">
-      <van-button @click="addProjectHistory">确 定</van-button>
-    </div>
+          </van-col>
+        </van-row>
+      </div>
+      <div class="but">
+        <van-button native-type="submit">确 定</van-button>
+      </div>
+    </van-form>
   </div>
 </template>
 <script>