wenbobowen 4 anni fa
parent
commit
0615082528

+ 6 - 1
src/components/searchHeader/index.vue

@@ -30,7 +30,7 @@
       </div>
       <div class="btn" @click="showMoreHandle">{{ goodName }}</div>
     </div>
-    <div v-show="showMore" class="advBox">
+    <div v-show="showMoreBox" class="advBox">
       <div class="content">
         <searchBox
           :list="data.adv"
@@ -121,6 +121,11 @@ export default {
       month: '0'
     }
   },
+  computed: {
+    showMoreBox() {
+      return this.showMore
+    }
+  },
   mounted() {
     const d = new Date()
     const nowYear = d.getFullYear()

+ 7 - 2
src/components/searchHeader/searchForm.vue

@@ -113,18 +113,19 @@
         v-else-if="l.type === 'cascader'"
         v-model="l.value"
         show-search
+        allow-clear
         style="width: 100%"
         :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
         placeholder="请选择"
         tree-node-filter-prop="title"
         tree-default-expand-all
         :tree-data="l.option"
-        @change="(e) => $emit('change', l.key, e)"
+        @change="(e) => test(l, e)"
       />
       <el-input
         v-else
         v-model="l.value"
-        style="width: 72% !important"
+        style="width: 100% !important"
         size="small"
         class="chooseItem"
         clearable
@@ -206,6 +207,10 @@ export default {
     this.setDate(this.showItemDataPickerItem, 'showItemDataPicker')
   },
   methods: {
+    test(l, v) {
+      console.log(v || '')
+      this.$emit('change', l.key, v || '')
+    },
     setDate(type, key) { // 日期筛选
       let startDate = null
       let endDate = null

+ 1 - 1
src/views/dataBigManage/components/qualityModule/index.vue

@@ -395,7 +395,7 @@ export default {
             'padding': '8px 0px',
             'label': onlinebyStreakingRate.label,
             'title': onlinebyStreakingRate.countStr,
-            'titleUnit': '%',
+            'titleUnit': '',
             'IdList': onlinebyStreakingRate.idList
           }
         ],

+ 4 - 3
src/views/dataBigManage/data.js

@@ -7,9 +7,9 @@ export const listSearchData = {
         key: 'deptCode',
         type: 'cascader',
         placeholder: '请选择部门',
-        option: [],
-        styles: { minWidth: '435px', width: 'auto' },
-        nameStyles: { minWidth: '53px' }
+        option: []
+        // styles: { minWidth: '268x', width: 'auto' }
+        // nameStyles: { minWidth: '53px' }
       },
       {
         name: '时间',
@@ -28,6 +28,7 @@ export const listSearchData = {
       name: '团队',
       key: 'teamIds',
       type: 'selectGroup',
+      // styles: { minWidth: '435px', width: 'auto' },
       multiple: true,
       placeholder: '',
       value: '',

+ 9 - 2
src/views/dataBigManage/index.vue

@@ -144,10 +144,17 @@ export default {
         startTime: data.time[0],
         endTime: data.time[1]
       }
-      if (this.params.deptCode) this.getList()
+      if (
+        this.params.deptCode ||
+        (this.params.teamIds && this.params.teamIds.length > 0)
+      ) {
+        this.getList()
+      } else {
+        this.$message({ message: '部门和更多筛选中的团队筛选项必须选一个。', type: 'warning', duration: 1000, offset: 150 })
+      }
     },
     getSearchOptios() {
-      getStaffByUsername('shidonghai').then(async res => {
+      getStaffByUsername(localStorage.getItem('username')).then(async res => {
         if (res.code === 200 && res.data.deptArch) {
           const copySearchData = _.clone(this.listSearch)
           const resdata = this.resetData([res.data.deptArch])