sunran 3 yıl önce
ebeveyn
işleme
e7c2934a4d

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

@@ -18,8 +18,11 @@ export default {
   methods: {
     async loginApp() {
       const res = await loginApp({
-        loginName: '15620220622',
-        // loginName: '16601217325',
+        // loginName: '15620220622', //社工
+        // loginName: '13525112211', //志愿
+        loginName: '13612345678', //政府
+        // loginName: '13222222229', //儿童督导
+        // loginName: '16601217325', // 主任
         password: '123456',
       })
       console.log(res)

+ 1 - 1
src/views/weibao/views/consultation/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <van-nav-bar title="个案会商" @click-left="$router.back()" left-arrow fixed placeholder safe-area-inset-top />
-    <div class="box" v-if="roleIdStr==21">
+    <div class="box" v-if="roleIdStr==22">
       <van-tabs v-model="active" @change="changetabs">
         <van-tab title="发起会商">
           <initiateConsultation @changactive="changactive"></initiateConsultation>

+ 88 - 84
src/views/weibao/views/consultation/initiateConsultation.vue

@@ -1,92 +1,96 @@
 <template>
   <div class="case">
-    <div class="main">
-      <van-row class="cell">
-        <van-col span="6">会商议题:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.name" placeholder="活动名称" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">会商时间:</van-col>
-        <van-col span="18" @click="clickdateshow">{{form.workDate?form.workDate:'请选择'}}</van-col>
-        <van-popup v-model="dateshow" position="bottom" :style="{ height: '30%' }">
-          <van-datetime-picker @confirm="dateConfirm" @cancel="dateshow=false" v-model="workDate" 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="clickstreetShow" 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="streetShow=false" 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="orglist.name" 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.participateOrgName" @click="ownerShow=true" placeholder="参与单位" disabled />
-          <van-popup v-model="ownerShow" position="bottom" :style="{ height: '30%' }">
-            <div class="popup">
-              <div class="btn">
-                <div @click="ownerShow=false" class="cancle">取消</div>
-                <div @click="ownerConfirm" class="confirm">确定</div>
-              </div>
-              <van-checkbox-group v-model="result">
-                <van-cell-group>
-                  <van-cell v-for="(item,index) in orgform" 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-form @submit="consultationSave">
+      <div class="main">
+        <van-row class="cell">
+          <van-col span="6">会商议题:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.name" :rules="[{ required: true}]" placeholder="请输入会商议题" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">会商时间:</van-col>
+          <van-col span="18" @click="clickdateshow">
+            <!-- {{form.workDate?form.workDate:'请选择'}} -->
+            <van-field v-model="form.workDate" :rules="[{ required: true}]" placeholder="请选择会商时间" />
+          </van-col>
+          <van-popup v-model="dateshow" position="bottom" :style="{ height: '30%' }">
+            <van-datetime-picker @confirm="dateConfirm" @cancel="dateshow=false" v-model="workDate" 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="clickstreetShow" :rules="[{ required: true}]" 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="streetShow=false" value-key="name" />
           </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.content" rows="1" type="textarea" placeholder="请输入活动详情" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">图片视频:</van-col>
-        <van-col class="col" span="18" ref="col">
-          <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="orglist.name" 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.participateOrgName" :rules="[{ required: true}]" @click="ownerShow=true" placeholder="请选择参与单位" disabled />
+            <van-popup v-model="ownerShow" position="bottom" :style="{ height: '30%' }">
+              <div class="popup">
+                <div class="btn">
+                  <div @click="ownerShow=false" class="cancle">取消</div>
+                  <div @click="ownerConfirm" class="confirm">确定</div>
+                </div>
+                <van-checkbox-group v-model="result">
+                  <van-cell-group>
+                    <van-cell v-for="(item,index) in orgform" 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.content" :rules="[{ required: true}]" rows="1" type="textarea" placeholder="请输入活动详情" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">图片视频:</van-col>
+          <van-col class="col" span="18" ref="col">
+            <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="consultationSave">确 定</van-button>
-    </div>
 
+          </van-col>
+        </van-row>
+      </div>
+      <div style="text-align:center;">
+        <van-button native-type="submit">确 定</van-button>
+      </div>
+    </van-form>
   </div>
 </template>
 <script>
@@ -159,7 +163,7 @@ export default {
       }
     },
     async organizationDetail() {
-      const res = await organizationDetail()
+      const res = await organizationDetail({ id: '' })
       this.orglist = res.data
     },
     onConfirm(value) {

+ 2 - 2
src/views/weibao/views/home/index.vue

@@ -28,11 +28,11 @@
         <img src="../../assets/icon3.png" alt="">
         <div>爱心帮扶</div>
       </div>
-      <div class="" @click="$router.push({path:'/consultation/index'})">
+      <div v-if="roleIdStr!=21&&roleIdStr!=23" @click="$router.push({path:'/consultation/index'})">
         <img src="../../assets/icon4.png" alt="">
         <div>个案会商</div>
       </div>
-      <div class="" @click="$router.push({path:'/reporting/index'})">
+      <div v-if="roleIdStr!=21&&roleIdStr!=23" @click="$router.push({path:'/reporting/index'})">
         <img src="../../assets/icon5.png" alt="">
         <div>强制报告</div>
       </div>

+ 104 - 97
src/views/weibao/views/loveHelp/details.vue

@@ -1,108 +1,114 @@
 <template>
   <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="6">活动名称:</van-col>
-        <van-col span="18">
-          <van-field v-model="form.name" placeholder="活动名称" :disabled="id!=''" />
-        </van-col>
-      </van-row>
+    <van-form @submit="lovingHelpSave">
+      <div class="main">
+        <van-row class="cell">
+          <van-col span="6">活动名称:</van-col>
+          <van-col span="18">
+            <van-field v-model="form.name" :rules="[{ required: true}]" placeholder="活动名称" :disabled="id!=undefined" />
+          </van-col>
+        </van-row>
 
-      <van-row class="cell">
-        <van-col span="6">活动时间:</van-col>
-        <van-col span="18" @click="clickdateshow">{{form.workDate?form.workDate:'请选择'}}</van-col>
-        <van-popup v-model="dateshow" position="bottom" :style="{ height: '30%' }">
-          <van-datetime-picker @confirm="dateConfirm" @cancel="dateshow=false" v-model="workDate" 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.areaName" @click="clickstreetShow" 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="streetShow=false" 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="请输入活动地址" :disabled="id!=''" />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">帮扶对象:</van-col>
-        <van-col span="18">
-          <div class="serviceTarget" @click="clickserviceTargetShow">{{form.helpChildren?form.helpChildren:'请选择'}}</div>
-          <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-row class="cell">
+          <van-col span="6">活动时间:</van-col>
+          <van-col span="18" @click="clickdateshow">
+            <!-- {{form.workDate?form.workDate:'请选择'}} -->
+            <van-field v-model="form.workDate" :rules="[{ required: true}]" placeholder="请选择" disabled />
+          </van-col>
+          <van-popup v-model="dateshow" position="bottom" :style="{ height: '30%' }">
+            <van-datetime-picker @confirm="dateConfirm" @cancel="dateshow=false" v-model="workDate" 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">
-          <van-field v-model="orglist.name" placeholder="请输入主办单位" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">联系人:</van-col>
-        <van-col span="18">
-          <van-field v-model="orglist.owner" placeholder="联系人" disabled />
-        </van-col>
-      </van-row>
-      <van-row class="cell">
-        <van-col span="6">联系方式:</van-col>
-        <van-col span="18">
-          <van-field v-model="orglist.mobile" placeholder="联系方式" disabled />
-        </van-col>
-      </van-row>
-      <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-col>
-      </van-row>
-      <van-row v-if="!id" 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.areaName" :rules="[{ required: true}]" @click="clickstreetShow" 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="streetShow=false" 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" :rules="[{ required: true}]" placeholder="请输入活动地址" :disabled="id!=undefined" />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">帮扶对象:</van-col>
+          <van-col span="18">
+            <div class="serviceTarget" @click="clickserviceTargetShow">
+              <!-- {{form.helpChildren?form.helpChildren:'请选择'}} -->
+              <van-field v-model="form.helpChildren" :rules="[{ required: true}]" placeholder="请输入帮扶对象" :disabled="id!=undefined" />
+            </div>
+            <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">
+            <van-field v-model="orglist.name" placeholder="请输入主办单位" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">联系人:</van-col>
+          <van-col span="18">
+            <van-field v-model="orglist.owner" placeholder="联系人" disabled />
+          </van-col>
+        </van-row>
+        <van-row class="cell">
+          <van-col span="6">联系方式:</van-col>
+          <van-col span="18">
+            <van-field v-model="orglist.mobile" placeholder="联系方式" disabled />
+          </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}]" :disabled="id!=undefined" v-model="form.content" rows="1" type="textarea" placeholder="请输入活动详情" />
+          </van-col>
+        </van-row>
+        <van-row v-if="!id" 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-col>
+        </van-row>
+        <div v-else class="imgvideo">
+          <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" />
+              <video v-else @click="showvideoplay=true" style="object-fit:cover;" :src="item"></video>
             </div>
-            <van-uploader v-model="fileList" accept="*" :after-read="afterRead" @delete='deleteUploader'>
-            </van-uploader>
-          </div>
-
-        </van-col>
-      </van-row>
-      <div v-else class="imgvideo">
-        <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" />
-            <video v-else @click="showvideoplay=true" style="object-fit:cover;" :src="item"></video>
           </div>
+          <van-image-preview v-model="show" :images="appendFile"></van-image-preview>
         </div>
-        <van-image-preview v-model="show" :images="appendFile"></van-image-preview>
       </div>
-    </div>
-    <div style="text-align:center;" v-if="!id">
-      <van-button @click="lovingHelpSave">确 定</van-button>
-    </div>
-
+      <div style="text-align:center;" v-if="!id">
+        <van-button native-type="submit">确 定</van-button>
+      </div>
+    </van-form>
   </div>
 </template>
 <script>
@@ -142,6 +148,7 @@ export default {
   },
   created() {
     this.id = this.$route.query.id
+    console.log(this.id, 'id')
     this.orgId = this.$route.query.orgId
     this.getStreetList()
     this.organizationDetail()
@@ -184,14 +191,14 @@ export default {
       this.orglist = res.data
     },
     onConfirm(value) {
-      this.form.streetName = value.name
+      this.form.areaName = value.name
       this.form.areaId = value.id
       this.streetShow = false
     },
     dateConfirm(v) {
       console.log(v)
       this.form.workDate = this.timeFormat(v)
-      this.show = false
+      this.dateshow = false
     },
     onConfirmPicker(value) {
       this.serviceTarget.push(value.name)

+ 12 - 0
src/views/weibao/views/reporting/index.vue

@@ -22,6 +22,18 @@
         </van-tab>
       </van-tabs>
     </div>
+    <div class="casebox" v-else>
+      <van-list v-model="loading" :immediate-check="false" :finished="finished" finished-text="没有更多了" @load="onLoad">
+        <div class="list" v-for="item in historyList" :key="item.id" @click="$router.push({path:'/reporting/details',query:{id:item.id}})">
+          <div class="text">
+            <p class="title">报告事件:{{item.event}}</p>
+            <p class="mes">报告人:{{item.operator}}</p>
+            <p class="date">报告时间:{{item.mandatoryDate}}</p>
+            <p class="date">报告简介:{{item.content}}</p>
+          </div>
+        </div>
+      </van-list>
+    </div>
   </div>
 </template>
 <script>

+ 12 - 9
src/views/weibao/views/specialServices/startServiceplay.vue

@@ -17,8 +17,8 @@
         <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 /> -->
+            <!-- <div class="serviceTarget" @click="serviceTargetPopup">{{form.serviceTarget?form.serviceTarget:'请选择'}}</div> -->
+            <van-field @click="serviceTargetPopup" :rules="[{ required: true}]" 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">
@@ -32,7 +32,10 @@
         </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-col span="18" @click="showPopup">
+            <van-field v-model="form.servicetTime" :rules="[{ required: true}]" placeholder="请输入服务时间" />
+            <!-- {{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" />
@@ -40,10 +43,12 @@
         </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-col span="18" @click="streetshowPopup">
+            <van-field v-model="form.streetName" :rules="[{ required: true}]" placeholder="请选择街道" />
+            <!-- {{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">
@@ -55,7 +60,7 @@
         <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-field v-model="form.serviceStaff" :rules="[{ required: true}]" @click="serviceShow=true" placeholder="请选择服务人员" disabled />
             <van-popup v-model="serviceShow" position="bottom" :style="{ height: '30%' }">
               <div class="popup">
                 <div class="btn">
@@ -75,11 +80,10 @@
             </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-field class="textarea" v-model="form.serviceRecord" :rules="[{ required: true}]" rows="1" type="textarea" placeholder="请输入服务记录" />
           </van-col>
         </van-row>
         <van-row class="cell">
@@ -91,7 +95,6 @@
                   <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>

+ 2 - 0
vue.config.js

@@ -1,5 +1,6 @@
 var projectname = process.argv[3];
 var glob = require("glob");
+// console.log(process.argv[3], 'argv')
 
 function getEntry() {
     var entries = {};
@@ -22,6 +23,7 @@ function getEntry() {
             var filepath = items[i];
             var fileList = filepath.split("/");
             var fileName = fileList[fileList.length - 2];
+            console.log(fileName)
             entries[fileName] = {
                 entry: `src/views/${fileName}/main.js`,
                 // 模板来源