Jelajahi Sumber

优化界面,且删除?. 的书写方式

gaoxiong 2 tahun lalu
induk
melakukan
fc83dee63d

+ 1 - 1
src/components/SearchSelectCell/SelectPicker.vue

@@ -7,7 +7,7 @@
     </div>
     <van-search v-if="showSearch" placeholder="输入搜索内容" v-model="searchValue" @input="inputSearchValue" />
 <!--    <div class="tip">已选{{temp_datas.length}}条</div>-->
-    <div v-if="itemList?.length >0"  class="lists">
+    <div v-if="itemList.length >0"  class="lists">
       <div  class="line" v-for="(item, index) in itemList" :key="item[valueKey]">
 
         <van-cell

+ 2 - 2
src/components/Yselectcell/index.vue

@@ -18,7 +18,7 @@
 
       <van-search v-if="showSearch" placeholder="输入搜索内容" v-model="searchValue" @input="inputSearchValue" />
 
-      <div v-if="itemList?.length >0"  class="lists">
+      <div v-if="itemList.length >0"  class="lists">
         <van-checkbox-group v-model="selected">
           <van-cell-group>
             <van-cell
@@ -118,7 +118,7 @@ export default {
   computed: {
     nameListStr() {
       const list = this.dataList.filter(item => this.selected.includes(item.id));
-      return list.map(item => item.name)?.join(',')
+      return list.map(item => item.name).join(',')
     },
   },
   methods:{

+ 2 - 2
src/views/menu/message/index.vue

@@ -105,7 +105,7 @@ export default {
       this.show = false;
     },
     clickItem(v){
-      if(v.fileList?.length > 0){
+      if(v.fileList.length > 0){
         v.fileList.forEach(v=>{
           //p:获取url中的后缀名
           let p = v.url.split('.');
@@ -125,7 +125,7 @@ export default {
     },
     getDataList(){
       console.log(11111)
-      if( this.dataList.length !== 0 && this.dataList?.length >= this.total) {
+      if( this.dataList.length !== 0 && this.dataList.length >= this.total) {
         this.pullup = false;
         this.$toast('已加载完毕');
         return;

+ 1 - 1
src/views/menu/problemItem/detail.vue

@@ -60,7 +60,7 @@
             <van-cell title="整改日期" :label="formatDate(taskInfo.reform.executeTime,'YYYY-MM-DD')"></van-cell>
 <!--            <van-cell title="审核结果" :label="taskInfo.reform.executeStatus === 0 ? '已整改' : '未整改'"></van-cell>-->
             <van-cell title="整改描述" :label="taskInfo.reform.description"></van-cell>
-            <div class="upload-box" v-if="taskInfo.reform.images?.length > 0">
+            <div class="upload-box" v-if="taskInfo.reform.images.length > 0">
               <van-cell>
                 <div class="nfc-img van-hairline--surround" v-for="(v,i) in taskInfo.reform.images" :key="v" @click="clickImage(taskInfo.reform.images,i)">
                   <img :src="imgUrl(v)" alt="" >

+ 5 - 0
src/views/menu/resumption/detail.vue

@@ -287,6 +287,11 @@ export default {
       this.preViewImages.startPosition = i
       ImagePreview(this.preViewImages)
     },
+    clickWarnImage(arr,i){
+      this.preViewImages.images = arr.map(v=>imgUrl(v.imgPath));
+      this.preViewImages.startPosition = i;
+      ImagePreview(this.preViewImages)
+    },
     getResumptionData() {
       let data = {
         taskId: this.$route.query.id,

+ 1 - 1
src/views/menu/safetyBook/index.vue

@@ -82,7 +82,7 @@ export default {
       this.getDataList();
     },
     getDataList(){
-      if( this.dataList.length !== 0 && this.dataList?.length >= this.total) {
+      if( this.dataList.length !== 0 && this.dataList.length >= this.total) {
         this.pullup = false;
         this.$toast('已加载完毕');
         return;

+ 1 - 1
src/views/menu/securityCheckRegister/detail.vue

@@ -236,7 +236,7 @@ export default {
       ImagePreview(this.preViewImages)
     },
     getDicts(s){
-      return this.stateList.find(v=> s == v.dictValue)?.dictLabel;
+      return this.stateList.find(v=> s == v.dictValue).dictLabel;
     },
     //初始化数据
     getData() {

+ 1 - 1
src/views/menu/securityCheckRegister/index.vue

@@ -169,7 +169,7 @@ export default {
       })
     },
     getDataList(){
-      if( this.dataList.length !== 0 && this.dataList?.length >= this.total) {
+      if( this.dataList.length !== 0 && this.dataList.length >= this.total) {
         this.pullup = false;
         this.$toast('已加载完毕');
         return;

+ 3 - 3
src/views/menu/training/components/personnelSignature.vue

@@ -130,7 +130,7 @@ export default {
         }
 
         this.taskUserList = this.taskUserList.join(',')
-        
+
         this.qsUserList = this.qsUserList.join(',')
 
         this.signUserList = data.taskUserList || []
@@ -149,7 +149,7 @@ export default {
           })
         }
 
-        this.imgList = this.trainingData.imageList?.split(',') || []
+        this.imgList = this.trainingData.imageList.split(',') || []
       }
     })
   },
@@ -213,7 +213,7 @@ export default {
         document.body.removeChild(tempLink)
       }
     },
-   
+
   }
 }
 </script>