瀏覽代碼

调整其他有害信息

yin_yu820 1 年之前
父節點
當前提交
5deae7ab90

+ 31 - 7
src/views/activityMan/nonReligiousInformation/nonReligiousInformationInfo.vue

@@ -18,18 +18,36 @@
         
         <van-cell-group>
           <van-field
-            v-model="info.nonReligiousCategoriesName"
+            v-model="info.name"
             readonly
-            label="非宗教类别:"
+            label="人员姓名:"
             input-align="right"
           />
         </van-cell-group>
         <van-cell-group>
           <van-field
-            v-model="info.siteName.organizationName"
+            v-model="info.sexname"
             center
             readonly
-            label="组织名称:"
+            label="性别:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.idcard"
+            center
+            readonly
+            label="身份证号:"
+            input-align="right"
+          />
+        </van-cell-group>
+        <van-cell-group>
+          <van-field
+            v-model="info.phone"
+            center
+            readonly
+            label="手机号码:"
             input-align="right"
           />
         </van-cell-group>
@@ -42,6 +60,7 @@
             input-align="right"
           />
         </van-cell-group>
+        
         <van-cell-group>
           <van-field
             v-model="info.placeSelectName"
@@ -70,8 +89,8 @@
           />
         </van-cell-group>
         
-        <p class="miniTitle">事件内容:</p>
-          <div v-html="info.eventContent" class="showhtml"> </div>
+        <!-- <p class="miniTitle">事件内容:</p>
+          <div v-html="info.eventContent" class="showhtml"> </div> -->
       </div>
       <van-button
         v-if="info.assessment == 0"
