2
0

3 Коммиты f8195efdbb ... f53866d630

Автор SHA1 Сообщение Дата
  zf f53866d630 测试提交 1 неделя назад
  zf 695f626e8e 测试提交 1 месяц назад
  zf 5b62495f7e 测试提交 1 месяц назад
100 измененных файлов с 7683 добавлено и 7565 удалено
  1. 2 2
      .env.development
  2. 6 4
      .eslintrc.js
  3. 103 1
      README.md
  4. BIN
      doctor.zip
  5. 2 13
      package.json
  6. 35 23
      public/config.js
  7. 1 0
      public/index.html
  8. 8 8
      src/App.vue
  9. 16 17
      src/api/assistant.js
  10. 21 24
      src/api/crm.js
  11. 1 8
      src/api/dashboard.js
  12. 13 13
      src/api/data.js
  13. 0 17
      src/api/diagnosis.js
  14. 7 7
      src/api/dictionary.js
  15. 17 19
      src/api/exams.js
  16. 56 65
      src/api/follow.js
  17. 6 6
      src/api/keywords.js
  18. 28 35
      src/api/labs.js
  19. 49 56
      src/api/mdt.js
  20. 85 100
      src/api/operate.js
  21. 0 11
      src/api/patient.js
  22. 13 13
      src/api/permission/department.js
  23. 53 64
      src/api/plan.js
  24. 4 5
      src/api/questionnaire.js
  25. 35 36
      src/api/request3rd.js
  26. 258 297
      src/api/rule/index.js
  27. 65 68
      src/api/scale.js
  28. 24 26
      src/api/schedule.js
  29. 8 10
      src/api/serve-patient.js
  30. 6 12
      src/api/tag.js
  31. 3 14
      src/api/target.js
  32. 12 24
      src/api/task.js
  33. 1 1
      src/api/user.js
  34. 105 59
      src/components/CCIT-treeSelect/index.vue
  35. 60 60
      src/components/Process/FlowCard/Preview.vue
  36. 21 24
      src/components/Process/FlowCard/config.js
  37. 93 93
      src/components/Process/FlowCard/index.vue
  38. 55 57
      src/components/Process/FlowCard/util.js
  39. 36 21
      src/components/Process/OrgSelect/index.vue
  40. 29 14
      src/components/Process/OrgTransfer/index.vue
  41. 62 45
      src/components/Process/OrgTransfer/roleTransfer.vue
  42. 31 31
      src/components/Process/Preview.vue
  43. 51 57
      src/components/Process/PropPanel/components/index.vue
  44. 257 261
      src/components/Process/PropPanel/condition - 副本.vue
  45. 323 333
      src/components/Process/PropPanel/condition.vue
  46. 163 170
      src/components/Process/PropPanel/index.vue
  47. 499 408
      src/components/Process/PropPanel/method.vue
  48. 188 199
      src/components/Process/PropPanel/tree.vue
  49. 28 28
      src/components/Process/index.vue
  50. 32 32
      src/components/RONIN-select/VirtualItem.vue
  51. 248 231
      src/components/RONIN-select/illnessSelect.vue
  52. 5 5
      src/components/RONIN-select/illnessSelectNew.vue
  53. 107 115
      src/components/RONIN-select/index.vue
  54. 116 118
      src/components/RONIN-select/select2.vue
  55. 50 50
      src/components/RONIN-select/selectItem.vue
  56. 228 233
      src/components/RONIN-select/selectTag.vue
  57. 40 40
      src/components/Widget/common/common-article.vue
  58. 11 11
      src/components/Widget/common/common-copyright.vue
  59. 14 15
      src/components/Widget/common/common-header.vue
  60. 24 25
      src/components/Widget/common/common-img.vue
  61. 24 24
      src/components/Widget/common/common-map.vue
  62. 22 19
      src/components/Widget/common/common-rich-text.vue
  63. 12 13
      src/components/Widget/common/common-tips.vue
  64. 23 23
      src/components/Widget/common/common-title.vue
  65. 9 9
      src/components/Widget/common/common-video.vue
  66. 10 12
      src/components/Widget/hospital/hospital-check.vue
  67. 15 17
      src/components/Widget/hospital/hospital-dept.vue
  68. 13 14
      src/components/Widget/hospital/hospital-doctor.vue
  69. 33 26
      src/components/Widget/hospital/hospital-form.vue
  70. 46 49
      src/components/Widget/index.vue
  71. 180 188
      src/components/config/detail.vue
  72. 185 187
      src/components/config/index.vue
  73. 29 31
      src/components/medical/doc/discharge.vue
  74. 16 18
      src/components/medical/exams/list.vue
  75. 2 2
      src/components/medical/exams/reports.vue
  76. 18 12
      src/components/medical/labs/detail.vue
  77. 37 40
      src/components/medical/positive/index.vue
  78. 51 57
      src/components/ronin-engine/components/index.vue
  79. 956 964
      src/components/ronin-engine/condition.vue
  80. 190 186
      src/components/ronin-engine/config.vue
  81. 478 480
      src/components/ronin-engine/tree.vue
  82. 128 116
      src/components/ronin-user-list/index.vue
  83. 184 192
      src/components/ronin/illnessSelectNew.vue
  84. 68 68
      src/components/ronin/selectItem.vue
  85. 246 215
      src/components/ronin/treeSelect.vue
  86. 4 4
      src/layout/components/AppMain.vue
  87. 1 1
      src/layout/components/Navbar.vue
  88. 3 3
      src/layout/components/Sidebar/Logo.vue
  89. 1 1
      src/layout/components/Sidebar/index.vue
  90. 1 4
      src/main.js
  91. 2 2
      src/permission.js
  92. 20 20
      src/ronin/archive/index.vue
  93. 629 647
      src/ronin/archive/main.vue
  94. 6 10
      src/router/index copy.js
  95. 1 3
      src/router/index.js
  96. 150 81
      src/router/index1.js
  97. 2 3
      src/store/modules/permission.js
  98. 1 1
      src/store/modules/user.js
  99. 1 3
      src/utils/auth.js
  100. 72 86
      src/utils/encrypt.js

+ 2 - 2
.env.development

@@ -4,7 +4,7 @@
  # @LastEditors: g05047
  # @LastEditTime: 2023-10-16 09:16:40
  # @Description: file content
-### 
+###
 
 # just a flag
 ENV = 'development'
@@ -14,7 +14,7 @@ VUE_APP_BASE_API = 'https://dev1.cloud-seal.com/'
 
 
 # VUE_APP_BASE_API = 'http://172.18.90.135:8081/'
-
+# VUE_APP_BASE_API = 'http://192.168.233.1:8087/'
 
 # ETL 上下文
 VUE_ETL_API = 'etl'

+ 6 - 4
.eslintrc.js

@@ -53,9 +53,10 @@ module.exports = {
       'after': true
     }],
     'handle-callback-err': [2, '^(err|error)$'],
-    'indent': [2, 2, {
-      'SwitchCase': 1
-    }],
+    // 'indent': [2, 2, {
+    //   'SwitchCase': 1
+    // }],
+    'indent': 'off',
     'jsx-quotes': [2, 'prefer-single'],
     'key-spacing': [2, {
       'beforeColon': false,
@@ -166,7 +167,8 @@ module.exports = {
       'avoidEscape': true,
       'allowTemplateLiterals': true
     }],
-    'semi': [2, 'never'],
+    // 'semi': [2, 'never'],
+    'semi': 'off',
     'semi-spacing': [2, {
       'before': false,
       'after': true

+ 103 - 1
README.md

@@ -7,7 +7,109 @@
 -->
 
 
+  "lint-staged": {
+    "src/**/*.{js,vue}": [
+      "eslint --fix",
+      "git add"
+    ]
+  },
 
+  
+ // "husky": {
+  //   "hooks": {
+  //     "pre-commit": "lint-staged"
+  //   }
+  // },
+
+# 前端项目文档
+
+## 📝 重要通知
 1. 科室权限走OA
 2. 所有需求需要同步给信息科一份
-3. 患者姓名:## ,医务科已追踪到非专科疾病需要相关专科协助会诊及治疗,必须发起会诊邀请请在24小时之内完成会诊申请,申请邀请科室#科室名称#
+3. 患者姓名:## ,医务科已追踪到非专科疾病需要相关专科协助会诊及治疗,必须发起会诊邀请请在24小时之内完成会诊申请,申请邀请科室#科室名称#
+
+## 🚀 技术栈> git push -u origin master
+| 类别 | 技术选型 |
+|------|----------|
+| 核心框架 | Vue 2.x |
+| 状态管理 | Vuex |
+| 路由管理 | Vue Router |
+| UI 组件库 | Element UI |
+| HTTP 请求 | Axios |
+| 构建工具 | Vue CLI |
+| 代码规范 | ESLint + Prettier |
+| 打包工具 | Webpack |
+
+## ⚙️ 环境要求
+- Node.js 14.x
+- npm 6.x
+
+## 🛠 运行指南
+```bash
+# 克隆仓库
+git clone http://117.72.74.250:3000/wbmd-web/xx-doctor-web-html.git
+
+# 安装依赖
+npm install
+
+# 本地开发
+npm run dev
+
+# 生产构建
+npm run build
+```
+
+## 📂 项目结构
+    src/
+    ├── api/             # 接口请求
+    ├── assets/          # 静态资源
+    ├── components/      # 全局组件
+    ├── directive/       # Vue指令
+    ├── filters/         # 格式化工具
+    ├── icons/           # 图标工具
+    ├── layout/          # 页面布局
+    ├── router/          # 路由配置
+    ├── store/           # Vuex 状态管理
+    ├── styles/          # 公共样式
+    ├── utils/           # 工具函数
+    ├── vendor/          # 公共导出方法
+    ├── views/           # 页面视图
+    ├── App.vue          # 根组件
+    ├── main.js          # 入口文件
+    └── permission.js    # 权限管理
+
+# 前端权限系统设计
+## 一、权限系统概述
+系统采用基于角色的访问控制(RBAC)方案,通过动态路由和路由守卫实现权限管理。包含以下核心模块:
+- 静态路由配置
+- 动态路由加载
+- 角色权限验证
+- 路由级权限控制
+- 接口级权限控制(需后端配合)
+
+## 二、角色与权限分配
+### 角色定义
+| 角色        | 对应人员                  | 权限范围               |
+|-------------|--------------------------|-----------------------|
+| admin       | 系统管理员                | 全模块访问权限         |
+| doctor      | 普通医生                  | 患者管理/数据看板等    |
+| lulu        | 特殊角色(路露)          | 统计看板部分模块       |
+| colleague   | 同事角色(测试1)         | 数据仓库基础访问       |
+| doc         | 医务人员(时丽/郑婷婷等)| 患者管理核心功能       |
+
+### 权限分配表
+```javascript
+// 权限分配逻辑(permission.js)
+const OS_REALNAME = localStorage.getItem('OS_REALNAME')
+let role
+if (['赵宇晴','李明','王宏宇','蒋炜','高坤鹏','admin'].includes(OS_REALNAME)) {
+  role = ['admin']
+} else if (['时丽','郑婷婷','陈蒙蒙','刘丽雪','刘柳柳','鲍雨','葛慧敏'].includes(OS_REALNAME)) {
+  role = ['doc']
+} else if (OS_REALNAME === '路露') {
+  role = ['lulu']
+} else if (OS_REALNAME === '测试1') {
+  role = ['colleague']
+} else {
+  role = ['doctor']
+}


+ 2 - 13
package.json

@@ -86,8 +86,8 @@
     "mockjs": "1.0.1-beta3",
     "plop": "2.3.0",
     "runjs": "4.3.2",
-    "sass": "1.26.2",
-    "sass-loader": "8.0.2",
+    "sass": "^1.39.0",
+    "sass-loader": "^9.0.2",
     "script-ext-html-webpack-plugin": "2.1.3",
     "serve-static": "1.13.2",
     "svg-sprite-loader": "4.1.3",
@@ -114,17 +114,6 @@
     "management-system"
   ],
   "license": "MIT",
-  "lint-staged": {
-    "src/**/*.{js,vue}": [
-      "eslint --fix",
-      "git add"
-    ]
-  },
-  "husky": {
-    "hooks": {
-      "pre-commit": "lint-staged"
-    }
-  },
   "repository": {
     "type": "git",
     "url": "git+https://github.com/PanJiaChen/vue-element-admin.git"

+ 35 - 23
public/config.js

@@ -1,43 +1,55 @@
 window.GLOBAL_CONFIG = {
 
-    API_ETL: 'http://172.18.84.102:8080/api/wbmd1s', 
-    API_DOCTOR: 'http://172.18.84.102:8080/api/wbmd3h', 
+    API_ETL: 'http://172.18.84.102:8080/api/wbmd1s',
+    API_DOCTOR: 'http://172.18.84.102:8080/api/wbmd3h',
     API_DATA: 'http://172.18.84.102:8080/api/wbmd3h',
     API_AI: 'http://172.18.84.102:8080/',
 
+    // 红欣测试地址
+    // API_ETL: 'http://172.18.84.102:8080/api/wbmd1s',
+    // API_DOCTOR: 'http://172.18.84.102:8080/api/wbmd3h',
+    // API_DATA: 'http://172.18.84.102:8080/api/wbmd3h',
+    // API_AI: 'http://172.18.84.102:8080/',
+
+    // 闫测试地址
+    // API_ETL: 'http://172.18.84.102:8080/api/wbmd1s',
+    // API_DOCTOR: 'http://172.18.84.102:8080/api/wbmd3h',
+    // API_DATA: 'http://172.18.84.102:8080/api/wbmd3h',
+    // API_AI: 'http://172.18.84.102:8080/',
+
       //一人一码 医院内网
-    // API_ETL: 'http://172.17.111.99/sync', 
-    // API_DOCTOR: 'http://172.17.111.99/health', 
+    // API_ETL: 'http://172.17.111.99/sync',
+    // API_DOCTOR: 'http://172.17.111.99/health',
     // API_DATA: 'http://172.17.111.99/health',
     // API_AI: 'http://172.17.111.99/',
 
 
 
-    // 外网访问加密地址 
-    // API_ETL: 'http://dh.xxjkhealth.com:7600/api/wbmd1s', 
-    // API_DOCTOR: 'http://dh.xxjkhealth.com:7600/api/wbmd3h', 
+    // 外网访问加密地址
+    // API_ETL: 'http://dh.xxjkhealth.com:7600/api/wbmd1s',
+    // API_DOCTOR: 'http://dh.xxjkhealth.com:7600/api/wbmd3h',
     // API_DATA: 'http://dh.xxjkhealth.com:7600/api/wbmd3h',
     // API_AI: 'http://dh.xxjkhealth.com:7600',
 
 
-    // API_ETL: 'http://172.18.84.102:8080/api/wbmd1s', 
-    //   API_DOCTOR: 'http://172.18.84.102:8080/api/wbmd3hp', 
+    // API_ETL: 'http://172.18.84.102:8080/api/wbmd1s',
+    //   API_DOCTOR: 'http://172.18.84.102:8080/api/wbmd3hp',
     // API_DATA: 'http://172.18.84.102:8080/api/wbmd3h',
 
-  
 
 
-    API_DOCTOR: 'http://slife.bydsfy.com/api/wbmd3h',
-    API_DATA: 'http://slife.bydsfy.com/api/wbmd3h',
-    API_ETL: 'http://slife.bydsfy.com/api/wbmd1s', 
-    API_AI: 'https://slife.bydsfy.com/',
 
-    
+    // API_DOCTOR: 'http://slife.bydsfy.com/api/wbmd3h',
+    // API_DATA: 'http://slife.bydsfy.com/api/wbmd3h',
+    // API_ETL: 'http://slife.bydsfy.com/api/wbmd1s',
+    // API_AI: 'https://slife.bydsfy.com/',
+
+
 
     // 测试生产地址
     // API_DOCTOR: 'https://slife.bydsfy.com/api/wbmd3hd',
     // API_DATA: 'https://slife.bydsfy.com/api/wbmd3hd',
-    // API_ETL: 'https://slife.bydsfy.com/api/wbmd3hd', 
+    // API_ETL: 'https://slife.bydsfy.com/api/wbmd3hd',
     // API_AI: 'https://slife.bydsfy.com/',
 
     // 老王测试地址
@@ -46,17 +58,17 @@ window.GLOBAL_CONFIG = {
     // 大胖测试地址
     // API_DOCTOR: 'http://117.72.46.114/api/doctor',
     // API_DATA: 'http://117.72.46.114/api/doctor',
-    // API_ETL: 'http://117.72.46.114/api/doctor', 
+    // API_ETL: 'http://117.72.46.114/api/doctor',
     // API_AI: 'http://117.72.46.114/',
 
 
-    
 
 
-    // API_DOCTOR: 'https://dev1.cloud-seal.com/hipo-business/', 
-    // API_DATA: 'https://dev1.cloud-seal.com/hipo-business/', 
-    // API_DOCTOR: 'https://dev1.cloud-seal.com/healthy-doctor/', 
-    //HPV报告拉回来。 
+
+    // API_DOCTOR: 'https://dev1.cloud-seal.com/hipo-business/',
+    // API_DATA: 'https://dev1.cloud-seal.com/hipo-business/',
+    // API_DOCTOR: 'https://dev1.cloud-seal.com/healthy-doctor/',
+    //HPV报告拉回来。
     //周一拉回来。
     //管理情况、效果监管。
     //标记,样本。
@@ -64,7 +76,7 @@ window.GLOBAL_CONFIG = {
     //数据维度
     //码用还是科室、医生
     //排班内、替换人员、时间、会诊发言、日志记录、插入档案、过程记录。
-    //报告同步字段@王冲老师 
+    //报告同步字段@王冲老师
     //统计模版
 }
 

+ 1 - 0
public/index.html

@@ -4,6 +4,7 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
+    <!-- <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"> -->
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <script src="./config.js"></script>

+ 8 - 8
src/App.vue

@@ -1,13 +1,13 @@
 <template>
   <div id="app">
-   
-      <!-- <router-view /> -->
-   
-      <keep-alive  v-if="$route.meta.keepAlive">
-        <div style="height: 100px;">keepAlive: {{ $route.meta.keepAlive }}</div>
-        <router-view :key="key" />
-      </keep-alive>
-      <router-view v-else/>
+
+    <!-- <router-view /> -->
+
+    <keep-alive v-if="$route.meta.keepAlive">
+      <div style="height: 100px;">keepAlive: {{ $route.meta.keepAlive }}</div>
+      <router-view :key="key" />
+    </keep-alive>
+    <router-view v-else />
   </div>
 </template>
 

+ 16 - 17
src/api/assistant.js

@@ -1,28 +1,27 @@
 import request from '@/utils/request3rd'
 
 /**
- * 
- * @param {*} data 
- * @returns 
+ *
+ * @param {*} data
+ * @returns
  */
 export function getRecommendListByKeywords(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_AI}llm/chat/knowledge_base_chat`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_AI}llm/chat/knowledge_base_chat`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
- * 
- * @param {*} data 
- * @returns 
+ *
+ * @param {*} data
+ * @returns
  */
 export function getTxtDataModel(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_AI}llm/chat/chat`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_AI}llm/chat/chat`,
+    method: 'post',
+    data
+  })
 }

+ 21 - 24
src/api/crm.js

@@ -1,45 +1,42 @@
 import request from '@/utils/request'
 
-
 /**
  * 医生行为统计
- * @param {*} data 
+ * @param {*} data
  * @returns
  */
 export function statisticDoctorBehavior(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/crm/behavior/data/list`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/crm/behavior/data/list`,
+    method: 'post',
+    data
+  })
 }
 
 /**
  * 查询医生行为操作明细
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryDoctorBehavior(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/crm/behavior/manage/query`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/crm/behavior/manage/query`,
+    method: 'post',
+    data
+  })
 }
 
 /**
- * 
- * @param {*} data 
- * @returns 
+ *
+ * @param {*} data
+ * @returns
  */
 
 export function addDoctorBehavior(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/crm/behavior/add`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/crm/behavior/add`,
+    method: 'post',
+    data
+  })
 }
 
-
-

+ 1 - 8
src/api/dashboard.js

@@ -40,7 +40,7 @@ export function statisticPatient(data) {
 }
 
 /**
- * 人员列表 
+ * 人员列表
  * @param {*} data P
  * @returns
  */
@@ -52,7 +52,6 @@ export function statisticUser(data) {
   })
 }
 
-
 /**
  * 诊前
  * @param {*} data P
@@ -66,8 +65,6 @@ export function statisticPre(data) {
   })
 }
 
-
-
 /**
  * 诊中
  * @param {*} data P
@@ -81,7 +78,6 @@ export function statisticDuring(data) {
   })
 }
 
-
 /**
  * 诊后
  * @param {*} data P
@@ -95,6 +91,3 @@ export function statisticAfter(data) {
   })
 }
 
-
-
-

+ 13 - 13
src/api/data.js

@@ -14,17 +14,17 @@ export function manageQuery(data) {
 }
 
 export function diversionQuery(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/stat/diversion/query`,
-      method: 'post',
-      data
-    })
-  }
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/stat/diversion/query`,
+    method: 'post',
+    data
+  })
+}
 
-  export function followupQuery(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/stat/followup/query`,
-      method: 'post',
-      data
-    })
-  }
+export function followupQuery(data) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/stat/followup/query`,
+    method: 'post',
+    data
+  })
+}

+ 0 - 17
src/api/diagnosis.js

@@ -29,9 +29,6 @@ export function eventGet(data) {
   })
 }
 
-
-
-
 /**
  * 文章
  * @param {*} data
@@ -77,7 +74,6 @@ export function articleConfigDel(data) {
   })
 }
 
-
 /**
  * 医院
  * @param {*} data
@@ -123,7 +119,6 @@ export function hospitalQuery(data) {
   })
 }
 
-
 /**
  * 配药
  * @param {*} data
@@ -253,7 +248,6 @@ export function examLabNotesGet(data) {
   })
 }
 
-
 export function examLabNotesQuery(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/inspur/admin/examLabNotes/query`,
@@ -303,7 +297,6 @@ export function therapyNotesQuery(data) {
   })
 }
 
-
 /**
  * 标准部门
  * @param {*} data
@@ -347,11 +340,6 @@ export function deptList(data) {
   })
 }
 
-
-
-
-
-
 export function articleQuery(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/article/info/query`,
@@ -366,7 +354,6 @@ export function articleQuery(data) {
  * @returns
  */
 
-
 export function componentQuery(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/inspur/admin/component/query`,
@@ -397,8 +384,6 @@ export function deptNotesAdd(data) {
   })
 }
 
-
-
 export function deptNotesDel(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/inspur/admin/deptNotes/del`,
@@ -407,7 +392,6 @@ export function deptNotesDel(data) {
   })
 }
 
-
 export function up2AliLocal(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/store/io/up2AliLocal`,
@@ -416,4 +400,3 @@ export function up2AliLocal(data) {
   })
 }
 
-

+ 7 - 7
src/api/dictionary.js

@@ -1,10 +1,10 @@
 import request from '@/utils/request'
 
 // 获取数据字典列表
-export function getDictionaryDataList( data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/basic/dict/listDictInfo`,
-      method: 'POST',
-      data
-    })
-  }
+export function getDictionaryDataList(data) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/basic/dict/listDictInfo`,
+    method: 'POST',
+    data
+  })
+}

+ 17 - 19
src/api/exams.js

@@ -1,30 +1,28 @@
 import request from '@/utils/request'
 
 /**
- * 
- * @param {*} parameter 
- * @returns 
+ *
+ * @param {*} parameter
+ * @returns
  */
-export function queryExamineReport(parameter){
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/dw/dwd/data/doctor/patient/examineReport/list`,
-        method: 'post',
-        data: parameter
-    })
+export function queryExamineReport(parameter) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/dw/dwd/data/doctor/patient/examineReport/list`,
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 /**
  * 查询标准数据
- * @param {*} parameter 
- * @returns 
+ * @param {*} parameter
+ * @returns
  */
-export function queryExamineName(parameter){
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/examineName/query`,
-        method: 'post',
-        data: parameter
-    })
+export function queryExamineName(parameter) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/examineName/query`,
+    method: 'post',
+    data: parameter
+  })
 }
 
-

+ 56 - 65
src/api/follow.js

@@ -2,117 +2,108 @@ import request from '@/utils/request'
 
 /**
  * 保存患者关注
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function savePatientFollow(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/follow/patient/followOrNot`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/follow/patient/followOrNot`,
+    method: 'post',
+    data
+  })
 }
 
 /**
  * 查询关注的人
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryMyPatientFollow(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/follow/patient/query`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/follow/patient/query`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 关注详情
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 
 export function detailMyPatientFollow(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/follow/patient/detail`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/follow/patient/detail`,
+    method: 'post',
+    data
+  })
 }
 
-
-
-
 /**
  * 新增配置关系
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function saveFollowConfig(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/saveByDoctor`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/saveByDoctor`,
+    method: 'post',
+    data
+  })
 }
 
 /**
  * 查询配置关系
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryFollowConfig(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/queryByDoctor`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/queryByDoctor`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 获取配置关系
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 
 export function detailFollowConfig(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/detailByDoctor`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/detailByDoctor`,
+    method: 'post',
+    data
+  })
 }
 
-
-
 /**
  * 更新配置关系
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 
 export function updateFollowConfig(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/update`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/update`,
+    method: 'post',
+    data
+  })
 }
 
-
-
 /**
  * 更新配置关系
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 
 export function delFollowConfig(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/del`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/relation/del`,
+    method: 'post',
+    data
+  })
 }

+ 6 - 6
src/api/keywords.js

@@ -3,10 +3,10 @@ import request from '@/utils/request'
 
 // 获取关键字
 export function queryKeyWords(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/keywords/query`,
-      method: 'POST',
-      data
-    })
-  }
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/keywords/query`,
+    method: 'POST',
+    data
+  })
+}
 

+ 28 - 35
src/api/labs.js

@@ -1,60 +1,53 @@
 import request from '@/utils/request'
 
-
 /**
  * 查询检验项目
- * @returns 
+ * @returns
  */
 export function queryLabs(parameter) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/laboratoryProject/query`,
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/laboratoryProject/query`,
+    method: 'post',
+    data: parameter
+  })
 }
 
 /**
  * 获取检验项目
- * @returns 
+ * @returns
  */
 
 export function getLabs(parameter) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/laboratoryProject/info`,
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/laboratoryProject/info`,
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 /**
  * 通过标准字段查询检验项目
- * @param {*} parameter 
- * @returns 
+ * @param {*} parameter
+ * @returns
  */
-export function queryLabsItemByStandardCode(parameter){
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/patient/dwd/laboratoryTrend`,
-        method: 'post',
-        data: parameter
-    })
+export function queryLabsItemByStandardCode(parameter) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/patient/dwd/laboratoryTrend`,
+    method: 'post',
+    data: parameter
+  })
 }
 
-
-
 /**
  * 查询检验报告
- * @param {*} parameter 
- * @returns 
+ * @param {*} parameter
+ * @returns
  */
-export function queryLaboratoryReport(parameter){
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/dw/dwd/data/doctor/patient/laboratoryReport/list`,
-        method: 'post',
-        data: parameter
-    })
+export function queryLaboratoryReport(parameter) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/dw/dwd/data/doctor/patient/laboratoryReport/list`,
+    method: 'post',
+    data: parameter
+  })
 }
 
-
-  
-

+ 49 - 56
src/api/mdt.js

@@ -13,22 +13,18 @@ export function getStatisticCount(data) {
   })
 }
 
-
-
 /**
  * MDT 绩效
  * @param {*} data
  * @returns
  */
 export function getStatisticCountByDoctor(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/manage/statistic/doctor`,
-      method: 'post',
-      data
-    })
-  }
-  
-
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/manage/statistic/doctor`,
+    method: 'post',
+    data
+  })
+}
 
 /**
  * MDT 会诊记录
@@ -36,56 +32,53 @@ export function getStatisticCountByDoctor(data) {
  * @returns
  */
 export function queryMdtManageList(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/manage/query`,
-      method: 'post',
-      data
-    })
-  }
-  
-  /**
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/manage/query`,
+    method: 'post',
+    data
+  })
+}
+
+/**
    * 获取详情
-   * @param {*} data 
-   * @returns 
+   * @param {*} data
+   * @returns
    */
-  export function queryMdtDetail(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/manage/detail`,
-      method: 'post',
-      data
-    })
-  }
-
-  // 重新发送
-  
-  export function resendLaunch(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/launch/apply/resendLaunch`,
-      method: 'post',
-      data
-    })
-  }
-
+export function queryMdtDetail(data) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/manage/detail`,
+    method: 'post',
+    data
+  })
+}
 
-  export function feeList(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/fee/data/query`,
-      method: 'post',
-      data
-    })
-  }
+// 重新发送
 
+export function resendLaunch(data) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/launch/apply/resendLaunch`,
+    method: 'post',
+    data
+  })
+}
 
+export function feeList(data) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/fee/data/query`,
+    method: 'post',
+    data
+  })
+}
 
-  export function feeExport(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/fee/data/export`,
-      method: 'get',
-      headers: {
-        'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
-      },
-      responseType: 'blob',
-      data
-    })
-  }
+export function feeExport(data) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/fee/data/export`,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
+    },
+    responseType: 'blob',
+    data
+  })
+}
 

+ 85 - 100
src/api/operate.js

@@ -2,173 +2,158 @@ import request from '@/utils/request'
 
 /**
  * 科室服务看板顶部统计
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getRoomStatisticData(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/data/statistic`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/data/statistic`,
+    method: 'post',
+    data
+  })
 }
 
-
-
 /**
  * 通过病种查询统计
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getStatisticDataByDiseaseID(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/data/statistic/disease`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/data/statistic/disease`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 诊前
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getPreQueryDiseaseID(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/preQuery`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/preQuery`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
 * 诊中
-* @param {*} data 
-* @returns 
+* @param {*} data
+* @returns
 */
 export function getDuringQueryDiseaseID(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/duringQuery`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/duringQuery`,
+    method: 'post',
+    data
+  })
 }
 
-
-
 /**
 * 诊后
-* @param {*} data 
-* @returns 
+* @param {*} data
+* @returns
 */
 export function getAfterQueryDiseaseID(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/afterQuery`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/afterQuery`,
+    method: 'post',
+    data
+  })
 }
 
 /**
  * 获取服务详情
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getPushServeConfigInfoById(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthybasic/pushServeConfig/info`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthybasic/pushServeConfig/info`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 获取服务详情 新地址
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function pushserveDetail(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/detail`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/detail`,
+    method: 'post',
+    data
+  })
 }
 /**
  * 在服务详情里看数据统计
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getPushServeStatisticById(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/detail`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/detail`,
+    method: 'post',
+    data
+  })
 }
 
 /**
  * 查询服务对象的列表
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getPushServePatientById(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/remindUser`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/pushserve/remindUser`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 行为分析曲线 /sys/doctor/data/patient/queryPatientPushServeBehavior
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 
 export function queryPatientPushServeBehavior(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/patient/queryPatientPushServeBehavior`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/dept/patient/queryPatientPushServeBehavior`,
+    method: 'post',
+    data
+  })
 }
 
-
-
-
-
-
 /**
  * 查询效率管理统计
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryManagePatientData(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/manage/patient/data/query`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/manage/patient/data/query`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 查询场景管理统计
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryManagePatientStatisticBySence(data) {
-    return request({
-       url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/manage/patient/data/queryStatistic`,
-        // url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/manage/patient/data/queryStatisticByMergeSecene`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/manage/patient/data/queryStatistic`,
+    // url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/manage/patient/data/queryStatisticByMergeSecene`,
+    method: 'post',
+    data
+  })
 }
 
-

+ 0 - 11
src/api/patient.js

@@ -185,8 +185,6 @@ export function queryHzManageStatistics(data) {
   })
 }
 
-
-
 /**
  * 查询随访
  * @param {*} data
@@ -271,7 +269,6 @@ export function changeStatDetail(data) {
   })
 }
 
-
 export function statExport(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/launch/apply/stat/dept/stat/export`,
@@ -296,9 +293,6 @@ export function changeStatExport(data) {
   })
 }
 
-
-
-
 /**
  * 随访删除
  * @param {*} data
@@ -372,7 +366,6 @@ export function queryEMRRecordsByPid(data) {
   })
 }
 
-
 export function auditExamine(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/launch/apply/auditExamine`,
@@ -381,7 +374,3 @@ export function auditExamine(data) {
   })
 }
 
-
-
-
-

+ 13 - 13
src/api/permission/department.js

@@ -11,18 +11,18 @@ export const getDepartmentList = (data) => {
 
 // 标准部门科室管理
 export const deptTree = (data) => {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/dept/tree`,
-      method: 'POST',
-      data
-    })
-  }
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/standard/dept/tree`,
+    method: 'POST',
+    data
+  })
+}
 
-//修改配置
+// 修改配置
 export function ruleConfigUpdateConfig(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/dataLabel/ruleConfig/updateConfig`,
-        method: 'POST',
-        data
-    })
-}
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/dataLabel/ruleConfig/updateConfig`,
+    method: 'POST',
+    data
+  })
+}

+ 53 - 64
src/api/plan.js

@@ -6,115 +6,104 @@ import request from '@/utils/request'
  * @returns
  */
 export function getPlanTargetTotalCount(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetTotalCount`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetTotalCount`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 查询CRM
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryCrmManage(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/crm/v2/mark/manageQuery`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/crm/v2/mark/manageQuery`,
+    method: 'post',
+    data
+  })
 }
 
 /**
 * 统计看板数据分析
-* @param {*} data 
-* @returns 
+* @param {*} data
+* @returns
 */
 export function getTargetTotalCountStatistic(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetTotalCount`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetTotalCount`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
 * 统计看板数据分析
-* @param {*} data 
-* @returns 
+* @param {*} data
+* @returns
 */
 export function getTargetCountTrendStatistic(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetCountTrend`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetCountTrend`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 查询种类统计
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getTargetHisCountByTarget(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetHisCountByTarget`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetHisCountByTarget`,
+    method: 'post',
+    data
+  })
 }
 
-
 /**
  * 查询绩效考核排行
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryTargetHisCountByDoctor(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetHisCountByDoctor`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetHisCountByDoctor`,
+    method: 'post',
+    data
+  })
 }
 
-
 export function getTargetHisTotalCount(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetHisTotalCount`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetHisTotalCount`,
+    method: 'post',
+    data
+  })
 }
 
 export function queryTargetHisCountTrend(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetHisCountTrend`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/targetHisCountTrend`,
+    method: 'post',
+    data
+  })
 }
 
-
-
-
-
-
 // 个案/任务管理:
 //   医生任务配置添加个案类型(manage_type)、个案目标(target_id)、op_type设置为manage
 //   个案数据添加个案类型type(字典定义)和目标id(targetId,由target修改而来)、目标执行状态(targetExeStatus),个案类型与个案目标来源于医生任务配置的type(manage_type)和目标(target_id)
 //   目标管理:/sys/manage/doctor/crm/target/*
-  
 
 //   统计:
 //     任务数据统计页面:
 //       统计数据:/sys/manage/doctor/crm/statistic/taskTotalCount
 //       列表数据:/sys/healthy/doctor/pushTask/manageQuery
-    
+
 //     个案数据统计页面:
 //       统计数据:
 //         当前:/sys/manage/doctor/crm/statistic/targetTotalCount
@@ -127,7 +116,7 @@ export function queryTargetHisCountTrend(data) {
 //       阶段目标数据:
 //         当前:/sys/manage/doctor/crm/statistic/targetTotalCount
 //         历史:/sys/manage/doctor/crm/statistic/targetHisTotalCount
-      
+
 //       趋势:
 //         当前:/sys/manage/doctor/crm/statistic/targetCountTrend
 //         历史:/sys/manage/doctor/crm/statistic/targetHisCountTrend
@@ -139,4 +128,4 @@ export function queryTargetHisCountTrend(data) {
 //       绩效考核/目标完成状态:
 //         当前:/sys/manage/doctor/crm/statistic/targetCountByDoctor
 //         历史:/sys/manage/doctor/crm/statistic/targetHisCountByDoctor
-//       绩效考核/任务处理状态:/sys/manage/doctor/crm/statistic/taskCountByDoctor
+//       绩效考核/任务处理状态:/sys/manage/doctor/crm/statistic/taskCountByDoctor

+ 4 - 5
src/api/questionnaire.js

@@ -1,14 +1,13 @@
-import request from "@/utils/request";
+import request from '@/utils/request'
 
 /**
- * 量表详情 
+ * 量表详情
  */
 export function scaleInfo(parameter) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/app/healthy/scale/config/info`,
-    method: "post",
+    method: 'post',
     data: parameter
-  });
+  })
 }
 
-

+ 35 - 36
src/api/request3rd.js

@@ -1,88 +1,87 @@
-import axios from "axios";
-import store from "@/store";
-import { getToken } from "@/utils/api";
+import axios from 'axios'
+import store from '@/store'
+import { getToken } from '@/utils/api'
 import router from '@/router'
 
 /**
  * 基础参数
  */
 const baseParam = {
-  platform: "3",
-  deviceNo: "",
-  version: "1.0.0",
-  sign: ""
-};
+  platform: '3',
+  deviceNo: '',
+  version: '1.0.0',
+  sign: ''
+}
 
 /**
  * 定时器
  */
-let timer = null;
+const timer = null
 
 // create an axios instance
 const service = axios.create({
   baseURL: '', // url = base url + request url
   headers: {
-    "Content-Type": "application/json;charset=UTF-8"
+    'Content-Type': 'application/json;charset=UTF-8'
   },
   withCredentials: true, // send cookies when cross-domain requests
   crossDomain: true,
   timeout: 45000 // request timeout
-});
+})
 
 // request interceptor
 service.interceptors.request.use(
   config => {
     if (
-      config.method === "post" ||
-      config.method === "put" ||
-      config.method === "delete"
+      config.method === 'post' ||
+      config.method === 'put' ||
+      config.method === 'delete'
     ) {
       if (config.data) {
         // 序列化
-        config.data = Object.assign(config.data, baseParam); // 合并基础请求参数
+        config.data = Object.assign(config.data, baseParam) // 合并基础请求参数
       } else {
-
-        config.data = baseParam; // 合并基础请求参数
+        config.data = baseParam // 合并基础请求参数
       }
     }
-    let token = getToken()
+    const token = getToken()
     if (token) {
-      config.headers["token"] = token;
+      config.headers['token'] = token
     }
-    config.headers["Access-Control-Allow-Origin"] = "*";
-    config.headers["x-ac-time"] = Date.parse(new Date());
-    return config;
+    config.headers['Access-Control-Allow-Origin'] = '*'
+    config.headers['x-ac-time'] = Date.parse(new Date())
+    return config
   },
   error => {
     // do something with request error
-    console.log(error); // for debug
-    return Promise.reject(error);
+    console.log(error) // for debug
+    return Promise.reject(error)
   }
-);
+)
 
 // response interceptor
 service.interceptors.response.use(
   res => {
-    let data;
+    let data
     if (res.data) {
-      let arr = res.data.split("\r\n\r\n");
-      let str = arr[arr.length - 2];
-      str = str.replace("data:", "");
-      data = JSON.parse(str);
+      const arr = res.data.split('\r\n\r\n')
+      let str = arr[arr.length - 2]
+      str = str.replace('data:', '')
+      data = JSON.parse(str)
     }
 
-    return data;
+    return data
   },
   error => {
-    Notify({ type: "success", message: '网络环境差链接失败' });
-    console.log("err" + error); // for debug
+    Notify({ type: 'success', message: '网络环境差链接失败' })
+    console.log('err' + error) // for debug
     // Message({
     //   message: error.message,
     //   type: 'error',
     //   duration: 5 * 1000
     // })
-    return Promise.reject(error);
+    return Promise.reject(error)
   }
-);
+)
 
-export default service;
+export default service

+ 258 - 297
src/api/rule/index.js

@@ -1,8 +1,6 @@
 import request from '@/utils/request'
 
-
-let  path = window.GLOBAL_CONFIG.API_DOCTOR
-
+const path = window.GLOBAL_CONFIG.API_DOCTOR
 
 /**
  * 规则管理列表
@@ -11,31 +9,27 @@ let  path = window.GLOBAL_CONFIG.API_DOCTOR
  * @returns {Promise<AxiosResponse<T>>}
  */
 export function rules_type_list(parameter) {
-    return request({
-        url: path+ '/sys/rule/category/tree',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/category/tree',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
-
-
-
 export function rules_type_save(parameter) {
-    return request({
-        url:path+  '/sys/rule/category/save',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/category/save',
+    method: 'post',
+    data: parameter
+  })
 }
 
 export function rules_type_update(parameter) {
-    return request({
-        url: path+ '/sys/rule/category/update',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/category/update',
+    method: 'post',
+    data: parameter
+  })
 }
 
 // //旧接口
@@ -47,411 +41,378 @@ export function rules_type_update(parameter) {
 //     })
 // }
 
-
 export function rules_type_get_byId(parameter) {
-    return request({
-        url: path+ '/sys/rule/category/info',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/category/info',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 export function rules_type_del(parameter) {
-    return request({
-        url: path+ '/sys/rule/category/del',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/category/del',
+    method: 'post',
+    data: parameter
+  })
 }
 
 // ---------------------------------------------------------以上规则分类-------------------------------------
 
-
 export function rules_list(parameter) {
-    return request({
-        url: path+ '/sys/rule/config/list',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/config/list',
+    method: 'post',
+    data: parameter
+  })
 }
 export function rules_update(parameter) {
-    return request({
-        url:  path+'/sys/rule/config/update',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/config/update',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 export function rules_add(parameter) {
-    return request({
-        url: path+ '/sys/rule/config/save',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/config/save',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
-
-
 export function rules_del(parameter) {
-    return request({
-        url: path+ '/sys/rule/config/del',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/config/del',
+    method: 'post',
+    data: parameter
+  })
 }
 
 export function rules_info(parameter) {
-    return request({
-        url: path+ '/sys/rule/config/info',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/config/info',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 //  --------------------------------------------------------- 以上规则 -------------------------------------
 
 export function rules_list_params(parameter) {
-    return request({
-        url: path+ '/sys/rule/method/list',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/method/list',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 export function rules_add_params(parameter) {
-    return request({
-        url:path+  '/sys/rule/method/save',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/method/save',
+    method: 'post',
+    data: parameter
+  })
 }
 
 export function rules_update_params(parameter) {
-    return request({
-        url: path+ '/sys/rule/method/update',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/method/update',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 export function rules_del_params(parameter) {
-    return request({
-        url:path+  '/sys/rule/method/del',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/method/del',
+    method: 'post',
+    data: parameter
+  })
 }
 
 export function rules_del_info(parameter) {
-    return request({
-        url: path+ '/sys/rule/method/info',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/method/info',
+    method: 'post',
+    data: parameter
+  })
 }
 //   ----- 以上动作方法-----
 
-
 export function parameter_update(parameter) {
-    return request({
-        url: path+ '/r/mgr/parameter/update',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/r/mgr/parameter/update',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 export function parameter_add(parameter) {
-    return request({
-        url: path+ '/r/mgr/parameter/save',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/r/mgr/parameter/save',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 export function parameter_list(parameter) {
-    return request({
-        url: path+ '/r/mgr/parameter/query',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/r/mgr/parameter/query',
+    method: 'post',
+    data: parameter
+  })
 }
 
 export function parameter_del(parameter) {
-    return request({
-        url: path+ '/r/mgr/parameter/del',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/r/mgr/parameter/del',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 export function parameter_by_id(parameter) {
-    return request({
-        url: path+ '/r/mgr/parameter/infoById',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/r/mgr/parameter/infoById',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
-
 export function parameter_by_code(parameter) {
-    return request({
-        url: path+ '/r/mgr/parameter/infoByCode',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/r/mgr/parameter/infoByCode',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 // -------动作开始--------------
 
 export function action_update(parameter) {
-    return request({
-        url: path+ '/sys/rule/action/update',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/action/update',
+    method: 'post',
+    data: parameter
+  })
 }
 
 export function action_add(parameter) {
-    return request({
-        url: path+ '/sys/rule/action/save',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/action/save',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
-
 export function action_list(parameter) {
-    return request({
-        url: path+ '/sys/rule/action/list',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/action/list',
+    method: 'post',
+    data: parameter
+  })
 }
 
 export function action_del(parameter) {
-    return request({
-        url: path+ '/sys/rule/action/del',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/action/del',
+    method: 'post',
+    data: parameter
+  })
 }
 // -------动作结束--------------
 
-
 export function rules_save2Update(parameter) {
-    return request({
-        url: path+ '/sys/rule/treeConfig/save',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/treeConfig/save',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 export function convertConditionScript(parameter) {
-    return request({
-        url: path+ '/r/mgr/dtNodeConfig/convertConditionScript',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/r/mgr/dtNodeConfig/convertConditionScript',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 // 保存流程数据
 export function flowConfigSave(parameter) {
-    return request({
-        url: path+ '/sys/rule/flowConfig/save2Update',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/flowConfig/save2Update',
+    method: 'post',
+    data: parameter
+  })
 }
 
 // 获取流程数据
 
 export function flowConfigInfo(parameter) {
-    return request({
-        url: path+ '/sys/rule/flowConfig/info',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/flowConfig/info',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
-
-
 export function rules_get_tree(parameter) {
-    return request({
-        url: path+ '/sys/rule/treeConfig/tree',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/treeConfig/tree',
+    method: 'post',
+    data: parameter
+  })
 }
 
 export function rules_updateStatus(parameter) {
-    return request({
-        url: path+ '/sys/rule/config/updateStatus',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/config/updateStatus',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 // 规则条件分类
 export function listByType(parameter) {
-    return request({
-        url: path+ '/sys/union/data/pageType',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/union/data/pageType',
+    method: 'post',
+    data: parameter
+  })
 }
 
 // 规则条件分类多
 export function listByTypeAll(parameter) {
-    return request({
-        url: path+ '/sys/union/data/page',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/union/data/page',
+    method: 'post',
+    data: parameter
+  })
 }
 
 // 规则条件分类多新接口
 export function dataPage(parameter) {
-    return request({
-        url: path+ '/sys/standard/data/page',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/standard/data/page',
+    method: 'post',
+    data: parameter
+  })
 }
 
 // 获取叙述结果数据
 export function dataPageType(parameter) {
-    return request({
-        url: path+ '/sys/standard/data/pageType',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/standard/data/pageType',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
-
 // 条件一级分类树
 export function condtionOneData(parameter) {
-    return request({
-        url: path+ '/sys/rule/dataConfig/condtionOneData',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/dataConfig/condtionOneData',
+    method: 'post',
+    data: parameter
+  })
 }
 
-//备份新增
+// 备份新增
 export function backupConfigBackUp(parameter) {
-    return request({
-        url:  path+'/sys/rule/backupConfig/backUp',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/backupConfig/backUp',
+    method: 'post',
+    data: parameter
+  })
 }
-//备份列表
+// 备份列表
 export function backupConfigList(parameter) {
-    return request({
-        url:path+  '/sys/rule/backupConfig/list',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/backupConfig/list',
+    method: 'post',
+    data: parameter
+  })
 }
-//备份详情
+// 备份详情
 export function backupConfigGet(parameter) {
-    return request({
-        url:  '/sys/rule/backupConfig/get',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: '/sys/rule/backupConfig/get',
+    method: 'post',
+    data: parameter
+  })
 }
 
-//备份还原
+// 备份还原
 export function backupConfigRedo(parameter) {
-    return request({
-        url: path+ '/sys/rule/backupConfig/redo',
-        method: 'post',
-        data: parameter
-    })
+  return request({
+    url: path + '/sys/rule/backupConfig/redo',
+    method: 'post',
+    data: parameter
+  })
 }
 
-
 // 获取数据字典列表
-export function getDictionaryDataList( data) {
-    return request({
-      url:  path+ `/sys/basic/dict/listDictInfo`,
-      method: 'POST',
-      data
-    })
-  }
-  
-  // 获取数据字典列表多个
-  export function getDictionaryDataListAll( data) {
-    return request({
-      url:  path+ `/app/dict/list`,
-      method: 'POST',
-      data
-    })
-  }
-
-  // 获取配置
+export function getDictionaryDataList(data) {
+  return request({
+    url: path + `/sys/basic/dict/listDictInfo`,
+    method: 'POST',
+    data
+  })
+}
+
+// 获取数据字典列表多个
+export function getDictionaryDataListAll(data) {
+  return request({
+    url: path + `/app/dict/list`,
+    method: 'POST',
+    data
+  })
+}
+
+// 获取配置
 export function ruleConfigGetConfig(data) {
-    return request({
-        url: path+`/sys/dataLabel/ruleConfig/getConfig`,
-        method: 'POST',
-        data
-    })
+  return request({
+    url: path + `/sys/dataLabel/ruleConfig/getConfig`,
+    method: 'POST',
+    data
+  })
 }
 
 // 标准部门科室管理
 export const deptTree = (data) => {
-    return request({
-      url: path+'/sys/standard/dept/tree',
-      method: 'POST',
-      data
-    })
-  }
-  
-
-
-
+  return request({
+    url: path + '/sys/standard/dept/tree',
+    method: 'POST',
+    data
+  })
+}
 
 export default {
-    rules_list,
-    rules_del,
-    rules_add,
-    rules_update,
-    rules_type_list,
-    rules_type_save,
-    rules_type_update,
-    rules_type_get_byId,
-    rules_type_del,
-    parameter_update,
-    parameter_add,
-    parameter_list,
-    parameter_del,
-    parameter_by_code,
-    parameter_by_id,
-
-    action_update,
-    action_add,
-    action_list,
-    action_del,
-    rules_save2Update,
-    convertConditionScript,
-    rules_get_tree,
-    rules_updateStatus
+  rules_list,
+  rules_del,
+  rules_add,
+  rules_update,
+  rules_type_list,
+  rules_type_save,
+  rules_type_update,
+  rules_type_get_byId,
+  rules_type_del,
+  parameter_update,
+  parameter_add,
+  parameter_list,
+  parameter_del,
+  parameter_by_code,
+  parameter_by_id,
+
+  action_update,
+  action_add,
+  action_list,
+  action_del,
+  rules_save2Update,
+  convertConditionScript,
+  rules_get_tree,
+  rules_updateStatus
 }

+ 65 - 68
src/api/scale.js

@@ -1,106 +1,103 @@
 import request from '@/utils/request'
 
-//量表分类
+// 量表分类
 export function scaleTypeAdd(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/save`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/save`,
+    method: 'post',
+    data
+  })
 }
 
-//量表分类列表
+// 量表分类列表
 export function scaleTypeList(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/tree`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/tree`,
+    method: 'post',
+    data
+  })
 }
-//量表分类修改
+// 量表分类修改
 export function scaleTypeUpdate(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/update`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/update`,
+    method: 'post',
+    data
+  })
 }
-//量表分类删除
+// 量表分类删除
 export function scaleTypeDel(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/del`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/del`,
+    method: 'post',
+    data
+  })
 }
-//量表分类获取
+// 量表分类获取
 export function scaleTypeInfo(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/info`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/category/info`,
+    method: 'post',
+    data
+  })
 }
 
 //      ------------------------------------  量表管理---------------------------------------
 export function scaleAdd(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/save`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/save`,
+    method: 'post',
+    data
+  })
 }
 
 export function scaleList(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/query`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/query`,
+    method: 'post',
+    data
+  })
 }
 
 export function scaleInfo(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/info`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/info`,
+    method: 'post',
+    data
+  })
 }
 
 export function scaleDel(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/del`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/del`,
+    method: 'post',
+    data
+  })
 }
 
 export function scaleUpdate(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/update`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/update`,
+    method: 'post',
+    data
+  })
 }
 
-
 // 修改量表配置
 export function scaleUpdateItem(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/updateItem`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/updateItem`,
+    method: 'post',
+    data
+  })
 }
 
 // 获取量表配置
 export function scaleInfoFull(data) {
-    return request({
-        url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/infoFull`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/scale/config/infoFull`,
+    method: 'post',
+    data
+  })
 }
 
-
-

+ 24 - 26
src/api/schedule.js

@@ -2,8 +2,8 @@ import request from '@/utils/request'
 
 /**
  * 创建医生日程
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function addDoctorSchedule(data) {
   return request({
@@ -13,38 +13,36 @@ export function addDoctorSchedule(data) {
   })
 }
 
-
 /**
  * 查询医生日历
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryDoctorScheduleByPage(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/schedule/query`,
-      method: 'post',
-      data
-    })
-  }
-
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/schedule/query`,
+    method: 'post',
+    data
+  })
+}
 
 /**
  * 删除日历
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
-  export function removeDoctorScheduleByPage(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/schedule/remove`,
-      method: 'post',
-      data
-    })
-  }
+export function removeDoctorScheduleByPage(data) {
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/schedule/remove`,
+    method: 'post',
+    data
+  })
+}
 
 /**
  * 任务
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getTaskCount(data) {
   return request({
@@ -56,8 +54,8 @@ export function getTaskCount(data) {
 
 /**
  * 任务
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getRemindCountByUrgentLevel(data) {
   return request({
@@ -65,4 +63,4 @@ export function getRemindCountByUrgentLevel(data) {
     method: 'post',
     data
   })
-}
+}

+ 8 - 10
src/api/serve-patient.js

@@ -2,8 +2,8 @@ import request from '@/utils/request'
 
 /**
  * 创建医生日程
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function pushServicePage(data) {
   return request({
@@ -13,12 +13,10 @@ export function pushServicePage(data) {
   })
 }
 
-
-
 export function pushServiceDetailList(data) {
-    return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/patient/pushserve/pushServiceDetailList`,
-      method: 'post',
-      data
-    })
-  }
+  return request({
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/patient/pushserve/pushServiceDetailList`,
+    method: 'post',
+    data
+  })
+}

+ 6 - 12
src/api/tag.js

@@ -172,12 +172,10 @@ export function addCrmRemark(data) {
   })
 }
 
-
-
 /**
  * 早筛活动
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function queryActivity(data) {
   return request({
@@ -187,12 +185,10 @@ export function queryActivity(data) {
   })
 }
 
-
-
 /**
  * 早筛活动标签列表
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function labelHistoryPatient(data) {
   return request({
@@ -204,8 +200,8 @@ export function labelHistoryPatient(data) {
 
 /**
  * 查询
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function searchLabelHistoryPatient(data) {
   return request({
@@ -215,5 +211,3 @@ export function searchLabelHistoryPatient(data) {
   })
 }
 
-
-

+ 3 - 14
src/api/target.js

@@ -75,7 +75,6 @@ export function pushTaskAdd2(data) {
   })
 }
 
-
 // 个案管理 详情接口
 
 // 个案病种列表
@@ -105,7 +104,7 @@ export function userInfoList(data) {
   })
 }
 
-//流失患者
+// 流失患者
 export function lossQuery(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/patient/loss/query`,
@@ -114,7 +113,7 @@ export function lossQuery(data) {
   })
 }
 
-//发起会诊列表
+// 发起会诊列表
 export function statQuery(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/launch/apply/stat/dept/statQuery`,
@@ -123,7 +122,7 @@ export function statQuery(data) {
   })
 }
 
-//参加会诊列表
+// 参加会诊列表
 export function changeStatQuery(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/doctor/mdt/launch/apply/stat/dept/changeStatQuery`,
@@ -132,9 +131,6 @@ export function changeStatQuery(data) {
   })
 }
 
-
-
-
 export function transferPatient(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/crm/patientDoctorRel/transferPatient`,
@@ -187,8 +183,6 @@ export function patientServiceRecordDelById(data) {
   })
 }
 
-
-
 export function pushTaskDel2(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}//sys/healthy/doctor/pushTask/del2`,
@@ -197,9 +191,6 @@ export function pushTaskDel2(data) {
   })
 }
 
-
-
-
 export function patientServiceRecordGetById(data) {
   return request({
     url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/crm/patientServiceRecord/getById`,
@@ -208,8 +199,6 @@ export function patientServiceRecordGetById(data) {
   })
 }
 
-
-
 // 查看列表
 export function patientDoctorRelQueryAll(data) {
   return request({

+ 12 - 24
src/api/task.js

@@ -62,45 +62,37 @@ export function pushServeIgnore(data) {
   })
 }
 
-
-
 /**
  * 获取任务统计
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 export function getTaskTotalCount(data) {
   return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/taskTotalCount`,
-      method: 'post',
-      data
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/manage/doctor/crm/statistic/taskTotalCount`,
+    method: 'post',
+    data
   })
 }
 
-
 /**
  * 获取统计明细列表
- * @param {*} data 
- * @returns 
+ * @param {*} data
+ * @returns
  */
 
 export function queryTaskManage(data) {
   return request({
-      url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/pushTask/manageQuery`,
-      method: 'post',
-      data
+    url: `${window.GLOBAL_CONFIG.API_DOCTOR}/sys/healthy/doctor/pushTask/manageQuery`,
+    method: 'post',
+    data
   })
 }
 
-
-
-
-
-
 // /**
 //  * 查询任务统计
-//  * @param {*} data 
-//  * @returns 
+//  * @param {*} data
+//  * @returns
 //  */
 // export function queryTaskTotalCount(data) {
 //   return request({
@@ -110,7 +102,3 @@ export function queryTaskManage(data) {
 //   })
 // }
 
-
-
-
-

+ 1 - 1
src/api/user.js

@@ -118,7 +118,7 @@ export function deptTree(data) {
     data
   })
 }
-//标准部门树
+// 标准部门树
 
 export function standardDeptTree(data) {
   return request({

+ 105 - 59
src/components/CCIT-treeSelect/index.vue

@@ -1,20 +1,53 @@
 <template>
-  <el-select v-model="valueTitle" :clearable="clearable" :size='size' :disabled="disabled" @clear="clearHandle"
-    ref='elSelect' :placeholder="placeholder" :popper-class="`CCIT-select-tree ${themeClass}`" @focus="selectFocus"
-    :filterable="filterable" :filter-method="selectFilter" class="CCIT-selectTree" @visible-change="visibleChange"
-    :multiple="multiple" :collapse-tags="collapseTags" @remove-tag="removeTag" :key="key"
-    :style="'width:' + width ? width + 'px' : '100%'">
-    <el-option v-for="item in selectOptions" :key="item.id" :label="item[props.label]" :value="item[props.value]"
-      style="display:none"></el-option>
+  <el-select
+    ref="elSelect"
+    v-model="valueTitle"
+    :clearable="clearable"
+    :size="size"
+    :disabled="disabled"
+    :placeholder="placeholder"
+    :popper-class="`CCIT-select-tree ${themeClass}`"
+    :filterable="filterable"
+    :filter-method="selectFilter"
+    class="CCIT-selectTree"
+    :multiple="multiple"
+    :key="key"
+    :collapse-tags="collapseTags"
+    :style="'width:' + width ? width + 'px' : '100%'"
+    @clear="clearHandle"
+    @focus="selectFocus"
+    @visible-change="visibleChange"
+    @remove-tag="removeTag"
+  >
+    <el-option
+      v-for="item in selectOptions"
+      :key="item.id"
+      :label="item[props.label]"
+      :value="item[props.value]"
+      style="display: none"
+    />
     <el-option :value="optionTitle" :label="optionTitle" class="options">
-      <el-tree id="tree-option" ref="selectTree" :accordion="accordion" :data="options"
-        :default-expand-all="defaultExpandAll" :props="props" :node-key="props.value"
-        :default-expanded-keys="defaultExpandedKey" @node-click="handleNodeClick" :filter-node-method="filterNode"
-        :show-checkbox="multiple" :check-on-click-node="multiple" :class="{ 'single': !multiple }"
-        :expand-on-click-node="!multiple" @check="check" v-show="options.length">
-        <span class="custom-tree-node" slot-scope="{ node, data }">
+      <el-tree
+        id="tree-option"
+        ref="selectTree"
+        :accordion="accordion"
+        :data="options"
+        :default-expand-all="defaultExpandAll"
+        :props="props"
+        :node-key="props.value"
+        :default-expanded-keys="defaultExpandedKey"
+        :filter-node-method="filterNode"
+        v-show="options.length"
+        :show-checkbox="multiple"
+        :check-on-click-node="multiple"
+        :class="{ single: !multiple }"
+        :expand-on-click-node="!multiple"
+        @node-click="handleNodeClick"
+        @check="check"
+      >
+        <span slot-scope="{ node, data }" class="custom-tree-node">
           <slot :data="{ node, data }">
-            <i :class="data.icon" v-if="data.icon"></i>
+            <i v-if="data.icon" :class="data.icon" />
             <span class="text">{{ node.label }}</span>
           </slot>
           <!-- 自定义slot示例 开始 -->
@@ -33,15 +66,15 @@
 <script>
 import { mapState } from 'vuex'
 export default {
-  name: "el-tree-select",
+  name: 'ElTreeSelect',
   props: {
     // 配置项
     props: {
       type: Object,
       default: () => ({
-        value: 'id',             // ID字段名
-        label: 'name',       // 显示名称
-        children: 'children',    // 子级字段名
+        value: 'id', // ID字段名
+        label: 'name', // 显示名称
+        children: 'children' // 子级字段名
       })
     },
     width: { type: String, default: '' },
@@ -62,7 +95,7 @@ export default {
     // 只能选择最后一层的数值
     lastLevel: { type: Boolean, default: false },
     // 只能选择最后一层的数值时,需要根据 lastLevelKey来判断是否最后一层
-    lastLevelKey: { type: String, default: "hasChildren" },
+    lastLevelKey: { type: String, default: 'hasChildren' },
     lastLevelValue: { default: false },
     // 自动收起
     accordion: { type: Boolean, default: false },
@@ -71,11 +104,11 @@ export default {
     collapseTags: {
       type: Boolean,
       default: false
-    },
+    }
   },
   computed: {
     ...mapState({
-      themeClass: state => state.settings.themeClass
+      themeClass: (state) => state.settings.themeClass
     })
   },
   data() {
@@ -83,10 +116,21 @@ export default {
       valueTitle: '',
       defaultExpandedKey: [],
       selectOptions: [],
-      optionTitle: "",
+      optionTitle: '',
       key: +new Date()
     }
   },
+  watch: {
+    value(val) {
+      this.initHandle()
+    },
+    multiple(val) {
+      this.key = +new Date()
+    },
+    options(val) {
+      if (this.value) this.initHandle()
+    }
+  },
   mounted() {
     if (this.value) {
       this.initHandle()
@@ -97,18 +141,18 @@ export default {
       this.$emit('visible-change', val)
     },
     selectFilter(val) {
-      if (this.options.length) this.$refs.selectTree.filter(val);
+      if (this.options.length) this.$refs.selectTree.filter(val)
     },
     filterNode(value, data) {
-      if (!value) return true;
-      return data[this.props.label].indexOf(value) !== -1;
+      if (!value) return true
+      return data[this.props.label].indexOf(value) !== -1
     },
     selectFocus() {
       this.initHandle()
     },
     // 初始化值
     initHandle() {
-      this.$refs.selectTree.filter('');
+      this.$refs.selectTree.filter('')
       if (this.value) {
         if (this.multiple) {
           setTimeout(() => {
@@ -120,14 +164,16 @@ export default {
               titleList = this.$refs.selectTree.getCheckedNodes()
             }
             this.selectOptions = titleList
-            this.valueTitle = titleList.map(o => o[this.props.value])
+            this.valueTitle = titleList.map((o) => o[this.props.value])
           }, 10)
         } else {
           setTimeout(() => {
-            this.valueTitle = this.$refs.selectTree.getNode(this.value) ? this.$refs.selectTree.getNode(this.value).data[this.props.label] : ''     // 初始化显示
-            this.$refs.selectTree.setCurrentKey(this.value)       // 设置默认选中
-            this.defaultExpandedKey = [this.value]   // 设置默认展开
-          }, 10);
+            this.valueTitle = this.$refs.selectTree.getNode(this.value)
+              ? this.$refs.selectTree.getNode(this.value).data[this.props.label]
+              : '' // 初始化显示
+            this.$refs.selectTree.setCurrentKey(this.value) // 设置默认选中
+            this.defaultExpandedKey = [this.value] // 设置默认展开
+          }, 10)
         }
       } else {
         if (this.multiple) {
@@ -143,12 +189,18 @@ export default {
     // 初始化滚动条
     initScroll() {
       this.$nextTick(() => {
-        let list = document.querySelectorAll('.CCIT-select-tree .el-scrollbar .el-select-dropdown__wrap')
+        const list = document.querySelectorAll(
+          '.CCIT-select-tree .el-scrollbar .el-select-dropdown__wrap'
+        )
         // 有多个下拉框,造成页面错位
-        let index = list.length - 1
-        let scrollWrap = list[index]
-        let scrollBar = document.querySelectorAll('.el-scrollbar .el-scrollbar__bar')
-        scrollWrap.style && (scrollWrap.style.cssText = 'margin: 0px; max-height: none; overflow: hidden;')
+        const index = list.length - 1
+        const scrollWrap = list[index]
+        const scrollBar = document.querySelectorAll(
+          '.el-scrollbar .el-scrollbar__bar'
+        )
+        scrollWrap.style &&
+          (scrollWrap.style.cssText =
+            'margin: 0px; max-height: none; overflow: hidden;')
         for (let i = 0; i < scrollBar.length; i++) {
           scrollBar[i].style.width = 0
         }
@@ -161,7 +213,11 @@ export default {
         if (node.disabled) {
           return
         }
-        if (this.lastLevel && node[this.lastLevelKey] && node[this.lastLevelKey] != this.lastLevelValue) return
+        if (
+          this.lastLevel &&
+          node[this.lastLevelKey] &&
+          node[this.lastLevelKey] != this.lastLevelValue
+        ) { return }
         this.valueTitle = node[this.props.label]
         this.$emit('input', node[this.props.value], node)
         this.$emit('change', node[this.props.value], node)
@@ -172,11 +228,13 @@ export default {
     // 多选选择
     check(node) {
       if (!this.multiple) return
-      let selectedData = [], titleList = [], selectedTextData = []
+      const selectedData = []
+      const titleList = []
+      let selectedTextData = []
       if (this.lastLevel) {
         selectedTextData = this.$refs.selectTree.getCheckedNodes(true)
         for (let i = 0; i < selectedTextData.length; i++) {
-          const e = selectedTextData[i];
+          const e = selectedTextData[i]
           if (e[this.lastLevelKey] == this.lastLevelValue) {
             selectedData.push(e[this.props.value])
             titleList.push(e[this.props.label])
@@ -185,7 +243,7 @@ export default {
       } else {
         selectedTextData = this.$refs.selectTree.getCheckedNodes()
         for (let i = 0; i < selectedTextData.length; i++) {
-          const e = selectedTextData[i];
+          const e = selectedTextData[i]
           selectedData.push(e[this.props.value])
           titleList.push(e[this.props.label])
         }
@@ -214,27 +272,15 @@ export default {
     },
     // 清空选中样式
     clearSelected() {
-      let allNode = document.querySelectorAll('#tree-option .el-tree-node')
+      const allNode = document.querySelectorAll('#tree-option .el-tree-node')
       for (let i = 0; i < allNode.length; i++) {
         allNode[i].classList.remove('is-current')
       }
     }
-  },
-  watch: {
-    value(val) {
-      this.initHandle()
-    },
-    multiple(val) {
-      this.key = +new Date()
-    },
-    options(val) {
-      if (this.value) this.initHandle()
-    }
   }
 }
 </script>
 
-
 <style>
 .CCIT-select-tree {
   min-width: 180px;
@@ -266,7 +312,7 @@ ul li::-webkit-scrollbar-track {
   background-color: #fff;
 }
 
-ul li>>>.el-tree .el-tree-node__content {
+ul li >>> .el-tree .el-tree-node__content {
   height: auto;
   padding: 0 20px;
 }
@@ -275,22 +321,22 @@ ul li>>>.el-tree .el-tree-node__content {
   font-weight: normal;
 }
 
-.el-tree.single>>>.is-current .el-tree-node__label {
+.el-tree.single >>> .is-current .el-tree-node__label {
   color: #409eff;
   font-weight: 700;
 }
 
-.el-tree.single>>>.is-current .el-tree-node__content .custom-tree-node {
+.el-tree.single >>> .is-current .el-tree-node__content .custom-tree-node {
   color: #409eff;
   font-weight: 700;
 }
 
-.el-tree.single>>>.is-current .el-tree-node__children .custom-tree-node {
+.el-tree.single >>> .is-current .el-tree-node__children .custom-tree-node {
   color: #606266;
   font-weight: normal;
 }
 
-.el-tree.single>>>.is-current .el-tree-node__children .el-tree-node__label {
+.el-tree.single >>> .is-current .el-tree-node__children .el-tree-node__label {
   color: #606266;
   font-weight: normal;
 }
@@ -305,4 +351,4 @@ ul li>>>.el-tree .el-tree-node__content {
   padding: 0;
   line-height: 24px;
 }
-</style>
+</style>

+ 60 - 60
src/components/Process/FlowCard/Preview.vue

@@ -1,12 +1,12 @@
 <script>
-import { NodeUtils } from "./util.js";
-const isCondition = data => data.type === "condition" || (data.type === "approver" && data.isInterflow);
-const notEmptyArray = arr => Array.isArray(arr) && arr.length > 0;
-const hasBranch = data => notEmptyArray(data.conditionNodes);
-const stopPro = ev => ev.stopPropagation();
+import { NodeUtils } from './util.js'
+const isCondition = data => data.type === 'condition' || (data.type === 'approver' && data.isInterflow)
+const notEmptyArray = arr => Array.isArray(arr) && arr.length > 0
+const hasBranch = data => notEmptyArray(data.conditionNodes)
+const stopPro = ev => ev.stopPropagation()
 
 function createNormalCard(ctx, conf, h) {
-  let classList = ['flow-path-card']
+  const classList = ['flow-path-card']
   if (conf.state) classList.push(conf.state)
   const afterTrue = (isTrue, name) => (isTrue && classList.push(name), isTrue)
   const isStartNode = afterTrue(NodeUtils.isStartNode(conf), 'start-node')
@@ -15,24 +15,24 @@ function createNormalCard(ctx, conf, h) {
   const isTimerNode = afterTrue(NodeUtils.isTimerNode(conf), 'timer')
   const isSubFlowNode = afterTrue(NodeUtils.isSubFlowNode(conf), 'subFlow')
   return (
-    <section class={classList.join(' ')} onClick={this.eventLauncher.bind(ctx, "edit", conf)} >
-      <header class="header">
-        <div class="title-box" style="height: 100%;width:190px;">
-          <span class="title-text">{conf.properties.title}</span>
+    <section class={classList.join(' ')} onClick={this.eventLauncher.bind(ctx, 'edit', conf)} >
+      <header class='header'>
+        <div class='title-box' style='height: 100%;width:190px;'>
+          <span class='title-text'>{conf.properties.title}</span>
         </div>
         {(isSubFlowNode) && (
-          <el-tag class="async-state" size="mini" effect="plain" style="right:10px">{conf.properties.isAsync ? '异步' : '同步'}</el-tag>
+          <el-tag class='async-state' size='mini' effect='plain' style='right:10px'>{conf.properties.isAsync ? '异步' : '同步'}</el-tag>
         )}
       </header>
-      <div class="body">
-        <span class="text">{conf.content}</span>
+      <div class='body'>
+        <span class='text'>{conf.content}</span>
       </div>
     </section>
-  );
+  )
 }
 // arg = ctx, data, h
 const createFunc = (...arg) => createNormalCard.call(arg[0], ...arg)
-let nodes = {
+const nodes = {
   start: createFunc,
   approver: createFunc,
   copy: createFunc,
@@ -40,91 +40,91 @@ let nodes = {
   subFlow: createFunc,
   interflow: createFunc,
   empty: _ => '',
-  condition: function (ctx, conf, h) {
+  condition: function(ctx, conf, h) {
     return (
-      <section class="flow-path-card condition">
-        <header class="header">
-          <div class="title-box" style="height: 20px;width:160px;">
-            <span class="title-text">{conf.properties.title}</span>
+      <section class='flow-path-card condition'>
+        <header class='header'>
+          <div class='title-box' style='height: 20px;width:160px;'>
+            <span class='title-text'>{conf.properties.title}</span>
           </div>
         </header>
-        <div class="body">
-          <div class="text">{conf.content}</div>
+        <div class='body'>
+          <div class='text'>{conf.content}</div>
         </div>
       </section>
-    );
+    )
   }
-};
+}
 
 function addNodeButton(ctx, data, h, isBranch = false) {
   // 只有非条件节点和条件分支树下面的那个按钮 才能添加新分支树
-  let couldAddBranch = !hasBranch(data) || isBranch;
-  let isEmpty = data.type === "empty";
+  const couldAddBranch = !hasBranch(data) || isBranch
+  const isEmpty = data.type === 'empty'
   if (isEmpty && !isBranch) {
-    return "";
+    return ''
   }
   return (
-    <div class="add-node-btn-box flex justify-center"></div>
-  );
+    <div class='add-node-btn-box flex justify-center'></div>
+  )
 }
 
 function NodeFactory(ctx, data, h) {
   if (!data) return
   const showErrorTip = ctx.verifyMode && NodeUtils.checkNode(data) === false
-  let res = [],
-    branchNode = "",
-    selfNode = (
-      <div class="node-wrap">
-        <div class={`node-wrap-box ${data.type} ${NodeUtils.isInterflowNode(data) ? 'interflow' : ''} ${showErrorTip ? 'error' : ''}`}>
-          {nodes[data.type].call(ctx, ctx, data, h)}
-          {addNodeButton.call(ctx, ctx, data, h)}
-        </div>
+  const res = []
+  let branchNode = ''
+  const selfNode = (
+    <div class='node-wrap'>
+      <div class={`node-wrap-box ${data.type} ${NodeUtils.isInterflowNode(data) ? 'interflow' : ''} ${showErrorTip ? 'error' : ''}`}>
+        {nodes[data.type].call(ctx, ctx, data, h)}
+        {addNodeButton.call(ctx, ctx, data, h)}
       </div>
-    );
+    </div>
+  )
 
   if (hasBranch(data)) {
     // 如果节点是数组 一定为条件分支 添加分支样式包裹
     // {data.childNode && NodeFactory.call(ctx, ctx, data.childNode, h)}
     branchNode = (
-      <div class="branch-wrap">
-        <div class="branch-box-wrap">
-          <div class="branch-box flex justify-center relative">
-            <span class="line"></span>
+      <div class='branch-wrap'>
+        <div class='branch-box-wrap'>
+          <div class='branch-box flex justify-center relative'>
+            <span class='line'></span>
             {data.conditionNodes.map(d => NodeFactory.call(ctx, ctx, d, h))}
           </div>
         </div>
         {addNodeButton.call(ctx, ctx, data, h, true)}
       </div>
-    );
+    )
   }
 
   if (isCondition(data)) {
     return (
-      <div class="col-box">
-        <div class="center-line"></div>
-        <div class="top-cover-line"></div>
-        <div class="bottom-cover-line"></div>
+      <div class='col-box'>
+        <div class='center-line'></div>
+        <div class='top-cover-line'></div>
+        <div class='bottom-cover-line'></div>
         {selfNode}
         {branchNode}
         {NodeFactory.call(ctx, ctx, data.childNode, h)}
       </div>
-    );
+    )
   }
-  res.push(selfNode);
-  branchNode && res.push(branchNode);
-  data.childNode && res.push(NodeFactory.call(ctx, ctx, data.childNode, h));
-  return res;
+  res.push(selfNode)
+  branchNode && res.push(branchNode)
+  data.childNode && res.push(NodeFactory.call(ctx, ctx, data.childNode, h))
+  return res
 }
 
 function addEndNode(h) {
-  return <section class="end-node">结束</section>;
+  return <section class='end-node'>结束</section>
 }
 
 export default {
   props: {
     data: { type: Object, required: true },
     // 点击发布时需要校验节点数据完整性 此时打开校验模式
-    verifyMode: { type: Boolean, default: true },
+    verifyMode: { type: Boolean, default: true }
   },
   watch: {
 
@@ -136,21 +136,21 @@ export default {
      */
     eventLauncher(event, ...args) {
       // args.slice(0,-1) vue 会注入MouseEvent到最后一个参数 去除事件对象
-      let param = { event, args: args.slice(0, -1) };
-      this.$emit("emits", param);
+      const param = { event, args: args.slice(0, -1) }
+      this.$emit('emits', param)
     }
   },
   render(h) {
     return (
-      <div style="display: inline-flex; flex-direction: column; align-items: center;">
+      <div style='display: inline-flex; flex-direction: column; align-items: center;'>
         {this.data && NodeFactory.call(this, this, this.data, h)}
         {addEndNode(h)}
       </div>
-    );
+    )
   }
-};
+}
 </script>
 
 <style lang="scss" scoped>
 @import 'index.scss';
-</style>
+</style>

+ 21 - 24
src/components/Process/FlowCard/config.js

@@ -1,19 +1,18 @@
 export default {
   start: {
-    type: "start",
-    content: "触发条件",
+    type: 'start',
+    content: '触发条件',
     properties: {
-      
-      condition:{},
-      action:{},
-      ruleType:'condition',
+
+      condition: {},
+      action: {},
+      ruleType: 'condition',
       title: '开始节点'
     }
   },
   approver: {
-    type: "approver",
-    content: "请设置动作节点",
-   
+    type: 'approver',
+    content: '请设置动作节点',
 
     properties: {
       title: '动作节点'
@@ -47,12 +46,10 @@ export default {
     }
   },
   interflow: {
-    type: "approver",
-    content: "请设置动作节点",
-    exeRatio:'',//百分比
-    exeType:'',//每次执行,随机执行
-     
-  
+    type: 'approver',
+    content: '请设置动作节点',
+    exeRatio: '', // 百分比
+    exeType: '', // 每次执行,随机执行
 
     isInterflow: true,
     properties: {
@@ -60,24 +57,24 @@ export default {
     }
   },
   condition: {
-    type: "condition",
-    content: "请设置条件",
+    type: 'condition',
+    content: '请设置条件',
     properties: {
       title: '条件',
       conditions: [],
-      ruleType:'condition',
-      conditionExeType:'',
+      ruleType: 'condition',
+      conditionExeType: '',
       initiator: null
     }
   },
   branch: {
-    type: "branch",
-    content: "",
+    type: 'branch',
+    content: '',
     properties: {}
   },
   empty: {
-    type: "empty",
-    content: "",
+    type: 'empty',
+    content: '',
     properties: {}
   }
-}
+}

+ 93 - 93
src/components/Process/FlowCard/index.vue

@@ -1,9 +1,9 @@
 <script>
-import { NodeUtils } from "./util.js";
-const isCondition = data => data.type === "condition" || (data.type === "approver" && data.isInterflow);
-const notEmptyArray = arr => Array.isArray(arr) && arr.length > 0;
-const hasBranch = data => notEmptyArray(data.conditionNodes);
-const stopPro = ev => ev.stopPropagation();
+import { NodeUtils } from './util.js'
+const isCondition = data => data.type === 'condition' || (data.type === 'approver' && data.isInterflow)
+const notEmptyArray = arr => Array.isArray(arr) && arr.length > 0
+const hasBranch = data => notEmptyArray(data.conditionNodes)
+const stopPro = ev => ev.stopPropagation()
 
 function createNormalCard(ctx, conf, h) {
   const classList = ['flow-path-card']
@@ -14,23 +14,23 @@ function createNormalCard(ctx, conf, h) {
   const isTimerNode = afterTrue(NodeUtils.isTimerNode(conf), 'timer')
   const isSubFlowNode = afterTrue(NodeUtils.isSubFlowNode(conf), 'subFlow')
   return (
-    <section class={classList.join(' ')} onClick={this.eventLauncher.bind(ctx, "edit", conf)} >
-      <header class="header">
-        <div class="title-box" style="height: 100%;width:190px;">
-          <span class="title-text">{conf.properties.title}</span>
+    <section class={classList.join(' ')} onClick={this.eventLauncher.bind(ctx, 'edit', conf)} >
+      <header class='header'>
+        <div class='title-box' style='height: 100%;width:190px;'>
+          <span class='title-text'>{conf.properties.title}</span>
           {(!isTimerNode) && (
-            <input vModel_trim={conf.properties.title} class="title-input" onClick={stopPro} />
+            <input vModel_trim={conf.properties.title} class='title-input' onClick={stopPro} />
           )}
         </div>
-        <div class="actions">
-          <i class="el-icon-close icon" onClick={this.eventLauncher.bind(ctx, "deleteNode", conf, ctx.data)} ></i>
+        <div class='actions'>
+          <i class='el-icon-close icon' onClick={this.eventLauncher.bind(ctx, 'deleteNode', conf, ctx.data)} ></i>
         </div>
         {(isSubFlowNode) && (
-          <el-tag class="async-state" size="mini" effect="plain">{conf.properties.isAsync ? '异步' : '同步'}</el-tag>
+          <el-tag class='async-state' size='mini' effect='plain'>{conf.properties.isAsync ? '异步' : '同步'}</el-tag>
         )}
       </header>
-      <div class="body">
-        <span class="text">{conf.content}</span>
+      <div class='body'>
+        <span class='text'>{conf.content}</span>
         {
           //  <div class="icon-wrapper right">
           //   <i class="el-icon-arrow-right icon right-arrow"></i>
@@ -38,11 +38,11 @@ function createNormalCard(ctx, conf, h) {
         }
       </div>
     </section>
-  );
+  )
 }
 // arg = ctx, data, h
 const createFunc = (...arg) => createNormalCard.call(arg[0], ...arg)
-let nodes = {
+const nodes = {
   start: createFunc,
   approver: createFunc,
   copy: createFunc,
@@ -50,41 +50,41 @@ let nodes = {
   subFlow: createFunc,
   interflow: createFunc,
   empty: _ => '',
-  condition: function (ctx, conf, h) {
+  condition: function(ctx, conf, h) {
     // <i
     //    class="el-icon-document-copy icon"
     //    onClick={this.eventLauncher.bind(ctx, "copyNode", conf, ctx.data)}
     //  ></i>
     return (
       <section
-        class="flow-path-card condition"
-        onClick={this.eventLauncher.bind(ctx, "edit", conf)}
+        class='flow-path-card condition'
+        onClick={this.eventLauncher.bind(ctx, 'edit', conf)}
       >
-        <header class="header">
-          <div class="title-box" style="height:20px;width:160px;">
-            <span class="title-text">{conf.properties.title}</span>
-            <input vModel_trim={conf.properties.title} class="title-input" onClick={stopPro} />
+        <header class='header'>
+          <div class='title-box' style='height:20px;width:160px;'>
+            <span class='title-text'>{conf.properties.title}</span>
+            <input vModel_trim={conf.properties.title} class='title-input' onClick={stopPro} />
           </div>
           {
-            // <span class="priority">优先级{conf.properties.priority + 1}</span> 
+            // <span class="priority">优先级{conf.properties.priority + 1}</span>
           }
-          <div class="actions">
-            <i class="el-icon-close icon" onClick={this.eventLauncher.bind(ctx, "deleteNode", conf, ctx.data)}></i>
+          <div class='actions'>
+            <i class='el-icon-close icon' onClick={this.eventLauncher.bind(ctx, 'deleteNode', conf, ctx.data)}></i>
           </div>
         </header>
-        <div class="body">
-          <div class="text">{conf.content}</div>
+        <div class='body'>
+          <div class='text'>{conf.content}</div>
         </div>
         {
         }
       </section>
-    );
+    )
   }
-};
+}
 
 function addNodeButton(ctx, data, h, isBranch = false) {
   // 只有非条件节点和条件分支树下面的那个按钮 才能添加新分支树
-  let couldAddBranch = !hasBranch(data) || isBranch;
+  const couldAddBranch = !hasBranch(data) || isBranch
   let canAddAppendBranch = true
   let canAddAppendInterflow = true
   let canAddTimerNode = true
@@ -95,74 +95,74 @@ function addNodeButton(ctx, data, h, isBranch = false) {
   if (data.type === 'timer' || (data.childNode && data.childNode.type === 'timer')) {
     canAddTimerNode = false
   }
-  let isEmpty = data.type === "empty";
+  const isEmpty = data.type === 'empty'
   if (isEmpty && !isBranch) {
-    return "";
+    return ''
   }
   return (
-    <div class="add-node-btn-box flex justify-center">
-      <div class="add-node-btn">
-        <el-popover placement="right" trigger="click" width="380">
-          <div class="condition-box">
+    <div class='add-node-btn-box flex justify-center'>
+      <div class='add-node-btn'>
+        <el-popover placement='right' trigger='click' width='380'>
+          <div class='condition-box'>
             <div>
-              <div class="condition-icon" onClick={ctx.eventLauncher.bind(ctx, "addApprovalNode", data, isBranch)} >
-                <i class="icon-ym icon-ym-flowTodo"></i>
+              <div class='condition-icon' onClick={ctx.eventLauncher.bind(ctx, 'addApprovalNode', data, isBranch)} >
+                <i class='icon-ym icon-ym-flowTodo'></i>
               </div>
               执行节点
             </div>
-        
+
             <div class={{ 'condition-disabled': !canAddAppendBranch }}>
-              <div class="condition-icon" onClick={this.eventLauncher.bind(ctx, "appendBranch", data, isBranch, !canAddAppendBranch)}>
-                <i class="ym-custom ym-custom-sitemap"></i>
+              <div class='condition-icon' onClick={this.eventLauncher.bind(ctx, 'appendBranch', data, isBranch, !canAddAppendBranch)}>
+                <i class='ym-custom ym-custom-sitemap'></i>
               </div>
               条件分支
             </div>
             <div class={{ 'condition-disabled': !canAddAppendInterflow }}>
-              <div class="condition-icon" onClick={this.eventLauncher.bind(ctx, "appendInterflowBranch", data, isBranch, !canAddAppendInterflow)}>
-                <i class="icon-ym icon-ym-node"></i>
+              <div class='condition-icon' onClick={this.eventLauncher.bind(ctx, 'appendInterflowBranch', data, isBranch, !canAddAppendInterflow)}>
+                <i class='icon-ym icon-ym-node'></i>
               </div>
               分流/合流
             </div>
-           
+
           </div>
 
-          <button class="btn" type="button" slot="reference">
-            <i class="el-icon-plus icon"></i>
+          <button class='btn' type='button' slot='reference'>
+            <i class='el-icon-plus icon'></i>
           </button>
         </el-popover>
       </div>
     </div>
-  );
+  )
 }
 
 function NodeFactory(ctx, data, h) {
   if (!data) return
   const showErrorTip = ctx.verifyMode && NodeUtils.checkNode(data) === false
-  let res = [],
-    branchNode = "",
-    content = NodeUtils.isConditionNode(data) ? "未设置条件" : NodeUtils.isSubFlowNode(data) ? "未设置发起人" : "未设置审批人",
-    selfNode = (
-      <div class="node-wrap">
-        <div class={`node-wrap-box ${data.type} ${NodeUtils.isInterflowNode(data) ? 'interflow' : ''} ${showErrorTip ? 'error' : ''}`}>
-          <el-tooltip content={content} placement="top" effect="dark">
-            <div class="error-tip" onClick={this.eventLauncher.bind(ctx, "edit", data)}>!!!</div>
-          </el-tooltip>
-          {nodes[data.type].call(ctx, ctx, data, h)}
-          {addNodeButton.call(ctx, ctx, data, h)}
-        </div>
+  const res = []
+  let branchNode = ''
+  const content = NodeUtils.isConditionNode(data) ? '未设置条件' : NodeUtils.isSubFlowNode(data) ? '未设置发起人' : '未设置审批人'
+  const selfNode = (
+    <div class='node-wrap'>
+      <div class={`node-wrap-box ${data.type} ${NodeUtils.isInterflowNode(data) ? 'interflow' : ''} ${showErrorTip ? 'error' : ''}`}>
+        <el-tooltip content={content} placement='top' effect='dark'>
+          <div class='error-tip' onClick={this.eventLauncher.bind(ctx, 'edit', data)}>!!!</div>
+        </el-tooltip>
+        {nodes[data.type].call(ctx, ctx, data, h)}
+        {addNodeButton.call(ctx, ctx, data, h)}
       </div>
-    );
+    </div>
+  )
 
   if (hasBranch(data)) {
     // 如果节点是数组 一定为条件分支 添加分支样式包裹
     // {data.childNode && NodeFactory.call(ctx, ctx, data.childNode, h)}
     if (NodeUtils.isConditionNode(data.conditionNodes[0])) {
       branchNode = (
-        <div class="branch-wrap">
-          <div class="branch-box-wrap">
-            <div class="branch-box flex justify-center relative">
-              <button onClick={this.eventLauncher.bind(ctx, "appendConditionNode", data)}
-                class="btn">
+        <div class='branch-wrap'>
+          <div class='branch-box-wrap'>
+            <div class='branch-box flex justify-center relative'>
+              <button onClick={this.eventLauncher.bind(ctx, 'appendConditionNode', data)}
+                class='btn'>
                 添加条件
               </button>
               {data.conditionNodes.map(d => NodeFactory.call(ctx, ctx, d, h))}
@@ -170,15 +170,15 @@ function NodeFactory(ctx, data, h) {
           </div>
           {addNodeButton.call(ctx, ctx, data, h, true)}
         </div>
-      );
+      )
     }
     if (NodeUtils.isInterflowNode(data.conditionNodes[0])) {
       branchNode = (
-        <div class="branch-wrap">
-          <div class="branch-box-wrap">
-            <div class="branch-box flex justify-center relative">
-              <button onClick={this.eventLauncher.bind(ctx, "appendInterflowNode", data)}
-                class="btn">
+        <div class='branch-wrap'>
+          <div class='branch-box-wrap'>
+            <div class='branch-box flex justify-center relative'>
+              <button onClick={this.eventLauncher.bind(ctx, 'appendInterflowNode', data)}
+                class='btn'>
                 添加分流
               </button>
               {data.conditionNodes.map(d => NodeFactory.call(ctx, ctx, d, h))}
@@ -186,37 +186,37 @@ function NodeFactory(ctx, data, h) {
           </div>
           {addNodeButton.call(ctx, ctx, data, h, true)}
         </div>
-      );
+      )
     }
   }
 
   if (isCondition(data)) {
     return (
-      <div class="col-box">
-        <div class="center-line"></div>
-        <div class="top-cover-line"></div>
-        <div class="bottom-cover-line"></div>
+      <div class='col-box'>
+        <div class='center-line'></div>
+        <div class='top-cover-line'></div>
+        <div class='bottom-cover-line'></div>
         {selfNode}
         {branchNode}
         {NodeFactory.call(ctx, ctx, data.childNode, h)}
       </div>
-    );
+    )
   }
-  res.push(selfNode);
-  branchNode && res.push(branchNode);
-  data.childNode && res.push(NodeFactory.call(ctx, ctx, data.childNode, h));
-  return res;
+  res.push(selfNode)
+  branchNode && res.push(branchNode)
+  data.childNode && res.push(NodeFactory.call(ctx, ctx, data.childNode, h))
+  return res
 }
 
 function addEndNode(h) {
-  return <section class="end-node">结束</section>;
+  return <section class='end-node'>结束</section>
 }
 
 export default {
   props: {
     data: { type: Object, required: true },
     // 点击发布时需要校验节点数据完整性 此时打开校验模式
-    verifyMode: { type: Boolean, default: true },
+    verifyMode: { type: Boolean, default: true }
   },
   watch: {
 
@@ -227,28 +227,28 @@ export default {
      * @param { Object } 包含event(事件名)和args(事件参数)两个参数
      */
     eventLauncher(event, ...args) {
-      let list = ['appendBranch', 'appendInterflowBranch', 'addTimerNode']
+      const list = ['appendBranch', 'appendInterflowBranch', 'addTimerNode']
       if (list.includes(event) && args[args.length - 2]) return
       // args.slice(0,-1) vue 会注入MouseEvent到最后一个参数 去除事件对象
-      let param = { event, args: args.slice(0, -1) };
-      this.$emit("emits", param);
+      const param = { event, args: args.slice(0, -1) }
+      this.$emit('emits', param)
     },
-    update(){
+    update() {
       this.$forceUpdate()
     }
   },
   render(h) {
     return (
-      <div class='ronin' style="display: inline-flex; flex-direction: column; align-items: center;min-width:100%">
+      <div class='ronin' style='display: inline-flex; flex-direction: column; align-items: center;min-width:100%'>
         {this.data && NodeFactory.call(this, this, this.data, h)}
         {addEndNode(h)}
       </div>
-    );
+    )
   }
-};
+}
 </script>
 
 <style lang="scss" scoped>
 @import 'index.scss';
 
-</style>
+</style>

+ 55 - 57
src/components/Process/FlowCard/util.js

@@ -1,4 +1,4 @@
-import nodeConfig from "./config.js";
+import nodeConfig from './config.js'
 const isEmpty = data => data === null || data === undefined || data === ''
 const isEmptyArray = data => Array.isArray(data) ? data.length === 0 : true
 
@@ -10,19 +10,18 @@ export class NodeUtils {
   static idGenerator() {
     let quotient = (new Date() - new Date('2020-08-01'))
     quotient += Math.ceil(Math.random() * 1000) // 防止重複
-    const chars = '0123456789ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz';
-    const charArr = chars.split("")
-    const radix = chars.length;
+    const chars = '0123456789ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz'
+    const charArr = chars.split('')
+    const radix = chars.length
     const res = []
     do {
-      let mod = quotient % radix;
-      quotient = (quotient - mod) / radix;
+      const mod = quotient % radix
+      quotient = (quotient - mod) / radix
       res.push(charArr[mod])
-    } while (quotient);
+    } while (quotient)
     return res.join('')
   }
 
-
   /**
    * 判断节点类型
    * @param {Node} node - 节点数据
@@ -56,7 +55,7 @@ export class NodeUtils {
    * @returns { Object } 节点数据
    */
   static createNode(type, previousNodeId) {
-    let res = JSON.parse(JSON.stringify(nodeConfig[type]))
+    const res = JSON.parse(JSON.stringify(nodeConfig[type]))
     res.nodeId = this.idGenerator()
     res.prevId = previousNodeId
     return res
@@ -70,14 +69,14 @@ export class NodeUtils {
   static getPreviousNode(prevId, processData) {
     if (processData.nodeId === prevId) return processData
     if (processData.childNode) {
-      let r1 = this.getPreviousNode(prevId, processData.childNode)
+      const r1 = this.getPreviousNode(prevId, processData.childNode)
       if (r1) {
         return r1
       }
     }
     if (processData.conditionNodes) {
-      for (let c of processData.conditionNodes) {
-        let r2 = this.getPreviousNode(prevId, c)
+      for (const c of processData.conditionNodes) {
+        const r2 = this.getPreviousNode(prevId, c)
         if (r2) {
           return r2
         }
@@ -85,14 +84,13 @@ export class NodeUtils {
     }
   }
 
-
   /**
    * 删除节点
    * @param { Object  } nodeData - 被删除节点的数据
    * @param { Object  } processData - 流程图的所有节点数据
    */
   static deleteNode(nodeData, processData, checkEmpty = true) {
-    let prevNode = this.getPreviousNode(nodeData.prevId, processData)
+    const prevNode = this.getPreviousNode(nodeData.prevId, processData)
     if (checkEmpty && prevNode.type === 'empty') {
       if (this.isConditionNode(nodeData) || this.isInterflowNode(nodeData)) {
         const willDelBranch = prevNode.conditionNodes.length === 2
@@ -108,19 +106,19 @@ export class NodeUtils {
       // !this.isConditionNode(nodeData) && this.deleteNode(nodeData, processData)
       return
     }
-    let concatChild = (prev, delNode) => {
+    const concatChild = (prev, delNode) => {
       prev.childNode = delNode.childNode
       isEmptyArray(prev.conditionNodes) && (prev.conditionNodes = delNode.conditionNodes)
       prev.childNode && (prev.childNode.prevId = prev.nodeId)
-      prev.conditionNodes && prev.conditionNodes.forEach(c => c.prevId = prev.nodeId);
+      prev.conditionNodes && prev.conditionNodes.forEach(c => c.prevId = prev.nodeId)
     }
     if (this.isConditionNode(nodeData) || this.isInterflowNode(nodeData)) {
-      let cons = prevNode.conditionNodes
-      let index = cons.findIndex(c => c.nodeId === nodeData.nodeId)
+      const cons = prevNode.conditionNodes
+      const index = cons.findIndex(c => c.nodeId === nodeData.nodeId)
       if (cons.length > 2) {
         cons.splice(index, 1)
       } else {
-        let anotherCon = cons[+(!index)]
+        const anotherCon = cons[+(!index)]
         delete prevNode.conditionNodes
         delete prevNode.conditionType
         if (prevNode.childNode) {
@@ -155,14 +153,14 @@ export class NodeUtils {
    * @param { Object } newChildNode - 传入的新的节点 用户操作均为空  删除操作/添加抄送人 会传入该参数 以模拟添加节点
    */
   static addApprovalNode(data, isBranchAction, newChildNode = undefined) {
-    let oldChildNode = data.childNode;
-    newChildNode = newChildNode || this.createNode("approver", data.nodeId)
+    const oldChildNode = data.childNode
+    newChildNode = newChildNode || this.createNode('approver', data.nodeId)
     data.childNode = newChildNode
     if (oldChildNode) {
       newChildNode.childNode = oldChildNode
       oldChildNode.prevId = newChildNode.nodeId
     }
-    let conditionNodes = data.conditionNodes
+    const conditionNodes = data.conditionNodes
     if (Array.isArray(conditionNodes) && !isBranchAction && conditionNodes.length) {
       newChildNode.conditionNodes = conditionNodes.map(c => {
         c.prevId = newChildNode.nodeId
@@ -180,7 +178,7 @@ export class NodeUtils {
    * @return { Object } emptyNode - 空节点数据
    */
   static addEmptyNode(data) {
-    let emptyNode = this.createNode('empty', data.nodeId)
+    const emptyNode = this.createNode('empty', data.nodeId)
     this.addApprovalNode(data, true, emptyNode)
     return emptyNode
   }
@@ -204,12 +202,12 @@ export class NodeUtils {
    */
   static appendConditionNode(data) {
     const conditions = data.conditionNodes
-    let node = this.createNode('condition', data.nodeId)
-    let defaultNodeIndex = conditions.findIndex(node => node.properties.isDefault)
+    const node = this.createNode('condition', data.nodeId)
+    const defaultNodeIndex = conditions.findIndex(node => node.properties.isDefault)
     node.properties.priority = conditions.length
     if (defaultNodeIndex > -1) {
       conditions.splice(-1, 0, node) // 插在倒数第二个
-      //更新优先级
+      // 更新优先级
       node.properties.priority = conditions.length - 2
       conditions[conditions.length - 1].properties.priority = conditions.length - 1
     } else {
@@ -219,12 +217,12 @@ export class NodeUtils {
   }
   static appendInterflowNode(data) {
     const conditions = data.conditionNodes
-    let node = this.createNode('interflow', data.nodeId)
-    let defaultNodeIndex = conditions.findIndex(node => node.properties.isDefault)
+    const node = this.createNode('interflow', data.nodeId)
+    const defaultNodeIndex = conditions.findIndex(node => node.properties.isDefault)
     node.properties.priority = conditions.length
     if (defaultNodeIndex > -1) {
       conditions.splice(-1, 0, node) // 插在倒数第二个
-      //更新优先级
+      // 更新优先级
       node.properties.priority = conditions.length - 2
       conditions[conditions.length - 1].properties.priority = conditions.length - 1
     } else {
@@ -232,7 +230,7 @@ export class NodeUtils {
     }
   }
   /**
-   * 添加条件分支 branch 
+   * 添加条件分支 branch
    * @param { Object } data - 目标节点所在节点数据,在该节点最后添加分支节点
    */
   static appendBranch(data, isBottomBtnOfBranch) {
@@ -244,23 +242,23 @@ export class NodeUtils {
         // 添加一个模拟用的空白节点并返回这个节点,作为新分支的父节点
         nodeData = this.addEmptyNode(nodeData, true)
       } else {
-        let emptyNode = this.addEmptyNode(nodeData, true)
+        const emptyNode = this.addEmptyNode(nodeData, true)
         emptyNode.conditionNodes = nodeData.conditionNodes
-        emptyNode.conditionType = "condition"
+        emptyNode.conditionType = 'condition'
         emptyNode.conditionNodes.forEach(n => {
           n.prevId = emptyNode.nodeId
         })
       }
     }
-    let conditionNodes = [
-      this.createNode("condition", nodeData.nodeId),
-      this.createNode("condition", nodeData.nodeId)
+    const conditionNodes = [
+      this.createNode('condition', nodeData.nodeId),
+      this.createNode('condition', nodeData.nodeId)
     ].map((c, i) => {
-      c.properties.priority = i;
+      c.properties.priority = i
       return c
     })
     nodeData.conditionNodes = conditionNodes
-    nodeData.conditionType = "condition"
+    nodeData.conditionType = 'condition'
   }
   static appendInterflowBranch(data, isBottomBtnOfBranch) {
     // isBottomBtnOfBranch 用户点击的是分支树下面的按钮
@@ -271,20 +269,20 @@ export class NodeUtils {
         // 添加一个模拟用的空白节点并返回这个节点,作为新分支的父节点
         nodeData = this.addEmptyNode(nodeData, true)
       } else {
-        let emptyNode = this.addEmptyNode(nodeData, true)
+        const emptyNode = this.addEmptyNode(nodeData, true)
         emptyNode.conditionNodes = nodeData.conditionNodes
-        emptyNode.conditionType = "interflow"
+        emptyNode.conditionType = 'interflow'
         emptyNode.conditionNodes.forEach(n => {
           n.prevId = emptyNode.nodeId
         })
       }
     }
-    let conditionNodes = [
-      this.createNode("interflow", nodeData.nodeId),
-      this.createNode("interflow", nodeData.nodeId)
+    const conditionNodes = [
+      this.createNode('interflow', nodeData.nodeId),
+      this.createNode('interflow', nodeData.nodeId)
     ]
     nodeData.conditionNodes = conditionNodes
-    nodeData.conditionType = "interflow"
+    nodeData.conditionType = 'interflow'
   }
   /**
    * 重设节点优先级(条件节点)
@@ -298,14 +296,14 @@ export class NodeUtils {
       cnode.properties.priority = oldPriority
       return
     }
-    let prevNode = this.getPreviousNode(cnode.prevId, processData)
-    let newPriority = cnode.properties.priority
+    const prevNode = this.getPreviousNode(cnode.prevId, processData)
+    const newPriority = cnode.properties.priority
     // 替换节点为默认节点 取消修改优先级
     if (prevNode.conditionNodes[newPriority].properties.isDefault) {
       cnode.properties.priority = oldPriority
       return
     }
-    let delNode = prevNode.conditionNodes.splice(newPriority, 1, cnode)[0]
+    const delNode = prevNode.conditionNodes.splice(newPriority, 1, cnode)[0]
     delNode.properties.priority = oldPriority
     prevNode.conditionNodes[oldPriority] = delNode
   }
@@ -320,9 +318,9 @@ export class NodeUtils {
       return
     }
     // 分支节点数据 包含该分支所有的条件节点
-    let prevNode = this.getPreviousNode(data.prevId, processData)
-    let branchData = prevNode.conditionNodes
-    let index = branchData.findIndex(c => c === data)
+    const prevNode = this.getPreviousNode(data.prevId, processData)
+    const branchData = prevNode.conditionNodes
+    const index = branchData.findIndex(c => c === data)
     if (index) {
       // 和前一个数组项交换位置 Array.prototype.splice会返回包含被删除的项的集合(数组)
       branchData[index - 1].properties.priority = index
@@ -337,11 +335,11 @@ export class NodeUtils {
    */
   static decreasePriority(data, processData) {
     // 分支节点数据 包含该分支所有的条件节点
-    let prevNode = this.getPreviousNode(data.prevId, processData)
-    let branchData = prevNode.conditionNodes
-    let index = branchData.findIndex(c => c.nodeId === data.nodeId)
+    const prevNode = this.getPreviousNode(data.prevId, processData)
+    const branchData = prevNode.conditionNodes
+    const index = branchData.findIndex(c => c.nodeId === data.nodeId)
     if (index < branchData.length - 1) {
-      let lastNode = branchData[index + 1]
+      const lastNode = branchData[index + 1]
       if (lastNode.properties.isDefault) { // 默认节点不能修改优先级
         return
       }
@@ -426,7 +424,7 @@ export class NodeUtils {
  * 添模拟数据
  */
 export function getMockData() {
-  let startNode = NodeUtils.createNode("start");
-  startNode.childNode = NodeUtils.createNode("approver", startNode.nodeId)
-  return startNode;
-}
+  const startNode = NodeUtils.createNode('start')
+  startNode.childNode = NodeUtils.createNode('approver', startNode.nodeId)
+  return startNode
+}

+ 36 - 21
src/components/Process/OrgSelect/index.vue

@@ -1,31 +1,46 @@
 <template>
   <div class="org-select" :class="{'org-select__button':buttonType === 'button'}">
     <div class="tags">
-      <el-button v-if="buttonType === 'button'" icon="el-icon-plus" @click="show = true"
-        style="margin-bottom: 6px;">
-        {{title}}
+      <el-button
+        v-if="buttonType === 'button'"
+        icon="el-icon-plus"
+        style="margin-bottom: 6px;"
+        @click="show = true"
+      >
+        {{ title }}
       </el-button>
       <div class="input-box" :class="{'as-input': buttonType === 'input'}" @click="show = true">
-        <el-tag v-bind="tagConfig" class="org-tag" v-for="(item,i) in selectedData" :key="item.key"
-          @close="onClose(item,i)">
-          {{item.fullName}}
+        <el-tag
+          v-for="(item,i) in selectedData"
+          :key="item.key"
+          v-bind="tagConfig"
+          class="org-tag"
+          @close="onClose(item,i)"
+        >
+          {{ item.fullName }}
         </el-tag>
       </div>
     </div>
-    <org-transfer ref="transfer" :value="innerValue" :title="title" :visible.sync="show"
-      @confirm="onConfirm" :type="type" />
+    <org-transfer
+      ref="transfer"
+      :value="innerValue"
+      :title="title"
+      :visible.sync="show"
+      :type="type"
+      @confirm="onConfirm"
+    />
   </div>
 </template>
 <script>
 import OrgTransfer from '../OrgTransfer'
 import { getUserInfoList } from '@/api/permission/user'
 export default {
+  name: 'OrgSelect',
+  components: { OrgTransfer },
   model: {
     prop: 'value',
     event: 'change'
   },
-  components: { OrgTransfer },
-  name: 'org-select',
   props: {
     value: {
       type: Array,
@@ -55,7 +70,7 @@ export default {
         size: 'small',
         effect: 'light'
       })
-    },
+    }
   },
   data() {
     return {
@@ -64,19 +79,19 @@ export default {
       selectedData: []
     }
   },
+  computed: {
+    selectedLabels() {
+      return this.selectedData.map(t => t.fullName).join(',')
+    }
+  },
   watch: {
     value: {
-      handler: function (val) {
+      handler: function(val) {
         if (!val) return
         this.reloadCmpData()
       },
       immediate: true,
       deep: true
-    },
-  },
-  computed: {
-    selectedLabels() {
-      return this.selectedData.map(t => t.fullName).join(',')
     }
   },
   methods: {
@@ -88,16 +103,16 @@ export default {
       })
     },
     getText(id) {
-      let list = [], text = ''
+      let list = []; let text = ''
       if (this.type == 'position' || this.type == 'role') {
         list = this.$store.getters[this.type + 'List']
-        let arr = list.filter(o => o.id === id)
+        const arr = list.filter(o => o.id === id)
         if (!arr.length) return ''
         text = arr[0].fullName || ''
       }
       if (this.type == 'user') {
         list = this.$store.getters.userList
-        let arr = list.filter(o => o.id === id)
+        const arr = list.filter(o => o.id === id)
         if (!arr.length) return ''
         text = arr[0].realName && arr[0].account ? arr[0].realName + '/' + arr[0].account : ''
       }
@@ -165,4 +180,4 @@ export default {
     margin-bottom: 3px;
   }
 }
-</style>
+</style>

+ 29 - 14
src/components/Process/OrgTransfer/index.vue

@@ -1,15 +1,30 @@
 
 <template>
-  <el-dialog :title="title" :close-on-click-modal="false"
-    class="CCIT-dialog CCIT-dialog_center transfer-dialog" lock-scroll append-to-body
-    v-bind="$attrs" width="800px" :modal-append-to-body="false" v-on="$listeners" @open="onOpen">
-    <userTransfer v-model="selectedData" ref="userTransfer" multiple v-if="type==='user'" />
-    <roleTransfer v-model="selectedData" ref="roleTransfer" multiple v-else-if="type==='role'" />
-    <CCITTransfer :loading="loading" :treeData="treeData" v-model="selectedData" :type="type"
-      ref="CCITTransfer" v-else />
+  <el-dialog
+    :title="title"
+    :close-on-click-modal="false"
+    class="CCIT-dialog CCIT-dialog_center transfer-dialog"
+    lock-scroll
+    append-to-body
+    v-bind="$attrs"
+    width="800px"
+    :modal-append-to-body="false"
+    v-on="$listeners"
+    @open="onOpen"
+  >
+    <userTransfer v-if="type==='user'" ref="userTransfer" v-model="selectedData" multiple />
+    <roleTransfer v-else-if="type==='role'" ref="roleTransfer" v-model="selectedData" multiple />
+    <CCITTransfer
+      v-else
+      ref="CCITTransfer"
+      v-model="selectedData"
+      :loading="loading"
+      :tree-data="treeData"
+      :type="type"
+    />
     <span slot="footer" class="dialog-footer">
-      <el-button @click="closeTransfer">{{$t('common.cancelButton')}}</el-button>
-      <el-button type="primary" @click="confirm">{{$t('common.confirmButton')}}</el-button>
+      <el-button @click="closeTransfer">{{ $t('common.cancelButton') }}</el-button>
+      <el-button type="primary" @click="confirm">{{ $t('common.confirmButton') }}</el-button>
     </span>
   </el-dialog>
 </template>
@@ -20,7 +35,7 @@ import userTransfer from '@/components/CCIT-userTransfer'
 import roleTransfer from './roleTransfer'
 
 export default {
-  name: 'org-transfer',
+  name: 'OrgTransfer',
   components: { CCITTransfer, userTransfer, roleTransfer },
   props: {
     value: {
@@ -34,7 +49,7 @@ export default {
     title: {
       type: String,
       default: '组织机构'
-    },
+    }
   },
   data() {
     return {
@@ -57,7 +72,7 @@ export default {
     dataInit() {
       this.loading = true
       this.selectedData = []
-      this.$nextTick(async () => {
+      this.$nextTick(async() => {
         if (this.type === 'user') {
           this.selectedData = JSON.parse(JSON.stringify(this.value))
           this.$nextTick(() => {
@@ -69,7 +84,7 @@ export default {
             this.$refs.roleTransfer && this.$refs.roleTransfer.init()
           })
         } else {
-          let res = await this.$store.dispatch('base/getPositionTree')
+          const res = await this.$store.dispatch('base/getPositionTree')
           this.$refs.CCITTransfer && (this.$refs.CCITTransfer.filterText = '')
           this.treeData = res
           this.selectedData = this.value
@@ -79,4 +94,4 @@ export default {
     }
   }
 }
-</script>
+</script>

+ 62 - 45
src/components/Process/OrgTransfer/roleTransfer.vue

@@ -1,32 +1,50 @@
 <template>
-  <div class="transfer__body" v-loading="allLoading" :style="{height}">
+  <div v-loading="allLoading" class="transfer__body" :style="{height}">
     <div class="transfer-pane">
       <div class="transfer-pane__tools">
-        <el-input placeholder="输入关键词进行搜索" v-model="keyword" @keyup.enter.native="search" clearable>
-          <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
+        <el-input v-model="keyword" placeholder="输入关键词进行搜索" clearable @keyup.enter.native="search">
+          <el-button slot="append" icon="el-icon-search" @click="search" />
         </el-input>
       </div>
       <div class="transfer-pane__body">
         <el-tabs v-model="activeName" class="transfer-pane__body-tab">
           <el-tab-pane label="组织" name="organize">
-            <el-tree :data="treeData2" :props="props" ref="tree2" default-expand-all
-              :filter-node-method="filterNode" :expand-on-click-node="false" check-on-click-node
-              @node-click="handleNodeClick" class="CCIT-common-el-tree" node-key="onlyId"
-              v-loading="loading">
-              <span class="custom-tree-node" slot-scope="{ node,data }">
+            <el-tree
+              ref="tree2"
+              :data="treeData2"
+              :props="props"
+              default-expand-all
+              v-loading="loading"
+              :filter-node-method="filterNode"
+              :expand-on-click-node="false"
+              check-on-click-node
+              class="CCIT-common-el-tree"
+              node-key="onlyId"
+              @node-click="handleNodeClick"
+            >
+              <span slot-scope="{ node,data }" class="custom-tree-node">
                 <i :class="data.icon" />
-                <span class="text">{{node.label}}</span>
+                <span class="text">{{ node.label }}</span>
               </span>
             </el-tree>
           </el-tab-pane>
           <el-tab-pane label="全局" name="all">
-            <el-tree :data="treeData" :props="props" ref="tree1" default-expand-all
-              :filter-node-method="filterNode" :expand-on-click-node="false" check-on-click-node
-              @node-click="handleNodeClick" class="CCIT-common-el-tree" node-key="onlyId"
-              v-loading="loading">
-              <span class="custom-tree-node" slot-scope="{ node,data }">
+            <el-tree
+              ref="tree1"
+              :data="treeData"
+              :props="props"
+              default-expand-all
+              v-loading="loading"
+              :filter-node-method="filterNode"
+              :expand-on-click-node="false"
+              check-on-click-node
+              class="CCIT-common-el-tree"
+              node-key="onlyId"
+              @node-click="handleNodeClick"
+            >
+              <span slot-scope="{ node,data }" class="custom-tree-node">
                 <i :class="data.icon" />
-                <span class="text">{{node.label}}</span>
+                <span class="text">{{ node.label }}</span>
               </span>
             </el-tree>
           </el-tab-pane>
@@ -36,13 +54,13 @@
     <div class="transfer-pane">
       <div class="transfer-pane__tools">
         <span>已选</span>
-        <el-button @click="removeAll" type="text" class="removeAllBtn">清空列表</el-button>
+        <el-button type="text" class="removeAllBtn" @click="removeAll">清空列表</el-button>
       </div>
       <div class="transfer-pane__body shadow right-pane">
         <template>
           <div v-for="(item, index) in selectedData" :key=" index" class="selected-item">
-            <span>{{ item.fullName}}</span>
-            <i class="el-icon-delete" @click="removeData(index)"></i>
+            <span>{{ item.fullName }}</span>
+            <i class="el-icon-delete" @click="removeData(index)" />
           </div>
         </template>
       </div>
@@ -53,7 +71,25 @@
 <script>
 import { getRoleSelectorByPermission } from '@/api/permission/role'
 export default {
-  name: 'CCIT-roleTransfer',
+  name: 'CCITRoleTransfer',
+  props: {
+    height: {
+      type: String,
+      default: '380px'
+    },
+    value: {
+      type: Array,
+      default: () => []
+    },
+    multiple: {
+      type: Boolean,
+      default: false
+    },
+    auth: {
+      type: Boolean,
+      default: false
+    }
+  },
   data() {
     return {
       allLoading: false,
@@ -71,24 +107,6 @@ export default {
       ids: []
     }
   },
-  props: {
-    height: {
-      type: String,
-      default: "380px"
-    },
-    value: {
-      type: Array,
-      default: () => []
-    },
-    multiple: {
-      type: Boolean,
-      default: false
-    },
-    auth: {
-      type: Boolean,
-      default: false
-    },
-  },
   watch: {
     activeName(val) {
       this.keyword = ''
@@ -106,7 +124,7 @@ export default {
     getSelectList() {
       this.allLoading = true
       if (!this.value.length) return this.allLoading = false
-      let list = []
+      const list = []
       for (let i = 0; i < this.value.length; i++) {
         inner: for (let j = 0; j < this.allList.length; j++) {
           if (this.value[i] === this.allList[j].id) {
@@ -124,14 +142,14 @@ export default {
       this.$refs[tree].filter(this.keyword)
     },
     filterNode(value, data) {
-      if (!value) return true;
-      return data[this.props.label].indexOf(value) !== -1;
+      if (!value) return true
+      return data[this.props.label].indexOf(value) !== -1
     },
     getList() {
       this.loading = true
       if (this.auth) {
         getRoleSelectorByPermission().then(res => {
-          let list = res.data.list
+          const list = res.data.list
           this.treeData = list.filter(o => o.id === '1')
           this.treeData2 = list.filter(o => o.id !== '1')
           this.$store.dispatch('base/getRoleList').then(res => {
@@ -151,7 +169,6 @@ export default {
           })
         })
       }
-
     },
     handleNodeClick(data) {
       if (data.type !== 'role') return
@@ -177,9 +194,9 @@ export default {
       this.ids.splice(index, 1)
       this.$emit('input', this.ids)
       this.$emit('getValue', this.ids, this.selectedData)
-    },
+    }
   }
-};
+}
 </script>
 <style lang="scss" scoped>
 .transfer-pane__body-tab {
@@ -187,4 +204,4 @@ export default {
     width: 50% !important;
   }
 }
-</style>
+</style>

+ 31 - 31
src/components/Process/Preview.vue

@@ -1,6 +1,6 @@
 <script>
-import FlowCard from "./FlowCard/Preview";
-import { NodeUtils, getMockData } from "./FlowCard/util.js";
+import FlowCard from './FlowCard/Preview'
+import { NodeUtils, getMockData } from './FlowCard/util.js'
 
 export default {
   name: 'Process',
@@ -20,7 +20,7 @@ export default {
       activeData: null, // 被激活的流程卡片数据,用于属性面板编辑
       isProcessCmp: true,
       verifyMode: false
-    };
+    }
   },
   methods: {
     // 给父级组件提供的获取流程数据得方法
@@ -37,19 +37,19 @@ export default {
      * @param { Object } data - 含有event(事件名称)/args(参数)两个属性
      */
     eventReceiver({ event, args }) {
-      if (event === "edit") {
-        this.activeData = args[0]; // 打开属性面板
-        return;
+      if (event === 'edit') {
+        this.activeData = args[0] // 打开属性面板
+        return
       }
       // 本实例只监听了第一层数据(startNode)变动
       // 为了实时更新  采用$forceUpdate刷新 但是由于某些条件下触发失效(未排除清除原因)
       // 使用key + 监听父组件updateId方式强制刷新
-      NodeUtils[event](...args);
-      this.forceUpdate();
+      NodeUtils[event](...args)
+      this.forceUpdate()
     },
 
     forceUpdate() {
-      this.updateId = this.updateId + 1;
+      this.updateId = this.updateId + 1
     },
     /**
      * 控制流程图缩放
@@ -60,7 +60,7 @@ export default {
         if (this.scaleVal === 200 && this.scaleVal + val > 200) return
         if (this.scaleVal === 0 && this.scaleVal + val < 0) return
         // 缩放介于0%~200%
-        this.scaleVal += val;
+        this.scaleVal += val
       }
     },
     /**
@@ -69,27 +69,27 @@ export default {
      */
     onPropEditConfirm(value, content) {
       this.activeData.content = content || '请设置条件'
-      let oldProp = this.activeData.properties;
-      this.activeData.properties = value;
+      const oldProp = this.activeData.properties
+      this.activeData.properties = value
       // 修改优先级
       if (NodeUtils.isConditionNode(this.activeData)) {
-        value.priority !== oldProp.priority
-          && NodeUtils.resortPrioByCNode(
+        value.priority !== oldProp.priority &&
+          NodeUtils.resortPrioByCNode(
             this.activeData,
             oldProp.priority,
             this.data
-          );
+          )
         NodeUtils.setDefaultCondition(this.activeData, this.data)
       }
       if (NodeUtils.isStartNode(this.activeData)) this.$emit('startNodeChange', this.data)
-      this.onClosePanel();
-      this.forceUpdate();
+      this.onClosePanel()
+      this.forceUpdate()
     },
     /**
      * 属性面板取消事件
      */
     onClosePanel() {
-      this.activeData = null;
+      this.activeData = null
     },
 
     // 传formIds 查询指定组件 未传时  判断所有组件
@@ -113,20 +113,20 @@ export default {
       return res
     }
   },
-  render: function (h) {
+  render: function(h) {
     return (
-      <div class="flow-container flow-container-preview">
-        <div class="scale-slider">
-          <i class="btn el-icon-minus"
+      <div class='flow-container flow-container-preview'>
+        <div class='scale-slider'>
+          <i class='btn el-icon-minus'
             onClick={this.changeScale.bind(this, -this.step)}></i>
-          <span style="font-size:14px;">{this.scaleVal}%</span>
-          <i class="btn el-icon-plus"
+          <span style='font-size:14px;'>{this.scaleVal}%</span>
+          <i class='btn el-icon-plus'
             onClick={this.changeScale.bind(this, this.step)}></i>
         </div>
-        <div class="tips">
-          <div class="tips-item"><span class="icon success">●</span>已完成</div>
-          <div class="tips-item"><span class="icon current">●</span>进行中</div>
-          <div class="tips-item"><span class="icon">●</span>无/未处理</div>
+        <div class='tips'>
+          <div class='tips-item'><span class='icon success'>●</span>已完成</div>
+          <div class='tips-item'><span class='icon current'>●</span>进行中</div>
+          <div class='tips-item'><span class='icon'>●</span>无/未处理</div>
         </div>
         <FlowCard
           verifyMode={this.verifyMode}
@@ -136,9 +136,9 @@ export default {
           style={{ transform: `scale(${this.scaleVal / 100})` }}
         />
       </div>
-    );
+    )
   }
-};
+}
 </script>
 
 <style scoped lang="scss">
@@ -256,4 +256,4 @@ $bg-color: #fff;
     }
   }
 }
-</style>
+</style>

+ 51 - 57
src/components/Process/PropPanel/components/index.vue

@@ -1,21 +1,20 @@
 
-
 <template>
   <span>
     <!-- 操作符 字典下拉 -->
     <span v-if="dataType == 'dict'">
       <!-- <span>11111111111</span> -->
       <el-select
+        v-model="data"
         placeholder="选择值字典"
         class="select"
         size="mini"
         @change="onDataChange"
-        v-model="data"
       >
         <el-option
           v-for="d in dict"
-          :label="d.dictLabel"
           :key="d.dictValue"
+          :label="d.dictLabel"
           :value="d.dictValue"
         >
           {{ d.dictLabel }}
@@ -27,22 +26,21 @@
     <span v-if="dataType == 'standard'">
       <!-- <span>111111111</span> -->
       <el-select
+        v-model="data"
+        v-loadmore="loadmore"
         placeholder="选择值叙述"
         class="select ronin-select"
-        v-loadmore="loadmore"
         size="mini"
         filterable
-        @focus='onSelectFous'
         :filter-method="
           (val) => {
             return onSelectChange(val);
           }
         "
+        @focus="onSelectFous"
         @change="onDataChange"
-        v-model="data"
       >
-        <el-option v-for="d in dict" :label="d.name" :key="d.id" :value="d.id">
-        </el-option>
+        <el-option v-for="d in dict" :key="d.id" :label="d.name" :value="d.id" />
       </el-select>
     </span>
 
@@ -50,52 +48,51 @@
     <span v-if="dataType == 'none'">
       <el-input
         v-if="dataTypeTop == 's' || dataTypeTop == 't'"
-        @change="onDataChange"
         v-model="data"
         style="width: 90px"
         size="mini"
-      ></el-input>
+        @change="onDataChange"
+      />
 
       <el-input-number
-        @change="onDataChange"
+        v-if="dataTypeTop == 'd'"
         v-model="data"
         size="mini"
         controls-position="right"
-        v-if="dataTypeTop == 'd'"
-      ></el-input-number>
-      <el-input-number
         @change="onDataChange"
+      />
+      <el-input-number
+        v-if="dataTypeTop == 'i'"
         v-model="data"
         controls-position="right"
         :step="1"
         step-strictly
-        v-if="dataTypeTop == 'i'"
-      ></el-input-number>
+        @change="onDataChange"
+      />
 
       <el-date-picker
         v-if="dataTypeTop == 'dt'"
-        @change="onDataChange"
         v-model="data"
         type="date"
         class="select"
         format="yyyy-MM-dd"
         value-format="yyyy-MM-dd"
         placeholder="选择日期"
-      >
-      </el-date-picker>
+        @change="onDataChange"
+      />
 
       <el-select
-        placeholder="选择值字典"
         v-if="dataTypeTop == 'dict'"
+        v-model="data"
+        placeholder="选择值字典"
         class="select"
         size="mini"
         @change="onDataChange"
-        v-model="data"
       >
         <el-option
           v-for="d in dict"
-          :label="d.dictLabel"
           :key="d.dictValue"
+          :label="d.dictLabel"
           :value="d.dictValue"
         >
           {{ d.dictLabel }}
@@ -110,67 +107,64 @@ export default {
   props: {
     dataType: {
       type: String,
-      default: "",
+      default: ''
     },
     dataTypeTop: {
       type: String,
-      default: "",
+      default: ''
     },
     dict: {
-      default: [],
+      default: []
     },
-    value:{
+    value: {
 
     }
   },
+  data() {
+    return {
+      data: '',
+      page: 1,
+      searchVal: ''
+    }
+  },
 
   watch: {
     value: {
-     
-       handler(val) {
-                
 
-                   this.data = val;
-                
-            },
-            deep: true,
-            immediate: true
+      handler(val) {
+        this.data = val
+      },
+      deep: true,
+      immediate: true
 
       // this.getCreateValue();
-    },
-  },
-  data() {
-    return {
-        data:'',
-        page:1,
-        searchVal:''
-    };
+    }
   },
   methods: {
     onDataChange(e) {
-      this.$emit("input", e);
-      this.$emit("change", e);
+      this.$emit('input', e)
+      this.$emit('change', e)
     },
 
-    onSelectChange(e){
+    onSelectChange(e) {
       this.searchVal = e
-      this.$emit('search',e)
+      this.$emit('search', e)
     },
-    onSelectFous(){
+    onSelectFous() {
       // this.page=1
       this.searchVal = ''
     },
-    loadmore(){
-      this.page++ 
-     
-      let req= {
-        page:this.page,
-        name:this.searchVal
+    loadmore() {
+      this.page++
+
+      const req = {
+        page: this.page,
+        name: this.searchVal
       }
       //  console.log('我去掉下拉加载了',req)
-      this.$emit('loadmore',req)
+      this.$emit('loadmore', req)
     }
 
-  },
-};
-</script>
+  }
+}
+</script>

+ 257 - 261
src/components/Process/PropPanel/condition - 副本.vue

@@ -3,15 +3,15 @@
     <!-- 第一层 -->
     <div class="data-box">
       <el-select
+        v-model="item.ynType"
         placeholder="选择类型"
         class="select"
         size="mini"
-        v-model="item.ynType"
       >
         <el-option
           v-for="d in type"
-          :label="d.dictLabel"
           :key="d.dictValue"
+          :label="d.dictLabel"
           :value="d.dictValue"
         >
           {{ d.dictLabel }}
@@ -19,6 +19,7 @@
       </el-select>
 
       <CCITTreeSelect
+        v-model="item.mdType"
         class="tree-select"
         width="200"
         :options="ruleType"
@@ -28,37 +29,36 @@
           children: 'children', // 子级字段名
         }"
         size="mini"
-        v-model="item.mdType"
         @change="mdTypeChange($event)"
-      ></CCITTreeSelect>
+      />
 
       <roninSelect
-        v-model="item.mdCode"
         v-if="!isSpecial"
+        v-model="item.mdCode"
         class="select"
         placeholder="请选择"
-        :dataList="scalesOptions"
+        :data-list="scalesOptions"
         :keeps="30"
-        :estimateSize="32"
-        @ListChange="onListChange"
-        @change="handleChangeScales($event)"
+        :estimate-size="32"
         :page="page"
         :total="total"
-        :moreDataType="moreDataType"
-      ></roninSelect>
+        :more-data-type="moreDataType"
+        @ListChange="onListChange"
+        @change="handleChangeScales($event)"
+      />
 
       <el-select
-        placeholder="选择结果分类"
-        @change="resultTypeChange"
         v-if="resultType && resultType.length > 0"
+        v-model="item.op"
+        placeholder="选择结果分类"
         class="select"
         size="mini"
-        v-model="item.op"
+        @change="resultTypeChange"
       >
         <el-option
           v-for="d in resultType"
-          :label="d.name"
           :key="d.key"
+          :label="d.name"
           :value="d.key"
         >
           {{ d.name }}
@@ -67,19 +67,18 @@
 
       <!-- 二级操作符 -->
       <el-select
+        v-if="item.op == 'result_narrate'"
+        v-model="item.opChild"
         placeholder="二级操作符"
         class="select"
-        v-if="item.op == 'result_narrate'"
         size="mini"
-        v-model="item.opChild"
       >
         <el-option
           v-for="d in opOptions"
-          :label="d.label"
           :key="d.value"
+          :label="d.label"
           :value="d.value"
-        >
-        </el-option>
+        />
       </el-select>
 
       <!-- 区间 -->
@@ -89,14 +88,14 @@
           style="width: 90px"
           size="mini"
           placeholder="左区间"
-        ></el-input>
+        />
         <span> - </span>
         <el-input
           v-model="item.ovalTwo"
           style="width: 90px"
           size="mini"
           placeholder="右区间"
-        ></el-input>
+        />
       </span>
       <!-- 上升 下降 -->
       <span v-if="(item.op == 'rise' || item.op == 'decline')&& !item.dateType">
@@ -120,7 +119,7 @@
             item.op == 'ge' ||
             item.op == 'lt' ||
             item.op == 'le') &&
-          !item.dateType
+            !item.dateType
         "
       >
         <el-input
@@ -128,12 +127,12 @@
           v-model="item.oval"
           style="width: 90px"
           size="mini"
-        ></el-input>
+        />
 
         <el-input-number
-          v-model="item.oval"
           v-if="item.rawType == 'i' || item.rawType == 'd'"
-        ></el-input-number>
+          v-model="item.oval"
+        />
 
         <el-date-picker
           v-if="item.rawType == 'dt'"
@@ -143,22 +142,21 @@
           format="yyyy-MM-dd"
           value-format="yyyy-MM-dd"
           placeholder="选择日期"
-        >
-        </el-date-picker>
+        />
       </span>
 
       <!-- 操作符 字典下拉 -->
       <span v-if="dataType == 'dict'">
         <el-select
+          v-model="item.oval"
           placeholder="选择值字典"
           class="select"
           size="mini"
-          v-model="item.oval"
         >
           <el-option
             v-for="d in dict"
-            :label="d.dictLabel"
             :key="d.dictValue"
+            :label="d.dictLabel"
             :value="d.dictValue"
           >
             {{ d.dictLabel }}
@@ -169,9 +167,10 @@
       <!-- 操作符 叙述结果 -->
       <span v-if="dataType == 'standard'">
         <el-select
+          v-if="item.op"
+          v-model="item.ovalMany"
           placeholder="选择值叙述"
           class="select ronin-select"
-          v-if="item.op"
           multiple
           size="mini"
           filterable
@@ -180,40 +179,38 @@
               return onSelectChange(val, item);
             }
           "
-          v-model="item.ovalMany"
         >
           <el-option
             v-for="d in dict"
-            :label="d.name"
             :key="d.id"
+            :label="d.name"
             :value="d.id"
-          >
-          </el-option>
+          />
         </el-select>
       </span>
 
       <!-- 操作符 输入框  -->
       <span v-if="dataType == 'none'">
-      
+
         <el-input
           v-if="dataTypeTop == 's' || dataTypeTop == 't'"
           v-model="item.oval"
           style="width: 90px"
           size="mini"
-        ></el-input>
+        />
 
         <el-input-number
+          v-if="dataTypeTop == 'd'"
           v-model="item.oval"
           controls-position="right"
-          v-if="dataTypeTop == 'd'"
-        ></el-input-number>
+        />
         <el-input-number
+          v-if="dataTypeTop == 'i'"
           v-model="item.oval"
           controls-position="right"
           :step="1"
           step-strictly
-          v-if="dataTypeTop == 'i'"
-        ></el-input-number>
+        />
 
         <el-date-picker
           v-if="dataTypeTop == 'dt'"
@@ -223,20 +220,19 @@
           format="yyyy-MM-dd"
           value-format="yyyy-MM-dd"
           placeholder="选择日期"
-        >
-        </el-date-picker>
+        />
 
         <el-select
-          placeholder="选择值字典"
           v-if="dataTypeTop == 'dict'"
+          v-model="item.oval"
+          placeholder="选择值字典"
           class="select"
           size="mini"
-          v-model="item.oval"
         >
           <el-option
             v-for="d in dict"
-            :label="d.dictLabel"
             :key="d.dictValue"
+            :label="d.dictLabel"
             :value="d.dictValue"
           >
             {{ d.dictLabel }}
@@ -246,71 +242,72 @@
 
       <a
         v-if="item.restriction != 'Y'"
-        @click="onClickType(true)"
         class="add-name"
-        >添加条件限制</a
-      >
+        @click="onClickType(true)"
+      >添加条件限制</a>
 
-      <a v-else class="add-name span-name-del" @click="onClickType(false)"
-        >删除数据条件</a
-      >
+      <a
+        v-else
+        class="add-name span-name-del"
+        @click="onClickType(false)"
+      >删除数据条件</a>
     </div>
     <!-- 第二层 -->
     <div v-if="item.restriction == 'Y'" class="more">
       <span class="span-name">数据有效时间方式:</span>
       <el-select
+        v-model="item.dtRangeType"
         placeholder="时间类型"
         class="select"
         size="mini"
         clearable
-        v-model="item.dtRangeType"
         @change="onDateTypeChange"
       >
-        <el-option label="按固定日期" value="absolute"></el-option>
-        <el-option label="数据时间范围" value="relative"></el-option>
+        <el-option label="按固定日期" value="absolute" />
+        <el-option label="数据时间范围" value="relative" />
       </el-select>
       <span v-if="item.dtRangeType == 'relative'">
         <span class="span-name">数据有效范围从前 </span>
 
         <el-input-number
+          v-model="item.dtLimitStart"
           size="mini"
           clearable
           controls-position="right"
           class="select"
-          v-model="item.dtLimitStart"
           :min="0"
           :max="1000"
           style="width: 120px"
           label="选择时间"
-        ></el-input-number>
+        />
 
         <span class="span-name">至</span>
 
         <el-input-number
+          v-model="item.dtLimitEnd"
           size="mini"
           clearable
           controls-position="right"
           class="select"
-          v-model="item.dtLimitEnd"
           :min="0"
           :max="1000"
           style="width: 120px"
           label="选择时间"
-        ></el-input-number>
+        />
 
         <el-select
+          v-model="item.dtLimitUnit"
           placeholder="时间单位"
           class="select"
           size="mini"
           style="width: 80px"
-          v-model="item.dtLimitUnit"
         >
           <el-option
             v-for="d in timeType"
-            :label="d.dictLabel"
             :key="d.dictValue"
+            :label="d.dictLabel"
             :value="d.dictValue"
-          ></el-option>
+          />
         </el-select>
       </span>
 
@@ -326,8 +323,7 @@
           clearable
           :picker-options="pickerOptionsStar"
           @focus="checkStarttimeStar"
-        >
-        </el-date-picker>
+        />
 
         <span class="span-name">结束时间:</span>
         <el-date-picker
@@ -336,15 +332,14 @@
           class="select"
           format="yyyy-MM-dd"
           :picker-options="pickerOptions"
-          @focus="checkStarttime"
           clearable
           value-format="yyyy-MM-dd"
           placeholder="选择日期"
-        >
-        </el-date-picker>
+          @focus="checkStarttime"
+        />
       </span>
 
-      <br />
+      <br>
       <span class="span-name">任意条件次数:</span>
       <!-- <el-select
         placeholder="次数"
@@ -362,14 +357,14 @@
       </el-select> -->
 
       <el-input-number
+        v-model="item.rytjNum"
         size="mini"
         controls-position="right"
         class="select"
-        v-model="item.rytjNum"
         :min="1"
         :max="1000"
         label="次数"
-      ></el-input-number>
+      />
 
       <span class="span-name">连续满足几次:</span>
 
@@ -389,14 +384,14 @@
         >
       </el-select> -->
       <el-input-number
+        v-model="item.lxtjNum"
         size="mini"
         controls-position="right"
         class="select"
-        v-model="item.lxtjNum"
         :min="1"
         :max="1000"
         label="次数"
-      ></el-input-number>
+      />
 
       <span class="span-name">数据来源科室:</span>
 
@@ -410,13 +405,13 @@
         <el-option value="N" label="未就诊科室"></el-option>
       </el-select> -->
       <CCITTreeSelect
+        v-model="item.deptCodes"
         class="tree-select"
         :options="treeData"
         size="mini"
         multiple
-        v-model="item.deptCodes"
         @change="deptChange"
-      ></CCITTreeSelect>
+      />
 
       <!-- <span class="span-name">部门类型:</span> -->
     </div>
@@ -438,194 +433,194 @@
 </template>
 
 <script>
-import { listByType, dataPageType } from "@/api/rule/index";
-import { getDict, getDicts } from "@/utils/index";
-import roninSelect from "@/components/RONIN-select/index.vue";
-let that;
+import { listByType, dataPageType } from '@/api/rule/index'
+import { getDict, getDicts } from '@/utils/index'
+import roninSelect from '@/components/RONIN-select/index.vue'
+let that
 export default {
   components: { roninSelect },
-  props: ["item", "treeData", "childData"],
+  filters: {
+    filterTimeType(e) {
+      let name = e
+      if (that && that.timeType && that.timeType.length > 0) {
+        that.timeType.forEach((item) => {
+          if (item.dictValue == e) {
+            name = item.dictLabel
+          }
+        })
+      }
+
+      return name
+    }
+  },
+  props: ['item', 'treeData', 'childData'],
   data() {
     return {
       scalesOptions: [],
       opOptions: [
         {
-          label: "包含(所有)",
-          value: "contain",
+          label: '包含(所有)',
+          value: 'contain'
         },
         {
-          label: "不包含(所有)",
-          value: "not_contain",
+          label: '不包含(所有)',
+          value: 'not_contain'
         },
 
         {
-          label: "包含(任一)",
-          value: "contain_any",
+          label: '包含(任一)',
+          value: 'contain_any'
         },
 
         {
-          label: "不包含(任一)",
-          value: "not_contain_any",
-        },
+          label: '不包含(任一)',
+          value: 'not_contain_any'
+        }
       ],
 
       type: [],
-      sampleType: [], //样本类型
+      sampleType: [], // 样本类型
       resultType: [],
 
-      radio: "1",
-      dict: [], //字典
+      radio: '1',
+      dict: [], // 字典
       isMore: false,
       dept: [],
       timeType: [],
       ruleType: [],
-      dataTypeTop: "", //标准数据的类型
-      dataType: "", //操作符 的dataType (dict字典,standard标准业务码表,none输入 )
-      standardVal: [], //叙述结果下拉
+      dataTypeTop: '', // 标准数据的类型
+      dataType: '', // 操作符 的dataType (dict字典,standard标准业务码表,none输入 )
+      standardVal: [], // 叙述结果下拉
       dateTime: [],
       pickerOptions: {},
       pickerOptionsStar: {},
       isSpecial: false,
       page: 1,
       total: 0,
-      moreDataType: "", //加载更多参数
-    };
-  },
-  filters: {
-    filterTimeType(e) {
-      let name = e;
-      if (that && that.timeType && that.timeType.length > 0) {
-        that.timeType.forEach((item) => {
-          if (item.dictValue == e) {
-            name = item.dictLabel;
-          }
-        });
-      }
-
-      return name;
-    },
+      moreDataType: '' // 加载更多参数
+    }
   },
 
   watch: {
     childData: {
-      handler: function (val) {
-        this.upDateData();
+      handler: function(val) {
+        this.upDateData()
       },
       deep: true,
-      immediate: true,
-    },
+      immediate: true
+    }
   },
 
   mounted() {
-    that = this;
-    this.upDateData();
-    let obj = {};
+    that = this
+    this.upDateData()
+    const obj = {}
   },
   methods: {
     checkStarttimeStar() {
-      let startime = this.item.dtLimitEnd; // 取到起始时间选中的值
+      const startime = this.item.dtLimitEnd // 取到起始时间选中的值
       this.pickerOptionsStar = Object.assign({}, this.pickerOptionsStar, {
         disabledDate: (time) => {
-          const today = new Date().toLocaleDateString(); // 当天时间转换成日期格式
-          //禁用这一天的日期  如需禁用之前之后,可把=== 替换成 > 或 <
-          let disable = time === new Date(today);
-          disable = disable || time.getTime() > new Date(startime).getTime(); //(减去一天-8.64e7)
-          return disable;
-        },
-      });
+          const today = new Date().toLocaleDateString() // 当天时间转换成日期格式
+          // 禁用这一天的日期  如需禁用之前之后,可把=== 替换成 > 或 <
+          let disable = time === new Date(today)
+          disable = disable || time.getTime() > new Date(startime).getTime() // (减去一天-8.64e7)
+          return disable
+        }
+      })
     },
     checkStarttime() {
-      let startime = this.item.dtLimitStart; // 取到起始时间选中的值
+      const startime = this.item.dtLimitStart // 取到起始时间选中的值
       this.pickerOptions = Object.assign({}, this.pickerOptions, {
         disabledDate: (time) => {
-          const today = new Date().toLocaleDateString(); // 当天时间转换成日期格式
-          //禁用这一天的日期  如需禁用之前之后,可把=== 替换成 > 或 <
-          let disable = time === new Date(today);
-          disable = disable || time.getTime() < new Date(startime).getTime(); //(减去一天-8.64e7)
-          return disable;
-        },
-      });
+          const today = new Date().toLocaleDateString() // 当天时间转换成日期格式
+          // 禁用这一天的日期  如需禁用之前之后,可把=== 替换成 > 或 <
+          let disable = time === new Date(today)
+          disable = disable || time.getTime() < new Date(startime).getTime() // (减去一天-8.64e7)
+          return disable
+        }
+      })
     },
 
-    //选择叙述结果
+    // 选择叙述结果
     standardChange(e) {
-      let val = "";
+      let val = ''
       e.forEach((item) => {
-        val += item + ",";
-      });
-      val = val.slice(0, val.length - 1);
-      this.item.ovalMany = val;
+        val += item + ','
+      })
+      val = val.slice(0, val.length - 1)
+      this.item.ovalMany = val
     },
     onDateTypeChange() {
-      this.item.dtLimitStart = "";
-      this.item.dtLimitEnd = "";
-      this.dateTime = [];
+      this.item.dtLimitStart = ''
+      this.item.dtLimitEnd = ''
+      this.dateTime = []
     },
     onDatePickChange(e) {
-      this.item.dtLimitStart = e[0];
-      this.item.dtLimitEnd = e[1];
+      this.item.dtLimitStart = e[0]
+      this.item.dtLimitEnd = e[1]
     },
     upDateData() {
       if (this.childData.dict) {
-        this.ruleType = this.childData.dict["rule_prop_type"] || [];
-        this.type = this.childData.dict["role_condition_type"] || [];
-        this.timeType = this.childData.dict["date_limit_unit"] || [];
+        this.ruleType = this.childData.dict['rule_prop_type'] || []
+        this.type = this.childData.dict['role_condition_type'] || []
+        this.timeType = this.childData.dict['date_limit_unit'] || []
       }
     },
     reset() {
-      this.dateTime = [];
-      this.dataType = "";
+      this.dateTime = []
+      this.dataType = ''
     },
     async init() {
-      this.reset();
+      this.reset()
       // 初始化时间
-      if (this.item.dtRangeType == "absolute" && this.item.dtLimitStart) {
-        this.dateTime = [this.item.dtLimitStart, this.item.dtLimitEnd];
+      if (this.item.dtRangeType == 'absolute' && this.item.dtLimitStart) {
+        this.dateTime = [this.item.dtLimitStart, this.item.dtLimitEnd]
       }
       if (this.item.mdType && this.childData.type[this.item.mdType]) {
-        this.scalesOptions = this.childData.type[this.item.mdType].list;
-        this.moreDataType = this.item.mdType;
-        this.page = 1;
-        this.total = this.childData.type[this.item.mdType].total;
-        this.isSpecialType();
+        this.scalesOptions = this.childData.type[this.item.mdType].list
+        this.moreDataType = this.item.mdType
+        this.page = 1
+        this.total = this.childData.type[this.item.mdType].total
+        this.isSpecialType()
       }
 
       if (this.item.mdCode) {
-        this.handleChangeScales(this.item.mdCode, true);
+        this.handleChangeScales(this.item.mdCode, true)
       }
 
       if (this.item.op) {
-        this.resultTypeChange(this.item.op, true,this.item);
+        this.resultTypeChange(this.item.op, true, this.item)
       }
     },
     mdTypeChange(e) {
-      this.item.mdCode = "";
-      this.item.sampleCode = "";
-      this.item.op = "";
-      this.item.oval = "";
-      this.item.ovalTwo = "";
-      this.item.ovalMany = [];
-      this.item.opChild = "";
-      this.dataType = "";
-
-      this.sampleCode = "";
-      this.sampleType = [];
-      this.resultType = [];
-      this.dict = [];
-      this.scalesOptions = [];
-      console.log("我走了11111111", this.childData, e);
-      this.dataTypeTop = ""; // 标准数据的类型
+      this.item.mdCode = ''
+      this.item.sampleCode = ''
+      this.item.op = ''
+      this.item.oval = ''
+      this.item.ovalTwo = ''
+      this.item.ovalMany = []
+      this.item.opChild = ''
+      this.dataType = ''
+
+      this.sampleCode = ''
+      this.sampleType = []
+      this.resultType = []
+      this.dict = []
+      this.scalesOptions = []
+      console.log('我走了11111111', this.childData, e)
+      this.dataTypeTop = '' // 标准数据的类型
       if (this.childData.type[e]) {
-        this.scalesOptions = this.childData.type[e].list || [];
-        this.moreDataType = e;
-        this.page = 1;
-        this.total = this.childData.type[e].total;
+        this.scalesOptions = this.childData.type[e].list || []
+        this.moreDataType = e
+        this.page = 1
+        this.total = this.childData.type[e].total
       } else {
-        this.scalesOptions = [];
-        this.total = 0;
+        this.scalesOptions = []
+        this.total = 0
       }
 
-      this.isSpecialType();
+      this.isSpecialType()
 
       // listByType({ type: e }).then((res) => {
       //   if(res.code == '0' && res.data){
@@ -636,175 +631,176 @@ export default {
     },
     // 检验是否是特殊类型,
     isSpecialType() {
-      this.isSpecial = false;
+      this.isSpecial = false
       if (this.scalesOptions && this.scalesOptions.length == 1) {
         if (!this.scalesOptions[0].id) {
-          this.isSpecial = true;
-          let arr = [];
+          this.isSpecial = true
+          const arr = []
           this.scalesOptions[0].resultTypeList.forEach((item) => {
-            if (item.scope == "all" || item.scope == this.item.dateType)
+            if (item.scope == 'all' || item.scope == this.item.dateType) {
               arr.push({
                 name: item.name,
                 key: item.code,
                 dataType: item.dataType,
-                dataContentType: item.dataContentType,
-              });
-          });
+                dataContentType: item.dataContentType
+              })
+            }
+          })
 
-          this.resultType = arr;
+          this.resultType = arr
         }
       }
     },
     onListChange(item) {
       // this.scalesOptions = JSON.parse(JSON.stringify(data))
-      let add = true;
+      let add = true
       this.scalesOptions.forEach((e) => {
         if (e.id == item.id) {
-          add = false;
+          add = false
         }
-      });
+      })
       if (add) {
-        this.scalesOptions.push(item);
+        this.scalesOptions.push(item)
       }
-      this.childData.type[this.item.mdType].list = this.scalesOptions;
+      this.childData.type[this.item.mdType].list = this.scalesOptions
     },
     handleChangeScales(e, boolen) {
-      this.resultType = [];
+      this.resultType = []
       this.scalesOptions.forEach((item) => {
         //  console.log(item,'1245678999')
         if (item.id == e) {
-          this.dataTypeTop = item.dataType;
-          console.log(e, item, "1245678999");
-          this.item.mdName = item.name;
-          this.item.rawType = item.dataType;
-          this.item.sampleCode = item.sampleId || "";
+          this.dataTypeTop = item.dataType
+          console.log(e, item, '1245678999')
+          this.item.mdName = item.name
+          this.item.rawType = item.dataType
+          this.item.sampleCode = item.sampleId || ''
           this.sampleType = [
-            { name: item.sampleName || "--无--", key: item.sampleId || "" },
-          ];
+            { name: item.sampleName || '--无--', key: item.sampleId || '' }
+          ]
 
           if (item.resultTypeList) {
-            let arr1 = [];
+            const arr1 = []
             item.resultTypeList.forEach((ele) => {
-              if (ele.scope == "all" || ele.scope == this.item.dateType) {
+              if (ele.scope == 'all' || ele.scope == this.item.dateType) {
                 arr1.push({
                   name: ele.name,
                   key: ele.code,
                   dataType: ele.dataType,
-                  dataContentType: ele.dataContentType,
-                });
+                  dataContentType: ele.dataContentType
+                })
               }
-            });
+            })
 
-            this.resultType = arr1;
-            console.log(this.resultType, "下拉框");
+            this.resultType = arr1
+            console.log(this.resultType, '下拉框')
           }
 
           if (this.item.op) {
-            this.resultTypeChange(this.item.op, true,this.item);
+            this.resultTypeChange(this.item.op, true, this.item)
           }
 
           if (!boolen) {
-            this.item.sampleCode = "";
-            this.item.op = "";
-            this.item.oval = "";
-            this.item.ovalTwo = "";
-            this.item.ovalMany = [];
+            this.item.sampleCode = ''
+            this.item.op = ''
+            this.item.oval = ''
+            this.item.ovalTwo = ''
+            this.item.ovalMany = []
 
-            this.dict = [];
+            this.dict = []
           }
         }
-      });
+      })
     },
     deptChange(e, data) {
-      console.log(e, data);
-      this.item.deptName = data.name;
+      console.log(e, data)
+      this.item.deptName = data.name
     },
     sampleChange(e) {
       this.sampleType.forEach((ele) => {
-        if (ele.key == "e") {
-          this.item.sampleName = ele.name;
+        if (ele.key == 'e') {
+          this.item.sampleName = ele.name
         }
-      });
+      })
     },
 
-    resultTypeChange(e, type,data) {
+    resultTypeChange(e, type, data) {
       if (!type) {
-        this.item.oval = "";
-        this.item.ovalTwo = "";
+        this.item.oval = ''
+        this.item.ovalTwo = ''
       }
-      let arrItem = {};
-      console.log(this.resultType, e, "显示数据111");
+      let arrItem = {}
+      console.log(this.resultType, e, '显示数据111')
       this.resultType.forEach((item) => {
         if (item.key == e) {
-          arrItem = item;
+          arrItem = item
         }
-      });
+      })
       // console.log(1, e, arrItem, this.resultType);
-      this.dataType = arrItem.dataType;
+      this.dataType = arrItem.dataType
 
-      if (arrItem.dataType == "dict") {
+      if (arrItem.dataType == 'dict') {
         // 缓存字典
         if (!this.childData.dict[arrItem.dataContentType]) {
           getDict(arrItem.dataContentType).then((res) => {
-            this.dict = res;
-            let data = JSON.parse(JSON.stringify(this.childData.dict));
-            data[e] = res;
-            this.childData.dict = data;
-          });
+            this.dict = res
+            const data = JSON.parse(JSON.stringify(this.childData.dict))
+            data[e] = res
+            this.childData.dict = data
+          })
         } else {
-          this.dict = this.childData.dict[e];
+          this.dict = this.childData.dict[e]
         }
       }
-      //叙述结果
-      if (arrItem.dataType == "standard") {
-        console.log(data,'1111111111111')
-        let req ={
+      // 叙述结果
+      if (arrItem.dataType == 'standard') {
+        console.log(data, '1111111111111')
+        const req = {
           type: arrItem.dataContentType
         }
-        if(data && data.ovalMany){
+        if (data && data.ovalMany) {
           req.ids = data.ovalMany
         }
         dataPageType(req).then((res) => {
-          if (res.code == "0" && res.data) {
-            this.dict = res.data.list;
+          if (res.code == '0' && res.data) {
+            this.dict = res.data.list
           }
-        });
+        })
       }
     },
 
     onSelectChange(e, data) {
       // console.log(e,data,'111111111搜索')
-      let arrItem = {};
+      let arrItem = {}
       this.resultType.forEach((item) => {
         if (item.key == data.op) {
-          arrItem = item;
+          arrItem = item
         }
-      });
+      })
 
       dataPageType({ type: arrItem.dataContentType, keywords: e }).then(
         (res) => {
-          if (res.code == "0" && res.data) {
-            this.dict = res.data.list;
+          if (res.code == '0' && res.data) {
+            this.dict = res.data.list
           }
         }
-      );
+      )
     },
 
     onChange() {
-      this.$forceUpdate();
+      this.$forceUpdate()
     },
 
     onClickType(t) {
       if (t) {
-        this.item.restriction = "Y";
-        this.$forceUpdate();
+        this.item.restriction = 'Y'
+        this.$forceUpdate()
       } else {
-        this.item.restriction = "N";
-        this.$forceUpdate();
+        this.item.restriction = 'N'
+        this.$forceUpdate()
       }
-    },
-  },
-};
+    }
+  }
+}
 </script>
 
 <style lang='scss' scoped>
@@ -872,7 +868,7 @@ export default {
     .el-select__tags-text{
       max-width: 110px;
       white-space: wrap;
-      
+
     }
   }
 }

Разница между файлами не показана из-за своего большого размера
+ 323 - 333
src/components/Process/PropPanel/condition.vue


+ 163 - 170
src/components/Process/PropPanel/index.vue

@@ -1,109 +1,109 @@
 
 <template>
   <el-drawer
+    v-if="properties"
     size="1300px"
     class="drawer CCIT-common-drawer"
     :visible.sync="visible"
-    @close="cancel"
-    v-if="properties"
     append-to-body
-    :wrapperClosable="false"
+    :wrapper-closable="false"
+    @close="cancel"
   >
     <!-- 标题 -->
-    <header slot="title" class="header" v-if="value">
+    <header v-if="value" slot="title" class="header">
       <span
         style="
           font-size: 14px;
           width: 90px;
           display: inline-block;
           margin-left: 10px;
-          color: #000;">标题:</span>
+          color: #000;"
+      >标题:</span>
       <el-input
-        size="mini"
         v-model="value.properties.title"
+        size="mini"
         style="z-index: 9; max-width: 200px"
         placeholder="请输入"
-      >
-      </el-input>
+      />
     </header>
 
     <div class="ronin-drawer">
       <div class="ronin-method-box">
         <span class="ronin-method-name">节点描述:</span>
         <el-input
+          v-model="value.content"
           type="textarea"
           style="flex: 1; margin-right: 122px"
-          v-model="value.content"
           placeholder="请输入引用数据类型"
         />
       </div>
 
-      <div class="ronin-method-box" v-if="value.type != 'approver'">
+      <div v-if="value.type != 'approver'" class="ronin-method-box">
         <span class="ronin-method-name">条件类型:</span>
         <el-select
-          placeholder="选择分类"
-           style="width: 180px"
           v-model="value.properties.ruleType"
+          placeholder="选择分类"
+          style="width: 180px"
           @change="onTypeChnage"
         >
-          <el-option label="条件属性节点" value="condition"
-            >条件属性节点</el-option
-          >
+          <el-option
+            label="条件属性节点"
+            value="condition"
+          >条件属性节点</el-option>
           <!-- <el-option value="conditionFn" label="条件方法节点"
             >条件方法节点</el-option
           > -->
           <el-option
+            v-if="value.type != 'condition'"
             value="action"
             label="动作节点"
-            v-if="value.type != 'condition'"
-            >动作节点</el-option
-          >
+          >动作节点</el-option>
         </el-select>
       </div>
 
-      <div class="ronin-method-box" v-if="value.type == 'condition'">
+      <div v-if="value.type == 'condition'" class="ronin-method-box">
         <span class="ronin-method-name">执行方式:</span>
         <el-select
-          placeholder="请设置条件节点执行方式"
           v-model="value.properties.conditionExeType"
+          placeholder="请设置条件节点执行方式"
           @change="onTypeChange"
         >
-          <el-option label="并行" value="all"></el-option>
-          <el-option label="串行" value="any"></el-option>
+          <el-option label="并行" value="all" />
+          <el-option label="串行" value="any" />
         </el-select>
       </div>
 
-      <div class="ronin-content" v-if="showContent">
+      <div v-if="showContent" class="ronin-content">
         <!-- 条件 -->
         <RoninTree
-          ref="condition"
           v-if="value.properties.ruleType == 'condition'"
-          treeType="property"
+          ref="condition"
+          tree-type="property"
           :data="list"
-          :treeData="treeData"
-          :funList="funList"
-          :childData='childData'
-        ></RoninTree>
+          :tree-data="treeData"
+          :fun-list="funList"
+          :child-data="childData"
+        />
         <!-- 条件 方法 -->
         <RoninTree
-          ref="conditionFn"
           v-if="value.properties.ruleType == 'conditionFn'"
-          treeType="method"
+          ref="conditionFn"
+          tree-type="method"
           :data="list"
-          :treeData="treeData"
-          :funList="funList"
-          :childData='childData'
-        ></RoninTree>
+          :tree-data="treeData"
+          :fun-list="funList"
+          :child-data="childData"
+        />
 
         <!-- 方法 -->
         <method
           v-if="value.properties.ruleType == 'action'"
           ref="action"
           :item="value.properties.action"
-          :nodeData="value"
-          :funList="funList"
-          :type='type'
-        ></method>
+          :node-data="value"
+          :fun-list="funList"
+          :type="type"
+        />
       </div>
 
       <div class="actions">
@@ -114,246 +114,240 @@
   </el-drawer>
 </template>
 <script>
-import RoninTree from "./tree.vue";
+import RoninTree from './tree.vue'
 
-import method from "./method.vue";
-import { rules_list_params } from "@/api/rule/index";
+import method from './method.vue'
+import { rules_list_params } from '@/api/rule/index'
 
-import { getDict, getDicts } from "@/utils/index";
-import { listByType,listByTypeAll,condtionOneData ,dataPage} from "@/api/rule/index";
+import { getDict, getDicts } from '@/utils/index'
+import { listByType, listByTypeAll, condtionOneData, dataPage } from '@/api/rule/index'
 export default {
   components: { RoninTree, method },
   props: [
-    /*当前节点数据*/ "value",
-    /*整个节点数据*/ "processData",
-    "flowType",
-    "treeData",
-    "type"
+    /* 当前节点数据*/ 'value',
+    /* 整个节点数据*/ 'processData',
+    'flowType',
+    'treeData',
+    'type'
   ],
 
   data() {
     return {
       visible: false, // 控制面板显隐
-      activeName: "config", // or formAuth  Tab面板key
+      activeName: 'config', // or formAuth  Tab面板key
       // 当前节点数据
       properties: {
-        title: "",
+        title: ''
       },
 
       funList: [],
       list: [],
-      childData:{
+      childData: {
 
       },
-      showContent:false
-    };
+      showContent: false
+    }
   },
   watch: {},
 
   mounted() {
-    this.getTypeAllData();
+    this.getTypeAllData()
     rules_list_params({ full: true, rows: 100 }).then((res) => {
-      if (res.code == "0" && res.data) {
-        this.funList = res.data;
+      if (res.code == '0' && res.data) {
+        this.funList = res.data
       } else {
-        this.funList = [];
+        this.funList = []
       }
-    });
+    })
   },
   methods: {
     async getTypeAllData() {
       // 获取所有类型数据
-      console.log(this.value,'显示数据111哈哈哈')
+      console.log(this.value, '显示数据111哈哈哈')
 
-      let obj = {};
-      let dictList = [];
+      const obj = {}
+      let dictList = []
       await getDicts([
-        "rule_prop_type",
-        "role_condition_type",
-        "date_limit_unit",
+        'rule_prop_type',
+        'role_condition_type',
+        'date_limit_unit'
       ]).then((res) => {
         res.forEach((item) => {
-          obj[item.id] = item.items;
-        });
-        dictList = obj["rule_prop_type"] || [];
-      });
-
-       let arrDataAll = []
-      await condtionOneData({}).then(res=>{
-        let arrData = res.data
-        console.log(arrData,'11111111111111111')
-         arrData.forEach(item=>{
+          obj[item.id] = item.items
+        })
+        dictList = obj['rule_prop_type'] || []
+      })
+
+      const arrDataAll = []
+      await condtionOneData({}).then(res => {
+        const arrData = res.data
+        console.log(arrData, '11111111111111111')
+        arrData.forEach(item => {
           item.disabled = true
-          item.children.forEach(ele=>{
+          item.children.forEach(ele => {
             arrDataAll.push(ele.code)
           })
         })
-        obj.rule_prop_type =arrData
+        obj.rule_prop_type = arrData
       })
 
       // 旧
-      let arr = []
-      dictList.forEach(e=>{
+      const arr = []
+      dictList.forEach(e => {
         arr.push(e.dictValue)
       })
       // 新
-      let arr1 = {}
-      arrDataAll.forEach(e=>{
+      const arr1 = {}
+      arrDataAll.forEach(e => {
         arr1[e] = []
       })
 
-     
-      
-      let typeObj = {}
-       // arr 是所有的分类列表 下面是获取分类下的id
+      const typeObj = {}
+      // arr 是所有的分类列表 下面是获取分类下的id
       //  console.log(JSON.stringify(this.value));
       // console.log(this.value,'111111234567890--09876543')
-      
-      //处理条件空数据,设置为空
-      if(this.value.type == "condition" || this.value.type == "start"){
-        if(!this.value.properties.condition){
+
+      // 处理条件空数据,设置为空
+      if (this.value.type == 'condition' || this.value.type == 'start') {
+        if (!this.value.properties.condition) {
           this.value.properties.condition = {}
-        }else if(this.value.properties.condition && !this.value.properties.condition.id){
+        } else if (this.value.properties.condition && !this.value.properties.condition.id) {
           this.value.properties.condition = {}
         }
-        this.getTreeCode( [this.value.properties.condition] ,arr1)
-        
+        this.getTreeCode([this.value.properties.condition], arr1)
       }
-      console.log(arr1,'处理后的数据111')
-      let req ={
-        typeList:[]
+      console.log(arr1, '处理后的数据111')
+      const req = {
+        typeList: []
       }
-      for (let key in arr1){
+      for (const key in arr1) {
         req.typeList.push({
-          ids:arr1[key],
-          page:1,
-          rows:100,
-          type:key
+          ids: arr1[key],
+          page: 1,
+          rows: 100,
+          type: key
         })
       }
-      await dataPage(req).then(res=>{
-        if(res.code =='0'){
-           res.data.forEach(e=>{
+      await dataPage(req).then(res => {
+        if (res.code == '0') {
+          res.data.forEach(e => {
             typeObj[e.type] = e.data
           })
         }
       })
 
-
       this.childData = {
-        dict:obj,
-        type:typeObj
+        dict: obj,
+        type: typeObj
       }
       this.showContent = true
-
     },
 
-    getTreeCode(data,arr){
-      data.forEach(item=>{
-        if(item.type == "property"){
-        let code = item.property.mdCode
-        if(arr[item.property.mdType]){
-          arr[item.property.mdType].push(code)
-        }
-        
+    getTreeCode(data, arr) {
+      data.forEach(item => {
+        if (item.type == 'property') {
+          const code = item.property.mdCode
+          if (arr[item.property.mdType]) {
+            arr[item.property.mdType].push(code)
+          }
         }
-        if(item.type == "relation" &&  item.children && item.children.length > 0){
-          this.getTreeCode( item.children , arr)
+        if (item.type == 'relation' && item.children && item.children.length > 0) {
+          this.getTreeCode(item.children, arr)
         }
       })
     },
     onTypeChnage() {
-      this.list = [];
+      this.list = []
     },
     init() {
-      let that = this
-      if( !this.showContent){
-       let interval= setInterval(e=>{
-          if(that.showContent){
+      const that = this
+      if (!this.showContent) {
+        const interval = setInterval(e => {
+          if (that.showContent) {
             that.init()
             clearInterval(interval)
           }
-       },10)
+        }, 10)
         return
       }
-      let newVal = this.value;
-      this.list = [];
+      const newVal = this.value
+      this.list = []
       if (newVal && newVal.properties) {
-        this.visible = true;
+        this.visible = true
 
         if (newVal.properties && newVal.properties.ruleType) {
           if (
-            (newVal.properties.ruleType == "condition" ||
-              newVal.properties.ruleType == "conditionFn") &&
-            JSON.stringify(newVal.properties.condition) != "{}" &&
-            JSON.stringify(newVal.properties.condition) != "null" &&
-            JSON.stringify(newVal.properties.condition) != "undefined" &&
+            (newVal.properties.ruleType == 'condition' ||
+              newVal.properties.ruleType == 'conditionFn') &&
+            JSON.stringify(newVal.properties.condition) != '{}' &&
+            JSON.stringify(newVal.properties.condition) != 'null' &&
+            JSON.stringify(newVal.properties.condition) != 'undefined' &&
             newVal.properties.condition
           ) {
             // 条件属性
 
-            this.list = [newVal.properties.condition];
+            this.list = [newVal.properties.condition]
 
             // 方法条件处理
             if (
               newVal.properties &&
-              newVal.properties.ruleType == "conditionFn"
+              newVal.properties.ruleType == 'conditionFn'
             ) {
               this.$nextTick((e) => {
-                this.$refs.conditionFn.init();
-              });
+                this.$refs.conditionFn.init()
+              })
             }
 
             // 条件
             if (
               newVal.properties &&
-              newVal.properties.ruleType == "condition"
+              newVal.properties.ruleType == 'condition'
             ) {
               this.$nextTick((e) => {
-                console.log(this.list, "显示传递数据1111111");
-                this.$refs.condition.init();
-              });
+                console.log(this.list, '显示传递数据1111111')
+                this.$refs.condition.init()
+              })
             }
-            return;
+            return
           }
         }
 
-        if (newVal.type == "approver") {
+        if (newVal.type == 'approver') {
           if (!newVal.properties.ruleType) {
-            newVal.properties.ruleType = "action";
+            newVal.properties.ruleType = 'action'
             newVal.properties.action = {
-              actionId: "", //动作函数
-              actionName: "", //动作(函数组)名称
-              methodCode: "", //方法(函数)编号
-              methodName: "", //方法(函数)名称
-              params: [], //方法参数
-              advanceRatio: "",
-              auto: "",
-              checkRatio: "",
-              checkWay: "",
+              actionId: '', // 动作函数
+              actionName: '', // 动作(函数组)名称
+              methodCode: '', // 方法(函数)编号
+              methodName: '', // 方法(函数)名称
+              params: [], // 方法参数
+              advanceRatio: '',
+              auto: '',
+              checkRatio: '',
+              checkWay: '',
               executorIds: [],
-              executorType: "",
-            };
+              executorType: ''
+            }
           }
         }
 
-        if (newVal.properties && newVal.properties.ruleType == "action") {
+        if (newVal.properties && newVal.properties.ruleType == 'action') {
           this.$nextTick((e) => {
-            this.$refs.action.init();
-          });
+            this.$refs.action.init()
+          })
         }
       }
     },
 
     onTypeChange(e) {
-      this.$emit("onTypeChange", e, this.value.prevId);
+      this.$emit('onTypeChange', e, this.value.prevId)
     },
     // 关闭抽屉
     cancel() {
       setTimeout(() => {
-        this.$emit("cancel");
-        this.visible = false;
-      }, 0);
+        this.$emit('cancel')
+        this.visible = false
+      }, 0)
     },
 
     confirm() {
@@ -363,23 +357,22 @@ export default {
         this.value.properties.ruleType
       ) {
         if (
-          this.value.properties.ruleType == "condition" ||
-          this.value.properties.ruleType == "conditionFn"
+          this.value.properties.ruleType == 'condition' ||
+          this.value.properties.ruleType == 'conditionFn'
         ) {
-          this.value.properties.condition = this.list[0];
+          this.value.properties.condition = this.list[0]
         }
-        if (this.value.properties.ruleType == "condition") {
+        if (this.value.properties.ruleType == 'condition') {
         }
       }
-      this.visible = false;
-      this.$emit("change");
+      this.visible = false
+      this.$emit('change')
 
       //  this.$forceUpdate()
-    },
+    }
 
-   
-  },
-};
+  }
+}
 </script>
 <style lang="scss">
 .ronin-drawer {

Разница между файлами не показана из-за своего большого размера
+ 499 - 408
src/components/Process/PropPanel/method.vue


+ 188 - 199
src/components/Process/PropPanel/tree.vue

@@ -7,16 +7,16 @@
     <div class="ronin-tree-content">
       <div class="list-item-box">
         <div
-          class="list-item"
           v-for="(item, index) in list"
           :key="index + 'ronin1'"
+          class="list-item"
         >
           <!-- 套娃1 -->
-          <div class="ronin-tree-content" v-if="item.type == 'relation'">
+          <div v-if="item.type == 'relation'" class="ronin-tree-content">
             <!-- 且跟或 -->
             <div
-              class="user-tag_index_relation"
               v-if="item.children.length > 1"
+              class="user-tag_index_relation"
             >
               <span style="margin-bottom: 4px" @click="onClickType(item)">{{
                 item.relation == "and" ? "且" : "或"
@@ -26,72 +26,70 @@
             <!-- 且跟或结束 -->
             <div class="list-item-box">
               <div
-                class="list-item"
                 v-for="(item1, index1) in item.children"
                 :key="index1 + 'ronin2'"
+                class="list-item"
               >
                 <div v-if="item1.type == 'relation'">
                   <!-- 套娃2 -->
                   <div
-                    class="ronin-tree-content"
                     v-if="item1.type == 'relation'"
+                    class="ronin-tree-content"
                   >
                     <!-- 且跟或 -->
                     <div
-                      class="user-tag_index_relation"
                       v-if="item1.children.length > 1"
-                     
+                      class="user-tag_index_relation"
                     >
-                      <span   style="margin-bottom: 4px"  @click="onClickType(item1)">{{ item1.relation == "and" ? "且" : "或" }}</span>
+                      <span style="margin-bottom: 4px" @click="onClickType(item1)">{{ item1.relation == "and" ? "且" : "或" }}</span>
 
-                       <span @click="onClickAdd(item1)">+</span>
+                      <span @click="onClickAdd(item1)">+</span>
                     </div>
                     <!-- 且跟或 -->
                     <div class="list-item-box">
                       <div
-                        class="list-item"
                         v-for="(item2, index2) in item1.children"
                         :key="index2 + 'ronin3'"
+                        class="list-item"
                       >
                         <!-- 套娃3 -->
                         <div
-                          class="ronin-tree-content"
                           v-if="item2.type == 'relation'"
+                          class="ronin-tree-content"
                         >
                           <!-- 且跟或 -->
                           <div
-                            class="user-tag_index_relation"
                             v-if="item2.children.length > 1"
-                           
+                            class="user-tag_index_relation"
                           >
-                            <span style="margin-bottom: 4px"   @click="onClickType(item2)">{{
+                            <span style="margin-bottom: 4px" @click="onClickType(item2)">{{
                               item2.relation == "and" ? "且" : "或"
                             }}</span>
 
-                             <span @click="onClickAdd(item2)">+</span>
+                            <span @click="onClickAdd(item2)">+</span>
                           </div>
                           <!-- 且跟或结束 -->
                           <div class="list-item-box">
                             <div
-                              class="list-item"
                               v-for="(item3, index3) in item2.children"
                               :key="index3 + 'ronin4'"
+                              class="list-item"
                             >
                               <div class="list-item-content">
                                 <div class="item-content">
                                   <condition
                                     v-if="treeType == 'property'"
-                                    :item="item3.property"
                                     ref="condition"
-                                    :treeData='treeData'
-                                    :childData='childData'
-                                  ></condition>
+                                    :item="item3.property"
+                                    :tree-data="treeData"
+                                    :child-data="childData"
+                                  />
                                   <method
                                     v-if="treeType == 'method'"
                                     ref="method"
-                                    :funList="funList"
+                                    :fun-list="funList"
                                     :item="item3.method"
-                                  ></method>
+                                  />
                                 </div>
                                 <!-- <div class="item-btn">
                                   <el-button
@@ -110,21 +108,21 @@
                           </div>
                         </div>
                         <!-- 套娃3结束 -->
-                        <div class="list-item-content" v-else>
+                        <div v-else class="list-item-content">
                           <div class="item-content">
                             <condition
                               v-if="treeType == 'property'"
-                              :item="item2.property"
                               ref="condition"
-                              :treeData='treeData'
-                              :childData='childData'
-                            ></condition>
+                              :item="item2.property"
+                              :tree-data="treeData"
+                              :child-data="childData"
+                            />
                             <method
                               v-if="treeType == 'method'"
                               ref="method"
-                              :funList="funList"
+                              :fun-list="funList"
                               :item="item2.method"
-                            ></method>
+                            />
                           </div>
                           <!-- <div class="item-btn">
                             <el-button
@@ -145,21 +143,21 @@
 
                   <!-- 套娃2结束 -->
                 </div>
-                <div class="list-item-content" v-else>
+                <div v-else class="list-item-content">
                   <div class="item-content">
                     <condition
                       v-if="treeType == 'property'"
-                      :item="item1.property"
                       ref="condition"
-                      :treeData='treeData'
-                      :childData='childData'
-                    ></condition>
+                      :item="item1.property"
+                      :tree-data="treeData"
+                      :child-data="childData"
+                    />
                     <method
                       v-if="treeType == 'method'"
                       ref="method"
-                      :funList="funList"
+                      :fun-list="funList"
                       :item="item1.method"
-                    ></method>
+                    />
                   </div>
                   <!-- <div class="item-btn">
                     <el-button
@@ -178,21 +176,21 @@
             </div>
           </div>
           <!-- 套娃1结束 -->
-          <div class="list-item-content" v-else>
+          <div v-else class="list-item-content">
             <div class="item-content">
               <condition
                 v-if="treeType == 'property'"
+                ref="condition"
                 :item="item.property"
-                 ref="condition"
-                :treeData='treeData'
-                :childData='childData'
-              ></condition>
+                :tree-data="treeData"
+                :child-data="childData"
+              />
               <method
                 v-if="treeType == 'method'"
                 ref="method"
-                :funList="funList"
+                :fun-list="funList"
                 :item="item.method"
-              ></method>
+              />
             </div>
             <!-- <div class="item-btn">
               <el-button type="link" @click="onTapAddItems(index, item, 1)"
@@ -211,251 +209,242 @@
 
 <script>
 // 条件对象
-let conditionData = {
-  type: "property",
-  relation: "", //属性property,条件 relation,方法method
+const conditionData = {
+  type: 'property',
+  relation: '', // 属性property,条件 relation,方法method
   children: null,
   property: {
-    mdCode:'',//标准数据
-    mdName:'',
-    mdTypeCode:'',//标准数据分类
-    mdTypeName:'',
-    dateType:'standard',//数据类型
-    deptCodes:[],
-    deptCode:'',//部门
-    deptName:'',//部门名称
-    dtLimitEnd:'',//时间结束
-    dtLimitStart:'',
-    dtLimitUnit:'D',//时间单位
-    lxtjNum:'',//连续几次
-    rytjNum:"",//任意几次
-    op:'',// 一级操作符
-    opChild:'',// 二级操作符
-    oval:'',//值1
-    ovalMany:[],//多值
-    ovalTwo:'',//值2
-    sampleCode:'',//样本
-    sampleName:'',
-    ynType:'Y',//排除纳入
-    restriction:'N'
+    mdCode: '', // 标准数据
+    mdName: '',
+    mdTypeCode: '', // 标准数据分类
+    mdTypeName: '',
+    dateType: 'standard', // 数据类型
+    deptCodes: [],
+    deptCode: '', // 部门
+    deptName: '', // 部门名称
+    dtLimitEnd: '', // 时间结束
+    dtLimitStart: '',
+    dtLimitUnit: 'D', // 时间单位
+    lxtjNum: '', // 连续几次
+    rytjNum: '', // 任意几次
+    op: '', // 一级操作符
+    opChild: '', // 二级操作符
+    oval: '', // 值1
+    ovalMany: [], // 多值
+    ovalTwo: '', // 值2
+    sampleCode: '', // 样本
+    sampleName: '',
+    ynType: 'Y', // 排除纳入
+    restriction: 'N'
 
-  },
-};
+  }
+}
 
-//方法对象
-let methodData = {
-  type: "method",
-  relation: "", //属性property,条件 relation,方法method
+// 方法对象
+const methodData = {
+  type: 'method',
+  relation: '', // 属性property,条件 relation,方法method
   children: null,
   method: {
-    actionId: "", //动作函数
-    actionName: "", //动作(函数组)名称
-    methodCode: "", //方法(函数)编号
-    methodName: "", //方法(函数)名称
+    actionId: '', // 动作函数
+    actionName: '', // 动作(函数组)名称
+    methodCode: '', // 方法(函数)编号
+    methodName: '', // 方法(函数)名称
 
-    advanceRatio:'',
-    auto:'',
-    checkRatio:'',
-    checkWay:'',
-    executorIds:[],
-    executorType:'',
+    advanceRatio: '',
+    auto: '',
+    checkRatio: '',
+    checkWay: '',
+    executorIds: [],
+    executorType: '',
 
-    params: [], //方法参数
-  },
-};
-import condition from "./condition.vue"; //条件配置
-import method from "./method.vue";
+    params: [] // 方法参数
+  }
+}
+import condition from './condition.vue' // 条件配置
+import method from './method.vue'
 
-import {idGenerator} from"@/utils/index"
+import { idGenerator } from '@/utils/index'
 export default {
   components: { condition, method },
   props: {
     treeType: {
       type: String,
-      required: "property",
+      required: 'property'
     },
     data: {},
-    treeData:{},
-    childData:{},
+    treeData: {},
+    childData: {},
     funList: {
       type: Array,
-      required: [],
-    },
+      required: []
+    }
+  },
+
+  data() {
+    return {
+      // treeType:'property',
+      list: []
+    }
   },
   watch: {
     data: {
       handler(e) {
         // console.log(e,'显示数据11111111111')
-        this.list = e;
+        this.list = e
       },
       deep: true,
-      immediate: true,
-    },
-  },
-
-  data() {
-    return {
-      // treeType:'property',
-      list: [],
-    };
+      immediate: true
+    }
   },
   methods: {
 
-    init(){
-      let id = idGenerator()
-     
-      this.$nextTick(res=>{
-        if(this.$refs.method){
-             this.$refs.method.forEach(item=>{
-          item.init()
-         })
+    init() {
+      const id = idGenerator()
+
+      this.$nextTick(res => {
+        if (this.$refs.method) {
+          this.$refs.method.forEach(item => {
+            item.init()
+          })
         }
-        if(this.$refs.condition){
-             this.$refs.condition.forEach(item=>{
-          item.init()
-         })
+        if (this.$refs.condition) {
+          this.$refs.condition.forEach(item => {
+            item.init()
+          })
         }
-     
-         
       })
     },
     onClickType(item) {
-      if (item.relation == "and") {
-        item.relation = "or";
+      if (item.relation == 'and') {
+        item.relation = 'or'
       } else {
-        item.relation = "and";
+        item.relation = 'and'
       }
-      this.$forceUpdate();
+      this.$forceUpdate()
     },
     getList() {
-      console.log(this.list);
+      console.log(this.list)
     },
     // 外层添加
     onTapRootAdd() {
-      let item = {};
+      let item = {}
       // 条件新增
-      if (this.treeType == "property") {
-       
-        item = JSON.parse(JSON.stringify(conditionData));
-        item.id =  idGenerator()
-        if (this.list && this.list[0] && this.list[0].type == "relation") {
-         
-          this.list[0].children.push(item);
-        } else if ( this.list &&this.list[0] &&this.list[0].type == "property") {
-         
-          
-          let data = JSON.parse(JSON.stringify(this.list[0]));
+      if (this.treeType == 'property') {
+        item = JSON.parse(JSON.stringify(conditionData))
+        item.id = idGenerator()
+        if (this.list && this.list[0] && this.list[0].type == 'relation') {
+          this.list[0].children.push(item)
+        } else if (this.list && this.list[0] && this.list[0].type == 'property') {
+          const data = JSON.parse(JSON.stringify(this.list[0]))
           data.id = idGenerator()
-          data.children = null;
-          this.list[0].children = [data, item];
-          this.list[0].relation = "and";
-          this.list[0].type = "relation";
-          this.list[0][this.treeType] = null;
+          data.children = null
+          this.list[0].children = [data, item]
+          this.list[0].relation = 'and'
+          this.list[0].type = 'relation'
+          this.list[0][this.treeType] = null
           this.init()
         } else {
-         
-          this.list.push(item);
+          this.list.push(item)
         }
-        return;
+        return
       }
       // 方法新增
-      if (this.treeType == "method") {
-        item = JSON.parse(JSON.stringify(methodData));
-         item.id =  idGenerator()
-        if (this.list && this.list[0] && this.list[0].type == "relation") {
-          this.list[0].children.push(item);
-        } else if (this.list && this.list[0] && this.list[0].type == "method") {
-          let data = JSON.parse(JSON.stringify(this.list[0]));
+      if (this.treeType == 'method') {
+        item = JSON.parse(JSON.stringify(methodData))
+        item.id = idGenerator()
+        if (this.list && this.list[0] && this.list[0].type == 'relation') {
+          this.list[0].children.push(item)
+        } else if (this.list && this.list[0] && this.list[0].type == 'method') {
+          const data = JSON.parse(JSON.stringify(this.list[0]))
           data.id = idGenerator()
-          data.children = null;
-          this.list[0].children = [data, item];
-          this.list[0].relation = "and";
-          this.list[0].type = "relation";
-          this.list[0][this.treeType] = null;
+          data.children = null
+          this.list[0].children = [data, item]
+          this.list[0].relation = 'and'
+          this.list[0].type = 'relation'
+          this.list[0][this.treeType] = null
         } else {
-          this.list.push(item);
+          this.list.push(item)
         }
 
-        return;
+        return
       }
     },
 
-    //内部添加
+    // 内部添加
     onTapAddItems(index, data, type) {
-      let item = JSON.parse(JSON.stringify(conditionData));
-      if (this.treeType == "method") {
-        item = JSON.parse(JSON.stringify(methodData));
+      let item = JSON.parse(JSON.stringify(conditionData))
+      if (this.treeType == 'method') {
+        item = JSON.parse(JSON.stringify(methodData))
       }
       item.id = idGenerator()
       if (type == 4) {
-        data.children.push(item);
-        this.$forceUpdate();
-        return;
+        data.children.push(item)
+        this.$forceUpdate()
+        return
       }
 
-      if (data.type == "property" || data.type == "method") {
-        let oldData = JSON.parse(JSON.stringify(data));
+      if (data.type == 'property' || data.type == 'method') {
+        const oldData = JSON.parse(JSON.stringify(data))
         oldData.id = idGenerator()
-        data.children = [oldData, item];
-        data[this.treeType] = null;
-        data.relation = "and";
-        data.type = "relation";
+        data.children = [oldData, item]
+        data[this.treeType] = null
+        data.relation = 'and'
+        data.type = 'relation'
         this.init()
       } else {
-        data.children.push(item);
+        data.children.push(item)
       }
 
-      this.$forceUpdate();
+      this.$forceUpdate()
     },
 
     onClickAdd(data) {
-      let item = JSON.parse(JSON.stringify(conditionData));
-      if (this.treeType == "method") {
-        item = JSON.parse(JSON.stringify(methodData));
+      let item = JSON.parse(JSON.stringify(conditionData))
+      if (this.treeType == 'method') {
+        item = JSON.parse(JSON.stringify(methodData))
       }
-    data.children.push(item);
-
+      data.children.push(item)
     },
 
     // 删除事件
     onTapDelItems(index, item, type) {
-      console.log("我走了", type);
+      console.log('我走了', type)
       if (type == 1) {
-        this.list = [];
+        this.list = []
       }
 
       if (type == 2 || type == 3 || type == 4) {
-        item.children.splice(index, 1);
+        item.children.splice(index, 1)
         if (item.children && item.children.length == 1) {
-          let data = JSON.parse(JSON.stringify(item.children[0]));
+          const data = JSON.parse(JSON.stringify(item.children[0]))
 
           if (type == 2) {
-            data.type = this.treeType;
-            data.relation = null;
-            this.list = [data];
+            data.type = this.treeType
+            data.relation = null
+            this.list = [data]
           }
 
           if (type == 3 || type == 4) {
-            item.type = this.treeType;
-            item[this.treeType] = data[this.treeType];
-            item.children = null;
-            item.relation = null;
+            item.type = this.treeType
+            item[this.treeType] = data[this.treeType]
+            item.children = null
+            item.relation = null
             if (data.children && data.children.length > 2) {
-              item.type = "relation";
-              item[this.treeType] = null;
-              item.relation = data.relation;
-              item.children = data.children;
+              item.type = 'relation'
+              item[this.treeType] = null
+              item.relation = data.relation
+              item.children = data.children
             }
-           
           }
 
-           this.init()
+          this.init()
         }
       }
-      this.$forceUpdate();
-    },
-  },
-};
+      this.$forceUpdate()
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 28 - 28
src/components/Process/index.vue

@@ -1,7 +1,7 @@
 <script>
-import FlowCard from "./FlowCard/index.vue";
-import PropPanel from "./PropPanel/index.vue";
-import { NodeUtils, getMockData } from "./FlowCard/util.js";
+import FlowCard from './FlowCard/index.vue'
+import PropPanel from './PropPanel/index.vue'
+import { NodeUtils, getMockData } from './FlowCard/util.js'
 import { getDrawingList } from '@/components/Generator/utils/db'
 const requiredDisabled = (ccitKey) => {
   return ['billRule', 'createUser', 'createTime', 'modifyTime', 'modifyUser', 'currPosition', 'currOrganize', 'table'].includes(ccitKey)
@@ -40,7 +40,7 @@ export default {
       activeData: null, // 被激活的流程卡片数据,用于属性面板编辑
       isProcessCmp: true,
       verifyMode: false
-    };
+    }
   },
   methods: {
     updateFiled(flowTemplateJson) {
@@ -56,7 +56,7 @@ export default {
     },
     initFormOperates(target) {
       const formOperates = target.properties && target.properties.formOperates || []
-      let res = []
+      const res = []
       const getWriteById = id => {
         const arr = formOperates.filter(o => o.id === id)
         return arr.length ? arr[0].write : NodeUtils.isStartNode(target)
@@ -107,19 +107,19 @@ export default {
      * @param { Object } data - 含有event(事件名称)/args(参数)两个属性
      */
     eventReceiver({ event, args }) {
-      if (event === "edit") {
-        this.activeData = args[0]; // 打开属性面板
-        return;
+      if (event === 'edit') {
+        this.activeData = args[0] // 打开属性面板
+        return
       }
       // 本实例只监听了第一层数据(startNode)变动
       // 为了实时更新  采用$forceUpdate刷新 但是由于某些条件下触发失效(未排除清除原因)
       // 使用key + 监听父组件updateId方式强制刷新
-      NodeUtils[event](...args);
-      this.forceUpdate();
+      NodeUtils[event](...args)
+      this.forceUpdate()
     },
 
     forceUpdate() {
-      this.updateId = this.updateId + 1;
+      this.updateId = this.updateId + 1
     },
     /**
      * 控制流程图缩放
@@ -130,7 +130,7 @@ export default {
         if (this.scaleVal === 200 && this.scaleVal + val > 200) return
         if (this.scaleVal === 0 && this.scaleVal + val < 0) return
         // 缩放介于0%~200%
-        this.scaleVal += val;
+        this.scaleVal += val
       }
     },
     /**
@@ -139,27 +139,27 @@ export default {
      */
     onPropEditConfirm(value, content) {
       this.activeData.content = content || '请设置条件'
-      let oldProp = this.activeData.properties;
-      this.activeData.properties = value;
+      const oldProp = this.activeData.properties
+      this.activeData.properties = value
       // 修改优先级
       if (NodeUtils.isConditionNode(this.activeData)) {
-        value.priority !== oldProp.priority
-          && NodeUtils.resortPrioByCNode(
+        value.priority !== oldProp.priority &&
+          NodeUtils.resortPrioByCNode(
             this.activeData,
             oldProp.priority,
             this.data
-          );
+          )
         NodeUtils.setDefaultCondition(this.activeData, this.data)
       }
       if (NodeUtils.isStartNode(this.activeData)) this.$emit('startNodeChange', this.data)
-      this.onClosePanel();
-      this.forceUpdate();
+      this.onClosePanel()
+      this.forceUpdate()
     },
     /**
      * 属性面板取消事件
      */
     onClosePanel() {
-      this.activeData = null;
+      this.activeData = null
     },
 
     // 传formIds 查询指定组件 未传时  判断所有组件
@@ -183,14 +183,14 @@ export default {
       return res
     }
   },
-  render: function (h) {
+  render: function(h) {
     return (
-      <div class="flow-container">
-        <div class="scale-slider">
-          <i class="btn  el-icon-minus"
+      <div class='flow-container'>
+        <div class='scale-slider'>
+          <i class='btn  el-icon-minus'
             onClick={this.changeScale.bind(this, -this.step)}></i>
-          <span style="font-size:14px;">{this.scaleVal}%</span>
-          <i class="btn  el-icon-plus "
+          <span style='font-size:14px;'>{this.scaleVal}%</span>
+          <i class='btn  el-icon-plus '
             onClick={this.changeScale.bind(this, this.step)}></i>
         </div>
         <FlowCard
@@ -208,9 +208,9 @@ export default {
           onCancel={this.onClosePanel}
         />
       </div>
-    );
+    )
   }
-};
+}
 </script>
 
 <style scoped lang="scss">

+ 32 - 32
src/components/RONIN-select/VirtualItem.vue

@@ -1,44 +1,44 @@
 <template>
-    <div :class="['virtual-item', {'is-selected': curId === source.id}]" @click="handleClick">
-        <span>{{source.name}}</span>
-    </div>
+  <div :class="['virtual-item', {'is-selected': curId === source.id}]" @click="handleClick">
+    <span>{{ source.name }}</span>
+  </div>
 </template>
 
 <script>
 
 export default {
-    name: 'VirtualItem',
-    props: {
-        curId: {
-            type: String,
-            default: ""
-        },
-        source: {
-            type: Object,
-            default () {
-                return {}
-            }
-        },
+  name: 'VirtualItem',
+  props: {
+    curId: {
+      type: String,
+      default: ''
     },
-    methods: {
-        dispatch(componentName, eventName, ...rest) {
-            let parent = this.$parent || this.$root;
-            let name = parent.$options.name;
-            while (parent && (!name || name !== componentName)) {
-                parent = parent.$parent;
-                if (parent) {
-                    name = parent.$options.name;
-                }
-            }
-            if (parent) {
-                parent.$emit.apply(parent, [eventName].concat(rest));
-            }
-        },
-        handleClick() {
-            // 通知 SelectVirtualList 组件,点击了项目
-            this.dispatch('SelectVirtualList', 'clickVirtualItem', this.source);
+    source: {
+      type: Object,
+      default() {
+        return {}
+      }
+    }
+  },
+  methods: {
+    dispatch(componentName, eventName, ...rest) {
+      let parent = this.$parent || this.$root
+      let name = parent.$options.name
+      while (parent && (!name || name !== componentName)) {
+        parent = parent.$parent
+        if (parent) {
+          name = parent.$options.name
         }
+      }
+      if (parent) {
+        parent.$emit.apply(parent, [eventName].concat(rest))
+      }
+    },
+    handleClick() {
+      // 通知 SelectVirtualList 组件,点击了项目
+      this.dispatch('SelectVirtualList', 'clickVirtualItem', this.source)
     }
+  }
 }
 </script>
 

+ 248 - 231
src/components/RONIN-select/illnessSelect.vue

@@ -1,257 +1,274 @@
 <!-- 疾病搜索列表 -->
 <template>
-    <el-popover v-model="visibleVirtualList" popper-class="select-virtual-list-popover" trigger="click"
-        placement="bottom-start" :width="width">
-        <virtual-list v-if="visibleVirtualList" @tobottom="tobottom" ref="virtualListRef" class="virtual-list"
-            :data-key="'id'" :keeps="keeps" :data-sources="dataList" :data-component="itemComponent"
-             :estimate-size="estimateSize" :item-class="'list-item-custom-class'"></virtual-list>
+  <el-popover
+    v-model="visibleVirtualList"
+    popper-class="select-virtual-list-popover"
+    trigger="click"
+    placement="bottom-start"
+    :width="width"
+  >
+    <virtual-list
+      v-if="visibleVirtualList"
+      ref="virtualListRef"
+      class="virtual-list"
+      :data-key="'id'"
+      :keeps="keeps"
+      :data-sources="dataList"
+      :data-component="itemComponent"
+      @tobottom="tobottom"
+      :estimate-size="estimateSize"
+      :item-class="'list-item-custom-class'"
+    />
 
+    <!-- 单选     -->
+    <el-input
+      v-if="!multiple"
+      slot="reference"
+      v-model="curValue"
+      :style="`width:100%;`"
+      :size="size"
+      :placeholder="placeholder"
+      @input="handleInput"
+      @focus="onFocus"
+    />
+    <!-- 多选选     -->
+    <div v-if="multiple" slot="reference" class="yh-label-input">
+      <div ref="tagBox" class="yh-tag-box">
+        <el-tag v-for="(tag, index) in tags" :key="index" closable class="yh-tag" @close="delTag(index)">{{ tag.name
+        }}</el-tag>
+      </div>
+      <el-input
+        v-model="curValue"
+        :style="`width:100%;`"
+        class="yh-tag-input"
+        :rows="1"
+        type="textarea"
+        @input="handleInput"
+        @focus="onFocus"
+        @keydown.enter.native="addTag"
+      />
+    </div>
 
-        <!-- 单选     -->
-        <el-input v-if="!multiple" slot="reference" v-model="curValue" :style="`width:100%;`" :size="size"
-            :placeholder="placeholder" @input="handleInput" @focus="onFocus"></el-input>
-        <!-- 多选选     -->
-        <div class="yh-label-input" v-if="multiple" slot="reference">
-            <div class="yh-tag-box" ref="tagBox">
-                <el-tag v-for="(tag, index) in tags" :key="index" closable @close="delTag(index)" class="yh-tag">{{ tag.name
-                }}</el-tag>
-            </div>
-            <el-input @input="handleInput" @focus="onFocus" v-model="curValue" @keydown.enter.native="addTag"
-                :style="`width:100%;`" class="yh-tag-input" :rows="1" type="textarea"></el-input>
-        </div>
-
-
-    </el-popover>
+  </el-popover>
 </template>
 
 <script>
-import VirtualList from 'vue-virtual-scroll-list';
-import VirtualItem from './VirtualItem.vue';
-
-
+import VirtualList from 'vue-virtual-scroll-list'
+import VirtualItem from './VirtualItem.vue'
 
 // 疾病列表
-import { queryDiseaseByPage } from "@/api/standard/disease"
+import { queryDiseaseByPage } from '@/api/standard/disease'
 export default {
-    name: 'SelectVirtualList',
-    props: {
-        value:{
-            default:''
-        },
-        width: {
-            type: Number,
-            default: 250
-        },
-        size: {
-            type: String,
-            default: "small"
-        },
-        placeholder: {
-            type: String,
-            default: "请选择"
-        },
-
-        // 虚拟列表在真实 dom 中保持渲染的项目数量
-        keeps: {
-            type: Number,
-            default: 30
-        },
-        // 每个项目的估计大小,如果更接近平均大小,则滚动条长度看起来更准确。 建议分配自己计算的平均值。
-        estimateSize: {
-            type: Number,
-            default: 32
-        },
-
-        // 是否多选
-        multiple: {
-            type: Boolean,
-            default: false,
-        },
-        idList:{
-
-        }
+  name: 'SelectVirtualList',
+  components: {
+    VirtualList
+  },
+  props: {
+    value: {
+      default: ''
     },
-    components: {
-        VirtualList
+    width: {
+      type: Number,
+      default: 250
     },
-    watch: {
-        visibleVirtualList(n) {
-            if (n) {
-                // 当展示虚拟列表时,需要定位到选择的位置
-                this.$nextTick(() => {
-                    let temp = this.curIndex ? this.curIndex : 0;
-                    // 方法一:手动设置滚动位置到指定索引。
-                    this.$refs.virtualListRef.scrollToIndex(temp - 1);
-                    // 方法二:手动将滚动位置设置为指定的偏移量。
-                    // this.$refs.virtualListRef.scrollToOffset(this.estimateSize * (temp - 1));
-                })
-            }
-        },
-        value(e){
-           console.log(e,'数据变了')
-        //    this.tags = []
-        //    if(this.multiple){
-        //     this.curId  = []
-        //    }else{
-        //     this.curId =''
-        //    }
-           
-        //    this.createGetValue()
-        },
+    size: {
+      type: String,
+      default: 'small'
     },
-    data() {
-        return {
-            curId: "", // 当前选择的 id
-            curValue: "", // 当前选择的值
-            curIndex: null, // 当前选择的索引
-            visibleVirtualList: false, // 是否显示虚拟列表
-            itemComponent: VirtualItem, // 由 vue 创建/声明的渲染项组件,它将使用 data-sources 中的数据对象作为渲染道具并命名为:source。
-            page: 1,
-            addPage: false,
-            dataList: [],
-            tags: [],//多选的标签列表
-        };
+    placeholder: {
+      type: String,
+      default: '请选择'
     },
-    created() {
-        // 监听点击子组件
-        this.$on('clickVirtualItem', (item) => {
-
-            if (this.multiple) {
-                let addCheck = true
-                this.tags.forEach(e=>{
-                    if(e.id == item.id){
-                        addCheck = false
-                    }
-                })
-                if(addCheck){
-                    this.tags.push(item)
-                }
-                
-                this.changegb()
-                this.getValueIds()
-
-            } else {
-                this.visibleVirtualList = false;
-                this.curId = item.id;
-                this.curValue = item.name;
-                this.curIndex = item.index;
-            }
-            this.$emit("input", this.curId);
 
+    // 虚拟列表在真实 dom 中保持渲染的项目数量
+    keeps: {
+      type: Number,
+      default: 30
+    },
+    // 每个项目的估计大小,如果更接近平均大小,则滚动条长度看起来更准确。 建议分配自己计算的平均值。
+    estimateSize: {
+      type: Number,
+      default: 32
+    },
 
+    // 是否多选
+    multiple: {
+      type: Boolean,
+      default: false
+    },
+    idList: {
 
+    }
+  },
+  data() {
+    return {
+      curId: '', // 当前选择的 id
+      curValue: '', // 当前选择的值
+      curIndex: null, // 当前选择的索引
+      visibleVirtualList: false, // 是否显示虚拟列表
+      itemComponent: VirtualItem, // 由 vue 创建/声明的渲染项组件,它将使用 data-sources 中的数据对象作为渲染道具并命名为:source。
+      page: 1,
+      addPage: false,
+      dataList: [],
+      tags: []// 多选的标签列表
+    }
+  },
+  watch: {
+    visibleVirtualList(n) {
+      if (n) {
+        // 当展示虚拟列表时,需要定位到选择的位置
+        this.$nextTick(() => {
+          const temp = this.curIndex ? this.curIndex : 0
+          // 方法一:手动设置滚动位置到指定索引。
+          this.$refs.virtualListRef.scrollToIndex(temp - 1)
+          // 方法二:手动将滚动位置设置为指定的偏移量。
+          // this.$refs.virtualListRef.scrollToOffset(this.estimateSize * (temp - 1));
         })
+      }
     },
-    mounted(){
+    value(e) {
+      console.log(e, '数据变了')
+      //    this.tags = []
+      //    if(this.multiple){
+      //     this.curId  = []
+      //    }else{
+      //     this.curId =''
+      //    }
+
+      //    this.createGetValue()
+    }
+  },
+  created() {
+    // 监听点击子组件
+    this.$on('clickVirtualItem', (item) => {
+      if (this.multiple) {
+        let addCheck = true
+        this.tags.forEach(e => {
+          if (e.id == item.id) {
+            addCheck = false
+          }
+        })
+        if (addCheck) {
+          this.tags.push(item)
+        }
+
+        this.changegb()
+        this.getValueIds()
+      } else {
+        this.visibleVirtualList = false
+        this.curId = item.id
+        this.curValue = item.name
+        this.curIndex = item.index
+      }
+      this.$emit('input', this.curId)
+    })
+  },
+  mounted() {
+    this.tags = []
+    if (this.multiple) {
+      this.curId = []
+    } else {
+      this.curId = ''
+    }
+    this.createGetValue()
+  },
+  methods: {
+    createGetValue() {
+      if (this.value instanceof Array) {
         this.tags = []
-        if(this.multiple){
-            this.curId  = []
-           }else{
-            this.curId =''
-           }
-        this.createGetValue()
+        this.init(this.value)
+      } else if (this.value) {
+        this.init([this.value])
+      }
+    },
+    // 多选获得id列表
+    getValueIds() {
+      const arr = []
+      this.tags.forEach(e => {
+        arr.push(e.id)
+      })
+      this.curId = arr
+    },
+    // 改变多选的光标
+    changegb() {
+      this.$nextTick(() => {
+        const el = document.querySelector('.yh-tag:last-child')
+        const top = el.offsetTop - el.clientHeight
+        const left = el.offsetLeft + el.clientWidth
+        document.querySelector('.yh-tag-input  .el-textarea__inner').style.paddingLeft = left + 10 + 'px'
+        document.querySelector('.yh-tag-input  .el-textarea__inner').style.paddingTop = top + 10 + 'px'
+        document.querySelector('.yh-tag-input  .el-textarea__inner').style.height = el.offsetTop + 40 + 'px'
+      })
+    },
+    delTag(index) {
+      // 多选删除标签
+      this.tags.splice(index, 1)
+      this.changegb()
+      this.getValueIds()
+      this.$emit('input', this.curId)
+    },
+    // 获得焦点时候
+    onFocus() {
+      this.page = 1
+      this.dataList = []
+      this.init()
     },
-    methods: {
-        createGetValue(){
-            if(this.value instanceof Array){
-                this.tags = []
-                this.init(this.value)
-            }else if(this.value){
-                this.init([this.value])
-            }
-        },
-        //多选获得id列表
-        getValueIds(){
-            let arr = []
-            this.tags.forEach(e=>{
-                arr.push(e.id)
-            })
-            this.curId = arr
-            
-        },
-        // 改变多选的光标
-        changegb(){
-            this.$nextTick(()=>{
-                let el = document.querySelector('.yh-tag:last-child')
-                let top = el.offsetTop - el.clientHeight
-                let left = el.offsetLeft + el.clientWidth
-                document.querySelector('.yh-tag-input  .el-textarea__inner').style.paddingLeft = left + 10 +'px'
-                document.querySelector('.yh-tag-input  .el-textarea__inner').style.paddingTop = top + 10  +'px'
-                document.querySelector('.yh-tag-input  .el-textarea__inner').style.height = el.offsetTop + 40 +'px'
-            })
-        },
-        delTag(index){
-            //多选删除标签
-            this.tags.splice(index, 1)
-            this.changegb()
-            this.getValueIds()
-            this.$emit("input", this.curId);
-           
-        },
-        // 获得焦点时候
-        onFocus() {
-            this.page = 1;
-            this.dataList = []
-            this.init()
-        },
-
-        init(ids) {
-            console.log('我去调取接口了')
-            let req = {
-                ids: ids?ids:this.idList?this.idList : [],
-                page: this.page,
-                rows: 10,
-                keywords: this.curValue,
-            }
-            queryDiseaseByPage(req).then(res => {
-                this.addPage = false
-                if (res.code == '0' && res.data && res.data.list) {
-                    this.dataList = [...this.dataList, ...res.data.list]
-                    if(ids){
-                        this.createValue(ids)
-                        this.$forceUpdate()
-                    }
 
-                }
-            })
-        },
-        // 输入框改变
-        handleInput(val) {
-            if (this.visibleVirtualList) {
-              
-                this.curId = "";
-                this.curIndex = null;
-                this.page=1;
-                this.dataList = []
-                this.init()
-            }
-        },
-        //滑到底部】
-        tobottom() {
-            if (this.addPage) {
-                return
+    init(ids) {
+      console.log('我去调取接口了')
+      const req = {
+        ids: ids || (this.idList ? this.idList : []),
+        page: this.page,
+        rows: 10,
+        keywords: this.curValue
+      }
+      queryDiseaseByPage(req).then(res => {
+        this.addPage = false
+        if (res.code == '0' && res.data && res.data.list) {
+          this.dataList = [...this.dataList, ...res.data.list]
+          if (ids) {
+            this.createValue(ids)
+            this.$forceUpdate()
+          }
+        }
+      })
+    },
+    // 输入框改变
+    handleInput(val) {
+      if (this.visibleVirtualList) {
+        this.curId = ''
+        this.curIndex = null
+        this.page = 1
+        this.dataList = []
+        this.init()
+      }
+    },
+    // 滑到底部】
+    tobottom() {
+      if (this.addPage) {
+        return
+      }
+      this.addPage = true
+      this.page++
+      this.init()
+    },
+    // 获取初始化的值
+    createValue(ids) {
+      this.tags = []
+      ids.forEach(element => {
+        this.dataList.forEach(e => {
+          if (e.id == element) {
+            if (this.multiple) {
+              this.tags.push(e)
+            } else {
+              this.curValue = e.name
             }
-            this.addPage = true
-            this.page++
-            this.init()
-        },
-        //获取初始化的值
-        createValue(ids){
-            this.tags = []
-            ids.forEach(element => {
-                this.dataList.forEach(e=>{
-                    if(e.id == element){
-                        if(this.multiple){
-                            this.tags.push(e)
-                        }else{
-                            this.curValue = e.name
-                        }
-                    }
-                }) 
-            });
-        },
+          }
+        })
+      })
     }
-};
+  }
+}
 </script>
 
 <style lang='scss'>
@@ -306,4 +323,4 @@ export default {
         }
     }
 }
-</style>
+</style>

+ 5 - 5
src/components/RONIN-select/illnessSelectNew.vue

@@ -77,7 +77,7 @@ export default {
       type: String,
       default: '请选择'
     },
-    idList:{
+    idList: {
 
     }
   },
@@ -97,11 +97,11 @@ export default {
   watch: {
     value(e, oldE) {
       this.dataList = []
-      
+
       if (e && e.length > 0) {
         this.createGetValue()
-      }else{
-        this.data =this.multiple? []:''
+      } else {
+        this.data = this.multiple ? [] : ''
       }
     }
   },
@@ -159,7 +159,7 @@ export default {
     },
     getData(ids, iscreate) {
       const req = {
-        ids:  ids?ids:this.idList?this.idList : [],
+        ids: ids || (this.idList ? this.idList : []),
         page: this.page,
         rows: 10,
         keywords: this.curValue,

+ 107 - 115
src/components/RONIN-select/index.vue

@@ -18,246 +18,238 @@
       :estimate-size="estimateSize"
       :item-class="'list-item-custom-class'"
       @tobottom="tobottom"
-    ></virtual-list>
+    />
     <el-input
       slot="reference"
-      :title="curValue"
       v-model="curValue"
+      :title="curValue"
       :style="`width:${width}px;`"
       :size="size"
       :placeholder="placeholderName"
       @focus="inputFocus"
       @input="inputChange"
       @blur="inputBlur"
-    ></el-input>
+    />
   </el-popover>
 </template>
 
 <script>
-import VirtualList from "vue-virtual-scroll-list";
-import VirtualItem from "./VirtualItem.vue";
-import { dataPage } from "@/api/rule/index";
-import { string } from "clipboard";
+import VirtualList from 'vue-virtual-scroll-list'
+import VirtualItem from './VirtualItem.vue'
+import { dataPage } from '@/api/rule/index'
+import { string } from 'clipboard'
 export default {
-  name: "SelectVirtualList",
+  name: 'SelectVirtualList',
+  components: {
+    VirtualList
+  },
   props: {
     value: {
       type: [String, Array],
-      default: "",
+      default: ''
     },
-    valName:{
-      type:string,
-      default:''
+    valName: {
+      type: string,
+      default: ''
     },
     width: {
       type: Number,
-      default: 140,
+      default: 140
     },
     size: {
       type: String,
-      default: "mini",
+      default: 'mini'
     },
     placeholder: {
       type: String,
-      default: "请选择",
+      default: '请选择'
     },
     dataList: {
       type: Array,
       default: () => {
-        return [];
-      },
+        return []
+      }
     },
     // 虚拟列表在真实 dom 中保持渲染的项目数量
     keeps: {
       type: Number,
-      default: 30,
+      default: 30
     },
     // 每个项目的估计大小,如果更接近平均大小,则滚动条长度看起来更准确。 建议分配自己计算的平均值。
     estimateSize: {
       type: Number,
-      default: 32,
+      default: 32
     },
     // input输入触发方法
     virtualInputCall: Function,
     // 点击每个项目触发方法
     virtualClickItemCall: Function,
     page: {
-      default: 1,
+      default: 1
     },
     total: {
-      default: 0,
+      default: 0
     },
     moreDataType: {
-      default: "",
-    },
+      default: ''
+    }
   },
-  components: {
-    VirtualList,
+  data() {
+    return {
+      placeholderName: '选择标准数据', // 显示名称
+      list: [],
+      curId: '', // 当前选择的 id
+      curValue: '', // 当前选择的值
+      curIndex: null, // 当前选择的索引
+      visibleVirtualList: false, // 是否显示虚拟列表
+      itemComponent: VirtualItem, // 由 vue 创建/声明的渲染项组件,它将使用 data-sources 中的数据对象作为渲染道具并命名为:source。
+      dataPage: 1
+    }
   },
   watch: {
     visibleVirtualList(n) {
       if (n) {
         // 当展示虚拟列表时,需要定位到选择的位置
         this.$nextTick(() => {
-          let temp = this.curIndex ? this.curIndex : 0;
+          const temp = this.curIndex ? this.curIndex : 0
           // 方法一:手动设置滚动位置到指定索引。
-          this.$refs.virtualListRef.scrollToIndex(temp - 1);
+          this.$refs.virtualListRef.scrollToIndex(temp - 1)
           // 方法二:手动将滚动位置设置为指定的偏移量。
           // this.$refs.virtualListRef.scrollToOffset(this.estimateSize * (temp - 1));
-        });
+        })
       }
     },
     value(val) {
-      if(!val){
-         this.curValue = ''
-         this.placeholderName = '选择标准数据'
-         
+      if (!val) {
+        this.curValue = ''
+        this.placeholderName = '选择标准数据'
       }
       this.curId = val
-     
+
       // this.getCreateValue();
     },
 
     // 修改超过list之后显示的名称
     valName(val) {
-      if(!val){
-         this.curValue = val
-         
+      if (!val) {
+        this.curValue = val
       }
-      
     },
 
     dataList: {
       handler(newName, oldName) {
-        this.upDateList();
+        this.upDateList()
         // this.getCreateDate();
-
       },
       // 开启深度监听
-      deep: true,
+      deep: true
     },
     page(e) {
-      this.dataPage = e;
-    },
-  },
-  data() {
-    return {
-      placeholderName: "选择标准数据", //显示名称
-      list: [],
-      curId: "", // 当前选择的 id
-      curValue: "", // 当前选择的值
-      curIndex: null, // 当前选择的索引
-      visibleVirtualList: false, // 是否显示虚拟列表
-      itemComponent: VirtualItem, // 由 vue 创建/声明的渲染项组件,它将使用 data-sources 中的数据对象作为渲染道具并命名为:source。
-      dataPage: 1,
-    };
+      this.dataPage = e
+    }
   },
   created() {
     console.log('我走了初始化数据11')
-    this.getCreateDate();
+    this.getCreateDate()
     // 监听点击子组件
-    this.$on("clickVirtualItem", (item) => {
-      this.curId = item.id;
-      this.curValue = item.name;
-      this.curIndex = item.index;
-      this.visibleVirtualList = false;
+    this.$on('clickVirtualItem', (item) => {
+      this.curId = item.id
+      this.curValue = item.name
+      this.curIndex = item.index
+      this.visibleVirtualList = false
       // 跟新下拉框列表的数据
-      this.$emit('ListChange',item)
-      this.$emit("input", item.id);
-      this.$emit("change", item.id);
+      this.$emit('ListChange', item)
+      this.$emit('input', item.id)
+      this.$emit('change', item.id)
       // this.virtualClickItemCall && this.virtualClickItemCall(item);
-    });
+    })
   },
   methods: {
     tobottom(e) {
-      console.log("abcccc");
-      let req = {
-        typeList: [],
-      };
+      console.log('abcccc')
+      const req = {
+        typeList: []
+      }
 
       req.typeList = [
         {
-          ids:[],
+          ids: [],
           page: this.dataPage + 1,
           rows: 100,
-          keywords:'',
-          type: this.moreDataType,
-        },
-      ];
+          keywords: '',
+          type: this.moreDataType
+        }
+      ]
 
-      if(e){
-        req.typeList[0].page =1
-         req.typeList[0].keywords =e
-         this.dataPage = 1
+      if (e) {
+        req.typeList[0].page = 1
+        req.typeList[0].keywords = e
+        this.dataPage = 1
       }
 
-       dataPage(req).then(res=>{
-        if(res.code =='0'){
-          this.dataPage++ 
-          if(e){
-             this.list = res.data[0].data.list
-          }else{
-             this.list = [...this.list,...res.data[0].data.list]
+      dataPage(req).then(res => {
+        if (res.code == '0') {
+          this.dataPage++
+          if (e) {
+            this.list = res.data[0].data.list
+          } else {
+            this.list = [...this.list, ...res.data[0].data.list]
           }
-         
-         
-          
         }
       })
     },
 
-     // 输入框改变
+    // 输入框改变
     inputChange(e) {
-        this.tobottom(e)
+      this.tobottom(e)
     },
     getCreateDate() {
-      this.list = [];
-      console.log(this.valName,'111111111')
-      this.curValue = this.valName;
-      this.curId = "";
+      this.list = []
+      console.log(this.valName, '111111111')
+      this.curValue = this.valName
+      this.curId = ''
       if (this.dataList && this.dataList.length > 0) {
-        this.list = JSON.parse(JSON.stringify(this.dataList));
+        this.list = JSON.parse(JSON.stringify(this.dataList))
       }
       if (this.value && this.dataList && this.dataList.length > 0) {
         this.list.forEach((item, index) => {
           if (item.id == this.value) {
-            this.curId = item.id;
-            this.curValue = item.name;
-            this.curIndex = index;
+            this.curId = item.id
+            this.curValue = item.name
+            this.curIndex = index
           }
-        });
+        })
       }
     },
-    upDateList(){
-     
-       this.list = JSON.parse(JSON.stringify(this.dataList));
-       if (this.value && this.dataList && this.dataList.length > 0) {
+    upDateList() {
+      this.list = JSON.parse(JSON.stringify(this.dataList))
+      if (this.value && this.dataList && this.dataList.length > 0) {
         this.list.forEach((item, index) => {
           if (item.id == this.value) {
-            this.curId = item.id;
-            this.curValue = item.name;
-            this.curIndex = index;
+            this.curId = item.id
+            this.curValue = item.name
+            this.curIndex = index
           }
-        });
+        })
       }
     },
-   
+
     inputFocus() {
       if (this.curValue) {
-        this.placeholderName = this.curValue;
-        this.curValue = "";
+        this.placeholderName = this.curValue
+        this.curValue = ''
       }
     },
     inputBlur() {
-      if (!this.curValue && this.placeholderName != "选择标准数据") {
+      if (!this.curValue && this.placeholderName != '选择标准数据') {
         // this.placeholderName = this.curValue
-        this.curValue = this.placeholderName;
+        this.curValue = this.placeholderName
       } else {
-        this.curValue = "";
+        this.curValue = ''
       }
-    },
-  },
-};
+    }
+  }
+}
 </script>
 
 <style lang='scss'>

+ 116 - 118
src/components/RONIN-select/select2.vue

@@ -4,7 +4,7 @@
     class="virtual-select-custom-style"
     :value="defaultValue"
     filterable
-    :size='size'
+    :size="size"
     :filter-method="filterMethod"
     default-first-option
     clearable
@@ -13,7 +13,7 @@
     :multiple="isMultiple"
     :allow-create="allowCreate"
     @visible-change="visibleChange"
-    @change='onDataChange'
+    @change="onDataChange"
     v-on="$listeners"
     @clear="clearChange"
   >
@@ -24,7 +24,6 @@
       :data-sources="selectArr"
       :data-component="itemComponent"
       :keeps="keepsParams"
-      @tobottom="tobottom"
       :extra-props="{
         label: label,
         value: value,
@@ -32,282 +31,281 @@
         isConcat: isConcat,
         concatSymbol: concatSymbol,
       }"
-    ></virtual-list>
+      @tobottom="tobottom"
+    />
   </el-select>
 </template>
 <script>
-import { string } from "clipboard";
+import { string } from 'clipboard'
 const validatenull = (val) => {
-  if (typeof val === "boolean") {
-    return false;
+  if (typeof val === 'boolean') {
+    return false
   }
-  if (typeof val === "number") {
-    return false;
+  if (typeof val === 'number') {
+    return false
   }
   if (val instanceof Array) {
-    if (val.length === 0) return true;
+    if (val.length === 0) return true
   } else if (val instanceof Object) {
-    if (JSON.stringify(val) === "{}") return true;
+    if (JSON.stringify(val) === '{}') return true
   } else {
     if (
-      val === "null" ||
+      val === 'null' ||
       val === null ||
-      val === "undefined" ||
+      val === 'undefined' ||
       val === undefined ||
-      val === ""
-    )
-      return true;
-    return false;
+      val === ''
+    ) { return true }
+    return false
   }
-  return false;
-};
-import virtualList from "vue-virtual-scroll-list";
-import ElOptionNode from "./selectItem.vue";
+  return false
+}
+import virtualList from 'vue-virtual-scroll-list'
+import ElOptionNode from './selectItem.vue'
 
-import { dataPage } from "@/api/rule/index";
+import { dataPage } from '@/api/rule/index'
 export default {
-  name: "VirtualSelect",
+  name: 'VirtualSelect',
   components: {
-    "virtual-list": virtualList,
+    'virtual-list': virtualList
   },
   model: {
-    prop: "bindValue",
-    event: "change",
+    prop: 'bindValue',
+    event: 'change'
   },
   props: {
     // 数组
-    size:{
-      default:'small'
+    size: {
+      default: 'small'
     },
     list: {
       type: Array,
       default() {
-        return [];
-      },
+        return []
+      }
     },
     // 显示名称
     label: {
       type: String,
-      default: "",
+      default: ''
     },
     // 标识
     value: {
       type: String,
-      default: "",
+      default: ''
     },
     // 是否拼接label | value
     isConcat: {
       type: Boolean,
-      default: false,
+      default: false
     },
     // 拼接label、value符号
     concatSymbol: {
       type: String,
-      default: " | ",
+      default: ' | '
     },
     // 显示右边
     isRight: {
       type: Boolean,
-      default: false,
+      default: false
     },
     // 加载条数
     keepsParams: {
       type: Number,
-      default: 10,
+      default: 10
     },
     // 绑定的默认值
     bindValue: {
       type: [String, Array],
       default() {
-        if (typeof this.bindValue === "string") return "";
-        return [];
-      },
+        if (typeof this.bindValue === 'string') return ''
+        return []
+      }
     },
     // 是否多选
     isMultiple: {
       type: Boolean,
-      default: false,
+      default: false
     },
     // 输入框占位文本
     placeholder: {
       type: String,
-      default: "请选择",
+      default: '请选择'
     },
     // 是否禁用
     disabled: {
       type: Boolean,
-      default: false,
+      default: false
     },
     // 是否允许创建条目
     allowCreate: {
       type: Boolean,
-      default: false,
+      default: false
     },
     searchType: {
       type: string,
-      default: "",
-    },
+      default: ''
+    }
   },
   data() {
     return {
       itemComponent: ElOptionNode,
       selectArr: [],
       defaultValue: null, // 绑定的默认值、、
-      dataPage:1,
-    };
+      dataPage: 1
+    }
   },
   watch: {
     list() {
-      this.init();
+      this.init()
     },
     bindValue: {
       handler(val, oldVal) {
-        this.defaultValue = this.bindValue;
-        if (validatenull(val)) this.clearChange();
-        this.init();
+        this.defaultValue = this.bindValue
+        if (validatenull(val)) this.clearChange()
+        this.init()
       },
       immediate: false,
-      deep: true,
-    },
+      deep: true
+    }
   },
   mounted() {
-    this.defaultValue = this.bindValue;
-    this.init();
+    this.defaultValue = this.bindValue
+    this.init()
   },
   methods: {
     init() {
       if (!this.defaultValue || this.defaultValue.length === 0) {
-        this.selectArr = this.list;
+        this.selectArr = this.list
       } else {
         // 回显问题
         // 由于只渲染固定keepsParams(10)条数据,当默认数据处于10条之外,在回显的时候会显示异常
         // 解决方法:遍历所有数据,将对应回显的那一条数据放在第一条
-        this.selectArr = JSON.parse(JSON.stringify(this.list));
-        let obj = {};
-        if (typeof this.defaultValue === "string" && !this.isMultiple) {
+        this.selectArr = JSON.parse(JSON.stringify(this.list))
+        let obj = {}
+        if (typeof this.defaultValue === 'string' && !this.isMultiple) {
           if (this.allowCreate) {
             const arr = this.selectArr.filter((val) => {
-              return val[this.value] === this.defaultValue;
-            });
+              return val[this.value] === this.defaultValue
+            })
             if (arr.length === 0) {
-              const item = {};
+              const item = {}
               // item[this.value] = `Create-${this.defaultValue}`
-              item[this.value] = this.defaultValue;
-              item[this.label] = this.defaultValue;
-              item.allowCreate = true;
-              this.selectArr.push(item);
-              this.$emit("selChange", item);
+              item[this.value] = this.defaultValue
+              item[this.label] = this.defaultValue
+              item.allowCreate = true
+              this.selectArr.push(item)
+              this.$emit('selChange', item)
             } else {
-              this.$emit("selChange", arr[0]);
+              this.$emit('selChange', arr[0])
             }
           }
 
           // 单选
           for (let i = 0; i < this.selectArr.length; i++) {
-            const element = this.selectArr[i];
+            const element = this.selectArr[i]
             try {
               if (
                 element[this.value].toLowerCase() ===
                 this.defaultValue.toLowerCase()
               ) {
-                obj = element;
-                this.selectArr.splice(i, 1);
-                break;
+                obj = element
+                this.selectArr.splice(i, 1)
+                break
               }
             } catch {}
           }
-          this.selectArr.unshift(obj);
+          this.selectArr.unshift(obj)
         } else if (this.isMultiple) {
           if (this.allowCreate) {
             this.defaultValue.map((v) => {
               const arr = this.selectArr.filter((val) => {
-                return val[this.value] === v;
-              });
+                return val[this.value] === v
+              })
               if (arr.length === 0) {
-                const item = {};
+                const item = {}
                 // item[this.value] = `Create-${v}`
-                item[this.value] = v;
-                item[this.label] = v;
-                item.allowCreate = true;
-                this.selectArr.push(item);
-                this.$emit("selChange", item);
+                item[this.value] = v
+                item[this.label] = v
+                item.allowCreate = true
+                this.selectArr.push(item)
+                this.$emit('selChange', item)
               } else {
-                this.$emit("selChange", arr[0]);
+                this.$emit('selChange', arr[0])
               }
-            });
+            })
           }
 
           // 多选
           for (let i = 0; i < this.selectArr.length; i++) {
-            const element = this.selectArr[i];
+            const element = this.selectArr[i]
             this.defaultValue.map((val) => {
               try {
                 if (element[this.value].toLowerCase() === val.toLowerCase()) {
-                  obj = element;
-                  this.selectArr.splice(i, 1);
-                  this.selectArr.unshift(obj);
+                  obj = element
+                  this.selectArr.splice(i, 1)
+                  this.selectArr.unshift(obj)
                 }
               } catch {}
-            });
+            })
           }
         }
       }
     },
     // 搜索
     filterMethod(e) {
-      console.log("abcccc");
-      let req = {
-        typeList: [],
-      };
+      console.log('abcccc')
+      const req = {
+        typeList: []
+      }
 
       req.typeList = [
         {
           ids: [],
-          page:  1,
+          page: 1,
           rows: 100,
-          keywords: "",
-          type: this.searchType,
-        },
-      ];
+          keywords: '',
+          type: this.searchType
+        }
+      ]
 
       if (e) {
-        req.typeList[0].page = 1;
-        req.typeList[0].keywords = e;
-        this.dataPage = 1;
+        req.typeList[0].page = 1
+        req.typeList[0].keywords = e
+        this.dataPage = 1
       }
 
       dataPage(req).then((res) => {
-        if (res.code == "0") {
-          this.dataPage = 2;
+        if (res.code == '0') {
+          this.dataPage = 2
           if (e) {
-            this.selectArr = res.data[0].data.list;
+            this.selectArr = res.data[0].data.list
           }
         }
-      });
+      })
     },
-    //滑到底部
+    // 滑到底部
     tobottom() {
       console.log('我滑到底部')
     },
     visibleChange(bool) {
       if (!bool) {
-        this.$refs.virtualList.reset();
-        this.init();
+        this.$refs.virtualList.reset()
+        this.init()
       }
-      this.$emit("visible-change", bool);
+      this.$emit('visible-change', bool)
     },
     clearChange() {
-      if (typeof this.defaultValue === "string") {
-        this.defaultValue = "";
+      if (typeof this.defaultValue === 'string') {
+        this.defaultValue = ''
       } else if (this.isMultiple) {
-        this.defaultValue = [];
+        this.defaultValue = []
       }
-      this.visibleChange(false);
+      this.visibleChange(false)
     },
-    onDataChange(e){
-        this.$emit("change", e);
-        
-    },
-  },
-};
+    onDataChange(e) {
+      this.$emit('change', e)
+    }
+  }
+}
 </script>

+ 50 - 50
src/components/RONIN-select/selectItem.vue

@@ -14,58 +14,58 @@
   </el-option>
 </template>
 <script>
-  export default {
-    name: 'ElOptionNode',
-    props: {
-      // 每一行的索引
-      index: {
-        type: Number,
-        default: 0
-      },
-      // 每一行的内容
-      source: {
-        type: Object,
-        default() {
-          return {}
-        }
-      },
-      // 需要显示的名称
-      label: {
-        type: String,
-        default: ''
-      },
-      // 绑定的值
-      value: {
-        type: String,
-        default: ''
-      },
-      // 是否拼接label | value
-      isConcat: {
-        type: Boolean,
-        default: false
-      },
-      // 拼接label、value符号
-      concatSymbol: {
-        type: String,
-        default: ' | '
-      },
-      // 右侧是否显示绑定的值
-      isRight: {
-        type: Boolean,
-        default() {
-          return false
-        }
+export default {
+  name: 'ElOptionNode',
+  props: {
+    // 每一行的索引
+    index: {
+      type: Number,
+      default: 0
+    },
+    // 每一行的内容
+    source: {
+      type: Object,
+      default() {
+        return {}
       }
     },
-    methods: {
-      concatString(a, b) {
-        a = a || ''
-        b = b || ''
-        if (this.isConcat) {
-          return a + ((a && b) ? this.concatSymbol : '') + b
-        }
-        return a
+    // 需要显示的名称
+    label: {
+      type: String,
+      default: ''
+    },
+    // 绑定的值
+    value: {
+      type: String,
+      default: ''
+    },
+    // 是否拼接label | value
+    isConcat: {
+      type: Boolean,
+      default: false
+    },
+    // 拼接label、value符号
+    concatSymbol: {
+      type: String,
+      default: ' | '
+    },
+    // 右侧是否显示绑定的值
+    isRight: {
+      type: Boolean,
+      default() {
+        return false
+      }
+    }
+  },
+  methods: {
+    concatString(a, b) {
+      a = a || ''
+      b = b || ''
+      if (this.isConcat) {
+        return a + ((a && b) ? this.concatSymbol : '') + b
       }
+      return a
     }
   }
-</script>
+}
+</script>

+ 228 - 233
src/components/RONIN-select/selectTag.vue

@@ -1,253 +1,248 @@
 <template>
-    <div class="popupSelect-container">
-      <div class="el-select" @click.stop="openDialog">
-        <div class="ronin-input" v-if="multiple">
-          <el-tag style='margin-right:2px' type='info' v-for="(item,index) in selectedData" :key='index'>{{item.name}}</el-tag>
-        </div>
-        <div  class="ronin-input" v-else>
-          {{selectedData[0]?selectedData[0].name:''}}
-        </div>
+  <div class="popupSelect-container">
+    <div class="el-select" @click.stop="openDialog">
+      <div v-if="multiple" class="ronin-input">
+        <el-tag v-for="(item,index) in selectedData" :key="index" style="margin-right:2px" type="info">{{ item.name }}</el-tag>
       </div>
-      <el-dialog
-        title="选择标签"
-        :close-on-click-modal="false"
-        :visible.sync="visible"
-        class="CCIT-dialog CCIT-dialog_center transfer-dialog"
-        lock-scroll
-        append-to-body
-        width="800px"
-        :modal-append-to-body="false"
-        @close="onClose"
-      >
-        <div class="transfer__body">
-          <div class="transfer-pane">
-          
-            <div class="transfer-pane__body">
-              <div class="ronin-box">
-                <div class="ronin-left">
-                  <div class="title">标签分类</div>
-                  <el-tree
-                    :data="treeData"
-                    :props="props"
-                    @node-click="handleNodeClick"
-                    class="CCIT-common-el-tree"
-                  >
-                  </el-tree>
-                </div>
-                <div class="ronin-right">
-                  <div class="title">标签列表</div>
-                  <div
-                    class="user-item"
-                    v-for="(item, index) in userList"
-                    :key="index"
-                    @click="onClickUserItem(item)"
-                  >
-                    {{ item.realName }}
-                  </div>
-                </div>
+      <div v-else class="ronin-input">
+        {{ selectedData[0]?selectedData[0].name:'' }}
+      </div>
+    </div>
+    <el-dialog
+      title="选择标签"
+      :close-on-click-modal="false"
+      :visible.sync="visible"
+      class="CCIT-dialog CCIT-dialog_center transfer-dialog"
+      lock-scroll
+      append-to-body
+      width="800px"
+      :modal-append-to-body="false"
+      @close="onClose"
+    >
+      <div class="transfer__body">
+        <div class="transfer-pane">
+
+          <div class="transfer-pane__body">
+            <div class="ronin-box">
+              <div class="ronin-left">
+                <div class="title">标签分类</div>
+                <el-tree
+                  :data="treeData"
+                  :props="props"
+                  class="CCIT-common-el-tree"
+                  @node-click="handleNodeClick"
+                />
               </div>
-            </div>
-          </div>
-          <div class="transfer-pane">
-            <div class="transfer-pane__tools">
-              <span>已选</span>
-              <el-button @click="removeAll" type="text" class="removeAllBtn"
-                >清空列表</el-button
-              >
-            </div>
-            <div class="transfer-pane__body shadow right-pane">
-              <template>
+              <div class="ronin-right">
+                <div class="title">标签列表</div>
                 <div
-                  v-for="(item, index) in selectedData"
+                  v-for="(item, index) in userList"
                   :key="index"
-                  class="selected-item"
+                  class="user-item"
+                  @click="onClickUserItem(item)"
                 >
-                  <span>{{ item.name }}</span>
-                  <i class="el-icon-delete" @click="removeData(index)"></i>
+                  {{ item.realName }}
                 </div>
-              </template>
+              </div>
             </div>
           </div>
         </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="visible = false">{{
-            $t("common.cancelButton")
-          }}</el-button>
-          <el-button type="primary" @click="confirm">{{
-            $t("common.confirmButton")
-          }}</el-button>
-        </span>
-      </el-dialog>
-    </div>
-  </template>
-  
-  <script>
-  import{categoryLabeTree,labelList } from "@/api/system/tag"
-  
-  export default {
-    name: "userSelect",
-  
-    props: {
-      value: {
-        type: [String, Array],
-        default: "",
-      },
-      placeholder: {
-        type: String,
-        default: "请选择",
-      },
-      disabled: {
-        type: Boolean,
-        default: false,
-      },
-      // 是否多选
-      multiple: {
-        type: Boolean,
-        default: false,
-      },
+        <div class="transfer-pane">
+          <div class="transfer-pane__tools">
+            <span>已选</span>
+            <el-button
+              type="text"
+              class="removeAllBtn"
+              @click="removeAll"
+            >清空列表</el-button>
+          </div>
+          <div class="transfer-pane__body shadow right-pane">
+            <template>
+              <div
+                v-for="(item, index) in selectedData"
+                :key="index"
+                class="selected-item"
+              >
+                <span>{{ item.name }}</span>
+                <i class="el-icon-delete" @click="removeData(index)" />
+              </div>
+            </template>
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="visible = false">{{
+          $t("common.cancelButton")
+        }}</el-button>
+        <el-button type="primary" @click="confirm">{{
+          $t("common.confirmButton")
+        }}</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { categoryLabeTree, labelList } from '@/api/system/tag'
+
+export default {
+  name: 'UserSelect',
+
+  props: {
+    value: {
+      type: [String, Array],
+      default: ''
     },
-    data() {
-      return {
-        visible: false,
-        keyword: "",
-        innerValue: "",
-        loading: false,
-        props: {
-          children: "children",
-          label: "name",
-          isLeaf: "isLeaf",
-        },
-        treeData: [],
-        selectedData: [],
-        tagsList: [],
-        userList: [],
-      };
+    placeholder: {
+      type: String,
+      default: '请选择'
     },
-    watch: {
-      value(val) {
-        this.setDefault();
-      },
+    disabled: {
+      type: Boolean,
+      default: false
     },
-    computed: {},
-    created() {
-     
+    // 是否多选
+    multiple: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      visible: false,
+      keyword: '',
+      innerValue: '',
+      loading: false,
+      props: {
+        children: 'children',
+        label: 'name',
+        isLeaf: 'isLeaf'
+      },
+      treeData: [],
+      selectedData: [],
+      tagsList: [],
+      userList: []
+    }
+  },
+  computed: {},
+  watch: {
+    value(val) {
+      this.setDefault()
+    }
+  },
+  created() {
+
+  },
+  mounted() {
+    this.setDefault()
+  },
+
+  methods: {
+    onClose() {},
+    openDialog() {
+      if (this.selectDisabled) return
+      this.visible = true
+      this.keyword = ''
+      this.selectedData = []
+      this.setDefault()
     },
-    mounted() {
-     this.setDefault();
+    confirm() {
+      this.innerValue = ''
+      let selectedIds = this.selectedData.map((o) => o.id)
+      if (!this.multiple) {
+        selectedIds = this.selectedData[0] ? this.selectedData[0].id : ''
+      }
+
+      this.$emit('input', selectedIds)
+      this.$emit('change', selectedIds, this.selectedData)
+
+      this.visible = false
     },
-  
-    methods: {
-      onClose() {},
-      openDialog() {
-        if (this.selectDisabled) return;
-        this.visible = true;
-        this.keyword = "";
-        this.selectedData = [];
-        this.setDefault();
-      },
-      confirm() {
-        this.innerValue = "";
-         let selectedIds = this.selectedData.map((o) => o.id);
-        if(!this.multiple){
-          selectedIds = this.selectedData[0]? this.selectedData[0].id:''
-        }
-       
-        this.$emit("input", selectedIds);
-        this.$emit("change", selectedIds, this.selectedData);
-  
-        this.visible = false;
-      },
-      setDefault() {
-        this.getAllList();
-          this.selectedData = [];
-           console.log('我走了ronin12',this.value)
-        if (!this.value || !this.value.length) {
-        
-        
-      
-          return;
-        }
-        const arr = this.multiple ? this.value : [this.value];
-        labelList({rows:1000}).then((res) => {
-          let list = res.data.list
-          arr.forEach(item=>{
-            list.forEach(element=>{
-              if(item == element.id){
-                 this.selectedData.push({name:element.realName, id :element.id})
-              }
-            })
-          })
-  
-          console.log(this.selectedData,'处理之后的数据11')
-  
-        });
-      },
-  
-      onClickUserItem(data) {
-        console.log(data, "1111111111111");
-        if (this.multiple) {
-          let addType = true;
-          this.selectedData.forEach((item) => {
-            if (item.id == data.id) {
-              addType = false;
+    setDefault() {
+      this.getAllList()
+      this.selectedData = []
+      console.log('我走了ronin12', this.value)
+      if (!this.value || !this.value.length) {
+        return
+      }
+      const arr = this.multiple ? this.value : [this.value]
+      labelList({ rows: 1000 }).then((res) => {
+        const list = res.data.list
+        arr.forEach(item => {
+          list.forEach(element => {
+            if (item == element.id) {
+              this.selectedData.push({ name: element.realName, id: element.id })
             }
-          });
-          if (addType) {
-            this.selectedData.push({
-              name: data.realName,
-              id: data.id,
-            });
+          })
+        })
+
+        console.log(this.selectedData, '处理之后的数据11')
+      })
+    },
+
+    onClickUserItem(data) {
+      console.log(data, '1111111111111')
+      if (this.multiple) {
+        let addType = true
+        this.selectedData.forEach((item) => {
+          if (item.id == data.id) {
+            addType = false
           }
-        } else {
-          this.selectedData = [
-            {
-              name: data.realName,
-              id: data.id,
-            },
-          ];
+        })
+        if (addType) {
+          this.selectedData.push({
+            name: data.realName,
+            id: data.id
+          })
         }
-      },
-      getData(typeId) {
-        console.log(companyNo,deptId)
-        //标签
-        labelList({ categoryId:typeId, rows:500 }).then((res) => {
-           this.userList = []
-          if(res.code == '0' && res.data){
-             this.userList = res.data.list;
+      } else {
+        this.selectedData = [
+          {
+            name: data.realName,
+            id: data.id
           }
-         
-        });
-      },
-      getAllList() {
-        this.loading = true;
-        categoryLabeTree({}).then((res) => {
-          this.treeData = res.data;
-          this.loading = false;
-        });
-      },
-  
-      handleNodeClick(data) {
-        //获取点击部门下的人员列表
-        console.log("我走了哈哈哈", data);
-        this.getData(data.id);
-      },
-  
-      removeAll() {
-        this.selectedData = [];
-      },
-      removeData(index) {
-        this.selectedData.splice(index, 1);
-      },
-      deleteTag(event, index) {
-        this.selectedData.splice(index, 1);
-        this.confirm();
-        event.stopPropagation();
-      },
+        ]
+      }
+    },
+    getData(typeId) {
+      console.log(companyNo, deptId)
+      // 标签
+      labelList({ categoryId: typeId, rows: 500 }).then((res) => {
+        this.userList = []
+        if (res.code == '0' && res.data) {
+          this.userList = res.data.list
+        }
+      })
     },
-  };
-  </script>
-  
-  
+    getAllList() {
+      this.loading = true
+      categoryLabeTree({}).then((res) => {
+        this.treeData = res.data
+        this.loading = false
+      })
+    },
+
+    handleNodeClick(data) {
+      // 获取点击部门下的人员列表
+      console.log('我走了哈哈哈', data)
+      this.getData(data.id)
+    },
+
+    removeAll() {
+      this.selectedData = []
+    },
+    removeData(index) {
+      this.selectedData.splice(index, 1)
+    },
+    deleteTag(event, index) {
+      this.selectedData.splice(index, 1)
+      this.confirm()
+      event.stopPropagation()
+    }
+  }
+}
+</script>
+
   <style lang='scss' scoped>
   .ronin-box {
     display: flex;
@@ -258,7 +253,7 @@
     }
     .ronin-right {
       flex: 1;
-  
+
       .user-item {
         cursor: pointer;
         width: 100%;
@@ -278,7 +273,7 @@
       font-size: 16px;
     }
   }
-  
+
   .ronin-input {
     width: 100%;
     height: 32px;
@@ -289,4 +284,4 @@
     flex-direction: row;
     align-items: center;
   }
-  </style>
+  </style>

+ 40 - 40
src/components/Widget/common/common-article.vue

@@ -1,17 +1,17 @@
 <template>
   <div class="common-box">
     <div
-      class="common-article"
       ref="common-article"
+      class="common-article"
       :style="
         'padding:' +
-        data.options.paddingTB +
-        'px ' +
-        data.options.paddingLF +
-        'px'
+          data.options.paddingTB +
+          'px ' +
+          data.options.paddingLF +
+          'px'
       "
     >
-      <div class="common-article-title" v-if="data.options.title != ''">
+      <div v-if="data.options.title != ''" class="common-article-title">
         {{ data.options.title }}
       </div>
 
@@ -25,7 +25,7 @@
             <img
               src="@/assets/images/img-article-nodata@3x.png"
               class="common-article-list-item-img"
-            />
+            >
           </div>
           <div class="common-article-list-item">
             <div class="common-article-list-item-info">
@@ -35,14 +35,14 @@
             <img
               src="@/assets/images/img-article-nodata@3x.png"
               class="common-article-list-item-img"
-            />
+            >
           </div>
         </template>
         <template v-else>
           <div
-            class="common-article-list-item"
             v-for="(item, index) in data.options.list"
             :key="'article-' + index"
+            class="common-article-list-item"
           >
             <div class="common-article-list-item-info">
               <h3>{{ item.title }}</h3>
@@ -52,7 +52,7 @@
               v-if="item.url && item.url !== ''"
               :src="item.host + '/' + item.url"
               class="common-article-list-item-img"
-            />
+            >
           </div>
         </template>
         <!-- <template v-else>
@@ -78,48 +78,59 @@
 </template>
 
 <script>
-import _ from "lodash";
+import _ from 'lodash'
 
 export default {
   components: {},
   props: {
     data: null,
     editMode: () => {
-      return false;
-    },
+      return false
+    }
   },
 
   data() {
     return {
       list: [],
       listQuery: {
-        diseaseId: "",
-        deptId: "",
-        articleCategoryId: "",
+        diseaseId: '',
+        deptId: '',
+        articleCategoryId: '',
         page: 1,
         rows: 20,
-        keywords: "",
-      },
-    };
+        keywords: ''
+      }
+    }
   },
   computed: {},
+  watch: {
+    data: {
+      // 深度监听,可监听到对象、数组的变化
+      handler(newV, oldV) {
+        // do something, 可使用this
+        console.log(newV, oldV)
+        this.resetData()
+      },
+      deep: true
+    }
+  },
   mounted() {
-    this.init_article();
+    this.init_article()
   },
   methods: {
     resetData() {
-      this.list = [];
-      this.init_article();
+      this.list = []
+      this.init_article()
     },
     listToStr(list, symbol) {
-      var str = "";
+      var str = ''
       if (list.length > 0) {
-        str = list.join(symbol);
+        str = list.join(symbol)
       }
-      return str;
+      return str
     },
     async init_article() {
-      return;
+      return
       // let arr = _.cloneDeep(this.data.options.list);
       // let arrs = [];
       // for (let v of arr) {
@@ -141,7 +152,7 @@ export default {
       //   })
       //   //this.list = data;
       // }
-    },
+    }
     // async get_detail(arr) {
     //   if (!arr.length) {
     //     return;
@@ -151,19 +162,8 @@ export default {
     //   arr.splice(0, 1);
     //   this.get_detail(arr);
     // },
-  },
-  watch: {
-    data: {
-      //深度监听,可监听到对象、数组的变化
-      handler(newV, oldV) {
-        // do something, 可使用this
-        console.log(newV, oldV);
-        this.resetData();
-      },
-      deep: true,
-    },
-  },
-};
+  }
+}
 </script>
 
 <style scoped lang="scss">

+ 11 - 11
src/components/Widget/common/common-copyright.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="common-copyright" ref="common-copyright"  :style="'padding:' + data.options.paddingTB + 'px ' + data.options.paddingLF+'px'">
-    <div class="common-copyright-box" v-html="data.options.content"></div>
+  <div ref="common-copyright" class="common-copyright" :style="'padding:' + data.options.paddingTB + 'px ' + data.options.paddingLF+'px'">
+    <div class="common-copyright-box" v-html="data.options.content" />
   </div>
 </template>
 
@@ -14,23 +14,23 @@ export default {
   props: {
     data: null,
     editMode: () => {
-      return false;
-    },
+      return false
+    }
   },
   data() {
-    return {};
+    return {}
   },
-  mounted() {},
-  methods: {},
   watch: {
     data: {
       deep: true,
       handler: function handler() {
-        //this.getSize();
-      },
-    },
+        // this.getSize();
+      }
+    }
   },
-};
+  mounted() {},
+  methods: {}
+}
 </script>
 
 <style scoped>

+ 14 - 15
src/components/Widget/common/common-header.vue

@@ -1,18 +1,18 @@
 <template>
   <div class="common-box">
-    <div class="common-title" ref="common-title">
+    <div ref="common-title" class="common-title">
       <h1>{{ data.options.title }}</h1>
     </div>
     <div class="common-ai">
-    
+
       <div class="common-ai-info">
-        <span><span class="links">{{send_company}}{{data.options.rooms?data.options.rooms:''}}</span>  发表</span>
+        <span><span class="links">{{ send_company }}{{ data.options.rooms?data.options.rooms:'' }}</span>  发表</span>
       </div>
 
     </div>
-    <div class="common-ai-alert" v-if="data.options.type !== 'none'">
+    <div v-if="data.options.type !== 'none'" class="common-ai-alert">
       <div class="common-ai-alert-arrow">
-        <div class="common-ai-alert-arrow-block"></div>
+        <div class="common-ai-alert-arrow-block" />
       </div>
       <div class="common-ai-alert-box">
         <template v-if="data.options.type === 'do-dialog'">
@@ -47,7 +47,7 @@
               <p>检查检验看病</p>
             </div>
             <div class="action">
-              <div class="circle"></div>
+              <div class="circle" />
               <div class="btn">查看详情</div>
             </div>
           </div>
@@ -79,7 +79,7 @@
               <div class="des">检验</div>
             </div>
             <p>发现异常指标<i class="red">3</i> 项</p>
-             <div class="btn">查看详情</div>
+            <div class="btn">查看详情</div>
           </div>
           <div class="common-banner">
             <div class="info">
@@ -87,7 +87,7 @@
               <p>检查检验看病</p>
             </div>
             <div class="action">
-              <div class="circle"></div>
+              <div class="circle" />
               <div class="btn">查看详情</div>
             </div>
           </div>
@@ -119,22 +119,21 @@
 
 <script>
 
-
 export default {
   components: {},
   props: {
-    data: null,
+    data: null
   },
 
   data() {
     return {
-      send_company: '皖北煤电集团总医院',
-    };
+      send_company: '皖北煤电集团总医院'
+    }
   },
   computed: {},
-  methods: {},
   watch: {},
-};
+  methods: {}
+}
 </script>
 
 <style scoped lang="scss">
@@ -174,7 +173,7 @@ export default {
 .common-ai .common-ai-info {
   width: 100%;
   color: #999;
-  
+
 }
 .links{
     color: #0052D9

+ 24 - 25
src/components/Widget/common/common-img.vue

@@ -1,62 +1,61 @@
 <template>
   <div
-    class="common-img"
     ref="commonImg"
+    class="common-img"
     :style="
       'margin:' + data.options.paddingTB + 'px ' + data.options.paddingLF + 'px'
     "
   >
     <img
-     :src="data.options.url"
       v-if="data.options.url !== '' "
+      :src="data.options.url"
       class="swipe-imgs"
-    />
+    >
     <div v-else class="swipeBox__empty">
-      <i class="el-icon-picture-outline"></i> 请在右侧添加图片
+      <i class="el-icon-picture-outline" /> 请在右侧添加图片
     </div>
   </div>
 </template>
 
 <script>
 
-
 export default {
   components: {},
   props: {
     data: null,
-    editMode: ()=>{
+    editMode: () => {
       return false
-    },
+    }
   },
   data() {
     return {
-      offsetWidth: 0,
-    };
+      offsetWidth: 0
+    }
   },
   computed: {},
+
+  watch: {},
   methods: {
-    itemHeight: function () {
+    itemHeight: function() {
       if (!this.data.options.ratio) {
-        return (this.offsetWidth - paddingLF * 2) * 1;
+        return (this.offsetWidth - paddingLF * 2) * 1
       }
       this.$nextTick(() => {
-        this.offsetWidth = this.$refs.commonImg.offsetWidth;
-      });
+        this.offsetWidth = this.$refs.commonImg.offsetWidth
+      })
 
-      let arr = this.data.options.ratio.split("-");
-      let xRatio = Number.parseInt(arr[0]);
-      let yRatio = Number.parseInt(arr[1]);
-      let ratio = yRatio / xRatio;
-      let paddingLF = 0;
+      const arr = this.data.options.ratio.split('-')
+      const xRatio = Number.parseInt(arr[0])
+      const yRatio = Number.parseInt(arr[1])
+      const ratio = yRatio / xRatio
+      let paddingLF = 0
       if (this.data) {
-        paddingLF = this.data.options.paddingLF;
+        paddingLF = this.data.options.paddingLF
       }
-      return (this.offsetWidth - paddingLF * 2) * ratio;
-    },
-  },
-
-  watch: {},
-};
+      return (this.offsetWidth - paddingLF * 2) * ratio
+    }
+  }
+}
 </script>
 
 <style scoped>

+ 24 - 24
src/components/Widget/common/common-map.vue

@@ -1,7 +1,7 @@
 <template>
   <div
-    class="common-map"
     ref="commonMap"
+    class="common-map"
     :style="
       'margin:' + data.options.paddingTB + 'px ' + data.options.paddingLF + 'px'
     "
@@ -20,7 +20,7 @@
           :position="[data.options.lng, data.options.lat]"
         ></el-amap-marker>
       </el-amap> -->
-      <div id="map" style="height: 100%"></div>
+      <div id="map" style="height: 100%" />
     </div>
     <!-- <div v-else class="swipeBox__empty">
       <i class="el-icon-picture-outline"></i>请在右侧添加图片
@@ -32,17 +32,17 @@
 export default {
   props: {
     data: null,
-    editMode: ()=>{
+    editMode: () => {
       return false
     },
     list: {
-      default: () =>[],
+      default: () => [],
       type: Array
-    },
+    }
   },
   data() {
     return {
-      
+
       // zoom: 16,
       // center: [121.59996, 31.197646],
       // address: "",
@@ -74,49 +74,49 @@ export default {
       // lat: 0,
       amap: null,
       infoWindow: null,
-      marker: null,
-    };
+      marker: null
+    }
   },
   computed: {},
+
+  watch: {},
   mounted() {
     this.init_map()
   },
   methods: {
     init_map() {
-      if(!this.data.options._location) {
+      if (!this.data.options._location) {
         return
       }
-      let location = this.data.options._location[0]
-      this.amap = new AMap.Map("map", {
+      const location = this.data.options._location[0]
+      this.amap = new AMap.Map('map', {
         zoom: 11,
         center: [location.lng, location.lat],
         resizeEnable: true
       })
       this.infoWindow = new AMap.InfoWindow({
-        anchor: 'middle-right',
+        anchor: 'middle-right'
       })
       this.amap.clearMap()
-      this.data.options._location.forEach(item=>{
+      this.data.options._location.forEach(item => {
         this.addMarker([item.lng, item.lat])
       })
     },
 
     addMarker(position) {
-      let that = this
-      let marker = new AMap.Marker({
-        icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
-        position:position,
+      const that = this
+      const marker = new AMap.Marker({
+        icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
+        position: position,
         offset: new AMap.Pixel(-30, -30)
-      });
-      marker.setMap(that.amap);
+      })
+      marker.setMap(that.amap)
     },
     updateIcon(index) {
       this.marker_arr[index].setIcon('//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png')
-    } 
-  },
-
-  watch: {},
-};
+    }
+  }
+}
 </script>
 
 <style scoped>

+ 22 - 19
src/components/Widget/common/common-rich-text.vue

@@ -7,17 +7,20 @@
 -->
 <template>
   <div class="common-box">
-    <div class="common-rich-text" ref="common-rich-text" v-html="data.options.des"   :style="
-      'padding-top:' +
-      data.options.paddingTB +
-      'px ;padding-left:' +
-      data.options.paddingLF +
-      'px;padding-right:' +
-      data.options.paddingLF +
-      'px'
-    ">
-      
-    </div>
+    <div
+      ref="common-rich-text"
+      class="common-rich-text"
+      :style="
+        'padding-top:' +
+          data.options.paddingTB +
+          'px ;padding-left:' +
+          data.options.paddingLF +
+          'px;padding-right:' +
+          data.options.paddingLF +
+          'px'
+      "
+      v-html="data.options.des"
+    />
   </div>
 </template>
 
@@ -32,13 +35,15 @@ export default {
   props: {
     data: null,
     editMode: () => {
-      return false;
-    },
+      return false
+    }
   },
 
   data() {
-    return {};
+    return {}
   },
+  computed: {},
+  watch: {},
   mounted() {
     // if(this.data.options.paddingTB===0){
     //   this.data.options.paddingTB = 14
@@ -47,12 +52,10 @@ export default {
     //   this.data.options.paddingLF = 14
     // }
   },
-  computed: {},
-  methods: {},
-  watch: {},
-  created(){
+  created() {
   },
-};
+  methods: {}
+}
 </script>
 
 <style>

+ 12 - 13
src/components/Widget/common/common-tips.vue

@@ -1,39 +1,38 @@
 <template>
-  <div class="common-tips" ref="common-title" >
-    <div class="common-tips-box" v-html="data.options.title" ></div>
+  <div ref="common-title" class="common-tips">
+    <div class="common-tips-box" v-html="data.options.title" />
   </div>
 </template>
 
 <script>
 
-
 export default {
   components: {},
   props: {
     data: null,
     editMode: () => {
-      return false;
-    },
+      return false
+    }
   },
   data() {
-    return {};
+    return {}
   },
-  mounted() {},
-  methods: {},
   watch: {
     data: {
       deep: true,
       handler: function handler() {
-        //this.getSize();
-      },
-    },
+        // this.getSize();
+      }
+    }
   },
-};
+  mounted() {},
+  methods: {}
+}
 </script>
 
 <style scoped  >
 .common-tips {
- 
+
 }
 
 .common-tips-box {

+ 23 - 23
src/components/Widget/common/common-title.vue

@@ -7,8 +7,8 @@
 -->
 <template>
   <div
-    class="common-title"
     ref="common-title"
+    class="common-title"
     :style="'padding-top:' + data.options.paddingTB + 'px'"
   >
     <!-- <div class="common-title-circle"></div>
@@ -20,45 +20,45 @@
 <script>
 export default {
   components: {},
+  filters: {
+    restFilter(val) {
+      if (!val) return ''
+      return val.charAt(0)
+    }
+  },
   props: {
     data: null,
     editMode: () => {
-      return false;
-    },
-  },
-  filters: {
-    restFilter(val) {
-      if (!val) return "";
-      return val.charAt(0);
-    },
+      return false
+    }
   },
   data() {
-    return {};
+    return {}
+  },
+  watch: {
+    data: {
+      deep: true,
+      handler: function handler() {
+        // this.getSize();
+      }
+    }
   },
   mounted() {
     if (this.data.options.paddingTB === 0) {
-      this.data.options.paddingTB = 14;
+      this.data.options.paddingTB = 14
     }
     if (this.data.options.paddingLF === 0) {
-      this.data.options.paddingLF = 14;
+      this.data.options.paddingLF = 14
     }
   },
-  methods: {},
-  watch: {
-    data: {
-      deep: true,
-      handler: function handler() {
-        //this.getSize();
-      },
-    },
-  },
-};
+  methods: {}
+}
 </script>
 
 <style scoped lang="scss">
 .common-title {
   padding: 8px 14px;
-  
+
   & h1 {
     position: relative;
     font-size: 20px;

+ 9 - 9
src/components/Widget/common/common-video.vue

@@ -1,20 +1,20 @@
 <template>
   <div
-    class="common-video"
     ref="commonVideo"
+    class="common-video"
     :style="'margin:' + data.options.paddingTB + 'px '"
   >
     <div
+      v-if="data.options.type === 'video_code'"
       class="video-box"
       v-html="data.options.url"
-      v-if="data.options.type === 'video_code'"
-    ></div>
+    />
     <video
+      v-if="data.options.url === ''"
       muted
       data-autoplay
       loop="loop"
       controls="controls"
-      v-if="data.options.url === ''"
       autoplay="autoplay"
       src="https://eshowtest.oss-cn-shanghai.aliyuncs.com/ui/15s.mp4"
       class="common-video-player"
@@ -23,11 +23,11 @@
       抱歉,您的浏览器不支持内嵌视频
     </video>
     <video
+      v-if="data.options.url !== '' && data.options.type === 'oss_url'"
       muted
       data-autoplay
       loop="loop"
       controls="controls"
-      v-if="data.options.url !== '' && data.options.type === 'oss_url'"
       autoplay="autoplay"
       :src="data.options.url"
       class="common-video-player"
@@ -42,15 +42,15 @@
 export default {
   components: {},
   props: {
-    data: null,
+    data: null
   },
   data() {
-    return {};
+    return {}
   },
   computed: {},
-  methods: {},
   watch: {},
-};
+  methods: {}
+}
 </script>
 
 <style scoped lang="scss">

+ 10 - 12
src/components/Widget/hospital/hospital-check.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="hospital-check" ref="hospital-check">
-    <div class="hospital-check-box" v-if="data.options.planid == ''">
+  <div ref="hospital-check" class="hospital-check">
+    <div v-if="data.options.planid == ''" class="hospital-check-box">
       <div class="header">
         <h3>你也可以先做以下检查快速排筛</h3>
         <p>出检查报告后医生帮您排查,准确率高,免排队</p>
@@ -28,7 +28,7 @@
         <div class="btn">预约</div>
       </div>
     </div>
-    <div class="hospital-check-box" v-else>
+    <div v-else class="hospital-check-box">
       <div class="header">
         <h3>{{ data.options.title }}</h3>
         <p>{{ data.options.des }}</p>
@@ -43,8 +43,7 @@
                 v-for="(item, index) in data.options.model.exam_list"
                 :key="'exam_list_' + index"
               >
-                {{ item.name }}</span
-              >
+                {{ item.name }}</span>
             </p>
           </div>
         </div>
@@ -57,8 +56,7 @@
                 v-for="(item, index) in data.options.model.lab_list"
                 :key="'lab_list_' + index"
               >
-                {{ item.name }}</span
-              >
+                {{ item.name }}</span>
             </p>
           </div>
         </div>
@@ -79,16 +77,16 @@ export default {
   components: {},
   props: {
     data: null,
-    editMode: false,
+    editMode: false
   },
 
   data() {
-    return {};
+    return {}
   },
   computed: {},
-  methods: {},
   watch: {},
-};
+  methods: {}
+}
 </script>
 
 <style scoped lang="scss">
@@ -126,7 +124,7 @@ export default {
         }
         .info {
           flex: 1;
-          
+
           h3 {
             margin: 0;
             font-size: 16px;

+ 15 - 17
src/components/Widget/hospital/hospital-dept.vue

@@ -1,13 +1,13 @@
 <template>
   <div
-    class="hospital-dept"
     ref="hospital-dept"
+    class="hospital-dept"
     :style="
       'padding-top:' +
-      data.options.paddingTB +
-      'px;padding-bottom:' +
-      data.options.paddingTB +
-      'px'
+        data.options.paddingTB +
+        'px;padding-bottom:' +
+        data.options.paddingTB +
+        'px'
     "
   >
     <h3 v-if="data.options.title != ''">
@@ -18,31 +18,30 @@
         <h1>{{ data.options.deptDetails.name }} 挂号</h1>
         <p>点击查看科室专家</p>
       </div>
-      <img src="@/assets/images/img-doctor-app.png" class="img" />
+      <img src="@/assets/images/img-doctor-app.png" class="img">
     </div>
   </div>
 </template>
-  
-  <script>
+
+<script>
 export default {
   components: {},
+  filters: {},
   props: {
     data: null,
     editMode: () => {
-      return false;
-    },
+      return false
+    }
   },
-  filters: {},
   data() {
-    return {};
+    return {}
   },
   computed: {},
-  methods: {},
   watch: {},
-};
+  methods: {}
+}
 </script>
-  
-  
+
   <style scoped lang="scss">
 .hospital-dept {
   padding: 14px;
@@ -82,4 +81,3 @@ export default {
   }
 }
 </style>
-  

+ 13 - 14
src/components/Widget/hospital/hospital-doctor.vue

@@ -1,13 +1,13 @@
 <template>
   <div
-    class="hospital-doctor"
     ref="hospital-doctor"
+    class="hospital-doctor"
     :style="
       'padding-top:' +
-      data.options.paddingTB +
-      'px;padding-bottom:' +
-      data.options.paddingTB +
-      'px'
+        data.options.paddingTB +
+        'px;padding-bottom:' +
+        data.options.paddingTB +
+        'px'
     "
   >
     <h3 v-if="data.options.title != ''">
@@ -17,7 +17,7 @@
       <div class="hospital-doctor-box-item">
         <div class="doctor-info">
           <div class="logos">
-            <img src="@/assets/avatar/Avatar-04.png" />
+            <img src="@/assets/avatar/Avatar-04.png">
           </div>
           <div class="userinfo">
             <span class="name">周春霞</span>
@@ -31,7 +31,7 @@
       <div class="hospital-doctor-box-item">
         <div class="doctor-info">
           <div class="logos">
-            <img src="@/assets/avatar/Avatar-02.png" />
+            <img src="@/assets/avatar/Avatar-02.png">
           </div>
           <div class="userinfo">
             <span class="name">桑学梅</span>
@@ -49,23 +49,22 @@
 <script>
 export default {
   components: {},
+  filters: {},
   props: {
     data: null,
     editMode: () => {
-      return false;
-    },
+      return false
+    }
   },
-  filters: {},
   data() {
-    return {};
+    return {}
   },
   computed: {},
-  methods: {},
   watch: {},
-};
+  methods: {}
+}
 </script>
 
-
 <style scoped lang="scss">
 .hospital-doctor {
   padding: 14px;

+ 33 - 26
src/components/Widget/hospital/hospital-form.vue

@@ -6,7 +6,7 @@
  * @Description: file content
 -->
 <template>
-  <div class="hospital-form" ref="hospital-form">
+  <div ref="hospital-form" class="hospital-form">
     <div class="hospital-form-box">
       <div class="header">
         <div class="info">
@@ -19,7 +19,7 @@
         <div class="title">{{ index + 1 }}. {{ item.title }}
         </div>
 
-        <div class="sub-title" v-if="item.subTitle">{{ item.subTitle }}</div>
+        <div v-if="item.subTitle" class="sub-title">{{ item.subTitle }}</div>
 
         <!-- 输入框 -->
         <div v-if="item.type == 'input'" class="input-box">
@@ -28,23 +28,31 @@
 
         <!-- 单选框 -->
         <div v-if="item.type == 'checkbox'" class="btn-box">
-          <div class="btn btn-checkbox" :class="ele.check ? 'btn-check' : ''"
-            v-for="(ele, index) in item.listContent.items" :key="index + 'aa'" @click="onClickCheck(index)">
+          <div
+            v-for="(ele, index) in item.listContent.items"
+            :key="index + 'aa'"
+            class="btn btn-checkbox"
+            :class="ele.check ? 'btn-check' : ''"
+            @click="onClickCheck(index)"
+          >
             {{ ele.n }}
           </div>
         </div>
 
         <div v-if="item.type == 'radio'">
-          <div class="btn" :class="ele.check ? 'btn-check' : ''" v-for="(ele, index) in item.listContent.items"
-            :key="index + 'aa'" @click="onClickCheck(index)">
+          <div
+            v-for="(ele, index) in item.listContent.items"
+            :key="index + 'aa'"
+            class="btn"
+            :class="ele.check ? 'btn-check' : ''"
+            @click="onClickCheck(index)"
+          >
             {{ ele.n }}
           </div>
         </div>
 
-
         <div v-if="item.type == 'date'">
-          <el-date-picker v-model="item.checkModel" type="date" style="width: 100%;" placeholder="选择日期">
-          </el-date-picker>
+          <el-date-picker v-model="item.checkModel" type="date" style="width: 100%;" placeholder="选择日期" />
         </div>
       </div>
 
@@ -56,13 +64,20 @@
 </template>
 
 <script>
-import { scaleUpdateItem, scaleInfoFull } from "@/api/scale";
+import { scaleUpdateItem, scaleInfoFull } from '@/api/scale'
 export default {
   components: {},
   props: {
     data: null,
-    editMode: false,
+    editMode: false
   },
+
+  data() {
+    return {
+      list: []
+    }
+  },
+  computed: {},
   watch: {
     data: {
       handler(val) {
@@ -70,36 +85,28 @@ export default {
         this.init()
       },
       deep: true
-    },
-  },
-
-
-  data() {
-    return {
-      list: []
-    };
+    }
   },
   mounted() {
     this.init()
   },
-  computed: {},
   methods: {
     init() {
       console.log(this.data, '数据变动了')
       if (this.data && this.data.options && this.data.options.fid) {
-        let id = this.data.options.fid;
+        const id = this.data.options.fid
         scaleInfoFull({ id }).then((res) => {
           if (res.data) {
-            this.list = res.data.items;
+            this.list = res.data.items
           }
-        });
+        })
       }
     },
     onClickCheck(index) {
 
-    },
-  },
-};
+    }
+  }
+}
 </script>
 
 <style scoped lang="scss">

+ 46 - 49
src/components/Widget/index.vue

@@ -4,29 +4,29 @@
       <common-article
         v-if="element.code === 'common-article'"
         :data="element"
-      ></common-article>
+      />
 
       <common-copyright
         v-if="element.code === 'common-copyright'"
         :data="element"
-      ></common-copyright>
+      />
 
       <common-title
         v-if="element.code === 'common-title'"
         :data="element"
-      ></common-title>
+      />
       <common-header
         v-if="element.code === 'common-header'"
         :data="element"
-      ></common-header>
+      />
       <common-rich-text
         v-if="element.code === 'common-rich-text'"
         :data="element"
-      ></common-rich-text>
+      />
       <common-tips
         v-if="element.code === 'common-tips'"
         :data="element"
-      ></common-tips>
+      />
 
       <!-- <common-map
             v-if="element.code === 'common-map'"
@@ -36,78 +36,76 @@
       <common-video
         v-if="element.code === 'common-video'"
         :data="element"
-      ></common-video>
+      />
 
       <common-img
         v-if="element.code === 'common-img'"
         :data="element"
-      ></common-img>
+      />
 
       <hospital-doctor
         v-if="element.code === 'hospital-doctor'"
         :data="element"
-      ></hospital-doctor>
+      />
 
       <hospital-dept
         v-if="element.code === 'hospital-dept'"
         :data="element"
-      ></hospital-dept>
+      />
 
       <hospital-approved
         v-if="element.code === 'hospital-approved'"
         :data="element"
-      ></hospital-approved>
+      />
 
       <hospital-check
         v-if="element.code === 'hospital-check'"
         :data="element"
-      ></hospital-check>
+      />
 
       <shop-list
         v-if="element.code === 'shop-list'"
         :data="element"
-      ></shop-list>
+      />
 
       <hospital-form
         v-if="element.code === 'hospital-form'"
         :data="element"
-      ></hospital-form>
+      />
 
-      <ad-swipe v-if="element.code === 'ad-swipe'" :data="element"> </ad-swipe>
+      <ad-swipe v-if="element.code === 'ad-swipe'" :data="element" />
       <ad-swipe-split
         v-if="element.code === 'ad-swipe-split'"
         :data="element"
-      ></ad-swipe-split>
+      />
 
       <form-radio
         v-if="element.code === 'form-radio'"
         :data="element"
-      ></form-radio>
+      />
     </div>
   </div>
 </template>
-  
-  <script>
-import _ from "lodash";
-import { MessageBox } from "element-ui";
-import CommonArticle from "../Widget/common/common-article.vue";
-import CommonCopyright from "../Widget/common/common-copyright.vue";
-import CommonTitle from "../Widget/common/common-title.vue";
-import CommonHeader from "../Widget/common/common-header.vue";
-import CommonRichText from "../Widget/common/common-rich-text.vue";
-import CommonTips from "../Widget/common/common-tips.vue";
-import CommonImg from "../Widget/common/common-img.vue";
+
+<script>
+import _ from 'lodash'
+import { MessageBox } from 'element-ui'
+import CommonArticle from '../Widget/common/common-article.vue'
+import CommonCopyright from '../Widget/common/common-copyright.vue'
+import CommonTitle from '../Widget/common/common-title.vue'
+import CommonHeader from '../Widget/common/common-header.vue'
+import CommonRichText from '../Widget/common/common-rich-text.vue'
+import CommonTips from '../Widget/common/common-tips.vue'
+import CommonImg from '../Widget/common/common-img.vue'
 // import commonMap from "../Widget/common/common-map.vue";
-import CommonVideo from "../Widget/common/common-video.vue";
-import HospitalDoctor from "../Widget/hospital/hospital-doctor.vue";
-import HospitalDept from "../Widget/hospital/hospital-dept.vue";
-import HospitalCheck from "../Widget/hospital/hospital-check.vue";
+import CommonVideo from '../Widget/common/common-video.vue'
+import HospitalDoctor from '../Widget/hospital/hospital-doctor.vue'
+import HospitalDept from '../Widget/hospital/hospital-dept.vue'
+import HospitalCheck from '../Widget/hospital/hospital-check.vue'
 //   import HospitalApproved from "../Widget/hospital/hospital-approved.vue";
-import HospitalForm from "../Widget/hospital/hospital-form.vue";
-
+import HospitalForm from '../Widget/hospital/hospital-form.vue'
 
 export default {
-  props: ["element", "select", "index", "data"],
   components: {
     CommonArticle,
     CommonCopyright,
@@ -126,27 +124,26 @@ export default {
     // AdSwipeSplit,
     // FormRadio,
     // commonMap,
-    CommonVideo,
+    CommonVideo
   },
+  props: ['element', 'select', 'index', 'data'],
   data() {
     return {
-    
-      visible: false,
-    };
+
+      visible: false
+    }
+  },
+  watch: {
+
   },
   mounted() {
-   
+
   },
   methods: {
-   
-  },
-  watch: {
-   
-  },
-};
+
+  }
+}
 </script>
-  
-  
+
   <style scoped lang="scss">
 </style>
-  

+ 180 - 188
src/components/config/detail.vue

@@ -1,202 +1,194 @@
 <template>
-    
-      <div class='ronin-drawer'>
-         <RoninTree
-        class='ronin-tree'
-        ref="condition"
-        treeType="property"
-        :data="list"
-        :treeData="treeData"
-        :funList="funList"
-        :childData="childData"
-        v-if="showContent"
-      ></RoninTree>
-      <!-- <div class='btn-bottom'>
+
+  <div class="ronin-drawer">
+    <RoninTree
+      v-if="showContent"
+      ref="condition"
+      class="ronin-tree"
+      tree-type="property"
+      :data="list"
+      :tree-data="treeData"
+      :fun-list="funList"
+      :child-data="childData"
+    />
+    <!-- <div class='btn-bottom'>
         <el-button type="info" disabled v-if="look">保存</el-button>
-        <el-button type="primary" v-else @click='onClickSave'>保存</el-button> 
-        
+        <el-button type="primary" v-else @click='onClickSave'>保存</el-button>
+
         </div> -->
-      </div>
-     
-  </template>
-  
-  <script>
-  import RoninTree from "@/components/Process/PropPanel/tree.vue";
+  </div>
+
+</template>
+
+<script>
+import RoninTree from '@/components/Process/PropPanel/tree.vue'
 //   import { deptTree } from "@/api/permission/department";
-  import { rules_list_params, condtionOneData ,dataPage ,deptTree} from "@/api/rule/index.js";
-  import { getDict, getDicts } from "@/utils/index";
-  export default {
-    components: { RoninTree },
-    data() {
-      return {
-          id:'',
-        treeData: [],
-        funList: [],
-        list: [],
-        childData: [],
-        showContent: false,
-        drawer:false,
-        value:null, //初始化的值
-        look:false,
-  
-      };
+import { rules_list_params, condtionOneData, dataPage, deptTree } from '@/api/rule/index.js'
+import { getDict, getDicts } from '@/utils/index'
+export default {
+  components: { RoninTree },
+  data() {
+    return {
+      id: '',
+      treeData: [],
+      funList: [],
+      list: [],
+      childData: [],
+      showContent: false,
+      drawer: false,
+      value: null, // 初始化的值
+      look: false
+
+    }
+  },
+
+  mounted() {
+    deptTree({}).then((res) => {
+      if (res.data) {
+        const data = JSON.parse(JSON.stringify(res.data))
+        this.treeData = data
+      } else {
+        this.treeData = []
+      }
+    })
+
+    rules_list_params({ full: true, rows: 100 }).then((res) => {
+      if (res.code == '0' && res.data) {
+        this.funList = res.data
+      } else {
+        this.funList = []
+      }
+    })
+  },
+
+  methods: {
+    init(data, id, type) {
+      this.look = false
+      if (type == 'look') {
+        this.look = true
+      }
+      this.id = id
+      this.drawer = true
+      if (data) {
+        this.list = [data]
+      } else {
+        this.list = []
+      }
+
+      this.showContent = false
+      this.getTypeAllData()
     },
-  
-    mounted() {
-      deptTree({}).then((res) => {
-        if (res.data) {
-          let data = JSON.parse(JSON.stringify(res.data));
-          this.treeData = data;
-        } else {
-          this.treeData = [];
-        }
-      });
-  
-      rules_list_params({ full: true, rows: 100 }).then((res) => {
-        if (res.code == "0" && res.data) {
-          this.funList = res.data;
-        } else {
-          this.funList = [];
+    async getTypeAllData() {
+      // 获取所有类型数据
+
+      const obj = {}
+
+      await getDicts([
+        'rule_prop_type',
+        'role_condition_type',
+        'date_limit_unit'
+      ]).then((res) => {
+        res.forEach((item) => {
+          obj[item.id] = item.items
+        })
+      })
+
+      const arrDataAll = []
+      await condtionOneData({}).then((res) => {
+        const arrData = res.data
+        arrData.forEach((item) => {
+          item.disabled = true
+          item.children.forEach((ele) => {
+            arrDataAll.push(ele.code)
+          })
+        })
+        obj.rule_prop_type = arrData
+      })
+
+      // 新
+      const arr1 = {}
+      arrDataAll.forEach((e) => {
+        arr1[e] = []
+      })
+
+      const typeObj = {}
+
+      this.getTreeCode(this.list, arr1)
+      console.log(arr1, '处理后的数据111')
+
+      const req = {
+        typeList: []
+      }
+      for (const key in arr1) {
+        req.typeList.push({
+          ids: arr1[key],
+          page: 1,
+          rows: 100,
+          type: key
+        })
+      }
+      console.log(req, '请求参数1235')
+      await dataPage(req).then((res) => {
+        if (res.code == '0') {
+          res.data.forEach((e) => {
+            typeObj[e.type] = e.data
+          })
         }
-      });
-  
-     
+      })
+
+      this.childData = {
+        dict: obj,
+        type: typeObj
+      }
+      console.log(this.childData, this.list, '111111111111111111111111')
+      this.showContent = true
+      this.$nextTick(res => {
+        this.$refs.condition.init()
+      })
     },
-  
-    methods: {
-      init(data,id,type){
-        this.look = false
-        if(type =='look'){
-          this.look = true
-        }
-          this.id = id
-          this.drawer = true
-          if(data){
-               this.list =[data]
-          }else{
-             this.list = [] 
+
+    getTreeCode(data, arr) {
+      data.forEach((item) => {
+        if (item && item.type == 'property') {
+          const code = item.property.mdCode
+          if (arr[item.property.mdType]) {
+            arr[item.property.mdType].push(code)
           }
-         
-          this.showContent = false
-           this.getTypeAllData();
-      },
-      async getTypeAllData() {
-        // 获取所有类型数据
-  
-        let obj = {};
-      
-        await getDicts([
-          "rule_prop_type",
-          "role_condition_type",
-          "date_limit_unit",
-        ]).then((res) => {
-          res.forEach((item) => {
-            obj[item.id] = item.items;
-          });
-         
-        });
-  
-        let arrDataAll = [];
-        await condtionOneData({}).then((res) => {
-          let arrData = res.data;
-          arrData.forEach((item) => {
-            item.disabled = true;
-            item.children.forEach((ele) => {
-              arrDataAll.push(ele.code);
-            });
-          });
-          obj.rule_prop_type = arrData;
-        });
-  
-       
-        // 新
-        let arr1 = {};
-        arrDataAll.forEach((e) => {
-          arr1[e] = [];
-        });
-  
-        let typeObj = {};
-         
-         this.getTreeCode( this.list,arr1)
-        console.log(arr1,'处理后的数据111')
-       
-  
-        let req = {
-          typeList: [],
-        };
-        for (let key in arr1) {
-          req.typeList.push({
-            ids: arr1[key],
-            page: 1,
-            rows: 100,
-            type: key,
-          });
         }
-        console.log(req,'请求参数1235')
-        await dataPage(req).then((res) => {
-          if (res.code == "0") {
-            res.data.forEach((e) => {
-              typeObj[e.type] = e.data;
-            });
-          }
-        });
-  
-        this.childData = {
-          dict: obj,
-          type: typeObj,
-        };
-        console.log(this.childData,this.list,'111111111111111111111111')
-        this.showContent = true;
-        this.$nextTick(res=>{
-           this.$refs.condition.init()
-        })
-      },
-  
-      getTreeCode(data, arr) {
-        data.forEach((item) => {
-         
-          if (item && item.type == "property") {
-            let code = item.property.mdCode;
-            if (arr[item.property.mdType]) {
-              arr[item.property.mdType].push(code);
-            }
-          }
-  
-          if (
-            item &&
-            item.type == "relation" &&
+
+        if (
+          item &&
+            item.type == 'relation' &&
             item.children &&
             item.children.length > 0
-          ) {
-            this.getTreeCode(item.children, arr);
-          }
-        });
-      },
-  
-  
-      handleDrawerClose(done) {
-        done();
-        this.$emit('refreshDataList')
-      },
-  
-      onClickSave(){
-          let req ={
-              id:this.id,
-              config:this.list[0]
-          }
-          ruleConfigUpdateConfig(req).then(res=>{
-              if(res.code == '0'){
-                  this.drawer = false
-              }
-          })
-  
-      },
+        ) {
+          this.getTreeCode(item.children, arr)
+        }
+      })
+    },
+
+    handleDrawerClose(done) {
+      done()
+      this.$emit('refreshDataList')
     },
-  
-    //--------------------------------
-  };
-  </script>
-  
+
+    onClickSave() {
+      const req = {
+        id: this.id,
+        config: this.list[0]
+      }
+      ruleConfigUpdateConfig(req).then(res => {
+        if (res.code == '0') {
+          this.drawer = false
+        }
+      })
+    }
+  }
+
+  // --------------------------------
+}
+</script>
+
   <style lang="scss" scoped>
   .ronin-drawer{
      height: 100%;
@@ -213,4 +205,4 @@
       padding: 20px;
       text-align: right;
   }
-  </style>
+  </style>

+ 185 - 187
src/components/config/index.vue

@@ -1,203 +1,201 @@
 <template>
-    <el-drawer title="条件配置管理" :visible.sync="drawer" :wrapperClosable="false"  ref="drawer"
-      size="80%" :before-close="handleDrawerClose" class="CCIT-common-drawer">
-      <div class='ronin-drawer'>
-         <RoninTree
-        class='ronin-tree'
-        treeType="property"
-        :data="list"
-        :treeData="treeData"
+  <el-drawer
+    ref="drawer"
+    title="条件配置管理"
+    :visible.sync="drawer"
+    :wrapper-closable="false"
+    size="80%"
+    :before-close="handleDrawerClose"
+    class="CCIT-common-drawer"
+  >
+    <div class="ronin-drawer">
+      <RoninTree
         v-if="showContent"
-      ></RoninTree>
+        class="ronin-tree"
+        tree-type="property"
+        :data="list"
+        :tree-data="treeData"
+      />
       <!-- <div class='btn-bottom'>
         <el-button type="info" disabled v-if="look">保存</el-button>
-        <el-button type="primary" v-else @click='onClickSave'>保存</el-button> 
-        
+        <el-button type="primary" v-else @click='onClickSave'>保存</el-button>
+
         </div> -->
-      </div>
-     
-    </el-drawer>
-  </template>
-  
-  <script>
-  import RoninTree from "@/components/Process/PropPanel/tree.vue";
+    </div>
+
+  </el-drawer>
+</template>
+
+<script>
+import RoninTree from '@/components/Process/PropPanel/tree.vue'
 //   import { deptTree } from "@/api/permission/department";
-  import { rules_list_params, condtionOneData ,dataPage ,deptTree} from "@/api/rule/index.js";
-  
-  
-  import { getDict, getDicts } from "@/utils/index";
-  export default {
-    components: { RoninTree },
-    data() {
-      return {
-          id:'',
-        treeData: [],
-        funList: [],
-        list: [],
-        childData: [],
-        showContent: false,
-        drawer:false,
-        value:null, //初始化的值
-        look:false,
-  
-      };
+import { rules_list_params, condtionOneData, dataPage, deptTree } from '@/api/rule/index.js'
+
+import { getDict, getDicts } from '@/utils/index'
+export default {
+  components: { RoninTree },
+  data() {
+    return {
+      id: '',
+      treeData: [],
+      funList: [],
+      list: [],
+      childData: [],
+      showContent: false,
+      drawer: false,
+      value: null, // 初始化的值
+      look: false
+
+    }
+  },
+
+  mounted() {
+    deptTree({}).then((res) => {
+      if (res.data) {
+        const data = JSON.parse(JSON.stringify(res.data))
+        this.treeData = data
+      } else {
+        this.treeData = []
+      }
+    })
+
+    rules_list_params({ full: true, rows: 100 }).then((res) => {
+      if (res.code == '0' && res.data) {
+        this.funList = res.data
+      } else {
+        this.funList = []
+      }
+    })
+  },
+
+  methods: {
+    init(data, id, type) {
+      this.look = false
+      if (type == 'look') {
+        this.look = true
+      }
+      this.id = id
+      this.drawer = true
+      if (data) {
+        this.list = [data]
+      } else {
+        this.list = []
+      }
+
+      this.showContent = false
+      this.getTypeAllData()
     },
-  
-    mounted() {
-      deptTree({}).then((res) => {
-        if (res.data) {
-          let data = JSON.parse(JSON.stringify(res.data));
-          this.treeData = data;
-        } else {
-          this.treeData = [];
-        }
-      });
-  
-      rules_list_params({ full: true, rows: 100 }).then((res) => {
-        if (res.code == "0" && res.data) {
-          this.funList = res.data;
-        } else {
-          this.funList = [];
+    async getTypeAllData() {
+      // 获取所有类型数据
+
+      const obj = {}
+
+      await getDicts([
+        'rule_prop_type',
+        'role_condition_type',
+        'date_limit_unit'
+      ]).then((res) => {
+        res.forEach((item) => {
+          obj[item.id] = item.items
+        })
+      })
+
+      const arrDataAll = []
+      await condtionOneData({}).then((res) => {
+        const arrData = res.data
+        arrData.forEach((item) => {
+          item.disabled = true
+          item.children.forEach((ele) => {
+            arrDataAll.push(ele.code)
+          })
+        })
+        obj.rule_prop_type = arrData
+      })
+
+      // 新
+      const arr1 = {}
+      arrDataAll.forEach((e) => {
+        arr1[e] = []
+      })
+
+      const typeObj = {}
+
+      this.getTreeCode(this.list, arr1)
+      console.log(arr1, '处理后的数据111')
+
+      const req = {
+        typeList: []
+      }
+      for (const key in arr1) {
+        req.typeList.push({
+          ids: arr1[key],
+          page: 1,
+          rows: 100,
+          type: key
+        })
+      }
+      console.log(req, '请求参数1235')
+      await dataPage(req).then((res) => {
+        if (res.code == '0') {
+          res.data.forEach((e) => {
+            typeObj[e.type] = e.data
+          })
         }
-      });
-  
-     
+      })
+
+      this.childData = {
+        dict: obj,
+        type: typeObj
+      }
+      console.log(this.childData, this.list, '111111111111111111111111')
+      this.showContent = true
+      this.$nextTick(res => {
+        this.$refs.condition.init()
+      })
     },
-  
-    methods: {
-      init(data,id,type){
-        this.look = false
-        if(type =='look'){
-          this.look = true
-        }
-          this.id = id
-          this.drawer = true
-          if(data){
-               this.list =[data]
-          }else{
-             this.list = [] 
+
+    getTreeCode(data, arr) {
+      data.forEach((item) => {
+        if (item && item.type == 'property') {
+          const code = item.property.mdCode
+          if (arr[item.property.mdType]) {
+            arr[item.property.mdType].push(code)
           }
-         
-          this.showContent = false
-           this.getTypeAllData();
-      },
-      async getTypeAllData() {
-        // 获取所有类型数据
-  
-        let obj = {};
-      
-        await getDicts([
-          "rule_prop_type",
-          "role_condition_type",
-          "date_limit_unit",
-        ]).then((res) => {
-          res.forEach((item) => {
-            obj[item.id] = item.items;
-          });
-         
-        });
-  
-        let arrDataAll = [];
-        await condtionOneData({}).then((res) => {
-          let arrData = res.data;
-          arrData.forEach((item) => {
-            item.disabled = true;
-            item.children.forEach((ele) => {
-              arrDataAll.push(ele.code);
-            });
-          });
-          obj.rule_prop_type = arrData;
-        });
-  
-       
-        // 新
-        let arr1 = {};
-        arrDataAll.forEach((e) => {
-          arr1[e] = [];
-        });
-  
-        let typeObj = {};
-         
-         this.getTreeCode( this.list,arr1)
-        console.log(arr1,'处理后的数据111')
-       
-  
-        let req = {
-          typeList: [],
-        };
-        for (let key in arr1) {
-          req.typeList.push({
-            ids: arr1[key],
-            page: 1,
-            rows: 100,
-            type: key,
-          });
         }
-        console.log(req,'请求参数1235')
-        await dataPage(req).then((res) => {
-          if (res.code == "0") {
-            res.data.forEach((e) => {
-              typeObj[e.type] = e.data;
-            });
-          }
-        });
-  
-        this.childData = {
-          dict: obj,
-          type: typeObj,
-        };
-        console.log(this.childData,this.list,'111111111111111111111111')
-        this.showContent = true;
-        this.$nextTick(res=>{
-           this.$refs.condition.init()
-        })
-      },
-  
-      getTreeCode(data, arr) {
-        data.forEach((item) => {
-         
-          if (item && item.type == "property") {
-            let code = item.property.mdCode;
-            if (arr[item.property.mdType]) {
-              arr[item.property.mdType].push(code);
-            }
-          }
-  
-          if (
-            item &&
-            item.type == "relation" &&
+
+        if (
+          item &&
+            item.type == 'relation' &&
             item.children &&
             item.children.length > 0
-          ) {
-            this.getTreeCode(item.children, arr);
-          }
-        });
-      },
-  
-  
-      handleDrawerClose(done) {
-        done();
-        this.$emit('refreshDataList')
-      },
-  
-      onClickSave(){
-          let req ={
-              id:this.id,
-              config:this.list[0]
-          }
-          ruleConfigUpdateConfig(req).then(res=>{
-              if(res.code == '0'){
-                  this.drawer = false
-              }
-          })
-  
-      },
+        ) {
+          this.getTreeCode(item.children, arr)
+        }
+      })
+    },
+
+    handleDrawerClose(done) {
+      done()
+      this.$emit('refreshDataList')
     },
-  
-    //--------------------------------
-  };
-  </script>
-  
+
+    onClickSave() {
+      const req = {
+        id: this.id,
+        config: this.list[0]
+      }
+      ruleConfigUpdateConfig(req).then(res => {
+        if (res.code == '0') {
+          this.drawer = false
+        }
+      })
+    }
+  }
+
+  // --------------------------------
+}
+</script>
+
   <style lang="scss" scoped>
   .ronin-drawer{
      height: 100%;
@@ -214,4 +212,4 @@
       padding: 20px;
       text-align: right;
   }
-  </style>
+  </style>

+ 29 - 31
src/components/medical/doc/discharge.vue

@@ -1,44 +1,43 @@
 
-
 <template>
   <div class="doc">
-    <div v-html="data"></div>
+    <div v-html="data" />
     <div v-if="false">
       <div
-        class="doc-item"
         v-for="(item, index) of data"
         :key="'item_' + index"
+        class="doc-item"
       >
         <div v-if="item.name">
-          <div class="title" v-if="item.title && item.title != ''">
+          <div v-if="item.title && item.title != ''" class="title">
             {{ item.title }}:
           </div>
           <div
-            class="title"
             v-if="item.name == '039B35D4DC7148CBB7A93CF0122BD571'"
+            class="title"
           >
             基本信息:
           </div>
 
-          <div class="title" v-if="item.name == 'ADMISSION_DIAGNOSIS'">
+          <div v-if="item.name == 'ADMISSION_DIAGNOSIS'" class="title">
             入院诊断:
           </div>
 
-          <div class="title" v-if="item.name == 'DISCHARGE_DIAGNOSIS'">
+          <div v-if="item.name == 'DISCHARGE_DIAGNOSIS'" class="title">
             出院诊断:
           </div>
 
-          <div class="des" v-if="item.title != ''">
+          <div v-if="item.title != ''" class="des">
             {{ item.content }}
           </div>
-          <div class="des" v-else>
+          <div v-else class="des">
             <div
-              class=""
               v-if="
                 item.name == 'DISCHARGE_DIAGNOSIS' ||
-                item.name == 'ADMISSION_DIAGNOSIS' ||
-                item.name == '039B35D4DC7148CBB7A93CF0122BD571'
+                  item.name == 'ADMISSION_DIAGNOSIS' ||
+                  item.name == '039B35D4DC7148CBB7A93CF0122BD571'
               "
+              class=""
             >
               {{ item.content }}
             </div>
@@ -46,35 +45,35 @@
         </div>
 
         <div v-if="item.id">
-          <div class="title" v-if="item.filedname && item.filedname != ''">
+          <div v-if="item.filedname && item.filedname != ''" class="title">
             {{ item.filedname }}:
           </div>
           <div
-            class="title"
             v-if="item.id == '039B35D4DC7148CBB7A93CF0122BD571'"
+            class="title"
           >
             基本信息:
           </div>
 
-          <div class="title" v-if="item.id == 'ADMISSION_DIAGNOSIS'">
+          <div v-if="item.id == 'ADMISSION_DIAGNOSIS'" class="title">
             入院诊断:
           </div>
 
-          <div class="title" v-if="item.id == 'DISCHARGE_DIAGNOSIS'">
+          <div v-if="item.id == 'DISCHARGE_DIAGNOSIS'" class="title">
             出院诊断:
           </div>
 
-          <div class="des" v-if="item.title != ''">
+          <div v-if="item.title != ''" class="des">
             {{ item.value }}
           </div>
-          <div class="des" v-else>
+          <div v-else class="des">
             <div
-              class=""
               v-if="
                 item.id == 'DISCHARGE_DIAGNOSIS' ||
-                item.id == 'ADMISSION_DIAGNOSIS' ||
-                item.id == '039B35D4DC7148CBB7A93CF0122BD571'
+                  item.id == 'ADMISSION_DIAGNOSIS' ||
+                  item.id == '039B35D4DC7148CBB7A93CF0122BD571'
               "
+              class=""
             >
               {{ item.value }}
             </div>
@@ -84,25 +83,25 @@
     </div>
   </div>
 </template>
-    
-    <script>
+
+<script>
 export default {
-  name: "Exams-Reports",
+  name: 'ExamsReports',
   props: {
     data: {
       required: true,
       type: Object,
-      show: false,
-    },
+      show: false
+    }
   },
   data() {
-    return {};
+    return {}
   },
   computed: {},
-  methods: {},
-};
+  methods: {}
+}
 </script>
-    
+
     <style scoped lang="scss">
 .doc-item {
   .title {
@@ -118,4 +117,3 @@ export default {
   }
 }
 </style>
-    

+ 16 - 18
src/components/medical/exams/list.vue

@@ -20,47 +20,45 @@
     </div>
     <div class="labs-bodyer">
       <el-descriptions title="报告详情" :column="1">
-        <el-descriptions-item label="报告结果" v-if="data.reportResultRaw">
+        <el-descriptions-item v-if="data.reportResultRaw" label="报告结果">
           {{ data.reportResultRaw }}
         </el-descriptions-item>
         <el-descriptions-item
-          label="报告所见"
           v-if="data.reportDescriptionRaw"
-          >{{ data.reportDescriptionRaw }}</el-descriptions-item
-        >
+          label="报告所见"
+        >{{ data.reportDescriptionRaw }}</el-descriptions-item>
       </el-descriptions>
     </div>
   </div>
 </template>
-    
-    <script>
+
+<script>
 export default {
-  name: "Exams-Reports",
+  name: 'ExamsReports',
   props: {
     data: {
       required: true,
-      type: Object,
-    },
+      type: Object
+    }
   },
   data() {
-    return {};
+    return {}
   },
+  computed: {},
   watch: {
     data: {
       deep: true,
       handler: function handler() {
-        //this.getSize();
-      },
-    },
+        // this.getSize();
+      }
+    }
   },
-  computed: {},
-  methods: {},
-};
+  methods: {}
+}
 </script>
-    
+
     <style scoped>
 .labs-bodyer {
   padding-top: 20px;
 }
 </style>
-    

+ 2 - 2
src/components/medical/exams/reports.vue

@@ -29,8 +29,8 @@
 
       <div class="" style="margin-top: 20px;">
         <a v-if="data.reportPath && data.reportPath != ''" class="btn" :href="data.reportPath" target="blank">查看影像</a>
-        <a v-if="data.examineTypeRaw == 'PT'" style="margin-left: 10px;" class="btn" :href=" 'http://172.17.92.25:8090/TaxusWebServer/servicereport.do?Patient_Sno='+ data.id" target="blank">报告详情</a>
-        <a v-if="data.examineTypeRaw == 'PT'" style="margin-left: 10px;" class="btn" :href=" 'http://172.17.92.25:8090/TaxusWebServer/serviceimage.do?Patient_Sno='+ data.id" target="blank">报告图片</a>
+        <a v-if="data.examineTypeRaw == 'PT'" style="margin-left: 10px;" class="btn" :href=" 'http://172.17.92.25:8090/Taxuserver/servicereport.do?Patient_Sno='+ data.id" target="blank">报告详情</a>
+        <a v-if="data.examineTypeRaw == 'PT'" style="margin-left: 10px;" class="btn" :href=" 'http://172.17.92.25:8090/Taxuserver/serviceimage.do?Patient_Sno='+ data.id" target="blank">报告图片</a>
       </div>
 
       <div class="" style="margin-top: 20px;">

+ 18 - 12
src/components/medical/labs/detail.vue

@@ -40,23 +40,23 @@
           <el-table-column prop="codeRaw" label="结果" width="100">
             <template slot-scope="scope">
               <sapn
-                v-if="scope.row.abnormal == '0' && (scope.row.resultValueFlag == 'decline' || scope.row.resultValueFlag == 'rise')">
+                v-if="scope.row.abnormal == '0' && (scope.row.resultValueFlag == 'decline' || scope.row.resultValueFlag == 'rise')"
+              >
                 <span v-if="scope.row.resultValueFlag == 'rise'" style="color: #f56c6c">{{ scope.row.inspectResultRaw }}
                   ↑</span>
                 <span v-else-if="scope.row.resultValueFlag == 'decline'" style="color: #f56c6c">{{
                   scope.row.inspectResultRaw
                 }} ↓</span>
 
-
               </sapn>
               <span v-else-if="scope.row.abnormal == '1'">
                 {{
                   scope.row.inspectResultRaw
                 }}
-                <span v-if="scope.row.abnormalIndicator == '升高' ||  scope.row.abnormalIndicator == '高' ||  scope.row.abnormalIndicator == '高于极限' " style="color: #f56c6c">
+                <span v-if="scope.row.abnormalIndicator == '升高' || scope.row.abnormalIndicator == '高' || scope.row.abnormalIndicator == '高于极限' " style="color: #f56c6c">
                   ↑</span>
-                <span v-else-if="scope.row.abnormalIndicator == '降低'  ||  scope.row.abnormalIndicator == '低' ||  scope.row.abnormalIndicator == '低于极限' " style="color: #f56c6c"> ↓</span>
-               
+                <span v-else-if="scope.row.abnormalIndicator == '降低' || scope.row.abnormalIndicator == '低' || scope.row.abnormalIndicator == '低于极限' " style="color: #f56c6c"> ↓</span>
+
               </span>
               <span v-else>
                 {{
@@ -82,13 +82,19 @@
         </el-table>
       </div>
     </div>
-    <el-dialog title="提示" :visible.sync="dialogVisible" modal-append-to-body :modal="false" :lock-scroll="true"
-      width="80%">
+    <el-dialog
+      title="提示"
+      :visible.sync="dialogVisible"
+      modal-append-to-body
+      :modal="false"
+      :lock-scroll="true"
+      width="80%"
+    >
       <div class="" style="width: 100%">
         <LabsLine :data="chartData" />
       </div>
     </el-dialog>
-    
+
   </div>
 </template>
 
@@ -115,15 +121,15 @@ export default {
       chartData: []
     }
   },
+  computed: {},
   watch: {
     data: {
       deep: true,
       handler: function handler() {
-        //this.getSize();
-      },
-    },
+        // this.getSize();
+      }
+    }
   },
-  computed: {},
   methods: {
     onTap(item) {
       const params = {

+ 37 - 40
src/components/medical/positive/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="positive-reports">
-    <div class="exam-reports" v-if="data.examsList">
-      <exams-reports :data="item" v-for="(item,index) of data.examsList" :key="'exams-reports'+index"></exams-reports>
-    
+    <div v-if="data.examsList" class="exam-reports">
+      <exams-reports v-for="(item,index) of data.examsList" :key="'exams-reports'+index" :data="item" />
+
       <!-- <el-descriptions
         title="检查报告:"
         :column="1"
@@ -20,27 +20,32 @@
       </el-descriptions> -->
     </div>
 
-    <div class="labs-reports" v-if="data.labsList">
-      <labs-reports :data="item" v-for="(item,index) of data.labsList" :key="'labs-reports'+index"></labs-reports>
+    <div v-if="data.labsList" class="labs-reports">
+      <labs-reports v-for="(item,index) of data.labsList" :key="'labs-reports'+index" :data="item" />
     </div>
 
     <!-- <div @click="onClickFlow">查看推理流程</div> -->
 
-    <roninConfig ref="roninConfig" :reasoningList="reasoningList"></roninConfig>
+    <roninConfig ref="roninConfig" :reasoning-list="reasoningList" />
   </div>
 </template>
 <script>
-import ExamsReports from "@/components/medical/exams/reports.vue";
-import LabsReports from "@/components/medical/labs/detail.vue";
-import { ruleConfigGetConfig } from "@/api/rule/index";
-import roninConfig from "@/components/ronin-engine/config.vue"
+import ExamsReports from '@/components/medical/exams/reports.vue'
+import LabsReports from '@/components/medical/labs/detail.vue'
+import { ruleConfigGetConfig } from '@/api/rule/index'
+import roninConfig from '@/components/ronin-engine/config.vue'
 export default {
-  name: "positive-reports",
+  name: 'PositiveReports',
+  components: { ExamsReports, LabsReports, roninConfig },
   props: {
     data: {},
-    treeId:{},
-    reasoningList:{}
+    treeId: {},
+    reasoningList: {}
+  },
+  data() {
+    return {}
   },
+  computed: {},
   watch: {
     // data: {
     //   deep: true,
@@ -50,41 +55,33 @@ export default {
     //   },
     // },
   },
-  components: {ExamsReports,LabsReports,roninConfig},
-  mounted(){
-   
-  },
-  data() {
-    return {};
+  mounted() {
+
   },
-  computed: {},
   methods: {
-    onClickFlow(){
-  
-      let value = null;
-        ruleConfigGetConfig({ id: this.treeId }).then((res) => {
-          // console.log(res)
-          if (res.code == "0" && res.data) {
-            if (res.data.config && res.data.config.id) {
-              value = res.data.config;
-            }
-            console.log(value,'tree层级数据')
-             //清除重复层级  处理数据慎重使用
-            //  this.upDateTree(value)
-            this.$refs.roninConfig.init(value, this.data.id);
+    onClickFlow() {
+      let value = null
+      ruleConfigGetConfig({ id: this.treeId }).then((res) => {
+        // console.log(res)
+        if (res.code == '0' && res.data) {
+          if (res.data.config && res.data.config.id) {
+            value = res.data.config
           }
-        });
+          console.log(value, 'tree层级数据')
+          // 清除重复层级  处理数据慎重使用
+          //  this.upDateTree(value)
+          this.$refs.roninConfig.init(value, this.data.id)
+        }
+      })
     },
-    init(){
-        this.$forceUpdate();
-       
+    init() {
+      this.$forceUpdate()
     }
-  },
-};
+  }
+}
 </script>
     <style scoped lang="scss">
 .labs-bodyer {
   padding-top: 20px;
 }
 </style>
-    

+ 51 - 57
src/components/ronin-engine/components/index.vue

@@ -1,21 +1,20 @@
 
-
 <template>
   <span>
     <!-- 操作符 字典下拉 -->
     <span v-if="dataType == 'dict'">
       <!-- <span>11111111111</span> -->
       <el-select
+        v-model="data"
         placeholder="选择值字典"
         class="select"
         size="mini"
         @change="onDataChange"
-        v-model="data"
       >
         <el-option
           v-for="d in dict"
-          :label="d.dictLabel"
           :key="d.dictValue"
+          :label="d.dictLabel"
           :value="d.dictValue"
         >
           {{ d.dictLabel }}
@@ -27,22 +26,21 @@
     <span v-if="dataType == 'standard'">
       <!-- <span>111111111</span> -->
       <el-select
+        v-model="data"
+        v-loadmore="loadmore"
         placeholder="选择值叙述1"
         class="select ronin-select"
-        v-loadmore="loadmore"
         size="mini"
         filterable
-        @focus='onSelectFous'
         :filter-method="
           (val) => {
             return onSelectChange(val);
           }
         "
+        @focus="onSelectFous"
         @change="onDataChange"
-        v-model="data"
       >
-        <el-option v-for="d in dict" :label="d.name" :key="d.id" :value="d.id">
-        </el-option>
+        <el-option v-for="d in dict" :key="d.id" :label="d.name" :value="d.id" />
       </el-select>
     </span>
 
@@ -50,54 +48,53 @@
     <span v-if="dataType == 'none'">
       <el-input
         v-if="dataTypeTop == 's' || dataTypeTop == 't'"
-        @change="onDataChange"
         v-model="data"
         style="width: 90px"
         size="mini"
-      ></el-input>
+        @change="onDataChange"
+      />
 
       <el-input-number
-        @change="onDataChange"
+        v-if="dataTypeTop == 'd'"
         v-model="data"
         size="mini"
         :min="0"
         controls-position="right"
-        v-if="dataTypeTop == 'd'"
-      ></el-input-number>
-      <el-input-number
         @change="onDataChange"
+      />
+      <el-input-number
         v-model="data"
+        v-if="dataTypeTop == 'i'"
         :min="0"
         controls-position="right"
         :step="1"
         step-strictly
-        v-if="dataTypeTop == 'i'"
-      ></el-input-number>
+        @change="onDataChange"
+      />
 
       <el-date-picker
         v-if="dataTypeTop == 'dt'"
-        @change="onDataChange"
         v-model="data"
         type="date"
         class="select"
         format="yyyy-MM-dd"
         value-format="yyyy-MM-dd"
         placeholder="选择日期"
-      >
-      </el-date-picker>
+        @change="onDataChange"
+      />
 
       <el-select
-        placeholder="选择值字典"
         v-if="dataTypeTop == 'dict'"
+        v-model="data"
+        placeholder="选择值字典"
         class="select"
         size="mini"
         @change="onDataChange"
-        v-model="data"
       >
         <el-option
           v-for="d in dict"
-          :label="d.dictLabel"
           :key="d.dictValue"
+          :label="d.dictLabel"
           :value="d.dictValue"
         >
           {{ d.dictLabel }}
@@ -112,67 +109,64 @@ export default {
   props: {
     dataType: {
       type: String,
-      default: "",
+      default: ''
     },
     dataTypeTop: {
       type: String,
-      default: "",
+      default: ''
     },
     dict: {
-      default: [],
+      default: []
     },
-    value:{
+    value: {
 
     }
   },
+  data() {
+    return {
+      data: '',
+      page: 1,
+      searchVal: ''
+    }
+  },
 
   watch: {
     value: {
-     
-       handler(val) {
-                
 
-                   this.data = val;
-                
-            },
-            deep: true,
-            immediate: true
+      handler(val) {
+        this.data = val
+      },
+      deep: true,
+      immediate: true
 
       // this.getCreateValue();
-    },
-  },
-  data() {
-    return {
-        data:'',
-        page:1,
-        searchVal:''
-    };
+    }
   },
   methods: {
     onDataChange(e) {
-      this.$emit("input", e);
-      this.$emit("change", e);
+      this.$emit('input', e)
+      this.$emit('change', e)
     },
 
-    onSelectChange(e){
+    onSelectChange(e) {
       this.searchVal = e
-      this.$emit('search',e)
+      this.$emit('search', e)
     },
-    onSelectFous(){
+    onSelectFous() {
       // this.page=1
       this.searchVal = ''
     },
-    loadmore(){
-      this.page++ 
-     
-      let req= {
-        page:this.page,
-        name:this.searchVal
+    loadmore() {
+      this.page++
+
+      const req = {
+        page: this.page,
+        name: this.searchVal
       }
       //  console.log('我去掉下拉加载了',req)
-      this.$emit('loadmore',req)
+      this.$emit('loadmore', req)
     }
 
-  },
-};
-</script>
+  }
+}
+</script>

Разница между файлами не показана из-за своего большого размера
+ 956 - 964
src/components/ronin-engine/condition.vue


+ 190 - 186
src/components/ronin-engine/config.vue

@@ -1,205 +1,209 @@
 <template>
-    <el-drawer title="条件配置管理" :visible.sync="drawer" :modal='false' :wrapperClosable="false" ref="drawer" size="80%"
-        :before-close="handleDrawerClose" class="CCIT-common-drawer">
-        <div class='ronin-drawer'>
-            <RoninTree class='ronin-tree' ref="condition" treeType="property" :data="list" :treeData="treeData"
-                :funList="funList" :childData="childData" v-if="showContent"></RoninTree>
-          
-        </div>
+  <el-drawer
+    ref="drawer"
+    title="条件配置管理"
+    :visible.sync="drawer"
+    :modal="false"
+    :wrapper-closable="false"
+    size="80%"
+    :before-close="handleDrawerClose"
+    class="CCIT-common-drawer"
+  >
+    <div class="ronin-drawer">
+      <RoninTree
+        ref="condition"
+        class="ronin-tree"
+        v-if="showContent"
+        tree-type="property"
+        :data="list"
+        :tree-data="treeData"
+        :fun-list="funList"
+        :child-data="childData"
+      />
+
+    </div>
+
+  </el-drawer>
 
-    </el-drawer>
-
- 
 </template>
 
 <script>
-import RoninTree from "./tree.vue";
-import { deptTree, ruleConfigUpdateConfig } from "@/api/permission/department";
-import { rules_list_params, condtionOneData, dataPage } from "@/api/rule/index";
-
+import RoninTree from './tree.vue'
+import { deptTree, ruleConfigUpdateConfig } from '@/api/permission/department'
+import { rules_list_params, condtionOneData, dataPage } from '@/api/rule/index'
 
-import { getDict, getDicts } from "@/utils/index";
+import { getDict, getDicts } from '@/utils/index'
 export default {
-    components: { RoninTree },
-    props:{
-        reasoningList:{}
+  components: { RoninTree },
+  props: {
+    reasoningList: {}
+  },
+  data() {
+    return {
+      id: '',
+      treeData: [],
+      funList: [],
+      list: [],
+      childData: [],
+      showContent: false,
+      drawer: false,
+      value: null, // 初始化的值
+      look: false
+
+    }
+  },
+
+  mounted() {
+    deptTree({}).then((res) => {
+      if (res.data) {
+        const data = JSON.parse(JSON.stringify(res.data))
+        this.treeData = data
+      } else {
+        this.treeData = []
+      }
+    })
+
+    rules_list_params({ full: true, rows: 100 }).then((res) => {
+      if (res.code == '0' && res.data) {
+        this.funList = res.data
+      } else {
+        this.funList = []
+      }
+    })
+  },
+
+  methods: {
+    init(data, id, type) {
+      this.look = false
+      if (type == 'look') {
+        this.look = true
+      }
+      this.id = id
+      this.drawer = true
+      if (data) {
+        this.list = [data]
+      } else {
+        this.list = []
+      }
+
+      this.showContent = false
+      this.getTypeAllData()
     },
-    data() {
-        return {
-            id: '',
-            treeData: [],
-            funList: [],
-            list: [],
-            childData: [],
-            showContent: false,
-            drawer: false,
-            value: null, //初始化的值
-            look: false,
-
-        };
-    },
-
-    mounted() {
-        deptTree({}).then((res) => {
-            if (res.data) {
-                let data = JSON.parse(JSON.stringify(res.data));
-                this.treeData = data;
-            } else {
-                this.treeData = [];
-            }
-        });
-
-        rules_list_params({ full: true, rows: 100 }).then((res) => {
-            if (res.code == "0" && res.data) {
-                this.funList = res.data;
-            } else {
-                this.funList = [];
-            }
-        });
-
-
+    async getTypeAllData() {
+      // 获取所有类型数据
+      const obj = {}
+      // 字典
+      await getDicts([
+        'rule_prop_type',
+        'role_condition_type',
+        'date_limit_unit'
+      ]).then((res) => {
+        res.forEach((item) => {
+          obj[item.id] = item.items
+        })
+      })
+
+      const arrDataAll = []
+      // 获取操作类型  属性里面第二个下拉框
+      await condtionOneData({}).then((res) => {
+        const arrData = res.data
+        arrData.forEach((item) => {
+          item.disabled = true
+          item.children.forEach((ele) => {
+            arrDataAll.push(ele.code)
+          })
+        })
+        obj.rule_prop_type = arrData
+      })
+
+      // 新
+      const arr1 = {}
+      arrDataAll.forEach((e) => {
+        arr1[e] = []
+      })
+
+      const typeObj = {}
+
+      this.getTreeCode(this.list, arr1)
+      console.log(arr1, '处理后的数据111')
+
+      const req = {
+        typeList: []
+      }
+      for (const key in arr1) {
+        req.typeList.push({
+          ids: arr1[key],
+          page: 1,
+          rows: arr1[key].length,
+          type: key
+        })
+      }
+      console.log(req, '请求参数1235')
+      await dataPage(req).then((res) => {
+        if (res.code == '0') {
+          res.data.forEach((e) => {
+            typeObj[e.type] = e.data
+          })
+        }
+      })
+
+      this.childData = {
+        dict: obj,
+        type: typeObj
+      }
+      this.showContent = true
+      this.$nextTick(res => {
+        this.$refs.condition.init()
+      })
     },
 
-    methods: {
-        init(data, id, type) {
-            this.look = false
-            if (type == 'look') {
-                this.look = true
-            }
-            this.id = id
-            this.drawer = true
-            if (data) {
-                this.list = [data]
-            } else {
-                this.list = []
+    getTreeCode(data, arr) {
+      console.log(this.reasoningList, data, '显示结果李大胖胖')
+      data.forEach((item) => {
+        if (item && item.type == 'property') {
+          const code = item.property.mdCode
+          if (arr[item.property.mdTypeCode]) {
+            arr[item.property.mdTypeCode].push(code)
+          }
+          this.reasoningList.forEach(e => {
+            if (e.id == item.id) {
+              item.property.status = 'Y'
+              item.property.data = e.data
             }
+          })
+        }
 
-            this.showContent = false
-            this.getTypeAllData();
-        },
-        async getTypeAllData() {
-            // 获取所有类型数据
-            let obj = {};
-            // 字典
-            await getDicts([
-                "rule_prop_type",
-                "role_condition_type",
-                "date_limit_unit",
-            ]).then((res) => {
-                res.forEach((item) => {
-                    obj[item.id] = item.items;
-                });
-
-            });
-
-            let arrDataAll = [];
-            // 获取操作类型  属性里面第二个下拉框 
-            await condtionOneData({}).then((res) => {
-                let arrData = res.data;
-                arrData.forEach((item) => {
-                    item.disabled = true;
-                    item.children.forEach((ele) => {
-                        arrDataAll.push(ele.code);
-                    });
-                });
-                obj.rule_prop_type = arrData;
-            });
-
-
-            // 新
-            let arr1 = {};
-            arrDataAll.forEach((e) => {
-                arr1[e] = [];
-            });
-
-            let typeObj = {};
-
-            this.getTreeCode(this.list, arr1)
-            console.log(arr1, '处理后的数据111')
-
-
-            let req = {
-                typeList: [],
-            };
-            for (let key in arr1) {
-                req.typeList.push({
-                    ids: arr1[key],
-                    page: 1,
-                    rows: arr1[key].length,
-                    type: key,
-                });
-            }
-            console.log(req, '请求参数1235')
-            await dataPage(req).then((res) => {
-                if (res.code == "0") {
-                    res.data.forEach((e) => {
-                        typeObj[e.type] = e.data;
-                    });
-                }
-            });
-
-            this.childData = {
-                dict: obj,
-                type: typeObj,
-            };
-            this.showContent = true;
-            this.$nextTick(res => {
-                this.$refs.condition.init()
-            })
-        },
-
-        getTreeCode(data, arr) {
-            console.log(this.reasoningList,data,'显示结果李大胖胖')
-            data.forEach((item) => {
-
-                if (item && item.type == "property") {
-
-                    let code = item.property.mdCode;
-                    if (arr[item.property.mdTypeCode]) {
-                        arr[item.property.mdTypeCode].push(code);
-                    }
-                    this.reasoningList.forEach(e=>{
-                        if(e.id == item.id){
-                            item.property.status = 'Y'
-                            item.property.data = e.data
-                        }
-                    })
-
-                }
-
-                if (
-                    item &&
-                    item.type == "relation" &&
+        if (
+          item &&
+                    item.type == 'relation' &&
                     item.children &&
                     item.children.length > 0
-                ) {
-                    this.getTreeCode(item.children, arr);
-                }
-            });
-        },
-
-
-        handleDrawerClose(done) {
-            done();
-            this.$emit('refreshDataList')
-        },
-
-        onClickSave() {
-            let req = {
-                id: this.id,
-                config: this.list[0]
-            }
-            ruleConfigUpdateConfig(req).then(res => {
-                if (res.code == '0') {
-                    this.drawer = false
-                }
-            })
+        ) {
+          this.getTreeCode(item.children, arr)
+        }
+      })
+    },
 
-        },
+    handleDrawerClose(done) {
+      done()
+      this.$emit('refreshDataList')
     },
 
-    //--------------------------------
-};
+    onClickSave() {
+      const req = {
+        id: this.id,
+        config: this.list[0]
+      }
+      ruleConfigUpdateConfig(req).then(res => {
+        if (res.code == '0') {
+          this.drawer = false
+        }
+      })
+    }
+  }
+
+  // --------------------------------
+}
 </script>
 
 <style lang="scss" scoped>
@@ -220,4 +224,4 @@ export default {
     padding: 20px;
     text-align: right;
 }
-</style>
+</style>

Разница между файлами не показана из-за своего большого размера
+ 478 - 480
src/components/ronin-engine/tree.vue


+ 128 - 116
src/components/ronin-user-list/index.vue

@@ -1,138 +1,150 @@
 <template>
-    <div>
-        <el-drawer title="人员列表" :visible.sync="showUser" size="80%" direction="rtl">
+  <div>
+    <el-drawer
+      title="人员列表"
+      :visible.sync="showUser"
+      size="80%"
+      direction="rtl"
+    >
+      <el-form
+        :inline="true"
+        size="medium"
+        :model="req"
+        style="padding-left: 20px"
+      >
+        <el-form-item label="姓名:">
+          <el-input v-model="req.patientName" placeholder="请输入姓名" />
+        </el-form-item>
+
+        <!-- <el-form-item label="电话:">
 
-            <el-form :inline="true" size="medium" :model="req" style="padding-left: 20px;">
-                <el-form-item label="姓名:">
-                    <el-input v-model="req.patientName" placeholder="请输入姓名" />
-                </el-form-item>
-                
-                <!-- <el-form-item label="电话:">
-                  
                     <el-input
                         v-model="req.patientPhone"
                         placeholder="请输入"
                     />
-               
-                 
-                </el-form-item> -->
-                <el-form-item>
-                    <el-button type="primary" @click="onSubmit">查询</el-button>
-                    <el-button @click="onReset">重置</el-button>
-                </el-form-item>
-            </el-form>
-            <div class="user-content">
-                <el-table :data="tableUserData" style="width: 100%">
-
-                    <el-table-column prop="patientName" label="姓名" />
-                    <el-table-column prop="age" label="年龄">
-                        <template slot-scope="scope">
-                            {{ scope.row.age }}
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="patientGenderStandard" label="性别" >
-                        <template slot-scope="scope">
-                            {{ scope.row.patientGenderStandard == 'W'?'女':'男' }}
-                        </template>
-
-                    </el-table-column>
-
-                    <el-table-column prop="patientId" label="患者卡号" />
-
-                    <el-table-column prop="phone" label="电话" />
-                    <el-table-column prop="sparePhone" label="电话2" />
 
-                    <el-table-column fixed="right" label="操作" width="180">
-                        <template slot-scope="scope">
-                            <el-button type="text" @click="handleClick(scope.row)">查看档案</el-button>
-
-                        </template>
-                    </el-table-column>
-                </el-table>
-                <!-- <span @click="handleClick({})">1111</span> -->
-                <pagination :total="total" :page.sync="req.page" :limit.sync="req.rows" @pagination="getList" />
-            </div>
-
-        </el-drawer>
-
-
-        <RoninArchive ref="roninArchive"></RoninArchive>
-    </div>
+                </el-form-item> -->
+        <el-form-item>
+          <el-button type="primary" @click="onSubmit">查询</el-button>
+          <el-button @click="onReset">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <div class="user-content">
+        <el-table :data="tableUserData" style="width: 100%">
+          <el-table-column prop="patientName" label="姓名" />
+          <el-table-column prop="age" label="年龄">
+            <template slot-scope="scope">
+              {{ scope.row.age }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="patientGenderStandard" label="性别">
+            <template slot-scope="scope">
+              {{ scope.row.patientGenderStandard == "W" ? "女" : "男" }}
+            </template>
+          </el-table-column>
+
+          <el-table-column prop="patientId" label="患者卡号" />
+
+          <el-table-column prop="phone" label="电话" />
+          <el-table-column prop="sparePhone" label="电话2" />
+
+          <el-table-column fixed="right" label="操作" width="180">
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                @click="handleClick(scope.row)"
+              >查看档案</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- <span @click="handleClick({})">1111</span> -->
+        <pagination
+          :total="total"
+          :page.sync="req.page"
+          :limit.sync="req.rows"
+          @pagination="getList"
+        />
+      </div>
+    </el-drawer>
+
+    <RoninArchive ref="roninArchive" />
+  </div>
 </template>
 
 <script>
-import RoninArchive from "@/ronin/archive/index"
-import {
-    statisticPatient,
-} from '@/api/dashboard'
+import RoninArchive from '@/ronin/archive/index'
+import { statisticPatient } from '@/api/dashboard'
 export default {
-    props: {
-        type: {
-            default: 'Y'
-        }
+  components: { RoninArchive },
+  props: {
+    type: {
+      default: 'Y'
+    }
+  },
+  data() {
+    return {
+      tableUserData: [],
+      userType: '',
+      showUser: false,
+      total: 0,
+      req: {
+        labelStatDimensionType: '',
+        page: 1,
+        rows: 10,
+        patientName: '',
+        patientPhone: ''
+      }
+    }
+  },
+
+  methods: {
+    init(e, id) {
+      this.showUser = true
+      this.req.labelStatDimensionType = e
+      this.req.page = 1
+      this.req.rows = 10
+      this.req.diseaseId = id
+      this.tableUserData = []
+      this.req.isNowLabel = this.type
+      this.getList()
     },
-    components: { RoninArchive },
-    data() {
-        return {
-            tableUserData: [],
-            userType: '',
-            showUser: false,
-            total: 0,
-            req: {
-                labelStatDimensionType: '',
-                page: 1,
-                rows: 10,
-                patientName: '',
-                patientPhone:''
-            }
+
+    getList() {
+      statisticPatient(this.req).then((res) => {
+        if (res.code == '0' && res.data) {
+          this.total = res.data.total
+          this.tableUserData = res.data.list
         }
+      })
+    },
+    onSubmit() {
+      this.getList()
     },
 
-    methods: {
-        init(e,id) {
-            this.showUser = true
-            this.req.labelStatDimensionType = e
-            this.req.page = 1
-            this.req.rows = 10
-            this.req.diseaseId = id
-            this.tableUserData = []
-            this.req.isNowLabel = this.type
-            this.getList()
-
-        },
-
-        getList() {
-            statisticPatient(this.req).then(res => {
-                if (res.code == '0' && res.data) {
-                    this.total = res.data.total
-                    this.tableUserData = res.data.list
-                }
-            })
-        },
-        onSubmit() {
-            this.getList()
-        },
-
-        onReset() {
-            this.req.patientName = ''
-            this.req.patientPhone = ''
-            this.getList()
-        },
+    onReset() {
+      this.req.patientName = ''
+      this.req.patientPhone = ''
+      this.getList()
+    },
 
-        handleClick(data) {
-            console.log(data, '显示数据')
-            // ronin修改档案
-            // this.$router.push(`/user/health-document/index?type=record&id=${data.patientId}`)
-            // this.$refs.roninArchive.init(data.patientId,data.patientGenderStandard,data.phone)
-            this.$refs.roninArchive.init(data.patientId,data.patientName,data.phone,data.patientGenderStandard)
-     
-        },
+    handleClick(data) {
+      console.log(data, '显示数据')
+      // ronin修改档案
+      // this.$router.push(`/user/health-document/index?type=record&id=${data.patientId}`)
+      // this.$refs.roninArchive.init(data.patientId,data.patientGenderStandard,data.phone)
+      this.$refs.roninArchive.init(
+        data.patientId,
+        data.patientName,
+        data.phone,
+        data.patientGenderStandard
+      )
     }
+  }
 }
 </script>
 
 <style lang="scss" scoped>
-.user-content{
-    padding: 20px;
+.user-content {
+  padding: 20px;
 }
-</style>
+</style>

+ 184 - 192
src/components/ronin/illnessSelectNew.vue

@@ -1,208 +1,200 @@
 <template>
-    <div>
-      <el-select
-        popper-class="virtualselect"
-        class="virtual-select-custom-style"
-        :popper-append-to-body="false"
-         v-model="data"
-         :style="'width:100%' "
-        filterable
-        :filter-method="filterMethod"
-        default-first-option
-        clearable
-        :placeholder="placeholderParams"
-        :multiple="multiple"
-        @clear="clearChange"
-        @focus="onFocus"
-        @change="onDataChange"
-      >
-        <virtual-list
-          ref="virtualList"
-          class="virtualselect-list"
-          @tobottom="tobottom"
-          :data-key="roninkey"
-          :data-sources="dataList"
-          :data-component="itemComponent"
-          :keeps="keepsParams"
-          :extra-props="{
-            label: label,
-            value: roninkey,
-            isRight: isRight,
-          }"
-        ></virtual-list>
-      </el-select>
-    </div>
-  </template>
+  <div>
+    <el-select
+      v-model="data"
+      popper-class="virtualselect"
+      class="virtual-select-custom-style"
+      :popper-append-to-body="false"
+      :style="'width:100%' "
+      filterable
+      :filter-method="filterMethod"
+      default-first-option
+      clearable
+      :placeholder="placeholderParams"
+      :multiple="multiple"
+      @clear="clearChange"
+      @focus="onFocus"
+      @change="onDataChange"
+    >
+      <virtual-list
+        ref="virtualList"
+        class="virtualselect-list"
+        :data-key="roninkey"
+        :data-sources="dataList"
+        :data-component="itemComponent"
+        :keeps="keepsParams"
+        :extra-props="{
+          label: label,
+          value: roninkey,
+          isRight: isRight,
+        }"
+        @tobottom="tobottom"
+      />
+    </el-select>
+  </div>
+</template>
   <!-- 此组件需要在数据加载完成之后在加载此组件  -->
-  <script>
-    import virtualList from 'vue-virtual-scroll-list'
-    import ElOptionNode from './selectItem'
-    import { queryDiseaseByPage } from "@/api/tag"
-    export default {
-      components: {
-        'virtual-list': virtualList
-      },
-      
-      
-      props: {
-        // 显示名称
-        value:{
-          default:''
-        },
-        label: {
-          type: String,
-          default: 'name'
-        },
-        // 标识
-        roninkey: {
-          type: String,
-          default: 'id'
-        },
-        // 显示右边
-        isRight: {
-          type: Boolean,
-          default: false
-        },
-        // 加载条数
-        keepsParams: {
-          type: Number,
-          default: 10
-        },
-      
-        // 是否多选
-        multiple: {
-          type: Boolean,
-          default: false
-        },
-        placeholderParams: {
-          type: String,
-          default: '请选择'
-        },
-      },
-      data() {
-        return {
-          itemComponent: ElOptionNode,
-          selectArr: [],
-          dataList:[],//下拉列表
-          defaultValue: null, // 绑定的默认值
-          addPage:false,
-          page:1,
+<script>
+import virtualList from 'vue-virtual-scroll-list'
+import ElOptionNode from './selectItem'
+import { queryDiseaseByPage } from '@/api/tag'
+export default {
+  components: {
+    'virtual-list': virtualList
+  },
 
-          data:[],
-          allowCreate:'',
-        }
-      },
-      watch: {
-        value(e,oldE){
+  props: {
+    // 显示名称
+    value: {
+      default: ''
+    },
+    label: {
+      type: String,
+      default: 'name'
+    },
+    // 标识
+    roninkey: {
+      type: String,
+      default: 'id'
+    },
+    // 显示右边
+    isRight: {
+      type: Boolean,
+      default: false
+    },
+    // 加载条数
+    keepsParams: {
+      type: Number,
+      default: 10
+    },
 
-          this.dataList = []
-         console.log(e,'我监听了11111111')
-        if(e && e.length > 0){
-          this.createGetValue()
-        }
-         
-          
-          
-        }
-      },
-      mounted() {
-        // console.log('我大胖走了开始')
-        // this.dataList = []
-        if(this.multiple){
-            this.curId  = []
-           }else{
-            this.curId =''
-           }
-        // this.createGetValue()
+    // 是否多选
+    multiple: {
+      type: Boolean,
+      default: false
+    },
+    placeholderParams: {
+      type: String,
+      default: '请选择'
+    }
+  },
+  data() {
+    return {
+      itemComponent: ElOptionNode,
+      selectArr: [],
+      dataList: [], // 下拉列表
+      defaultValue: null, // 绑定的默认值
+      addPage: false,
+      page: 1,
 
-        // this.dataList = []
-        //  if(this.value && this.value.length > 0){
-        //    this.createGetValue()
-        //  }
-      },
-      methods: {
-        createGetValue(){
-         
-            if(this.value instanceof Array){
-                this.getData(this.value)
-            }else if(this.value){
-                this.getData([this.value])
-            }
-        },
-        onDataChange(e){
-          this.$emit("input", this.data);
-          console.log(this.data,'11111')
-        },
-        // 搜索
-        filterMethod(e) {
-          this.curValue = e
-          this.dataList = []
-          this.getData()
-        },
-       
-        clearChange() {
-          if (typeof this.defaultValue === 'string') {
-            this.defaultValue = ''
-          } else if (this.multiple) {
-            this.defaultValue = []
-          }
-          this.visibleChange(false)
-        },
+      data: [],
+      allowCreate: ''
+    }
+  },
+  watch: {
+    value(e, oldE) {
+      this.dataList = []
+      console.log(e, '我监听了11111111')
+      if (e && e.length > 0) {
+        this.createGetValue()
+      }
+    }
+  },
+  mounted() {
+    // console.log('我大胖走了开始')
+    // this.dataList = []
+    if (this.multiple) {
+      this.curId = []
+    } else {
+      this.curId = ''
+    }
+    // this.createGetValue()
 
-         // 获得焦点时候
-         onFocus() {
-            this.page = 1;
+    // this.dataList = []
+    //  if(this.value && this.value.length > 0){
+    //    this.createGetValue()
+    //  }
+  },
+  methods: {
+    createGetValue() {
+      if (this.value instanceof Array) {
+        this.getData(this.value)
+      } else if (this.value) {
+        this.getData([this.value])
+      }
+    },
+    onDataChange(e) {
+      this.$emit('input', this.data)
+      console.log(this.data, '11111')
+    },
+    // 搜索
+    filterMethod(e) {
+      this.curValue = e
+      this.dataList = []
+      this.getData()
+    },
+
+    clearChange() {
+      if (typeof this.defaultValue === 'string') {
+        this.defaultValue = ''
+      } else if (this.multiple) {
+        this.defaultValue = []
+      }
+      this.visibleChange(false)
+    },
+
+    // 获得焦点时候
+    onFocus() {
+      this.page = 1
+      this.dataList = []
+      this.$nextTick(() => {
+        this.$refs.virtualList.reset()
+      })
+      this.getData(null, true)
+    },
+    getData(ids, iscreate) {
+      const req = {
+        ids: ids || [],
+        page: this.page,
+        rows: 10,
+        keywords: this.curValue,
+        woStatus: 'N',
+        showStatus: 'Y'
+      }
+      queryDiseaseByPage(req).then(res => {
+        this.addPage = false
+        console.log(res, '1111')
+        if (res.code == '0' && res.data && res.data.list) {
+          if (iscreate) {
             this.dataList = []
-            this.$nextTick(() => {
-              this.$refs.virtualList.reset()
+          }
+          this.dataList = [...this.dataList, ...res.data.list]
+          if (this.value) {
+            this.data = this.value
+          }
 
-            })
-            this.getData(null,true)
-        },
-        getData(ids,iscreate) {
-            let req = {
-                ids: ids?ids:[],
-                page: this.page,
-                rows: 10,
-                keywords: this.curValue,
-                woStatus:'N',
-                showStatus:'Y'
-            }
-            queryDiseaseByPage(req).then(res => {
-                this.addPage = false
-                  console.log(res,'1111')
-                if (res.code == '0' && res.data && res.data.list) {
-                  if(iscreate){
-                    this.dataList = []
-                  }
-                    this.dataList = [...this.dataList, ...res.data.list]
-                    if(this.value){
-                      this.data = this.value
-                    }
-                    
-       
-                    console.log( this.dataList ,this.data, '我大胖走了监听')
-                    this.$forceUpdate()
-                }
-            })
-        },
+          console.log(this.dataList, this.data, '我大胖走了监听')
+          this.$forceUpdate()
+        }
+      })
+    },
 
-         //滑到底部】
-         tobottom() {
-            if (this.addPage) {
-                return
-            }
-            this.addPage = true
-            this.page++
-            this.getData()
-        },
-        // 事件结束
+    // 滑到底部】
+    tobottom() {
+      if (this.addPage) {
+        return
       }
+      this.addPage = true
+      this.page++
+      this.getData()
     }
-  </script>
+    // 事件结束
+  }
+}
+</script>
   <style lang="scss" scoped>
   .virtualselect-list{
     max-height: 200px;
     overflow-y: auto;
   }
-  </style>
+  </style>

+ 68 - 68
src/components/ronin/selectItem.vue

@@ -1,71 +1,71 @@
 <template>
-    <el-option
-      :key="label+value"
-      :label="concatString(source[label], source[value])"
-      :value="source[value]"
-      :disabled="source.disabled"
-      :title="concatString(source[label], source[value])"
-    >
-      <span>{{ concatString(source[label], source[value]) }}</span>
-      <span
-        v-if="isRight"
-        style="float:right;color:#939393"
-      >{{ source[value] }}</span>
-    </el-option>
-  </template>
-  <script>
-    export default {
-      name: 'ElOptionNode',
-      props: {
-        // 每一行的索引
-        index: {
-          type: Number,
-          default: 0
-        },
-        // 每一行的内容
-        source: {
-          type: Object,
-          default() {
-            return {}
-          }
-        },
-        // 需要显示的名称
-        label: {
-          type: String,
-          default: ''
-        },
-        // 绑定的值
-        value: {
-          type: String,
-          default: ''
-        },
-        // 是否拼接label | value
-        isConcat: {
-          type: Boolean,
-          default: false
-        },
-        // 拼接label、value符号
-        concatSymbol: {
-          type: String,
-          default: ' | '
-        },
-        // 右侧是否显示绑定的值
-        isRight: {
-          type: Boolean,
-          default() {
-            return false
-          }
-        }
-      },
-      methods: {
-        concatString(a, b) {
-          a = a || ''
-          b = b || ''
-          if (this.isConcat) {
-            return a + ((a && b) ? this.concatSymbol : '') + b
-          }
-          return a
-        }
+  <el-option
+    :key="label+value"
+    :label="concatString(source[label], source[value])"
+    :value="source[value]"
+    :disabled="source.disabled"
+    :title="concatString(source[label], source[value])"
+  >
+    <span>{{ concatString(source[label], source[value]) }}</span>
+    <span
+      v-if="isRight"
+      style="float:right;color:#939393"
+    >{{ source[value] }}</span>
+  </el-option>
+</template>
+<script>
+export default {
+  name: 'ElOptionNode',
+  props: {
+    // 每一行的索引
+    index: {
+      type: Number,
+      default: 0
+    },
+    // 每一行的内容
+    source: {
+      type: Object,
+      default() {
+        return {}
       }
+    },
+    // 需要显示的名称
+    label: {
+      type: String,
+      default: ''
+    },
+    // 绑定的值
+    value: {
+      type: String,
+      default: ''
+    },
+    // 是否拼接label | value
+    isConcat: {
+      type: Boolean,
+      default: false
+    },
+    // 拼接label、value符号
+    concatSymbol: {
+      type: String,
+      default: ' | '
+    },
+    // 右侧是否显示绑定的值
+    isRight: {
+      type: Boolean,
+      default() {
+        return false
+      }
+    }
+  },
+  methods: {
+    concatString(a, b) {
+      a = a || ''
+      b = b || ''
+      if (this.isConcat) {
+        return a + ((a && b) ? this.concatSymbol : '') + b
+      }
+      return a
     }
-  </script>
+  }
+}
+</script>

+ 246 - 215
src/components/ronin/treeSelect.vue

@@ -1,241 +1,272 @@
 <template>
-    <el-select v-model="valueTitle" :clearable="clearable" :size='size' :disabled="disabled" @clear="clearHandle"
-      ref='elSelect' :placeholder="placeholder" :popper-class="`CCIT-select-tree ${themeClass}`"
-      @focus="selectFocus" :filterable="filterable" :filter-method="selectFilter"
-      class="CCIT-selectTree" @visible-change="visibleChange" :multiple="multiple"
-      :collapse-tags="collapseTags" @remove-tag="removeTag" :key="key" :style="'width:'+width ? width +'px' :'100%' ">
-      <el-option v-for="item in selectOptions" :key="item.id" :label="item[props.label]"
-        :value="item[props.value]" style="display:none"></el-option>
-      <el-option :value="optionTitle" :label="optionTitle" class="options">
-        <el-tree id="tree-option" ref="selectTree" :accordion="accordion" :data="options"
-          :default-expand-all="defaultExpandAll" :props="props" :node-key="props.value"
-          :default-expanded-keys="defaultExpandedKey" @node-click="handleNodeClick"
-          :filter-node-method="filterNode" :show-checkbox="multiple" :check-on-click-node="multiple"
-          :class="{'single':!multiple}" :expand-on-click-node="!multiple" @check="check"
-          v-show="options.length">
-          <span class="custom-tree-node" slot-scope="{ node, data }">
-            <slot :data="{ node, data }">
-              <i :class="data.icon" v-if="data.icon"></i>
-              <span class="text">{{node.label}}</span>
-            </slot>
-            <!-- 自定义slot示例 开始 -->
-            <!-- <template slot-scope="{data}">
+  <el-select
+    ref="elSelect"
+    v-model="valueTitle"
+    :clearable="clearable"
+    :size="size"
+    :disabled="disabled"
+    :placeholder="placeholder"
+    :popper-class="`CCIT-select-tree ${themeClass}`"
+    :filterable="filterable"
+    :filter-method="selectFilter"
+    class="CCIT-selectTree"
+    :multiple="multiple"
+    @clear="clearHandle"
+    :collapse-tags="collapseTags"
+    :key="key"
+    :style="'width:'+width ? width +'px' :'100%' "
+    @focus="selectFocus"
+    @visible-change="visibleChange"
+    @remove-tag="removeTag"
+  >
+    <el-option
+      v-for="item in selectOptions"
+      :key="item.id"
+      :label="item[props.label]"
+      :value="item[props.value]"
+      style="display:none"
+    />
+    <el-option :value="optionTitle" :label="optionTitle" class="options">
+      <el-tree
+        id="tree-option"
+        ref="selectTree"
+        :accordion="accordion"
+        :data="options"
+        :default-expand-all="defaultExpandAll"
+        :props="props"
+        :node-key="props.value"
+        :default-expanded-keys="defaultExpandedKey"
+        :filter-node-method="filterNode"
+        :show-checkbox="multiple"
+        :check-on-click-node="multiple"
+        v-show="options.length"
+        :class="{'single':!multiple}"
+        :expand-on-click-node="!multiple"
+        @node-click="handleNodeClick"
+        @check="check"
+      >
+        <span slot-scope="{ node, data }" class="custom-tree-node">
+          <slot :data="{ node, data }">
+            <i v-if="data.icon" :class="data.icon" />
+            <span class="text">{{ node.label }}</span>
+          </slot>
+          <!-- 自定义slot示例 开始 -->
+          <!-- <template slot-scope="{data}">
               <i :class="data.data.icon"></i>
               <span class="text">{{data.node.label}}</span>
             </template> -->
-            <!-- 自定义slot示例 结束 -->
-          </span>
-        </el-tree>
-        <p v-show="!options.length" class="empty-text">无数据</p>
-      </el-option>
-    </el-select>
-  </template>
-  
-  <script>
-  import { mapState } from 'vuex'
-  export default {
-    name: "el-tree-select",
+          <!-- 自定义slot示例 结束 -->
+        </span>
+      </el-tree>
+      <p v-show="!options.length" class="empty-text">无数据</p>
+    </el-option>
+  </el-select>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+export default {
+  name: 'ElTreeSelect',
+  props: {
+    // 配置项
     props: {
-      // 配置项
-      props: {
-        type: Object,
-        default: () => ({
-          value: 'id',             // ID字段名
-          label: 'name',       // 显示名称
-          children: 'children',    // 子级字段名
-        })
-      },
-      width:{type: String, default: '' },
-      size:{type: String, default: '' },
-      // 是否禁用
-      disabled: { type: Boolean, default: false },
-      // 选项列表数据(树形结构的对象数组)
-      options: { type: Array, default: () => [] },
-      placeholder: { type: String, default: '请选择' },
-      // 初始值
-      value: {
-        type: [String, Array,Number]
-      },
-      // 可清空选项
-      clearable: { type: Boolean, default: false },
-      // 能否搜索
-      filterable: { type: Boolean, default: true },
-      // 只能选择最后一层的数值
-      lastLevel: { type: Boolean, default: false },
-      // 只能选择最后一层的数值时,需要根据 lastLevelKey来判断是否最后一层
-      lastLevelKey: { type: String, default: "hasChildren" },
-      lastLevelValue: { default: false },
-      // 自动收起
-      accordion: { type: Boolean, default: false },
-      defaultExpandAll: { type: Boolean, default: true },
-      multiple: { type: Boolean, default: false }, // 是否多选,默认单选
-      collapseTags: {
-        type: Boolean,
-        default: false
-      },
-    },
-    computed: {
-      ...mapState({
-        themeClass: state => state.settings.themeClass
+      type: Object,
+      default: () => ({
+        value: 'id', // ID字段名
+        label: 'name', // 显示名称
+        children: 'children' // 子级字段名
       })
     },
-    data() {
-      return {
-        valueTitle: '',
-        defaultExpandedKey: [],
-        selectOptions: [],
-        optionTitle: "",
-        key: +new Date()
-      }
+    width: { type: String, default: '' },
+    size: { type: String, default: '' },
+    // 是否禁用
+    disabled: { type: Boolean, default: false },
+    // 选项列表数据(树形结构的对象数组)
+    options: { type: Array, default: () => [] },
+    placeholder: { type: String, default: '请选择' },
+    // 初始值
+    value: {
+      type: [String, Array, Number]
     },
-    mounted() {
-      if (this.value) {
-        this.initHandle()
-      }
+    // 可清空选项
+    clearable: { type: Boolean, default: false },
+    // 能否搜索
+    filterable: { type: Boolean, default: true },
+    // 只能选择最后一层的数值
+    lastLevel: { type: Boolean, default: false },
+    // 只能选择最后一层的数值时,需要根据 lastLevelKey来判断是否最后一层
+    lastLevelKey: { type: String, default: 'hasChildren' },
+    lastLevelValue: { default: false },
+    // 自动收起
+    accordion: { type: Boolean, default: false },
+    defaultExpandAll: { type: Boolean, default: true },
+    multiple: { type: Boolean, default: false }, // 是否多选,默认单选
+    collapseTags: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    ...mapState({
+      themeClass: state => state.settings.themeClass
+    })
+  },
+  data() {
+    return {
+      valueTitle: '',
+      defaultExpandedKey: [],
+      selectOptions: [],
+      optionTitle: '',
+      key: +new Date()
+    }
+  },
+  watch: {
+    value(val) {
+      this.initHandle()
     },
-    methods: {
-      visibleChange(val) {
-        this.$emit('visible-change', val)
-      },
-      selectFilter(val) {
-        if (this.options.length) this.$refs.selectTree.filter(val);
-      },
-      filterNode(value, data) {
-        if (!value) return true;
-        return data[this.props.label].indexOf(value) !== -1;
-      },
-      selectFocus() {
-        this.initHandle()
-      },
-      // 初始化值
-      initHandle() {
-        this.$refs.selectTree.filter('');
-        if (this.value) {
-          if (this.multiple) {
-            setTimeout(() => {
-              let titleList = []
-              this.$refs.selectTree.setCheckedKeys(this.value)
-              if (this.lastLevel) {
-                titleList = this.$refs.selectTree.getCheckedNodes(true)
-              } else {
-                titleList = this.$refs.selectTree.getCheckedNodes()
-              }
-              this.selectOptions = titleList
-              this.valueTitle = titleList.map(o => o[this.props.value])
-            }, 10)
-          } else {
-            setTimeout(() => {
-              this.valueTitle = this.$refs.selectTree.getNode(this.value) ? this.$refs.selectTree.getNode(this.value).data[this.props.label] : ''     // 初始化显示
-              this.$refs.selectTree.setCurrentKey(this.value)       // 设置默认选中
-              this.defaultExpandedKey = [this.value]   // 设置默认展开
-            }, 10);
-          }
-        } else {
-          if (this.multiple) {
-            this.valueTitle = []
-            this.$refs.selectTree.setCheckedKeys([])
-          } else {
-            this.valueTitle = ''
-            this.$refs.selectTree.setCurrentKey(null)
-          }
-        }
-        this.initScroll()
-      },
-      // 初始化滚动条
-      initScroll() {
-        this.$nextTick(() => {
-          let list = document.querySelectorAll('.CCIT-select-tree .el-scrollbar .el-select-dropdown__wrap')
-          // 有多个下拉框,造成页面错位
-          let index = list.length - 1
-          let scrollWrap = list[index]
-          let scrollBar = document.querySelectorAll('.el-scrollbar .el-scrollbar__bar')
-          scrollWrap.style && (scrollWrap.style.cssText = 'margin: 0px; max-height: none; overflow: hidden;')
-          for (let i = 0; i < scrollBar.length; i++) {
-            scrollBar[i].style.width = 0
-          }
-        })
-      },
-      // 单选切换选项
-      handleNodeClick(node) {
-        if (!this.multiple) {
-          console.log(node,'1111111')
-          if(node.disabled){
-            return
-          }
-          if (this.lastLevel && node[this.lastLevelKey] && node[this.lastLevelKey] != this.lastLevelValue) return
-          this.valueTitle = node[this.props.label]
-          this.$emit('input', node[this.props.value], node)
-          this.$emit('change', node[this.props.value], node)
-          this.defaultExpandedKey = []
-          this.$refs.elSelect.blur()
-        }
-      },
-      // 多选选择
-      check(node) {
-        if (!this.multiple) return
-        let selectedData = [], titleList = [], selectedTextData = []
-        if (this.lastLevel) {
-          selectedTextData = this.$refs.selectTree.getCheckedNodes(true)
-          for (let i = 0; i < selectedTextData.length; i++) {
-            const e = selectedTextData[i];
-            if (e[this.lastLevelKey] == this.lastLevelValue) {
-              selectedData.push(e[this.props.value])
-              titleList.push(e[this.props.label])
+    multiple(val) {
+      this.key = +new Date()
+    },
+    options(val) {
+      if (this.value) this.initHandle()
+    }
+  },
+  mounted() {
+    if (this.value) {
+      this.initHandle()
+    }
+  },
+  methods: {
+    visibleChange(val) {
+      this.$emit('visible-change', val)
+    },
+    selectFilter(val) {
+      if (this.options.length) this.$refs.selectTree.filter(val)
+    },
+    filterNode(value, data) {
+      if (!value) return true
+      return data[this.props.label].indexOf(value) !== -1
+    },
+    selectFocus() {
+      this.initHandle()
+    },
+    // 初始化值
+    initHandle() {
+      this.$refs.selectTree.filter('')
+      if (this.value) {
+        if (this.multiple) {
+          setTimeout(() => {
+            let titleList = []
+            this.$refs.selectTree.setCheckedKeys(this.value)
+            if (this.lastLevel) {
+              titleList = this.$refs.selectTree.getCheckedNodes(true)
+            } else {
+              titleList = this.$refs.selectTree.getCheckedNodes()
             }
-          }
+            this.selectOptions = titleList
+            this.valueTitle = titleList.map(o => o[this.props.value])
+          }, 10)
         } else {
-          selectedTextData = this.$refs.selectTree.getCheckedNodes()
-          for (let i = 0; i < selectedTextData.length; i++) {
-            const e = selectedTextData[i];
-            selectedData.push(e[this.props.value])
-            titleList.push(e[this.props.label])
-          }
+          setTimeout(() => {
+            this.valueTitle = this.$refs.selectTree.getNode(this.value) ? this.$refs.selectTree.getNode(this.value).data[this.props.label] : '' // 初始化显示
+            this.$refs.selectTree.setCurrentKey(this.value) // 设置默认选中
+            this.defaultExpandedKey = [this.value] // 设置默认展开
+          }, 10)
         }
-        this.$emit('input', selectedData, selectedTextData)
-        this.$emit('change', selectedData, selectedTextData)
-      },
-      removeTag(tag) {
-        this.$refs.selectTree.setChecked(tag, false)
-        this.check()
-      },
-      // 清除选中
-      clearHandle() {
+      } else {
         if (this.multiple) {
           this.valueTitle = []
-          this.$emit('input', [])
-          this.$emit('change', [], [])
           this.$refs.selectTree.setCheckedKeys([])
         } else {
           this.valueTitle = ''
-          this.$emit('input', '')
-          this.$emit('change', '', '')
+          this.$refs.selectTree.setCurrentKey(null)
+        }
+      }
+      this.initScroll()
+    },
+    // 初始化滚动条
+    initScroll() {
+      this.$nextTick(() => {
+        const list = document.querySelectorAll('.CCIT-select-tree .el-scrollbar .el-select-dropdown__wrap')
+        // 有多个下拉框,造成页面错位
+        const index = list.length - 1
+        const scrollWrap = list[index]
+        const scrollBar = document.querySelectorAll('.el-scrollbar .el-scrollbar__bar')
+        scrollWrap.style && (scrollWrap.style.cssText = 'margin: 0px; max-height: none; overflow: hidden;')
+        for (let i = 0; i < scrollBar.length; i++) {
+          scrollBar[i].style.width = 0
+        }
+      })
+    },
+    // 单选切换选项
+    handleNodeClick(node) {
+      if (!this.multiple) {
+        console.log(node, '1111111')
+        if (node.disabled) {
+          return
         }
+        if (this.lastLevel && node[this.lastLevelKey] && node[this.lastLevelKey] != this.lastLevelValue) return
+        this.valueTitle = node[this.props.label]
+        this.$emit('input', node[this.props.value], node)
+        this.$emit('change', node[this.props.value], node)
         this.defaultExpandedKey = []
-        this.clearSelected()
-      },
-      // 清空选中样式
-      clearSelected() {
-        let allNode = document.querySelectorAll('#tree-option .el-tree-node')
-        for (let i = 0; i < allNode.length; i++) {
-          allNode[i].classList.remove('is-current')
+        this.$refs.elSelect.blur()
+      }
+    },
+    // 多选选择
+    check(node) {
+      if (!this.multiple) return
+      const selectedData = []; const titleList = []; let selectedTextData = []
+      if (this.lastLevel) {
+        selectedTextData = this.$refs.selectTree.getCheckedNodes(true)
+        for (let i = 0; i < selectedTextData.length; i++) {
+          const e = selectedTextData[i]
+          if (e[this.lastLevelKey] == this.lastLevelValue) {
+            selectedData.push(e[this.props.value])
+            titleList.push(e[this.props.label])
+          }
+        }
+      } else {
+        selectedTextData = this.$refs.selectTree.getCheckedNodes()
+        for (let i = 0; i < selectedTextData.length; i++) {
+          const e = selectedTextData[i]
+          selectedData.push(e[this.props.value])
+          titleList.push(e[this.props.label])
         }
       }
+      this.$emit('input', selectedData, selectedTextData)
+      this.$emit('change', selectedData, selectedTextData)
+    },
+    removeTag(tag) {
+      this.$refs.selectTree.setChecked(tag, false)
+      this.check()
     },
-    watch: {
-      value(val) {
-        this.initHandle()
-      },
-      multiple(val) {
-        this.key = +new Date()
-      },
-      options(val) {
-        if (this.value) this.initHandle()
+    // 清除选中
+    clearHandle() {
+      if (this.multiple) {
+        this.valueTitle = []
+        this.$emit('input', [])
+        this.$emit('change', [], [])
+        this.$refs.selectTree.setCheckedKeys([])
+      } else {
+        this.valueTitle = ''
+        this.$emit('input', '')
+        this.$emit('change', '', '')
+      }
+      this.defaultExpandedKey = []
+      this.clearSelected()
+    },
+    // 清空选中样式
+    clearSelected() {
+      const allNode = document.querySelectorAll('#tree-option .el-tree-node')
+      for (let i = 0; i < allNode.length; i++) {
+        allNode[i].classList.remove('is-current')
       }
     }
   }
-  </script>
-  
-  
+}
+</script>
+
   <style >
   .CCIT-select-tree{
     min-width: 180px;
@@ -245,7 +276,7 @@
   .CCIT-selectTree {
     width: 100%;
   }
-  
+
   .el-select-dropdown{
     min-width: 200px;
   }
@@ -296,4 +327,4 @@
     padding: 0;
     line-height: 24px;
   }
-  </style>
+  </style>

+ 4 - 4
src/layout/components/AppMain.vue

@@ -1,14 +1,14 @@
 <template>
   <section class="app-main">
-    
+
     <transition name="fade-transform" mode="out-in">
-      <keep-alive  v-if="$route.meta.keepAlive">
-        <router-view/>
+      <keep-alive v-if="$route.meta.keepAlive">
+        <router-view />
       </keep-alive>
       <div v-else>
         <router-view />
       </div>
-     
+
     </transition>
   </section>
 </template>

+ 1 - 1
src/layout/components/Navbar.vue

@@ -17,7 +17,7 @@
       >
         <div class="avatar-wrapper">
           <img src="@/assets/avatar/Avatar-17.png" class="user-avatar">
-          <div>{{ name }}<span></span></div>
+          <div>{{ name }}<span /></div>
           <div class="" style="padding-bottom: 10px;">
             <i class="el-icon-caret-bottom" />
           </div>

+ 3 - 3
src/layout/components/Sidebar/Logo.vue

@@ -2,11 +2,11 @@
   <div class="sidebar-logo-container" :class="{'collapse':collapse}">
     <transition name="sidebarLogoFade">
       <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
-        <img src="@/assets/images/logo-oasis.png" class="sidebar-logo"/>
-     
+        <img src="@/assets/images/logo-oasis.png" class="sidebar-logo">
+
       </router-link>
       <router-link v-else key="expand" class="sidebar-logo-link" to="/">
-        <img src="@/assets/images/logo-oasis.png" class="sidebar-logo"/>
+        <img src="@/assets/images/logo-oasis.png" class="sidebar-logo">
       </router-link>
     </transition>
   </div>

+ 1 - 1
src/layout/components/Sidebar/index.vue

@@ -5,7 +5,7 @@
       <el-menu
         :default-active="activeMenu"
         :collapse="isCollapse"
-  
+
         :text-color="variables.menuText"
         :unique-opened="false"
         :active-text-color="variables.menuActiveText"

+ 1 - 4
src/main.js

@@ -20,15 +20,12 @@ import './utils/error-log' // error log
 
 import * as filters from './filters' // global filters
 
-
-
 // 批量引入组件
 import components from './components'
 Vue.use(components)
 
-
 // 获取加密key
-import { getAesRsa } from "@/utils/encrypt.js";
+import { getAesRsa } from '@/utils/encrypt.js'
 
 getAesRsa()
 

+ 2 - 2
src/permission.js

@@ -38,9 +38,9 @@ router.beforeEach(async(to, from, next) => {
           let role
           if (OS_REALNAME && (OS_REALNAME == '赵宇晴' || OS_REALNAME == '李明' || OS_REALNAME == '王宏宇' || OS_REALNAME == '蒋炜' || OS_REALNAME == '高坤鹏' || OS_REALNAME == 'admin')) {
             role = ['admin']
-          } else if (OS_REALNAME == '时丽' || OS_REALNAME == '郑婷婷' || OS_REALNAME == '陈蒙蒙' || OS_REALNAME == '刘丽雪'|| OS_REALNAME == '刘柳柳'|| OS_REALNAME == '鲍雨'|| OS_REALNAME == '葛慧敏') {
+          } else if (OS_REALNAME == '时丽' || OS_REALNAME == '郑婷婷' || OS_REALNAME == '陈蒙蒙' || OS_REALNAME == '刘丽雪' || OS_REALNAME == '刘柳柳' || OS_REALNAME == '鲍雨' || OS_REALNAME == '葛慧敏') {
             role = ['doc']
-          }else if (OS_REALNAME == '路露') {
+          } else if (OS_REALNAME == '路露') {
             role = ['lulu']
           } else if (OS_REALNAME == '测试1') {
             role = ['colleague']

+ 20 - 20
src/ronin/archive/index.vue

@@ -8,43 +8,43 @@
       :append-to-body="true"
     >
       <div class="ronin-archive-box">
-        <UserTimeline ref="userTimeline"></UserTimeline>
+        <UserTimeline ref="userTimeline" />
       </div>
     </el-drawer>
   </div>
 </template>
 
 <script>
-import UserTimeline from "@/views/user/components/user_timeline_serve.vue";
+import UserTimeline from '@/views/user/components/user_timeline_serve.vue'
 export default {
   components: { UserTimeline },
   data() {
     return {
       showUser: false,
-      name: "",
-      sex: "",
-      phone: "",
-    };
+      name: '',
+      sex: '',
+      phone: ''
+    }
   },
   methods: {
     init(id, name, phone, sex) {
-      this.name = name;
-      this.phone = phone;
-      this.sex = this.getSexName(sex);
-      this.showUser = true;
+      this.name = name
+      this.phone = phone
+      this.sex = this.getSexName(sex)
+      this.showUser = true
       this.$nextTick(() => {
-        this.$refs.userTimeline.init(id);
-      });
+        this.$refs.userTimeline.init(id)
+      })
     },
     getSexName(sex) {
-      //alert(sex);
-      if (!sex || sex == "") {
-        return "";
+      // alert(sex);
+      if (!sex || sex == '') {
+        return ''
       }
-      return sex === "W" ? "女" : "男";
-    },
-  },
-};
+      return sex === 'W' ? '女' : '男'
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>
@@ -56,4 +56,4 @@ export default {
   padding: 0 16px;
   height: calc(100vh - 55px);
 }
-</style>
+</style>

Разница между файлами не показана из-за своего большого размера
+ 629 - 647
src/ronin/archive/main.vue


+ 6 - 10
src/router/index copy.js

@@ -87,7 +87,7 @@ export const asyncRoutes = [
         path: 'dashboard',
         component: () => import('@/views/dashboard/index'),
         name: 'Dashboard',
-        meta: { title: '数据看板', icon: 'dashboard', affix: true ,noCache: true}
+        meta: { title: '数据看板', icon: 'dashboard', affix: true, noCache: true }
       }
     ]
   },
@@ -152,7 +152,6 @@ export const asyncRoutes = [
       meta: { title: '数据分析', icon: 'user', affix: true }
     },
 
-
     {
       path: 'health-document/index',
       component: () => import('@/views/user/health-document/index'),
@@ -185,8 +184,6 @@ export const asyncRoutes = [
     ]
   },
 
-
-
   {
     path: '/database',
     component: Layout,
@@ -205,7 +202,7 @@ export const asyncRoutes = [
         component: () => import('@/views/database/dwd/list'),
         name: 'dwd',
         meta: { title: 'DWD数据层', icon: 'el-icon-box', noCache: true }
-      },
+      }
       // {
       //   path: 'logs',
       //   component: () => import('@/views/database/logs/list'),
@@ -254,8 +251,7 @@ export const asyncRoutes = [
         component: () => import('@/views/reports/index'),
         name: 'standard',
         meta: { title: '医生统计', icon: 'el-icon-box', noCache: true }
-      },
-     
+      }
 
     ]
   },
@@ -270,19 +266,19 @@ export const asyncRoutes = [
         path: 'statistics',
         component: () => import('@/views/statistics/index'),
         name: 'statistics',
-        meta: { title: '统计看板', icon: 'dashboard', affix: true ,noCache: true}
+        meta: { title: '统计看板', icon: 'dashboard', affix: true, noCache: true }
       },
       {
         path: 'plan',
         component: () => import('@/views/statistics/plan'),
         name: 'plan',
-        meta: { title: '个案管理统计', icon: 'dashboard', affix: true ,noCache: true}
+        meta: { title: '个案管理统计', icon: 'dashboard', affix: true, noCache: true }
       },
       {
         path: 'task',
         component: () => import('@/views/statistics/task'),
         name: 'task',
-        meta: { title: '任务统计', icon: 'dashboard', affix: true ,noCache: true}
+        meta: { title: '任务统计', icon: 'dashboard', affix: true, noCache: true }
       }
     ]
   },

+ 1 - 3
src/router/index.js

@@ -190,8 +190,6 @@ export const asyncRoutes = [
     ]
   },
 
-
-
   {
     path: '/database',
     component: Layout,
@@ -210,7 +208,7 @@ export const asyncRoutes = [
         component: () => import('@/views/database/dwd/list'),
         name: 'dwd',
         meta: { title: 'DWD数据层', icon: 'el-icon-box', noCache: true, roles: ['admin'] }
-      },
+      }
       // {
       //   path: 'logs',
       //   component: () => import('@/views/database/logs/list'),

+ 150 - 81
src/router/index1.js

@@ -38,6 +38,24 @@ import Layout from '@/layout'
  * a base page that does not have permission requirements
  * all roles can be accessed
  */
+
+/**
+ * @index1 项目路由配置文件
+ *
+ * meta 字段说明:
+ * - roles: ['admin', 'doctor']  // 控制页面访问权限,支持多个角色
+ * - title: '页面标题'           // 显示在侧边栏和面包屑中的名称
+ * - icon: 'el-icon-name'        // 侧边栏中显示的图标
+ * - noCache: true               // 如果为 true,则页面不会被缓存(默认 false)
+ * - affix: true                 // 如果为 true,则标签会固定在标签视图中
+ * - breadcrumb: false           // 如果为 false,则该路由不会出现在面包屑中(默认 true)
+ * - activeMenu: '/example/list' // 如果设置路径,侧边栏会高亮显示你设置的路径
+ * - keepAlive: true             // 如果为 true,则页面会被缓存(默认 false)
+ *
+ * 路由配置说明:
+ * - constantRoutes: 静态路由,无需权限即可访问
+ * - asyncRoutes: 动态路由,根据用户角色权限动态加载
+ */
 export const constantRoutes = [
   {
     path: '/redirect',
@@ -87,12 +105,38 @@ export const asyncRoutes = [
     path: '/',
     component: Layout,
     redirect: '/dashboard',
+    meta: { title: '数据看板', icon: 'dashboard', affix: true, keepAlive: true },
     children: [
       {
         path: 'dashboard',
         component: () => import('@/views/dashboard/index'),
         name: 'Dashboard',
         meta: { title: '数据看板', icon: 'dashboard', affix: true, noCache: true }
+      },
+      {
+        path: 'directorView',
+        component: () => import('@/views/dashboard/directorView/index'),
+        name: 'directorView',
+        meta: { title: '院长数据看板', icon: 'dashboard', affix: true, noCache: true }
+      },
+      {
+        path: 'directorView-detail',
+        component: () => import('@/views/dashboard/directorView/detail'),
+        name: 'directorViewDetail',
+        hidden: true,
+        meta: { title: '病种详情', icon: 'dashboard', affix: true, noCache: true }
+      },
+      {
+        path: 'doctorView',
+        component: () => import('@/views/dashboard/doctorView/index'),
+        name: 'doctorView',
+        meta: { title: '医务数据看板', icon: 'dashboard', affix: true, noCache: true }
+      },
+      {
+        path: 'operationView',
+        component: () => import('@/views/dashboard/operationView/index'),
+        name: 'operationView',
+        meta: { title: '运营数据看板', icon: 'dashboard', affix: true, noCache: true }
       }
     ]
   },
@@ -123,6 +167,99 @@ export const asyncRoutes = [
       }
     ]
   },
+
+    {
+    path: '/user',
+    component: Layout,
+    redirect: '/user/target',
+    meta: { title: '患者管理', icon: 'user', affix: true, keepAlive: true },
+    children: [
+      {
+        path: 'target',
+        component: () => import('@/views/sick-person/target'),
+        name: 'followup',
+        meta: { title: '潜在患者', icon: 'dashboard', affix: true, noCache: true, keepAlive: true }
+      },
+      {
+        path: 'fllow-up',
+        component: () => import('@/views/sick-person/fllow-up'),
+        name: 'followup',
+        meta: { title: '跟进中患者', icon: 'dashboard', affix: true, noCache: true, keepAlive: true }
+      },
+      {
+        path: 'loss',
+        component: () => import('@/views/sick-person/loss'),
+        name: 'followup',
+        meta: { title: '流失患者', icon: 'dashboard', affix: true, noCache: true, keepAlive: true }
+      },
+      {
+        path: 'target-details',
+        component: () => import('@/views/sick-person/target-details'),
+        name: 'followup',
+        hidden: true,
+        meta: { title: '潜在患者', icon: 'dashboard', affix: true, noCache: true, keepAlive: true }
+      },
+      {
+        path: 'target-details-copy',
+        component: () => import('@/views/sick-person/target-details-copy'),
+        name: 'followup',
+        hidden: true,
+        meta: { title: '潜在患者测试页面', icon: 'dashboard', affix: true, noCache: true, keepAlive: true }
+      },
+      {
+        path: 'tag',
+        component: () => import('@/views/user/tag'),
+        name: 'user',
+        meta: { title: '我的患者', icon: 'user', affix: true, roles: ['admin'] }
+      },
+      // {
+      //   path: 'index',
+      //   component: () => import('@/views/user/index'),
+      //   name: 'user',
+      //   meta: { title: '数据分析', icon: 'user', affix: true }
+      // },
+      {
+        path: 'follow/index',
+        component: () => import('@/views/user/follow/index'),
+        name: 'follow-index',
+        meta: { title: '随访计划', icon: 'user', affix: true }
+      },
+
+      {
+        path: 'health-document/index',
+        component: () => import('@/views/user/health-document/index'),
+        name: 'health-document',
+        hidden: true,
+        meta: { title: '患者详情', icon: 'user', affix: true }
+      },
+      {
+        path: 'reason',
+        component: () => import('@/views/user/reason'),
+        name: 'reason',
+        meta: { title: '个案管理分析', icon: 'user', affix: true, roles: ['admin', 'doctor'] }
+      },
+      {
+        path: 'operational-assistant',
+        component: () => import('@/views/user/operational-assistant/index.vue'),
+        name: 'operationalAssistant',
+        meta: { title: '我的任务', icon: 'user', affix: true }
+      },
+      {
+        path: 'private',
+        component: () => import('@/views/user/private/index.vue'),
+        name: 'private',
+        meta: { title: '私域患者', icon: 'user', affix: true }
+      },
+      {
+        path: 'operational-manage',
+        component: () => import('@/views/user/operational-assistant/manage.vue'),
+        name: 'operationalManage',
+        hidden: true,
+        meta: { title: '多标签管理', icon: 'user', affix: false }
+      }
+    ]
+  },
+
   {
     path: '/operate',
     component: Layout,
@@ -148,13 +285,13 @@ export const asyncRoutes = [
     path: '/promotion',
     component: Layout,
     name: '推广运营',
-    meta: { title: '推广运营', icon: 'el-icon-box', noCache: true , roles: ['admin']},
+    meta: { title: '推广运营', icon: 'el-icon-box', noCache: true, roles: ['admin'] },
     children: [
       {
         path: 'list',
         component: () => import('@/views/promotion/list'),
         name: 'followup',
-        meta: { title: '推广运营', icon: 'dashboard', affix: true, noCache: true , roles: ['admin']}
+        meta: { title: '推广运营', icon: 'dashboard', affix: true, noCache: true, roles: ['admin'] }
       }
     ]
   },
@@ -185,82 +322,15 @@ export const asyncRoutes = [
     path: '/dataFormat',
     component: Layout,
     redirect: '/dataFormat',
-    meta: { title: '结构化', icon: 'el-icon-s-order', affix: true , roles: ['admin']},
+    meta: { title: '结构化', icon: 'el-icon-s-order', affix: true, roles: ['admin'] },
     children: [{
       path: 'tag',
       component: () => import('@/views/dataFormat/index'),
       name: 'user',
-      meta: { title: '结构化', icon: 'user', affix: true , roles: ['admin']}
+      meta: { title: '结构化', icon: 'user', affix: true, roles: ['admin'] }
     }]
   },
 
-  {
-    path: '/user',
-    component: Layout,
-    redirect: '/user/target',
-    meta: { title: '患者管理', icon: 'user', affix: true, keepAlive: true },
-    children: [
-      {
-        path: 'target',
-        component: () => import('@/views/sick-person/target'),
-        name: 'followup',
-        meta: { title: '潜在患者', icon: 'dashboard', affix: true, noCache: true,  keepAlive: true }
-      },
-      {
-        path: 'fllow-up',
-        component: () => import('@/views/sick-person/fllow-up'),
-        name: 'followup',
-        meta: { title: '跟进中患者', icon: 'dashboard', affix: true, noCache: true,  keepAlive: true }
-      },
-      {
-        path: 'loss',
-        component: () => import('@/views/sick-person/loss'),
-        name: 'followup',
-        meta: { title: '流失患者', icon: 'dashboard', affix: true, noCache: true, keepAlive: true }
-      },
-      {
-        path: 'target-details',
-        component: () => import('@/views/sick-person/target-details'),
-        name: 'followup',
-        hidden: true,
-        meta: { title: '潜在患者', icon: 'dashboard', affix: true, noCache: true, keepAlive: true }
-      },
-      {
-        path: 'tag',
-        component: () => import('@/views/user/tag'),
-        name: 'user',
-        meta: { title: '我的患者', icon: 'user', affix: true , roles: ['admin']}
-      },
-      // {
-      //   path: 'index',
-      //   component: () => import('@/views/user/index'),
-      //   name: 'user',
-      //   meta: { title: '数据分析', icon: 'user', affix: true }
-      // },
-      {
-        path: 'follow/index',
-        component: () => import('@/views/user/follow/index'),
-        name: 'follow-index',
-        meta: { title: '随访计划', icon: 'user', affix: true }
-      },
-
-      {
-        path: 'health-document/index',
-        component: () => import('@/views/user/health-document/index'),
-        name: 'health-document',
-        hidden: true,
-        meta: { title: '患者详情', icon: 'user', affix: true }
-      },
-      {
-        path: 'reason',
-        component: () => import('@/views/user/reason'),
-        name: 'reason',
-        meta: { title: '个案管理分析', icon: 'user', affix: true, roles: ['admin', 'doctor'] }
-      }
-
-    ]
-  },
-
   // {
   //   path: '/serve-patient',
   //   component: Layout,
@@ -369,7 +439,7 @@ export const asyncRoutes = [
     component: Layout,
     redirect: '/statistics/tj',
     name: '统计看板',
-    meta: { title: '统计看板', icon: 'el-icon-box', noCache: true, roles: ['admin','lulu'] },
+    meta: { title: '统计看板', icon: 'el-icon-box', noCache: true, roles: ['admin', 'lulu'] },
     children: [
       // {
       //   path: 'statistics',
@@ -456,31 +526,30 @@ export const asyncRoutes = [
         path: 'manageQuery',
         component: () => import('@/views/statistics/manageQuery'),
         name: 'changeStatQuery',
-        meta: { title: '患者管理日统计', icon: 'dashboard', affix: true, noCache: true, roles: ['admin','lulu'] }
+        meta: { title: '患者管理日统计', icon: 'dashboard', affix: true, noCache: true, roles: ['admin', 'lulu'] }
       },
 
       {
         path: 'diversionQuery',
         component: () => import('@/views/statistics/diversionQuery'),
         name: 'diversionQuery',
-        meta: { title: '患者导流日统计', icon: 'dashboard', affix: true, noCache: true, roles: ['admin','lulu'] }
+        meta: { title: '患者导流日统计', icon: 'dashboard', affix: true, noCache: true, roles: ['admin', 'lulu'] }
       },
 
       {
         path: 'followupQuery',
         component: () => import('@/views/statistics/followupQuery'),
         name: 'followupQuery',
-        meta: { title: '医生随访日统计', icon: 'dashboard', affix: true, noCache: true, roles: ['admin','lulu'] }
+        meta: { title: '医生随访日统计', icon: 'dashboard', affix: true, noCache: true, roles: ['admin', 'lulu'] }
       },
 
-
       {
         path: 'statistics1',
         component: () => import('@/views/mdt/statistics'),
         name: 'statistics',
         meta: { title: 'MDT会诊统计', icon: 'dashboard', affix: true, noCache: true, roles: ['admin'] }
       },
-    
+
       {
         path: 'rewards',
         component: () => import('@/views/mdt/rewards'),
@@ -498,8 +567,8 @@ export const asyncRoutes = [
         component: () => import('@/views/statistics/cs'),
         name: 'rewards',
         meta: { title: '测试推送服务', icon: 'el-icon-s-claim', affix: true, roles: ['admin'] }
-      },
-      
+      }
+
     ]
   },
   {
@@ -575,7 +644,7 @@ export const asyncRoutes = [
         name: 'dept',
         meta: { title: '科室配置', icon: 'dashboard', affix: true, noCache: true, roles: ['admin'] }
       },
-      
+
       {
         path: 'therapyNotes',
         component: () => import('@/views/diagnosis/therapyNotes'),
@@ -588,7 +657,7 @@ export const asyncRoutes = [
         name: 'incident',
         meta: { title: '诊中配置', icon: 'dashboard', affix: true, noCache: true, roles: ['admin'] }
       }
-    
+
     ]
   },
 

+ 2 - 3
src/store/modules/permission.js

@@ -10,12 +10,11 @@ function hasPermission(roles, route) {
     return roles.some(role => route.meta.roles.includes(role))
   } else {
     // if()
-    if(roles == 'colleague'){
+    if (roles == 'colleague') {
       return false
-    }else{
+    } else {
       return true
     }
-   
   }
 }
 

+ 1 - 1
src/store/modules/user.js

@@ -73,7 +73,7 @@ const actions = {
         removeToken()
         removeUserRealName()
         removeUserDepID()
-        removeUserID();
+        removeUserID()
         resetRouter()
         // reset visited views and cached views
         // to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485

+ 1 - 3
src/utils/auth.js

@@ -45,8 +45,6 @@ export function removeUserDepID() {
   return window.localStorage.removeItem(UserDepID)
 }
 
-
-
 /** UserID */
 export function getUserID() {
   return window.localStorage.getItem(UserID)
@@ -58,4 +56,4 @@ export function setUserID(userId) {
 
 export function removeUserID() {
   return window.localStorage.removeItem(UserID)
-}
+}

+ 72 - 86
src/utils/encrypt.js

@@ -1,123 +1,109 @@
 // 加密  吧数据加密
 
-import CryptoJS from "crypto-js";
-import { JSEncrypt } from "jsencrypt";
+import CryptoJS from 'crypto-js'
+import { JSEncrypt } from 'jsencrypt'
 /**
  * @word 要加密的内容
  * @keyWord String uuid
  *  */
-let type =  process.env.VUE_APP_API_ENCRYPT
+const type = process.env.VUE_APP_API_ENCRYPT
 export function encrypt(word, keyWord, RsaPublicKey, v) {
-	
-	if(type == 'false'){
-		return word
-	}
-	let req = {
-		k: rsaEncrypt(keyWord, RsaPublicKey),
-		t: aesEncrypt(word, keyWord),
-		v: v,
-	}
-	return req
+  if (type == 'false') {
+    return word
+  }
+  const req = {
+    k: rsaEncrypt(keyWord, RsaPublicKey),
+    t: aesEncrypt(word, keyWord),
+    v: v
+  }
+  return req
 }
-//RSA公钥加密
+// RSA公钥加密
 function rsaEncrypt(value, PUBLIC_KEY) {
-	// console.log(value, PUBLIC_KEY, '显示数据哈哈哈')
-	let encrypt = new JSEncrypt();
-	encrypt.setPublicKey(
-		"-----BEGIN RSA PUBLIC KEY-----" +
+  // console.log(value, PUBLIC_KEY, '显示数据哈哈哈')
+  const encrypt = new JSEncrypt()
+  encrypt.setPublicKey(
+    '-----BEGIN RSA PUBLIC KEY-----' +
 		PUBLIC_KEY +
-		"-----END RSA PUBLIC KEY-----"
-	);
-	let encrypted = encrypt.encrypt(value);
-	return encrypted
+		'-----END RSA PUBLIC KEY-----'
+  )
+  const encrypted = encrypt.encrypt(value)
+  return encrypted
 }
 
 function aesEncrypt(word, keyWord) {
-	var key = CryptoJS.enc.Utf8.parse(keyWord);
-	var srcs = CryptoJS.enc.Utf8.parse(JSON.stringify(word));
-	var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });
-	return encrypted.toString();
+  var key = CryptoJS.enc.Utf8.parse(keyWord)
+  var srcs = CryptoJS.enc.Utf8.parse(JSON.stringify(word))
+  var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
+  return encrypted.toString()
 }
 
-
-
-
-
-
-
-
 /**
  * @data 要解密的内容
  * @key String  服务器随机返回私钥
  *  */
 export function decrypt(data, key) {
-	if(type == 'false'){
-		return data
-	}
-
-	let uuid = RsaPrivateDecrypt(data.k, key)
-	// console.log(uuid,'显示数据哈哈哈')
-	let myData = AesDecrypt(data.t, uuid)
-	// console.log(myData,'最好的数据哈哈哈')
-	return JSON.parse(myData)
+  if (type == 'false') {
+    return data
+  }
+
+  const uuid = RsaPrivateDecrypt(data.k, key)
+  // console.log(uuid,'显示数据哈哈哈')
+  const myData = AesDecrypt(data.t, uuid)
+  // console.log(myData,'最好的数据哈哈哈')
+  return JSON.parse(myData)
 }
 
 //	RSA私钥解密
 function RsaPrivateDecrypt(value, PRIVATE_KEY) {
-	let decrypt = new JSEncrypt();
-	decrypt.setPrivateKey(
-		"-----BEGIN RSA PRIVATE KEY-----" +
+  const decrypt = new JSEncrypt()
+  decrypt.setPrivateKey(
+    '-----BEGIN RSA PRIVATE KEY-----' +
 		PRIVATE_KEY +
-		"-----END RSA PRIVATE KEY-----"
-	);
-	let uncrypted = decrypt.decrypt(value);
-	return uncrypted;
+		'-----END RSA PRIVATE KEY-----'
+  )
+  const uncrypted = decrypt.decrypt(value)
+  return uncrypted
 }
 
 // AES解密
 function AesDecrypt(word, secret_key) {
-	var key = CryptoJS.enc.Utf8.parse(secret_key);
+  var key = CryptoJS.enc.Utf8.parse(secret_key)
 
-	var decrypt = CryptoJS.AES.decrypt(word, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });
-	return CryptoJS.enc.Utf8.stringify(decrypt).toString();
+  var decrypt = CryptoJS.AES.decrypt(word, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
+  return CryptoJS.enc.Utf8.stringify(decrypt).toString()
 }
 
-
-
-
 export function uuid() {
-	var s = [];
-	var hexDigits = "0123456789abcdef";
-	for (var i = 0; i < 36; i++) {
-		s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
-	}
-	s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
-	s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
-	s[8] = s[13] = s[18] = s[23] = "-";
-
-	var uuid = s.join("");
-	return uuid;
+  var s = []
+  var hexDigits = '0123456789abcdef'
+  for (var i = 0; i < 36; i++) {
+    s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1)
+  }
+  s[14] = '4' // bits 12-15 of the time_hi_and_version field to 0010
+  s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1) // bits 6-7 of the clock_seq_hi_and_reserved to 01
+  s[8] = s[13] = s[18] = s[23] = '-'
+
+  var uuid = s.join('')
+  return uuid
 }
 
-
-import { getCertificate } from "@/api/user"
+import { getCertificate } from '@/api/user'
 export function getAesRsa(again) {
-	return new Promise(function (resolve, reject) {
-		let aesRsa = localStorage.getItem('aesRsa')
-		if (!aesRsa || again) {
-			getCertificate({}).then((res) => {
-				if (res.code == "0" && res.data) {
-					let data = res.data;
-					localStorage.setItem('aesRsa', JSON.stringify(data))
-					resolve(true)
-				} else {
-					reject(false)
-				}
-			}).catch(res => {
-				reject(false)
-			})
-
-		}
-	})
-
+  return new Promise(function(resolve, reject) {
+    const aesRsa = localStorage.getItem('aesRsa')
+    if (!aesRsa || again) {
+      getCertificate({}).then((res) => {
+        if (res.code == '0' && res.data) {
+          const data = res.data
+          localStorage.setItem('aesRsa', JSON.stringify(data))
+          resolve(true)
+        } else {
+          reject(false)
+        }
+      }).catch(res => {
+        reject(false)
+      })
+    }
+  })
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов