瀏覽代碼

Merge branch 'feature/v1.0.36' into dev/1.0.36_zsy

zhangsiya 1 年之前
父節點
當前提交
29d0dba6eb

+ 21 - 2
apps/bigmember_pc/src/components/filter-items/CommonCheckboxSelector.vue

@@ -12,16 +12,28 @@
         class="j-checkbox-button"
         v-for="state in options.value"
         :key="state"
-        :label="state"
+        :label="setSelectValue(state)"
       >
-        {{ state }}
+        {{ field ? setSelectValue(state) : state }}
       </el-checkbox-button>
     </el-checkbox-group>
   </div>
 </template>
 
 <script setup>
+
 const props = defineProps({
+  // 是否单选
+  sigle: {
+    type: Boolean,
+    default: false
+  },
+  // field: 空代表字符串数组
+  // 其他: options是对象数组,field是对象数组的某个字段
+  field: {
+    type: String,
+    default: ''
+  },
   options: {
     type: Object,
     default: () => {}
@@ -31,6 +43,13 @@ const props = defineProps({
     default: () => []
   }
 })
+function setSelectValue(state) {
+  if (props.dataType === '') {
+    return state
+  } else {
+    return state[props.field]
+  }
+}
 const emit = defineEmits(['input'])
 function onIssueStateChange(value) {
   const isAllBtn = value.filter((item, i) => item === '全部' && i !== 0)

+ 0 - 1
apps/bigmember_pc/src/views/search/nzj/model/base.js

@@ -137,7 +137,6 @@ export default function () {
   }
 
   function doChangeInput(data) {
-    console.log(data)
     let { area, build, civil, electromechanical, project_stage, ownerclass } =
       data
     const areaJudge = checkIfArrayHasOnlyValue(area, '全部')