@@ -107,8 +126,13 @@
       let route = useRoute();
       onMounted(() => {
         new nonReligiousInformationService().queryById(route.query.id).then((data) => {
+          if(data.sex=="1"){
+            data.sexname="男"
+          }else{
+            data.sexname="女"
+          }
           info.value = data;  
-          info.value.nonReligiousCategoriesName=getCategories(info.value.nonReligiousCategories)
+          //info.value.nonReligiousCategoriesName=getCategories(info.value.nonReligiousCategories)
 
           isLoading.value = false;
         });

+ 16 - 12
src/views/activityMan/nonReligiousInformation/nonReligiousInformationList.vue

@@ -15,7 +15,7 @@
 
 
   <div class="main">
-    <van-search
+    <!-- <van-search
       v-model="searchVal"
       readonly="true"
       clearable
@@ -36,7 +36,9 @@
         @cancel="showPlace = false"
         @confirm="getPlace"
       />
-    </van-popup>
+    </van-popup> -->
+    <van-search v-model="searchVal" clearable show-action shape="round" placeholder="请输入搜索关键词" label="姓名"
+      input-align="center" @search="onSearch" @cancel="onCancel" />
     <van-tabs
       v-show="!searchShow"
       v-model:active="active"
@@ -55,13 +57,13 @@
             <div class="list_item" @click="goInfo(item.id)">
               <div class="item-left">
                 <p style="color: #c4c4c4">
-                  {{ item.updateDate }}
+                  {{ item.reportingTime }}
                 </p>
                 <p style="color: red">待审核</p>
               </div>
               <van-cell>
                 <template #title>
-                  {{ item.siteName.organizationName }}({{ getCategories(item.nonReligiousCategories) }})
+                  {{ item.name }}({{ item.phone }})
                 </template>
                 <template #label>
                   {{ item.eventOverview }}
@@ -98,13 +100,13 @@
             <div class="list_item" @click="goInfo(item.id)">
               <div class="item-left">
                 <p  style="color: #c4c4c4">
-                  {{ item.updateDate }}
+                  {{ item.reportingTime }}
                 </p>
                 <p style="color: gray">已审核</p>
               </div>
               <van-cell>
                 <template #title>
-                  {{ item.siteName.organizationName }}({{ getCategories(item.nonReligiousCategories) }})
+                  {{ item.name }}({{ item.phone }})
                 </template>
                 <template #label>
                   {{ item.eventOverview }}
@@ -266,16 +268,18 @@ setup() {
   const searchVal = ref("");
   const searchValId = ref("");    
   const onSearch = () => {
-    searchShow.value = true;
-    searchList.value = [];
-    new siteInspectionService()
+    //searchShow.value = true;
+    list.value = [];
+    new nonReligiousInformationService()
       .list({
         current: 1,
         size: 10000,
-        activityName: searchVal.value,
+        name: searchVal.value,
+        assessment:active.value,
       })
-      .then(({ records }) => {
-        searchList.value.push(...records);
+      .then((res) => {
+        
+        list.value.push(...res.records) ;
         // 加载状态结束
         loading.value = false;
       });

+ 91 - 12
src/views/activityMan/nonReligiousInformation/nonReligiousInformationView.vue

@@ -14,6 +14,31 @@
       <p class="miniTitle">基础信息</p>
 
       <van-cell-group>
+        <van-field v-model="inputForm.name" center label="人员姓名:" placeholder="请填写人员姓名" input-align="right">
+        </van-field>
+      </van-cell-group>
+
+      <van-cell-group>
+        <van-field name="radio" label="性别:" input-align="right">
+          <template #input>
+            <van-radio-group v-model="inputForm.sex" direction="horizontal">
+              <van-radio name="1">男</van-radio>
+              <van-radio name="2">女</van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
+      </van-cell-group>
+
+      <van-cell-group>
+        <van-field v-model="inputForm.idcard" center label="身份证号:" placeholder="请填写身份证号" input-align="right"
+          type="digit" />
+      </van-cell-group>
+      <van-cell-group>
+        <van-field v-model="inputForm.phone" center label="手机号:" placeholder="请填写手机号" input-align="right"
+          type="tel" />
+      </van-cell-group>
+
+      <!-- <van-cell-group>
         <van-field
           v-model="inputForm.nonReligiousCategoriesname"
           readonly
@@ -56,7 +81,7 @@
         >
           <organizations-list @selected="selected2" :type="1" :id="inputForm.nonReligiousCategories" ref="organ"></organizations-list>
         </van-dialog>
-      </van-cell-group>
+      </van-cell-group> -->
 
       <van-cell-group>
         <van-field
@@ -128,13 +153,24 @@
 	    </van-field>
 	  </van-cell-group>
 
+    <van-cell-group>
+        <van-field name="uploader" required :rules="[{ required: true }]" label="证据上传:">
+          <template #input>
+            <van-uploader :after-read="afterRead" v-model="fileList" :max-count="5" capture="camera" accept=""
+              :preview-full-image="false" :before-delete="deleteRead">
+              <van-button>上传文件</van-button>
+            </van-uploader>
+          </template>
+        </van-field>
+      </van-cell-group>
+<!-- 
       <van-cell-group>
-        <van-field label="事件内容:" label-align="top">
+        <van-field label="事件概述:" label-align="top">
           <template #input>
             <wang-editor ref="contentEditor" v-model="inputForm.eventContent" />
           </template>
         </van-field>
-      </van-cell-group>
+      </van-cell-group> -->
       <van-cell-group>
         <div class="rowTextArea">
           <van-field
@@ -179,12 +215,10 @@ export default {
     //信息
     let inputForm = ref({
       id: "",
-      nonReligiousCategoriesname: "",
-      nonReligiousCategories: "",
-      siteName: {
-        id: "",
-        name: "",
-      },
+      name: "",
+      sex:"1",
+      idcard:"",
+      phone:"",
       place: "320900",
       placeSelectName: "盐城市",
       placeSelectType3: "320900",
@@ -223,7 +257,7 @@ export default {
             isLoading.value = false;
           });
       } else {
-        contentEditor.value.init(inputForm.value.eventContent);
+        //contentEditor.value.init(inputForm.value.eventContent);
         isLoading.value = false;
       }
     });
@@ -332,11 +366,50 @@ export default {
 	  })
 	}
     
+    // 文件上传
+    let fileList = ref([]);
+    let fileupList = ref([]);
+    const afterRead = (file) => {
+      // 此时可以自行将文件上传至服务器
+      new tools()
+        .uploadFile(file, `nonReligiousInformation/nonReligiousInformation`)
+        .then(({ data }) => {
+        
+          data.name = decodeURIComponent(
+            data.url.substring(
+              data.url.lastIndexOf("/") + 1
+            )
+          );
+
+          //data.url = `${$base}` + data.url;    
+          fileupList.value.push(data);
+          window.xm.showToast({
+             message:"文件上传成功!"
+          })
+
+        });
+    };
+    const fjdelete = (file) => {
+      //删除文件操作
+      for (let index = 0; index < fileList.value.length; index++) {
+        if(file.file==fileList.value[index].file){
+          let delurl=fileupList.value[index].url;                   
+          new tools()
+            .uploadFiledelete("", delurl)
+            .then(({ data }) => {
+          });
+          fileupList.value.splice(index,1);
+          fileList.value.splice(index,1); 
+        }        
+      }      
+    };
 
     const submit = () => {
       isLoading.value = true;
+      //保存前附件处理
+      inputForm.value.annex = fileupList.value.map((option) => option.url).join("|");
       new nonReligiousInformationService().save(inputForm.value).then((res) => {
-        if(res.data=="保存非宗教类信息上报成功"){
+        if(res.data=="保存其他有害信息上报成功"){
           window.xm.showToast({
              message:"保存成功!"
           })
@@ -373,9 +446,15 @@ export default {
       fieldNames,
       options,
       onFinish,
-	  getLocation,
+	    getLocation,
       cascaderValue,
       contentEditor,
+
+      // 文件上传
+      afterRead,
+      fileList,
+      fileupList,
+      fjdelete,
       // change,
       submit,
       organ

+ 1 - 1
src/views/activityMan/personList.vue

@@ -42,7 +42,7 @@ export default {
       idcard: "",
       phone: "",
       location: {
-        id: ""
+        id: "",
       },
       typeOfEmployees: "",
       personnelType: "",