소스 검색

添加医院级看板项目设计组件

wuyunfeng 1 년 전
부모
커밋
09a02914df

+ 3 - 0
languages/zh-CN.js

@@ -1654,5 +1654,8 @@ module.exports = {
       content_show: '内容显示方式'
     },
     clear_icon: '清除图标'
+  },
+  wu20240604: {
+    textDisplayHospitalModuleTitle: '院级统计信息'
   }
 }

+ 10 - 2
src/api/ncs_board.js

@@ -15,7 +15,6 @@ export function getBoardTitles(partid) {
 }
 
 
-
 export function getBedInfo(partid) {
   return request({
     baseURL:domain.DeviceUrl,
@@ -25,7 +24,6 @@ export function getBedInfo(partid) {
   })
 }
 
-
 export function getPartStatisticSummary(partid) {
   return request({
     baseURL:domain.DeviceUrl,
@@ -34,3 +32,13 @@ export function getPartStatisticSummary(partid) {
     loading: false
   })
 }
+
+/** 获取医院级联科室统计信息 */
+export function getHospitalStatisticsCascader(partId) {
+  return request({
+    baseURL:domain.DeviceUrl,
+    url: `/boardinfo/get-hospital-statistics-cascader/${partId}`,
+    method: 'get',
+    loading: false
+  })
+}

+ 21 - 0
src/router/index.js

@@ -560,6 +560,27 @@ export const hospitalRoutes = [
         component: () => import('@/views/hospital/ledControl'),
         name: 'hospital-led-control',
         meta: { title: i18n.t('tab.ledDevice'), icon: 'el-icon-message-solid', noCache: true }
+      },
+      {
+        path: 'information_board',
+        component: () => import('@/views/calling-board/index'),
+        name: 'information-board',
+        meta: { title: i18n.t('tab.boardManage'), icon: 'infomation_board', noCache: true },
+        hidden: uiVersion === 2
+      },
+      {
+        path: 'custom_infoboard',
+        component: () => import('@/views/custom-infoboard/board-title'),
+        name: 'board-title',
+        meta: { title: i18n.t('tab.customBoardManage'), icon: 'designer', noCache: true },
+        hidden: uiVersion === 2
+      },
+      {
+        path: 'index/:id?',
+        component: () => import('@/views/custom-infoboard/infoboard-designer'), // 自定义看板 component: () => import('@/views/custom-infoboard/infoboard-designer'),资阳 component: () => import('@/views/custom-infoboard/screen-designer')
+        name: 'infoboard-designer-manager',
+        meta: { title: i18n.t('tab.customBoardDesigner'), icon: 'el-icon-data-board', noCache: true },
+        hidden: true
       }
     ]
   },

+ 4 - 1
src/views/calling-board/index.vue

