Browse Source

Merge branch '养老补贴统计' of sckj/mz-cloud into master

sunkuosheng521 2 years ago
parent
commit
3241c34964

+ 59 - 19
ruoyi-ui/src/components/EchartsBox/index.vue

@@ -137,7 +137,7 @@ export default {
       this.newTableList.forEach((item) => {
         if (this.xStr === 'year') {
           arrX.unshift(item[xAxis])
-          arrY.unshift(item[xAxis])
+          arrY.unshift(item[yAxis])
         }
         if (this.hengzhu === 'yes') {
           arrX.unshift(item[xAxis])
@@ -156,6 +156,9 @@ export default {
     },
     // 单选框改变事件
     changRadio(item) {
+      console.log(item, 'item')
+      console.log(this.x, 'this.x')
+      console.log(this.y, 'this.y')
       this.$emit('change-radio', this.radio)
       this.setTable(this.xStr, item.prop)
       this.echartsInit(this.echartsId, this.type, this.danwei, this.x, this.y, this.isX, this.isY)
@@ -299,22 +302,54 @@ export default {
             return colorList[params.dataIndex]
           }
         }
-        option.title = {
-          title: true,
-          text: this.all,
-          subtext: this.allNum + this.danwei,
-          top: 170,
-          left: 700,
-          textAlign: 'center',
-          textStyle: {
-            fontSize: '30',
-            fontWeight: 'bold',
-            color: '#86AFDE'
-          },
-          subtextStyle: {
-            fontSize: '30',
-            color: '#FFBA44'
-          }
+        // option.title = {
+        //   title: true,
+        //   text: this.all,
+        //   subtext: this.allNum + this.danwei,
+        //   top: 170,
+        //   left: 700,
+        //   textAlign: 'center',
+        //   textStyle: {
+        //     fontSize: '30',
+        //     fontWeight: 'bold',
+        //     color: '#86AFDE'
+        //   },
+        //   subtextStyle: {
+        //     fontSize: '30',
+        //     color: '#FFBA44'
+        //   }
+        option.graphic = {
+          type: 'group',
+          left: 'center',
+          top: 'center',
+          children: [
+            {
+              //图形中间⽂字
+              type: 'text',
+              left: 'center',
+              top: 'center',
+              style: {
+                text: this.all + '\n',
+                textAlign: 'center',
+                fill: '#492dcb',
+                fontSize: 30,
+                fontWeight: 'bold'
+              }
+            },
+            {
+              //图形中间⽂字
+              type: 'text',
+              left: 'center',
+              top: 'center',
+              style: {
+                text: '\n\n' + this.allNum + this.danwei,
+                textAlign: 'center',
+                fill: '#fad360',
+                fontSize: 30,
+                fontWeight: 'bold'
+              }
+            }
+          ]
         }
         option.xAxis = {
           type: 'category',
@@ -407,12 +442,17 @@ export default {
       }
 
       myChart.setOption(option)
+    },
+    resetRadio(val) {
+      console.log(val, 'val')
+      if (val) {
+        this.radio = 'total'
+      }
     }
   },
   created() {},
   mounted() {
-    console.log(this.radioName, '子节点中的radioname')
-    console.log(this.radio, 'radio值')
+    this.$bus.$on('reset-radio', this.resetRadio)
   },
   watch: {
     unit(newVal) {

+ 10 - 2
ruoyi-ui/src/components/EchartsBox2/index.vue

@@ -46,7 +46,7 @@
 
 <script>
 export default {
-  name: 'EchartsBox',
+  name: 'EchartsBox2',
   props: {
     echartsId: {
       type: [String, Number, Object],
@@ -118,6 +118,11 @@ export default {
     activeName2: {
       type: String,
       default: ''
+    },
+    // 用来单位的判断
+    istabs2: {
+      type: String,
+      default: 'no'
     }
   },
   data() {
@@ -389,7 +394,7 @@ export default {
           scale: true,
           // inverse: true,
           show: isShow,
-          name: '单位:' + unit,
+          // name: '单位:' + unit,
           nameTextStyle: {
             color: '#000',
             nameLocation: 'start'
@@ -479,6 +484,9 @@ export default {
             }
           }
         }
+        if (this.istabs2 === 'yes') {
+          option.yAxis.name = '单位:' + unit
+        }
       }
 
       myChart.setOption(option)

+ 2 - 0
ruoyi-ui/src/components/EchartsDate/index.vue

@@ -39,10 +39,12 @@ export default {
     // 改变年框事件
     changeDateYear() {
       this.$emit('change-dateYear', this.year)
+      this.$bus.$emit('reset-radio', this.year)
     },
     // 改变月框事件
     changeDateMonth() {
       this.$emit('change-dateMonth', this.month)
+      this.$bus.$emit('reset-radio', this.month)
     }
   }
 }

+ 1 - 0
ruoyi-ui/src/components/EchartsSelect/index.vue

@@ -28,6 +28,7 @@ export default {
   methods: {
     changeYear(value) {
       this.$emit('change-year', value)
+      this.$bus.$emit('reset-radio', value)
     }
   }
 }

+ 1 - 5
ruoyi-ui/src/components/ylbttjEcharts/index.vue

@@ -205,10 +205,7 @@ export default {
     }
   },
   created() {},
-  mounted() {
-    console.log(this.radioName, '子节点中的radioname')
-    console.log(this.radio, 'radio值')
-  },
+  mounted() {},
   watch: {
     unit(newVal) {
       this.newUnit = newVal
@@ -226,7 +223,6 @@ export default {
     // 监听子组件中radio的变化
     radio(newVal) {
       this.radio = newVal
-      console.log(newVal, 'newRadio')
     }
   }
 }

+ 3 - 0
ruoyi-ui/src/main.js

@@ -326,5 +326,8 @@ new Vue({
   el: '#app',
   router,
   store,
+  beforeCreate() {
+    Vue.prototype.$bus = this //安装全局事件总线,$bus 就是当前应用的vm
+  },
   render: (h) => h(App)
 })

+ 1 - 1
ruoyi-ui/src/views/search/xxtj/cyrytj/sqylfwjghss/index.vue

@@ -45,7 +45,7 @@
               <div class="ssqh">
                 <dept-tree :userId="user.userData.dept.parentId" @handleNodeClick="handleNodeClick"> </dept-tree>
               </div>
-              <Echarts-box v-loading="loading" title="从业人员统计" :echartsId="'three' + dict.value" type="pie" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
+              <Echarts-box danwei="人" v-loading="loading" title="从业人员统计" :echartsId="'three' + dict.value" type="pie" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
             </div>
             <div class="left-bottom-text">
               <!-- <span>注:本功能统计截止当天的数量及占比</span> -->

+ 1 - 1
ruoyi-ui/src/views/search/xxtj/cyrytj/yljg/index.vue

@@ -45,7 +45,7 @@
               <div class="ssqh">
                 <dept-tree :userId="user.userData.dept.parentId" @handleNodeClick="handleNodeClick"> </dept-tree>
               </div>
-              <Echarts-box v-loading="loading" :key="queryParams.para2" title="从业人员统计" :echartsId="'three' + dict.value" type="pie" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
+              <Echarts-box danwei="人" v-loading="loading" :key="queryParams.para2" title="从业人员统计" :echartsId="'three' + dict.value" type="pie" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
             </div>
             <div class="left-bottom-text">
               <!-- <span>注:本功能统计截止当天的数量及占比</span> -->

+ 1 - 0
ruoyi-ui/src/views/search/xxtj/lnrtj/sqylfwjghss/index.vue

@@ -67,6 +67,7 @@
                 <dept-tree :userId="user.userData.dept.parentId" @handleNodeClick="handleNodeClick"> </dept-tree>
               </div>
               <Echarts-box
+                danwei="人"
                 hengzhu="yes"
                 v-loading="loading"
                 :title="index === 0 ? '社区养老服务机构和设施老人类型统计' : '社区养老服务机构和设施老人身体能力等级统计'"

+ 1 - 1
ruoyi-ui/src/views/search/xxtj/lnrtj/yljg/index.vue

@@ -56,7 +56,7 @@
               <div class="ssqh">
                 <dept-tree :userId="user.userData.dept.parentId" @handleNodeClick="handleNodeClick"> </dept-tree>
               </div>
-              <Echarts-box hengzhu="yes" v-loading="loading" title="养老床位统计" :echartsId="'three' + dict.value" type="bar" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
+              <Echarts-box danwei="人" hengzhu="yes" v-loading="loading" title="养老床位统计" :echartsId="'three' + dict.value" type="bar" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
             </div>
             <div class="left-bottom-text">
               <!-- <span>注:本功能统计截止当天的数量及占比</span> -->

+ 17 - 5
ruoyi-ui/src/views/search/xxtj/xfaqjcqktj/xfaqwttj/index.vue

@@ -47,6 +47,7 @@
               >
               </Echarts-box2>
               <Echarts-box2
+                istabs2="yes"
                 :activeName2="activeName2"
                 danwei="个"
                 isTabs1="yes"
@@ -216,7 +217,15 @@ export default {
     },
     // 第一大页搜索事件
     search(val) {
+      this.table1Data = []
+      if (+val.yeartsEnd < +val.yeartsStart) {
+        this.$message.info('开始时间不得小于结束时间')
+        this.formQuary.yeartsStart = ''
+        this.formQuary.yeartsEnd = ''
+        return
+      }
       this.queryParams.para4 = `${val.yeartsStart}-${val.yeartsEnd}`
+      console.log(this.queryParams.para4, 'this.queryParams.para4')
       this.getTableList()
     },
     changeDataA(ret) {
@@ -312,28 +321,31 @@ export default {
 
     // 提出开始时间必须小于提出结束时间
     beginDate() {
-      let self = this
       return {
         disabledDate(time) {
-          if (self.yeartsEnd !== '') {
+          if (this.formQuary.yeartsEnd !== '') {
             let fixedTime = new Date(time)
-            return fixedTime.getFullYear() > self.yeartsEnd
+            return fixedTime.getFullYear() > self.formQuary.yeartsEnd
           }
         }
       }
     },
     // 提出结束时间必须大于提出开始时间
     processDate() {
-      let self = this
       return {
         disabledDate(time) {
           // let fixedTime = new Date(self.oldTime).getTime()
           // return time.getTime() < fixedTime
           let fixedTime = new Date(time)
-          return fixedTime.getFullYear() < self.yeartsStart
+          return fixedTime.getFullYear() < this.formQuary.yeartsStart
         }
       }
     },
+    // pickerOptions0: {
+    //   disabledDate(time) {
+    //     return time.getTime() < Date.now() - 8.64e7 //8.64e7=1000*60*60*24一天
+    //   }
+    // },
     // 接收月日期改变的数据
     changeDateMonth(val) {
       this.queryParams.para4 = val

+ 1 - 0
ruoyi-ui/src/views/search/xxtj/xfaqjcqktj/xfsspbqktj/index.vue

@@ -8,6 +8,7 @@
             <dept-tree :userId="user.userData.dept.parentId" @handleNodeClick="handleNodeClick"> </dept-tree>
           </div>
           <Echarts-box
+            :danwei="index === 0 ? '家' : '个'"
             v-loading="loading"
             :key="queryParams.para2"
             :title="index === 0 ? '养老机构消防设施配备情况统计-行政区划' : '配备每种消防设施的养老机构数量统计-消防设施类别'"

+ 20 - 2
ruoyi-ui/src/views/search/xxtj/ylbttj/index.vue

@@ -133,7 +133,21 @@ export default {
         unit: null,
         vales: null,
         keys: null
-      }
+      },
+      data: [
+        { recordCount: 1, columnLabelList: ['BT'], data: [{ bt: '区划名称|fixed|ssqh,补贴年度|fixed|year,补贴类型|select|btlx,机构补贴数量|select|btsl,补贴金额|select|btje,实际补贴金额|select|sjbtje' }] },
+        {
+          recordCount: 4,
+          columnLabelList: ['SSQH', 'YEAR', 'BTLX', 'BTSL', 'BTJE', 'SJBTJE'],
+          data: [
+            { ssqh: '长春市', year: '2019', btlx: '建设补贴', btsl: '20', btje: '123.4567', sjbtje: '153.4567' },
+            { ssqh: '长春市', year: '2020', btlx: '建设补贴', btsl: '10', btje: '23.4567', sjbtje: '53.4567' },
+            { ssqh: '长春市', year: '2021', btlx: '建设补贴', btsl: '10', btje: '23.4567', sjbtje: '53.4567' },
+            { ssqh: '长春市', year: '2022', btlx: '建设补贴', btsl: '10', btje: '23.4567', sjbtje: '53.4567' }
+          ]
+        },
+        { recordCount: 1, columnLabelList: ['BTFL'], data: [{ btfl: '建设补贴,运营补贴' }] }
+      ]
     }
   },
   methods: {
@@ -240,9 +254,13 @@ export default {
       }
     }
   },
-  mounted() {},
+  mounted() {
+    let obj = {}
+    this.data[1].data[0]
+  },
   created() {
     this.getTableList()
+    console.log(this.data)
   }
 }
 </script>

+ 1 - 1
ruoyi-ui/src/views/search/xxtj/ylcwtj/sqylfwjghss/index.vue

@@ -45,7 +45,7 @@
               <div class="ssqh">
                 <dept-tree :userId="user.userData.dept.parentId" @handleNodeClick="handleNodeClick"> </dept-tree>
               </div>
-              <Echarts-box hengzhu="yes" v-loading="loading" title="养老床位统计" :echartsId="'three' + dict.value" type="bar" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
+              <Echarts-box danwei="张" hengzhu="yes" v-loading="loading" title="养老床位统计" :echartsId="'three' + dict.value" type="bar" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
             </div>
             <div class="left-bottom-text">
               <span>注:本功能统计截止当天的数量及占比</span>

+ 1 - 1
ruoyi-ui/src/views/search/xxtj/ylcwtj/yljg/index.vue

@@ -45,7 +45,7 @@
               <div class="ssqh">
                 <dept-tree :userId="user.userData.dept.parentId" @handleNodeClick="handleNodeClick"> </dept-tree>
               </div>
-              <Echarts-box hengzhu="yes" v-loading="loading" title="养老床位统计" :echartsId="'three' + dict.value" type="bar" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
+              <Echarts-box danwei="张" hengzhu="yes" v-loading="loading" title="养老床位统计" :echartsId="'three' + dict.value" type="bar" :isPie="false" :tableList="tableData" :labelKeys="formData.keys" isX="value" isY="category"> </Echarts-box>
             </div>
             <div class="left-bottom-text">
               <!-- <span>注:本功能统计截止当天的数量及占比</span> -->

+ 0 - 2
ruoyi-ui/src/views/search/xxtj/yljgtj/index.vue

@@ -35,7 +35,6 @@
                 :tableList="tableData"
                 :labelKeys="formData.keys"
                 type="line"
-                xStr="year"
                 :unit="formData.unit"
               >
                 <Echarts-select @change-year="getNewYear"></Echarts-select>
@@ -288,7 +287,6 @@ export default {
 <style scoped>
 .echarts-box {
   width: 100%;
-  height: 500px;
   display: flex;
   justify-content: space-between;
 }