chenchhuanbao 4 mesi fa
parent
commit
9b5184c88f
2 ha cambiato i file con 15 aggiunte e 3 eliminazioni
  1. 0 3
      src/option/ybss/syrk.js
  2. 15 0
      src/views/ybss/syrk/syrk.vue

+ 0 - 3
src/option/ybss/syrk.js

@@ -83,9 +83,6 @@ export default {
         {
             label: '是否是特殊人群',
             prop: 'ryTsLb',
-            formatter:(val,value,label)=>{
-              return `${value}`
-            }
         },
         {
             label: '详细地址',

+ 15 - 0
src/views/ybss/syrk/syrk.vue

@@ -4,6 +4,9 @@
                v-model="form" ref="crud" @search-change="searchChange" @search-reset="searchReset"
                @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
                @refresh-change="refreshChange" @on-load="onLoad">
+    <template #ryTsLb="scope">
+      <div v-html="initData(scope.row.ryTsLb)"></div>
+    </template>
       <template slot="menuLeft">
         <div class="search_btn_group">
           <button @click="addData" :parentData="selectionList[0]" :disabled="selectionList.length==0">新增</button>
@@ -42,6 +45,18 @@ export default window.$crudCommon({
     }
   },
   methods: {
+    initData(ryTsLb){
+      if(ryTsLb){
+        var htmls = ''
+        var data = JSON.parse(ryTsLb)
+        data.forEach(vs=>{
+          htmls+='<span>'+vs+'<span/>'
+        })
+        return htmls
+      }else{
+        return  `<span>否<span/>`
+      }
+    },
     reload(){
       this.onLoad(this.page);
     },