@@ -417,7 +417,8 @@ export default {
      * */
     getFrameTree() {
       return new Promise((resolve, reject) => {
-        API_Frame.getframestruct(this.$store.getters.partId, 3).then(res => {
+        console.log('getters',this.$store.getters.organization)
+        API_Frame.getframestruct(this.$store.getters.partId, this.$store.getters.organization.shop_type==='6'?1:3).then(res => {
           this.treeData = res.frameTree
           resolve()
         }).catch(err => {
@@ -469,7 +470,9 @@ export default {
      */
     handEdit(row) {
       row.part_id = this.$store.getters.partId
+      console.log('treeData',this.treeData)
       row.frame_id = this.treeData[0].id
+
       API_Device.update(row.id, row).then(res => {
         this.$message.success(this.$t('action.setUpSuccess'))
         this.gridApi.redrawRows()

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 730 - 705
src/views/custom-infoboard/infoboard-designer.vue


+ 198 - 197
src/views/custom-infoboard/mixinnew.js

@@ -1,212 +1,213 @@
 import dragtool from './templates/DragTool'
-import {unix2Date,unix2DateWithTimeZone} from '@/utils/Foundation'
+import { unix2Date, unix2DateWithTimeZone } from '@/utils/Foundation'
 export default {
-    props: {
-        /** 模块设计数据 */
-        data: {
-            type: Object,
-            default: () => ({})
-        },
-        /** 是否为编辑模式 */
-        isEdit: {
-            type: Boolean,
-            default: false
-        },
-        /** 模块绑定数据  **/
-        bindData:{
-            type:Object,
-            default:()=>({})
-        },
-        /** 床位数据数组索引 */
-        childDataIndex:{
-            type:Number,
-            default:0
-        },
-        /** 科室统计信息*/
-        statisticData:{
-            type:Object,
-            default:()=>({})
-        },
-        /** 自定义看板项目*/
-        boardCustomerItems:{
-            type:Array,
-            default:([])
-        },
-        /** 手动输入看板项项目数据
+  props: {
+    /** 模块设计数据 */
+    data: {
+      type: Object,
+      default: () => ({})
+    },
+    /** 是否为编辑模式 */
+    isEdit: {
+      type: Boolean,
+      default: false
+    },
+    /** 模块绑定数据  **/
+    bindData: {
+      type: Object,
+      default: () => ({})
+    },
+    /** 床位数据数组索引 */
+    childDataIndex: {
+      type: Number,
+      default: 0
+    },
+    /** 科室统计信息*/
+    statisticData: {
+      type: Object,
+      default: () => ({})
+    },
+    /** 自定义看板项目*/
+    boardCustomerItems: {
+      type: Array,
+      default: ([])
+    },
+    /** 手动输入看板项项目数据
          */
-        manualInputBoardItems:{
-            type:Array,
-            default:([])
-        },
-        /** 动画驱动**/
-        show:{
-            type:Boolean,
-            default:true
-        }
+    manualInputBoardItems: {
+      type: Array,
+      default: ([])
     },
-    components: {
-        dragtool
+    /** 医院级科室级联统计数据 */
+    hospitalStatisticsCascader: {
+      type: Array,
+      default: ([])
     },
-    computed:{
-        moduleComputedStyle(){
-            let backgroundColorNurse = ''
-            let borderColorNurse = ''
-            let boxShadow =''
-            if(this.data.moduleConfig.styleConfig.borderColorWithNurse&&this.data.moduleConfig.styleConfig.borderColorWithNurse!==''){
-
-                let nurseId = this.data.moduleConfig.styleConfig.borderColorWithNurse.replace('nurse_color_','')
-                let nurseOption = this.bindData.items[this.childDataIndex]['list'].filter(p=>p.nurse_config===parseInt(nurseId))[0]
-                if(nurseOption){
-                    borderColorNurse='#'+nurseOption.nurse_color_rbg
-                }
-            }
-            if(this.data.moduleConfig.styleConfig.backgroundColorWithNurse&&this.data.moduleConfig.styleConfig.backgroundColorWithNurse!==''){
-
-                let nurseId = this.data.moduleConfig.styleConfig.backgroundColorWithNurse.replace('nurse_color_','')
-                let nurseOption = this.bindData.items[this.childDataIndex]['list'].filter(p=>p.nurse_config===parseInt(nurseId))[0]
-                if(nurseOption){
-                    backgroundColorNurse='#'+nurseOption.nurse_color_rbg
-                }
-            }
-
-            if(this.data.moduleConfig.styleConfig.backgroundColorToday&&this.data.moduleConfig.styleConfig.backgroundColorToday!==''){ //设置日期等于当天的颜色
-                if(this.displayText===unix2DateWithTimeZone(new Date().getTime(),this.data.moduleConfig.dataConfig.textFormat)){
-                    backgroundColorNurse=this.data.moduleConfig.styleConfig.backgroundColorToday
-                }
-            }
-            if(this.data.moduleConfig.styleConfig.boxShadowShow){
-                boxShadow='1px 1px 3px 1px #eee'
-                if (this.data.moduleConfig.styleConfig.boxShadowColor&&this.data.moduleConfig.styleConfig.boxShadowColor!==''){
-                    boxShadow='1px 1px 3px 1px '+this.data.moduleConfig.styleConfig.boxShadowColor
-                }
-            }
-
-            return {...this.data.moduleConfig.moduleStyle,
-                borderColor:(borderColorNurse===''?this.data.moduleConfig.moduleStyle.borderColor:borderColorNurse),
-                backgroundColor:(backgroundColorNurse===''?this.data.moduleConfig.moduleStyle.backgroundColor:backgroundColorNurse),
-               boxShadow:boxShadow}
-        },
-        titleComputedStyle(){ //显示单元标题样式计算
-            let titleColor =''
-            if(this.data.moduleConfig.styleConfig.titleColorWithNurse&&this.data.moduleConfig.styleConfig.titleColorWithNurse!==''){
-                let nurseId = this.data.moduleConfig.styleConfig.titleColorWithNurse.replace('nurse_color_','')
-                let nurseOption = this.bindData.items[this.childDataIndex]['list'].filter(p=>p.nurse_config===parseInt(nurseId))[0]
-                if(nurseOption){
-                    titleColor='#'+nurseOption.nurse_color_rbg
-                }
-            }
-
-            return {...this.data.moduleConfig.titleStyle,
-                color:(titleColor===''?this.data.moduleConfig.titleStyle.color:titleColor)}
-        },
-        textComputedStyle(){ //显示单元
-                let textcolor =''
-                if(this.data.moduleConfig.styleConfig.textColorWithNurse&&this.data.moduleConfig.styleConfig.textColorWithNurse!==''){
-                    let nurseId = this.data.moduleConfig.styleConfig.textColorWithNurse.replace('nurse_color_','')
-                    let nurseOption = this.bindData.items[this.childDataIndex]['list'].filter(p=>p.nurse_config===parseInt(nurseId))[0]
-                    if(nurseOption){
-                        textcolor='#'+nurseOption.nurse_color_rbg
-                    }
-                }
-                if(this.data.moduleConfig.styleConfig.textColorToday&&this.data.moduleConfig.styleConfig.textColorToday!==''){ //设置日期等于当天的颜色
-                    if(this.displayText===unix2DateWithTimeZone(new Date().getTime(),this.data.moduleConfig.dataConfig.textFormat)){
-                        textcolor=this.data.moduleConfig.styleConfig.textColorToday
-                    }
-                }
-            console.log('moduleConfig',this.data)
-                return {
-                    ...this.data.moduleConfig.textStyle,
-                    color: (textcolor === '' ? this.data.moduleConfig.textStyle.color : textcolor)
-                }
-        },
-        containerComputedStyle(){
+    /** 动画驱动**/
+    show: {
+      type: Boolean,
+      default: true
+    }
+  },
+  components: {
+    dragtool
+  },
+  computed: {
+    moduleComputedStyle() {
+      let backgroundColorNurse = ''
+      let borderColorNurse = ''
+      let boxShadow = ''
+      if (this.data.moduleConfig.styleConfig.borderColorWithNurse && this.data.moduleConfig.styleConfig.borderColorWithNurse !== '') {
+        let nurseId = this.data.moduleConfig.styleConfig.borderColorWithNurse.replace('nurse_color_', '')
+        let nurseOption = this.bindData.items[this.childDataIndex]['list'].filter(p => p.nurse_config === parseInt(nurseId))[0]
+        if (nurseOption) {
+          borderColorNurse = '#' + nurseOption.nurse_color_rbg
+        }
+      }
+      if (this.data.moduleConfig.styleConfig.backgroundColorWithNurse && this.data.moduleConfig.styleConfig.backgroundColorWithNurse !== '') {
+        let nurseId = this.data.moduleConfig.styleConfig.backgroundColorWithNurse.replace('nurse_color_', '')
+        let nurseOption = this.bindData.items[this.childDataIndex]['list'].filter(p => p.nurse_config === parseInt(nurseId))[0]
+        if (nurseOption) {
+          backgroundColorNurse = '#' + nurseOption.nurse_color_rbg
+        }
+      }
 
-            if(this.data.moduleConfig.styleConfig.moduleFixed&&!this.isEdit){
-                return {
-                    position:'fixed',
-                    width:'100%',
-                    bottom:0,
-                    left:0
-                }
-            }
+      if (this.data.moduleConfig.styleConfig.backgroundColorToday && this.data.moduleConfig.styleConfig.backgroundColorToday !== '') { // 设置日期等于当天的颜色
+        if (this.displayText === unix2DateWithTimeZone(new Date().getTime(), this.data.moduleConfig.dataConfig.textFormat)) {
+          backgroundColorNurse = this.data.moduleConfig.styleConfig.backgroundColorToday
         }
+      }
+      if (this.data.moduleConfig.styleConfig.boxShadowShow) {
+        boxShadow = '1px 1px 3px 1px #eee'
+        if (this.data.moduleConfig.styleConfig.boxShadowColor && this.data.moduleConfig.styleConfig.boxShadowColor !== '') {
+          boxShadow = '1px 1px 3px 1px ' + this.data.moduleConfig.styleConfig.boxShadowColor
+        }
+      }
 
+      return { ...this.data.moduleConfig.moduleStyle,
+        borderColor: (borderColorNurse === '' ? this.data.moduleConfig.moduleStyle.borderColor : borderColorNurse),
+        backgroundColor: (backgroundColorNurse === '' ? this.data.moduleConfig.moduleStyle.backgroundColor : backgroundColorNurse),
+        boxShadow: boxShadow }
     },
+    titleComputedStyle() { // 显示单元标题样式计算
+      let titleColor = ''
+      if (this.data.moduleConfig.styleConfig.titleColorWithNurse && this.data.moduleConfig.styleConfig.titleColorWithNurse !== '') {
+        let nurseId = this.data.moduleConfig.styleConfig.titleColorWithNurse.replace('nurse_color_', '')
+        let nurseOption = this.bindData.items[this.childDataIndex]['list'].filter(p => p.nurse_config === parseInt(nurseId))[0]
+        if (nurseOption) {
+          titleColor = '#' + nurseOption.nurse_color_rbg
+        }
+      }
 
-     data(){
-       return{
-           systemDate:new Date()
-       }
-     },
-    mounted(){
-        let _this=this
-      setInterval(function () {
-          _this.systemDate = new Date()
-      },1000)
-    },
-    methods: {
-        /** 获取颜色相关信息 */
-        colors(columnIndex = 0) {
-            const _colors = this.data.columnList[columnIndex].titleColors
-            return {
-                title: `background-color: ${_colors[0]}; background-image: linear-gradient(90deg, ${_colors.join(',')});`,
-                color: (colorIndex = 0) => `color: ${_colors[colorIndex]}`
-            }
-        },
-        // /** 获取区块链接 */
-        // blockHref(block) {
-        //     const { opt_type, opt_value } = block.block_opt
-        //     switch (opt_type) {
-        //         // 链接地址
-        //         case 'URL': return opt_value
-        //         // 商品
-        //         case 'GOODS': return `/goods/${opt_value}`
-        //         // 关键字
-        //         case 'KEYWORD': return `/goods?keyword=${encodeURIComponent(opt_value)}`
-        //         // 店铺
-        //         case 'SHOP': return `/shop/${opt_value}`
-        //         // 分类
-        //         case 'CATEGORY': return `/goods?category=${opt_value}`
-        //         default: return '/'
-        //     }
-        // },
-        /** 构建空的block */
-        emptyBlock(num = 3, type) {
-            return [...new Array(num)].map(() => ({
-                block_type: type,
-                block_value: '',
-                block_opt: {
-                    opt_type: 'NONE',
-                    opt_value: ''
-                }
-            }))
-        },
-        /** 编辑区块 */
-        handleEditBlock(columnIndex, blockIndex) {
-            console.log(JSON.stringify(this.data))
-            this.$emit('edit-block', JSON.parse(JSON.stringify(this.data)), columnIndex, blockIndex)
-        },
-        /** 编辑标题 */
-        handleEditTitle(columnIndex) {
-            this.$emit('edit-title', JSON.parse(JSON.stringify(this.data)), columnIndex)
-        },
-        /** 编辑标签 */
-        handleEditTags(columnIndex) {
-            this.$emit('edit-tags', JSON.parse(JSON.stringify(this.data)), columnIndex)
-        },
-
-        deleteModule(unique){
-            console.log('model delete',unique)
-            this.$emit('remove',unique)
-        },
-        copyModule(unique){
-            this.$emit('copy',unique)
-        },
-        activeModule(unique){
-            this.$emit('active',unique)
-        },
+      return { ...this.data.moduleConfig.titleStyle,
+        color: (titleColor === '' ? this.data.moduleConfig.titleStyle.color : titleColor) }
+    },
+    textComputedStyle() { // 显示单元
+      let textcolor = ''
+      if (this.data.moduleConfig.styleConfig.textColorWithNurse && this.data.moduleConfig.styleConfig.textColorWithNurse !== '') {
+        let nurseId = this.data.moduleConfig.styleConfig.textColorWithNurse.replace('nurse_color_', '')
+        let nurseOption = this.bindData.items[this.childDataIndex]['list'].filter(p => p.nurse_config === parseInt(nurseId))[0]
+        if (nurseOption) {
+          textcolor = '#' + nurseOption.nurse_color_rbg
+        }
+      }
+      if (this.data.moduleConfig.styleConfig.textColorToday && this.data.moduleConfig.styleConfig.textColorToday !== '') { // 设置日期等于当天的颜色
+        if (this.displayText === unix2DateWithTimeZone(new Date().getTime(), this.data.moduleConfig.dataConfig.textFormat)) {
+          textcolor = this.data.moduleConfig.styleConfig.textColorToday
+        }
+      }
+      console.log('moduleConfig', this.data)
+      return {
+        ...this.data.moduleConfig.textStyle,
+        color: (textcolor === '' ? this.data.moduleConfig.textStyle.color : textcolor)
+      }
+    },
+    containerComputedStyle() {
+      if (this.data.moduleConfig.styleConfig.moduleFixed && !this.isEdit) {
+        return {
+          position: 'fixed',
+          width: '100%',
+          bottom: 0,
+          left: 0
+        }
+      }
+    }
 
+  },
 
+  data() {
+    return {
+      systemDate: new Date()
+    }
+  },
+  mounted() {
+    let _this = this
+    setInterval(function() {
+      _this.systemDate = new Date()
+    }, 1000)
+    console.log('minxin',this.hospitalStatisticsCascader)
+  },
+  methods: {
+    /** 获取颜色相关信息 */
+    colors(columnIndex = 0) {
+      const _colors = this.data.columnList[columnIndex].titleColors
+      return {
+        title: `background-color: ${_colors[0]}; background-image: linear-gradient(90deg, ${_colors.join(',')});`,
+        color: (colorIndex = 0) => `color: ${_colors[colorIndex]}`
+      }
+    },
+    // /** 获取区块链接 */
+    // blockHref(block) {
+    //     const { opt_type, opt_value } = block.block_opt
+    //     switch (opt_type) {
+    //         // 链接地址
+    //         case 'URL': return opt_value
+    //         // 商品
+    //         case 'GOODS': return `/goods/${opt_value}`
+    //         // 关键字
+    //         case 'KEYWORD': return `/goods?keyword=${encodeURIComponent(opt_value)}`
+    //         // 店铺
+    //         case 'SHOP': return `/shop/${opt_value}`
+    //         // 分类
+    //         case 'CATEGORY': return `/goods?category=${opt_value}`
+    //         default: return '/'
+    //     }
+    // },
+    /** 构建空的block */
+    emptyBlock(num = 3, type) {
+      return [...new Array(num)].map(() => ({
+        block_type: type,
+        block_value: '',
+        block_opt: {
+          opt_type: 'NONE',
+          opt_value: ''
+        }
+      }))
+    },
+    /** 编辑区块 */
+    handleEditBlock(columnIndex, blockIndex) {
+      console.log(JSON.stringify(this.data))
+      this.$emit('edit-block', JSON.parse(JSON.stringify(this.data)), columnIndex, blockIndex)
+    },
+    /** 编辑标题 */
+    handleEditTitle(columnIndex) {
+      this.$emit('edit-title', JSON.parse(JSON.stringify(this.data)), columnIndex)
+    },
+    /** 编辑标签 */
+    handleEditTags(columnIndex) {
+      this.$emit('edit-tags', JSON.parse(JSON.stringify(this.data)), columnIndex)
+    },
 
+    deleteModule(unique) {
+      console.log('model delete', unique)
+      this.$emit('remove', unique)
+    },
+    copyModule(unique) {
+      this.$emit('copy', unique)
+    },
+    activeModule(unique) {
+      this.$emit('active', unique)
     }
+
+  }
 }

+ 11 - 6
src/views/custom-infoboard/nest-component.vue

@@ -2,20 +2,20 @@
     <div >
     <div v-for="(el,index) in tasks" :key="el.unique"><!--:key="el.unique"-->
         <template v-if="el.moduleConfig.isCircleChild">
-            <component   :is="templates[el.tpl_id]" :data="el" :bind-data="bindData" :show="show" :board-customer-items="boardCustomerItems" :manual-input-board-items="manualInputBoardItems" :statistic-data="statisticData" :child-data-index="childDataIndex">
+            <component   :is="templates[el.tpl_id]" :data="el" :bind-data="bindData" :show="show" :board-customer-items="boardCustomerItems" :manual-input-board-items="manualInputBoardItems" :hospital-statistics-cascader="hospitalStatisticsCascader" :statistic-data="statisticData" :child-data-index="childDataIndex">
 
                 <grid-item  v-for="i in ((el.moduleConfig.gridCloumns*el.moduleConfig.gridRows)>(bindData.items?bindData.items.length:0)?(bindData.items?bindData.items.length:0):(el.moduleConfig.gridCloumns*el.moduleConfig.gridRows))" style="padding: 5px;">
 
-                    <nest-component :tasks="el.children" :bind-data="bindData" :show="show" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :statistic-data="statisticData" :child-data-index="i-1" />
+                    <nest-component :tasks="el.children" :bind-data="bindData" :show="show" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :hospital-statistics-cascader="hospitalStatisticsCascader" :statistic-data="statisticData" :child-data-index="i-1" />
 
                 </grid-item>
 
             </component>
         </template>
         <template v-else>
-            <component   :is="templates[el.tpl_id]" :data="el" :bind-data="bindData"  :show="show" :board-customer-items="boardCustomerItems" :manual-input-board-items="manualInputBoardItems" :statistic-data="statisticData" :child-data-index="childDataIndex">
+            <component   :is="templates[el.tpl_id]" :data="el" :bind-data="bindData"  :show="show" :board-customer-items="boardCustomerItems" :manual-input-board-items="manualInputBoardItems" :hospital-statistics-cascader="hospitalStatisticsCascader" :statistic-data="statisticData" :child-data-index="childDataIndex">
                 <!--            <p>{{ el.name }}</p>-->
-                <nest-component :tasks="el.children" :bind-data="bindData" :show="show" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :statistic-data="statisticData" :child-data-index="childDataIndex"/>
+                <nest-component :tasks="el.children" :bind-data="bindData" :show="show" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :hospital-statistics-cascader="hospitalStatisticsCascader" :statistic-data="statisticData" :child-data-index="childDataIndex"/>
             </component>
         </template>
 
@@ -52,8 +52,13 @@
             /** 手动输入看板条目 */
             manualInputBoardItems:{
                 type:Array,
-                default:()=>[]
+                default:([])
             },
+          /** 医院级科室级联统计数据 */
+          hospitalStatisticsCascader: {
+            type: Array,
+            default: ([])
+          },
             /** 动画驱动**/
             show:{
                 type:Boolean,
@@ -73,7 +78,7 @@
             }
         },
       mounted() {
-            console.log('nest',this.statisticData)
+            console.log('nest',this.hospitalStatisticsCascader)
             // console.log('child',this.data.children)
       }
     }

+ 11 - 6
src/views/custom-infoboard/nest-draggable.vue

@@ -2,17 +2,17 @@
     <draggable class="dragArea" tag="div" :list="tasks"  :options="floorOptions" @add="additem"  :clone="clonedata">
         <div v-for="(el,index) in tasks" :key="el.unique" ><!---->
             <template v-if="el.moduleConfig.isCircleChild">
-        <component   :is="templates[el.tpl_id]" :bind-data="bindData" :show="show" :statistic-data="statisticData" :board-customer-items="boardCustomerItems" :manual-input-board-items="manualInputBoardItems" :child-data-index="childDataIndex" :data="el" :is-edit="el.isEdit"  @remove="deleteModule" @copy="copyModule" @active="activeModule">
+        <component   :is="templates[el.tpl_id]" :bind-data="bindData" :show="show" :statistic-data="statisticData" :board-customer-items="boardCustomerItems" :manual-input-board-items="manualInputBoardItems" :hospital-statistics-cascader="hospitalStatisticsCascader" :child-data-index="childDataIndex" :data="el" :is-edit="el.isEdit"  @remove="deleteModule" @copy="copyModule" @active="activeModule">
 <!--            <p>{{ el.name }}</p>-->
             <grid-item  v-for="i in ((el.moduleConfig.gridCloumns*el.moduleConfig.gridRows)>(bindData.items?bindData.items.length:0)?(bindData.items?bindData.items.length:0):(el.moduleConfig.gridCloumns*el.moduleConfig.gridRows))" style="padding: 5px;" :key="el.unique+i">
-            <nest-draggable :tasks="el.children" :bind-data="bindData" :show="show" :statistic-data="statisticData" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :child-data-index="i-1" :is-edit="i===1" @add="additem" @delete="deleteModule" @copy="copyModule" @active="activeModule"/>
+            <nest-draggable :tasks="el.children" :bind-data="bindData" :show="show" :statistic-data="statisticData" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :hospital-statistics-cascader="hospitalStatisticsCascader" :child-data-index="i-1" :is-edit="i===1" @add="additem" @delete="deleteModule" @copy="copyModule" @active="activeModule"/>
             </grid-item>
         </component>
             </template>
         <template v-else>
-            <component   :is="templates[el.tpl_id]" :data="el"  :child-data-index="childDataIndex" :show="show" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :bind-data="bindData" :statistic-data="statisticData" :is-edit="el.isEdit&&isEdit" @remove="deleteModule" @copy="copyModule" @active="activeModule">
+            <component   :is="templates[el.tpl_id]" :data="el"  :child-data-index="childDataIndex" :show="show" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :hospital-statistics-cascader="hospitalStatisticsCascader" :bind-data="bindData" :statistic-data="statisticData" :is-edit="el.isEdit&&isEdit" @remove="deleteModule" @copy="copyModule" @active="activeModule">
                 <!--            <p>{{ el.name }}</p>-->
-                <nest-draggable :tasks="el.children" :bind-data="bindData" :show="show"  :statistic-data="statisticData" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :child-data-index="childDataIndex" :is-edit="el.isEdit&&isEdit" @add="additem" @delete="deleteModule" @copy="copyModule" @active="activeModule"/>
+                <nest-draggable :tasks="el.children" :bind-data="bindData" :show="show"  :statistic-data="statisticData" :board-customer-items="boardCustomerItems"  :manual-input-board-items="manualInputBoardItems" :hospital-statistics-cascader="hospitalStatisticsCascader" :child-data-index="childDataIndex" :is-edit="el.isEdit&&isEdit" @add="additem" @delete="deleteModule" @copy="copyModule" @active="activeModule"/>
             </component>
         </template>
 
@@ -56,8 +56,13 @@
             /** 手动输入看板条目 */
             manualInputBoardItems:{
                 type:Array,
-                default:()=>[]
+                default:([])
             },
+          /** 医院级科室级联统计数据 */
+          hospitalStatisticsCascader: {
+            type: Array,
+            default: ([])
+          },
             /** 动画驱动**/
             show:{
                 type:Boolean,
@@ -82,7 +87,7 @@
             }
         },
         mounted() {
-            console.log(this.tasks)
+            console.log('nest-draggable',this.hospitalStatisticsCascader)
         },
         methods:{
             additem(){

+ 13 - 11
src/views/custom-infoboard/templates/common/index.js

@@ -9,17 +9,19 @@ import text_display2 from './text-display2'
 import row_container from './row-container'
 import column_container from './cloumn-container'
 import html_display from './html-display'
+import text_display_hospital from './text-display-hospital'
 
 export default {
-    // 1: tpl_one_cloum, //资阳ui 123 ,其他5 6 7 8 9 10
-    // 2: tpl_two_cloum,
-    // 3: tpl_three_cloum,
-    /// // 4:tpl_header,
-    5:tpl_beds_grid,
-    6:tpl_bed_unit,
-    9:row_container,
-    10:column_container,
-    7:text_display,
-    8:text_display2,
-    11:html_display
+  // 1: tpl_one_cloum, //资阳ui 123 ,其他5 6 7 8 9 10
+  // 2: tpl_two_cloum,
+  // 3: tpl_three_cloum,
+  // / // 4:tpl_header,
+  5: tpl_beds_grid,
+  6: tpl_bed_unit,
+  9: row_container,
+  10: column_container,
+  7: text_display,
+  8: text_display2,
+  11: html_display,
+  12: text_display_hospital
 }

+ 136 - 0
src/views/custom-infoboard/templates/common/text-display-hospital.vue

@@ -0,0 +1,136 @@
+<script>
+import DragTool from "@/views/custom-infoboard/templates/DragTool.vue";
+import mixin from "@/views/custom-infoboard/mixinnew";
+
+export default {
+  name: 'text-display-hospital',
+  components: {DragTool},
+  mixins:[mixin],
+  title:'wu20240604.textDisplayHospitalModuleTitle',//医院信息显示
+  computed:{
+    displayText(){
+      if(this.data.moduleConfig.dataConfig&&this.data.moduleConfig.dataConfig.displayPartItem&&!!this.data.moduleConfig.dataConfig.displayPartItem.length){ //看板项内容
+        let customItem = this.hospitalStatisticsCascader.filter(p=>p.value===this.data.moduleConfig.dataConfig.displayPartItem[0])[0]
+        if(customItem){
+          var childItem = customItem.children.filter(p=>p.value===this.data.moduleConfig.dataConfig.displayPartItem[1])[0];
+          if(childItem){
+            return childItem.summary
+          }
+        }
+      }
+      return ''
+    },
+    titleText(){
+      //重写自定看板项标题
+      if(this.data.moduleConfig.dataConfig&&this.data.moduleConfig.dataConfig.titleText!=='') {
+        return  this.data.moduleConfig.dataConfig.titleText
+      }
+
+      if(this.data.moduleConfig.dataConfig&&this.data.moduleConfig.dataConfig.displayPartItem&&!!this.data.moduleConfig.dataConfig.displayPartItem.length){ //看板项内容
+
+        let customItem = this.hospitalStatisticsCascader.filter(p=>p.value===this.data.moduleConfig.dataConfig.displayPartItem[0])[0]
+        if(customItem){
+          var childItem = customItem.children.filter(p=>p.value===this.data.moduleConfig.dataConfig.displayPartItem[1])[0];
+          if(childItem){
+            return childItem.label
+          }
+        }
+      }
+      return this.$t('boarderDesign.titleTextDefault')
+    }
+
+  },
+  dataTpl:{
+    tpl_id: 12,
+    tpl_type: 'HOSPITAL_ITEM',
+    templateName:'text-display-hospital',
+    isEdit:true,
+    unique:'',
+    moduleIconClass:'icon-Text',
+    moduleConfig:{
+      moduleStyle: {
+        borderColor: '',
+        borderRadius:'0px',
+        borderStyle:'solid',
+        backgroundColor:'',
+        borderTopWidth:'0px',
+        borderRightWidth:'0px',
+        borderBottomWidth:'0px',
+        borderLeftWidth:'0px',
+        margin:'0px',
+        padding:'0px',
+        height:'40px'
+      },
+      styleConfig:{
+
+      },
+      titleStyle:{ //标题样式
+        fontSize:'14px',
+        color:'',
+        fontWeight:'normal',
+        marginLeft:'0px',
+        marginRight:'0px',
+        border:'0px',
+        width:'auto',
+        borderColor:'',
+        paddingRight:'10px',
+        paddingLeft:'10px',
+        borderStyle: 'solid',
+        borderRightWidth: '0px'
+      },
+      textStyle:{ //内容样式
+        fontSize:'14px',
+        color:'',
+        fontWeight:'normal',
+        marginLeft:'0px',
+        marginRight:'0px',
+        textAlign:'center'
+      },
+      dataConfig:{
+        displayPartItem:[],
+        titleText:''
+      },
+      showTitle:true, //显示标题,
+    },
+    children:([])
+  }
+}
+</script>
+
+<template>
+  <drag-tool  :unique="data.unique" @delete="deleteModule" :is-edit="isEdit" @copy="copyModule" @active="activeModule">
+    <div :style="moduleComputedStyle" class="flex">
+
+      <div :style="titleComputedStyle" v-if="data.moduleConfig.showTitle"   class="titlewrap"> <div class="titleStyle">{{titleText}}</div>
+      </div>
+      <div class="flex-sub flex"  > <div class="contentStyle" :style="textComputedStyle">{{displayText}}</div>
+      </div>
+    </div>
+  </drag-tool>
+</template>
+
+<style scoped>
+.content_item{
+  align-self: center;
+}
+.titlewrap{
+  align-items: center;
+  display: flex;
+  flex-direction: column;
+  overflow: hidden;
+  overflow-wrap: break-word;
+}
+.titleStyle{
+  height: 100%;
+  display: inline-flex;
+  align-items: center;
+  flex-direction: row-reverse;
+  width: 100%;
+  overflow-wrap: break-word;
+  word-break: break-all;
+}
+.contentStyle{
+  flex:1;
+  align-self: center;
+}
+</style>

+ 46 - 1
src/views/custom-infoboard/templates/moduleConfig.vue

@@ -439,6 +439,34 @@
 
                 </el-form-item>
 
+              <el-form-item :label="this.$t('boarderDesign.fieldDisplay')"
+                            v-if="moduleConfig.dataConfig&&moduleConfig.dataConfig.displayPartItem">
+
+                <el-cascader
+                    v-model="moduleConfig.dataConfig.displayPartItem"
+                    :options="partStatisticSummary"
+                    filterable
+                    clearable
+                   ></el-cascader>
+
+<!--                <el-select v-model="moduleConfig.dataConfig.displayPartItem"-->
+<!--                           :placeholder="this.$t('boarderDesign.manulInputDisplay')"-->
+<!--                           filterable-->
+<!--                           clearable-->
+<!--                >-->
+
+
+<!--                  <el-option v-for="(item, index) in manualInputBoardItems" :key="index"-->
+<!--                             :label="item.item_name" :value="item.item_name_md5"/>-->
+
+
+<!--                  &lt;!&ndash;                        <el-option v-for="field in dataFields" :label="field.display" :value="field.value"/>&ndash;&gt;-->
+
+<!--                </el-select>-->
+
+              </el-form-item>
+
+
 
                 <el-form-item :label="this.$t('boarderDesign.displayFormat')"
                               v-if="moduleConfig.dataConfig&&moduleConfig.dataConfig.textType!==undefined">
@@ -597,6 +625,19 @@
                     </el-input>
                 </el-form-item>
 
+              <el-form-item :label="this.$t('boarderDesign.contentAlign')"
+                            v-if="moduleConfig.textStyle&&moduleConfig.textStyle.textAlign!==undefined">
+                <el-select v-model="moduleConfig.textStyle.textAlign"
+                           :placeholder="this.$t('boarderDesign.contentAlign')"
+                           filterable
+                           clearable
+                >
+                  <el-option :label="this.$t('boarderDesign.alignLeft')" value="left"/>
+                  <el-option :label="this.$t('boarderDesign.alignCenter')" value="center"/>
+                  <el-option :label="this.$t('boarderDesign.alignRight')" value="right"/>
+                </el-select>
+              </el-form-item>
+
                 <el-form-item :label="this.$t('boarderDesign.contentTextMarginLeft')"
                               v-if="moduleConfig.textStyle&&moduleConfig.textStyle.marginLeft!==undefined">
                     <el-input :placeholder="this.$t('boarderDesign.contentTextMarginLeft')"
@@ -707,6 +748,7 @@
     import * as API_BoardItem from '@/api/ncs_board_item'
     import * as API_ManualInputBoardItem from '@/api/ncs_manual_input_board_item'
     import {INFORMATION_BOARD_STATISTICS_ENUM} from '@/utils/enum/InfomationBoardStatisticEnum'
+    import {getHospitalStatisticsCascader} from "@/api/ncs_board_item";
 
     export default {
         props: ['moduleConfig'],
@@ -776,7 +818,9 @@
                 }],
                 //自定义看板项
                 boardItems: [],
-                manualInputBoardItems: []
+                //手动输入看板项
+                manualInputBoardItems: [],
+                partStatisticSummary: []
 
             }
         },
@@ -791,6 +835,7 @@
             this.getNurseConfigsByPartId()
             this.getPartStatisticSummary()
             this.boardItems = await API_BoardItem.getPartList(this.$store.getters.partId)
+            this.partStatisticSummary = await API_Board.getHospitalStatisticsCascader(this.$store.getters.partId)
             this.manualInputBoardItems = await API_ManualInputBoardItem.getList(this.$store.getters.partId)
         },
         methods: {