Prechádzať zdrojové kódy

首页选择为单选

wolyshaw 4 rokov pred
rodič
commit
1720fd9dd1

+ 3 - 6
src/views/main/abnormal/index.vue

@@ -1,13 +1,11 @@
 <template>
   <div class="container">
     <save-form inline :model="search" @submit="FetchList" @reset="FetchList" saveKey="/main/main/abnormal">
-      <el-form-item prop="organIds">
+      <el-form-item prop="organId">
         <el-select
-          multiple
           clearable
           filterable
-          collapse-tags
-          v-model="search.organIds"
+          v-model="search.organId"
         >
           <el-option v-for="(item,index) in selects.branchs"
             :key="index"
@@ -92,7 +90,7 @@ export default {
   data() {
     return {
       search: {
-        organIds: []
+        organId: null
       },
       listByType: {},
       list: [],
@@ -152,7 +150,6 @@ export default {
       try {
         const res = await getIndexError({
           ...this.search,
-          organIds: this.search.organIds.join(',')
         })
         this.list = res.data.data
         const data = {}

+ 4 - 7
src/views/main/baseinfo/index.vue

@@ -14,14 +14,12 @@
           placeholder="请选择年份">
         </el-date-picker>
       </el-form-item>
-      <el-form-item prop="organIds">
+      <el-form-item prop="organId">
         <el-select
-          multiple
           clearable
           filterable
-          collapse-tags
           placeholder="请选择分部"
-          v-model="search.organIds"
+          v-model="search.organId"
         >
           <el-option v-for="(item,index) in selects.branchs"
             :key="index"
@@ -82,7 +80,7 @@ export default {
     return {
       search: {
         year: '',
-        organIds: []
+        organId: null
       },
       dataInfo: {},
       business: {},
@@ -100,7 +98,7 @@ export default {
   methods: {
     reset() {
       this.$set(this.search, 'year', this.$helpers.dayjs())
-      this.$set(this.search, 'organIds', [])
+      this.$set(this.search, 'organId', [])
       this.FetchDetail()
     },
     async FetchDetail() {
@@ -109,7 +107,6 @@ export default {
         const res = await getIndex({
           ...this.search,
           year: this.$helpers.dayjs(this.search.year).year() || '',
-          organIds: this.search.organIds.join(',')
         })
         for (const item of res.data) {
           data[item.dataType] = {

+ 5 - 5
src/views/main/reminders/index.vue

@@ -3,11 +3,9 @@
     <save-form inline :model="search" @submit="FetchList" @reset="FetchList" saveKey="/main/main/reminders">
       <el-form-item prop="organIds">
         <el-select
-          multiple
           clearable
           filterable
-          collapse-tags
-          v-model="search.organIds"
+          v-model="search.organId"
         >
           <el-option v-for="(item,index) in selects.branchs"
             :key="index"
@@ -51,7 +49,7 @@ export default {
   data() {
     return {
       search: {
-        organIds: []
+        organId: null
       },
       list: [],
     }
@@ -62,7 +60,9 @@ export default {
   methods: {
     async FetchList() {
       try {
-        const res = await getRemindMatterData()
+        const res = await getRemindMatterData({
+          ...this.search
+        })
         this.list = res.data
       } catch (error) {}
     }